-
Notifications
You must be signed in to change notification settings - Fork 0
fix(keyd): stop asserting Alt on Framework key, remove xremap entirely #2019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,10 @@ copy-on-select = clipboard | |
|
|
||
| keybind = ctrl+shift+c=copy_to_clipboard | ||
| keybind = ctrl+shift+v=paste_from_clipboard | ||
| # Framework+C/V arrive as plain Ctrl+C/V (keyd, see config/keyd/default.conf). | ||
| # performable: copy only when a selection exists; otherwise Ctrl+C stays SIGINT. | ||
| keybind = performable:ctrl+c=copy_to_clipboard | ||
| keybind = ctrl+v=paste_from_clipboard | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In-terminal Ctrl-V is now hijacked as paste. Unlike the
The old xremap flow avoided this because the Ghostty-only keymap rewrote Framework's Options:
|
||
| keybind = alt+backspace=text:\x1b\x7f | ||
| keybind = shift+enter=text:\n | ||
| keybind = ctrl+enter=text:\x1b[13;5u | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,22 +4,13 @@ | |
| # does not grab I2C HID consumer control devices, so the Framework key | ||
| # bypasses keyd unless this id is listed explicitly. | ||
| 32ac:0006 | ||
| # xremap creates its own virtual keyboard device via uinput. By default, xremap | ||
| # uses vendor/product 0x1234/0x5678 for that output device. | ||
| # | ||
| # When keyd matches all keyboards via `*`, it can end up grabbing xremap's | ||
| # virtual device too, which may cause event feedback/loops and effectively kill | ||
| # input. Exclude the default xremap device id to prevent that. | ||
| -1234:5678 | ||
|
|
||
| [main] | ||
| # SUPER: CapsLock/RightAlt → Hyprland "$mod" binds (window mgmt, app launch) | ||
| # These skip xremap and go directly to Hyprland. | ||
| capslock = layer(meta) | ||
| rightalt = layer(meta) | ||
|
|
||
| # Hyper: Framework key → Ctrl+Alt+Shift+Super (all four modifiers) | ||
| # xremap intercepts these and remaps to Ctrl for macOS-style app shortcuts. | ||
| # Cmd: Framework key → macOS-style shortcuts (see [cmd_hyper]) | ||
| # leftmeta is the actual keycode on Framework 13 AI 300 | ||
| leftmeta = layer(cmd_hyper) | ||
| prog1 = layer(cmd_hyper) | ||
|
|
@@ -31,20 +22,75 @@ rightshift = overload(shift, oneshot(rshift)) | |
| [rshift] | ||
| rightshift = capslock | ||
|
|
||
| [cmd_hyper:C-A-S-M] | ||
| # Every Framework+key emits Ctrl+Alt+Shift+Super+key (Hyper). | ||
| # xremap then converts Hyper+key → Ctrl+key for apps. | ||
| # Keys excluded from xremap (e.g. 3/4/5) pass through as Hyper to Hyprland. | ||
|
|
||
| # Framework+Tab → Super+Tab for hyprshell window switcher | ||
| tab = M-tab | ||
|
|
||
| # Clipboard: emit plain Ctrl+C/V directly, bypassing xremap. Electron apps | ||
| # (Slack) drop xremap's synthesized Hyper→Ctrl modifier swaps, so clipboard | ||
| # keys must not go through that dance. Ghostty converts C-c/C-v to | ||
| # C-S-c/C-S-v via its xremap keymap block. | ||
| # Cmd layer: Framework key acts like macOS Cmd. Base modifier is Super only | ||
| # (M) so holding Framework never asserts Ctrl/Alt/Shift speculatively — | ||
| # Slack treats Alt+Click as "mark unread", so a held Alt plus a stray | ||
| # trackpad tap kept marking chats unread. Every key below emits its combo | ||
| # atomically instead; no xremap middleman. | ||
| # | ||
| # Unmapped keys fall through as Super+key (inert — no Hyprland binds match). | ||
| # Framework+Tab is intentionally unmapped: it becomes a genuinely held | ||
| # Super+Tab, which lets hyprshell hold-to-cycle. | ||
| [cmd_hyper:M] | ||
| # macOS-style app shortcuts: Framework+key = Ctrl+key. | ||
| # Ghostty maps ctrl+c/ctrl+v to copy/paste itself (see config/ghostty/config). | ||
| a = C-a | ||
| b = C-b | ||
| c = C-c | ||
| d = C-d | ||
| e = C-e | ||
| g = C-g | ||
| h = C-h | ||
| i = C-i | ||
| j = C-j | ||
| k = C-k | ||
| m = C-m | ||
| n = C-n | ||
| o = C-o | ||
| p = C-p | ||
| q = C-q | ||
| r = C-r | ||
| s = C-s | ||
| t = C-t | ||
| u = C-u | ||
| v = C-v | ||
| w = C-w | ||
| x = C-x | ||
| y = C-y | ||
| z = C-z | ||
| 0 = C-0 | ||
| 1 = C-1 | ||
| 2 = C-2 | ||
| 6 = C-6 | ||
| 7 = C-7 | ||
| 8 = C-8 | ||
| 9 = C-9 | ||
| semicolon = C-semicolon | ||
| dot = C-dot | ||
| comma = C-comma | ||
| slash = C-slash | ||
| grave = C-grave | ||
| backslash = C-backslash | ||
| leftbrace = C-leftbrace | ||
| rightbrace = C-rightbrace | ||
| apostrophe = C-apostrophe | ||
| backspace = C-backspace | ||
| left = C-left | ||
| right = C-right | ||
| up = C-up | ||
| down = C-down | ||
|
Comment on lines
+78
to
+81
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In macOS, Currently, you have mapped them to bind = CTRL, left, workspace, e-1
bind = CTRL, right, workspace, e+1As a result, pressing Mapping them to |
||
|
|
||
| # Hyprland Hyper binds (Ctrl+Alt+Shift+Super chords, see hyprland.conf): | ||
| # f = fullscreen, l = lock, space = launcher, 3/4/5 = screenshot/recording, | ||
| # equal/minus = display zoom | ||
| f = C-A-S-M-f | ||
| l = C-A-S-M-l | ||
| space = C-A-S-M-space | ||
| 3 = C-A-S-M-3 | ||
| 4 = C-A-S-M-4 | ||
| 5 = C-A-S-M-5 | ||
| equal = C-A-S-M-equal | ||
| minus = C-A-S-M-minus | ||
|
|
||
| [cmd_hyper+control] | ||
| # Framework+Ctrl+5 → terminal split in VS Code | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,5 +7,4 @@ | |
| ./secure-dotenv | ||
| ./tailscale | ||
| ./uv-globals | ||
| ./xremap | ||
| ] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Binding
ctrl+vglobally in Ghostty topaste_from_clipboardwill intercept allCtrl+Vkeystrokes.Because
keydmaps the Framework key to Ctrl (v = C-v), both physicalCtrl+VandFramework+Vwill emitCtrl+Vand trigger a paste. This completely disables the terminal's nativeCtrl+Vfunctionality, such as blockwise visual mode in Vim/Neovim or quoted-insert in bash/zsh.Since
ctrl+qis also bound toquit(line 52), Vim users won't easily be able to fall back toCtrl+Qfor visual block mode either. Consider keeping the default paste shortcut (ctrl+shift+v) or using a different non-conflicting key combination if you rely on terminal applications that require rawCtrl+Vinput.