;;;; x11-keysyms.scm (module x11-keysyms (keysym) (import scheme chicken) (use srfi-69) (define keysyms '( (BackSpace . #xff08) ; Back space, back char (Tab . #xff09) (Linefeed . #xff0a) ; Linefeed, LF (Clear . #xff0b) (Return . #xff0d) ; Return, enter (Pause . #xff13) ; Pause, hold (Scroll_Lock . #xff14) (Sys_Req . #xff15) (Escape . #xff1b) (Delete . #xffff) ; Delete, rubout ; International & multi-key character composition (Multi_key . #xff20) ; Multi-key character compose (Codeinput . #xff37) (SingleCandidate . #xff3c) (MultipleCandidate . #xff3d) (PreviousCandidate . #xff3e) ; Japanese keyboard support (Kanji . #xff21) ; Kanji, Kanji convert (Muhenkan . #xff22) ; Cancel Conversion (Henkan_Mode . #xff23) ; Start/Stop Conversion (Henkan . #xff23) ; Alias for Henkan_Mode (Romaji . #xff24) ; to Romaji (Hiragana . #xff25) ; to Hiragana (Katakana . #xff26) ; to Katakana (Hiragana_Katakana . #xff27) ; Hiragana/Katakana toggle (Zenkaku . #xff28) ; to Zenkaku (Hankaku . #xff29) ; to Hankaku (Zenkaku_Hankaku . #xff2a) ; Zenkaku/Hankaku toggle (Touroku . #xff2b) ; Add to Dictionary (Massyo . #xff2c) ; Delete from Dictionary (Kana_Lock . #xff2d) ; Kana Lock (Kana_Shift . #xff2e) ; Kana Shift (Eisu_Shift . #xff2f) ; Alphanumeric Shift (Eisu_toggle . #xff30) ; Alphanumeric toggle (Kanji_Bangou . #xff37) ; Codeinput (Zen_Koho . #xff3d) ; Multiple/All Candidate(s) (Mae_Koho . #xff3e) ; Previous Candidate ; . #xff31 thru. #xff3f are under XK_KOREAN ; Cursor control & motion (Home . #xff50) (Left . #xff51) ; Move left, left arrow (Up . #xff52) ; Move up, up arrow (Right . #xff53) ; Move right, right arrow (Down . #xff54) ; Move down, down arrow (Prior . #xff55) ; Prior, previous (Page_Up . #xff55) (Next . #xff56) ; Next (Page_Down . #xff56) (End . #xff57) ; EOL (Begin . #xff58) ; BOL ; Misc functions (Select . #xff60) ; Select, mark (Print . #xff61) (Execute . #xff62) ; Execute, run, do (Insert . #xff63) ; Insert, insert here (Undo . #xff65) (Redo . #xff66) ; Redo, again (Menu . #xff67) (Find . #xff68) ; Find, search (Cancel . #xff69) ; Cancel, stop, abort, exit (Help . #xff6a) ; Help (Break . #xff6b) (Mode_switch . #xff7e) ; Character set switch (script_switch . #xff7e) ; Alias for mode_switch (Num_Lock . #xff7f) ; Keypad functions, keypad numbers cleverly chosen to map to ASCII (KP_Space . #xff80) ; Space (KP_Tab . #xff89) (KP_Enter . #xff8d) ; Enter (KP_F1 . #xff91) ; PF1, KP_A, ... (KP_F2 . #xff92) (KP_F3 . #xff93) (KP_F4 . #xff94) (KP_Home . #xff95) (KP_Left . #xff96) (KP_Up . #xff97) (KP_Right . #xff98) (KP_Down . #xff99) (KP_Prior . #xff9a) (KP_Page_Up . #xff9a) (KP_Next . #xff9b) (KP_Page_Down . #xff9b) (KP_End . #xff9c) (KP_Begin . #xff9d) (KP_Insert . #xff9e) (KP_Delete . #xff9f) (KP_Equal . #xffbd) ; Equals (KP_Multiply . #xffaa) (KP_Add . #xffab) (KP_Separator . #xffac) ; Separator, often comma (KP_Subtract . #xffad) (KP_Decimal . #xffae) (KP_Divide . #xffaf) (KP_0 . #xffb0) (KP_1 . #xffb1) (KP_2 . #xffb2) (KP_3 . #xffb3) (KP_4 . #xffb4) (KP_5 . #xffb5) (KP_6 . #xffb6) (KP_7 . #xffb7) (KP_8 . #xffb8) (KP_9 . #xffb9) ;; ;;Auxiliary functions; note the duplicate definitions for left and right ;;function keys; Sun keyboards and a few other manufacturers have such ;;function key groups on the left and/or right sides of the keyboard. ;;We've not found a keyboard with more than 35 function keys total. ;; (F1 . #xffbe) (F2 . #xffbf) (F3 . #xffc0) (F4 . #xffc1) (F5 . #xffc2) (F6 . #xffc3) (F7 . #xffc4) (F8 . #xffc5) (F9 . #xffc6) (F10 . #xffc7) (F11 . #xffc8) (L1 . #xffc8) (F12 . #xffc9) (L2 . #xffc9) (F13 . #xffca) (L3 . #xffca) (F14 . #xffcb) (L4 . #xffcb) (F15 . #xffcc) (L5 . #xffcc) (F16 . #xffcd) (L6 . #xffcd) (F17 . #xffce) (L7 . #xffce) (F18 . #xffcf) (L8 . #xffcf) (F19 . #xffd0) (L9 . #xffd0) (F20 . #xffd1) (L10 . #xffd1) (F21 . #xffd2) (R1 . #xffd2) (F22 . #xffd3) (R2 . #xffd3) (F23 . #xffd4) (R3 . #xffd4) (F24 . #xffd5) (R4 . #xffd5) (F25 . #xffd6) (R5 . #xffd6) (F26 . #xffd7) (R6 . #xffd7) (F27 . #xffd8) (R7 . #xffd8) (F28 . #xffd9) (R8 . #xffd9) (F29 . #xffda) (R9 . #xffda) (F30 . #xffdb) (R10 . #xffdb) (F31 . #xffdc) (R11 . #xffdc) (F32 . #xffdd) (R12 . #xffdd) (F33 . #xffde) (R13 . #xffde) (F34 . #xffdf) (R14 . #xffdf) (F35 . #xffe0) (R15 . #xffe0) ; Modifiers (Shift_L . #xffe1) ; Left shift (Shift_R . #xffe2) ; Right shift (Control_L . #xffe3) ; Left control (Control_R . #xffe4) ; Right control (Caps_Lock . #xffe5) ; Caps lock (Shift_Lock . #xffe6) ; Shift lock (Meta_L . #xffe7) ; Left meta (Meta_R . #xffe8) ; Right meta (Alt_L . #xffe9) ; Left alt (Alt_R . #xffea) ; Right alt (Super_L . #xffeb) ; Left super (Super_R . #xffec) ; Right super (Hyper_L . #xffed) ; Left hyper (Hyper_R . #xffee) ; Right hyper ;; ;;Latin 1 ;;(ISO/IEC 8859-1 = Unicode U+0020..U+00FF) ;;Byte 3 = 0 ;; (space . #x0020) ; U+0020 SPACE (exclam . #x0021) ; U+0021 EXCLAMATION MARK (quotedbl . #x0022) ; U+0022 QUOTATION MARK (numbersign . #x0023) ; U+0023 NUMBER SIGN (dollar . #x0024) ; U+0024 DOLLAR SIGN (percent . #x0025) ; U+0025 PERCENT SIGN (ampersand . #x0026) ; U+0026 AMPERSAND (apostrophe . #x0027) ; U+0027 APOSTROPHE (quoteright . #x0027) ; deprecated (parenleft . #x0028) ; U+0028 LEFT PARENTHESIS (parenright . #x0029) ; U+0029 RIGHT PARENTHESIS (asterisk . #x002a) ; U+002A ASTERISK (plus . #x002b) ; U+002B PLUS SIGN (comma . #x002c) ; U+002C COMMA (minus . #x002d) ; U+002D HYPHEN-MINUS (period . #x002e) ; U+002E FULL STOP (slash . #x002f) ; U+002F SOLIDUS (0 . #x0030) ; U+0030 DIGIT ZERO (1 . #x0031) ; U+0031 DIGIT ONE (2 . #x0032) ; U+0032 DIGIT TWO (3 . #x0033) ; U+0033 DIGIT THREE (4 . #x0034) ; U+0034 DIGIT FOUR (5 . #x0035) ; U+0035 DIGIT FIVE (6 . #x0036) ; U+0036 DIGIT SIX (7 . #x0037) ; U+0037 DIGIT SEVEN (8 . #x0038) ; U+0038 DIGIT EIGHT (9 . #x0039) ; U+0039 DIGIT NINE (colon . #x003a) ; U+003A COLON (semicolon . #x003b) ; U+003B SEMICOLON (less . #x003c) ; U+003C LESS-THAN SIGN (equal . #x003d) ; U+003D EQUALS SIGN (greater . #x003e) ; U+003E GREATER-THAN SIGN (question . #x003f) ; U+003F QUESTION MARK (at . #x0040) ; U+0040 COMMERCIAL AT (A . #x0041) ; U+0041 LATIN CAPITAL LETTER A (B . #x0042) ; U+0042 LATIN CAPITAL LETTER B (C . #x0043) ; U+0043 LATIN CAPITAL LETTER C (D . #x0044) ; U+0044 LATIN CAPITAL LETTER D (E . #x0045) ; U+0045 LATIN CAPITAL LETTER E (F . #x0046) ; U+0046 LATIN CAPITAL LETTER F (G . #x0047) ; U+0047 LATIN CAPITAL LETTER G (H . #x0048) ; U+0048 LATIN CAPITAL LETTER H (I . #x0049) ; U+0049 LATIN CAPITAL LETTER I (J . #x004a) ; U+004A LATIN CAPITAL LETTER J (K . #x004b) ; U+004B LATIN CAPITAL LETTER K (L . #x004c) ; U+004C LATIN CAPITAL LETTER L (M . #x004d) ; U+004D LATIN CAPITAL LETTER M (N . #x004e) ; U+004E LATIN CAPITAL LETTER N (O . #x004f) ; U+004F LATIN CAPITAL LETTER O (P . #x0050) ; U+0050 LATIN CAPITAL LETTER P (Q . #x0051) ; U+0051 LATIN CAPITAL LETTER Q (R . #x0052) ; U+0052 LATIN CAPITAL LETTER R (S . #x0053) ; U+0053 LATIN CAPITAL LETTER S (T . #x0054) ; U+0054 LATIN CAPITAL LETTER T (U . #x0055) ; U+0055 LATIN CAPITAL LETTER U (V . #x0056) ; U+0056 LATIN CAPITAL LETTER V (W . #x0057) ; U+0057 LATIN CAPITAL LETTER W (X . #x0058) ; U+0058 LATIN CAPITAL LETTER X (Y . #x0059) ; U+0059 LATIN CAPITAL LETTER Y (Z . #x005a) ; U+005A LATIN CAPITAL LETTER Z (bracketleft . #x005b) ; U+005B LEFT SQUARE BRACKET (backslash . #x005c) ; U+005C REVERSE SOLIDUS (bracketright . #x005d) ; U+005D RIGHT SQUARE BRACKET (asciicircum . #x005e) ; U+005E CIRCUMFLEX ACCENT (underscore . #x005f) ; U+005F LOW LINE (grave . #x0060) ; U+0060 GRAVE ACCENT (quoteleft . #x0060) ; deprecated (a . #x0061) ; U+0061 LATIN SMALL LETTER A (b . #x0062) ; U+0062 LATIN SMALL LETTER B (c . #x0063) ; U+0063 LATIN SMALL LETTER C (d . #x0064) ; U+0064 LATIN SMALL LETTER D (e . #x0065) ; U+0065 LATIN SMALL LETTER E (f . #x0066) ; U+0066 LATIN SMALL LETTER F (g . #x0067) ; U+0067 LATIN SMALL LETTER G (h . #x0068) ; U+0068 LATIN SMALL LETTER H (i . #x0069) ; U+0069 LATIN SMALL LETTER I (j . #x006a) ; U+006A LATIN SMALL LETTER J (k . #x006b) ; U+006B LATIN SMALL LETTER K (l . #x006c) ; U+006C LATIN SMALL LETTER L (m . #x006d) ; U+006D LATIN SMALL LETTER M (n . #x006e) ; U+006E LATIN SMALL LETTER N (o . #x006f) ; U+006F LATIN SMALL LETTER O (p . #x0070) ; U+0070 LATIN SMALL LETTER P (q . #x0071) ; U+0071 LATIN SMALL LETTER Q (r . #x0072) ; U+0072 LATIN SMALL LETTER R (s . #x0073) ; U+0073 LATIN SMALL LETTER S (t . #x0074) ; U+0074 LATIN SMALL LETTER T (u . #x0075) ; U+0075 LATIN SMALL LETTER U (v . #x0076) ; U+0076 LATIN SMALL LETTER V (w . #x0077) ; U+0077 LATIN SMALL LETTER W (x . #x0078) ; U+0078 LATIN SMALL LETTER X (y . #x0079) ; U+0079 LATIN SMALL LETTER Y (z . #x007a) ; U+007A LATIN SMALL LETTER Z (braceleft . #x007b) ; U+007B LEFT CURLY BRACKET (bar . #x007c) ; U+007C VERTICAL LINE (braceright . #x007d) ; U+007D RIGHT CURLY BRACKET (asciitilde . #x007e) ; U+007E TILDE (nobreakspace . #x00a0) ; U+00A0 NO-BREAK SPACE (exclamdown . #x00a1) ; U+00A1 INVERTED EXCLAMATION MARK (cent . #x00a2) ; U+00A2 CENT SIGN (sterling . #x00a3) ; U+00A3 POUND SIGN (currency . #x00a4) ; U+00A4 CURRENCY SIGN (yen . #x00a5) ; U+00A5 YEN SIGN (brokenbar . #x00a6) ; U+00A6 BROKEN BAR (section . #x00a7) ; U+00A7 SECTION SIGN (diaeresis . #x00a8) ; U+00A8 DIAERESIS (copyright . #x00a9) ; U+00A9 COPYRIGHT SIGN (ordfeminine . #x00aa) ; U+00AA FEMININE ORDINAL INDICATOR (guillemotleft . #x00ab) ; U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK (notsign . #x00ac) ; U+00AC NOT SIGN (hyphen . #x00ad) ; U+00AD SOFT HYPHEN (registered . #x00ae) ; U+00AE REGISTERED SIGN (macron . #x00af) ; U+00AF MACRON (degree . #x00b0) ; U+00B0 DEGREE SIGN (plusminus . #x00b1) ; U+00B1 PLUS-MINUS SIGN (twosuperior . #x00b2) ; U+00B2 SUPERSCRIPT TWO (threesuperior . #x00b3) ; U+00B3 SUPERSCRIPT THREE (acute . #x00b4) ; U+00B4 ACUTE ACCENT (mu . #x00b5) ; U+00B5 MICRO SIGN (paragraph . #x00b6) ; U+00B6 PILCROW SIGN (periodcentered . #x00b7) ; U+00B7 MIDDLE DOT (cedilla . #x00b8) ; U+00B8 CEDILLA (onesuperior . #x00b9) ; U+00B9 SUPERSCRIPT ONE (masculine . #x00ba) ; U+00BA MASCULINE ORDINAL INDICATOR (guillemotright . #x00bb) ; U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK (onequarter . #x00bc) ; U+00BC VULGAR FRACTION ONE QUARTER (onehalf . #x00bd) ; U+00BD VULGAR FRACTION ONE HALF (threequarters . #x00be) ; U+00BE VULGAR FRACTION THREE QUARTERS (questiondown . #x00bf) ; U+00BF INVERTED QUESTION MARK (Agrave . #x00c0) ; U+00C0 LATIN CAPITAL LETTER A WITH GRAVE (Aacute . #x00c1) ; U+00C1 LATIN CAPITAL LETTER A WITH ACUTE (Acircumflex . #x00c2) ; U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX (Atilde . #x00c3) ; U+00C3 LATIN CAPITAL LETTER A WITH TILDE (Adiaeresis . #x00c4) ; U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS (Aring . #x00c5) ; U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE (AE . #x00c6) ; U+00C6 LATIN CAPITAL LETTER AE (Ccedilla . #x00c7) ; U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA (Egrave . #x00c8) ; U+00C8 LATIN CAPITAL LETTER E WITH GRAVE (Eacute . #x00c9) ; U+00C9 LATIN CAPITAL LETTER E WITH ACUTE (Ecircumflex . #x00ca) ; U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX (Ediaeresis . #x00cb) ; U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS (Igrave . #x00cc) ; U+00CC LATIN CAPITAL LETTER I WITH GRAVE (Iacute . #x00cd) ; U+00CD LATIN CAPITAL LETTER I WITH ACUTE (Icircumflex . #x00ce) ; U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX (Idiaeresis . #x00cf) ; U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS (ETH . #x00d0) ; U+00D0 LATIN CAPITAL LETTER ETH (Eth . #x00d0) ; deprecated (Ntilde . #x00d1) ; U+00D1 LATIN CAPITAL LETTER N WITH TILDE (Ograve . #x00d2) ; U+00D2 LATIN CAPITAL LETTER O WITH GRAVE (Oacute . #x00d3) ; U+00D3 LATIN CAPITAL LETTER O WITH ACUTE (Ocircumflex . #x00d4) ; U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX (Otilde . #x00d5) ; U+00D5 LATIN CAPITAL LETTER O WITH TILDE (Odiaeresis . #x00d6) ; U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS (multiply . #x00d7) ; U+00D7 MULTIPLICATION SIGN (Oslash . #x00d8) ; U+00D8 LATIN CAPITAL LETTER O WITH STROKE (Ooblique . #x00d8) ; U+00D8 LATIN CAPITAL LETTER O WITH STROKE (Ugrave . #x00d9) ; U+00D9 LATIN CAPITAL LETTER U WITH GRAVE (Uacute . #x00da) ; U+00DA LATIN CAPITAL LETTER U WITH ACUTE (Ucircumflex . #x00db) ; U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX (Udiaeresis . #x00dc) ; U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS (Yacute . #x00dd) ; U+00DD LATIN CAPITAL LETTER Y WITH ACUTE (THORN . #x00de) ; U+00DE LATIN CAPITAL LETTER THORN (Thorn . #x00de) ; deprecated (ssharp . #x00df) ; U+00DF LATIN SMALL LETTER SHARP S (agrave . #x00e0) ; U+00E0 LATIN SMALL LETTER A WITH GRAVE (aacute . #x00e1) ; U+00E1 LATIN SMALL LETTER A WITH ACUTE (acircumflex . #x00e2) ; U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX (atilde . #x00e3) ; U+00E3 LATIN SMALL LETTER A WITH TILDE (adiaeresis . #x00e4) ; U+00E4 LATIN SMALL LETTER A WITH DIAERESIS (aring . #x00e5) ; U+00E5 LATIN SMALL LETTER A WITH RING ABOVE (ae . #x00e6) ; U+00E6 LATIN SMALL LETTER AE (ccedilla . #x00e7) ; U+00E7 LATIN SMALL LETTER C WITH CEDILLA (egrave . #x00e8) ; U+00E8 LATIN SMALL LETTER E WITH GRAVE (eacute . #x00e9) ; U+00E9 LATIN SMALL LETTER E WITH ACUTE (ecircumflex . #x00ea) ; U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX (ediaeresis . #x00eb) ; U+00EB LATIN SMALL LETTER E WITH DIAERESIS (igrave . #x00ec) ; U+00EC LATIN SMALL LETTER I WITH GRAVE (iacute . #x00ed) ; U+00ED LATIN SMALL LETTER I WITH ACUTE (icircumflex . #x00ee) ; U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX (idiaeresis . #x00ef) ; U+00EF LATIN SMALL LETTER I WITH DIAERESIS (eth . #x00f0) ; U+00F0 LATIN SMALL LETTER ETH (ntilde . #x00f1) ; U+00F1 LATIN SMALL LETTER N WITH TILDE (ograve . #x00f2) ; U+00F2 LATIN SMALL LETTER O WITH GRAVE (oacute . #x00f3) ; U+00F3 LATIN SMALL LETTER O WITH ACUTE (ocircumflex . #x00f4) ; U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX (otilde . #x00f5) ; U+00F5 LATIN SMALL LETTER O WITH TILDE (odiaeresis . #x00f6) ; U+00F6 LATIN SMALL LETTER O WITH DIAERESIS (division . #x00f7) ; U+00F7 DIVISION SIGN (oslash . #x00f8) ; U+00F8 LATIN SMALL LETTER O WITH STROKE (ooblique . #x00f8) ; U+00F8 LATIN SMALL LETTER O WITH STROKE (ugrave . #x00f9) ; U+00F9 LATIN SMALL LETTER U WITH GRAVE (uacute . #x00fa) ; U+00FA LATIN SMALL LETTER U WITH ACUTE (ucircumflex . #x00fb) ; U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX (udiaeresis . #x00fc) ; U+00FC LATIN SMALL LETTER U WITH DIAERESIS (yacute . #x00fd) ; U+00FD LATIN SMALL LETTER Y WITH ACUTE (thorn . #x00fe) ; U+00FE LATIN SMALL LETTER THORN (ydiaeresis . #x00ff) ; U+00FF LATIN SMALL LETTER Y WITH DIAERESIS )) (define keysym-to-keycode-table (alist->hash-table keysyms test: eq?)) (define keycode-to-keysym-table (alist->hash-table (map (lambda (c) (cons (cdr c) (car c))) keysyms) test: eq?)) (define (keysym name-or-code) (hash-table-ref/default (if (fixnum? name-or-code) keycode-to-keysym-table keysym-to-keycode-table) name-or-code #f)) )