Created
August 21, 2023 10:41
-
-
Save haji-ali/842c077f625fd2049b7f78b60cd5807d to your computer and use it in GitHub Desktop.
A Karabiner YAML config for Emacs keybindings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| global: | |
| ask_for_confirmation_before_quitting: true | |
| check_for_updates_on_startup: true | |
| show_in_menu_bar: false | |
| show_profile_name_in_menu_bar: false | |
| unsafe_ui: false | |
| profiles: | |
| - complex_modifications: | |
| parameters: | |
| basic.simultaneous_threshold_milliseconds: 50 | |
| basic.to_delayed_action_delay_milliseconds: 500 | |
| basic.to_if_alone_timeout_milliseconds: 1000 | |
| basic.to_if_held_down_threshold_milliseconds: 500 | |
| mouse_motion_to_scroll.speed: 100 | |
| conditions_dict: | |
| except-Emacs: | |
| type: frontmost_application_unless | |
| bundle_identifiers: | |
| - "^org\\.gnu\\.Emacs$" | |
| - "^org\\.gnu\\.AquamacsEmacs$" | |
| - "^org\\.gnu\\.Aquamacs$" | |
| except-IDEs: | |
| type: frontmost_application_unless | |
| bundle_identifiers: | |
| - "^org\\.gnu\\.Emacs$" | |
| - "^org\\.gnu\\.AquamacsEmacs$" | |
| - "^org\\.gnu\\.Aquamacs$" | |
| - "^org\\.pqrs\\.unknownapp.conkeror$" | |
| - "^com\\.microsoft\\.rdc$" | |
| - "^com\\.microsoft\\.rdc\\." | |
| - "^net\\.sf\\.cord$" | |
| - "^com\\.thinomenon\\.RemoteDesktopConnection$" | |
| - "^com\\.itap-mobile\\.qmote$" | |
| - "^com\\.nulana\\.remotixmac$" | |
| - "^com\\.p5sys\\.jump\\.mac\\.viewer$" | |
| - "^com\\.p5sys\\.jump\\.mac\\.viewer\\." | |
| - "^com\\.teamviewer\\.TeamViewer$" | |
| - "^com\\.vmware\\.horizon$" | |
| - "^com\\.2X\\.Client\\.Mac$" | |
| - "^com\\.OpenText\\.Exceed-TurboX-Client$" | |
| - "^com\\.realvnc\\.vncviewer$" | |
| - "^com\\.citrix\\.receiver\\.icaviewer" | |
| - "^com\\.apple\\.Terminal$" | |
| - "^com\\.googlecode\\.iterm2$" | |
| - "^co\\.zeit\\.hyperterm$" | |
| - "^co\\.zeit\\.hyper$" | |
| - "^io\\.alacritty$" | |
| - "^net\\.kovidgoyal\\.kitty$" | |
| - "^org\\.vim\\." | |
| - "^com\\.qvacua\\.VimR$" | |
| - "^com\\.vmware\\.fusion$" | |
| - "^com\\.vmware\\.horizon$" | |
| - "^com\\.vmware\\.view$" | |
| - "^com\\.parallels\\.desktop$" | |
| - "^com\\.parallels\\.vm$" | |
| - "^com\\.parallels\\.desktop\\.console$" | |
| - "^org\\.virtualbox\\.app\\.VirtualBoxVM$" | |
| - "^com\\.citrix\\.XenAppViewer$" | |
| - "^com\\.vmware\\.proxyApp\\." | |
| - "^com\\.parallels\\.winapp\\." | |
| - "^com\\.utmapp\\.UTM$" | |
| - "^org\\.x\\.X11$" | |
| - "^com\\.apple\\.x11$" | |
| - "^org\\.macosforge\\.xquartz\\.X11$" | |
| - "^org\\.macports\\.X11$" | |
| - "^com\\.sublimetext\\." | |
| - "^com\\.microsoft\\.VSCode$" | |
| not-C-q: | |
| name: C-q | |
| type: variable_unless | |
| value: 1 | |
| C-x: | |
| name: C-x | |
| type: variable_if | |
| value: 1 | |
| Firefox: | |
| type: frontmost_application_if | |
| bundle_identifiers: | |
| - "^org\\.mozilla\\.firefox$" | |
| rules: | |
| - description: Firefox key bindings | |
| sub-rules: | |
| - conditions: | |
| - Firefox | |
| - C-x | |
| manipulators: | |
| - r => S-r | |
| - b => C-S-m | |
| - description: Emacs key bindings [C-x key strokes] | |
| sub-rules: | |
| - conditions: | |
| - C-x | |
| manipulators: | |
| - C-c => S-q | |
| - C-f => S-o | |
| - C-s => S-s | |
| - k => S-w | |
| - t => S-t | |
| - from: | |
| any: key_code | |
| modifiers: | |
| optional: | |
| - any | |
| - conditions: | |
| - except-Emacs | |
| - not-C-q | |
| manipulators: | |
| - from: C-x | |
| to: | |
| - set_variable: | |
| name: C-x | |
| value: 1 | |
| to_delayed_action: | |
| to_if_canceled: | |
| - set_variable: | |
| name: C-x | |
| value: 0 | |
| to_if_invoked: | |
| - set_variable: | |
| name: C-x | |
| value: 0 | |
| - description: Emacs key bindings for all | |
| conditions: | |
| - except-Emacs | |
| - not-C-q | |
| manipulators: | |
| - C-K => C-tab | |
| - C-J => C-TAB | |
| - description: Emacs key bindings [control+keys] | |
| conditions: | |
| - except-IDEs | |
| - not-C-q | |
| manipulators: | |
| - C-i => tab | |
| - C-g => oescape | |
| - C-m => return_or_enter | |
| - C-b => left_arrow | |
| - C-f => right_arrow | |
| - C-n => down_arrow | |
| - C-p => up_arrow | |
| - C-v => page_down | |
| - M-v => page_up | |
| - C-s => S-f | |
| - C-slash => S-z | |
| - C-w => S-x | |
| - C-y => S-v | |
| - C-t => delete_or_backspace | |
| - M-w => S-c | |
| - M-b => M-left_arrow | |
| - M-f => M-right_arrow | |
| - M-t => M-delete_or_backspace | |
| - M-d => F-M-delete_or_backspace | |
| - from: C-spacebar | |
| to: | |
| - sticky_modifier: | |
| left_shift: toggle | |
| - description: Ctrl-q espcape | |
| conditions: | |
| - except-IDEs | |
| - not-C-q | |
| manipulators: | |
| - from: C-q | |
| to: | |
| - set_variable: | |
| name: C-q | |
| value: 1 | |
| to_delayed_action: | |
| to_if_canceled: | |
| - set_variable: | |
| name: C-q | |
| value: 0 | |
| to_if_invoked: | |
| - set_variable: | |
| name: C-q | |
| value: 0 | |
| devices: | |
| - disable_built_in_keyboard_if_exists: false | |
| fn_function_keys: [] | |
| identifiers: | |
| is_keyboard: true | |
| is_pointing_device: false | |
| product_id: 0 | |
| vendor_id: 0 | |
| ignore: false | |
| manipulate_caps_lock_led: true | |
| simple_modifications: | |
| - left_command => left_option | |
| - left_option => left_command | |
| treat_as_built_in_keyboard: false | |
| - disable_built_in_keyboard_if_exists: false | |
| fn_function_keys: [] | |
| identifiers: | |
| is_keyboard: false | |
| is_pointing_device: true | |
| product_id: 0 | |
| vendor_id: 0 | |
| ignore: true | |
| manipulate_caps_lock_led: false | |
| simple_modifications: [] | |
| treat_as_built_in_keyboard: false | |
| - disable_built_in_keyboard_if_exists: false | |
| fn_function_keys: [] | |
| identifiers: | |
| is_keyboard: true | |
| is_pointing_device: false | |
| product_id: 219 | |
| vendor_id: 1118 | |
| ignore: false | |
| manipulate_caps_lock_led: true | |
| simple_modifications: [] | |
| treat_as_built_in_keyboard: false | |
| - disable_built_in_keyboard_if_exists: false | |
| fn_function_keys: [] | |
| identifiers: | |
| is_keyboard: false | |
| is_pointing_device: true | |
| product_id: 19744 | |
| vendor_id: 1121 | |
| ignore: true | |
| manipulate_caps_lock_led: false | |
| simple_modifications: [] | |
| treat_as_built_in_keyboard: false | |
| fn_function_keys: | |
| - from: f1 | |
| to: | |
| - consumer_key_code: display_brightness_decrement | |
| - from: f2 | |
| to: | |
| - consumer_key_code: display_brightness_increment | |
| - from: f3 | |
| to: | |
| - apple_vendor_keyboard_key_code: mission_control | |
| - from: f4 | |
| to: | |
| - apple_vendor_keyboard_key_code: spotlight | |
| - from: f5 | |
| to: | |
| - consumer_key_code: dictation | |
| - from: f6 | |
| to: | |
| - key_code: f6 | |
| - from: f7 | |
| to: | |
| - consumer_key_code: rewind | |
| - from: f8 | |
| to: | |
| - consumer_key_code: play_or_pause | |
| - from: f9 | |
| to: | |
| - consumer_key_code: fast_forward | |
| - from: f10 | |
| to: | |
| - consumer_key_code: mute | |
| - from: f11 | |
| to: | |
| - consumer_key_code: volume_decrement | |
| - from: f12 | |
| to: | |
| - consumer_key_code: volume_increment | |
| name: Default profile | |
| parameters: | |
| delay_milliseconds_before_open_device: 1000 | |
| selected: true | |
| simple_modifications: | |
| - caps_lock => left_control | |
| virtual_hid_keyboard: | |
| country_code: 0 | |
| indicate_sticky_modifier_keys_state: true | |
| mouse_key_xy_scale: 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment