darkhz / bluetuith

A TUI bluetooth manager for Linux.
MIT License
914 stars 24 forks source link

Keyboard navigation #43

Closed Kabouik closed 10 months ago

Kabouik commented 10 months ago

Even though bluetuith is built around mouse support, as a TUI, it would be very nice if it could be fully controlled from the keyboard. Unfortunately, I can't seem to navigate through the three top entries or their contextual menus without clicking, be it using Left/Right arrows, Tab , or vi-bindings. Only Up and Down arrows seem to allow moving the selection among known devices.

Even without going too complicated, just allowing selecting those entries with Left/Right arrows or Tab/Shift+Tab, and showing/hiding their contextual menus with Return/Escape would be very useful. A h or ? keybinding to show all available keybindings for the current selection would be handy too, though that would likely require more work? I'm stupid, I just tried h but not ?.

Kabouik commented 10 months ago

Okay, so I just found that, which shows this should already be covered: https://darkhz.github.io/bluetuith/Configuration.html . I'm just not sure why Left and Right don't seem to work to select "Adapter" and "Device".

Sorry for the noise.

Kabouik commented 10 months ago

Alright, I just needed to set a keybinding for Menu to be able to navigate through them, the default Alt+m was conflicting with my WM's bindings. Somehow, some bindings fail to work even if they don't trigger an error, like Ctrl+m (won't even show in the ? menu), or Shift+Enter (will show, but has no effect). I ended up setting Ctrl+Space.

darkhz commented 10 months ago

Some keybindings will conflict because they translate to other keybindings, or because the terminal does not capture them. For example, Ctrl+m is like pressing the Enter key.

Left and Right are not configured to switch context menus, only Tab (or a configured key to cycle through menus) can do that.