Skip to content

Commit 9848543

Browse files
committed
Add Swedish
1 parent 5447e34 commit 9848543

File tree

2 files changed

+165
-0
lines changed

2 files changed

+165
-0
lines changed

ui/src/keyboardLayouts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { chars as chars_en_UK } from "@/keyboardLayouts/en_UK"
22
import { chars as chars_en_US } from "@/keyboardLayouts/en_US"
33
import { chars as chars_fr_FR } from "@/keyboardLayouts/fr_FR"
44
import { chars as chars_de_DE } from "@/keyboardLayouts/de_DE"
5+
import { chars as chars_sv_SE } from "@/keyboardLayouts/sv_SE"
56
import { chars as chars_fr_CH } from "@/keyboardLayouts/fr_CH"
67
import { chars as chars_de_CH } from "@/keyboardLayouts/de_CH"
78

@@ -13,6 +14,7 @@ export const layouts = {
1314
"en_US": "English (US)",
1415
"fr_FR": "French",
1516
"de_DE": "German",
17+
"sv_SE": "Swedish",
1618
"fr_CH": "Swiss French",
1719
"de_CH": "Swiss German"
1820
} as Record<string, string>;
@@ -22,6 +24,7 @@ export const chars = {
2224
"en_US": chars_en_US,
2325
"fr_FR": chars_fr_FR,
2426
"de_DE": chars_de_DE,
27+
"sv_SE": chars_sv_SE,
2528
"fr_CH": chars_fr_CH,
2629
"de_CH": chars_de_CH,
2730
} as Record<string, Record <string, KeyCombo>>

ui/src/keyboardLayouts/sv_SE.ts

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
import { KeyCombo } from "../keyboardLayouts"
2+
3+
const keyTrema = { key: "BracketRight" } // tréma (umlaut), two dots placed above a vowel
4+
const keyAcute = { key: "Equal" } // accent aigu (acute accent), mark ´ placed above the letter
5+
const keyHat = { key: "BracketRight", shift: true } // accent circonflexe (accent hat), mark ^ placed above the letter
6+
const keyGrave = { key: "Equal", shift: true } // accent grave, mark ` placed above the letter
7+
const keyTilde = { key: "BracketRight", altRight: true } // tilde, mark ~ placed above the letter
8+
9+
export const chars = {
10+
A: { key: "KeyA", shift: true },
11+
"Á": { key: "KeyA", shift: true, accentKey: keyAcute },
12+
"Â": { key: "KeyA", shift: true, accentKey: keyHat },
13+
"À": { key: "KeyA", shift: true, accentKey: keyGrave },
14+
"Ã": { key: "KeyA", shift: true, accentKey: keyTilde },
15+
B: { key: "KeyB", shift: true },
16+
C: { key: "KeyC", shift: true },
17+
D: { key: "KeyD", shift: true },
18+
E: { key: "KeyE", shift: true },
19+
"Ë": { key: "KeyE", shift: true, accentKey: keyTrema },
20+
"É": { key: "KeyE", shift: true, accentKey: keyAcute },
21+
"Ê": { key: "KeyE", shift: true, accentKey: keyHat },
22+
"È": { key: "KeyE", shift: true, accentKey: keyGrave },
23+
"Ẽ": { key: "KeyE", shift: true, accentKey: keyTilde },
24+
F: { key: "KeyF", shift: true },
25+
G: { key: "KeyG", shift: true },
26+
H: { key: "KeyH", shift: true },
27+
I: { key: "KeyI", shift: true },
28+
"Ï": { key: "KeyI", shift: true, accentKey: keyTrema },
29+
"Í": { key: "KeyI", shift: true, accentKey: keyAcute },
30+
"Î": { key: "KeyI", shift: true, accentKey: keyHat },
31+
"Ì": { key: "KeyI", shift: true, accentKey: keyGrave },
32+
"Ĩ": { key: "KeyI", shift: true, accentKey: keyTilde },
33+
J: { key: "KeyJ", shift: true },
34+
K: { key: "KeyK", shift: true },
35+
L: { key: "KeyL", shift: true },
36+
M: { key: "KeyM", shift: true },
37+
N: { key: "KeyN", shift: true },
38+
O: { key: "KeyO", shift: true },
39+
"Ó": { key: "KeyO", shift: true, accentKey: keyAcute },
40+
"Ô": { key: "KeyO", shift: true, accentKey: keyHat },
41+
"Ò": { key: "KeyO", shift: true, accentKey: keyGrave },
42+
"Õ": { key: "KeyO", shift: true, accentKey: keyTilde },
43+
P: { key: "KeyP", shift: true },
44+
Q: { key: "KeyQ", shift: true },
45+
R: { key: "KeyR", shift: true },
46+
S: { key: "KeyS", shift: true },
47+
T: { key: "KeyT", shift: true },
48+
U: { key: "KeyU", shift: true },
49+
"Ü": { key: "KeyU", shift: true, accentKey: keyTrema },
50+
"Ú": { key: "KeyU", shift: true, accentKey: keyAcute },
51+
"Û": { key: "KeyU", shift: true, accentKey: keyHat },
52+
"Ù": { key: "KeyU", shift: true, accentKey: keyGrave },
53+
"Ũ": { key: "KeyU", shift: true, accentKey: keyTilde },
54+
V: { key: "KeyV", shift: true },
55+
W: { key: "KeyW", shift: true },
56+
X: { key: "KeyX", shift: true },
57+
Y: { key: "KeyZ", shift: true },
58+
Z: { key: "KeyY", shift: true },
59+
a: { key: "KeyA" },
60+
"á": { key: "KeyA", accentKey: keyAcute },
61+
"â": { key: "KeyA", accentKey: keyHat },
62+
"à": { key: "KeyA", accentKey: keyGrave },
63+
"ã": { key: "KeyA", accentKey: keyTilde },
64+
b: { key: "KeyB" },
65+
c: { key: "KeyC" },
66+
d: { key: "KeyD" },
67+
e: { key: "KeyE" },
68+
"ë": { key: "KeyE", accentKey: keyTrema },
69+
"é": { key: "KeyE", accentKey: keyAcute },
70+
"ê": { key: "KeyE", accentKey: keyHat },
71+
"è": { key: "KeyE", accentKey: keyGrave },
72+
"ẽ": { key: "KeyE", accentKey: keyTilde },
73+
"€": { key: "KeyE", altRight: true },
74+
f: { key: "KeyF" },
75+
g: { key: "KeyG" },
76+
h: { key: "KeyH" },
77+
i: { key: "KeyI" },
78+
"ï": { key: "KeyI", accentKey: keyTrema },
79+
"í": { key: "KeyI", accentKey: keyAcute },
80+
"î": { key: "KeyI", accentKey: keyHat },
81+
"ì": { key: "KeyI", accentKey: keyGrave },
82+
"ĩ": { key: "KeyI", accentKey: keyTilde },
83+
j: { key: "KeyJ" },
84+
k: { key: "KeyK" },
85+
l: { key: "KeyL" },
86+
m: { key: "KeyM" },
87+
n: { key: "KeyN" },
88+
o: { key: "KeyO" },
89+
"ó": { key: "KeyO", accentKey: keyAcute },
90+
"ô": { key: "KeyO", accentKey: keyHat },
91+
"ò": { key: "KeyO", accentKey: keyGrave },
92+
"õ": { key: "KeyO", accentKey: keyTilde },
93+
p: { key: "KeyP" },
94+
q: { key: "KeyQ" },
95+
r: { key: "KeyR" },
96+
s: { key: "KeyS" },
97+
t: { key: "KeyT" },
98+
u: { key: "KeyU" },
99+
"ü": { key: "KeyU", accentKey: keyTrema },
100+
"ú": { key: "KeyU", accentKey: keyAcute },
101+
"û": { key: "KeyU", accentKey: keyHat },
102+
"ù": { key: "KeyU", accentKey: keyGrave },
103+
"ũ": { key: "KeyU", accentKey: keyTilde },
104+
v: { key: "KeyV" },
105+
w: { key: "KeyW" },
106+
x: { key: "KeyX" },
107+
y: { key: "KeyZ" },
108+
z: { key: "KeyY" },
109+
"§": { key: "Backquote" },
110+
"½": { key: "Backquote", shift: true },
111+
1: { key: "Digit1" },
112+
"!": { key: "Digit1", shift: true },
113+
2: { key: "Digit2" },
114+
"\"": { key: "Digit2", shift: true },
115+
"@": { key: "Digit2", altRight: true },
116+
3: { key: "Digit3" },
117+
"#": { key: "Digit3", shift: true },
118+
"£": { key: "Digit3", altRight: true },
119+
4: { key: "Digit4" },
120+
"¤": { key: "Digit4", shift: true },
121+
"$": { key: "Digit4", altRight: true },
122+
5: { key: "Digit5" },
123+
"%": { key: "Digit5", shift: true },
124+
6: { key: "Digit6" },
125+
"&": { key: "Digit6", shift: true },
126+
7: { key: "Digit7" },
127+
"/": { key: "Digit7", shift: true },
128+
"{": { key: "Digit7", altRight: true },
129+
8: { key: "Digit8" },
130+
"(": { key: "Digit8", shift: true },
131+
"[": { key: "Digit8", altRight: true },
132+
9: { key: "Digit9" },
133+
")": { key: "Digit9", shift: true },
134+
"]": { key: "Digit9", altRight: true },
135+
0: { key: "Digit0" },
136+
"=": { key: "Digit0", shift: true },
137+
"}": { key: "Digit0", altRight: true },
138+
"+": { key: "Minus" },
139+
"?": { key: "Minus", shift: true },
140+
"\\": { key: "Minus", altRight: true },
141+
"å": { key: "BracketLeft" },
142+
"Å": { key: "BracketLeft", shift: true },
143+
"ö": { key: "Semicolon" },
144+
"Ö": { key: "Semicolon", shift: true },
145+
"ä": { key: "Quote" },
146+
"Ä": { key: "Quote", shift: true },
147+
"'": { key: "Backslash" },
148+
"*": { key: "Backslash", shift: true },
149+
",": { key: "Comma" },
150+
";": { key: "Comma", shift: true },
151+
".": { key: "Period" },
152+
":": { key: "Period", shift: true },
153+
"-": { key: "Slash" },
154+
"_": { key: "Slash", shift: true },
155+
"<": { key: "IntlBackslash" },
156+
">": { key: "IntlBackslash", shift: true },
157+
"|": { key: "IntlBackslash", altRight: true },
158+
" ": { key: "Space" },
159+
"\n": { key: "Enter" },
160+
Enter: { key: "Enter" },
161+
Tab: { key: "Tab" },
162+
} as Record<string, KeyCombo>;

0 commit comments

Comments
 (0)