Customize

How to customize Capslock?

Although the Capslock enhancement itself is already very handy, But the best schema is always you own customized version

You can read the configuration file and add your own rules.

Approach

  1. Modify the capslock.json configuration file as needed and place it in the ~/.config/karabiner/assets/complex_modifications/ directory
  2. Open Karabiner-Elements, remove the existing Capslock completion plan rules, and click the Add Rules button to load your modified configuration file.

Reference

YAML configuration file

In fact, the format of this configuration file you can understand how the customization is done by taking a look at it.

The hard part of a reasonable key schema is not about implementation, it’s about the design.

  - description: Hyper Navigation
    manipulators:

      #==========================================================#
      # ( h ) + ( ⌘⌥⇧⌃ )  -> ( left )                            #
      #==========================================================#
      # command: selection
      - description: 'command + h = shift + left'
        type: basic
        from: { key_code: h, modifiers: { mandatory: [ left_command, right_command,right_control,right_shift,right_option ] } }
        to: [ { key_code: left_arrow , modifiers: [ left_shift ] } ]

      # option + command: word selection
      - description: 'option + command + h = option + shift + left (select word ahead)'
        type: basic
        from: { key_code: h, modifiers: { mandatory: [ left_option,left_command, right_command,right_control,right_shift,right_option ] } }
        to: [ { key_code: left_arrow , modifiers: [ left_option, left_shift ] } ]



Last modified 2021-03-13: update docs (8cf5bd7)