Skip to content

Commit 33905e6

Browse files
committed
Add French (France)
1 parent a364a06 commit 33905e6

File tree

2 files changed

+140
-0
lines changed

2 files changed

+140
-0
lines changed

ui/src/keyboardLayouts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { chars as chars_en_US } from "@/keyboardLayouts/en_US"
2+
import { chars as chars_fr_FR } from "@/keyboardLayouts/fr_FR"
23
import { chars as chars_de_DE } from "@/keyboardLayouts/de_DE"
34
import { chars as chars_fr_CH } from "@/keyboardLayouts/fr_CH"
45
import { chars as chars_de_CH } from "@/keyboardLayouts/de_CH"
@@ -8,13 +9,15 @@ export type KeyCombo = KeyInfo & { deadKey?: boolean, accentKey?: KeyInfo }
89

910
export const layouts = {
1011
"en_US": "English (US)",
12+
"fr_FR": "French",
1113
"de_DE": "German",
1214
"fr_CH": "Swiss French",
1315
"de_CH": "Swiss German"
1416
} as Record<string, string>;
1517

1618
export const chars = {
1719
"en_US": chars_en_US,
20+
"fr_FR": chars_fr_FR,
1821
"de_DE": chars_de_DE,
1922
"fr_CH": chars_fr_CH,
2023
"de_CH": chars_de_CH,

ui/src/keyboardLayouts/fr_FR.ts

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

0 commit comments

Comments
 (0)