Skip to content

Commit 7c2b91a

Browse files
committed
Add Norwegian
1 parent 435746f commit 7c2b91a

File tree

2 files changed

+168
-0
lines changed

2 files changed

+168
-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_nb_NO } from "@/keyboardLayouts/nb_NO"
56
import { chars as chars_es_ES } from "@/keyboardLayouts/es_ES"
67
import { chars as chars_sv_SE } from "@/keyboardLayouts/sv_SE"
78
import { chars as chars_fr_CH } from "@/keyboardLayouts/fr_CH"
@@ -15,6 +16,7 @@ export const layouts = {
1516
"en_US": "English (US)",
1617
"fr_FR": "French",
1718
"de_DE": "German",
19+
"nb_NO": "Norwegian",
1820
"es_ES": "Spanish",
1921
"sv_SE": "Swedish",
2022
"fr_CH": "Swiss French",
@@ -26,6 +28,7 @@ export const chars = {
2628
"en_US": chars_en_US,
2729
"fr_FR": chars_fr_FR,
2830
"de_DE": chars_de_DE,
31+
"nb_NO": chars_nb_NO,
2932
"es_ES": chars_es_ES,
3033
"sv_SE": chars_sv_SE,
3134
"fr_CH": chars_fr_CH,

ui/src/keyboardLayouts/nb_NO.ts

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

0 commit comments

Comments
 (0)