Skip to content

Hammerspoon vs Karabiner-Elements

Price, platforms and features side by side. The table says where each price was read and when.

Hammerspoon

Free, open-source macOS automation scripted in Lua

Free

Karabiner-Elements

Free, open-source keyboard customizer for macOS

Free

Where they differ

  • Hammerspoon is free. Karabiner-Elements is free.
  • Hammerspoon also covers workflow automation and window management.
  • Karabiner-Elements also covers menu bar app and keyboard and mouse remapping.
In commonFree planmacOSOpen source

At a glance

HammerspoonKarabiner-Elements
PricingFreeFree
Starts atFreeFree
Free planThe whole app is free and open source under the MIT license. The developers do not take donations and suggest giving to a charity instead.Free to use without any purchase. Funding is optional, through GitHub Sponsors or a $10 PayPal payment that the author describes as effectively a donation.
Free trialNone listedNone listed
macOS
Made byHammerspoon contributorspqrs.org (Takayama Fumihiko)
Price read fromgithub.comkarabiner-elements.pqrs.org
CheckedOct 6, 2026Oct 5, 2026

Who each one suits

Hammerspoon

  • Mac users comfortable writing Lua who want to script their own automation
  • Custom window management driven by keyboard shortcuts
  • Triggering actions from system events such as joining a Wi-Fi network

Karabiner-Elements

  • Mac users who want to remap keys or modifiers at no cost
  • People using PC, JIS or other non-Apple keyboards on a Mac
  • Vi and Emacs users who want their key bindings everywhere on macOS

Worth knowing

Hammerspoon

  • macOS only. Release 1.1.1 lists a minimum of macOS 13.0; older Macs need an earlier release.
  • Out of the box it does nothing: every behavior has to be written in Lua in ~/.hammerspoon/init.lua or added as a Spoon.
  • It depends on the macOS Accessibility permission, which the user has to grant by hand in the system's privacy settings.
  • Crash information is collected by default; the FAQ says this can be turned off in the preferences.

Karabiner-Elements

  • macOS only. The current release supports macOS 13 Ventura and later; earlier systems need older versions from the download menu.
  • Rules beyond simple key swaps are defined as JSON, either imported from the community gallery or written by hand.
  • It cannot modify the fn key on non-Apple keyboards, or the eject key on some keyboards such as the Apple Wired Keyboard.

Key features

Hammerspoon

Lua bridge to macOS
Extensions expose macOS APIs for applications, windows, screens, audio devices, batteries, clipboards, Wi-Fi, location and low-level keyboard and mouse events to Lua code.
Hotkeys
A keyboard shortcut can be bound to any Lua function, from showing a notification to running a series of window operations or an AppleScript.
Window movement and layouts
Scripts can move and resize the focused window, arrange several apps' windows into a saved layout across screens, and use window filters to act on groups of windows.
Event watchers
A configuration can react to application events, Wi-Fi network changes and USB devices, for example muting the volume when the Mac leaves the home network.
Spoons
Spoons are pre-made plugins, installed by double-clicking a .spoon file and loaded from the config. The official list includes an app launcher and a window switcher.
Menu bar items and URL triggers
Scripts can create menu bar items, draw on the screen and send iMessage or SMS messages, and other apps can trigger them through hammerspoon:// URLs.

Karabiner-Elements

Simple modifications
Change one key to another key from the settings window, with no rules to write.
Complex modifications
Rule-based changes: turn a key into a combination of modifiers, map a modifier plus key to another key, send a different event when a key is pressed alone, or act on keys pressed simultaneously.
Community rule gallery
Predefined rules such as Vi and Emacs key bindings, diamond cursor and mouse keys can be imported from the project's rule site, then edited or replaced with your own.
Per-device settings and profiles
Apply modifications only to chosen keyboards, keep multiple profiles, and switch between profiles from the menu bar icon.
Function and extra keys
Map f1 to f12 to media controls, and enable extra keys on PC keyboards that macOS does not recognize by default, such as international and language keys.
Works at secure prompts
Modifications keep working in Secure Keyboard Entry environments, such as password prompts and terminals with that option turned on.

Plans

Hammerspoon

  • Hammerspoon$0

    The complete app with every extension, as a direct download or a Homebrew cask. Open source under the MIT license.

Karabiner-Elements

  • Karabiner-Elements$0

    The complete app, open source and usable without any purchase. Supports Intel-based and Apple silicon Macs.

More comparisons