Skip to content

Commit

Permalink
feat: add the Lithuanian keyboard layout
Browse files Browse the repository at this point in the history
  • Loading branch information
aradzie committed Nov 29, 2024
1 parent 377da41 commit 97ee9f1
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/keybr-generators/lib/generate-layouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ for (const [id, layout] of [
["hu_hu", importCldr("cldr-keyboards-43.0/keyboards/windows/hu-t-k0-windows.xml")],
["it_it", importCldr("cldr-keyboards-43.0/keyboards/windows/it-t-k0-windows.xml")],
["ja_jp_jis", importKeymap("layouts/ja_jp_jis.json")],
["lt_lt", importCldr("cldr-keyboards-43.0/keyboards/windows/lt-t-k0-windows-lt1582.xml")],
["nb_kvikk", importKeymap("layouts/nb_kvikk.json")],
["nb_no", importCldr("cldr-keyboards-43.0/keyboards/windows/nb-t-k0-windows.xml")],
["nb_skarp", importKeymap("layouts/nb_skarp.json")],
Expand Down
17 changes: 17 additions & 0 deletions packages/keybr-keyboard/lib/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,21 @@ export class Layout implements XEnumItem {
Geometry.MATRIX,
),
);
static readonly LT_LT = new Layout(
/* id= */ "lt-lt",
/* xid= */ 0x48,
/* name= */ "{LT}",
/* family= */ "lt-lt",
/* language= */ Language.LT,
/* emulate= */ true,
/* geometries= */ new Enum(
Geometry.ISO_102,
Geometry.ISO_102_FULL,
Geometry.ANSI_101,
Geometry.ANSI_101_FULL,
Geometry.MATRIX,
),
);
static readonly ES_ES = new Layout(
/* id= */ "es-es",
/* xid= */ 0x50,
Expand Down Expand Up @@ -1040,6 +1055,7 @@ export class Layout implements XEnumItem {
/* emulate= */ true,
/* geometries= */ new Enum(Geometry.MATRIX),
);

static readonly ALL = new XEnum<Layout>(
Layout.EN_US,
Layout.EN_DVORAK,
Expand Down Expand Up @@ -1086,6 +1102,7 @@ export class Layout implements XEnumItem {
Layout.HE_IL_ARKN,
Layout.HU_HU,
Layout.IT_IT,
Layout.LT_LT,
Layout.NB_NO,
Layout.NB_KVIKK,
Layout.NB_SKARP,
Expand Down
56 changes: 56 additions & 0 deletions packages/keybr-keyboard/lib/layout/lt_lt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Generated file, do not edit.

import { type CharacterDict } from "../types.ts";

// prettier-ignore
export const LAYOUT_LT_LT: CharacterDict = {
Backquote: [/* GRAVE ACCENT */ 0x0060, /* TILDE */ 0x007e, /* ACUTE ACCENT */ 0x00b4],
Digit1: [/* EXCLAMATION MARK */ 0x0021, /* DIGIT ONE */ 0x0031, /* COMMERCIAL AT */ 0x0040],
Digit2: [/* HYPHEN-MINUS */ 0x002d, /* DIGIT TWO */ 0x0032, /* LOW LINE */ 0x005f],
Digit3: [/* SOLIDUS */ 0x002f, /* DIGIT THREE */ 0x0033, /* NUMBER SIGN */ 0x0023],
Digit4: [/* SEMICOLON */ 0x003b, /* DIGIT FOUR */ 0x0034, /* DOLLAR SIGN */ 0x0024],
Digit5: [/* COLON */ 0x003a, /* DIGIT FIVE */ 0x0035, /* SECTION SIGN */ 0x00a7],
Digit6: [/* COMMA */ 0x002c, /* DIGIT SIX */ 0x0036, /* CIRCUMFLEX ACCENT */ 0x005e],
Digit7: [/* FULL STOP */ 0x002e, /* DIGIT SEVEN */ 0x0037, /* AMPERSAND */ 0x0026],
Digit8: [/* EQUALS SIGN */ 0x003d, /* DIGIT EIGHT */ 0x0038, /* ASTERISK */ 0x002a],
Digit9: [/* LEFT PARENTHESIS */ 0x0028, /* DIGIT NINE */ 0x0039, /* LEFT SQUARE BRACKET */ 0x005b],
Digit0: [/* RIGHT PARENTHESIS */ 0x0029, /* DIGIT ZERO */ 0x0030, /* RIGHT SQUARE BRACKET */ 0x005d],
Minus: [/* QUESTION MARK */ 0x003f, /* PLUS SIGN */ 0x002b, /* APOSTROPHE */ 0x0027],
Equal: [/* LATIN SMALL LETTER X */ 0x0078, /* LATIN CAPITAL LETTER X */ 0x0058, /* PERCENT SIGN */ 0x0025],
KeyQ: [/* LATIN SMALL LETTER A WITH OGONEK */ 0x0105, /* LATIN CAPITAL LETTER A WITH OGONEK */ 0x0104],
KeyW: [/* LATIN SMALL LETTER Z WITH CARON */ 0x017e, /* LATIN CAPITAL LETTER Z WITH CARON */ 0x017d],
KeyE: [/* LATIN SMALL LETTER E */ 0x0065, /* LATIN CAPITAL LETTER E */ 0x0045, /* EURO SIGN */ 0x20ac],
KeyR: [/* LATIN SMALL LETTER R */ 0x0072, /* LATIN CAPITAL LETTER R */ 0x0052],
KeyT: [/* LATIN SMALL LETTER T */ 0x0074, /* LATIN CAPITAL LETTER T */ 0x0054],
KeyY: [/* LATIN SMALL LETTER Y */ 0x0079, /* LATIN CAPITAL LETTER Y */ 0x0059],
KeyU: [/* LATIN SMALL LETTER U */ 0x0075, /* LATIN CAPITAL LETTER U */ 0x0055],
KeyI: [/* LATIN SMALL LETTER I */ 0x0069, /* LATIN CAPITAL LETTER I */ 0x0049],
KeyO: [/* LATIN SMALL LETTER O */ 0x006f, /* LATIN CAPITAL LETTER O */ 0x004f],
KeyP: [/* LATIN SMALL LETTER P */ 0x0070, /* LATIN CAPITAL LETTER P */ 0x0050],
BracketLeft: [/* LATIN SMALL LETTER I WITH OGONEK */ 0x012f, /* LATIN CAPITAL LETTER I WITH OGONEK */ 0x012e, /* LEFT CURLY BRACKET */ 0x007b],
BracketRight: [/* LATIN SMALL LETTER W */ 0x0077, /* LATIN CAPITAL LETTER W */ 0x0057, /* RIGHT CURLY BRACKET */ 0x007d],
Backslash: [/* LATIN SMALL LETTER Q */ 0x0071, /* LATIN CAPITAL LETTER Q */ 0x0051, /* VERTICAL LINE */ 0x007c],
KeyA: [/* LATIN SMALL LETTER A */ 0x0061, /* LATIN CAPITAL LETTER A */ 0x0041],
KeyS: [/* LATIN SMALL LETTER S */ 0x0073, /* LATIN CAPITAL LETTER S */ 0x0053],
KeyD: [/* LATIN SMALL LETTER D */ 0x0064, /* LATIN CAPITAL LETTER D */ 0x0044],
KeyF: [/* LATIN SMALL LETTER S WITH CARON */ 0x0161, /* LATIN CAPITAL LETTER S WITH CARON */ 0x0160],
KeyG: [/* LATIN SMALL LETTER G */ 0x0067, /* LATIN CAPITAL LETTER G */ 0x0047],
KeyH: [/* LATIN SMALL LETTER H */ 0x0068, /* LATIN CAPITAL LETTER H */ 0x0048],
KeyJ: [/* LATIN SMALL LETTER J */ 0x006a, /* LATIN CAPITAL LETTER J */ 0x004a],
KeyK: [/* LATIN SMALL LETTER K */ 0x006b, /* LATIN CAPITAL LETTER K */ 0x004b],
KeyL: [/* LATIN SMALL LETTER L */ 0x006c, /* LATIN CAPITAL LETTER L */ 0x004c],
Semicolon: [/* LATIN SMALL LETTER U WITH OGONEK */ 0x0173, /* LATIN CAPITAL LETTER U WITH OGONEK */ 0x0172],
Quote: [/* LATIN SMALL LETTER E WITH DOT ABOVE */ 0x0117, /* LATIN CAPITAL LETTER E WITH DOT ABOVE */ 0x0116, /* QUOTATION MARK */ 0x0022],
IntlBackslash: [/* LESS-THAN SIGN */ 0x003c, /* GREATER-THAN SIGN */ 0x003e, /* EN DASH */ 0x2013],
KeyZ: [/* LATIN SMALL LETTER Z */ 0x007a, /* LATIN CAPITAL LETTER Z */ 0x005a],
KeyX: [/* LATIN SMALL LETTER U WITH MACRON */ 0x016b, /* LATIN CAPITAL LETTER U WITH MACRON */ 0x016a],
KeyC: [/* LATIN SMALL LETTER C */ 0x0063, /* LATIN CAPITAL LETTER C */ 0x0043],
KeyV: [/* LATIN SMALL LETTER V */ 0x0076, /* LATIN CAPITAL LETTER V */ 0x0056],
KeyB: [/* LATIN SMALL LETTER B */ 0x0062, /* LATIN CAPITAL LETTER B */ 0x0042],
KeyN: [/* LATIN SMALL LETTER N */ 0x006e, /* LATIN CAPITAL LETTER N */ 0x004e],
KeyM: [/* LATIN SMALL LETTER M */ 0x006d, /* LATIN CAPITAL LETTER M */ 0x004d],
Comma: [/* LATIN SMALL LETTER C WITH CARON */ 0x010d, /* LATIN CAPITAL LETTER C WITH CARON */ 0x010c, /* DOUBLE LOW-9 QUOTATION MARK */ 0x201e],
Period: [/* LATIN SMALL LETTER F */ 0x0066, /* LATIN CAPITAL LETTER F */ 0x0046, /* LEFT DOUBLE QUOTATION MARK */ 0x201c],
Slash: [/* LATIN SMALL LETTER E WITH OGONEK */ 0x0119, /* LATIN CAPITAL LETTER E WITH OGONEK */ 0x0118, /* REVERSE SOLIDUS */ 0x005c],
Space: [/* SPACE */ 0x0020],
};
2 changes: 2 additions & 0 deletions packages/keybr-keyboard/lib/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import { LAYOUT_HE_IL_ARKN } from "./layout/he_il_arkn.ts";
import { LAYOUT_HU_HU } from "./layout/hu_hu.ts";
import { LAYOUT_IT_IT } from "./layout/it_it.ts";
import { LAYOUT_JA_JP_JIS } from "./layout/ja_jp_jis.ts";
import { LAYOUT_LT_LT } from "./layout/lt_lt.ts";
import { LAYOUT_NB_KVIKK } from "./layout/nb_kvikk.ts";
import { LAYOUT_NB_NO } from "./layout/nb_no.ts";
import { LAYOUT_NB_SKARP } from "./layout/nb_skarp.ts";
Expand Down Expand Up @@ -140,6 +141,7 @@ const layouts = new Map<Layout, CharacterDict>([
[Layout.HE_IL_ARKN, LAYOUT_HE_IL_ARKN],
[Layout.HU_HU, LAYOUT_HU_HU],
[Layout.IT_IT, LAYOUT_IT_IT],
[Layout.LT_LT, LAYOUT_LT_LT],
[Layout.NB_KVIKK, LAYOUT_NB_KVIKK],
[Layout.NB_NO, LAYOUT_NB_NO],
[Layout.NB_SKARP, LAYOUT_NB_SKARP],
Expand Down

0 comments on commit 97ee9f1

Please sign in to comment.