feat(core): add a Super modifier to custom shortcut chords - #1387
Open
sungyongcho wants to merge 2 commits into
Open
sungyongcho wants to merge 2 commits into
sungyongcho wants to merge 2 commits into
Conversation
|
sungyongcho
force-pushed
the
feat/custom-shortcut-super-modifier
branch
from
September 15, 2026 08:22
e3cb447 to
ba405d0
Compare
sungyongcho
force-pushed
the
feat/custom-shortcut-super-modifier
branch
from
September 15, 2026 18:01
b627887 to
a30bbc1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CustomShortcut/HoldShortcutchords have no way to press the platform logo key.Cmd(and itsMeta/Winaliases) is folded into Control on Linux and Windows, so a chord likeSuper+Endcannot be written, and every GNOME / KDE shortcut that is bound to Super is out of reach from a mouse button. This adds a distinctSupermodifier that always presses the logo key:KEY_LEFTMETAon Linux, the Windows key on Windows, Command on macOS.Cmdkeeps its current cross-platform meaning, so existing configs are unchanged.Changes
KeyCombogainsMOD_SUPER(bit 4),has_super(), theSuperparser token, andSuperinrendered_label().Meta/Winstay aliases ofCmd. Wire deserialization accepts the new bit throughALL_MODIFIERS. New testparses_super_as_its_own_modifier.Superin immediate chords maps toKEY_LEFTMETAon Linux,VK_LWINon Windows, andCGEventFlagCommandon macOS. ForHoldShortcutchords, Linux and Windows get aHeldKey::Superowner; on macOS the logo key is Command, soSuperchords own the existingHeldKey::Command— one physical key, one owner, the same wayCmdandCtrlalready shareHeldKey::Controlon Linux/Windows. Tests cover both shapes (super_and_command_share_one_physical_output,super_plus_command_owns_the_physical_key_once,super_is_distinct_from_control).CONFIGURATION.mddocuments the chord modifiers and whatCmdvsSuperpress on each platform.Testing
Local gate on Linux (Ubuntu 26.04, rustc 1.98.1):
cargo xtask ci: rustfmt, publish closure, clippy, MSRV (linux), rustdoc (non-GUI crates), tests (linux), wasm — all pass.clippy-windows(thex86_64-pc-windows-gnuproxy) passes. Not run on this host: typos, shell, tests (macos), cargo-deny. The macOS cfg block was hand-audited against master (everyHeldKeymatch stays exhaustive) but was not compiled.Hardware: runtime-tested on Linux (GNOME 50, Wayland) with an MX Master 3 over a Bolt receiver. Gesture button
Left = { CustomShortcut = "Super+Shift+Left" }/Right = "Super+Shift+Right"moves the focused window between monitors, andSuper+Endreaches GNOME's "move to last workspace". Not runtime-tested on macOS or Windows.Fixes #724