-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autorepeat gets stuck when pressing two arrows or arrow+DEL/BKSP at the same time on extra keys bar #2156
Comments
I can confirm this on latest debug artifact.... Record_2021-07-03-17-30-20.mp4 |
Yes, sorry, I pressed Submit accidentally before I wrote the full text. Oh, and thanks for the repro. |
Confirmed. AutoRepeat is implemented here. Will look into it. Other stuff needs to be done for extra keys too, so might do it with it at some point. |
It's likely because previous executioner should be shutdown before starting a new one and losing reference to the old one. Just a guess. But if there is a need to press multiple keys at the same time, which likely there is, then will have to create a list of executioners. |
Under certain cases scheduled executor may leak causing repeatable input to stuck. Issue: #2156
Under certain cases scheduled executor may leak causing repeatable input to stuck. Issue: termux#2156
Under certain cases scheduled executor may leak causing repeatable input to stuck. Issue: termux#2156
Hi. I have been using Termux for a long time and I find it very useful, but a few annoying issues surface from time to time. Some of them are easy to reproduce in order to avoid as much as possible the circumstances which trigger them. Some other issues are harder to track down.
Problem description
Suppose you have the default extra keys bar with the four arrow keys, or you customized it via termux.properties. Arrows, DEL and BKSP have autorepeat behavior, so they are sent continuously as long as you hold them. When two of these keys are tapped at the same time, autorepeat gets stuck.
Steps to reproduce
To make the problem more obvious, open a full screen editor with some text loaded. Then, tap (no need to hold or keep tapping) any two arrows or an arrow and DEL or BKSP at the same time on the extra keys bar. It may also work with DEL and BKSP if you have included them both on your extra keys settings.
For example, you are editing a file. A few consecutive lines have a comment character at the beginning and you want to remove it from all these lines (suppose your editor doesn't have a macro feature). Then, you repeatedly tap DEL and DOWN in rapid succession, which will trigger this issue. Cursor moves like crazy, history lines are recalled or characters are being deleted at great speed. There is just a little you can do to stop this madness. Ctrl and Alt extra keys cannot be used because they get cancelled whenever a key is sent to the terminal.
Workaround: long tap on screen so selection handles and the copy/paste/more menu appear. Then, autorepeat stops. However, a ghost handle or menu could remain on screen when dismissed.
Expected behavior
Autorepeat mode must not get stuck, i.e., maybe simultaneous key presses with autorepeat should be processed serially.
Additional information
The text was updated successfully, but these errors were encountered: