About this project

keymapper is a cross-platform context-aware key remapper designed to redefine keyboard layouts and shortcuts either systemwide or per application. It allows users to manage all keyboard shortcuts in a single configuration file, change similar actions across different apps simultaneously, and share configurations across GNU/Linux, Windows, macOS, and FreeBSD. The tool supports mapping characters directly (not just physical keys), launching applications via shortcuts, and controlling state through external tools like keymapperctl. Mouse buttons and wheel events can also be mapped. Configuration uses simple syntax with input/output expressions separated by '>>', supporting modifiers, sequences, timeouts, and virtual keys for state switching. Context blocks enable conditional mappings based on window title, class, process path, device, or modifier state. Advanced features include abstract commands, multi-stage processing, output on key release, character typing, macros, and directives for fine-tuning behavior. Installation varies by OS: Linux requires systemd setup and optional Wayland integration; macOS needs Karabiner-Elements driver; Windows offers installers or portable builds. The service runs as privileged daemon (keymapperd) while the user-facing app (keymapper) handles config and context. External control via keymapperctl enables scripting, injecting keystrokes, toggling virtual keys, and querying state. Emergency exit is available via Shift+Escape+K. Configuration files are case-sensitive and support includes, aliases, and regex filters. Built-in macros allow dynamic generation of mappings. Ideal for power users seeking deep customization without platform lock-in.