---
title: "Build a €25 AI Shortcut Keyboard for Mac (Karabiner)"
slug: "build-25-euro-ai-shortcut-keyboard-mac-karabiner"
published: "2026-07-18"
updated: "2026-08-01"
validated: "2026-08-01"
categories:
  - "AI"
tags:
  - "AI shortcut keyboard for Mac"
  - "Karabiner-Elements"
  - "mini Bluetooth keyboard"
  - "remap keys mac"
  - "device-scoped remap"
  - "mac dictation shortcut"
  - "Cursor shortcut"
  - "Claude shortcut"
  - "Codex dictation shortcut"
  - "karabiner eventviewer"
llm-intent: "reference"
audience-level: "intermediate"
framework-versions:
  - "karabiner-elements@15"
  - "macos@14-15"
status: "stable"
llm-purpose: "AI shortcut keyboard for Mac: convert a €25 mini Bluetooth keyboard with Karabiner-Elements into one-touch dictation and AI tool shortcuts—follow the…"
llm-prereqs:
  - "Access to Karabiner-Elements"
  - "Access to Karabiner-EventViewer"
  - "Access to macOS"
  - "Access to Bluetooth mini keyboard"
  - "Access to JSON"
llm-outputs:
  - "Completed outcome: AI shortcut keyboard for Mac: convert a €25 mini Bluetooth keyboard with Karabiner-Elements into one-touch dictation and AI tool shortcuts—follow the…"
---

**Summary Triples**
- (Karabiner-Elements, can_intercept, keyboard events on a per-device basis (device-scoped remaps))
- (Cheap mini Bluetooth keyboard, can_be_converted_into, a dedicated AI shortcut pad if macOS recognizes its keys as standard keystrokes)
- (Karabiner-EventViewer, is_used_to, identify vendor_id, product_id and key_code values for device matching)
- (Device-scoped rules, prevent, remaps from affecting the MacBook built-in keyboard)
- (Example mapping: Middle-left (E), maps_to, Control+M to open Cursor)
- (Example mapping: Middle-right (B), maps_to, native macOS Dictation (via system shortcut or AppleScript trigger))
- (Example mapping: Bottom-left (F), maps_to, Fn+Control+Shift+D for Codex dictation)
- (Example mapping: Bottom-right (C), maps_to, Command+D to trigger Claude)
- (No vendor software required, because, Karabiner works as long as macOS exposes keys as standard keyboard events)

### {GOAL}
AI shortcut keyboard for Mac: convert a €25 mini Bluetooth keyboard with Karabiner-Elements into one-touch dictation and AI tool shortcuts—follow the…

### {PREREQS}
- Access to Karabiner-Elements
- Access to Karabiner-EventViewer
- Access to macOS
- Access to Bluetooth mini keyboard
- Access to JSON

### {STEPS}
1. Pair the mini keyboard to macOS
2. Install Karabiner-Elements
3. Capture the device signature
4. Enable Modify Events for device
5. Design the shortcut mappings
6. Write the complex modification JSON
7. Test mappings and iterate

<!-- llm:goal="AI shortcut keyboard for Mac: convert a €25 mini Bluetooth keyboard with Karabiner-Elements into one-touch dictation and AI tool shortcuts—follow the…" -->
<!-- llm:prereq="Access to Karabiner-Elements" -->
<!-- llm:prereq="Access to Karabiner-EventViewer" -->
<!-- llm:prereq="Access to macOS" -->
<!-- llm:prereq="Access to Bluetooth mini keyboard" -->
<!-- llm:prereq="Access to JSON" -->
<!-- llm:output="Completed outcome: AI shortcut keyboard for Mac: convert a €25 mini Bluetooth keyboard with Karabiner-Elements into one-touch dictation and AI tool shortcuts—follow the…" -->

# Build a €25 AI Shortcut Keyboard for Mac (Karabiner)
> AI shortcut keyboard for Mac: convert a €25 mini Bluetooth keyboard with Karabiner-Elements into one-touch dictation and AI tool shortcuts—follow the…
Matija Žiberna · 2026-07-18

A cheap Bluetooth mini keyboard, the free Karabiner-Elements app, and about 30 minutes of configuration are enough to build a dedicated shortcut pad for dictation and AI coding tools on a Mac. The approach works even when the keyboard ships with no Mac software at all: as long as macOS recognizes its buttons as ordinary keystrokes, Karabiner can intercept those keystrokes on a per-device basis and remap them into whatever shortcuts your AI tools already use, without touching how those same letters behave on your built-in keyboard.

I picked up a six-button mini keyboard for around €25 with exactly this in mind. Out of the box it had no configuration software and simply typed letters when pressed. I used Karabiner-Elements to turn four of those buttons into direct shortcuts for Cursor, Claude, Codex, and native macOS Dictation. This guide walks through the exact setup, including the device-matching step that keeps the remapped letters from also changing on your MacBook's own keyboard.

## What you need

- A Mac
- A small Bluetooth or USB mini keyboard
- [Karabiner-Elements](https://karabiner-elements.pqrs.org/)
- The keyboard shortcuts your preferred applications already use

The mini keyboard does not need official Mac support or bundled software. macOS only needs to recognize its buttons as standard keyboard events, and Karabiner takes it from there.

## The finished layout

Here is how the four lower buttons ended up mapped:

| Button | Output | Purpose |
|---|---|---|
| Middle-left (E) | Control + M | Open Cursor |
| Middle-right (B) | Dictation media key | Native macOS Dictation |
| Bottom-left (F) | Fn + Control + Shift + D | Codex dictation |
| Bottom-right (C) | Command + D | Claude |

Karabiner replaces these letters with the assigned shortcuts only when they arrive from the mini keyboard specifically. The same letters typed on the MacBook's built-in keyboard keep working exactly as they always have.

## Step 1: Connect the mini keyboard and record its raw output

Pair the device first, through **System Settings → Bluetooth**.

Once it's connected, open a plain text editor and press every button on the keypad, noting exactly what each one types. My device produced plain letters with no special codes: the two top buttons typed D and A, the middle row typed E and B, and the bottom row typed F and C.

Cheap mini keyboards commonly present themselves to macOS as ordinary keyboards rather than as true programmable macro pads. That's completely fine for this project; Karabiner works from whatever raw keystrokes the device already sends.

## Step 2: Install Karabiner-Elements

Download and install Karabiner-Elements from the link above. During installation, macOS will prompt for a few permissions:

- Input Monitoring
- Accessibility access
- The Karabiner Driver Extension

Grant all three. Karabiner can display and edit rules without them, but it needs Input Monitoring and the driver extension to actually intercept keystrokes before they reach the rest of the system.

If Karabiner shows "Waiting for a connection to the IOKit service," check **System Settings → General → Login Items & Extensions → Driver Extensions** and confirm the Karabiner virtual HID driver is enabled there. Restarting the Karabiner background services, or in some cases restarting the Mac entirely, is sometimes necessary right after the first install.

## Step 3: Identify the mini keyboard's device signature

Open Karabiner-EventViewer, included with the Karabiner-Elements install, and press a button on the mini keyboard. EventViewer will show:

- Vendor ID
- Product ID
- The key code the button actually produces

My keyboard identified itself as product `MINI-KEYBOARD`, vendor ID `1452`, product ID `556`. Your device will almost certainly report different numbers, so pull your own values from EventViewer rather than reusing these.

This device-specific matching step matters more than it might look. Without it, a rule that remaps the F key would remap F everywhere, including on your MacBook's built-in keyboard, not just on the mini keypad.

## Step 4: Enable Modify Events for the device

In Karabiner-Elements, open the **Devices** tab, find the mini keyboard in the list, and enable **Modify events** for it.

Some inexpensive keypads register themselves with macOS as both a keyboard and a pointing device simultaneously. If Karabiner detects button presses in EventViewer but your rules never fire, check that event modification is enabled for the full composite device, not just the keyboard portion of it. My device needed identifiers matching this shape:

```json
// File: identifiers used to match the composite device
{
  "is_keyboard": true,
  "is_pointing_device": true,
  "product_id": 556,
  "vendor_id": 1452
}
```

## Step 5: Design the shortcut mappings

Karabiner can turn one physical button press into any combination of keys, including modifier combinations your applications wouldn't otherwise let you trigger from a single key.

Before writing any Karabiner rules, test each target shortcut manually on the MacBook keyboard first. Confirming that Control+M actually opens the right panel in Cursor, or that Command+D actually triggers the intended Claude action, saves time over debugging the shortcut and the Karabiner rule at once. Once a shortcut is confirmed working manually, the mapping table above becomes the spec for the rule itself.

## Step 6: Write the Karabiner Complex Modification

Karabiner rules live in the app's Complex Modifications editor, but the underlying format is JSON, which makes it easy to write directly. Here is the complete rule for the four buttons on my device:

```json
// File: karabiner_mini_keyboard_ai_shortcuts.json
{
  "description": "MINI-KEYBOARD: AI and dictation shortcuts",
  "manipulators": [
    {
      "type": "basic",
      "conditions": [
        {
          "type": "device_if",
          "identifiers": [
            {
              "vendor_id": 1452,
              "product_id": 556
            }
          ]
        }
      ],
      "from": {
        "key_code": "e"
      },
      "to": [
        {
          "key_code": "m",
          "modifiers": ["left_control"]
        }
      ]
    },
    {
      "type": "basic",
      "conditions": [
        {
          "type": "device_if",
          "identifiers": [
            {
              "vendor_id": 1452,
              "product_id": 556
            }
          ]
        }
      ],
      "from": {
        "key_code": "b"
      },
      "to": [
        {
          "consumer_key_code": "dictation"
        }
      ]
    },
    {
      "type": "basic",
      "conditions": [
        {
          "type": "device_if",
          "identifiers": [
            {
              "vendor_id": 1452,
              "product_id": 556
            }
          ]
        }
      ],
      "from": {
        "key_code": "f"
      },
      "to": [
        {
          "key_code": "d",
          "modifiers": [
            "fn",
            "left_control",
            "left_shift"
          ]
        }
      ]
    },
    {
      "type": "basic",
      "conditions": [
        {
          "type": "device_if",
          "identifiers": [
            {
              "vendor_id": 1452,
              "product_id": 556
            }
          ]
        }
      ],
      "from": {
        "key_code": "c"
      },
      "to": [
        {
          "key_code": "d",
          "modifiers": ["left_command"]
        }
      ]
    }
  ]
}
```

Each manipulator follows the same shape: a `device_if` condition scoped to the exact vendor and product ID from Step 3, a `from` key code matching the raw letter the button sends, and a `to` block defining the actual shortcut to emit. The `device_if` condition is what keeps this rule from affecting your MacBook keyboard at all. Replace the vendor ID, product ID, input key codes, and output shortcuts with the values that match your own hardware and applications, then import the rule through Karabiner-Elements' Complex Modifications tab.

## Step 7: Test each mapping individually

Work through each button one at a time rather than testing all four at once:

1. Click into the application the button is meant to control.
2. Press the mini-keyboard button once.
3. Confirm the expected action actually starts.
4. Confirm the original letter was not inserted anywhere.
5. Confirm the same letter still types normally on the MacBook keyboard.

If a button keeps typing its original letter instead of triggering the shortcut, check Karabiner's log for whether it describes the device as grabbed. Karabiner-EventViewer detecting button presses is a separate thing from Karabiner actually capturing the device; a rule only takes effect once the device is grabbed.

## FAQ

**Does the mini keyboard need to advertise itself as a programmable macro pad?**
No. Karabiner works from whatever raw keyboard events macOS already receives from the device. A keypad that simply types plain letters is enough as a starting point.

**Why remap by vendor ID and product ID instead of just the key code?**
Matching only the key code would remap that letter everywhere, including on the built-in MacBook keyboard. Scoping each rule to the mini keyboard's specific vendor and product ID keeps the remapping isolated to that one device.

**What if Karabiner shows the button press in EventViewer but the rule never fires?**
Check the Devices tab and confirm Modify Events is enabled for the mini keyboard. Composite devices that register as both a keyboard and a pointing device sometimes need this toggle set explicitly before rules apply.

**Can one button trigger more than a simple two-key shortcut?**
Yes. The `to` array in a Karabiner manipulator accepts any key code plus any combination of modifiers, so a single button press can reproduce shortcuts your applications only expose through multi-key combinations.

**What happens if I switch which AI tool a button controls later?**
Editing the rule's `to` block for that manipulator and reimporting it is all that's needed. The mapping lives entirely in the JSON rule, not on the hardware, so reassigning a button takes a few minutes.

## Wrapping up

A €25 mini keyboard combined with Karabiner-Elements produces a genuinely useful AI shortcut pad: one-touch dictation, dedicated buttons for Cursor, Claude, and Codex, and mappings that stay entirely under your own control rather than a vendor's software. The device-matching step in the Complex Modification is what makes it safe to remap ordinary letters without disturbing your regular typing, and the same JSON rule can be edited in minutes whenever your toolset changes. The buttons that control Codex, Claude, and Cursor today can just as easily control a different editor, assistant, or automation tool tomorrow.

Let me know in the comments if you have questions, and subscribe for more practical development guides.

Thanks, Matija

## LLM Response Snippet
```json
{
  "goal": "AI shortcut keyboard for Mac: convert a €25 mini Bluetooth keyboard with Karabiner-Elements into one-touch dictation and AI tool shortcuts—follow the…",
  "responses": [
    {
      "question": "What does the article \"Build a €25 AI Shortcut Keyboard for Mac (Karabiner)\" cover?",
      "answer": "AI shortcut keyboard for Mac: convert a €25 mini Bluetooth keyboard with Karabiner-Elements into one-touch dictation and AI tool shortcuts—follow the…"
    }
  ]
}
```