Skip to content

Commit e078a83

Browse files
authored
layouts : en, fr, fr.contrib, fr.nonfree (#268)
1 parent f91cb74 commit e078a83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+832
-15
lines changed

Makefile

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
all:
2-
@for file in layouts/*.toml; do \
3-
kalamine build $$file --out "layouts/$$(basename $${file%.*}).json"; \
4-
done
5-
@for file in layouts/*.yaml; do \
6-
kalamine build $$file --out "layouts/$$(basename $${file%.*}).json"; \
2+
@find layouts -type f \( -name '*.toml' -o -name '*.yaml' \) | while read -r file; do \
3+
kalamine build "$$file" --out "$$(echo $$file | sed 's/....$$/json/')"; \
74
done
85

96
watch:
10-
@inotifywait -m layouts -e close_write | while read -r _path _action file; do \
7+
@inotifywait -m -r layouts -e close_write | while read -r path _action file; do \
118
case $$file in \
12-
*yaml) kalamine build "layouts/$$file" --out "layouts/$$(basename "$${file%.*}").json";; \
13-
*toml) kalamine build "layouts/$$file" --out "layouts/$$(basename "$${file%.*}").json";; \
9+
*.yaml | *.toml) echo kalamine build "$$path$$file" --out "$$path$$(basename "$${file%.*}").json";; \
1410
esac \
1511
done
1612

1713
dev:
18-
pip3 install kalamine
14+
pipx install kalamine
1915

2016
clean:
2117
rm -rf dist/*

code/layout-analyzer.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ window.addEventListener('DOMContentLoaded', () => {
1212
let impreciseData = false;
1313

1414
const substituteChars = {
15-
'\u00a0': ' ', // ( ) no-break space
15+
'\u00a0': ' ', // ( ) no-break space
1616
'\u202f': ' ', // ( ) narrow no-break space
1717

1818
'\u00ab': '"', // («) left-pointing double angle quotation mark
@@ -548,10 +548,15 @@ window.addEventListener('DOMContentLoaded', () => {
548548
const setProp = (key, value) => {
549549
if (key === 'layout') {
550550
if (value) {
551-
fetch(`../layouts/${value}.json`)
551+
const layoutFolder = document
552+
.querySelector(`#layout option[value="${value}"]`).dataset.folder;
553+
fetch(`../layouts/${layoutFolder}/${value}.json`)
552554
.then(response => response.json())
553555
.then(data => {
554-
inputField.placeholder = `zone de saisie ${value}`;
556+
const selectedOption = document
557+
.querySelector('#layout option:checked')
558+
.textContent.trim() || value;
559+
inputField.placeholder = `zone de saisie ${selectedOption}`;
555560
keyboard.setKeyboardLayout(
556561
data.keymap,
557562
data.deadkeys,
@@ -596,7 +601,7 @@ window.addEventListener('DOMContentLoaded', () => {
596601
IDs.map(prop => state[prop]).join('/').replace(/\/+$/, '');
597602
};
598603
const applyHashState = () => {
599-
const hash = window.location.hash || '#/ergol//en+fr';
604+
const hash = window.location.hash || '/ergol//en+fr';
600605
const hashState = hash.split('/').slice(1);
601606
IDs.forEach((key, i) => {
602607
setProp(key, hashState[i] || '');
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

layouts/fr.contrib/beopy-l.json

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"name": "Béopy 1DFH",
3+
"description": "Béopy adapté avec la philosophie ergo‑l",
4+
"geometry": "ergo",
5+
"keymap": {
6+
"Digit1": [ "1", "", "", "¹" ],
7+
"Digit2": [ "2", "«", "", "²" ],
8+
"Digit3": [ "3", "»", "", "³" ],
9+
"Digit4": [ "4", "$", "", "" ],
10+
"Digit5": [ "5", "%", "", "" ],
11+
"Digit6": [ "6", "^", "", "" ],
12+
"Digit7": [ "7", "&", "", "" ],
13+
"Digit8": [ "8", "*", "", "" ],
14+
"Digit9": [ "9", "#", "", "" ],
15+
"Digit0": [ "0", "@", "", "" ],
16+
"KeyQ": [ "b", "B", "@" ],
17+
"KeyW": [ "**", "!", "<", "" ],
18+
"KeyE": [ "o", "O", ">", "" ],
19+
"KeyR": [ "p", "P", "$", "" ],
20+
"KeyT": [ "y", "Y", "%", "" ],
21+
"KeyY": [ "-", "?", "^", "*^" ],
22+
"KeyU": [ "v", "V", "&" ],
23+
"KeyI": [ "d", "D", "*", "×" ],
24+
"KeyO": [ "l", "L", "'", "" ],
25+
"KeyP": [ "j", "J", "`", "*`" ],
26+
"KeyA": [ "a", "A", "{", "" ],
27+
"KeyS": [ "u", "U", "(", "" ],
28+
"KeyD": [ "e", "E", ")", "" ],
29+
"KeyF": [ "i", "I", "}" ],
30+
"KeyG": [ ",", ";", "=", "" ],
31+
"KeyH": [ "c", "C", "~", "*~" ],
32+
"KeyJ": [ "t", "T", "+", "±" ],
33+
"KeyK": [ "s", "S", "-", "" ],
34+
"KeyL": [ "r", "R", "_", "" ],
35+
"Semicolon": [ "n", "N", "\"", "" ],
36+
"KeyZ": [ "k", "K", "\\", "*/" ],
37+
"KeyX": [ "z", "Z", "[" ],
38+
"KeyC": [ "x", "X", "]" ],
39+
"KeyV": [ ".", ":", "/", "÷" ],
40+
"KeyB": [ "w", "W", "#" ],
41+
"KeyN": [ "m", "M", "|", "¦" ],
42+
"KeyM": [ "g", "G", "!", "¬" ],
43+
"Comma": [ "q", "Q", ";", "" ],
44+
"Period": [ "h", "H", ":" ],
45+
"Slash": [ "f", "F", "?" ],
46+
"Minus": [ "=", "" ],
47+
"Equal": [ "/", "÷" ],
48+
"BracketLeft": [ "+", "±" ],
49+
"BracketRight": [ "*", "×" ],
50+
"Quote": [ "'", "\"" ],
51+
"Backquote": [ "^", "|" ],
52+
"Backslash": [ "`", "~" ],
53+
"IntlBackslash": [ "<", ">" ],
54+
"Space": [ " ", "", " ", " " ]
55+
},
56+
"deadkeys": {
57+
"**": { "**": "", "€": "", "1": "", "«": "", "2": "", "»": "", "3": "", "4": "¢", "5": "", "6": "¥", "7": "¤", "8": "§", "9": "", "0": "°", "B": "", "b": "", "!": "¡", "O": "_", "o": "_", "P": "Ê", "p": "ê", "y": "", "?": "¿", "-": "", "v": "#", "D": "Œ", "d": "œ", "L": "Ô", "l": "ô", "J": "Î", "j": "î", "A": "Æ", "a": "æ", "E": "É", "e": "é", "I": "È", "i": "è", ";": "", ",": "·", "C": "Ç", "c": "ç", "T": "À", "t": "à", "s": "(", "r": ")", "N": "Ñ", "n": "ñ", ":": "", ".": "", "w": "", "g": "&", "Q": "Â", "q": "â", "H": "Ù", "h": "ù", "F": "Û", "f": "û", " ": "", " ": "", " ": "" },
58+
"*`": { "*`": "`", "A": "À", "a": "à", "E": "È", "e": "è", "I": "Ì", "i": "ì", "N": "Ǹ", "n": "ǹ", "O": "Ò", "o": "ò", "U": "Ù", "u": "ù", "W": "", "w": "", "Y": "", "y": "", " ": "`", " ": "`", " ": "`" },
59+
"*´": { "*´": "´", "A": "Á", "a": "á", "C": "Ć", "c": "ć", "E": "É", "e": "é", "G": "Ǵ", "g": "ǵ", "I": "Í", "i": "í", "K": "", "k": "", "L": "Ĺ", "l": "ĺ", "M": "", "m": "ḿ", "N": "Ń", "n": "ń", "O": "Ó", "o": "ó", "P": "", "p": "", "R": "Ŕ", "r": "ŕ", "S": "Ś", "s": "ś", "U": "Ú", "u": "ú", "W": "", "w": "", "Y": "Ý", "y": "ý", "Z": "Ź", "z": "ź", " ": "'", " ": "'", " ": "'" },
60+
"*^": { "*^": "^", "A": "Â", "a": "â", "C": "Ĉ", "c": "ĉ", "E": "Ê", "e": "ê", "G": "Ĝ", "g": "ĝ", "H": "Ĥ", "h": "ĥ", "I": "Î", "i": "î", "J": "Ĵ", "j": "ĵ", "O": "Ô", "o": "ô", "S": "Ŝ", "s": "ŝ", "U": "Û", "u": "û", "W": "Ŵ", "w": "ŵ", "Y": "Ŷ", "y": "ŷ", "Z": "", "z": "", "0": "", "1": "¹", "2": "²", "3": "³", "4": "", "5": "", "6": "", "7": "", "8": "", "9": "", "(": "", ")": "", "+": "", "-": "", "=": "", " ": "^", " ": "^", " ": "^" },
61+
"*ˇ": { "*ˇ": "ˇ", "A": "Ǎ", "a": "ǎ", "C": "Č", "c": "č", "D": "Ď", "d": "ď", "E": "Ě", "e": "ě", "G": "Ǧ", "g": "ǧ", "H": "Ȟ", "h": "ȟ", "I": "Ǐ", "i": "ǐ", "K": "Ǩ", "k": "ǩ", "L": "Ľ", "l": "ľ", "N": "Ň", "n": "ň", "O": "Ǒ", "o": "ǒ", "R": "Ř", "r": "ř", "S": "Š", "s": "š", "T": "Ť", "t": "ť", "U": "Ǔ", "u": "ǔ", "Z": "Ž", "z": "ž", "0": "", "1": "", "2": "", "3": "", "4": "", "5": "", "6": "", "7": "", "8": "", "9": "", "(": "", ")": "", "+": "", "-": "", "=": "", " ": "ˇ", " ": "ˇ", " ": "ˇ" },
62+
"*~": { "*~": "~", "A": "Ã", "a": "ã", "E": "", "e": "", "I": "Ĩ", "i": "ĩ", "N": "Ñ", "n": "ñ", "O": "Õ", "o": "õ", "U": "Ũ", "u": "ũ", "V": "", "v": "", "Y": "", "y": "", "<": "", ">": "", "=": "", " ": "~", " ": "~", " ": "~" },
63+
"*¯": { "*¯": "ˉ", "A": "Ā", "a": "ā", "E": "Ē", "e": "ē", "G": "", "g": "", "I": "Ī", "i": "ī", "O": "Ō", "o": "ō", "U": "Ū", "u": "ū", "Y": "Ȳ", "y": "ȳ", " ": "¯", " ": "¯", " ": "¯" },
64+
"*¨": { "*¨": "¨", "A": "Ä", "a": "ä", "E": "Ë", "e": "ë", "H": "", "h": "", "I": "Ï", "i": "ï", "O": "Ö", "o": "ö", "t": "", "U": "Ü", "u": "ü", "W": "", "w": "", "X": "", "x": "", "Y": "Ÿ", "y": "ÿ", " ": "\"", " ": "\"", " ": "\"" },
65+
"*¸": { "*¸": "¸", "C": "Ç", "c": "ç", "D": "", "d": "", "E": "Ȩ", "e": "ȩ", "G": "Ģ", "g": "ģ", "H": "", "h": "", "K": "Ķ", "k": "ķ", "L": "Ļ", "l": "ļ", "N": "Ņ", "n": "ņ", "R": "Ŗ", "r": "ŗ", "S": "Ş", "s": "ş", "T": "Ţ", "t": "ţ", " ": "¸", " ": "¸", " ": "¸" },
66+
"*/": { "*/": "/", "A": "Ⱥ", "a": "", "B": "Ƀ", "b": "ƀ", "C": "Ȼ", "c": "ȼ", "D": "Đ", "d": "đ", "E": "Ɇ", "e": "ɇ", "G": "Ǥ", "g": "ǥ", "H": "Ħ", "h": "ħ", "I": "Ɨ", "i": "ɨ", "J": "Ɉ", "j": "ɉ", "L": "Ł", "l": "ł", "O": "Ø", "o": "ø", "P": "", "p": "", "R": "Ɍ", "r": "ɍ", "T": "Ŧ", "t": "ŧ", "U": "Ʉ", "u": "ʉ", "Y": "Ɏ", "y": "ɏ", "Z": "Ƶ", "z": "ƶ", "<": "", "≤": "", "≥": "", ">": "", "=": "", " ": "/", " ": "/", " ": "/" },
67+
"*µ": { "*µ": "µ", "A": "Α", "a": "α", "B": "Β", "b": "β", "D": "Δ", "d": "δ", "E": "Ε", "e": "ε", "F": "Φ", "f": "φ", "G": "Γ", "g": "γ", "H": "Η", "h": "η", "I": "Ι", "i": "ι", "J": "Θ", "j": "θ", "K": "Κ", "k": "κ", "L": "Λ", "l": "λ", "M": "Μ", "m": "μ", "N": "Ν", "n": "ν", "O": "Ο", "o": "ο", "P": "Π", "p": "π", "Q": "Χ", "q": "χ", "R": "Ρ", "r": "ρ", "S": "Σ", "s": "σ", "T": "Τ", "t": "τ", "U": "Υ", "u": "υ", "W": "Ω", "w": "ω", "X": "Ξ", "x": "ξ", "Y": "Ψ", "y": "ψ", "Z": "Ζ", "z": "ζ", " ": "µ", " ": "µ", " ": "µ" },
68+
"*¤": { "*¤": "¤", "A": "", "a": "؋", "B": "", "b": "฿", "C": "", "c": "¢", "D": "", "d": "", "E": "", "e": "", "F": "", "f": "ƒ", "G": "", "g": "", "H": "", "h": "", "I": "", "i": "", "K": "", "k": "", "L": "", "l": "£", "M": "", "m": "", "N": "", "n": "", "O": "", "o": "", "P": "", "p": "", "R": "", "r": "", "S": "$", "s": "", "T": "", "t": "", "U": "", "u": "", "W": "", "w": "", "Y": "", "y": "¥", " ": "¤", " ": "¤", " ": "¤" }
69+
},
70+
"altgr": true
71+
}

layouts/fr.contrib/beopy-l.toml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name = "Béopy 1DFH"
2+
name8 = "beopy1dk"
3+
locale = "fr"
4+
variant = "beopy1dk"
5+
description = "Béopy adapté avec la philosophie ergo‑l"
6+
author = "Malekpe"
7+
url = "https://malekpe.net"
8+
geometry = "ERGO"
9+
version = "1.2.1"
10+
11+
base = '''
12+
╭╌╌╌╌╌┰─────┬─────┬─────┬─────┬─────┰─────┬─────┬─────┬─────┬─────┰╌╌╌╌╌┬╌╌╌╌╌╮
13+
┆ | ┃ € ‚ │ « ‘ │ » ’ │ $ │ % ┃ ^ │ & │ * │ # │ @ ┃ ≠ ┆ ÷ ┆
14+
┆ ^ ┃ 1 „ │ 2 “ │ 3 ” │ 4 ¢ │ 5 ‰ ┃ 6 ¥ │ 7 ¤ │ 8 § │ 9 ¶ │ 0 ° ┃ = ┆ / ┆
15+
╰╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
16+
· ┃ B*µ │ ! ¡ │ O _ │ P │ Y ┃ ? ¿ │ V │ D │ L │ J ┃ ± ┆ × ┆
17+
· ┃ *µ │***¨ │ _ │ ê │ – ┃ - ‑ │ # │ œ │ ô │ î ┃ + ┆ * ┆
18+
· ┠─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
19+
· ┃ A │ U │ E │ I │ ; • ┃ C │ T │ S │ R │ N ┃ " ┆ ~ ┆
20+
· ┃ æ │ │ é │ è │ , · ┃ ç │ à │ ( │ ) │ ñ ┃ ' ┆ ` ┆
21+
╭╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┴╌╌╌╌╌╯
22+
┆ > ┃ K │ Z │ X │ : ⋯ │ W ┃ M │ G │ Q │ H │ F ┃ ·
23+
┆ < ┃ │ │ │ . … │ — ┃ │ & │ â │ ù │ û ┃ ·
24+
╰╌╌╌╌╌┸─────┴─────┴─────┴─────┴─────┸─────┴─────┴─────┴─────┴─────┚ · · · · · ·
25+
'''
26+
27+
altgr = '''
28+
╭╌╌╌╌╌┰─────┬─────┬─────┬─────┬─────┰─────┬─────┬─────┬─────┬─────┰╌╌╌╌╌┬╌╌╌╌╌╮
29+
┆ ┃ ¹ │ ² │ ³ │ ⁴ │ ⁵ ┃ ⁶ │ ⁷ │ ⁸ │ ⁹ │ ⁰ ┃ ┆ ┆
30+
┆ ┃ ₁ │ ₂ │ ₃ │ ₄ │ ₅ ┃ ₆ │ ₇ │ ₈ │ ₉ │ ₀ ┃ ┆ ┆
31+
╰╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
32+
· ┃ │ ≤ │ ≥ │ *¤ │ ‰ ┃ *^ │ │ × │ *´ │ *` ┃ ┆ ┆
33+
· ┃ @ │ < │ > │ $ │ % ┃ ^ │ & │ * │ ' │ ` ┃ ┆ ┆
34+
· ┠─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
35+
· ┃ *ˇ │ ⁽ │ ⁾ │ │ ≠ ┃ *~ │ ± │ *¯ │ – │ *¨ ┃ ┆ ┆
36+
· ┃ { │ ( │ ) │ } │ = ┃ ~ │ + │ - │ _ │ " ┃ ┆ ┆
37+
╭╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┴╌╌╌╌╌╯
38+
┆ ┃ */ │ │ │ ÷ │ ┃ ¦ │ ¬ │ *¸ │ │ ┃ ·
39+
┆ ┃ \ │ [ │ ] │ / │ # ┃ | │ ! │ ; │ : │ ? ┃ ·
40+
╰╌╌╌╌╌┸─────┴─────┴─────┴─────┴─────┸─────┴─────┴─────┴─────┴─────┚ · · · · · ·
41+
'''
42+
43+
[spacebar]
44+
shift = "\u202f" # NARROW NO-BREAK SPACE
45+
altgr = "\u0020" # SPACE
46+
altgr_shift = "\u00a0" # NO-BREAK SPACE
47+
1dk = "\u2019" # RIGHT SINGLE QUOTATION MARK
48+
1dk_shift = "\u2019" # RIGHT SINGLE QUOTATION MARK

layouts/fr.contrib/beopy.json

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"name": "Béopy",
3+
"description": "French (Béopy)",
4+
"geometry": "ergo",
5+
"keymap": {
6+
"Digit1": [ "\"", "1", "", "" ],
7+
"Digit2": [ "«", "2", "<", "" ],
8+
"Digit3": [ "»", "3", ">", "" ],
9+
"Digit4": [ "(", "4", "[", "" ],
10+
"Digit5": [ ")", "5", "]", "" ],
11+
"Digit6": [ "@", "6", "_", "^" ],
12+
"Digit7": [ "+", "7", "±", "¬" ],
13+
"Digit8": [ "-", "8", "", "¼" ],
14+
"Digit9": [ "/", "9", "÷", "½" ],
15+
"Digit0": [ "*", "0", "×", "¾" ],
16+
"KeyQ": [ "b", "B", "|", "¦" ],
17+
"KeyW": [ "é", "É", "ó", "ő" ],
18+
"KeyE": [ "o", "O", "œ", "Œ" ],
19+
"KeyR": [ "p", "P", "{", "§" ],
20+
"KeyT": [ "y", "Y", "}" ],
21+
"KeyY": [ "!", "!", "¡" ],
22+
"KeyU": [ "v", "V", "ǒ", "Ǒ" ],
23+
"KeyI": [ "d", "D", "ð", "Ð" ],
24+
"KeyO": [ "l", "L", "£", "ø" ],
25+
"KeyP": [ "j", "J", "ij", "IJ" ],
26+
"KeyA": [ "a", "A", "æ", "Æ" ],
27+
"KeyS": [ "u", "U", "ù", "Ù" ],
28+
"KeyD": [ "e", "E", "", "¤" ],
29+
"KeyF": [ "i", "I", "ö", "ȯ" ],
30+
"KeyG": [ ",", ";", "'", "ơ" ],
31+
"KeyH": [ "c", "C", "©", "ſ" ],
32+
"KeyJ": [ "t", "T", "þ", "Þ" ],
33+
"KeyK": [ "s", "S", "ß", "" ],
34+
"KeyL": [ "r", "R", "®", "" ],
35+
"Semicolon": [ "n", "N", "õ", "Õ" ],
36+
"KeyZ": [ "à", "À", "\\" ],
37+
"KeyX": [ "è", "È", "ò", "*," ],
38+
"KeyC": [ "x", "X", "&" ],
39+
"KeyV": [ ".", ":", "", "·" ],
40+
"KeyB": [ "w", "W", "ŏ", "" ],
41+
"KeyN": [ "", "?", "¿", "" ],
42+
"KeyM": [ "g", "G", "µ" ],
43+
"Comma": [ "q", "Q", "å", "̣" ],
44+
"Period": [ "h", "H", "", "" ],
45+
"Slash": [ "f", "F", "ǫ", "Ǫ" ],
46+
"Minus": [ "=", "°", "", "" ],
47+
"Equal": [ "%", "`", "", "" ],
48+
"BracketLeft": [ "k", "K", "~" ],
49+
"BracketRight": [ "z", "Z", "ə", "Ə" ],
50+
"Quote": [ "m", "M", "ō", "º" ],
51+
"Backquote": [ "$", "#", "", "" ],
52+
"Backslash": [ "ç", "Ç", "ţ", "ț" ],
53+
"IntlBackslash": [ "ê", "Ê", "/" ],
54+
"Space": [ " ", "", "_", " " ]
55+
},
56+
"deadkeys": {
57+
"*,": { "*,": ",", "S": "Ș", "s": "ș", "T": "Ț", "t": "ț", " ": ",", " ": ",", " ": "," }
58+
},
59+
"altgr": true
60+
}

0 commit comments

Comments
 (0)