Alt-escape keysequence not working in nnn #1105

Closed
opened 5 months ago by emwal · 1 comments
emwal commented 5 months ago

Problem:
The nnn filemanager uses Alt+Escape to clear the searc results after narrowing down the contents of a directory. When using foot this does not work correctly: Pressing Alt+Escape opens another tab in the ~/ directory.

Steps to reproduce:

  1. Open nnn in foot
  2. Go to directory with multiple files.
  3. Do a search with /.
  4. Try to clear the results with Alt+Escape.

I tested the behaviour with the same zsh config in kitty and there it worked as intended.

Thank you for your help!

Problem: The [nnn filemanager](https://github.com/jarun/nnn) uses Alt+Escape to clear the searc results after narrowing down the contents of a directory. When using foot this does not work correctly: Pressing Alt+Escape opens another tab in the ~/ directory. Steps to reproduce: 1. Open nnn in foot 2. Go to directory with multiple files. 3. Do a search with /. 4. Try to clear the results with Alt+Escape. I tested the behaviour with the same zsh config in kitty and there it worked as intended. Thank you for your help!
Owner

Foot sends an "extended" keycode for alt-escape. The escape follows a standard encoding, and there should be no ambiguity what it means (meaning, it's weird that nnn does something completely different when it sees it - it suggests it only partially parses the sequence and thinks it seeing something different).

Other terminals send \E\E (i.e. ESC ESC) on alt-escape. This is ambiguos, since it could mean you pressed escape twice. Or, that you pressed escape once, and then another key combination that also starts with ESC (with the rest of that key sequence following soon).

Still, it might make sense for foot to do what every one else does here. So perhaps we should consider this particular ESC combination a bug.

Foot sends an "extended" keycode for alt-escape. The escape follows a standard encoding, and there should be no ambiguity what it means (meaning, it's weird that nnn does something completely different when it sees it - it suggests it only partially parses the sequence and thinks it seeing something different). Other terminals send `\E\E` (i.e. ESC ESC) on alt-escape. This is ambiguos, since it could mean you pressed escape twice. Or, that you pressed escape once, and then another key combination that also starts with ESC (with the rest of that key sequence following soon). Still, it _might_ make sense for foot to do what every one else does here. So perhaps we should consider this particular ESC combination a bug.
dnkl closed this issue 4 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: dnkl/foot#1105
Loading…
There is no content yet.