-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
Hi!
I noticed that the ANSI escape sequences that Termux send to applications that corresponds to clicks sometimes are out of range. This happens when clicking between the display and the keyboard. This has the unfortunate consequence that it confuses applications like Emacs.
Background:
When touching the Termux screen, the following escape sequence is emitted:
ESC [ < 0 ; COL ; LINE M ESC [ < 0 ; COL ; LINE m
Where COL and LINE represent the column and the line if the click, encoded as ascii strings.
When clicking on the first line, the LINE is "1". When clicking on the last line of, say, a display ten lines high, it is "10".
The problem occurs if you tap the screen a little bit below the display, but above the keyboard. Then LINE will be "11", which is out of range. This, unfortunately, triggers Emacs into believing that you clicked on the menu bar.
I haven't checked if the same problem exists for COL, but presumably it does.
If you want to check the escape sequences that Termux emits, you can start Emacs. Click on various locations and then type C-h l (which runs the command view-lossage). You will also note that if you tap very low on the screen, the text "Menu Bar (up/down ..." appears in the minibuffer, which it shouldn't.
This doesn't appear to be a problem when the keyboard is hidden.
-- Anders Lindgren