garybernhardt / selecta

A fuzzy text selector for files and anything else you need to select. Use it from vim, from the command line, or anywhere you can run a shell command.
MIT License
1.34k stars 81 forks source link

Down arrow kills Selecta #71

Closed garybernhardt closed 9 years ago

untitaker commented 9 years ago

I honestly thought that was intended behavior, or at least I didn't think much about it.

You mentioned in another issue that binding the arrow-keys is hard to do without curses. Is this still correct, is there even a way to solve this issue?

garybernhardt commented 9 years ago

Yeah... it's caused by the newly-added support for ESC. When you hit an arrow key, it sends an escape sequence. Selecta sees the ESC character and aborts, thinking that you hit the escape key.

The normal workaround is to introduce some kind of delay. You see an ESC, and you wait 250 ms or so before assuming that it's an actual press of the ESC key. I think I'm just going to revert the support for ESC. I should've trusted my intuition on that. ;)

untitaker commented 9 years ago

What about simply requiring ESC to be hit twice? That'd allow selecta to support arrow keys as well.

alexch commented 9 years ago

vt100 VT100 4EVR