GitHub
Expand/Collapse All

Modifier Keys

Post left_ctrl when return_or_enter is hold.
Post escape if caps is pressed alone, left_ctrl otherwise
Map left_ctrl to caps_lock.
Change caps_lock key to command+control+option+shift. (Post escape key when pressed alone)
Change caps_lock key to command+control+option+shift. (Post f19 key when pressed alone)
Change caps_lock key to command+control+option+shift. (Use shift+caps_lock as caps_lock)
Change caps_lock to control if pressed with other keys, to escape if pressed alone.
Post escape if left_control is pressed alone.
Post return_or_enter if right_control is pressed alone.
Change left_shift to caps_lock if pressed alone
Change right_shift to caps_lock if pressed alone
Toggle caps_lock by pressing left_shift + right_shift at the same time
Post caps_lock if escape is pressed alone.
Post Escape if grave_accent_and_tilde (backtick) is pressed alone; post grave_accent (backtick) if Option + grave_accent_and_tilde is pressed.
Press left_shift alone produces F12
Press left_control alone produces F13
Press left_command alone produces F14
Press left_option alone produces F15
Press right_control alone produces F16
Press right_command alone produces F17
Press right_alt alone produces F18
Change shift + delete to forward delete (rev 2)
Change Command_R + Command_L to escape only if pressed at the same time.
Post Escape if Command_R is pressed alone.
Change left_control + letter to left_command + letter
Change fn + letter to left_control + letter

Emulation Modes

Change fn + I/J/K/L to Arrow Keys
Change right_command+i/j/k/l to Arrows
Vi Mode [S as Trigger Key]
Vi Mode [D as Trigger Key] (recommended)

Moving Around

Trigger Key + H/J/K/L Arrow Keys
Trigger Key + F Fn
Trigger Key + F + H/J/K/L Home / Page Down / Page Up / End
Trigger Key + 0/4 Go to Start/End of the Line

Selecting Text (Visual Mode)

Trigger Key + V + H/J/K/L Select Text
Trigger Key + V + 0/4 Select Until Start/End of the Line
Trigger Key + V + B/W Select Until Start/End of the Word
Trigger Key + V + Open/Close Bracket Select Until Start/End of the Paragraph
  • You can use either S or D as the trigger key
  • Currently, S doesn’t work very well when typing fast
  • Since dh-, dj-, dk- and dl- words are rare, using D instead of S will produce less trigger errors
Change Control + h/j/k/l to Arrows
Change Option + h/j/k/l to Arrows
Change Fn + h/j/k/l to Arrows
Map ctrl + [ to escape
Emacs key bindings [C-x key strokes] (rev 1)
Emacs key bindings [control+keys] (rev 8)
Emacs key bindings [option+keys] (rev 4)

Key Bindings (C-x key strokes)

C-x C-c Quit application (post command-q)
C-x C-f Open file (post command-o)
C-x C-s Save file (post command-s)

Key Bindings (control+keys)

control+d forward delete
control+h delete
control+i tab
control+[ escape
control+m return
control+bfnp arrow keys
control+v page down
control+a (Microsoft Office) home
control+e (Microsoft Office) end

Key Bindings (option+keys)

option+v page up
option+bf option+arrow keys
option+d option+forward delete
Numeric Keypad Mode [Tab as trigger key]
Numeric Keypad Mode Trigger + right_option to keypad_period
Numeric Keypad Mode Trigger + right_control to keypad_period

Numeric Keypad Mode

Trigger Key + 7 / 8 / 9 / 0 Backspace / = / Slash(/) / *
Trigger Key + U / I / O / P 7 / 8 / 9 / -
Trigger Key + J / K / L / ; 4 / 5 / 6 / +
Trigger Key + M / , / . / Slash(/) 1 / 2 / 3 / Enter
Trigger Key + Space 0

Optional Numeric Period (.) mappings

Trigger Key + right_option .
Trigger Key + right_control .
  • Hold down the trigger key (Tab) then press one of the keys to use a numeric key
  • Press and releasing tab acts as a normal tab key
  • Optionally map right_option or right_control (in case you remapped your right_option) to numeric_period
HHKB Arrow Mode (fn + semicolon/slash/open_bracket/quote to arrow keys, etc)
HHKB Media Key Mode (fn + asdf to Volume down/up/mute, eject)
Map fn + i, o, p to F13, F14, F15.
Map fn + number keys to their corresponding function keys. Only works if 'Use all F1, F2, etc. keys as standard function keys' is set under Function Keys.
Change fn + p/l/;/' to arrow keys
Pok3r Volume Controls (fn + sdf to Volume down/up/mute)
Pok3r Media Keys (fn + qwe to Previous Title/Play-Pause/Next)
Pok3r Escape key (grave_accent_and_tilde as Escape and fn + grave_accent_and_tilde as grave_accent_and_tilde)
Home key to the beginning of the line (Control + a)
End key to the end of the line (Control + e)
Home key to the beginning of the sentence (Command + Left). Doesnt work in terminal
End key to the end of the sentence (Command + Right). Doesnt work in terminal
PC-Style Home/End
Option(Alt)+Tab as Switch Application (Command+Tab)
PC-Style Control+Up/Down/Left/Right
PC-Style Copy/Paste/Cut
PC-Style Undo
PC-Style Redo
PC-Style Select-All
PC-Style Save
PC-Style New
PC-Style Reload(F5, Ctrl+R)
PC-Style New Tab
PC-Style Find
PC-Style Open
PC-Style Bold/Italic/Underline(Ctrl+B/I/U)
PC-Style Close Window
PC-Style Lock Screen
PC-Style Screenshot(PrtSc for whole, Shift+PrtSc to select)
PC-Style Quit Application(Alt+F4 to Command+Q)
Control+Shift+Esc Opens Activity Monitor
PC-Style Browser open location (Ctrl+L)
PC-Style Back/Forward (Alt+Left Arrow/Alt+Right Arrow)
PC-Style Browser Zoom (Ctrl+Plus/Minus/0)
PC-Style Control+Delete/Backspace
DOS-Style Copy/Paste/Cut
Mu Mode Semicolon(;)+J/K/L/I/U/M/O/. to Arrow Left/Down/Right/Up/PageUp/PageDown/Home/End
SpaceFN: Space enables SpaceFN mode (see: https://geekhack.org/index.php?topic=51069.0)
SpaceFN: Space+b to Space (hold to repeat)
SpaceFN: Space+[ijkl] to Up, Left, Down, Right
SpaceFN: Space+[hjkl] to Left, Down, Up, Right
SpaceFN: Space+u to Home, Space+o to End
SpaceFN: Space+h to Page Up, Space+n to Page Down
SpaceFN: Space+p to Print Screen, Space+Open Bracket ([) to Scroll Lock, Space+Close Bracket (]) to Pause, Space+Backspace to Forward Delete, Space+Backslash (\) to Insert
SpaceFN: Backquote (`) to Escape, Space+[1-9] to F[1-9], Space+0 to F10, Space+Hyphen (-) to F11, Space+Equal Sign (=) to F12, Space+e to Escape, Space+m to Backtick (`), Space+Comma to Tilde (~), Space+Slash (/) to Menu
TouchCursor Mode [Space as Trigger Key]

Moving Around

Trigger Key + J/K/I/L Arrow Keys
Trigger Key + U/O/H/N Home / End / Page Up / Page Down
Trigger Key + Y/P/M Insert / Backspace / (Forward) Delete
CapsLock to Hyper/Escape
Hyper Navigation
Hyper Deletion
Hyper Window Control
Hyper Bash Control
Hyper Application
Hyper Functional
Hyper Shifter
Hyper Misc (Check https://github.com/Vonng/Capslock for all details)

CapsLock Enhancement

Project Vonng/Capslock provides more detailed info.

Basic

Hyper actually maps to ⌃⌥⇧⌘ (all right modifiers) , It works well with additional left modifiers. And compatible with most application. Hold CapsLock to enable Hyper funcationality while press it will emit an Escape.

Origin MapsTo Comment
Press Escape Single press to escape
Hold Hyper Enable Hyper Functionality
  • Hold Hyper to enable navigators
  • Hold additional Command for selection . (just like holding ⇧shift in normal)
Origin MapsTo Comment
H LeftArrow cursor left
J DownArrow cursor down
K UpArrow cursor up
L RightArrow cursor right
U PageUp cursor page up
I Home cursor to line(doc) head
O End cursor to line(doc) end
P PageDn cursor page down

Deletion

Origin MapsTo Comment
N ⌥⌫ Option + ForwardDelete Delete a word ahead
M ForwardDelete Delete a char ahead
, Delete Delete a char after
. ⌥⌦ Option + Delete Delete a word after
⌘M,⌘N ⌘⌥⌫ Command+Option+ForwardDelete Delete to line head

Window Control

Origin MapsTo Comment
Tab ⌘⇥ Command+Tab Switch Window
⌘⇥ Command+Tab ⌘⇧⇥ Command+Shift+Tab Switch Window Reversely
Q ⌘Q Close Window
W ⌘W Close Tab
E Open Safari Open Web Browser
⌘E Open Finder Open File Browser
A ⌃⌥⇧⌘A Leaves to Moom, ※a window resize app
⌘A ⌃↑ Ctrl+UpArrow OSX Expose All
S ⌃⇥ Ctrl+Tab Switch Tab
⌘S ⌃⇧⇥ Ctrl+Shift+Tab Swtich Tab Reversely
⌘D F11 Show Desktop

Bash Control

  • Common bash utils: EOF, SIGINT, SIGTSTP, VIM/Tmux Prefix
Origin MapsTo Comment
Z ⌃Z Ctrl+Z SIGTSTP
X ⌃R IDE Run
C ⌃C SIGINT
V ⌃V Vim Prefix
B ⌃B Tmux Default Prefix
D ⌃D EOF

Applications

  • Maybe you'd like overwrite these with your own favorite apps.
Origin MapsTo Comment
R Open iTerm2 Great terminal for osx (Run)
⌘R Open Preview Switch to opened picture, pdf, etc...
T Open Visual Studio Code Text Editor: Visual Studio Code
⌘T Open Typora Text Editor: Typora , a great WYSIWYG md editor
Y Open Siri
F Open Dash Find API Document
⌘F Open Dictionary Find words
G Open Intellij IDEA Open IDE
⌘G Open Chrome Google Chrome

Functional

  • Use F1,…F12 as standard functional keys, while hold hyper to turn them back.
Origin MapsTo Comment
F1 BrightnessDown
F2 BrightnessUp
F3 ExposeAll
F4 LaunchPad
F5 KeyboardLightDown
F6 KeyboardLightUp
F7 MusicPrev
F8 MusicPlay
F9 MusicNext
F10 Mute
F11 VolumeDown
F12 VolumeUp
F13 PrintScreen MusicPrev
F14 ScrollLock MusicNext
F15 Pause Mute
Insert ⌥BrightnessUp Fine grained brightness up
Delete ⌥BrightnessDown Fine grained brightness down
Home ⌥KeyboardLightUp Fine grained keyboard light up
End ⌥KeyboardLightDown Fine grained keyboard light down
PgUp ⌥VolumeUp Fine grained volume up
PgDn ⌥VolumeDown Fine grained volume down

Shifter

  • A more convient shift for most case
Origin MapsTo Comment
1 ! Exclamation
2 @ At
3 # Sharp
4 $ Dollar
5 % Percent
6 ^ Caret
7 & Ampersand
8 * Star
9 ( Left Round Bracket
0 ) Right Round Bracket
- Minus _ Hyphen
= Equal + Plus
[ Left Bracket ( Left Round Bracket ⇧9
] Right Bracket ) Right Round Bracket ⇧0
\ Back Slash | Bar
; Semicolon : Colon
' Single Quote " DoubleQuote

Misc

Origin MapsTo Comment
Escape CapsLock Bug: Difficult to turn capslock off after emit
~ BackQuote ⌃⇧⌘4 macOS Area Screenshot to Clipboard
⌘~ Command+BackQuote ⌃⇧4 macOS Area Screenshot to Desktop File
Backspace ⌘⌫ macOS Delete File
Return = Return to Equal Sign
/ Slash ⌘/ Command+Slash Comment/Uncomment in many IDE
Spacebar ⌃␢ Ctrl+Spacebar Switch Input Source
System-wide Vimium

Press Esc to enter Vimium mode.

Manipulating tabs

K, gt Go one tab right
J, gT Go one tab left
t Create new tab
x Close current tab
X Restore closed tab
g0 Go to the first tab
g$ Go to the last tab

Navigating

h/j/k/l Arrow Keys
gg Scroll to the top of the page
G Scroll to the bottom of the page
f, <c-f> Scroll a full page down
b, <c-b> Scroll a full page up
<c-u> Scroll 20 lines up
<c-d> Scroll 20 lines down
r Reload the page
/ Search
n Cycle forward to the next find match
N Cycle backward to the previous find match
u Undo
<c-r> Redo
i Enter insert mode

Application Specific

Swap option and command in Autodesk Maya
Swap command and control
Tmux Prefix Mode [Tab as trigger key]
Tmux Prefix Mode [Fn as trigger key]
Tmux Prefix Mode [caps_lock as trigger key]
Tmux Prefix Mode [escape as trigger key]
Tmux Prefix Mode [ ctrl+B as prefix ]
Tmux Prefix Mode [ ctrl+A as prefix ]
Tmux Prefix Mode [ ctrl+Space as prefix ]

Tmux Prefix Mode

Tmux is a terminal multiplexer that lets you switch easily between several programs in one terminal, detach them, etc. It's very useful but most key bindings require a prefix key combination (default: Ctrl+B). This mode allows you to use a simple [ Modifier + Key ] to trigger a [ Ctrl+B ] [ Key ] sequence.

How to use

  • Choose a trigger key to be used
  • Chooose a prefix to replace (based on your tmux configuration, default is Ctrl+B)
  • Now trigger a tmux command simply using Trigger + Key (eg: Fn+c -> Ctrl+b, c to create a new window)

Note: Keys that are remapped include: a-z, 0-9, comma,slash,period,semicolon,quote,open_bracket,close_bracket

⌘ + ← | Move cursor to line begin
⌘ + → | Move cursor to line end
⌥ + ← | Move cursor one word behind
⌥ + → | Move cursor one word ahead
⌥ + ⌫ | Delete one word
⌥ + ⌦ | Delete one word ahead
⌘ + ⌫ | Delete to line begin
⌘ + ⌦ | Delete to line end
left control + left shift + ` (backtick) - launches a new iTerm2 window with the default profile
left control + left shift + 1 - launches a new Google Chrome window
  • This keybinding is set up to launch new windows of running applications, rather than launching applications themselves. (Launching a running application only brings it to the foreground). This is meant to mimic the launcher keybindings available in Ubuntu.
  • Xcode Visual Studio style (Run, Stop, Build, Step, Breakpoint)
    Remap ESC to Option-ESC in Safari only
    Swap command and control in virtual machine/remote desktop
    Left Control -> Command unless in virtual machine/remote desktop
    Trigger Amethyst Mode/Amethyst Second Mode with 9/0
    9+8 cycle layout forward 9+* backward
    9+q/w shrink expand main pane
    9+J/j move focuse clockwise / counter clockwise
    90+J/j swap focused window clockwise / counter clockwise
    90+8/* swap focused window clockwise / counter clockwise screen
    9+ui/UI focus screen 12 / throw focus window to screen 12
    9+zxc/ZXC focus screen 123 / throw focus window to screen 123
    9+t toggle flot for current window
    9+asdf select tall/wide/column/fullscren layout
    Amethyst Mode All in one

    Alternative Keyboard Layouts

    Change caps_lock key to slash.
    Change caps_lock key to backslash.
    Remap keys to use Dvorak keyboard layout
    Remap keys to use Dvorak-CmdQwerty keyboard layout
    Remap keys to use Programmer Dvorak-CmdQwerty keyboard layout
    Remap keys to use Colemak keyboard layout
    Neo2 mod 3 and 4 keys (Apple keyboard)
    Neo2 mod 3 and 4 keys (Windows keyboard)
    Neo2 layer 4
    Neo2 layer 6
    Toggle caps_lock by pressing left_shift + right_shift at the same time
    Tab acts as Ctrl if pressed with another key

    International (Language Specific)

    コマンドキーを単体で押したときに、英数・かなキーを送信する。(左コマンドキーは英数、右コマンドキーはかな) (rev 2)
    英数キー・かなキーを他のキーと同時に押したとき、Optionキーも送信する
    escキーを押したときに、英数キーも送信する(vim用)
    Ctrl+[を押したときに、英数キーも送信する(vim用) (rev 2)
    英数・かなキーを他のキーと組み合わせて押したときに、コマンドキーを送信する。
    コマンドキーをオプションキーに置き換える。
    バッククオートとチルダを割り当てる。
    PC-Style German Alt Gr (Backslash, @, pipe, tilde, brackets)
    Change option + e/o/u to ë/ö/ü
    AltGr+1 -> '~'
    AltGr+3-> '^'
    AltGr+Q -> '\'
    AltGr+W -> '|'
    AltGr+E -> '€'
    AltGr+F -> '['
    AltGr+G -> ']'
    AltGr+; -> '$'
    AltGr+X -> '#'
    AltGr+C -> '&'
    AltGr+V -> '@'
    AltGr+B -> '{'
    AltGr+N -> '}'
    Exchange £ shift-3 and # option-3
    Change Backslash to Alt+Backslash
    Change Alt+Backslash to Backslash
    Change Kor/Eng key to command+space
    Change Hanja key to option+return
    Change grave accent (`) to ё in Russian layout

    Key Specific

    Exchange numbers and symbols (1234567890 and !@#$%^&*())
    Exchange semicolon and colon
    Exchange paren and square bracket
    Change alt+spacebar to spacebar
    Change spacebar to left_shift if pressed with other keys (Post spacebar when pressed alone)
    Change spacebar to left_ctrl if pressed with other keys (Post spacebar when pressed alone)
    Exchange command + arrow keys with option + arrow keys
    Exchange command + arrow keys with control + arrow keys
    Exchange control + arrow keys with option + arrow keys
    Command + Esc to Command + `
    Change Command+Backward-Delete and Option+Backward-Delete
    Change Option+Backward-Delete to Command+Backward-Delete

    OS Functionality

    Launch apps by right shift+letters.
    • right shift + a: Activity Monitor
    • right shift + d: Dictionary
    • right shift + e: Text Edit
    • right shift + f: Finder
    • right shift + s: Safari
    • right shift + t: Terminal
    Use right_command+;/' to cycle through running applications (like command+tab).
    Use right_command+h/l to switch tabs in an application.
    Use right_command+j/k to switch windows of the foreground application .
    Disable left_command+(tab/shift+tab) (to retrain reflexes using the other manipulators).
    Anti-RSI App Switch (LCMD+Space to LCMD+Tab and reverse +LShift).
    Anti-RSI App Switch (LOpt+Space to LCMD+` and reverse +LShift).
    Anti-RSI App Switch (LCMD+Space to LCMD+Tab and reverse +LControl).
    Anti-RSI App Switch (LOpt+Space to LCMD+` and reverse +LControl).
    Map volume controls to fine volume controls (Option + Shift + Volume)
    Map fn + volume controls to fine volume controls (Option + Shift + Volume)
    Quit application by pressing command-q twice
    Quit Safari by pressing command-q twice

    Device Specific

    Function Copy
    Function Cut
    Function Paste

    Personal Settings

    Change left_control+1/2/v/q to home/end/page_down/page_up (rev 2)
    Change option+hyphen, option+equal to ----------,========== (rev 2)
    Configurations for apps (rev5)
    Extra emacs key bindings (rev 4)
    Change tab to command+`
    Launcher Mode v3 (rev 4)

    Launcher Mode v3

    • Change spacebar to left_shift.
    • Enter Launcher Mode by tapping the right_command key while left_shift is pressed.
      (Leave Launcher Mode when the left_shift is released.)
    • Launcher Mode v3 keys
      • tab: Mission Control
      • q: Dictionary
      • f: Finder
      • a: Activity Monitor
      • j: Alfred 3
      • k: Emacs
      • l: iTerm2
      • c: Google Chrome
      • etc.
    Use right_command + J/K to switch between tabs in applications
    Change right_option to command + option + shift
    • right_option + v → Paste and Match Style
    • Click a link while pressing right_option → Open link in a new window
    Custom Easy Modifier Mode [F as Trigger Key] - for use with personal BTT setup
    Change right_option to shift+control+f13
    Change application to shift+control+f13
    Change insert to left_option+escape (VoiceOver)
    Alfred Mode
    yq Launch Mode
    Quick Insert Mode
    Slash Mode
    FILCO MINILA Swap grave_accent_and_tilde and backslash
    FILCO MINILA Change left command to left option, and f18 if alone
    FILCO MINILA Change left_option to f19 to left command, and 19 if alone
    FILCO MINILA Change application to right option, and f17 when used alone
    FILCO MINILA Change right option to right command, and f16 when used alone
    HHKB, FILCO MINILA Change left control to esc if alone
    Change caps_lock to control when used as modifier, escape when used alone
    Change right_command to command-tab when used alone
    Change left_command to f19 if alone
    Change left_option to f18 if alone
    Change right_option to f17 if alone
    Change right_command to f16 if alone

    Alfred Mode (z)

  • Press z down then click other keys to trigger Alfred workflow
  • This mode severely relays on Alfred Workflow.
  • Download workflows here
    • y: Hyper + = trigger youdao workflow
    • j: Search github
    • tab: Switch to chosen iTerm session
    • x: Kill process
    • t: Launch Tower.app with chosen repo
    • b: Switch chosen to browser tab
    • r: Open recent download file
    • l: Trigger Alfred File Action in Finder.app
    • l: Trigger devtool in browsers
    • o: Copy selection into emacs for temp edit
    • p: Paste the saved temp buffer back
    • ;: Open localhost with entered port number
    • q: Use Keyboard Maestro record macro
    • ]: Play last macro once

    yq Launch Mode (w)

  • Press w down then click other keys to bring application to front.
  • Press w down then press [ down to enter second level of this mode.
  • This mode severely relays on Alfred Workflow.
    • j: iTerm
    • k: Emacs
    • l: Google Chrome
    • c: Safari
    • m: Mail
    • t: Tower
    • b: BearyChat
    • v: WeChat
    • [r: Reeder

    Quick Insert Mode (period)

  • Press period down then click other keys to insert or trigger workflow.
  • Press period down then press comma down to enter second level of this mode.
  • Some rules in this mode need to use with some specific emacs key bindings.
    • tab: control+tab emacs:(switch-to-second-most-recent-buffer)
    • comma+tab: control+tab emacs:(switch-to-third-most-recent-buffer)
    • a: insert ~/
    • s: insert .*
    • slash: insert ./
    • q: insert {
    • comma+q: insert }
    • e: insert (
    • r: insert )
    • g: command+control+k alfred clipboard
    • d: command+control+d Mac OS define

    Slash Mode (period)

  • Press period down then click other keys to insert or trigger workflow.
    • tab: command+tab switch to previous application

    Other modifications

  • Mainly bind option and command keys to function keys, and then use with other applications.
  • MINILA modification aiming to make it more like HHKB.
  • Modifications with keyboard name in their descriptions can't work on other keyboard.
    • Caps Lock to escape when pressed alone and to control as modifier key
    • Control to escape when pressed alone on HHKB and MINILA
    • Left command to f19 when pressed alone, trigger alfred
    • Left option to f18 when pressed alone, trigger context
    • Right option to f17 when pressed alone
    • Right command to f16 when pressed alone
    • Right command to command+tab when pressed alone

    Miscellaneous

    Block left-handed command + left-handed key
    Block left-handed shift + left-handed key
    Block left-handed option + left-handed key
    Block left-handed control + left-handed key
    Block right-handed command + right-handed key
    Block right-handed shift + right-handed key
    Block right-handed option + right-handed key
    Block right-handed control + right-handed key
    Exchange hyphen and underscore
    Exchange underscore and backslash
    Caps Lock to Escape on single press, Control on press and hold.
    Control to Caps Lock on single press, 'Hyper Key' on press and hold.
    Better Shifting: Parentheses on shift keys
    Better Shifting: Shift rolls
    Better Shifting: End parenthesis on shift + space

    Other examples