The function coerce-to-gesture-spec
returns a Gesture Spec object gspec which can be used to represent the keystroke indicated by object.
If object is a Lisp character, then gspec's data is its cl:char-code
and gspec's modifiers are 0.
If object is a keyword, then it must be one of the known Gesture Spec keywords and becomes gspec's data. gspec's modifiers is 0.
If object is a string, then coerce-to-gesture-spec
expects it to be a sequence of modifier key names separated by the - character, followed by a single character or a character name as returned by name-char
or the name of one of the known Gesture Spec keywords. Then gspec contains the corresponding Gesture Spec keyword or char-code
in its data, and the modifier keys are represented in its modifiers.
(sys:coerce-to-gesture-spec :F10)
=>
#S(SYSTEM::GESTURE-SPEC :DATA :F10 :MODIFIERS 0)
(sys:coerce-to-gesture-spec "Ctrl-C")
=>
#S(SYSTEM::GESTURE-SPEC :DATA 67 :MODIFIERS 2)
(sys:coerce-to-gesture-spec "Shift-F10")
=>
#S(SYSTEM::GESTURE-SPEC :DATA :F10 :MODIFIERS 1)
gesture-spec-control-bit
gesture-spec-data
gesture-spec-modifiers
gesture-spec-p
gesture-spec-to-character
make-gesture-spec
print-pretty-gesture-spec
LispWorks User Guide and Reference Manual - 13 Feb 2015