Add Swiss French

This commit is contained in:
Daniel Lorch 2025-05-02 21:19:51 +02:00
parent 341b70ff0a
commit baed361ae6
2 changed files with 15 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import { chars as chars_en_US } from "@/keyboardLayouts/en_US"
import { chars as chars_fr_CH } from "@/keyboardLayouts/fr_CH"
import { chars as chars_de_CH } from "@/keyboardLayouts/de_CH"
type KeyInfo = { key: string | number; shift?: boolean, altRight?: boolean }
@ -6,10 +7,12 @@ export type KeyCombo = KeyInfo & { deadKey?: boolean, accentKey?: KeyInfo }
export const layouts = {
"en_US": "English (US)",
"fr_CH": "Swiss French",
"de_CH": "Swiss German"
} as Record<string, string>;
export const chars = {
"en_US": chars_en_US,
"fr_CH": chars_fr_CH,
"de_CH": chars_de_CH,
} as Record<string, Record <string, KeyCombo>>

View File

@ -0,0 +1,12 @@
import { KeyCombo } from "../keyboardLayouts"
import { chars as chars_de_CH } from "./de_CH"
export const chars = {
...chars_de_CH,
"è": { key: "BracketLeft" },
"ü": { key: "BracketLeft", shift: true },
"é": { key: "Semicolon" },
"ö": { key: "Semicolon", shift: true },
"à": { key: "Quote" },
"ä": { key: "Quote", shift: true },
} as Record<string, KeyCombo>;