# pqrs-org/Karabiner-Elements

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/pqrs-org-karabiner-elements).**

21,545 stars · 894 forks · C++ · unlicense

## Links

- GitHub: https://github.com/pqrs-org/Karabiner-Elements
- Homepage: https://karabiner-elements.pqrs.org/
- awesome-repositories: https://awesome-repositories.com/repository/pqrs-org-karabiner-elements.md

## Topics

`keyboard` `macos`

## Description

Karabiner-Elements is a system-level utility designed for advanced keyboard and mouse customization. It functions as a background service that intercepts raw hardware input signals at the driver level, allowing for the transformation of key presses and pointer movements before they reach the operating system. By utilizing virtual input device emulation, the software re-injects modified events into the system stream, enabling complex remapping, macro execution, and hardware-specific control.

The project distinguishes itself through a sophisticated state-based logic engine that enables context-aware behavior. Users can define rules that trigger based on the currently active application, specific hardware devices, or persistent system variables. This includes support for arithmetic expression evaluation and timing-based logic, such as executing different commands depending on whether a key is tapped, held, or pressed in rapid succession. The configuration is managed through a structured text-based schema, which can be validated and automated via command-line tools.

Beyond basic remapping, the software provides comprehensive control over peripheral hardware, including the ability to disable built-in keyboards when external devices are connected and to transform mouse motion into scroll events. It also features robust monitoring tools for inspecting raw device signals and system logs to facilitate troubleshooting. The application maintains functionality within secure environments, such as password prompts, by managing the necessary system-level permissions and extensions required for deep input integration.

## Tags

### Operating Systems & Systems Programming

- [Input Event Interception](https://awesome-repositories.com/f/operating-systems-systems-programming/hardware-interfacing-drivers/input-event-interception.md) — Intercepts raw hardware input events at the driver level for low-latency modification.
- [Hardware Key Interceptors](https://awesome-repositories.com/f/operating-systems-systems-programming/hardware-interfacing-drivers/input-event-interception/hardware-key-interceptors.md) — Intercepts specialized hardware keys to trigger specific system applications or utilities. ([source](https://karabiner-elements.pqrs.org/docs/manual/misc/implicit-behavior/))
- [Keyboard Input Disablers](https://awesome-repositories.com/f/operating-systems-systems-programming/keyboard-input-disablers.md) — Automatically deactivates the integrated laptop keyboard whenever a specific external keyboard is detected. ([source](https://karabiner-elements.pqrs.org/docs/manual/configuration/disable-built-in-keyboard/))
- [Security Authorization](https://awesome-repositories.com/f/operating-systems-systems-programming/platform-development-integration/native-system-extensions/security-authorization.md) — Manages the necessary system-level permissions and security authorizations required for deep input integration. ([source](https://karabiner-elements.pqrs.org/docs/help/troubleshooting/placeholder-developer/))

### System Administration & Monitoring

- [Device-Specific Input Rules](https://awesome-repositories.com/f/system-administration-monitoring/virtual-device-drivers/input-device-emulators/device-specific-input-rules.md) — The application restricts input modifications to specific hardware devices, allowing different configurations for internal and external keyboards. ([source](https://karabiner-elements.pqrs.org/docs/getting-started/features/))
- [Input Device Emulators](https://awesome-repositories.com/f/system-administration-monitoring/virtual-device-drivers/input-device-emulators.md) — Creates software-based keyboard and mouse devices that inject transformed input events back into the system.
- [Application Focus Monitors](https://awesome-repositories.com/f/system-administration-monitoring/application-focus-monitors.md) — Detects the currently active application to apply context-aware keyboard modification rules automatically. ([source](https://karabiner-elements.pqrs.org/docs/manual/misc/required-macos-settings/))
- [Device Management Tools](https://awesome-repositories.com/f/system-administration-monitoring/device-management-tools.md) — Allows users to select specific hardware devices for customization and manage their activation state. ([source](https://karabiner-elements.pqrs.org/docs/manual/configuration/))
- [Event Monitoring Systems](https://awesome-repositories.com/f/system-administration-monitoring/event-monitoring-systems.md) — Displays real-time key presses and system events to verify modifications and troubleshoot input behavior. ([source](https://karabiner-elements.pqrs.org/docs/))
- [Hardware Signal Inspectors](https://awesome-repositories.com/f/system-administration-monitoring/hardware-signal-inspectors.md) — Disables active modifications temporarily to reveal the original signals sent by hardware devices before any remapping occurs. ([source](https://karabiner-elements.pqrs.org/docs/manual/operation/eventviewer/))

### User Interface & Experience

- [Keyboard Input Handlers](https://awesome-repositories.com/f/user-interface-experience/keyboard-input-handlers.md) — Enables advanced keyboard and mouse customization, including complex key remapping, macro creation, and conditional input automation.
- [Modifier Key Listeners](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/input-handling/modifier-key-listeners.md) — Transforms specific key presses or combinations into different outputs, including support for simultaneous key chords and device-specific rules. ([source](https://karabiner-elements.pqrs.org/docs/json/typical-complex-modifications-examples/))
- [Conditional Modification Rules](https://awesome-repositories.com/f/user-interface-experience/conditional-rendering/conditional-modification-rules.md) — Restricts key remapping rules to specific contexts, such as when a particular application is active. ([source](https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/))
- [Secondary Modifier Keys](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/input-handling/secondary-modifier-keys.md) — Creates virtual modifier flags by assigning variables to specific key presses to trigger custom input behaviors. ([source](https://karabiner-elements.pqrs.org/docs/json/extra/virtual-modifier/))
- [HID Event Processors](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/interaction-and-event-handling/event-handling-architectures/input-event-dispatchers/hid-event-processors.md) — Manages virtual input devices to provide granular control over hardware signals, modifier states, and device-specific input behavior.
- [Modifier Key Simulators](https://awesome-repositories.com/f/user-interface-experience/modifier-key-simulators.md) — Injects specific modifier keys into input sequences to simulate complex key combinations or trigger system-level shortcuts. ([source](https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/to/modifiers/))
- [Sticky Modifier Modalities](https://awesome-repositories.com/f/user-interface-experience/modifier-key-simulators/sticky-modifier-modalities.md) — Transforms a standard key into a sticky modifier that remains active until the next key press. ([source](https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/to/sticky-modifier/))

### Software Engineering & Architecture

- [Context-Aware State Engines](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/state-logic-and-utilities/context-aware-state-engines.md) — Maintains internal variables and modifier states to enable context-aware remapping.
- [Input Modification Pipelines](https://awesome-repositories.com/f/software-engineering-architecture/event-driven-architectures/input-modification-pipelines.md) — Processes hardware input signals through a sequential chain of rules to apply transformations.
- [JSON Configuration Schemas](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/configuration-formats-and-schemas/json-configuration-schemas.md) — Uses structured JSON files to define complex remapping rules and device-specific behaviors.

### Development Tools & Productivity

- [Keyboard Input Automation](https://awesome-repositories.com/f/development-tools-productivity/input-pointer-automation/keyboard-automation/keyboard-input-automation.md) — Provides a configuration-driven platform for triggering shell commands, application launches, and system functions through custom keyboard shortcuts.
- [Multi-Press Input Triggers](https://awesome-repositories.com/f/development-tools-productivity/action-execution-frameworks/multi-action-triggers/multi-press-input-triggers.md) — Executes different commands based on whether a key is tapped once, held down, or pressed in rapid succession. ([source](https://karabiner-elements.pqrs.org/docs/json/typical-complex-modifications-examples/))
- [Input Automation Tools](https://awesome-repositories.com/f/development-tools-productivity/input-automation-tools.md) — Enables complex key remapping and input event sequences through a command-line interface. ([source](https://karabiner-elements.pqrs.org/docs/manual/misc/))
- [Hold Duration Triggers](https://awesome-repositories.com/f/development-tools-productivity/input-binding-libraries/multi-key-bindings/hold-duration-triggers.md) — Executes specific commands or key events when a key is held down longer than a defined threshold. ([source](https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/to-if-held-down/))
- [System State Trackers](https://awesome-repositories.com/f/development-tools-productivity/change-tracking/state-tracking-utilities/system-state-trackers.md) — Exposes internal operating system settings and timestamps as variables to enable context-aware keyboard behavior. ([source](https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/conditions/variable/))
- [Mouse Control Automation](https://awesome-repositories.com/f/development-tools-productivity/input-pointer-automation/mouse-automation/mouse-control-automation.md) — Simulates mouse cursor movement and button clicks through keyboard-based definitions to enable navigation without a physical mouse. ([source](https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/to/))
- [Mouse Input Handlers](https://awesome-repositories.com/f/development-tools-productivity/mouse-input-handlers.md) — Provides utilities to invert axes, swap directions, or disable specific mouse and scroll wheel inputs based on device or application conditions. ([source](https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/other-types/mouse-basic/))

### Security & Cryptography

- [Secure Input Session Support](https://awesome-repositories.com/f/security-cryptography/secure-input-session-support.md) — Maintains keyboard functionality within password prompts and secure terminal sessions where standard input interception is typically restricted. ([source](https://karabiner-elements.pqrs.org/docs/getting-started/features/))
- [System Input Permissions](https://awesome-repositories.com/f/security-cryptography/system-input-permissions.md) — Configures required system-level settings to grant access for monitoring and modifying hardware input events. ([source](https://karabiner-elements.pqrs.org/docs/manual/misc/))
- [Input Modification Restrictions](https://awesome-repositories.com/f/security-cryptography/field-level-read-restrictions/input-modification-restrictions.md) — Limits key remapping rules to specific applications, connected devices, or input languages. ([source](https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/conditions/))

### DevOps & Infrastructure

- [Application Update Managers](https://awesome-repositories.com/f/devops-infrastructure/distribution-packaging/application-update-managers.md) — Automates the checking and installation of software updates to ensure access to new features. ([source](https://karabiner-elements.pqrs.org/docs/manual/operation/check-for-updates/))
