All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

NextPrevUpTopContentsIndex

pane-modifiers-state

Function
Summary

Returns an integer describing which modifiers are currently active.

Package

capi

Signature

pane-modifiers-state pane => gesture-spec-bits

Arguments

pane

A CAPI pane.

Values

gesture-spec-bits

An integer or nil.

Description

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)

The possible bits are:

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.

Notes

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 .

See also

output-pane
Modifier keys state


CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015

NextPrevUpTopContentsIndex