level5 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. // These partial variants assign ISO_Level5_Shift to various XKB keycodes
  2. // so that the fifth shift level can be reached.
  3. // The right Ctrl key (while pressed) chooses the fifth shift level.
  4. partial modifier_keys
  5. xkb_symbols "rctrl_switch" {
  6. key <RCTL> {
  7. type[Group1]="ONE_LEVEL",
  8. symbols[Group1] = [ ISO_Level5_Shift ]
  9. };
  10. include "level5(modifier_mapping)"
  11. };
  12. // The Less/Greater key (while pressed) chooses the fifth shift level.
  13. partial modifier_keys
  14. xkb_symbols "lsgt_switch" {
  15. key <LSGT> {
  16. type[Group1]="ONE_LEVEL",
  17. symbols[Group1] = [ ISO_Level5_Shift ]
  18. };
  19. include "level5(modifier_mapping)"
  20. };
  21. // The right Alt key (while pressed) chooses the fifth shift level.
  22. partial modifier_keys
  23. xkb_symbols "ralt_switch" {
  24. key <RALT> {
  25. type[Group1]="ONE_LEVEL",
  26. symbols[Group1] = [ ISO_Level5_Shift ]
  27. };
  28. include "level5(modifier_mapping)"
  29. };
  30. // The CapsLock key (while pressed) chooses the fifth shift level.
  31. partial modifier_keys
  32. xkb_symbols "caps_switch" {
  33. key <CAPS> {
  34. type[Group1]="ONE_LEVEL",
  35. symbols[Group1] = [ ISO_Level5_Shift ]
  36. };
  37. include "level5(modifier_mapping)"
  38. };
  39. // Ensure a mapping to a real modifier for LevelFive.
  40. partial modifier_keys
  41. xkb_symbols "modifier_mapping" {
  42. replace key <MDSW> {
  43. type[Group1] = "ONE_LEVEL",
  44. symbols[Group1] = [ ISO_Level5_Shift ]
  45. };
  46. modifier_map Mod3 { <MDSW> };
  47. };
  48. // This adds the definitions needed to create a level5-lock behaviour, using
  49. // the real modifier NumLock as a lock indicator.
  50. // See also: types/level5 : EIGHT_LEVEL_LEVEL_FIVE_LOCK
  51. // See also: compat/level5(level5_lock)
  52. partial modifier_keys
  53. xkb_symbols "lock" {
  54. virtual_modifiers NumLock;
  55. key.type[Group1] = "ONE_LEVEL";
  56. include "level5(modifier_mapping)"
  57. replace key <HYPR> {
  58. vmods = NumLock,
  59. symbols[Group1] = [ NoSymbol ],
  60. actions[Group1] = [ SetMods(modifiers=NumLock) ]
  61. };
  62. modifier_map Mod2 { <HYPR> };
  63. };
  64. // The following modifier keys are used to switch to the third shift level
  65. // and to set a corresponding lock, implemented as NumLock.
  66. partial modifier_keys
  67. xkb_symbols "lsgt_switch_lock" {
  68. include "level5(lock)"
  69. key <LSGT> {
  70. type[Group1] = "EIGHT_LEVEL",
  71. symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
  72. ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
  73. };
  74. };
  75. partial modifier_keys
  76. xkb_symbols "lwin_switch_lock" {
  77. include "level5(lock)"
  78. key <LWIN> {
  79. type[Group1] = "EIGHT_LEVEL",
  80. symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
  81. ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
  82. };
  83. };
  84. partial modifier_keys
  85. xkb_symbols "ralt_switch_lock" {
  86. include "level5(lock)"
  87. key <RALT> {
  88. type[Group1] = "EIGHT_LEVEL",
  89. symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
  90. ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
  91. };
  92. };
  93. partial modifier_keys
  94. xkb_symbols "rwin_switch_lock" {
  95. include "level5(lock)"
  96. key <RWIN> {
  97. type[Group1] = "EIGHT_LEVEL",
  98. symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
  99. ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
  100. };
  101. };
  102. partial modifier_keys
  103. xkb_symbols "lsgt_switch_lock_cancel" {
  104. include "level5(lock)"
  105. key <LSGT> {
  106. type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK",
  107. symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
  108. ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
  109. };
  110. };
  111. partial modifier_keys
  112. xkb_symbols "lwin_switch_lock_cancel" {
  113. include "level5(lock)"
  114. key <LWIN> {
  115. type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK",
  116. symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
  117. ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
  118. };
  119. };
  120. partial modifier_keys
  121. xkb_symbols "ralt_switch_lock_cancel" {
  122. include "level5(lock)"
  123. key <RALT> {
  124. type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK",
  125. symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
  126. ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
  127. };
  128. };
  129. partial modifier_keys
  130. xkb_symbols "rwin_switch_lock_cancel" {
  131. include "level5(lock)"
  132. key <RWIN> {
  133. type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK",
  134. symbols[Group1] = [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5_Shift,
  135. ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock, ISO_Level5_Lock ]
  136. };
  137. };