diff --git a/frontend/__tests__/components/pages/test/keymapConverter.spec.ts b/frontend/__tests__/components/pages/test/keymapConverter.spec.ts index 07487c3e0e20..88ed54d17d37 100644 --- a/frontend/__tests__/components/pages/test/keymapConverter.spec.ts +++ b/frontend/__tests__/components/pages/test/keymapConverter.spec.ts @@ -3,6 +3,7 @@ import { convertLayoutToKeymap } from "../../../../src/ts/components/pages/test/ import qwertyLayout from "../../../../static/layouts/qwerty.json"; import qwertzLayout from "../../../../static/layouts/qwertz.json"; +import arabic101Layout from "../../../../static/layouts/arabic_101.json"; import { LayoutObject } from "@monkeytype/schemas/layouts"; import { @@ -1123,5 +1124,19 @@ describe("keymap converter", () => { expect(row4?.length, "row4 length").toBe(15); }); }); + + describe("arabic_101", () => { + it("converts arabic_101 with canonical multi-char ligatures", () => { + const [, , , row4] = convertLayoutToKeymap( + arabic101Layout as LayoutObject, + { + keymapStyle: "staggered", + showAllKeys: false, + }, + ); + + expect(row4?.[4]).toEqual(expectLegend("لا", "لآ")); + }); + }); }); }); diff --git a/frontend/src/ts/test/events/stats.ts b/frontend/src/ts/test/events/stats.ts index 3dcd0af97683..2822cfc1add8 100644 --- a/frontend/src/ts/test/events/stats.ts +++ b/frontend/src/ts/test/events/stats.ts @@ -264,7 +264,11 @@ export function getKeypressesPerSecond(eventLog: EventLog): number[] { export function getBurstHistory(eventLog: EventLog): number[] { const { counts, boundaries } = countPerInterval( eventLog, - (e) => e.type === "input" && e.data.inputType === "insertText", + (e) => + e.type === "input" && + (e.data.inputType === "insertText" || + (eventLog.context.koreanStatus && + e.data.inputType === "insertCompositionText")), ); let prevBoundary = 0; diff --git a/frontend/static/layouts/arabic_101.json b/frontend/static/layouts/arabic_101.json index 4a4fcb1a7ad5..6e3ebaf847f2 100644 --- a/frontend/static/layouts/arabic_101.json +++ b/frontend/static/layouts/arabic_101.json @@ -22,7 +22,7 @@ ["ص", "ً"], ["ث", "ُ"], ["ق", "ٌ"], - ["ف", "ﻹ"], + ["ف", "لإ"], ["غ", "إ"], ["ع", "‘"], ["ه", "÷"], @@ -37,7 +37,7 @@ ["س", "ٍ"], ["ي", "]"], ["ب", "["], - ["ل", "ﻷ"], + ["ل", "لأ"], ["ا", "أ"], ["ت", "ـ"], ["ن", "،"], @@ -50,7 +50,7 @@ ["ء", "ْ"], ["ؤ", "}"], ["ر", "{"], - ["ﻻ", "ﻵ"], + ["لا", "لآ"], ["ى", "آ"], ["ة", "’"], ["و", ","], diff --git a/frontend/static/layouts/arabic_102.json b/frontend/static/layouts/arabic_102.json index 99125e6a7fa4..54f305cb4185 100644 --- a/frontend/static/layouts/arabic_102.json +++ b/frontend/static/layouts/arabic_102.json @@ -22,7 +22,7 @@ ["ص", "ً"], ["ث", "ُ"], ["ق", "ٌ"], - ["ف", "ﻹ"], + ["ف", "لإ"], ["غ", "إ"], ["ع", "‘"], ["ه", "÷"], @@ -37,7 +37,7 @@ ["س", "​"], ["ي", "]"], ["ب", "["], - ["ل", "ﻷ"], + ["ل", "لأ"], ["ا", "أ"], ["ت", "ـ"], ["ن", "،"], @@ -50,7 +50,7 @@ ["ء", "ْ"], ["ؤ", "ِ"], ["ر", "ٍ"], - ["ﻻ", "ﻵ"], + ["لا", "لآ"], ["ى", "آ"], ["ة", "’"], ["و", ","], diff --git a/packages/schemas/src/layouts.ts b/packages/schemas/src/layouts.ts index cfb277077522..2f63ad19744f 100644 --- a/packages/schemas/src/layouts.ts +++ b/packages/schemas/src/layouts.ts @@ -250,7 +250,7 @@ export const LayoutNameSchema = z.enum( export type LayoutName = z.infer; -const KeyLegendsSchema = z.array(z.string().length(1)).min(1).max(4); +const KeyLegendsSchema = z.array(z.string().min(1)).min(1).max(4); export type KeyLegends = z.infer; const commonLayoutSchema = z