Skip to content

Commit 5447e34

Browse files
committed
Add English (UK)
1 parent 33905e6 commit 5447e34

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

ui/src/keyboardLayouts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { chars as chars_en_UK } from "@/keyboardLayouts/en_UK"
12
import { chars as chars_en_US } from "@/keyboardLayouts/en_US"
23
import { chars as chars_fr_FR } from "@/keyboardLayouts/fr_FR"
34
import { chars as chars_de_DE } from "@/keyboardLayouts/de_DE"
@@ -8,6 +9,7 @@ type KeyInfo = { key: string | number; shift?: boolean, altRight?: boolean }
89
export type KeyCombo = KeyInfo & { deadKey?: boolean, accentKey?: KeyInfo }
910

1011
export const layouts = {
12+
"en_UK": "English (UK)",
1113
"en_US": "English (US)",
1214
"fr_FR": "French",
1315
"de_DE": "German",
@@ -16,6 +18,7 @@ export const layouts = {
1618
} as Record<string, string>;
1719

1820
export const chars = {
21+
"en_UK": chars_en_UK,
1922
"en_US": chars_en_US,
2023
"fr_FR": chars_fr_FR,
2124
"de_DE": chars_de_DE,

ui/src/keyboardLayouts/en_UK.ts

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
import { KeyCombo } from "../keyboardLayouts"
2+
3+
export const chars = {
4+
A: { key: "KeyA", shift: true },
5+
B: { key: "KeyB", shift: true },
6+
C: { key: "KeyC", shift: true },
7+
D: { key: "KeyD", shift: true },
8+
E: { key: "KeyE", shift: true },
9+
F: { key: "KeyF", shift: true },
10+
G: { key: "KeyG", shift: true },
11+
H: { key: "KeyH", shift: true },
12+
I: { key: "KeyI", shift: true },
13+
J: { key: "KeyJ", shift: true },
14+
K: { key: "KeyK", shift: true },
15+
L: { key: "KeyL", shift: true },
16+
M: { key: "KeyM", shift: true },
17+
N: { key: "KeyN", shift: true },
18+
O: { key: "KeyO", shift: true },
19+
P: { key: "KeyP", shift: true },
20+
Q: { key: "KeyQ", shift: true },
21+
R: { key: "KeyR", shift: true },
22+
S: { key: "KeyS", shift: true },
23+
T: { key: "KeyT", shift: true },
24+
U: { key: "KeyU", shift: true },
25+
V: { key: "KeyV", shift: true },
26+
W: { key: "KeyW", shift: true },
27+
X: { key: "KeyX", shift: true },
28+
Y: { key: "KeyY", shift: true },
29+
Z: { key: "KeyZ", shift: true },
30+
a: { key: "KeyA" },
31+
b: { key: "KeyB" },
32+
c: { key: "KeyC" },
33+
d: { key: "KeyD" },
34+
e: { key: "KeyE" },
35+
f: { key: "KeyF" },
36+
g: { key: "KeyG" },
37+
h: { key: "KeyH" },
38+
i: { key: "KeyI" },
39+
j: { key: "KeyJ" },
40+
k: { key: "KeyK" },
41+
l: { key: "KeyL" },
42+
m: { key: "KeyM" },
43+
n: { key: "KeyN" },
44+
o: { key: "KeyO" },
45+
p: { key: "KeyP" },
46+
q: { key: "KeyQ" },
47+
r: { key: "KeyR" },
48+
s: { key: "KeyS" },
49+
t: { key: "KeyT" },
50+
u: { key: "KeyU" },
51+
v: { key: "KeyV" },
52+
w: { key: "KeyW" },
53+
x: { key: "KeyX" },
54+
y: { key: "KeyY" },
55+
z: { key: "KeyZ" },
56+
1: { key: "Digit1" },
57+
"!": { key: "Digit1", shift: true },
58+
2: { key: "Digit2" },
59+
"\"": { key: "Digit2", shift: true },
60+
3: { key: "Digit3" },
61+
"£": { key: "Digit3", shift: true },
62+
4: { key: "Digit4" },
63+
$: { key: "Digit4", shift: true },
64+
"€": { key: "Digit4", altRight: true },
65+
5: { key: "Digit5" },
66+
"%": { key: "Digit5", shift: true },
67+
6: { key: "Digit6" },
68+
"^": { key: "Digit6", shift: true },
69+
7: { key: "Digit7" },
70+
"&": { key: "Digit7", shift: true },
71+
8: { key: "Digit8" },
72+
"*": { key: "Digit8", shift: true },
73+
9: { key: "Digit9" },
74+
"(": { key: "Digit9", shift: true },
75+
0: { key: "Digit0" },
76+
")": { key: "Digit0", shift: true },
77+
"-": { key: "Minus" },
78+
_: { key: "Minus", shift: true },
79+
"=": { key: "Equal" },
80+
"+": { key: "Equal", shift: true },
81+
"'": { key: "Quote" },
82+
'@': { key: "Quote", shift: true },
83+
",": { key: "Comma" },
84+
"<": { key: "Comma", shift: true },
85+
"/": { key: "Slash" },
86+
"?": { key: "Slash", shift: true },
87+
".": { key: "Period" },
88+
">": { key: "Period", shift: true },
89+
";": { key: "Semicolon" },
90+
":": { key: "Semicolon", shift: true },
91+
"[": { key: "BracketLeft" },
92+
"{": { key: "BracketLeft", shift: true },
93+
"]": { key: "BracketRight" },
94+
"}": { key: "BracketRight", shift: true },
95+
"#": { key: "Backslash" },
96+
"~": { key: "Backslash", shift: true },
97+
"`": { key: "Backquote" },
98+
"¬": { key: "Backquote", shift: true },
99+
"\\": { key: "IntlBackslash" },
100+
"|": { key: "IntlBackslash", shift: true },
101+
" ": { key: "Space" },
102+
"\n": { key: "Enter" },
103+
Enter: { key: "Enter" },
104+
Tab: { key: "Tab" },
105+
} as Record<string, KeyCombo>

0 commit comments

Comments
 (0)