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 Mac OS X). 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 sys:gesture-spec-*-bit
constants for the active modifiers. For example, to check if the Control
modifier is currently pressed call:
(logtest (pane-modifiers-state pane)
sys:gesture-spec-control-bit)
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
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.
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
.
CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015