Next: , Previous: , Up: Read-Write Global Vars   [Contents][Index]


15.3.60 !keysym

[x11 package] If key press events are selected through xregister and waited for using xloop, then !keysym contains a long number that identifies the character or function selected by the last pressed key, including the effects of modifier keys such as Shift and Alt. For the regular alphanumerical and punctuation keys, the appropriate value from the native character set (e.g., ASCII) is returned. Such a value, when stored in a byte variable and then transformed to a string using smap, yields the string value of the pressed key. Special keys, such as function keys, arrow keys, and keypad keys (if Num Lock is inactive) yield numbers greater than 255. On my system, the following key values are valid:

65288 - Backspace
65289 - Tab
65293 - Enter
65300 - Scroll Lock
65307 - Esc
65360 - Home
65361 - Leftarrow
65362 - Uparrow
65363 - Rightarrow
65364 - Downarrow
65365 - Page Up
65366 - Page Down
65367 - End
65377 - Print Scrn/SysRq
65379 - Insert
65407 - Num Lock
65421 - Keypad Enter
65429 - Keypad Home
65430 - Keypad Leftarrow
65431 - Keypad Uparrow
65432 - Keypad Rightarrow
65433 - Keypad Downarrow
65434 - Keypad Page Up
65435 - Keypad Page Down
65436 - Keypad End
65437 - Keypad Middle
65438 - Keypad Insert
65439 - Keypad Delete
65450 - Keypad *
65451 - Keypad +
65453 - Keypad -
65455 - Keypad /
65470 through 65481 - F1 through F12
65505 - leftmost Shift
65506 - rightmost Shift
65507 - leftmost Ctrl
65508 - rightmost Ctrl
65509 - Caps Lock
65513 - leftmost Alt
65514 - rightmost Alt
65535 - Delete

See also: !keycode, !keystate, smap, xloop, xregister