vonshednob / pter

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

Patch to support F13-F20 keys #39

Closed andrei-a-papou closed 6 months ago

andrei-a-papou commented 6 months ago

Like in Midnight Commander and some other TUI apps, it would be nice to support more function keys. The reason I use them is two-fold:

  1. I use several keyboard layouts and some of them are non-Latin. This means some single-letter keyboard shortcuts stop working as I switch between layouts. You don't have this problem with function keys. But it does mean you might need more than the standard twelve :)
  2. With more function keys recognized, you can have easy-to-remember "parallel" bindings. E. g. F6 invokes select-project and shift + F6 (which is F18 in my Docker container) invokes search-project. Or F4 can edit a task, while shift + F4 edits a tasks in an external editor.

Anyway, I've attached a simple patch, tested it with 3.14.0 and 3.15.1. key.py.diff.gz

vonshednob commented 6 months ago

Thanks a lot! I added you to the list of authors and your patch is in 3.15.2!