explicit-actions.xkb 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. xkb_keymap {
  2. xkb_keycodes "(unnamed)" {
  3. minimum = 8;
  4. maximum = 255;
  5. <ESC> = 9;
  6. <AE01> = 10;
  7. <AE02> = 11;
  8. <AE03> = 12;
  9. <AE04> = 13;
  10. <AE05> = 14;
  11. <AE06> = 15;
  12. <AE07> = 16;
  13. <AE08> = 17;
  14. <AE09> = 18;
  15. <AE10> = 19;
  16. <AE11> = 20;
  17. <AE12> = 21;
  18. <BKSP> = 22;
  19. <TAB> = 23;
  20. <AD01> = 24;
  21. <AD02> = 25;
  22. <AD03> = 26;
  23. <AD04> = 27;
  24. <AD05> = 28;
  25. <AD06> = 29;
  26. <AD07> = 30;
  27. <AD08> = 31;
  28. <AD09> = 32;
  29. <AD10> = 33;
  30. <AD11> = 34;
  31. <AD12> = 35;
  32. <RTRN> = 36;
  33. <LCTL> = 37;
  34. <AC01> = 38;
  35. <AC02> = 39;
  36. <AC03> = 40;
  37. <AC04> = 41;
  38. <AC05> = 42;
  39. <AC06> = 43;
  40. <AC07> = 44;
  41. <AC08> = 45;
  42. <AC09> = 46;
  43. <AC10> = 47;
  44. <AC11> = 48;
  45. <TLDE> = 49;
  46. <LFSH> = 50;
  47. <BKSL> = 51;
  48. <AB01> = 52;
  49. <AB02> = 53;
  50. <AB03> = 54;
  51. <AB04> = 55;
  52. <AB05> = 56;
  53. <AB06> = 57;
  54. <AB07> = 58;
  55. <AB08> = 59;
  56. <AB09> = 60;
  57. <AB10> = 61;
  58. <RTSH> = 62;
  59. <KPMU> = 63;
  60. <LALT> = 64;
  61. <SPCE> = 65;
  62. <CAPS> = 66;
  63. <FK01> = 67;
  64. <FK02> = 68;
  65. <FK03> = 69;
  66. <FK04> = 70;
  67. <FK05> = 71;
  68. <FK06> = 72;
  69. <FK07> = 73;
  70. <FK08> = 74;
  71. <FK09> = 75;
  72. <FK10> = 76;
  73. <NMLK> = 77;
  74. <SCLK> = 78;
  75. <KP7> = 79;
  76. <KP8> = 80;
  77. <KP9> = 81;
  78. <KPSU> = 82;
  79. <KP4> = 83;
  80. <KP5> = 84;
  81. <KP6> = 85;
  82. <KPAD> = 86;
  83. <KP1> = 87;
  84. <KP2> = 88;
  85. <KP3> = 89;
  86. <KP0> = 90;
  87. <KPDL> = 91;
  88. <LVL3> = 92;
  89. <LSGT> = 94;
  90. <FK11> = 95;
  91. <FK12> = 96;
  92. <AB11> = 97;
  93. <RCTL> = 105;
  94. <RALT> = 108;
  95. <LWIN> = 133;
  96. <RWIN> = 134;
  97. <COMP> = 135;
  98. <MDSW> = 203;
  99. <ALT> = 204;
  100. <META> = 205;
  101. <SUPR> = 206;
  102. <HYPR> = 207;
  103. };
  104. xkb_types "(unnamed)" {
  105. virtual_modifiers NumLock,Alt,LevelThree,ScrollLock,LevelFive,Super,AltGr,Meta,Hyper;
  106. type "ONE_LEVEL" {
  107. modifiers= none;
  108. level_name[1]= "Any";
  109. };
  110. type "TWO_LEVEL" {
  111. modifiers= Shift;
  112. map[Shift]= 2;
  113. level_name[1]= "Base";
  114. level_name[2]= "Shift";
  115. };
  116. type "ALPHABETIC" {
  117. modifiers= Shift+Lock;
  118. map[Shift]= 2;
  119. map[Lock]= 2;
  120. level_name[1]= "Base";
  121. level_name[2]= "Caps";
  122. };
  123. type "FOUR_LEVEL" {
  124. modifiers= Shift+LevelThree;
  125. map[Shift]= 2;
  126. map[LevelThree]= 3;
  127. map[Shift+LevelThree]= 4;
  128. level_name[1]= "Base";
  129. level_name[2]= "Shift";
  130. level_name[3]= "AltGr";
  131. level_name[4]= "Shift AltGr";
  132. };
  133. type "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK" {
  134. modifiers= Shift+Lock+NumLock+LevelThree+LevelFive;
  135. map[Shift]= 2;
  136. map[LevelThree]= 3;
  137. map[Shift+LevelThree]= 4;
  138. map[LevelFive]= 5;
  139. map[Shift+LevelFive]= 6;
  140. preserve[Shift+LevelFive]= Shift;
  141. map[LevelThree+LevelFive]= 7;
  142. map[Shift+LevelThree+LevelFive]= 8;
  143. map[NumLock]= 5;
  144. map[Shift+NumLock]= 6;
  145. preserve[Shift+NumLock]= Shift;
  146. map[NumLock+LevelThree]= 7;
  147. map[Shift+NumLock+LevelThree]= 8;
  148. map[Shift+NumLock+LevelFive]= 2;
  149. map[NumLock+LevelThree+LevelFive]= 3;
  150. map[Shift+NumLock+LevelThree+LevelFive]= 4;
  151. map[Lock]= 2;
  152. map[Lock+LevelThree]= 3;
  153. map[Shift+Lock+LevelThree]= 4;
  154. map[Lock+LevelFive]= 5;
  155. map[Shift+Lock+LevelFive]= 6;
  156. map[Lock+LevelThree+LevelFive]= 7;
  157. map[Shift+Lock+LevelThree+LevelFive]= 8;
  158. map[Lock+NumLock]= 5;
  159. map[Shift+Lock+NumLock]= 6;
  160. map[Lock+NumLock+LevelThree]= 7;
  161. map[Shift+Lock+NumLock+LevelThree]= 8;
  162. map[Lock+NumLock+LevelFive]= 2;
  163. map[Lock+NumLock+LevelThree+LevelFive]= 4;
  164. map[Shift+Lock+NumLock+LevelThree+LevelFive]= 3;
  165. level_name[1]= "Base";
  166. level_name[2]= "Shift";
  167. level_name[3]= "Alt Base";
  168. level_name[4]= "Shift Alt";
  169. level_name[5]= "X";
  170. level_name[6]= "X Shift";
  171. level_name[7]= "X Alt Base";
  172. level_name[8]= "X Shift Alt";
  173. };
  174. type "FOUR_LEVEL_SEMIALPHABETIC" {
  175. modifiers= Shift+Lock+LevelThree;
  176. map[Shift]= 2;
  177. map[Lock]= 2;
  178. map[LevelThree]= 3;
  179. map[Shift+LevelThree]= 4;
  180. map[Lock+LevelThree]= 3;
  181. preserve[Lock+LevelThree]= Lock;
  182. map[Shift+Lock+LevelThree]= 4;
  183. preserve[Shift+Lock+LevelThree]= Lock;
  184. level_name[1]= "Base";
  185. level_name[2]= "Shift";
  186. level_name[3]= "AltGr";
  187. level_name[4]= "Shift AltGr";
  188. };
  189. };
  190. xkb_compatibility "(unnamed)" {
  191. virtual_modifiers NumLock,Alt,LevelThree,ScrollLock,LevelFive,Super,AltGr,Meta,Hyper;
  192. interpret.useModMapMods= AnyLevel;
  193. interpret.repeat= False;
  194. interpret ISO_Level2_Latch+Exactly(Shift) {
  195. useModMapMods=level1;
  196. action= LatchMods(modifiers=Shift,clearLocks,latchToLock);
  197. };
  198. interpret Shift_Lock+AnyOf(Shift+Lock) {
  199. action= LockMods(modifiers=Shift);
  200. };
  201. interpret Num_Lock+AnyOf(all) {
  202. virtualModifier= NumLock;
  203. action= LockMods(modifiers=NumLock);
  204. };
  205. interpret ISO_Level3_Shift+AnyOf(all) {
  206. virtualModifier= LevelThree;
  207. useModMapMods=level1;
  208. action= SetMods(modifiers=LevelThree,clearLocks);
  209. };
  210. interpret ISO_Level3_Latch+AnyOf(all) {
  211. virtualModifier= LevelThree;
  212. useModMapMods=level1;
  213. action= LatchMods(modifiers=LevelThree,clearLocks,latchToLock);
  214. };
  215. interpret ISO_Level3_Lock+AnyOf(all) {
  216. virtualModifier= LevelThree;
  217. useModMapMods=level1;
  218. action= LockMods(modifiers=LevelThree);
  219. };
  220. interpret Alt_L+AnyOf(all) {
  221. virtualModifier= Alt;
  222. action= SetMods(modifiers=modMapMods,clearLocks);
  223. };
  224. interpret Alt_R+AnyOf(all) {
  225. virtualModifier= Alt;
  226. action= SetMods(modifiers=modMapMods,clearLocks);
  227. };
  228. interpret ISO_Level5_Shift+AnyOf(all) {
  229. virtualModifier= LevelFive;
  230. useModMapMods=level1;
  231. action= SetMods(modifiers=LevelFive,clearLocks);
  232. };
  233. interpret ISO_Group_Shift+AnyOfOrNone(all) {
  234. virtualModifier= AltGr;
  235. useModMapMods=level1;
  236. action= SetGroup(group=+1);
  237. };
  238. interpret ISO_Level3_Shift+AnyOfOrNone(all) {
  239. action= SetMods(modifiers=LevelThree,clearLocks);
  240. };
  241. interpret ISO_Next_Group+AnyOfOrNone(all) {
  242. virtualModifier= AltGr;
  243. useModMapMods=level1;
  244. action= LockGroup(group=+1);
  245. };
  246. interpret ISO_Prev_Group+AnyOfOrNone(all) {
  247. virtualModifier= AltGr;
  248. useModMapMods=level1;
  249. action= LockGroup(group=-1);
  250. };
  251. interpret Alt_L+AnyOfOrNone(all) {
  252. action= SetMods(modifiers=Alt,clearLocks);
  253. };
  254. interpret Alt_R+AnyOfOrNone(all) {
  255. action= SetMods(modifiers=Alt,clearLocks);
  256. };
  257. interpret Shift_L+AnyOfOrNone(all) {
  258. action= SetMods(modifiers=Shift,clearLocks);
  259. };
  260. interpret Shift_R+AnyOfOrNone(all) {
  261. action= SetMods(modifiers=Shift,clearLocks);
  262. };
  263. interpret ISO_Level5_Shift+AnyOfOrNone(all) {
  264. action= SetMods(modifiers=LevelFive,clearLocks);
  265. };
  266. interpret ISO_Level5_Latch+AnyOfOrNone(all) {
  267. action= LatchMods(modifiers=LevelFive,clearLocks,latchToLock);
  268. };
  269. interpret ISO_Level5_Lock+AnyOfOrNone(all) {
  270. action= LockMods(modifiers=LevelFive);
  271. };
  272. interpret Any+AnyOf(all) {
  273. action= SetMods(modifiers=modMapMods,clearLocks);
  274. };
  275. };
  276. xkb_symbols "(unnamed)" {
  277. name[1]="English (US)";
  278. name[2]="Czech";
  279. name[3]="German (Neo 2)";
  280. key <AD05> {
  281. //// repeat=Yes is set with the default *interpretation*, but
  282. //// using explicit actions makes the key keep the initial value,
  283. //// i.e. repeat=No.
  284. //repeat= Yes,
  285. symbols[1]= [ t, T ],
  286. //actions[1]= [ NoAction(), NoAction() ],
  287. symbols[2]= [ Cyrillic_ie, Cyrillic_IE ],
  288. actions[2]= [ NoAction(), NoAction() ],
  289. symbols[3]= [ w, W ]//,
  290. //actions[3]= [ NoAction(), NoAction() ]
  291. };
  292. key <AD06> {
  293. type[3]= "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK",
  294. symbols[1]= [ y, Y ],
  295. symbols[2]= [ z, Z, leftarrow, yen ],
  296. symbols[3]= [ k, K, exclam, Greek_kappa, exclamdown, NoSymbol, multiply, NoSymbol ]
  297. };
  298. key <LFSH> {
  299. type[3]= "TWO_LEVEL",
  300. symbols[1]= [ Shift_L ],
  301. symbols[2]= [ Shift_L ],
  302. symbols[3]= [ Shift_L, Caps_Lock ]
  303. };
  304. //// This should set the key’s EXPLICIT_INTERP explicit flag and
  305. //// the group 2 explicit_actions, but it should still allow to
  306. //// interpret the keysyms in groups 1 and 3.
  307. key <LALT> {
  308. type[1]= "ONE_LEVEL",
  309. type[2]= "TWO_LEVEL",
  310. type[3]= "TWO_LEVEL",
  311. //repeat= No,
  312. symbols[1]= [ Shift_L ],
  313. //actions[1]= [ SetMods(modifiers=Shift,clearLocks) ],
  314. symbols[2]= [ ISO_Level3_Shift, Multi_key ],
  315. actions[2]= [ SetMods(modifiers=LevelThree), NoAction() ],
  316. symbols[3]= [ ISO_Level5_Shift, ISO_Level3_Shift ]//,
  317. //actions[3]= [ SetMods(modifiers=LevelFive,clearLocks), SetMods(modifiers=LevelThree,clearLocks) ]
  318. };
  319. key <LVL3> {
  320. type= "ONE_LEVEL",
  321. //// The following fields are added, because they are set via
  322. //// compatibility interpretations, but using explicit actions
  323. //// disable them.
  324. //repeat= No,
  325. //virtualMods= LevelThree,
  326. symbols[1]= [ ISO_Level3_Shift ],
  327. //actions[1]= [ SetMods(modifiers=LevelThree,clearLocks) ],
  328. symbols[2]= [ ISO_Level3_Shift ],
  329. actions[2]= [ SetMods(modifiers=LevelThree) ],
  330. symbols[3]= [ ISO_Level3_Shift ]//,
  331. //actions[3]= [ SetMods(modifiers=LevelThree,clearLocks) ]
  332. };
  333. key <LSGT> {
  334. symbols[1]= [ less, greater, bar, brokenbar ],
  335. symbols[2]= [ backslash, bar, slash, NoSymbol ],
  336. symbols[3]= [ ISO_Level5_Shift ]
  337. };
  338. key <RALT> {
  339. type[1]= "TWO_LEVEL",
  340. type[2]= "ONE_LEVEL",
  341. type[3]= "ONE_LEVEL",
  342. symbols[1]= [ Alt_R, Meta_R ],
  343. symbols[2]= [ ISO_Level3_Shift ],
  344. symbols[3]= [ ISO_Level5_Shift ]
  345. };
  346. key <COMP> { [ ISO_Next_Group, Menu ] };
  347. key <MDSW> {
  348. type= "ONE_LEVEL",
  349. symbols[1]= [ ISO_Level5_Shift ],
  350. symbols[2]= [ ISO_Level5_Shift ],
  351. symbols[3]= [ ISO_Level5_Shift ]
  352. };
  353. key <ALT> { [ NoSymbol, Alt_L ] };
  354. key <META> { [ NoSymbol, Meta_L ] };
  355. key <SUPR> { [ NoSymbol, Super_L ] };
  356. modifier_map Shift { <LFSH>, <RTSH> };
  357. modifier_map Mod1 { <RALT>, <ALT>, <META> };
  358. modifier_map Mod3 { <MDSW> };
  359. modifier_map Mod5 { <LVL3> };
  360. };
  361. };