⌨️
The Ultimate Guide to Keyboard Layers
  • Overview
  • Ch 1: Keyboard Layers 101
    • 1.1 Keyboard Fundamentals
    • 1.2 Why Use Layers
    • 1.3 Layer Challenges
  • Ch 2: Setup
    • 2.1 Keyboards
    • 2.2 Firmware
    • 2.3 Independent Software
  • Ch 3: Layer Activators
    • 3.1 Modifier Layers
    • 3.2 Momentary Layers
    • 3.3 Toggle Layers
    • 3.4 One Shot Layers
    • 3.5 Dual Layers
    • 3.6 Tap Dance / Superkeys
  • Ch 4: Creating Layers
    • 4.1 Planning Layers
    • 4.2 Implementing Layers
  • Ch 5: Advance Layer Patterns
    • 5.1 Key Functionality Across Layers
    • 5.2 Color Coding Keys
    • 5.3 Thumb Keys
    • 5.4 Nesting Layers
    • 5.5 Categorizing Layers
  • Ch 6: Layer Examples
    • Layers
      • Default Layer
      • Shift Layer
      • Numpad Layer
      • Symbols Layer
      • Editing & Navigating Layer
      • Media Layer
      • Mouse Layer
      • Screen Management Layer
      • Context Control / Macro Layer
      • Browser Layer
      • VS Code Layer
      • Discord Layer
      • Slack Layer
      • Gaming Layer
  • Timeline
    • Keyboard Timeline
Powered by GitBook
On this page
  • Root Layer
  • Application Layers
  • System Layers
  1. Ch 5: Advance Layer Patterns

5.5 Categorizing Layers

Previous5.4 Nesting LayersNextLayers

Last updated 2 years ago

Layers can be categorized into 3 types; Root, Application and System layers.

Root Layer

The root layers is the starting point to get to most other layers. This is typically the but can also be a that has additional game specific layers. In the root layer, you want to be able to easily access all other layers.

Application Layers

In the middle middle is an application aware program that looks at the front-most application and calls an application layer. An application aware programs includes Karabiner-Elements, Keyboard Maestro and Auto Hotkeys. There can only be 1 front-most application at any time, meaning only a single modifier layer activator is needed to trigger as many applications layers that are defined.

A hyper layer is a modifier layer that consist of all keys having a shift+ctrl+option+command + original qwerty key. This however won't work practically for all keys though for couple reasons:

  1. Keys like caps, modifiers or thumb keys need a different key

  2. Mac has a sysdiagnose hotkey on the hyper , . keys.

  3. Applications don't trigger when certain pairing are held.

For these reasons, the application layer does not look as cleanly as I would like. I created an application layer for my keyboard using F1-24 keys

Not all applications work well with karabiner-elements. VS code can not trigger application shortcuts, so this is actually a VS code layer that happens to have hyper keys.

{
    "manipulators": [
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.google\\.Chrome"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "description": "Chrome vimium scroll to bot",
            "from": {
                "key_code": "k",
                "modifiers": {
                    "mandatory": [
                        "shift",
                        "command",
                        "option",
                        "control"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "k",
                    "modifiers": [
                        "control"
                    ]
                }
            ],
            "type": "basic"
        }
    ]
},
{
    "manipulators": [
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.hnc\\.Discord"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "description": "Discord channel down",
            "from": {
                "key_code": "k",
                "modifiers": {
                    "mandatory": [
                        "shift",
                        "command",
                        "option",
                        "control"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "down_arrow",
                    "modifiers": [
                        "option"
                    ]
                }
            ],
            "type": "basic"
        }
    ]
},
{
    "manipulators": [
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.tinyspeck\\.slackmacgap"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "description": "slack jump to a conversation",
            "from": {
                "key_code": "k",
                "modifiers": {
                    "mandatory": [
                        "shift",
                        "command",
                        "option",
                        "control"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "k",
                    "modifiers": [
                        "command"
                    ]
                }
            ],
            "type": "basic"
        }
    ]
},

Notice how each "from" key is hyper+k key in the karabiner-elements snippet above. Then each condition has a different "bundle_identifiers" that look for specific programs. And finally, the "to" is mapped to a hotkey for the application.

System Layers

System layers are layers that you will want to access within any application. They require a dedicated layer and should not be made into an application layer because you would want to use a system layer while another application layer is in front.

An application layer allows one to act as multiple layers by using an application aware program to trigger application specific layers. The diagram first shows on the left column a modifier layer like a hyperkey layer created from keyboard specific software/firmware.

The right column are application layers. Application layers have application specific hotkeys or macros such as a , , and a . The Application aware program acts as a giant switch case with multiple conditions, and when triggered will activate the application layer.

Some examples of system layers are ,, , and layers

modifier layer
VS code
discord
slack
browser
shift
numpad
media
mouse
screen manipulation
default layer
gaming layer
Application Layer Breakdown