Class Modifiers
Which modifiers were on during an input event, as event.modifiers on key and pointer events.
- On pointer events they come from the keyboard on the pointer's seat.
- All false when that seat has no keyboard.
lua
wm.input:on("pointer_button", function(event)
if event.modifiers.super and event.modifiers.shift and event.button == Button.Middle then
event:prevent_default()
end
end)Properties
modifiers.shift: booleanshift read only
modifiers.ctrl: booleanctrl read only
modifiers.alt: booleanalt read only
modifiers.super: booleansuper read only
The Super key, also called the logo or Windows key.
modifiers.altgr: booleanaltgr read only
xkb's ISO_Level3_Shift, which is AltGr on layouts that have it.
modifiers.caps_lock: booleancaps_lock read only
Whether Caps Lock is on, not whether its key is held.
modifiers.num_lock: booleannum_lock read only
Whether Num Lock is on, not whether its key is held.