pub enum Modifier {
Show 18 variants
Alt,
AltLeft,
AltRight,
Shift,
ShiftLeft,
ShiftRight,
Sym,
Function,
Ctrl,
CtrlLeft,
CtrlRight,
Meta,
MetaLeft,
MetaRight,
CapsLock,
NumLock,
ScrollLock,
Primary,
}Expand description
A keyboard modifier key for use in configuration bindings.
These names correspond exactly to the lowercase strings accepted by
miracle-wm’s configuration parser. Modifier::Primary is a special
sentinel meaning “use whatever the user has configured as their primary
modifier key” — it is the recommended value for plugins that want to
integrate naturally with the user’s keybinding preferences.
§Relationship to input::InputEventModifiers
At runtime, Modifier::Meta corresponds to InputEventModifiers::META,
Modifier::Shift to InputEventModifiers::SHIFT, etc. Config uses a
simple enum because the set of recognised modifiers is fixed and small.
Variants§
Alt
Either Alt key. Serializes as "alt".
AltLeft
Left Alt key. Serializes as "alt_left".
AltRight
Right Alt key. Serializes as "alt_right".
Shift
Either Shift key. Serializes as "shift".
ShiftLeft
Left Shift key. Serializes as "shift_left".
ShiftRight
Right Shift key. Serializes as "shift_right".
Sym
Sym key. Serializes as "sym".
Function
Function key. Serializes as "function".
Ctrl
Either Ctrl key. Serializes as "ctrl".
CtrlLeft
Left Ctrl key. Serializes as "ctrl_left".
CtrlRight
Right Ctrl key. Serializes as "ctrl_right".
Meta
Either Meta/Super/Windows key. Serializes as "meta".
This is the most common choice for compositor bindings.
MetaLeft
Left Meta key. Serializes as "meta_left".
MetaRight
Right Meta key. Serializes as "meta_right".
CapsLock
Caps Lock. Serializes as "caps_lock".
NumLock
Num Lock. Serializes as "num_lock".
ScrollLock
Scroll Lock. Serializes as "scroll_lock".
Primary
Sentinel: “use the user’s configured primary modifier key”.
Serializes as "primary". Recommended for plugins that should
respect the user’s own modifier preference.