Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Focal layout #403

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions packages/keybr-generators/layouts/en_focal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"Backquote": "`~",
"Digit1": "1!",
"Digit2": "2@",
"Digit3": "3#",
"Digit4": "4$",
"Digit5": "5%",
"Digit6": "6^",
"Digit7": "7&",
"Digit8": "8*",
"Digit9": "9(",
"Digit0": "0)",
"Minus": "-_",
"Equal": "=+",
"KeyQ": "vV",
"KeyW": "lL",
"KeyE": "hH",
"KeyR": "gG",
"KeyT": "kK",
"KeyY": "qQ",
"KeyU": "fF",
"KeyI": "oO",
"KeyO": "uU",
"KeyP": "jJ",
"BracketLeft": "[{",
"BracketRight": "]}",
"Backslash": "\\|",
"KeyA": "sS",
"KeyS": "rR",
"KeyD": "nN",
"KeyF": "tT",
"KeyG": "bB",
"KeyH": "yY",
"KeyJ": "cC",
"KeyK": "aA",
"KeyL": "eE",
"Semicolon": "iI",
"Quote": "/?",
"IntlBackslash": "\\|",
"KeyZ": "zZ",
"KeyX": "xX",
"KeyC": "mM",
"KeyV": "dD",
"KeyB": "pP",
"KeyN": "'\"",
"KeyM": "wW",
"Comma": ".>",
"Period": ";:",
"Slash": ",<",
"Space": " ",
"ThumbClusterLeft1": "=+",
"ThumbClusterLeft2": "/?",
"ThumbClusterRight1": "-_"
}
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 @@ -52,6 +52,7 @@ for (const [id, layout] of [
["en_workman", importKeymap("layouts/en_workman.json")],
["en_workman_prog", importKeymap("layouts/en_workman_prog.json")],
["en-aptv3", importKeymap("layouts/en_aptv3.json")],
["en_focal", importKeymap("layouts/en_focal.json")],
["es_es", importCldr("cldr-keyboards-43.0/keyboards/windows/es-t-k0-windows.xml")],
["es_mx", importCldr("cldr-keyboards-43.0/keyboards/windows/es-419-t-k0-windows.xml")],
["fa_ir", importCldr("cldr-keyboards-43.0/keyboards/windows/fa-t-k0-windows-extended.xml")],
Expand Down
16 changes: 16 additions & 0 deletions packages/keybr-keyboard/lib/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,21 @@ export class Layout implements XEnumItem {
Geometry.MATRIX,
),
);
static readonly EN_FOCAL = new Layout(
/* id= */ "en_focal",
/* xid= */ 0xa5,
/* name= */ "Focal",
/* family= */ "focal",
/* language= */ Language.EN,
/* emulate= */ true,
/* geometries= */ new Enum(
Geometry.ANSI_101,
Geometry.ANSI_101_FULL,
Geometry.ISO_102,
Geometry.ISO_102_FULL,
Geometry.MATRIX,
),
);

static readonly ALL = new XEnum<Layout>(
Layout.EN_US,
Expand All @@ -1111,6 +1126,7 @@ export class Layout implements XEnumItem {
Layout.EN_GALLIUM_MATRIX,
Layout.EN_GRAPHITE,
Layout.EN_APT_v3,
Layout.EN_FOCAL,
Layout.EN_UK,
Layout.EN_JP,
Layout.EL_GR,
Expand Down
59 changes: 59 additions & 0 deletions packages/keybr-keyboard/lib/layout/en_focal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// Generated file, do not edit.

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

// prettier-ignore
export const LAYOUT_EN_FOCAL: CharacterDict = {
Backquote: [/* GRAVE ACCENT */ 0x0060, /* TILDE */ 0x007e],
Digit1: [/* DIGIT ONE */ 0x0031, /* EXCLAMATION MARK */ 0x0021],
Digit2: [/* DIGIT TWO */ 0x0032, /* COMMERCIAL AT */ 0x0040],
Digit3: [/* DIGIT THREE */ 0x0033, /* NUMBER SIGN */ 0x0023],
Digit4: [/* DIGIT FOUR */ 0x0034, /* DOLLAR SIGN */ 0x0024],
Digit5: [/* DIGIT FIVE */ 0x0035, /* PERCENT SIGN */ 0x0025],
Digit6: [/* DIGIT SIX */ 0x0036, /* CIRCUMFLEX ACCENT */ 0x005e],
Digit7: [/* DIGIT SEVEN */ 0x0037, /* AMPERSAND */ 0x0026],
Digit8: [/* DIGIT EIGHT */ 0x0038, /* ASTERISK */ 0x002a],
Digit9: [/* DIGIT NINE */ 0x0039, /* LEFT PARENTHESIS */ 0x0028],
Digit0: [/* DIGIT ZERO */ 0x0030, /* RIGHT PARENTHESIS */ 0x0029],
Minus: [/* HYPHEN-MINUS */ 0x002d, /* LOW LINE */ 0x005f],
Equal: [/* EQUALS SIGN */ 0x003d, /* PLUS SIGN */ 0x002b],
KeyQ: [/* LATIN SMALL LETTER V */ 0x0076, /* LATIN CAPITAL LETTER V */ 0x0056],
KeyW: [/* LATIN SMALL LETTER L */ 0x006c, /* LATIN CAPITAL LETTER L */ 0x004c],
KeyE: [/* LATIN SMALL LETTER H */ 0x0068, /* LATIN CAPITAL LETTER H */ 0x0048],
KeyR: [/* LATIN SMALL LETTER G */ 0x0067, /* LATIN CAPITAL LETTER G */ 0x0047],
KeyT: [/* LATIN SMALL LETTER K */ 0x006b, /* LATIN CAPITAL LETTER K */ 0x004b],
KeyY: [/* LATIN SMALL LETTER Q */ 0x0071, /* LATIN CAPITAL LETTER Q */ 0x0051],
KeyU: [/* LATIN SMALL LETTER F */ 0x0066, /* LATIN CAPITAL LETTER F */ 0x0046],
KeyI: [/* LATIN SMALL LETTER O */ 0x006f, /* LATIN CAPITAL LETTER O */ 0x004f],
KeyO: [/* LATIN SMALL LETTER U */ 0x0075, /* LATIN CAPITAL LETTER U */ 0x0055],
KeyP: [/* LATIN SMALL LETTER J */ 0x006a, /* LATIN CAPITAL LETTER J */ 0x004a],
BracketLeft: [/* LEFT SQUARE BRACKET */ 0x005b, /* LEFT CURLY BRACKET */ 0x007b],
BracketRight: [/* RIGHT SQUARE BRACKET */ 0x005d, /* RIGHT CURLY BRACKET */ 0x007d],
Backslash: [/* REVERSE SOLIDUS */ 0x005c, /* VERTICAL LINE */ 0x007c],
KeyA: [/* LATIN SMALL LETTER S */ 0x0073, /* LATIN CAPITAL LETTER S */ 0x0053],
KeyS: [/* LATIN SMALL LETTER R */ 0x0072, /* LATIN CAPITAL LETTER R */ 0x0052],
KeyD: [/* LATIN SMALL LETTER N */ 0x006e, /* LATIN CAPITAL LETTER N */ 0x004e],
KeyF: [/* LATIN SMALL LETTER T */ 0x0074, /* LATIN CAPITAL LETTER T */ 0x0054],
KeyG: [/* LATIN SMALL LETTER B */ 0x0062, /* LATIN CAPITAL LETTER B */ 0x0042],
KeyH: [/* LATIN SMALL LETTER Y */ 0x0079, /* LATIN CAPITAL LETTER Y */ 0x0059],
KeyJ: [/* LATIN SMALL LETTER C */ 0x0063, /* LATIN CAPITAL LETTER C */ 0x0043],
KeyK: [/* LATIN SMALL LETTER A */ 0x0061, /* LATIN CAPITAL LETTER A */ 0x0041],
KeyL: [/* LATIN SMALL LETTER E */ 0x0065, /* LATIN CAPITAL LETTER E */ 0x0045],
Semicolon: [/* LATIN SMALL LETTER I */ 0x0069, /* LATIN CAPITAL LETTER I */ 0x0049],
Quote: [/* SOLIDUS */ 0x002f, /* QUESTION MARK */ 0x003f],
IntlBackslash: [/* REVERSE SOLIDUS */ 0x005c, /* VERTICAL LINE */ 0x007c],
KeyZ: [/* LATIN SMALL LETTER Z */ 0x007a, /* LATIN CAPITAL LETTER Z */ 0x005a],
KeyX: [/* LATIN SMALL LETTER X */ 0x0078, /* LATIN CAPITAL LETTER X */ 0x0058],
KeyC: [/* LATIN SMALL LETTER M */ 0x006d, /* LATIN CAPITAL LETTER M */ 0x004d],
KeyV: [/* LATIN SMALL LETTER D */ 0x0064, /* LATIN CAPITAL LETTER D */ 0x0044],
KeyB: [/* LATIN SMALL LETTER P */ 0x0070, /* LATIN CAPITAL LETTER P */ 0x0050],
KeyN: [/* APOSTROPHE */ 0x0027, /* QUOTATION MARK */ 0x0022],
KeyM: [/* LATIN SMALL LETTER W */ 0x0077, /* LATIN CAPITAL LETTER W */ 0x0057],
Comma: [/* FULL STOP */ 0x002e, /* GREATER-THAN SIGN */ 0x003e],
Period: [/* SEMICOLON */ 0x003b, /* COLON */ 0x003a],
Slash: [/* COMMA */ 0x002c, /* LESS-THAN SIGN */ 0x003c],
Space: [/* SPACE */ 0x0020],
ThumbClusterLeft1: [/* EQUALS SIGN */ 0x003d, /* PLUS SIGN */ 0x002b],
ThumbClusterLeft2: [/* SOLIDUS */ 0x002f, /* QUESTION MARK */ 0x003f],
ThumbClusterRight1: [/* HYPHEN-MINUS */ 0x002d, /* LOW LINE */ 0x005f],
};
2 changes: 2 additions & 0 deletions packages/keybr-keyboard/lib/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { LAYOUT_EN_COLEMAK_DH_MATRIX } from "./layout/en_colemak_dh_matrix.ts";
import { LAYOUT_EN_DVORAK } from "./layout/en_dvorak.ts";
import { LAYOUT_EN_DVORAK_PROG } from "./layout/en_dvorak_prog.ts";
import { LAYOUT_EN_ENGRAM } from "./layout/en_engram.ts";
import { LAYOUT_EN_FOCAL } from "./layout/en_focal.ts";
import { LAYOUT_EN_GALLIUM } from "./layout/en_gallium.ts";
import { LAYOUT_EN_GALLIUM_MATRIX } from "./layout/en_gallium_matrix.ts";
import { LAYOUT_EN_GRAPHITE } from "./layout/en_graphite.ts";
Expand Down Expand Up @@ -114,6 +115,7 @@ const layouts = new Map<Layout, CharacterDict>([
[Layout.EN_DVORAK, LAYOUT_EN_DVORAK],
[Layout.EN_DVORAK_PROG, LAYOUT_EN_DVORAK_PROG],
[Layout.EN_ENGRAM, LAYOUT_EN_ENGRAM],
[Layout.EN_FOCAL, LAYOUT_EN_FOCAL],
[Layout.EN_GALLIUM, LAYOUT_EN_GALLIUM],
[Layout.EN_GALLIUM_MATRIX, LAYOUT_EN_GALLIUM_MATRIX],
[Layout.EN_GRAPHITE, LAYOUT_EN_GRAPHITE],
Expand Down