ctrl 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. partial modifier_keys
  2. xkb_symbols "rctrl_latch" {
  3. key <RCTL> {
  4. [ Control_R ], [LatchMods(modifiers=Control)],
  5. type[group1] = "ONE_LEVEL"
  6. };
  7. };
  8. // Eliminate CapsLock, making it another Ctrl.
  9. partial modifier_keys
  10. xkb_symbols "nocaps" {
  11. replace key <CAPS> { [ Control_L, Control_L ] };
  12. modifier_map Control { <CAPS>, <LCTL> };
  13. };
  14. // Make the left Ctrl key a left Meta.
  15. xkb_symbols "lctrl_meta" {
  16. replace key <LCTL> { [ Meta_L ] };
  17. modifier_map Mod4 { <LCTL> };
  18. };
  19. // Swap the functions of the CapsLock key and the left Ctrl key.
  20. partial modifier_keys
  21. xkb_symbols "swapcaps" {
  22. replace key <CAPS> { [ Control_L ] };
  23. replace key <LCTL> { [ Caps_Lock ] };
  24. modifier_map Control { <CAPS> };
  25. modifier_map Lock { <LCTL> };
  26. };
  27. // Swap the functions of the CapsLock key and the left Ctrl key,
  28. // but make the Ctrl key a 'Hyper' modifier
  29. partial modifier_keys
  30. xkb_symbols "swapcaps_hyper" {
  31. replace key <CAPS> { [ Control_L ] };
  32. replace key <LCTL> { [ Hyper_L ] };
  33. modifier_map Control { <CAPS> };
  34. modifier_map Mod3 { <LCTL> };
  35. };
  36. // Set CapsLock to left Ctrl and left Ctrl to switch layout.
  37. partial modifier_keys
  38. xkb_symbols "swapcaps_and_switch_layout" {
  39. replace key <CAPS> { [ Control_L ] };
  40. replace key <LCTL> { [ ISO_Next_Group ] };
  41. modifier_map Control { <CAPS> };
  42. modifier_map Lock { <LCTL> };
  43. };
  44. // Move Ctrl to the leftmost key on the middle row and CapsLock to the
  45. // leftmost key on the bottom row. Only works if the geometry or keycodes
  46. // file has defined appropriate aliases for the keys in question.
  47. partial modifier_keys
  48. xkb_symbols "ac_ctrl" {
  49. replace key <AC00> { [ Control_L ] };
  50. replace key <AA00> { [ Caps_Lock ] };
  51. modifier_map Control { <AC00> };
  52. modifier_map Lock { <AA00> };
  53. };
  54. // Move Ctrl to the leftmost key on the bottom row and CapsLock to the
  55. // leftmost key on the middle row. Only works if the geometry or keycodes
  56. // file has defined appropriate aliases for the keys in question.
  57. partial modifier_keys
  58. xkb_symbols "aa_ctrl" {
  59. replace key <AA00> { [ Control_L ] };
  60. replace key <AC00> { [ Caps_Lock ] };
  61. modifier_map Control { <AA00> };
  62. modifier_map Lock { <AC00> };
  63. };
  64. // Right Ctrl functions as another right Alt.
  65. partial modifier_keys
  66. xkb_symbols "rctrl_ralt" {
  67. key <RCTL> { symbols[Group1]= [ Alt_R ] };
  68. modifier_map Mod1{ <RCTL> };
  69. };
  70. // Menu key functions as another right Ctrl.
  71. partial modifier_keys
  72. xkb_symbols "menu_rctrl" {
  73. replace key <MENU> { [ Control_R, Control_R ] };
  74. modifier_map Control { Control_L, <MENU> };
  75. };
  76. // Right Alt key functions as another right Ctrl.
  77. partial modifier_keys
  78. xkb_symbols "ralt_rctrl" {
  79. replace key <RALT> { type[Group1] = "TWO_LEVEL",
  80. symbols[Group1] = [ Control_R, Control_R ] };
  81. modifier_map Control { <RALT> };
  82. };
  83. // Swap the functions of the left Alt key and the left Ctrl key.
  84. partial modifier_keys
  85. xkb_symbols "swap_lalt_lctl" {
  86. replace key <LALT> { [ Control_L, Control_L ] };
  87. replace key <LCTL> { [ Alt_L, Meta_L ] };
  88. modifier_map Mod1 { <LCTL> };
  89. modifier_map Control { <LALT> };
  90. };
  91. // Swap the functions of the left Win key and the left Ctrl key.
  92. partial modifier_keys
  93. xkb_symbols "swap_lwin_lctl" {
  94. replace key <LWIN> { [ Control_L ] };
  95. replace key <LCTL> { [ Super_L ] };
  96. modifier_map Mod4 { <LCTL> };
  97. modifier_map Control { <LWIN> };
  98. };
  99. // Swap the functions of the right Win key and the right Ctrl key.
  100. partial modifier_keys
  101. xkb_symbols "swap_rwin_rctl" {
  102. replace key <RWIN> { [ Control_R ] };
  103. replace key <RCTL> { [ Super_R ] };
  104. modifier_map Mod4 { <RCTL> };
  105. modifier_map Control { <RWIN> };
  106. };
  107. // Map Ctrl to the left Alt key, Alt to the left Win key,
  108. // and Super to the left Ctrl key.
  109. partial modifier_keys
  110. xkb_symbols "swap_lalt_lctl_lwin" {
  111. replace key <LALT> { [ Control_L, Control_L ] };
  112. replace key <LWIN> { [ Alt_L, Meta_L ] };
  113. replace key <LCTL> { [ Super_L ] };
  114. modifier_map Mod1 { <LWIN> };
  115. modifier_map Mod4 { <LCTL> };
  116. modifier_map Control { <LALT> };
  117. };