Returns an integer describing which modifiers are currently active.
capi
pane-modifiers-state pane => gesture-spec-bits
pane⇩ |
A CAPI pane. |
gesture-spec-bits |
An integer or nil . |
The function pane-modifiers-state
returns an integer describing which modifiers are currently pressed. The modifiers are Control
, Shift
, Meta
and Hyper
(representing Command
on macOS). It also describes whether Caps Lock is currently on.
pane should be a pane that is displayed on the screen. If it is not displayed, pane-modifiers-state
returns nil
.
The result is a cl:logior of the following bits:
The Caps Lock bit behaves in a special way: it is on when Caps is locked, rather than when the Caps Lock
key is pressed.
For example, to check if the Control
modifier is currently pressed call:
(logtest (pane-modifiers-state pane) sys:gesture-spec-control-bit)
On Cocoa sys:gesture-spec-hyper-bit is for Command
.
output-pane supports responding to modifier changes - see :modifier-change
in the input-model.
sys:gesture-spec-shift-bit and so on are documented in the LispWorks® User Guide and Reference Manual.
output-pane
sys:gesture-spec-shift-bit
sys:gesture-spec-control-bit
sys:gesture-spec-meta-bit
sys:gesture-spec-hyper-bit
sys:gesture-spec-caps-lock-bit
18.3 Modifier keys state
CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27