/***********************************************************
Copyright 1987, 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
******************************************************************/
* The "X11 Window System Protocol" standard defines in Appendix A the
* keysym codes. These 29-bit integer values identify characters or
* functions associated with each key (e.g., via the visible
* engraving) of a keyboard layout. This file assigns mnemonic macro
* names for these keysyms.
* This file is also compiled (by src/util/makekeys.c in libX11) into
* hash tables that can be accessed with X11 library functions such as
* XStringToKeysym() and XKeysymToString().
* Where a keysym corresponds one-to-one to an ISO 10646 / Unicode
* character, this is noted in a comment that provides both the U+xxxx
* Unicode position, as well as the official Unicode name of the
* Where the correspondence is either not one-to-one or semantically
* unclear, the Unicode position and name are enclosed in
* parentheses. Such legacy keysyms should be considered deprecated
* and are not recommended for use in future keyboard mappings.
* For any future extension of the keysyms with characters already
* found in ISO 10646 / Unicode, the following algorithm shall be
* used. The new keysym code position will simply be the character's
* Unicode number plus 0x01000000. The keysym values in the range
* 0x01000100 to 0x0110ffff are reserved to represent Unicode
* characters in the range U+0100 to U+10FFFF.
* While most newer Unicode-based X11 clients do already accept
* Unicode-mapped keysyms in the range 0x01000100 to 0x0110ffff, it
* will remain necessary for clients -- in the interest of
* compatibility with existing servers -- to also understand the
* existing legacy keysym values in the range 0x0100 to 0x20ff.
* Where several mnemonic names are defined for the same keysym in this
* file, all but the first one listed should be considered deprecated.
* Mnemonic names for keysyms are defined in this file with lines
* that match one of these Perl regular expressions:
* /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\* U+([0-9A-F]{4,6}) (.*) \*\/\s*$/
* /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\*\(U+([0-9A-F]{4,6}) (.*)\)\*\/\s*$/
* /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*(\/\*\s*(.*)\s*\*\/)?\s*$/
* Before adding new keysyms, please do consider the following: In
* addition to the keysym names defined in this file, the
* XStringToKeysym() and XKeysymToString() functions will also handle
* any keysym string of the form "U0020" to "U007E" and "U00A0" to
* "U10FFFF" for all possible Unicode characters. In other words,
* every possible Unicode character has already a keysym string
* defined algorithmically, even if it is not listed here. Therefore,
* defining an additional keysym macro is only necessary where a
* non-hexadecimal mnemonic name is needed, or where the new keysym
* does not represent any existing Unicode character.
* When adding new keysyms to this file, do not forget to also update the
* - the mappings in src/KeyBind.c in the libX11 repo
* https://gitlab.freedesktop.org/xorg/lib/libx11
* - the protocol specification in specs/keysyms.xml in this repo
* https://gitlab.freedesktop.org/xorg/proto/xorgproto
#define XK_VoidSymbol 0xffffff /* Void symbol */
* TTY function keys, cleverly chosen to map to ASCII, for convenience of
* programming, but could have been arbitrary (at the cost of lookup
* tables in client code).
#define XK_BackSpace 0xff08 /* Back space, back char */
#define XK_Linefeed 0xff0a /* Linefeed, LF */
#define XK_Return 0xff0d /* Return, enter */
#define XK_Pause 0xff13 /* Pause, hold */
#define XK_Scroll_Lock 0xff14
#define XK_Sys_Req 0xff15
#define XK_Delete 0xffff /* Delete, rubout */
/* International & multi-key character composition */
#define XK_Multi_key 0xff20 /* Multi-key character compose */
#define XK_Codeinput 0xff37
#define XK_SingleCandidate 0xff3c
#define XK_MultipleCandidate 0xff3d
#define XK_PreviousCandidate 0xff3e
/* Japanese keyboard support */
#define XK_Kanji 0xff21 /* Kanji, Kanji convert */
#define XK_Muhenkan 0xff22 /* Cancel Conversion */
#define XK_Henkan_Mode 0xff23 /* Start/Stop Conversion */
#define XK_Henkan 0xff23 /* Alias for Henkan_Mode */
#define XK_Romaji 0xff24 /* to Romaji */
#define XK_Hiragana 0xff25 /* to Hiragana */
#define XK_Katakana 0xff26 /* to Katakana */
#define XK_Hiragana_Katakana 0xff27 /* Hiragana/Katakana toggle */
#define XK_Zenkaku 0xff28 /* to Zenkaku */
#define XK_Hankaku 0xff29 /* to Hankaku */
#define XK_Zenkaku_Hankaku 0xff2a /* Zenkaku/Hankaku toggle */
#define XK_Touroku 0xff2b /* Add to Dictionary */
#define XK_Massyo 0xff2c /* Delete from Dictionary */
#define XK_Kana_Lock 0xff2d /* Kana Lock */
#define XK_Kana_Shift 0xff2e /* Kana Shift */
#define XK_Eisu_Shift 0xff2f /* Alphanumeric Shift */
#define XK_Eisu_toggle 0xff30 /* Alphanumeric toggle */
#define XK_Kanji_Bangou 0xff37 /* Codeinput */
#define XK_Zen_Koho 0xff3d /* Multiple/All Candidate(s) */
#define XK_Mae_Koho 0xff3e /* Previous Candidate */
/* 0xff31 thru 0xff3f are under XK_KOREAN */
/* Cursor control & motion */
#define XK_Left 0xff51 /* Move left, left arrow */
#define XK_Up 0xff52 /* Move up, up arrow */
#define XK_Right 0xff53 /* Move right, right arrow */
#define XK_Down 0xff54 /* Move down, down arrow */
#define XK_Prior 0xff55 /* Prior, previous */
#define XK_Page_Up 0xff55
#define XK_Next 0xff56 /* Next */
#define XK_Page_Down 0xff56
#define XK_End 0xff57 /* EOL */
#define XK_Begin 0xff58 /* BOL */
#define XK_Select 0xff60 /* Select, mark */
#define XK_Execute 0xff62 /* Execute, run, do */
#define XK_Insert 0xff63 /* Insert, insert here */
#define XK_Redo 0xff66 /* Redo, again */
#define XK_Find 0xff68 /* Find, search */
#define XK_Cancel 0xff69 /* Cancel, stop, abort, exit */
#define XK_Help 0xff6a /* Help */
#define XK_Mode_switch 0xff7e /* Character set switch */
#define XK_script_switch 0xff7e /* Alias for mode_switch */
#define XK_Num_Lock 0xff7f
/* Keypad functions, keypad numbers cleverly chosen to map to ASCII */
#define XK_KP_Space 0xff80 /* Space */
#define XK_KP_Enter 0xff8d /* Enter */
#define XK_KP_F1 0xff91 /* PF1, KP_A, ... */
#define XK_KP_Home 0xff95
#define XK_KP_Left 0xff96
#define XK_KP_Right 0xff98
#define XK_KP_Down 0xff99
#define XK_KP_Prior 0xff9a
#define XK_KP_Page_Up 0xff9a
#define XK_KP_Next 0xff9b
#define XK_KP_Page_Down 0xff9b
#define XK_KP_Begin 0xff9d
#define XK_KP_Insert 0xff9e
#define XK_KP_Delete 0xff9f
#define XK_KP_Equal 0xffbd /* Equals */
#define XK_KP_Multiply 0xffaa
#define XK_KP_Separator 0xffac /* Separator, often comma */
#define XK_KP_Subtract 0xffad
#define XK_KP_Decimal 0xffae
#define XK_KP_Divide 0xffaf
* 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.
#define XK_Shift_L 0xffe1 /* Left shift */
#define XK_Shift_R 0xffe2 /* Right shift */
#define XK_Control_L 0xffe3 /* Left control */
#define XK_Control_R 0xffe4 /* Right control */
#define XK_Caps_Lock 0xffe5 /* Caps lock */
#define XK_Shift_Lock 0xffe6 /* Shift lock */
#define XK_Meta_L 0xffe7 /* Left meta */
#define XK_Meta_R 0xffe8 /* Right meta */
#define XK_Alt_L 0xffe9 /* Left alt */
#define XK_Alt_R 0xffea /* Right alt */
#define XK_Super_L 0xffeb /* Left super */
#define XK_Super_R 0xffec /* Right super */
#define XK_Hyper_L 0xffed /* Left hyper */
#define XK_Hyper_R 0xffee /* Right hyper */
#endif /* XK_MISCELLANY */
* Keyboard (XKB) Extension function and modifier keys
* (from Appendix C of "The X Keyboard Extension: Protocol Specification")
#define XK_ISO_Lock 0xfe01
#define XK_ISO_Level2_Latch 0xfe02
#define XK_ISO_Level3_Shift 0xfe03
#define XK_ISO_Level3_Latch 0xfe04
#define XK_ISO_Level3_Lock 0xfe05
#define XK_ISO_Level5_Shift 0xfe11
#define XK_ISO_Level5_Latch 0xfe12
#define XK_ISO_Level5_Lock 0xfe13
#define XK_ISO_Group_Shift 0xff7e /* Alias for mode_switch */
#define XK_ISO_Group_Latch 0xfe06
#define XK_ISO_Group_Lock 0xfe07
#define XK_ISO_Next_Group 0xfe08
#define XK_ISO_Next_Group_Lock 0xfe09
#define XK_ISO_Prev_Group 0xfe0a
#define XK_ISO_Prev_Group_Lock 0xfe0b
#define XK_ISO_First_Group 0xfe0c
#define XK_ISO_First_Group_Lock 0xfe0d
#define XK_ISO_Last_Group 0xfe0e
#define XK_ISO_Last_Group_Lock 0xfe0f
#define XK_ISO_Left_Tab 0xfe20
#define XK_ISO_Move_Line_Up 0xfe21
#define XK_ISO_Move_Line_Down 0xfe22
#define XK_ISO_Partial_Line_Up 0xfe23
#define XK_ISO_Partial_Line_Down 0xfe24
#define XK_ISO_Partial_Space_Left 0xfe25
#define XK_ISO_Partial_Space_Right 0xfe26
#define XK_ISO_Set_Margin_Left 0xfe27
#define XK_ISO_Set_Margin_Right 0xfe28
#define XK_ISO_Release_Margin_Left 0xfe29
#define XK_ISO_Release_Margin_Right 0xfe2a
#define XK_ISO_Release_Both_Margins 0xfe2b
#define XK_ISO_Fast_Cursor_Left 0xfe2c
#define XK_ISO_Fast_Cursor_Right 0xfe2d
#define XK_ISO_Fast_Cursor_Up 0xfe2e
#define XK_ISO_Fast_Cursor_Down 0xfe2f
#define XK_ISO_Continuous_Underline 0xfe30
#define XK_ISO_Discontinuous_Underline 0xfe31
#define XK_ISO_Emphasize 0xfe32
#define XK_ISO_Center_Object 0xfe33
#define XK_ISO_Enter 0xfe34
#define XK_dead_grave 0xfe50
#define XK_dead_acute 0xfe51
#define XK_dead_circumflex 0xfe52
#define XK_dead_tilde 0xfe53
#define XK_dead_perispomeni 0xfe53 /* alias for dead_tilde */
#define XK_dead_macron 0xfe54
#define XK_dead_breve 0xfe55
#define XK_dead_abovedot 0xfe56
#define XK_dead_diaeresis 0xfe57
#define XK_dead_abovering 0xfe58
#define XK_dead_doubleacute 0xfe59
#define XK_dead_caron 0xfe5a
#define XK_dead_cedilla 0xfe5b
#define XK_dead_ogonek 0xfe5c
#define XK_dead_iota 0xfe5d
#define XK_dead_voiced_sound 0xfe5e
#define XK_dead_semivoiced_sound 0xfe5f
#define XK_dead_belowdot 0xfe60
#define XK_dead_hook 0xfe61
#define XK_dead_horn 0xfe62
#define XK_dead_stroke 0xfe63
#define XK_dead_abovecomma 0xfe64
#define XK_dead_psili 0xfe64 /* alias for dead_abovecomma */
#define XK_dead_abovereversedcomma 0xfe65
#define XK_dead_dasia 0xfe65 /* alias for dead_abovereversedcomma */
#define XK_dead_doublegrave 0xfe66
#define XK_dead_belowring 0xfe67
#define XK_dead_belowmacron 0xfe68
#define XK_dead_belowcircumflex 0xfe69
#define XK_dead_belowtilde 0xfe6a
#define XK_dead_belowbreve 0xfe6b
#define XK_dead_belowdiaeresis 0xfe6c
#define XK_dead_invertedbreve 0xfe6d
#define XK_dead_belowcomma 0xfe6e
#define XK_dead_currency 0xfe6f
/* extra dead elements for German T3 layout */
#define XK_dead_lowline 0xfe90
#define XK_dead_aboveverticalline 0xfe91
#define XK_dead_belowverticalline 0xfe92
#define XK_dead_longsolidusoverlay 0xfe93
/* dead vowels for universal syllable entry */
#define XK_dead_small_schwa 0xfe8a
#define XK_dead_capital_schwa 0xfe8b
#define XK_dead_greek 0xfe8c
#define XK_First_Virtual_Screen 0xfed0
#define XK_Prev_Virtual_Screen 0xfed1
#define XK_Next_Virtual_Screen 0xfed2
#define XK_Last_Virtual_Screen 0xfed4
#define XK_Terminate_Server 0xfed5
#define XK_AccessX_Enable 0xfe70
#define XK_AccessX_Feedback_Enable 0xfe71
#define XK_RepeatKeys_Enable 0xfe72
#define XK_SlowKeys_Enable 0xfe73
#define XK_BounceKeys_Enable 0xfe74
#define XK_StickyKeys_Enable 0xfe75
#define XK_MouseKeys_Enable 0xfe76
#define XK_MouseKeys_Accel_Enable 0xfe77
#define XK_Overlay1_Enable 0xfe78
#define XK_Overlay2_Enable 0xfe79
#define XK_AudibleBell_Enable 0xfe7a
#define XK_Pointer_Left 0xfee0
#define XK_Pointer_Right 0xfee1
#define XK_Pointer_Up 0xfee2
#define XK_Pointer_Down 0xfee3
#define XK_Pointer_UpLeft 0xfee4
#define XK_Pointer_UpRight 0xfee5
#define XK_Pointer_DownLeft 0xfee6
#define XK_Pointer_DownRight 0xfee7
#define XK_Pointer_Button_Dflt 0xfee8
#define XK_Pointer_Button1 0xfee9
#define XK_Pointer_Button2 0xfeea
#define XK_Pointer_Button3 0xfeeb
#define XK_Pointer_Button4 0xfeec
#define XK_Pointer_Button5 0xfeed
#define XK_Pointer_DblClick_Dflt 0xfeee
#define XK_Pointer_DblClick1 0xfeef
#define XK_Pointer_DblClick2 0xfef0
#define XK_Pointer_DblClick3 0xfef1
#define XK_Pointer_DblClick4 0xfef2
#define XK_Pointer_DblClick5 0xfef3
#define XK_Pointer_Drag_Dflt 0xfef4
#define XK_Pointer_Drag1 0xfef5
#define XK_Pointer_Drag2 0xfef6
#define XK_Pointer_Drag3 0xfef7
#define XK_Pointer_Drag4 0xfef8
#define XK_Pointer_Drag5 0xfefd
#define XK_Pointer_EnableKeys 0xfef9
#define XK_Pointer_Accelerate 0xfefa
#define XK_Pointer_DfltBtnNext 0xfefb
#define XK_Pointer_DfltBtnPrev 0xfefc
/* Single-Stroke Multiple-Character N-Graph Keysyms For The X Input Method */