philj56 / tofi

Tiny dynamic menu for Wayland
MIT License
870 stars 36 forks source link

Customisable keybindings #101

Open philj56 opened 1 year ago

philj56 commented 1 year ago

I've been meaning to look into customisable keybindings for a while, but I'm not sure what the best way is / if it's actually necessary.

Pros

Cons

The options I plan to look into, then, are:

philj56 commented 1 year ago

I've added a --physical-keybindings option in 47a7f68cd03948035617b83b31349330ae8e55dc, which defaults to true. Hopefully this is enough for nearly everyone's use case.

hilaolu commented 1 year ago

can't wait for this feature

hilaolu commented 1 year ago

when will next version release?

mb720 commented 9 months ago

Would this also allow to resize tofi's font while it's displaying?

s1n7ax commented 4 months ago

Anyone have any idea how to use --physical-keybindings. I have no clue what following supposed to mean

    # If true, use physical keys for shortcuts, regardless of the current
    # keyboard layout. If false, use the current layout's keys.
    physical-keybindings = true
MahouShoujoMivutilde commented 4 months ago

It means to use keycodes instead of keysyms, so if you switch your keyboard layout (e.g. latin to cyrillic) your hotkeys still work.

But if you have e.g. dvorak set on X11 / wayland compositor level it'll still respond to hotkeys according to how your physical keys on a keyboard are. But if you don't want that - you can set the option to false.

Discussion https://github.com/philj56/tofi/issues/41#issuecomment-1286131022

hvhaugwitz commented 4 months ago

I was just about to create a new feature request for remapping C-j to Confirm (as seen in emacs, rofi, dmenu and other tools); but I think it is time to start providing Sway/Hyprland style key bindings (as mentioned above) instead of adding more and more default key bindings (see for example #97 or #135).

To avoid an overfilled default configuration I would suggest to only bind one key per action by default and leave customization to the users.