Skip to content

Instantly share code, notes, and snippets.

@blackketter
Last active May 2, 2021 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blackketter/b6a552d73e29d0a02227b3b00a49fc4f to your computer and use it in GitHub Desktop.
Save blackketter/b6a552d73e29d0a02227b3b00a49fc4f to your computer and use it in GitHub Desktop.
Proposal for Vimac unified mode

This is a modest proposal for updating the Vimac key mapping to simplify use and add additional features.

Vimac has two basic modes:

  • Mouse Mode, which uses the keyboard to move the cursor to locations on the screen, set up modifiers and optionally click.

  • Scroll Mode, which uses the keyboard to select and scroll scrollable areas on the screen.

Below are a set of proposed default key mappings to various functions for in each mode.

Mouse Mode

Keys

All keys are tapped (no hold modifiers).

  • Basic

    • ctrl-f - Begin Mouse mode and display hints
    • A S D F H J K L... - Default set of hint keys
    • tab - Rotate through overlapping hints
    • R - Refresh hints
    • G - Display grid-based hints, tap again to show content-based hints
  • Modifiers

    • U - Lock hint mode for repeat actions. Exit via esc
    • shift - Tap to toggle holding down shift key
    • option - Tap to toggle holding down option key
    • command - Tap to toggle holding down command key
    • ctrl - Tap to toggle holding down ctrl key
    • 1 to 9 - Tap to set click count (2 is double-click, 3 is triple-click, etc.)
  • Movement

    • M - Mouse mode, don't auto click or exit after typing hints
    • arrow keys - Move mouse pointer
  • Actions

    • return - Left-click mouse (automatic if not locked with M). Mouse is pressed when key is pressed, released when key is released, in order to support click and hold.
    • ; - Right-click mouse. Mouse is pressed when key is pressed, released when key is released, in order to support click and hold.
    • C - Tap to click and hold mouse, for click and drag. Tap again to release.
    • - + - Pinch zoom in/out (= is the same as +)
    • [ ] - Rotate
  • Ending Mouse Mode

    • X - Switch to scroll mode
    • esc - End Mouse Mode (also ctrl-space again)

Examples

  • ctrl-F A S - Invoke Vimac and click on hint AS

Scroll Mode

Keys

All keys are tapped (no hold modifiers).

  • Basic

    • ctrl-J - Begin Scroll mode and display default scroll area selection
    • tab - Select next scroll area
    • shift-tab - Select previous scroll area
  • Actions

    • H J K L - Scroll directions (H - left, J - up, K - down, L - right)
    • - + - Pinch zoom in/out
    • [ ] - Rotate
  • Ending Scroll Mode

    • X - Switch to Mouse mode
    • esc - End Scroll mode (or ctrl-backspace again)

Examples

  • ctrl-J tab J esc - Invoke Vimac scroll mode, move to the second scroll area, scroll up, exit

Notes

  1. TODO
@blackketter
Copy link
Author

That sounds good, though I'm not sure C and R are the best choices for defaults, but that's something that can be tweaked or customized later.

When in a locked & moving mode, tapping C and R would do a click or right-click, correct?

Or are C, R and M a three-way toggle? I'd like to find a way to move to a hint and click with a key and then move to another and click with another keystroke.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment