Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungWhy Claude Code keeps writing shell commands that fail on your Mac(20.09.2026 um 21:06 Uhr)
Sichere Programmierungllms.txt v2: What the Spec Says, and What 137,000 Domains Show(20.09.2026 um 21:17 Uhr)
Sicherheitslücken (CVE)NiceTryGPT: Less pattern matching. More actual hacking.(20.09.2026 um 21:19 Uhr)
IT Security VideoActivities BoF (kde2026)(20.09.2026 um 00:00 Uhr)
IT Security Toolsirdoc-app(20.09.2026 um 20:33 Uhr)
Sichere ProgrammierungWhy Claude Code keeps writing shell commands that fail on your Mac(20.09.2026 um 21:06 Uhr)
Sichere Programmierungllms.txt v2: What the Spec Says, and What 137,000 Domains Show(20.09.2026 um 21:17 Uhr)
Sicherheitslücken (CVE)NiceTryGPT: Less pattern matching. More actual hacking.(20.09.2026 um 21:19 Uhr)
IT Security VideoActivities BoF (kde2026)(20.09.2026 um 00:00 Uhr)
IT Security Toolsirdoc-app(20.09.2026 um 20:33 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Using Vim Navigation (h, j, k, l) as Arrow Keys on Mac with Karabiner-Elements

Reagiere als Erste:r — dein Feedback zählt!

It’s been six months since I switched to neovim from vscode, and a year since I started using Vim motions. I don’t mind using function keys or the escape key because they’re easy to reach if I flatten my hands. However, pressing the arrow keys requires lowering my right hand, which I found bothersome.

Recently, I was talking to a colleague who uses a split keyboard, and his setup was fascinating. One feature that caught my attention was the ability to remap keys dynamically while holding down a specific key.

He mentioned that I could achieve this using Karabiner Elements on a regular keyboard. While I’ve been using Karabiner Elements, my experience was limited to simple key remapping, like replacing one key with another or creating key combinations. Implementing the feature was surprisingly straightforward, and there’s even a predefined rule in Karabiner for using h, j, k, and l as arrow keys. I realized I’d been limiting myself by sticking to familiar setups.

Using the predefined rule worked for basic navigation with h, j, k, and l as arrow keys. However, it didn’t support modifier keys like Option, Command, or Shift, which I frequently use. After some customization, everything worked perfectly. I figured others might be looking for a similar solution, so I’m sharing my configuration here.

If you have a better way or your own setup, please share it in the comments or link to your blog post. Let’s exchange ideas!

There are just two steps to follow—copy and paste the configuration, and you’re good to go. Without further ado, let’s dive in.

Set a modifier key

To enable keys to behave differently while held down, you need to dedicate a specific key for this purpose. In my case, I chose to sacrifice the Caps Lock key. I regularly use the Shift key, and I rely on another key configured with Karabiner Elements to switch keyboard languages, so not using Caps Lock doesn’t affect me. Of course, you can choose any key that works best for you.

karabiner keysetup

{
    "manipulators": [
        {
            "description": "Change caps_lock to My Hyper Key.",
            "from": { "key_code": "caps_lock" },
            "to": [{ "key_code": "right_option" }],
            "type": "basic"
        }
    ]
}

In my setup, the Caps Lock key acts as the Right Option key. While I mentioned using one key, we actually need two keys to make this work. You can assign any unused key on your keyboard for this purpose. Some might consider using a "Hyper key," which combines Ctrl, Option, Cmd, and Shift. However, this can cause conflicts with combinations like Shift+Arrow or Option+Arrow because those modifiers are already in use. For this reason, I opted for the Right Option key, but you can choose any key that suits your workflow.

Vim Arrow Keys Setup

{
    "description": "Hyper + Arrow Keys",
    "manipulators": [
        {
            "from": {
                "key_code": "h",
                "modifiers": {
                    "mandatory": ["right_option"],
                    "optional": ["any"]
                }
            },
            "to": [{ "key_code": "left_arrow" }],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "j",
                "modifiers": {
                    "mandatory": ["right_option"],
                    "optional": ["any"]
                }
            },
            "to": [{ "key_code": "down_arrow" }],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "k",
                "modifiers": {
                    "mandatory": ["right_option"],
                    "optional": ["any"]
                }
            },
            "to": [{ "key_code": "up_arrow" }],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "l",
                "modifiers": {
                    "mandatory": ["right_option"],
                    "optional": ["any"]
                }
            },
            "to": [{ "key_code": "right_arrow" }],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "h",
                "modifiers": {
                    "mandatory": ["right_option", "command"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "left_arrow",
                    "modifiers": "command"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "j",
                "modifiers": {
                    "mandatory": ["right_option", "command"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "down_arrow",
                    "modifiers": "command"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "k",
                "modifiers": {
                    "mandatory": ["right_option", "command"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "up_arrow",
                    "modifiers": "command"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "l",
                "modifiers": {
                    "mandatory": ["right_option", "command"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "right_arrow",
                    "modifiers": "command"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "h",
                "modifiers": {
                    "mandatory": ["right_option", "option"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "left_arrow",
                    "modifiers": "option"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "j",
                "modifiers": {
                    "mandatory": ["right_option", "option"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "down_arrow",
                    "modifiers": "option"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "k",
                "modifiers": {
                    "mandatory": ["right_option", "option"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "up_arrow",
                    "modifiers": "option"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "l",
                "modifiers": {
                    "mandatory": ["right_option", "option"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "right_arrow",
                    "modifiers": "option"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "h",
                "modifiers": {
                    "mandatory": ["right_option", "shift"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "left_arrow",
                    "modifiers": "shift"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "j",
                "modifiers": {
                    "mandatory": ["right_option", "shift"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "down_arrow",
                    "modifiers": "shift"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "k",
                "modifiers": {
                    "mandatory": ["right_option", "shift"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "up_arrow",
                    "modifiers": "shift"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "l",
                "modifiers": {
                    "mandatory": ["right_option", "shift"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "right_arrow",
                    "modifiers": "shift"
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "b",
                "modifiers": {
                    "mandatory": ["right_option"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "left_arrow",
                    "modifiers": ["shift", "option"]
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "w",
                "modifiers": {
                    "mandatory": ["right_option"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "right_arrow",
                    "modifiers": ["shift", "option"]
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "h",
                "modifiers": {
                    "mandatory": ["right_option", "shift", "left_option"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "left_arrow",
                    "modifiers": ["shift", "left_option"]
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "j",
                "modifiers": {
                    "mandatory": ["right_option", "shift", "left_option"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "down_arrow",
                    "modifiers": ["shift", "left_option"]
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "k",
                "modifiers": {
                    "mandatory": ["right_option", "shift", "left_option"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "up_arrow",
                    "modifiers": ["shift", "left_option"]
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "l",
                "modifiers": {
                    "mandatory": ["right_option", "shift", "left_option"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "right_arrow",
                    "modifiers": ["shift", "left_option"]
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "h",
                "modifiers": {
                    "mandatory": ["right_option", "shift", "left_command"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "left_arrow",
                    "modifiers": ["shift", "left_command"]
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "j",
                "modifiers": {
                    "mandatory": ["right_option", "shift", "left_command"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "down_arrow",
                    "modifiers": ["shift", "left_command"]
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "k",
                "modifiers": {
                    "mandatory": ["right_option", "shift", "left_command"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "up_arrow",
                    "modifiers": ["shift", "left_command"]
                }
            ],
            "type": "basic"
        },
        {
            "from": {
                "key_code": "l",
                "modifiers": {
                    "mandatory": ["right_option", "shift", "left_command"],
                    "optional": ["any"]
                }
            },
            "to": [
                {
                    "key_code": "right_arrow",
                    "modifiers": ["shift", "left_command"]
                }
            ],
            "type": "basic"
        }
    ]
}

There are two additional key combinations:

Caps Lock + W: Dragging + Tab Forward
Caps Lock + B: Dragging + Tab Backward

I use these combinations frequently, but if you don’t need them, feel free to remove them from the setup.

Wrap up

I hope you found this guide helpful. I’ve become quite accustomed to using these key remappings, although there’s one minor downside: the proximity of the Shift and Caps Lock keys can make things a bit uncomfortable at times. However, the two extra combinations help mitigate this issue.

That’s it! I wrote my first draft and used ChatGPT to make it sound better. I hope I can be better at writing as time goes, today. I just gave my all words to it and replaced them all.

Anyway,

Wishing you a wonderful end of the year and the best of luck for the new year!

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Using Vim Navigation (h, j, k, l) as Arrow Keys on Mac with Karabiner-Elements

Thematisch verwandte Begriffe: Using, Navigation, Arrow, Keys · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-93956 | A flaw has been found in olivier-ls PHP-FTS up to 1.1.2. Affected by thi…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick