Send button only works when pressed immediately after
tavis’ answer nailed down your problem: your program is completely
unresponsive when it is blocked in the first while loop of the
loop() function. Here I will try to give you some hints on how to
avoid this situation, but first some general comments:

if (pres_len &lt; (unit_delay*3) &amp;&amp; pres_len &gt; 50)


The threshold should be unit_delay*2, maybe with a longer
unit_delay. In Morse, a dot is one unit, and a dash is three units. If
you have to set a threshold, it should be somewhere in the middle.
Otherwise, a perfectly valid dash of 2.99 units would be mistaken
for a dot.
Also, a function returning anything but void should always return a
value. What is this function supposed to return if press_len is
smaller or equal than 50? And if it is exactly equal to
unit_delay*3? The best way to make sure you did not forget any case is
to have an else at the end that returns a default value in case no
condition matches:
else
    return '?';  // we could not understand

In this particular case, it seems to me like you already did the
debounce prior to calling the function, so it could be simplified to
char getSymbol()
{
    if (pres_len &lt; 2 * unit_delay)
        return '.';
    else
        return '-';
}

Note that giving functions meaningful names is an important step in
making the code easy to understand and reason about.

if(i2&gt;=2)
{
  i1++;
  i2=0;
}
else
{i2++;
}


All this serves no useful purpose, as you do not use i1 or i2 after
setup(). Removing useless stuff is also important for the clarity of
the code.

Serial.println(&quot;This code is not exist!&quot;);


It should say “I cannot understand this code!”, but it may well exist.
Now, to the core of the issue. If you want the program to be responsive,
you should embrace non-blocking programming. This means getting rid of
delay() (see Blink Without Delay) and getting rid of blocking
loops, like the two while loops at the top of loop(). A very useful
approach is to program your system as a finite state machine.
Please, take the time to read and digest these two resources.
Next, as an example, I can point you to a Morse decoder of mine that is
based on the finite state machine concept. You do not have have to look
at my code, which may be too low level for your taste, but look at the
documentation of the program internals. It explains how the state
machines are built and interact with one another. Below is a state
diagram taken from that documentation. It shows the state machine that
takes the debounced “rise” and “fall” events as inputs, and generates
“dot”, “dash”, “end-of-char” and “end-of-word” symbols as outputs: