Vim-style nested keyboard shortcuts for REAPER. Press a leader key to open a which-key overlay, then type a short sequence to trigger any action - without memorising dozens of modifier combinations.
L → t → m mute selected track(s)
L → t → c → c set random custom color
L → s → m toggle mixer
L → f → f show FX chain
- Press your leader key (e.g.
L) - a floating overlay appears listing all namespaces - Press a namespace key (e.g.
tfor Tracks) - the overlay updates to show that namespace's actions - Press an action key (e.g.
mfor Mute) - the action fires and the overlay closes
Sequences can be nested to any depth. Press Backspace to step back one level, Esc to cancel.
- REAPER 6+
- SWS Extension - required for any bindings that use named commands (strings starting with
_)
- Make a folder named
rea_leader/in the REAPERScripts/directory - Clone the this repo into that folder
- In REAPER: Actions → Show action list → Load ReaScript
- Select
rea_leader/main.lua- it will appear as Script: main.lua - Click Add shortcut and press your chosen leader key
All bindings live in config.lua. The structure is a nested Lua table:
M.bindings = {
t = { -- namespace key
label = "Tracks", -- shown in the overlay
keys = {
n = { label = "New track", cmd = 40001 }, -- action key → command ID
c = { label = "Color", keys = { -- nested submenu
c = { label = "Random color", cmd = "_SWS_TRACKRANDCOL" },
}},
}
},
}cmdaccepts a REAPER command ID (number) or a named command string (e.g."_SWS_TRACKRANDCOL")keysinstead ofcmdcreates a submenu - nesting works at any depthM.timeoutcontrols how many seconds of inactivity cancel the sequence
Actions → Show action list → select an action → right-click → Copy selected action command ID
The ID is a plain number for built-in actions, or a _-prefixed string for SWS/ReaPack scripts. Both work in config.lua.
rea_leader/
main.lua - entry point; bind this to your leader key
config.lua - all key bindings (the only file you need to edit)
state_machine.lua - tracks the current position in the binding tree
ui.lua - gfx overlay rendering (HiDPI/Retina aware)
actions.lua - executes REAPER commands