xremap
Key remapping daemon with extensive per-application rules
Overview
xremap is a key remapper for Linux (X11 and Wayland) that allows per-application keybinding overrides. ratataque uses it extensively to create vim-style navigation and consistent editing shortcuts across all applications.
Global Modmap
modmap:
- name: Global
remap:
CapsLock: Ctrl_L # CapsLock becomes Control
Alt_R: Esc # Right Alt for Ctrl+Click scenariosGlobal Keymap
keymap:
- name: all
remap:
C-m: enter # Ctrl+M as Enter everywhereApplication-Specific Remaps
1Password
- name: 1Password
application:
only: 1Password
remap:
C-dot: C-k # Quick search
C-w: C-backspace # Delete word
C-h: backspace # Backspace
M-C-m: C-enter # Alt+Ctrl+M for Ctrl+Enter
# Navigation
M-j: M-down
M-k: M-up
M-h: C-Shift-Tab # Previous tab
M-l: C-Tab # Next tab
M-C-h: C-left # Word left
M-C-l: C-right # Word right
M-x: C-w # Close
C-j: down
C-k: upNotion
- name: notion
application:
only: Notion
remap:
C-dot: C-k
C-w: C-backspace
C-h: backspace
# Tab navigation
M-h: C-Shift-Tab
M-l: C-Tab
M-C-h: C-left
M-C-l: C-right
# Vim-style line navigation
shift-6: home # ^ for beginning of line
shift-4: end # $ for end of line
C-j: down
C-k: upDiscord / Vesktop
- name: discord
application:
only: [discord, vesktop, equibop]
remap:
C-dot: C-k
C-w: C-backspace
C-h: backspace
# Navigation
M-j: M-down
M-k: M-up
M-h: left
M-l: right
M-C-h: C-left
M-C-l: C-right
# Server switching (Alt + home row)
M-a: C-1
M-s: C-2
M-d: C-3
M-f: C-4
M-g: C-5
M-z: C-6
M-v: C-7
M-x: C-8
M-c: C-9
M-b: C-0
C-j: down
C-k: upWeb Browsers (Firefox, Chromium)
- name: webbrowser
application:
only: [chromium, firefox]
remap:
C-w: C-backspace
C-h: backspace
# Tab switching (Alt + home row for tab numbers)
M-a: M-1
M-s: M-2
M-d: M-3
M-f: M-4
M-g: M-5
M-z: M-6
M-v: M-7
M-x: M-8
M-c: M-9
M-b: M-0
M-x: C-w # Close tab
C-j: down
C-k: up
# Tab navigation
M-h: C-Shift-Tab # Previous tab
M-l: C-Tab # Next tab
Alt_L: M # Left Alt behavior
- name: chromium
application:
only: chromium
remap:
C-dot: C-k # Omnibox focusWofi (Launcher)
- name: wofi
application:
only: wofi
remap:
C-w: C-backspace
C-h: backspace
M-h: left
M-l: right
M-C-h: C-left
M-C-l: C-right
C-j: down
C-k: upKey Philosophy
-
CapsLock → Control: The most important remap. Puts Control on the home row for comfortable shortcuts.
-
Right Alt → Escape: Useful for Ctrl+Click scenarios where you need quick Escape access.
-
Ctrl+M → Enter: Consistent Enter key across all apps.
-
Ctrl+H/J/K/L: Vim-style navigation in apps that support it (up/down movement).
-
Alt+H/L: Tab navigation (previous/next) across browsers and tabbed apps.
-
Alt+Home Row (A-G, Z-B): Quick tab/server switching using left hand only.
-
Ctrl+W: Delete word backward (like terminals).
Systemd Service
xremap runs as a user service, started by Hyprland:
# In autostart.conf
exec-once = systemctl --user start xremapService file at ~/.config/systemd/user/xremap.service.