/vim-clutchify

evdev-based vim-clutch for linux with only one pedal/no hardware hacks.

Primary LanguagePython

Steps:

  1. Run Linux (and X windows)
  2. Plug in USB footpedal named something like 'RDing FootSwitch1F1.'
  3. Disable the footpedal as an input into X.
  4. Run this program as root.
  5. When you press the pedal down <esc>a will be typed.
  6. When you release it, <esc> will be typed.

Concretely:

# Install it
pip3 install vim-clutchify

# Get input id of switch.
xinput | grep FootSwitch

# Disable the switch sending keys to X directly.
xinput disable ${ID_FROM_PREVIOUS_STEP}

# Launch it!
sudo vim-clutchify

# Open vim
vim
# Profit!

Inspired by this project by Aleksandr Levchuk.