Keyboard gestures
Factor handbook » UI framework » Implementing new gadgets » UI gestures

Prev:Keyboard focus
Next:Action gestures


There are two types of keyboard gestures:
key-down

key-up


Each keyboard gesture has a set of modifiers and a key symbol. The set modifiers is denoted by an array which must either be f, or an order-preserving subsequence of the following:
{ S+ C+ A+ M+ }

S+

C+

A+

M+


A key symbol is either a single-character string denoting literal input, or one of the following strings:
• CLEAR
• RET
• ENTER
• ESC
• TAB
• BACKSPACE
• HOME
• DELETE
• END
• F1
• F2
• F3
• F4
• F5
• F6
• F7
• F8
• F9
• F10
• F11
• F12
• LEFT
• RIGHT
• DOWN
• UP
• PAGE_UP
• PAGE_DOWN

The S+ modifier is only ever used with the above action keys; alphanumeric input input with the shift key is delivered without the S+ modifier set, instead the input itself is upper case. For example, the gesture corresponding to s with the Control and Shift keys pressed is presented as
T{ key-down f { C+ } "S" }

The RET and TAB keys are never delivered in their literal form ("\n" and "\t").