Compare commits

...

9 Commits

Author SHA1 Message Date
Lu Baumann
ac9ca883b2
Update README.md 2023-11-29 15:18:23 +01:00
Lu Baumann
852fa8ceb0 updated for new xkb 2023-11-17 20:15:20 +01:00
Lu Baumann
d9667dabbf fixed error in xkb configs 2023-11-17 20:12:25 +01:00
Lu Baumann
739e4b3577
fixed filenames when writing 2023-10-17 01:09:35 +02:00
Lu Baumann
2e34f1b6c5
fixed logic 2023-10-16 23:40:58 +02:00
Lu Baumann
59213e8145
removed match to allow older python versions 2023-10-16 23:35:20 +02:00
Lu Baumann
14ac53f4af
Update README.md 2023-04-26 11:53:49 +02:00
Lu Baumann
67c4134c38
Update README.md 2023-04-26 11:53:17 +02:00
Lu Baumann
22e2749084
Update README.md 2023-04-26 11:50:09 +02:00
5 changed files with 38 additions and 30 deletions

View File

@ -1,4 +1,16 @@
# xkb_neo
My xkb modifications for making neo etc (inclusive vou) work properly with every part of GNU/Linux. YES, even IntelliJ
My xkb modifications for making neo etc (inclusive vou) work properly with every part of GNU/Linux.
Just execute patch_xkb.py as superuser to patch /usr/share/X11/xkb. Run enable_gnome.sh as normal user to enable alternative keyboard layouts on GNOME
For programs running through XWayland manually execute
~~~bash
setxkbmap de vou
~~~
to get proper keybindings working.
Execute patch.sh to patch your system.
Or Manually:
- execute patch_xkb.py as superuser to patch /usr/share/X11/xkb.
- execute enable_gnome.sh as normal user to enable alternative keyboard layouts on GNOME

View File

@ -10,15 +10,14 @@ def brackets(text):
res = 0
slash = 0
for i in text:
match i:
case "/":
if i == "/":
slash += 1
if slash == 2:
break
continue
case "{":
elif i == "{":
res += 1
case "}":
elif i == "}":
res -= 1
slash = 0
return res
@ -60,7 +59,7 @@ if "vou" not in "\n".join(de):
koy = ([i for i in range(len(de)) if "\"koy\"" in de[i]][0], -1)
koy = (koy[0] - 1, bracket_end(de, koy[0]))
de = de[:koy[1]] + de_koy_patch + de[koy[1]:]
with open(f"{xkb}/symbols/de_neo_base", "w") as f:
with open(f"{xkb}/symbols/de", "w") as f:
f.write("\n".join(de))
if "quote_switch" not in "\n".join(level3):

View File

@ -2,9 +2,9 @@
partial alphanumeric_keys modifier_keys keypad_keys
xkb_symbols "kou" {
include "de_neo_base(koy_base)"
include "de(koy_base)"
key.type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK";
key.type[Group1] = "EIGHT_LEVEL_WITH_LEVEL5_LOCK";
// level 4: replace numero sign by heavy check mark (key 3)
key <AE03> { [ NoSymbol, NoSymbol, NoSymbol, NoSymbol, U2714, NoSymbol, NoSymbol, NoSymbol ] };
@ -20,7 +20,7 @@ xkb_symbols "kou" {
// move comma and endash to QWERTZ-C key
key <AB03> { [ comma, endash, NoSymbol, U03F1, NoSymbol, NoSymbol, U21D2, NoSymbol ] };
key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK";
key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK";
// move f and ssharp keys to new positions, replace at by rightarrow; level4: replace period with semicolon
key <AD10> { [ f, F, ampersand, Greek_phi, KP_Add, KP_Add, Greek_PHI, NoSymbol ] };
key <BKSL> { [ ssharp, U1E9E, rightarrow, Greek_finalsmallsigma, semicolon, KP_Decimal, jot, NoSymbol ] };
@ -123,7 +123,7 @@ xkb_symbols "kou" {
partial alphanumeric_keys
xkb_symbols "vou" {
include "de_neo_base(kou)"
include "de(kou)"
key <AB10> { [ k, K, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol ] };
key <AD01> { [ v, V, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol ] };

View File

@ -26,7 +26,7 @@ xkb_symbols "neo_base" {
// Alphanumeric-keys
// ===============
key.type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK";
key.type[Group1] = "EIGHT_LEVEL_WITH_LEVEL5_LOCK";
// Tab as Multi_key (Compose)
// --------------------------------------------------------------
@ -54,7 +54,7 @@ xkb_symbols "neo_base" {
// Top row
// --------------------------------------------------------------
key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK";
key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK";
key <AD01> { symbols[Group1] = [ x, X, ellipsis, Greek_xi, Prior, Prior, Greek_XI, NoSymbol ],
actions[Group1] = [ NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(key=<PGUP>), RedirectKey(key=<PGUP>), NoAction(), NoAction() ]};
key <AD02> { symbols[Group1] = [ v, V, underscore, NoSymbol, BackSpace, BackSpace, radical, NoSymbol ],
@ -74,12 +74,12 @@ xkb_symbols "neo_base" {
key <AD11> { [ ssharp, U1E9E, U017F, Greek_finalsmallsigma, U2212, NoSymbol, jot, NoSymbol ] };
key.type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK";
key.type[Group1] = "EIGHT_LEVEL_WITH_LEVEL5_LOCK";
key <AD12> { [ dead_acute, dead_tilde, dead_stroke, dead_psili, dead_doubleacute, NoSymbol, dead_breve, NoSymbol ] };
// Middle row
// --------------------------------------------------------------
key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK";
key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK";
key <AC01> { symbols[Group1] = [ u, U, backslash, NoSymbol, Home, Home, includedin, NoSymbol ],
actions[Group1] = [ NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(key=<HOME>), RedirectKey(key=<HOME>), NoAction(), NoAction() ]};
key <AC02> { symbols[Group1] = [ i, I, slash, Greek_iota, Left, Left, integral, NoSymbol ],
@ -114,12 +114,12 @@ xkb_symbols "neo_base" {
key <AB06> { [ b, B, plus, Greek_beta, colon, NoSymbol, U21D0, NoSymbol ] };
key <AB07> { [ m, M, percent, Greek_mu, KP_1, KP_1, ifonlyif, NoSymbol ] };
key.type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK";
key.type[Group1] = "EIGHT_LEVEL_WITH_LEVEL5_LOCK";
key <AB08> { [ comma, endash, quotedbl, U03F1, KP_2, KP_2, U21D2, NoSymbol ] };
key <AB09> { [ period, enfilledcircbullet, apostrophe, U03D1, KP_3, KP_3, U21A6, NoSymbol ] };
key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK";
key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK";
key <AB10> { [ j, J, semicolon, Greek_theta, semicolon, NoSymbol, Greek_THETA, NoSymbol ] };
key.type[Group1] = "EIGHT_LEVEL_LEVEL_FIVE_LOCK";
key.type[Group1] = "EIGHT_LEVEL_WITH_LEVEL5_LOCK";
// Space key
// --------------------------------------------------------------

View File

@ -2,8 +2,5 @@
// The Quote key (while pressed) chooses the third shift level.
partial modifier_keys
xkb_symbols "quote_switch" {
key <AC11> {
type[Group1]="ONE_LEVEL",
symbols[Group1] = [ ISO_Level3_Shift ]
};
key <AC11> {[ ISO_Level3_Shift ], type[group1]="ONE_LEVEL" };
};