




 
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 one of the known Gesture Spec keywords, or its 
char-code
, and 
gspec
's modifiers contains its 
char-bits
 attribute mapped onto the values gesture-spec-control-bit etc.
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 
modifers
.
(sys:coerce-to-gesture-spec #\Control-C)
=>
#S(SYSTEM::GESTURE-SPEC :DATA 67 :MODIFIERS 2)
CL-USER 8 > (sys:coerce-to-gesture-spec #\Control-\c)
=>
#S(SYSTEM::GESTURE-SPEC :DATA 99 :MODIFIERS 2)
(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