vtm icon indicating copy to clipboard operation
vtm copied to clipboard

Keyboard-only access

Open o-sdn-o opened this issue 4 years ago • 6 comments

Make it possible to use only keyboard.

  • [x] Ctrl + PgUp/PgDn switch between windows
  • [ ] ~~Alt + Z~~ to call sidebar menu
  • [ ] Alt + Arrows/Ctrl + Arrows to access window menu
  • [ ] ...

All operations can be done with either the mouse or the keyboard.

x-link: Keyboard shortcut escape sequence #315

Resources

  • https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
  • https://en.wikipedia.org/wiki/IBM_Common_User_Access

o-sdn-o avatar Jul 14 '21 06:07 o-sdn-o

Right Alt + Z is used on Polish keyboard to write "ż", and I imagine many national keyboard layouts work similarly. How about using Super key ("windows logo") instead? It's traditionally not used in terminal applications or national keyboards at all, and many DEs use them to handle their functionalities. All i3 shortcuts are based on Super key, for example (or Alt key, if the user chooses so). That would, of course, interfere with DE in which vtm is run...

tomek-szczesny avatar May 20 '22 10:05 tomek-szczesny

Ok, instead of Alt+Z, we will need something else. The whole variety of shortcuts is limited to those that the terminal forwards inside the terminal to the application.

We can set any combination that can be displayed in $> cat when fired.

o-sdn-o avatar May 20 '22 10:05 o-sdn-o

Well, Windows key doesn't work in terminal window, and in tty4 it's ignored (Super+z produces "z"). Left Alt + Z works fine though. I wonder if there is any convention for international keyboards, about which combinations are commonly used for diacritics.

tomek-szczesny avatar May 20 '22 11:05 tomek-szczesny

Perhaps this is all individually for each writing.

o-sdn-o avatar May 20 '22 12:05 o-sdn-o

I came up with the following thing.

vtm can accept entire strings (which sent by block not key by key) as a shortcut and interpret them as commands. To do this, the user must configure a hotkey in his terminal to generate such a string.

For example, now for toggling a debug overlay, it is enough to send the whole line "🐞" (several bytes in UTF-8) to vtm (same action for Left+Right triple click on main menu). You can assign any combination to generate this string for the overlay toggling.

o-sdn-o avatar May 20 '22 12:05 o-sdn-o

Universal and configurable approach is always welcome, I think. :)

tomek-szczesny avatar May 20 '22 12:05 tomek-szczesny