shift 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // Cancel CapsLock when a Shift key is pressed.
  2. partial modifier_keys
  3. xkb_symbols "breaks_caps" {
  4. key <LFSH> {
  5. type = "ALPHABETIC",
  6. [Shift_L, Shift_L],
  7. [
  8. SetMods(modifiers=Shift),
  9. SetMods(modifiers=Shift+Lock,clearLocks)
  10. ]
  11. };
  12. key <RTSH> {
  13. type = "ALPHABETIC",
  14. [Shift_R, Shift_R],
  15. [
  16. SetMods(modifiers=Shift),
  17. SetMods(modifiers=Shift+Lock,clearLocks)
  18. ]
  19. };
  20. };
  21. // Toggle CapsLock when pressed together with the other Shift key.
  22. partial modifier_keys
  23. xkb_symbols "lshift_both_capslock" {
  24. key <LFSH> {
  25. type[Group1]="TWO_LEVEL",
  26. symbols[Group1] = [ Shift_L, Caps_Lock ]
  27. };
  28. };
  29. // Toggle CapsLock when pressed together with the other Shift key.
  30. partial modifier_keys
  31. xkb_symbols "rshift_both_capslock" {
  32. key <RTSH> {
  33. type[Group1]="TWO_LEVEL",
  34. symbols[Group1] = [ Shift_R, Caps_Lock ]
  35. };
  36. };
  37. partial modifier_keys
  38. xkb_symbols "both_capslock" {
  39. include "shift(lshift_both_capslock)"
  40. include "shift(rshift_both_capslock)"
  41. };
  42. // Set CapsLock when pressed with the other Shift key, release it when pressed alone.
  43. partial modifier_keys
  44. xkb_symbols "lshift_both_capslock_cancel" {
  45. key <LFSH> {
  46. type[Group1]="ALPHABETIC",
  47. symbols[Group1] = [ Shift_L, Caps_Lock ]
  48. };
  49. };
  50. // Set CapsLock when pressed with the other Shift key, release it when pressed alone.
  51. partial modifier_keys
  52. xkb_symbols "rshift_both_capslock_cancel" {
  53. key <RTSH> {
  54. type[Group1]="ALPHABETIC",
  55. symbols[Group1] = [ Shift_R, Caps_Lock ]
  56. };
  57. };
  58. partial modifier_keys
  59. xkb_symbols "both_capslock_cancel" {
  60. include "shift(lshift_both_capslock_cancel)"
  61. include "shift(rshift_both_capslock_cancel)"
  62. };
  63. // Toggle ShiftLock when pressed together with the other Shift key.
  64. partial modifier_keys
  65. xkb_symbols "lshift_both_shiftlock" {
  66. key <LFSH> {
  67. type[Group1]="TWO_LEVEL",
  68. symbols[Group1] = [ Shift_L, Shift_Lock ]
  69. };
  70. };
  71. // Toggle ShiftLock when pressed together with the other Shift key.
  72. partial modifier_keys
  73. xkb_symbols "rshift_both_shiftlock" {
  74. key <RTSH> {
  75. type[Group1]="TWO_LEVEL",
  76. symbols[Group1] = [ Shift_R, Shift_Lock ]
  77. };
  78. };
  79. partial modifier_keys
  80. xkb_symbols "both_shiftlock" {
  81. include "shift(lshift_both_shiftlock)"
  82. include "shift(rshift_both_shiftlock)"
  83. };