vonshednob / pter

Manage your todo.txt in a commandline user interface (TUI)
https://vonshednob.cc/pter/
MIT License
102 stars 6 forks source link

Escape key has a significant delay #34

Closed andrei-a-papou closed 6 months ago

andrei-a-papou commented 6 months ago

There are several ways to cancel operations in pter -- you can ^C or you can hit Esc. Compared to ^C, Esc has a noticeable delay. I've googled and discovered you can control the delay via an environment variable ESCDELAY.

I'm running pter dockerized, so using ENV ESCDELAY=50 in my Dockerfile solved the issue for me. Perhaps this could be added to documentation or simply enabled by default internally? I'm assuming since ^C is instantaneous, Esc should be too :)

vonshednob commented 6 months ago

Hm, yeah, I had encountered that, too. It’s a "feature" (aka side-effect) of curses. What helps to make it immediate is to press Esc twice :shrug:

I agree though, documentation would have to mitigate the surprise in the user experience :)

vonshednob commented 6 months ago

I added the behaviour (and your proposed work-around) to the documentation of 3.15.0! Thanks a lot for looking up the ESCDELAY. I know I knew at some point that it existed, but I would have had to search for it again :sweat_smile: