Questions

Can Karabiner-Elements map a game controller?

Download on the Mac App StoreInputConfig is completely free on the Mac App Store. You don't have to make an account, there are no subscriptions, and nothing is locked. Optimized for Apple silicon.

Partly, and less than most people need. Karabiner-Elements is the best keyboard customizer on the Mac, free and open source, and it is built around keyboards and mice. Since version 14.13, released in December 2023, it also reads some gamepads: its release notes say DirectInput devices are supported and XInput devices are not supported at all, and later versions added a deadzone for using a gamepad stick as the pointer. So whether your pad appears depends on the pad and its mode. The other common route is a pad that can pretend to be a keyboard, such as an 8BitDo Zero 2 in keyboard mode, which many Anki users set up. If you want a controller to send keys and move the mouse in every app, a mapper built for controllers, such as InputConfig, is the shorter path.

On this page
  1. Steps
  2. Map a controller to keys with a controller mapper
  3. Use both: one for keys, one for controllers
  4. Pick the right tool for a keyboard job
  5. If your 8BitDo does not show up in Karabiner-Elements
  6. The short version
  7. Questions

Steps

  1. Install InputConfig and allow Accessibility access.
  2. Pair the controller normally. It stays a controller.
  3. Add a row, press Scan, press a button, and pick the key it should send.
  4. Press Activate. It works in every app.

Map a controller to keys with a controller mapper

  • You: Install InputConfig, allow Accessibility access, and pair the controller normally. Add a row, press Scan, press a button, and pick the key it should send.
  • InputConfig: Reads the pad as a controller and sends the key you picked. Sticks can drive the mouse or four keys.
  • Check: Press Activate, then press the button in any app. The key arrives there.

For Anki specifically, the Anki guide has a ready layout.

The InputConfig main window with the Desktop Navigation preset selected, its rows listing a controller control on the left and the key or click it sends on the right.
Figure 1. InputConfig's main window: each row names a control and the key or click it sends.

Use both: one for keys, one for controllers

They do not compete. Use Karabiner-Elements for the keyboard, such as Caps Lock to Escape, and InputConfig for the controller, MIDI gear and extra mouse buttons.

InputConfig adds a job to a key and leaves the key's own job in place, so it cannot swap two keys, which is the kind of thing Karabiner is for. It listens to the keyboard without blocking or remapping the key itself, and keys from every keyboard count as the same key.

Pick the right tool for a keyboard job

Most people who search for a Karabiner-Elements alternative want something simpler, or something that installs no driver. The right answer depends on the job:

  • Swap Caps Lock, Control, Option, Command or Globe. macOS does it in System Settings, Keyboard, Keyboard Shortcuts, Modifier Keys. Nothing to install.
  • Turn one key into another until the next restart. macOS's own hidutil command in Terminal, shown below.
  • A Hyper key on Caps Lock. The small Hyperkey app, or a Karabiner-Elements rule.
  • Macros, hotkeys and per-app rules with a visual editor. BetterTouchTool or Keyboard Maestro, both paid.
  • Remapping with layers, written as a config file. Kanata, free and open source. On a Mac it relies on the same virtual keyboard driver Karabiner-Elements uses.
  • Give spare keys, mouse buttons, a controller or a MIDI pad a job. InputConfig, the free app I make. It installs no driver, and it is good at F13 to F19, held right-hand modifiers and a different job for the same key in each app.

Terminal: Swap Caps Lock for F18 until the next restart.

hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x70000006D}]}'

What happens: Caps Lock now sends F18, which InputConfig can read as an input. A restart puts Caps Lock back. The right Command and Option keys page has more commands you can paste.

If your 8BitDo does not show up in Karabiner-Elements

Climb this ladder, smallest step first:

  1. Check the mode. Karabiner-Elements' release notes say its gamepad support covers DirectInput devices only, so a pad in another mode may not appear.
  2. Use a keyboard mode. An 8BitDo with one, such as the Zero 2 or the Micro, shows up as a keyboard in that mode.
  3. Allow Input Monitoring. Karabiner-Elements needs Input Monitoring access to see a keyboard-mode remote.
  4. Use it as a controller instead. InputConfig reads 8BitDo pads in the modes on the 8BitDo connection page.

The short version

  • Keyboards. Use Karabiner-Elements, or macOS's own Modifier Keys and hidutil.
  • Controllers. Use a controller mapper such as InputConfig.
  • Both on one Mac. They do not compete.

Karabiner changes what a key is, while InputConfig gives a control a job.

Questions

Does Karabiner-Elements support Xbox or PS5 controllers?

Not as a controller mapper. Its release notes say it reads DirectInput gamepads and not XInput ones, so it depends on the pad and its mode. A controller mapper such as InputConfig reads Xbox and PS5 controllers directly.

Can I use an 8BitDo controller with Karabiner-Elements?

Reliably, only a model that can switch into a keyboard mode, such as the 8BitDo Zero 2. In its normal modes it is a game controller, which InputConfig reads directly.

How do I set up an Anki remote on a Mac with Karabiner-Elements?

Pair the remote in keyboard mode, give Karabiner-Elements Input Monitoring access, and write a rule that turns each key the remote sends into Space, 1, 2 or 4. The simpler route is to pair it in a controller mode and use a mapper instead. The Anki remote page has both.

Why does my 8BitDo not show up in Karabiner-Elements?

Karabiner-Elements is built for keyboards and mice, and its release notes say its gamepad support covers DirectInput devices only, so a pad in another mode may not appear. An 8BitDo with a keyboard mode, such as the Zero 2 or the Micro, shows up as a keyboard in that mode. To use it as a controller instead, InputConfig reads it directly.

Is there a Karabiner-Elements alternative with no driver?

For swapping modifier keys, macOS itself: System Settings, Keyboard, Keyboard Shortcuts, Modifier Keys. For one key to another until you restart, the built-in hidutil command. For giving spare keys, mouse buttons and controllers a job, InputConfig, which installs no driver and adds to a key rather than replacing it.

Download on the Mac App StoreOpen source on GitHub.

Updated