You can query the state of the modifier keys (Control, Shift, Meta, Command (Hyper) and Caps Lock) by calling pane-modifiers-state.
Control
Shift
Meta
Command
Hyper
Caps Lock
CAPI User Guide and Reference Manual (Unix version) - 18 Feb 2025 15:34:18