makew0rld / amfora

A fancy terminal browser for the Gemini protocol.
GNU General Public License v3.0
1.14k stars 65 forks source link

Fix users being unable to exit help menu #261

Closed dvejmz closed 2 years ago

dvejmz commented 2 years ago

Ignore any keypresses that don't have a corresponding binding in the Help page to avoid users triggering keybindings that remove the focus from the Help screen and becoming unable to exit, as Help keybindings are no longer captured correctly.

Rather than adding unnecessary complexity to make the Help page more flexible and capable of handling input events meant for other panels, I opted to restrict the input set to the keybindings that have a corresponding action in the Help page while it's active.

Closes #241 .

makew0rld commented 2 years ago

Looks like an elegant solution, thanks. Using those constants is nice too. However, this removes some keybindings that are probably important to keep, like the ones for quitting Amfora. Ideally those would still work.

I know it's been a while, sorry about missing the Hacktober fest thing. Let me know if you'd like to continue working on this PR, and I'll take over if not.

makew0rld commented 2 years ago

I've made some changes so that the quit key is supported. Everything else should be fine. Thanks for your PR!