-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
refactor: split key labels in layout files (@fehmer) #6527
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
base: master
Are you sure you want to change the base?
Conversation
code used to transform the layout files: const { readFileSync, readdirSync, writeFileSync } = require("fs");
const layouts = readdirSync("./static/layouts");
for (const layoutFile of layouts) {
const layout = JSON.parse(readFileSync("./static/layouts/" + layoutFile));
for (let rowName of Object.keys(layout.keys)) {
const newRow = [];
let srcRow = layout.keys[rowName];
for (const char of srcRow) {
newRow.push(unicodeSplit(char));
}
layout.keys[rowName] = newRow;
}
writeFileSync(
"./static/layouts/" + layoutFile,
JSON.stringify(layout, undefined, 2)
);
}
function unicodeSplit(s) {
const split = [];
for (const c of s){
split.push(c);
}
return split;
} |
No way bro 💀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not an exhaustive list but it just demonstrates that graphemer is not reliable for this use case
|
"æ" and "œ" are cobsidered as typing at the same time "a" and "e" and "o" and "e" when using emulator. (Affects Bepo, Bepo_Afnor and Optimot layouts. Probably affects any other layouts that uses those two keys.) |
wip