Skip to content

Commit 9bbe618

Browse files
committed
Add sl_SI (Slovenian) keyboard layout
1 parent 32dd326 commit 9bbe618

File tree

2 files changed

+159
-1
lines changed

2 files changed

+159
-1
lines changed

ui/src/keyboardLayouts.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ import { it_IT } from "@/keyboardLayouts/it_IT"
2828
import { nb_NO } from "@/keyboardLayouts/nb_NO"
2929
import { sv_SE } from "@/keyboardLayouts/sv_SE"
3030
import { da_DK } from "@/keyboardLayouts/da_DK"
31+
import { sl_SI } from "@/keyboardLayouts/sl_SI"
3132

32-
export const keyboards: KeyboardLayout[] = [cs_CZ, de_CH, de_DE, en_UK, en_US, es_ES, fr_BE, fr_CH, fr_FR, it_IT, nb_NO, sv_SE, da_DK];
33+
export const keyboards: KeyboardLayout[] = [cs_CZ, de_CH, de_DE, en_UK, en_US, es_ES, fr_BE, fr_CH, fr_FR, it_IT, nb_NO, sv_SE, da_DK, sl_SI];

ui/src/keyboardLayouts/sl_SI.ts

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
import { KeyboardLayout, KeyCombo } from "../keyboardLayouts"
2+
3+
import { en_US } from "./en_US" // for fallback of keyDisplayMap, modifierDisplayMap, and virtualKeyboard
4+
5+
const name = "Slovenian";
6+
const isoCode = "sl-SI";
7+
8+
export const chars = {
9+
A: { key: "KeyA", shift: true },
10+
B: { key: "KeyB", shift: true },
11+
C: { key: "KeyC", shift: true },
12+
"Č": { key: "Semicolon", shift: true },
13+
"Ć": { key: "Quote", shift: true },
14+
D: { key: "KeyD", shift: true },
15+
"Đ": { key: "BracketRight", shift: true },
16+
E: { key: "KeyE", shift: true },
17+
F: { key: "KeyF", shift: true },
18+
G: { key: "KeyG", shift: true },
19+
H: { key: "KeyH", shift: true },
20+
I: { key: "KeyI", shift: true },
21+
J: { key: "KeyJ", shift: true },
22+
K: { key: "KeyK", shift: true },
23+
L: { key: "KeyL", shift: true },
24+
M: { key: "KeyM", shift: true },
25+
N: { key: "KeyN", shift: true },
26+
O: { key: "KeyO", shift: true },
27+
P: { key: "KeyP", shift: true },
28+
Q: { key: "KeyQ", shift: true },
29+
R: { key: "KeyR", shift: true },
30+
S: { key: "KeyS", shift: true },
31+
"Š": { key: "BracketLeft", shift: true },
32+
T: { key: "KeyT", shift: true },
33+
U: { key: "KeyU", shift: true },
34+
V: { key: "KeyV", shift: true },
35+
W: { key: "KeyW", shift: true },
36+
X: { key: "KeyX", shift: true },
37+
Y: { key: "KeyZ", shift: true },
38+
Z: { key: "KeyY", shift: true },
39+
"Ž": { key: "Backslash", shift: true },
40+
a: { key: "KeyA" },
41+
b: { key: "KeyB" },
42+
c: { key: "KeyC" },
43+
"č": { key: "Semicolon"},
44+
"ć": { key: "Quote"},
45+
d: { key: "KeyD" },
46+
"đ": { key: "BracketRight"},
47+
e: { key: "KeyE" },
48+
f: { key: "KeyF" },
49+
g: { key: "KeyG" },
50+
h: { key: "KeyH" },
51+
i: { key: "KeyI" },
52+
j: { key: "KeyJ" },
53+
k: { key: "KeyK" },
54+
l: { key: "KeyL" },
55+
m: { key: "KeyM" },
56+
n: { key: "KeyN" },
57+
o: { key: "KeyO" },
58+
p: { key: "KeyP" },
59+
q: { key: "KeyQ" },
60+
r: { key: "KeyR" },
61+
s: { key: "KeyS" },
62+
"š": { key: "BracketLeft"},
63+
t: { key: "KeyT" },
64+
u: { key: "KeyU" },
65+
v: { key: "KeyV" },
66+
w: { key: "KeyW" },
67+
x: { key: "KeyX" },
68+
y: { key: "KeyZ" },
69+
z: { key: "KeyY" },
70+
"ž": { key: "Backslash"},
71+
1: { key: "Digit1" },
72+
"!": { key: "Digit1", shift: true },
73+
2: { key: "Digit2" },
74+
"\"": { key: "Digit2", shift: true },
75+
3: { key: "Digit3" },
76+
"#": { key: "Digit3", shift: true },
77+
4: { key: "Digit4" },
78+
"$": { key: "Digit4", shift: true },
79+
5: { key: "Digit5" },
80+
"%": { key: "Digit5", shift: true },
81+
6: { key: "Digit6" },
82+
"&": { key: "Digit6", shift: true },
83+
7: { key: "Digit7" },
84+
"/": { key: "Digit7", shift: true },
85+
8: { key: "Digit8" },
86+
"(": { key: "Digit8", shift: true },
87+
9: { key: "Digit9" },
88+
")": { key: "Digit9", shift: true },
89+
0: { key: "Digit0" },
90+
"=": { key: "Digit0", shift: true },
91+
"'": { key: "Minus" },
92+
"?": { key: "Minus", shift: true },
93+
"+": { key: "Equal" },
94+
"*": { key: "Equal", shift: true },
95+
96+
"<": { key: "IntlBackslash" },
97+
">": { key: "IntlBackslash", shift: true },
98+
",": { key: "Comma" },
99+
";": { key: "Comma", shift: true },
100+
".": { key: "Period" },
101+
":": { key: "Period", shift: true },
102+
"-": { key: "Slash" },
103+
"_": { key: "Slash", shift: true },
104+
105+
"~": { key: "Digit1", shift: true },
106+
"ˇ": { key: "Digit2", shift: true },
107+
"^": { key: "Digit3", shift: true },
108+
"˘": { key: "Digit4", shift: true },
109+
"°": { key: "Digit5", shift: true },
110+
"˛": { key: "Digit6", shift: true },
111+
"`": { key: "Digit7", shift: true },
112+
"˙": { key: "Digit8", shift: true },
113+
"´": { key: "Digit9", shift: true },
114+
"˝": { key: "Digit0", shift: true },
115+
"¨": { key: "Minus", shift: true },
116+
"¸": { key: "Equal", shift: true },
117+
"\\": { key: "KeyQ", AltGr: true },
118+
"|": { key: "KeyW", AltGr: true },
119+
"€": { key: "KeyE", AltGr: true },
120+
"÷": { key: "BracketLeft", AltGr: true },
121+
"×": { key: "BracketRight", AltGr: true },
122+
"[": { key: "KeyF", AltGr: true },
123+
"]": { key: "KeyG", AltGr: true },
124+
"ł": { key: "KeyK", AltGr: true },
125+
"Ł": { key: "KeyL", AltGr: true },
126+
"ß": { key: "Quote", AltGr: true },
127+
"¤": { key: "Backslash", AltGr: true },
128+
"@": { key: "KeyV", AltGr: true },
129+
"{": { key: "KeyB", AltGr: true },
130+
"}": { key: "KeyN", AltGr: true },
131+
"§": { key: "KeyM", AltGr: true },
132+
// "<": { key: "Comma", AltGr: true },
133+
// ">": { key: "Period", AltGr: true },
134+
135+
" ": { key: "Space" },
136+
"\n": { key: "Enter" },
137+
Enter: { key: "Enter" },
138+
Escape: { key: "Escape" },
139+
Tab: { key: "Tab" },
140+
PrintScreen: { key: "Prt Sc" },
141+
SystemRequest: { key: "Prt Sc", shift: true },
142+
ScrollLock: { key: "ScrollLock" },
143+
Pause: { key: "Pause" },
144+
Break: { key: "Pause", shift: true },
145+
Insert: { key: "Insert" },
146+
Delete: { key: "Delete" },
147+
} as Record<string, KeyCombo>
148+
149+
export const sl_SI: KeyboardLayout = {
150+
isoCode: isoCode,
151+
name: name,
152+
chars: chars,
153+
// TODO need to localize these maps and layouts
154+
keyDisplayMap: en_US.keyDisplayMap,
155+
modifierDisplayMap: en_US.modifierDisplayMap,
156+
virtualKeyboard: en_US.virtualKeyboard
157+
};

0 commit comments

Comments
 (0)