Guest User

Untitled

a guest
Dec 17th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.32 KB | None | 0 0
  1. // # QWERTZ/Neo 2
  2. //
  3. // This is a custom keyboard layout that combines regular German QWERTZ (mostly
  4. // letters of the first 2 levels) with the upper levels of Neo 2. It is
  5. // especially useful if you do lots of programming, but don’t want to lose the
  6. // letters peculiar to the German layout (ä, ö, u, etc.). I use this layout
  7. // with vim where it has proven to be quite useful.
  8. //
  9. // ## How this layout was created
  10. //
  11. // - I took the original "neo_base" layout, defined in
  12. // /usr/share/X11/xkb/symbols/de
  13. // - and modified it to include the standard QWERTZ layout for the first
  14. // 2 levels.
  15. //
  16. // The QWERTZ layout is built up of the following sections:
  17. //
  18. // - "de(basic)", defined in /usr/share/X11/xkb/symbols/de.
  19. // It includes "kpdl(comma)" and "level3(ralt_switch)", both of which are not
  20. // necessary as Neo 2 takes care of the respective keys,
  21. // - "latin(type4)", defined in /usr/share/X11/xkb/symbols/latin.
  22. // It includes "latin(basic)".
  23. //
  24. // The end result is mostly identical to Neo 2 except for the letters and a few
  25. // other keys that have different mappings in either "de(basic)",
  26. // "latin(type4)", or "latin(basic)". The changes to Neo 2’s default mappings
  27. // can be found at the end of the layout.
  28. //
  29. // ## Installation
  30. //
  31. // Append the contents of this file to /usr/share/X11/xkb/symbols/de. You can
  32. // use `cat qwertz_neo | sudo tee -a /usr/share/X11/xkb/symbols/de >/dev/null`
  33. // to do that.
  34. //
  35. // Add the following tag to /usr/share/X11/xkb/rules/evdev.xml (e. g. after the
  36. // tag that configures Neo 2).
  37. //
  38. // ```
  39. // <variant>
  40. // <configItem>
  41. // <name>qwertz_neo</name>
  42. // <description>German (QWERTZ/Neo 2)</description>
  43. // </configItem>
  44. // </variant>
  45. // ```
  46. //
  47. // On Ubuntu, you will likely have to reinstall this layout after an upgrade to
  48. // a new version of the OS (e. g. after an update from 17.04 to 17.10).
  49. //
  50. // ## Usage
  51. //
  52. // Use it with `setxkbmap de qwertz_neo` or select the layout in your desktop
  53. // environment.
  54. //
  55. partial alphanumeric_keys modifier_keys keypad_keys
  56. xkb_symbols "qwertz_neo" {
  57.  
  58. // Levels in Neo jargon
  59. // --------------------------------------------------------------
  60. // Ebene 1: normal
  61. // Ebene 2: Shift
  62. // Ebene 3: Mod3
  63. // Ebene 4: Mod4 (for marking something use Shift + Mod4)
  64. // Ebene 5: Shift + Mod3
  65. // Ebene 6: Mod3 + Mod4
  66. // Compose (not a level): Mod3 + Tab
  67. // Feststelltaste (Capslock): Shift + Shift
  68. // Mod4-Lock: Mod4 + Mod4
  69. // Mod4-Lock: Shift + Mod3 + Tab
  70.  
  71. // Legend
  72. // ===============
  73. // Levels in Xkbmap jargon to be found here in the definitions.
  74. // These are the levels used, and Xorg's translations:
  75. // --------------------------------------------------------------
  76. // Xorg: Level1 Level2 Level3 Level4 Level5 Level6 Level7 Level8
  77. // Neo: Ebene1 Ebene2 Ebene3 Ebene5 Ebene4 Pseudo-Ebene Ebene6 ???
  78. // Keys (Neo): None Shift Mod3 Mod3 + Shift Mod4 Mod4 + Shift Mod3 + Mod4 Mod3 + Mod4 + Shift
  79.  
  80.  
  81. // Alphanumeric-keys
  82. // ===============
  83. key.type[Group1] = "EIGHT_LEVEL";
  84.  
  85. // Tab as Multi_key (Compose)
  86. // --------------------------------------------------------------
  87. key <TAB> { [ Tab, ISO_Left_Tab, Multi_key, ISO_Level5_Lock, NoSymbol, NoSymbol, NoSymbol, ISO_Level5_Lock ] };
  88.  
  89.  
  90. // Number row
  91. // --------------------------------------------------------------
  92. key <TLDE> { [ dead_circumflex, dead_caron, U21BB, U02DE, dead_abovedot, Pointer_EnableKeys, dead_belowdot, NoSymbol ] };
  93.  
  94. key <AE01> { [ 1, degree, onesuperior, onesubscript, ordfeminine, NoSymbol, notsign, NoSymbol ] };
  95. key <AE02> { [ 2, section, twosuperior, twosubscript, masculine, NoSymbol, logicalor, NoSymbol ] };
  96. key <AE03> { [ 3, U2113, threesuperior, threesubscript, numerosign, NoSymbol, logicaland, NoSymbol ] };
  97. key <AE04> { [ 4, guillemotright, U203A, femalesymbol, NoSymbol, NoSymbol, U22A5, NoSymbol ] };
  98. key <AE05> { [ 5, guillemotleft, U2039, malesymbol, periodcentered, NoSymbol, U2221, NoSymbol ] };
  99. key <AE06> { [ 6, dollar, cent, U26A5, sterling, NoSymbol, U2225, NoSymbol ] };
  100.  
  101. key <AE07> { [ 7, EuroSign, yen, U03F0, currency, NoSymbol, rightarrow, NoSymbol ] };
  102. key <AE08> { [ 8, doublelowquotemark, singlelowquotemark, U27E8, Tab, ISO_Left_Tab, U221E, NoSymbol ] };
  103. key <AE09> { [ 9, leftdoublequotemark, leftsinglequotemark, U27E9, KP_Divide, KP_Divide, variation, NoSymbol ] };
  104. key <AE10> { [ 0, rightdoublequotemark, rightsinglequotemark, zerosubscript, KP_Multiply, KP_Multiply, emptyset, NoSymbol ] };
  105.  
  106. key <AE11> { [ minus, emdash, NoSymbol, U2011, KP_Subtract, KP_Subtract, hyphen, NoSymbol ] };
  107. key <AE12> { [ dead_grave, dead_cedilla, dead_abovering, dead_dasia, dead_diaeresis, NoSymbol, dead_macron, NoSymbol ] };
  108.  
  109. // Top row
  110. // --------------------------------------------------------------
  111. key.type[Group1] = "EIGHT_LEVEL_SEMIALPHABETIC";
  112. key <AD01> { [ x, X, ellipsis, Greek_xi, Prior, Prior, Greek_XI, NoSymbol ] };
  113. key <AD02> { [ v, V, underscore, NoSymbol, BackSpace, BackSpace, radical, NoSymbol ] };
  114. key <AD03> { [ l, L, bracketleft, Greek_lambda, Up, Up, Greek_LAMBDA, NoSymbol ] };
  115. key <AD04> { [ c, C, bracketright, Greek_chi, Delete, Delete, U2102, NoSymbol ] };
  116. key <AD05> { [ w, W, asciicircum, Greek_omega, Next, Next, Greek_OMEGA, NoSymbol ] };
  117.  
  118. key <AD06> { [ k, K, exclam, Greek_kappa, exclamdown, NoSymbol, multiply, NoSymbol ] };
  119. key <AD07> { [ h, H, less, Greek_psi, KP_7, KP_7, Greek_PSI, NoSymbol ] };
  120. key <AD08> { [ g, G, greater, Greek_gamma, KP_8, KP_8, Greek_GAMMA, NoSymbol ] };
  121. key <AD09> { [ f, F, equal, Greek_phi, KP_9, KP_9, Greek_PHI, NoSymbol ] };
  122. key <AD10> { [ q, Q, ampersand, U03D5, KP_Add, KP_Add, U211A, NoSymbol ] };
  123.  
  124. key <AD11> { [ ssharp, U1E9E, U017F, Greek_finalsmallsigma, U2212, NoSymbol, jot, NoSymbol ] };
  125.  
  126. key.type[Group1] = "EIGHT_LEVEL";
  127. key <AD12> { [ dead_acute, dead_tilde, dead_stroke, dead_psili, dead_doubleacute, NoSymbol, dead_breve, NoSymbol ] };
  128.  
  129. // Middle row
  130. // --------------------------------------------------------------
  131. key.type[Group1] = "EIGHT_LEVEL_SEMIALPHABETIC";
  132. key <AC01> { [ u, U, backslash, NoSymbol, Home, Home, includedin, NoSymbol ] };
  133. key <AC02> { [ i, I, slash, Greek_iota, Left, Left, integral, NoSymbol ] };
  134. key <AC03> { [ a, A, braceleft, Greek_alpha, Down, Down, U2200, NoSymbol ] };
  135. key <AC04> { [ e, E, braceright, Greek_epsilon, Right, Right, U2203, NoSymbol ] };
  136. key <AC05> { [ o, O, asterisk, Greek_omicron, End, End, elementof, NoSymbol ] };
  137.  
  138. key <AC06> { [ s, S, question, Greek_sigma, questiondown, NoSymbol, Greek_SIGMA, NoSymbol ] };
  139. key <AC07> { [ n, N, parenleft, Greek_nu, KP_4, KP_4, U2115, NoSymbol ] };
  140. key <AC08> { [ r, R, parenright, Greek_rho, KP_5, KP_5, U211D, NoSymbol ] };
  141. key <AC09> { [ t, T, minus, Greek_tau, KP_6, KP_6, partialderivative, NoSymbol ] };
  142. key <AC10> { [ d, D, colon, Greek_delta, KP_Separator, comma, Greek_DELTA, NoSymbol ] };
  143.  
  144. key <AC11> { [ y, Y, at, Greek_upsilon, period, KP_Decimal, nabla, NoSymbol ] };
  145.  
  146. // Bottom row
  147. // --------------------------------------------------------------
  148. key <AB01> { [ udiaeresis, Udiaeresis, numbersign, NoSymbol, Escape, Escape, union, NoSymbol ] };
  149. key <AB02> { [ odiaeresis, Odiaeresis, dollar, U03F5, Tab, Tab, intersection, NoSymbol ] };
  150. key <AB03> { [ adiaeresis, Adiaeresis, bar, Greek_eta, Insert, Insert, U2135, NoSymbol ] };
  151. key <AB04> { [ p, P, asciitilde, Greek_pi, Return, Return, Greek_PI, NoSymbol ] };
  152. key <AB05> { [ z, Z, grave, Greek_zeta, Undo, Redo, U2124, NoSymbol ] };
  153.  
  154. key <AB06> { [ b, B, plus, Greek_beta, colon, NoSymbol, U21D0, NoSymbol ] };
  155. key <AB07> { [ m, M, percent, Greek_mu, KP_1, KP_1, ifonlyif, NoSymbol ] };
  156. key.type[Group1] = "EIGHT_LEVEL";
  157. key <AB08> { [ comma, endash, quotedbl, U03F1, KP_2, KP_2, U21D2, NoSymbol ] };
  158. key <AB09> { [ period, enfilledcircbullet, apostrophe, U03D1, KP_3, KP_3, U21A6, NoSymbol ] };
  159. key.type[Group1] = "EIGHT_LEVEL_SEMIALPHABETIC";
  160. key <AB10> { [ j, J, semicolon, Greek_theta, semicolon, NoSymbol, Greek_THETA, NoSymbol ] };
  161. key.type[Group1] = "EIGHT_LEVEL";
  162.  
  163. // Space key
  164. // --------------------------------------------------------------
  165. key <SPCE> { [ space, space, space, nobreakspace, KP_0, KP_0, U202F, NoSymbol ] };
  166.  
  167.  
  168. // Keypad-keys
  169. // ===============
  170.  
  171. // The former Numlock key:
  172. key <NMLK> { [ Tab, ISO_Left_Tab, equal, approxeq, notequal, Pointer_EnableKeys, identical, NoSymbol ] };
  173.  
  174. // Topmost row
  175. // --------------------------------------------------------------
  176. key <KPDV> { [ KP_Divide, KP_Divide, division, U2300, U2215, NoSymbol, U2223, NoSymbol ] };
  177. key <KPMU> { [ KP_Multiply, KP_Multiply, U22C5, U2299, multiply, NoSymbol, U2297, NoSymbol ] };
  178. key <KPSU> { [ KP_Subtract, KP_Subtract, U2212, U2296, U2216, NoSymbol, U2238, NoSymbol ] };
  179.  
  180. // Top row
  181. // --------------------------------------------------------------
  182. key <KP7> { [ KP_7, U2714, U2195, U226A, KP_Home, KP_Home, upstile, NoSymbol ] };
  183. key <KP8> { [ KP_8, U2718, uparrow, intersection, KP_Up, KP_Up, U22C2, NoSymbol ] };
  184. key <KP9> { [ KP_9, dagger, U20D7, U226B, KP_Prior, KP_Prior, U2309, NoSymbol ] };
  185. key <KPAD> { [ KP_Add, KP_Add, plusminus, U2295, U2213, NoSymbol, U2214, NoSymbol ] };
  186.  
  187. // Middle row
  188. // --------------------------------------------------------------
  189. key <KP4> { [ KP_4, club, leftarrow, includedin, KP_Left, KP_Left, U2286, NoSymbol ] };
  190. key <KP5> { [ KP_5, EuroSign, colon, U22B6, KP_Begin, KP_Begin, U22B7, NoSymbol ] };
  191. key <KP6> { [ KP_6, U2023, rightarrow, includes, KP_Right, KP_Right, U2287, NoSymbol ] };
  192.  
  193. // Bottom row
  194. // --------------------------------------------------------------
  195. key <KP1> { [ KP_1, diamond, U2194, lessthanequal, KP_End, KP_End, downstile, NoSymbol ] };
  196. key <KP2> { [ KP_2, heart, downarrow, union, KP_Down, KP_Down, U22C3, NoSymbol ] };
  197. key <KP3> { [ KP_3, U2660, U21CC, greaterthanequal, KP_Next, KP_Next, U230B, NoSymbol ] };
  198. key <KPEN> { [ KP_Enter, KP_Enter, KP_Enter, KP_Enter, KP_Enter, KP_Enter, KP_Enter, NoSymbol ] };
  199. key <KPEQ> { [ KP_Equal, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol ] };
  200.  
  201. // Bottommost row
  202. // --------------------------------------------------------------
  203. key <KP0> { [ KP_0, U2423, percent, U2030, KP_Insert, KP_Insert, U25A1, NoSymbol ] };
  204. key <KPDL> { [ KP_Separator, period, comma, minutes, KP_Delete, KP_Delete, seconds, NoSymbol ] };
  205.  
  206. // The above is the full Neo 2 layout. What follows are the customizations
  207. // that make most of the letters of a standard German layout available.
  208.  
  209. // latin(basic)
  210.  
  211. key <AD01> { [ q, Q ] };
  212. key <AD02> { [ w, W ] };
  213. key <AD03> { [ e, E ] };
  214. key <AD04> { [ r, R ] };
  215. key <AD05> { [ t, T ] };
  216.  
  217. key <AD07> { [ u, U ] };
  218. key <AD08> { [ i, I ] };
  219. key <AD09> { [ o, O ] };
  220. key <AD10> { [ p, P ] };
  221.  
  222. key <AC01> { [ a, A ] };
  223. key <AC02> { [ s, S ] };
  224. key <AC03> { [ d, D ] };
  225. key <AC04> { [ f, F ] };
  226. key <AC05> { [ g, G ] };
  227. key <AC06> { [ h, H ] };
  228. key <AC07> { [ j, J ] };
  229. key <AC08> { [ k, K ] };
  230. key <AC09> { [ l, L ] };
  231.  
  232. key <AB02> { [ x, X ] };
  233. key <AB03> { [ c, C ] };
  234. key <AB04> { [ v, V ] };
  235. key <AB05> { [ b, B ] };
  236. key <AB06> { [ n, N ] };
  237. key <AB07> { [ m, M ] };
  238.  
  239. // latin(type4)
  240.  
  241. // Modified to have minus and emdash where you would find minus on a QWERTZ
  242. // layout.
  243. // Neo 2: key <AB10> { [ j, J ] }
  244. // Neo 2: key <AE11> { [ minus, emdash ] }
  245. key <AB10> { [ minus, emdash ] };
  246.  
  247. // de(basic)
  248.  
  249. // Modified to have both lower and upper case ß where you would find lower
  250. // case ß on a QWERTZ layout.
  251. // Neo 2: key <AD11> { [ ssharp, U1E9E ] }
  252. // Neo 2: key <AE11> { [ minus, emdash ] }
  253. key <AE11> { [ssharp, U1E9E ] };
  254.  
  255. key <AD06> { [ z, Z ] };
  256. key <AD11> { [udiaeresis, Udiaeresis ] };
  257.  
  258. key <AC10> { [odiaeresis, Odiaeresis ] };
  259. key <AC11> { [adiaeresis, Adiaeresis ] };
  260.  
  261. key <AB01> { [ y, Y ] };
  262.  
  263. name[Group1]="German (QWERTZ/Neo 2)";
  264.  
  265. include "shift(both_capslock)"
  266. include "level3(caps_switch)"
  267. include "level3(bksl_switch)"
  268. include "level5(lsgt_switch)"
  269. include "level5(ralt_switch)"
  270. };
Add Comment
Please, Sign In to add comment