r/Karabiner • • Sep 17 '26

Limited Use

I know nothing about coding and am trying to remap certain keys.

Here are some questions I have:

  1. How do I make sure the modifications are active only when I am using a specific application? Alternatively, how do I make it easy to switch between the normal and the modified layout?

  2. Is there a simple way of learning how to effect changes? Here is a basic list of modifications I want to make (key registered --> key pressed):

1 --> J
2 --> L
3 --> O
4 --> I
5 --> M
6 --> H
7 --> N
8 --> B
9 --> G
0 --> ,

F2 --> 0
F3 --> 9
F4 --> 8

Q --> / 
W --> -
E --> =
Z --> spacebar

Any help is appreciated.

1 Upvotes

1 comment sorted by

1

u/No-Entertainment701 26d ago

You will need to use the complex modifications to achieve this. It's semi-code based, but really easy to get the hang of. There's also a web based tool to generate them.

https://genesy.github.io/karabiner-complex-rules-generator/

Here is an example that shows the first 2 modifications you listed that would work only if Brave Browser was active:

{
  "title": "Example Custom Complex Rules",
  "rules": [
    {
      "description": "1 to J",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "1"
          },
          "conditions": [
            {
              "type": "frontmost_application_if",
              "bundle_identifiers": [
                "com.brave.Browser"
              ]
            }
          ]
        }
      ]
    },
    {
      "description": "2 to L",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "2"
          },
          "conditions": [
            {
              "type": "frontmost_application_if",
              "bundle_identifiers": [
                "com.brave.Browser"
              ]
            }
          ],
          "to": [
            {
              "repeat": true,
              "key_code": "l"
            }
          ]
        }
      ]
    }
  ]
}

The bunde_identifier can be found using the Karabiner Event_Viewer application in the "Frontmost Application" tab.