xkbcommon-names.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /*
  2. * Copyright © 2012 Intel Corporation
  3. * SPDX-License-Identifier: MIT
  4. *
  5. * Author: Daniel Stone <daniel@fooishbar.org>
  6. */
  7. #ifndef _XKBCOMMON_NAMES_H
  8. #define _XKBCOMMON_NAMES_H
  9. /**
  10. * @file
  11. * @brief Predefined names for common modifiers and LEDs.
  12. */
  13. /**
  14. * @defgroup modifier-names Predefined names for common modifiers and LEDs
  15. *
  16. * @{
  17. */
  18. /**
  19. * @defgroup real-modifier-names Real modifiers names
  20. *
  21. * [*Real* modifiers][real modifier] names are hardcoded in libxkbcommon.
  22. *
  23. * [real modifier]: @ref real-modifier-def
  24. *
  25. * @{
  26. */
  27. #define XKB_MOD_NAME_SHIFT "Shift"
  28. #define XKB_MOD_NAME_CAPS "Lock"
  29. #define XKB_MOD_NAME_CTRL "Control"
  30. #define XKB_MOD_NAME_MOD1 "Mod1"
  31. #define XKB_MOD_NAME_MOD2 "Mod2"
  32. #define XKB_MOD_NAME_MOD3 "Mod3"
  33. #define XKB_MOD_NAME_MOD4 "Mod4"
  34. #define XKB_MOD_NAME_MOD5 "Mod5"
  35. /** @} */
  36. /**
  37. * @defgroup virtual-modifier-names Virtual modifiers names
  38. *
  39. * Common [*virtual* modifiers][virtual modifiers], encoded in [xkeyboard-config]
  40. * in the [compat] and [symbols] files. They have been stable since the beginning
  41. * of the project and are unlikely to ever change.
  42. *
  43. * [virtual modifiers]: @ref virtual-modifier-def
  44. * [xkeyboard-config]: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config
  45. * [compat]: @ref the-xkb_compat-section
  46. * [symbols]: @ref the-xkb_symbols-section
  47. *
  48. * @{
  49. */
  50. /** @since 1.8.0 */
  51. #define XKB_VMOD_NAME_ALT "Alt"
  52. /** @since 1.8.0 */
  53. #define XKB_VMOD_NAME_HYPER "Hyper"
  54. /** @since 1.8.0 */
  55. #define XKB_VMOD_NAME_LEVEL3 "LevelThree"
  56. /** @since 1.8.0 */
  57. #define XKB_VMOD_NAME_LEVEL5 "LevelFive"
  58. /** @since 1.8.0 */
  59. #define XKB_VMOD_NAME_META "Meta"
  60. /** @since 1.8.0 */
  61. #define XKB_VMOD_NAME_NUM "NumLock"
  62. /** @since 1.8.0 */
  63. #define XKB_VMOD_NAME_SCROLL "ScrollLock"
  64. /** @since 1.8.0 */
  65. #define XKB_VMOD_NAME_SUPER "Super"
  66. /** @} */
  67. /**
  68. * @defgroup legacy-virtual-modifier-names Legacy virtual modifier names
  69. *
  70. * Usual [*virtual* modifiers][virtual modifiers] mappings to
  71. * [*real* modifiers][real modifiers].
  72. *
  73. * @deprecated Use @ref virtual-modifier-names instead
  74. *
  75. * [virtual modifiers]: @ref virtual-modifier-def
  76. * [real modifiers]: @ref real-modifier-def
  77. *
  78. * @{
  79. */
  80. /**
  81. * Usual [*real* modifier][real modifier] for the
  82. * [*virtual* modifier][virtual modifier] `Alt`.
  83. *
  84. * @deprecated Use `::XKB_VMOD_NAME_ALT` instead.
  85. * @since 1.10: deprecated
  86. *
  87. * [virtual modifier]: @ref virtual-modifier-def
  88. * [real modifier]: @ref real-modifier-def
  89. */
  90. #define XKB_MOD_NAME_ALT "Mod1"
  91. /**
  92. * Usual [*real* modifier][real modifier] for the
  93. * [*virtual* modifier][virtual modifier] `Super`.
  94. *
  95. * @deprecated Use `::XKB_VMOD_NAME_SUPER` instead.
  96. * @since 1.10: deprecated
  97. *
  98. * [virtual modifier]: @ref virtual-modifier-def
  99. * [real modifier]: @ref real-modifier-def
  100. */
  101. #define XKB_MOD_NAME_LOGO "Mod4"
  102. /**
  103. * Usual [*real* modifier][real modifier] for the
  104. * [*virtual* modifier][virtual modifier] `NumLock`.
  105. *
  106. * @deprecated Use `::XKB_VMOD_NAME_NUM` instead.
  107. * @since 1.10: deprecated
  108. *
  109. * [virtual modifier]: @ref virtual-modifier-def
  110. * [real modifier]: @ref real-modifier-def
  111. */
  112. #define XKB_MOD_NAME_NUM "Mod2"
  113. /** @} */
  114. /**
  115. * @defgroup led-names LEDs names
  116. *
  117. * LEDs names are encoded in [xkeyboard-config], in the [keycodes] and [compat]
  118. * files. They have been stable since the beginning of the project and are
  119. * unlikely to ever change.
  120. *
  121. * [xkeyboard-config]: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config
  122. * [keycodes]: @ref the-xkb_keycodes-section
  123. * [compat]: @ref the-xkb_compat-section
  124. *
  125. * @{
  126. */
  127. #define XKB_LED_NAME_NUM "Num Lock"
  128. #define XKB_LED_NAME_CAPS "Caps Lock"
  129. #define XKB_LED_NAME_SCROLL "Scroll Lock"
  130. /** @since 1.8.0 */
  131. #define XKB_LED_NAME_COMPOSE "Compose"
  132. #define XKB_LED_NAME_KANA "Kana"
  133. /** @} */
  134. /** @} */
  135. #endif