Add German keyboard layout.
This commit is contained in:
parent
a942b15f91
commit
1b3dcad03c
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014 Jonas 'Sortie' Termansen.
|
||||
* Copyright (c) 2014, 2016 Jonas 'Sortie' Termansen.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -74,6 +74,28 @@ bool accept_no_shift_alt_gr(uint32_t combination)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool accept_no_shift_alt_gr_no_caps(uint32_t combination)
|
||||
{
|
||||
if ( (combination & 0b0010) )
|
||||
return false;
|
||||
if ( combination & 0b0001 )
|
||||
return false;
|
||||
if ( !(combination & 0b0100) )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool accept_no_shift_alt_gr_caps(uint32_t combination)
|
||||
{
|
||||
if ( !(combination & 0b0010) )
|
||||
return false;
|
||||
if ( combination & 0b0001 )
|
||||
return false;
|
||||
if ( !(combination & 0b0100) )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool accept_shift_alt_gr(uint32_t combination)
|
||||
{
|
||||
if ( !(combination & 0b0001) )
|
||||
|
@ -105,6 +127,28 @@ bool accept_upper_no_altgr(uint32_t combination)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool accept_lower_altgr(uint32_t combination)
|
||||
{
|
||||
if ( !(combination & 0b0100) )
|
||||
return false;
|
||||
if ( (combination & 0b0001) && !(combination & 0b0010) )
|
||||
return false;
|
||||
if ( !(combination & 0b0001) && (combination & 0b0010) )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool accept_upper_altgr(uint32_t combination)
|
||||
{
|
||||
if ( !(combination & 0b0100) )
|
||||
return false;
|
||||
if ( (combination & 0b0001) && (combination & 0b0010) )
|
||||
return false;
|
||||
if ( !(combination & 0b0001) && !(combination & 0b0010) )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool accept_numlock(uint32_t combination)
|
||||
{
|
||||
if ( !(combination & 0b1000) )
|
||||
|
@ -491,16 +535,24 @@ int main(int argc, char* argv[])
|
|||
condition = accept_shift_no_alt_gr;
|
||||
else if ( !strcmp(line, "-shift & +altgr") )
|
||||
condition = accept_no_shift_alt_gr;
|
||||
else if ( !strcmp(line, "-shift & +altgr & -caps") )
|
||||
condition = accept_no_shift_alt_gr_no_caps;
|
||||
else if ( !strcmp(line, "-shift & +altgr & +caps") )
|
||||
condition = accept_no_shift_alt_gr_caps;
|
||||
else if ( !strcmp(line, "+shift & +altgr") )
|
||||
condition = accept_shift_alt_gr;
|
||||
else if ( !strcmp(line, "shift = caps & -altgr") )
|
||||
condition = accept_lower_no_altgr;
|
||||
else if ( !strcmp(line, "shift ^ caps & -altgr") )
|
||||
condition = accept_upper_no_altgr;
|
||||
else if ( !strcmp(line, "shift = caps & +altgr") )
|
||||
condition = accept_lower_altgr;
|
||||
else if ( !strcmp(line, "shift ^ caps & +altgr") )
|
||||
condition = accept_upper_altgr;
|
||||
else if ( !strcmp(line, "+numlock") )
|
||||
condition = accept_numlock;
|
||||
else
|
||||
printf("%s\n", line);
|
||||
fprintf(stderr, "Unsupported modifier combination: %s\n", line);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ KBLAYOUTDIR?=$(DATAROOTDIR)/kblayout
|
|||
KBLAYOUT_COMPILER?=kblayout-compiler
|
||||
|
||||
LAYOUTS=\
|
||||
de \
|
||||
dk \
|
||||
us \
|
||||
|
||||
|
|
|
@ -0,0 +1,257 @@
|
|||
name "German (Germany)"
|
||||
|
||||
modifier shift
|
||||
modifier caps
|
||||
modifier altgr
|
||||
modifier numlock
|
||||
|
||||
KLSHIFT: modify shift
|
||||
KRSHIFT: modify shift
|
||||
KCAPSLOCK: toggle caps
|
||||
KRALT: modify altgr
|
||||
KNUMLOCK: toggle numlock
|
||||
|
||||
KBKSPC: "\b"
|
||||
KTAB: "\t"
|
||||
KENTER: "\n"
|
||||
KSPACE: " "
|
||||
KPADENTER: "\n"
|
||||
|
||||
KSYM12: "*"
|
||||
KSYM13: "-"
|
||||
KSYM14: "+"
|
||||
KSYM16: "/"
|
||||
|
||||
-shift:
|
||||
KSYM15: ","
|
||||
|
||||
-shift & -altgr:
|
||||
K1: "1"
|
||||
K2: "2"
|
||||
K3: "3"
|
||||
K4: "4"
|
||||
K5: "5"
|
||||
K6: "6"
|
||||
K7: "7"
|
||||
K8: "8"
|
||||
K9: "9"
|
||||
K0: "0"
|
||||
KSYM1: "ß"
|
||||
KSYM2: dead ´
|
||||
KSYM3: "ü"
|
||||
KSYM4: "+"
|
||||
KSYM5: "ö"
|
||||
KSYM6: "ä"
|
||||
KSYM7: dead ^
|
||||
KSYM8: "#"
|
||||
KSYM9: ","
|
||||
KSYM10: "."
|
||||
KSYM11: "-"
|
||||
KNO_STANDARD_MEANING_2: "<"
|
||||
|
||||
+shift & -altgr:
|
||||
K1: "!"
|
||||
K2: "\""
|
||||
K3: "§"
|
||||
K4: "$"
|
||||
K5: "%"
|
||||
K6: "&"
|
||||
K7: "/"
|
||||
K8: "("
|
||||
K9: ")"
|
||||
K0: "="
|
||||
KSYM1: "?"
|
||||
KSYM2: dead `
|
||||
KSYM3: "Ü"
|
||||
KSYM4: "*"
|
||||
KSYM5: "Ö"
|
||||
KSYM6: "Ä"
|
||||
KSYM7: "°"
|
||||
KSYM8: "'"
|
||||
KSYM9: ";"
|
||||
KSYM10: ":"
|
||||
KSYM11: "_"
|
||||
KNO_STANDARD_MEANING_2: ">"
|
||||
|
||||
-shift & +altgr:
|
||||
K1: "¹"
|
||||
K2: "²"
|
||||
K3: "³"
|
||||
K4: "¼"
|
||||
K5: "½"
|
||||
K6: "¬"
|
||||
K7: "{"
|
||||
K8: "["
|
||||
K9: "]"
|
||||
K0: "}"
|
||||
KSYM1: "\\"
|
||||
KSYM2: dead ¸
|
||||
KSYM3: dead "
|
||||
KSYM4: "~"
|
||||
KSYM5: dead ˝
|
||||
KSYM6: dead ^
|
||||
KSYM7: "′"
|
||||
KSYM8: "’"
|
||||
KSYM9: "·"
|
||||
KSYM10: "…"
|
||||
KSYM11: "–"
|
||||
KNO_STANDARD_MEANING_2: "|"
|
||||
|
||||
+shift & +altgr:
|
||||
K1: "¡"
|
||||
K2: "⅛"
|
||||
K3: "£"
|
||||
K4: "¤"
|
||||
K5: "⅜"
|
||||
K6: "⅝"
|
||||
K7: "⅞"
|
||||
K8: "™"
|
||||
K9: "±"
|
||||
K0: "°"
|
||||
KSYM1: "¿"
|
||||
KSYM2: dead ˛
|
||||
KSYM3: dead °
|
||||
KSYM4: "¯"
|
||||
KSYM5: dead ̣
|
||||
KSYM6: dead ˇ
|
||||
KSYM7: "″"
|
||||
KSYM8: dead ˘
|
||||
KSYM9: "×"
|
||||
KSYM10: "÷"
|
||||
KSYM11: "—"
|
||||
KNO_STANDARD_MEANING_2: "¦"
|
||||
|
||||
shift = caps & -altgr:
|
||||
KQ: "q"
|
||||
KW: "w"
|
||||
KE: "e"
|
||||
KR: "r"
|
||||
KT: "t"
|
||||
KY: "z"
|
||||
KU: "u"
|
||||
KI: "i"
|
||||
KO: "o"
|
||||
KP: "p"
|
||||
KA: "a"
|
||||
KS: "s"
|
||||
KD: "d"
|
||||
KF: "f"
|
||||
KG: "g"
|
||||
KH: "h"
|
||||
KJ: "j"
|
||||
KK: "k"
|
||||
KL: "l"
|
||||
KZ: "y"
|
||||
KX: "x"
|
||||
KC: "c"
|
||||
KV: "v"
|
||||
KB: "b"
|
||||
KN: "n"
|
||||
KM: "m"
|
||||
|
||||
shift ^ caps & -altgr:
|
||||
KQ: "Q"
|
||||
KW: "W"
|
||||
KE: "E"
|
||||
KR: "R"
|
||||
KT: "T"
|
||||
KY: "Z"
|
||||
KU: "U"
|
||||
KI: "I"
|
||||
KO: "O"
|
||||
KP: "P"
|
||||
KA: "A"
|
||||
KS: "S"
|
||||
KD: "D"
|
||||
KF: "F"
|
||||
KG: "G"
|
||||
KH: "H"
|
||||
KJ: "J"
|
||||
KK: "K"
|
||||
KL: "L"
|
||||
KZ: "Y"
|
||||
KX: "X"
|
||||
KC: "C"
|
||||
KV: "V"
|
||||
KB: "B"
|
||||
KN: "N"
|
||||
KM: "M"
|
||||
|
||||
-shift & +altgr:
|
||||
KQ: "@"
|
||||
KE: "€"
|
||||
KR: "¶"
|
||||
KY: "←"
|
||||
KU: "↓"
|
||||
KI: "→"
|
||||
KJ: dead ̣
|
||||
KK: "ĸ"
|
||||
KZ: "»"
|
||||
KX: "«"
|
||||
KC: "¢"
|
||||
KV: "„"
|
||||
KB: "“"
|
||||
KN: "”"
|
||||
KM: "µ"
|
||||
|
||||
shift = caps & +altgr:
|
||||
KW: "ł"
|
||||
KT: "ŧ"
|
||||
KO: "ø"
|
||||
KP: "þ"
|
||||
KA: "æ"
|
||||
KD: "ð"
|
||||
KG: "ŋ"
|
||||
KH: "ħ"
|
||||
KL: "ł"
|
||||
|
||||
shift ^ caps & +altgr:
|
||||
KW: "Ł"
|
||||
KT: "Ŧ"
|
||||
KO: "Ø"
|
||||
KP: "Þ"
|
||||
KA: "Æ"
|
||||
KS: "S"
|
||||
KD: "Ð"
|
||||
KG: "Ŋ"
|
||||
KH: "Ħ"
|
||||
KL: "Ł"
|
||||
|
||||
-shift & +altgr & -caps:
|
||||
KS: "ſ"
|
||||
KF: "đ"
|
||||
|
||||
-shift & +altgr & +caps:
|
||||
KS: "S"
|
||||
KF: "Đ"
|
||||
|
||||
+shift & +altgr:
|
||||
KQ: "Ω"
|
||||
KE: "€"
|
||||
KR: "®"
|
||||
KY: "¥"
|
||||
KU: "↑"
|
||||
KI: "ı"
|
||||
KS: "ẞ"
|
||||
KF: "ª"
|
||||
KJ: dead ˙
|
||||
KK: "&"
|
||||
KZ: "›"
|
||||
KX: "‹"
|
||||
KC: "©"
|
||||
KV: "‚"
|
||||
KB: "‘"
|
||||
KN: "’"
|
||||
KM: "º"
|
||||
|
||||
+numlock:
|
||||
KPAD7: "7"
|
||||
KPAD8: "8"
|
||||
KPAD9: "9"
|
||||
KPAD4: "4"
|
||||
KPAD5: "5"
|
||||
KPAD6: "6"
|
||||
KPAD1: "1"
|
||||
KPAD2: "2"
|
||||
KPAD3: "3"
|
||||
KPAD0: "0"
|
|
@ -59,6 +59,25 @@ releasing Sortix x.y, foo." to allow the maintainer to easily
|
|||
.Xr grep 1
|
||||
for it after a release.
|
||||
.Sh CHANGES
|
||||
.Ss Add German keyboard layout.
|
||||
The
|
||||
.Xr kblayout-compiler 1
|
||||
build tool has gained support for modifier combinations used by the German
|
||||
keyboard layout, and the new German keyboard layout relies on this.
|
||||
.Xr kblayout-compiler 1
|
||||
must be upgraded before building the system.
|
||||
.Bd -literal
|
||||
cd /src/kblayout-compiler &&
|
||||
make clean &&
|
||||
make install
|
||||
.Ed
|
||||
.Pp
|
||||
If not developing natively, set
|
||||
.Ev PREFIX
|
||||
to the desired location.
|
||||
.Pp
|
||||
If the new program isn't used, the build will still complete successfully but an
|
||||
incorrect German keyboard layout will be installed.
|
||||
.Ss Seed kernel entropy with randomness from the previous boot
|
||||
Entropy from the previous boot is now stored in
|
||||
.Pa /boot/random.seed .
|
||||
|
|
Loading…
Reference in New Issue