From 14173da650e15fa7227a3d6c13d504a88bb39972 Mon Sep 17 00:00:00 2001 From: bzgec Date: Fri, 12 Dec 2025 13:00:55 +0100 Subject: [PATCH 1/2] Add sl_SI (Slovenian) keyboard layout --- ui/src/keyboardLayouts.ts | 2 + ui/src/keyboardLayouts/sl_SI.ts | 157 ++++++++++++++++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 ui/src/keyboardLayouts/sl_SI.ts diff --git a/ui/src/keyboardLayouts.ts b/ui/src/keyboardLayouts.ts index 8f67faf6e..e2f2fe5ab 100644 --- a/ui/src/keyboardLayouts.ts +++ b/ui/src/keyboardLayouts.ts @@ -39,6 +39,7 @@ import { nb_NO } from "@/keyboardLayouts/nb_NO"; import { sv_SE } from "@/keyboardLayouts/sv_SE"; import { da_DK } from "@/keyboardLayouts/da_DK"; import { ja_JP } from "@/keyboardLayouts/ja_JP"; +import { sl_SI } from "@/keyboardLayouts/sl_SI" export const keyboards: KeyboardLayout[] = [ cs_CZ, @@ -55,4 +56,5 @@ export const keyboards: KeyboardLayout[] = [ sv_SE, da_DK, ja_JP, + sl_SI, ]; diff --git a/ui/src/keyboardLayouts/sl_SI.ts b/ui/src/keyboardLayouts/sl_SI.ts new file mode 100644 index 000000000..78f700c7c --- /dev/null +++ b/ui/src/keyboardLayouts/sl_SI.ts @@ -0,0 +1,157 @@ +import { KeyboardLayout, KeyCombo } from "../keyboardLayouts" + +import { en_US } from "./en_US" // for fallback of keyDisplayMap, modifierDisplayMap, and virtualKeyboard + +const name = "Slovenian"; +const isoCode = "sl-SI"; + +export const chars = { + A: { key: "KeyA", shift: true }, + B: { key: "KeyB", shift: true }, + C: { key: "KeyC", shift: true }, + "Č": { key: "Semicolon", shift: true }, + "Ć": { key: "Quote", shift: true }, + D: { key: "KeyD", shift: true }, + "Đ": { key: "BracketRight", shift: true }, + E: { key: "KeyE", shift: true }, + F: { key: "KeyF", shift: true }, + G: { key: "KeyG", shift: true }, + H: { key: "KeyH", shift: true }, + I: { key: "KeyI", shift: true }, + J: { key: "KeyJ", shift: true }, + K: { key: "KeyK", shift: true }, + L: { key: "KeyL", shift: true }, + M: { key: "KeyM", shift: true }, + N: { key: "KeyN", shift: true }, + O: { key: "KeyO", shift: true }, + P: { key: "KeyP", shift: true }, + Q: { key: "KeyQ", shift: true }, + R: { key: "KeyR", shift: true }, + S: { key: "KeyS", shift: true }, + "Š": { key: "BracketLeft", shift: true }, + T: { key: "KeyT", shift: true }, + U: { key: "KeyU", shift: true }, + V: { key: "KeyV", shift: true }, + W: { key: "KeyW", shift: true }, + X: { key: "KeyX", shift: true }, + Y: { key: "KeyZ", shift: true }, + Z: { key: "KeyY", shift: true }, + "Ž": { key: "Backslash", shift: true }, + a: { key: "KeyA" }, + b: { key: "KeyB" }, + c: { key: "KeyC" }, + "č": { key: "Semicolon"}, + "ć": { key: "Quote"}, + d: { key: "KeyD" }, + "đ": { key: "BracketRight"}, + e: { key: "KeyE" }, + f: { key: "KeyF" }, + g: { key: "KeyG" }, + h: { key: "KeyH" }, + i: { key: "KeyI" }, + j: { key: "KeyJ" }, + k: { key: "KeyK" }, + l: { key: "KeyL" }, + m: { key: "KeyM" }, + n: { key: "KeyN" }, + o: { key: "KeyO" }, + p: { key: "KeyP" }, + q: { key: "KeyQ" }, + r: { key: "KeyR" }, + s: { key: "KeyS" }, + "š": { key: "BracketLeft"}, + t: { key: "KeyT" }, + u: { key: "KeyU" }, + v: { key: "KeyV" }, + w: { key: "KeyW" }, + x: { key: "KeyX" }, + y: { key: "KeyZ" }, + z: { key: "KeyY" }, + "ž": { key: "Backslash"}, + 1: { key: "Digit1" }, + "!": { key: "Digit1", shift: true }, + 2: { key: "Digit2" }, + "\"": { key: "Digit2", shift: true }, + 3: { key: "Digit3" }, + "#": { key: "Digit3", shift: true }, + 4: { key: "Digit4" }, + "$": { key: "Digit4", shift: true }, + 5: { key: "Digit5" }, + "%": { key: "Digit5", shift: true }, + 6: { key: "Digit6" }, + "&": { key: "Digit6", shift: true }, + 7: { key: "Digit7" }, + "/": { key: "Digit7", shift: true }, + 8: { key: "Digit8" }, + "(": { key: "Digit8", shift: true }, + 9: { key: "Digit9" }, + ")": { key: "Digit9", shift: true }, + 0: { key: "Digit0" }, + "=": { key: "Digit0", shift: true }, + "'": { key: "Minus" }, + "?": { key: "Minus", shift: true }, + "+": { key: "Equal" }, + "*": { key: "Equal", shift: true }, + + "<": { key: "IntlBackslash" }, + ">": { key: "IntlBackslash", shift: true }, + ",": { key: "Comma" }, + ";": { key: "Comma", shift: true }, + ".": { key: "Period" }, + ":": { key: "Period", shift: true }, + "-": { key: "Slash" }, + "_": { key: "Slash", shift: true }, + + "~": { key: "Digit1", shift: true }, + "ˇ": { key: "Digit2", shift: true }, + "^": { key: "Digit3", shift: true }, + "˘": { key: "Digit4", shift: true }, + "°": { key: "Digit5", shift: true }, + "˛": { key: "Digit6", shift: true }, + "`": { key: "Digit7", shift: true }, + "˙": { key: "Digit8", shift: true }, + "´": { key: "Digit9", shift: true }, + "˝": { key: "Digit0", shift: true }, + "¨": { key: "Minus", shift: true }, + "¸": { key: "Equal", shift: true }, + "\\": { key: "KeyQ", AltGr: true }, + "|": { key: "KeyW", AltGr: true }, + "€": { key: "KeyE", AltGr: true }, + "÷": { key: "BracketLeft", AltGr: true }, + "×": { key: "BracketRight", AltGr: true }, + "[": { key: "KeyF", AltGr: true }, + "]": { key: "KeyG", AltGr: true }, + "ł": { key: "KeyK", AltGr: true }, + "Ł": { key: "KeyL", AltGr: true }, + "ß": { key: "Quote", AltGr: true }, + "¤": { key: "Backslash", AltGr: true }, + "@": { key: "KeyV", AltGr: true }, + "{": { key: "KeyB", AltGr: true }, + "}": { key: "KeyN", AltGr: true }, + "§": { key: "KeyM", AltGr: true }, + // "<": { key: "Comma", AltGr: true }, + // ">": { key: "Period", AltGr: true }, + + " ": { key: "Space" }, + "\n": { key: "Enter" }, + Enter: { key: "Enter" }, + Escape: { key: "Escape" }, + Tab: { key: "Tab" }, + PrintScreen: { key: "Prt Sc" }, + SystemRequest: { key: "Prt Sc", shift: true }, + ScrollLock: { key: "ScrollLock" }, + Pause: { key: "Pause" }, + Break: { key: "Pause", shift: true }, + Insert: { key: "Insert" }, + Delete: { key: "Delete" }, +} as Record + +export const sl_SI: KeyboardLayout = { + isoCode: isoCode, + name: name, + chars: chars, + // TODO need to localize these maps and layouts + keyDisplayMap: en_US.keyDisplayMap, + modifierDisplayMap: en_US.modifierDisplayMap, + virtualKeyboard: en_US.virtualKeyboard +}; From ba47d9a4c7701cc210cf6fbaf159570facd16410 Mon Sep 17 00:00:00 2001 From: bzgec Date: Tue, 16 Dec 2025 20:58:28 +0100 Subject: [PATCH 2/2] Comment about "<" and ">" (can be typed in two different locations) --- ui/src/keyboardLayouts/sl_SI.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/keyboardLayouts/sl_SI.ts b/ui/src/keyboardLayouts/sl_SI.ts index 78f700c7c..98bda3aef 100644 --- a/ui/src/keyboardLayouts/sl_SI.ts +++ b/ui/src/keyboardLayouts/sl_SI.ts @@ -129,8 +129,8 @@ export const chars = { "{": { key: "KeyB", AltGr: true }, "}": { key: "KeyN", AltGr: true }, "§": { key: "KeyM", AltGr: true }, - // "<": { key: "Comma", AltGr: true }, - // ">": { key: "Period", AltGr: true }, + // "<": { key: "Comma", AltGr: true }, // Can be typed in two different locations (`IntlBackslash`) + // ">": { key: "Period", AltGr: true }, // Can be typed in two different locations (`IntlBackslash+Shift`) " ": { key: "Space" }, "\n": { key: "Enter" },