karlch / vimiv-qt

An image viewer with vim-like keybindings
https://karlch.github.io/vimiv-qt/
GNU General Public License v3.0
177 stars 15 forks source link

Unable to bind semicolon #845

Closed sheitfugit closed 1 month ago

sheitfugit commented 1 month ago

Pretty self-explanatory. In the binds, neither <semicolon> nor ; works to bind semicolon to a key, which is a problem for someone that tends to use jkl; instead of hjkl in vim-like layouts.

qadzek commented 1 month ago

According to the output of vimiv --debug gui.eventhandler, it should be ;, not <semicolon>. However, that character seems to be reserved for comments. Escaping it (\; or ;;) doesn't look to work either.

Not a real solution, but a temporary workaround: Keyd allows to remap keys for particular applications. This means it's possible to map ; to e.g. <home> only for Vimiv, and inside Vimiv you would bind <home>.

karlch commented 1 month ago

Thanks a bunch for reporting!

And as @qadzek has mentioned, this was indeed due to configparser interpreting ; (and #) as a comment symbol, thus the line was not read at all. Should be fixed with the recent merge by explicitly re-mapping them to <semicolon> and <number> respectively :blush: