More sophisticated keyboard shortcut options: modifier keys, input mode toggling, leader key sequences

I don’t want to imply that it’s good or acceptable to omit any mouse-first or mouse-only interaction support, but as a vim+i3wm user I’m able to have a keyboard-only workflow for most of the time I’m using the computer, and the more tools that can support fluent keyboard-only operation, the more efficient my digital life gets. The keyboard shortcut support is a good starting point as-is, I think my own workflow could be a lot nicer and make use of more memex features if I could configure keybindings with modifiers, or in a toggle-able memex input mode, or using leader-sequences. Most of the default keybindings conflict with other things either built into the browser, in common use among web apps, or in use by other extensions, so I need to think of alternative keys that won’t conflict. There’s a very limited range of options to work with, and I’d be happier to keep the mnemonic value of the letters but just not accidentally trigger them when I mean to do something else.

In vim, we have modal editing, so by default keys will do things like move the cursor around or operate on the text selected or under the cursor, and then we switch into insert mode to type freely. For memex, I’d want to leave a page’s default keybindings alone unless I trigger a keybinding (probably using a modifier like ctrl/alt/shift + one other key) to enter “memex mode” and then all the mnemonic keybinds are available with single keypresses. this would open up a lot of the keyboard for mapping more functionality in the future, too. I’m imagining very keystroke-efficient ways of bookmarking, labeling, categorizing, and annotating, with visual overlay feedback.

Also in vim, we have leader commands. If you press a given configured “leader” key, it has a short timeout before it forwards as a regular keystroke. If during that timeout, you press other keys, they become sequences with their own special bindings that the user can configure. e.g. d is normally ‘delete’ but leader, d could be a custom shortcut for “downcase”, or you can do sequences like leader, jkjk typed quickly to toggle modes instead of reaching for the escape key, or typing a whole command out in command mode. leader is commonly set to , or \ which happen to have few conflicts in vim for most people. for memex I could imagine setting leader or mode-toggle to ctrl-m or alt-m for “memex” considering it doesn’t appear to currently conflict with any standard bindings.

I like the idea of having an activator keyboard shortcut.

Essentially this means to add the ability to activate the keyboard shortcuts with a keyboard shortcut.

1 Like

Yes, more or less, for the most basic implementation. It should also impact the key handling precedence so that memex bindings are always in charge when it’s active, but otherwise a page’s existing keybindings can work normally.