Skip to content

Commit

Permalink
Erglace + Colemak FT + Bépolar + Lafayette (#94)
Browse files Browse the repository at this point in the history
* `keebs` refacto + lafayette.md

* quick bugfixes

* drop unused SVG files

* release the Lafayette powwa
  • Loading branch information
fabi1cazenave authored Mar 2, 2024
1 parent d46544c commit 27b09b5
Show file tree
Hide file tree
Showing 24 changed files with 1,779 additions and 2,013 deletions.
4 changes: 3 additions & 1 deletion code/duck-typist.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ window.addEventListener('DOMContentLoaded', () => {
};

window.addEventListener('hashchange', loadLayout);
gLayout.addEventListener('change', loadLayout);
gLayout.addEventListener('change', () => {
window.location.hash = `#${gLayout.value}`;
});

gDict.addEventListener('change', () => {
localStorage.setItem('dict', gDict.value);
Expand Down
67 changes: 55 additions & 12 deletions code/demo.js → code/keebs.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,55 @@
/**
* <div class="keyboard">
* <img src="/img/ergol.svg"> <!-- replaced by an <svg> element -->
* <p>
* <span>powered by <a
* href="https://github.com/OneDeadKey/x-keyboard">x-keyboard</a></span>
* <small>géométrie :</small>
* <select> <!-- filled when the <svg> is created -->
* <option value="dk iso">ISO</option>
* </select>
* </p>
* <dialog>
* <input></input>
* <x-keyboard></x-keyboard>
* </dialog>
* </div>
*/

window.addEventListener('DOMContentLoaded', () => {
'use strict'; // eslint-disable-line

const dialog = document.querySelector('dialog');
const keyboard = document.querySelector('x-keyboard');
const input = document.querySelector('input');
const geometry = document.querySelector('.keyboard select');
const button = document.querySelector('.keyboard button');
for (const keeb of document.querySelectorAll('.keyboard')) {
console.log(keeb);

if (!keyboard.layout) {
console.warn('web components are not supported');
return; // the web component has not been loaded
}
const dialog = keeb.querySelector('dialog');
const keyboard = keeb.querySelector('x-keyboard');
const preview = keeb.querySelector('img');
const input = keeb.querySelector('input');
const geometry = keeb.querySelector('select');
const button = keeb.querySelector('button');

const getGeometry = () => geometry.value.split(' ')[1];

fetch(preview.getAttribute('src'))
.then(response => response.text())
.then(data => {
preview.outerHTML = data;
geometry.innerHTML = `
<option value="dk iso intlBackslash am"> ISO-A </option>
<option value="dk iso intlBackslash" selected> ISO </option>
<option value="dk ansi"> ANSI </option>
<option value="dk ol60 ergo"> TMx </option>
<option value="dk ol50 ergo"> 4×6 </option>
<option value="dk ol40 ergo"> 3×6 </option>
`;
const svg = keeb.querySelector('.keyboard svg');
geometry.addEventListener('change', event => {
svg.setAttribute('class', event.target.value);
keyboard.geometry = getGeometry();
});
});

fetch(keyboard.getAttribute('src'))
.then(response => response.json() )
.then(data => {
Expand All @@ -23,9 +59,14 @@ window.addEventListener('DOMContentLoaded', () => {
if (button) button.disabled = false;
});

geometry.addEventListener('change', event => {
keyboard.geometry = getGeometry();
});
if (!keyboard.layout) {
console.warn('web components are not supported');
return; // the web component has not been loaded
}

if (!input) {
return;
}

/**
* Open/Close modal
Expand Down Expand Up @@ -95,4 +136,6 @@ window.addEventListener('DOMContentLoaded', () => {
event.target.value = event.target.value.slice(0, -event.data.length);
}
});
}

});
25 changes: 0 additions & 25 deletions code/svg.js

This file was deleted.

47 changes: 47 additions & 0 deletions layouts/bepolar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Bépolar
name8: bepolar
locale: fr
variant: bepolar
description: French (Bépolar)
url: https://github.com/Ced-C/Bepolar
author : Cèd’C
geometry: ERGO
version: 0.6.0

base: |
╭╌╌╌╌╌┰─────┬─────┬─────┬─────┬─────┰─────┬─────┬─────┬─────┬─────┰╌╌╌╌╌┬╌╌╌╌╌╮
┆ ¬ ┃ # │ « “ │ » ” │ ( „ │ ) ‘ ┃ @ │ + ÷ │ ^*ˇ │ / | │ * × ┃*µ ┆ § ¶ ┆
┆ ~*~ ┃ 1 & │ 2 < │ 3 > │ 4 ( │ 5 ) ┃ 6 @ │ 7 ± │ 8*^ │ 9 \ │ 0 ° ┃ = ≠ ┆ % ‰ ┆
╰╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
· ┃ B │ M │ P │ O │ W ┃ Z │ V │ D │ L │ J ┃ { ┆ } ┆
· ┃ â │ û │ î │ ô │ œ ┃ │ ŭ │ │ │ ┃ [ ┆ ] ┆
· ┠─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
· ┃ A │ U │ I │ E │ ; ┃ C │ T │ S │ R │ N ┃ " ┆ €*¤ ┆
· ┃ à │ ù │ é │ è │ , ê ┃ ç │ ™ │ ß │ ® │ ñ ┃ ' ` ┆ $ ¢ ┆
╭╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┴╌╌╌╌╌╯
┆ \ ¦ ┃ ! ¡ │ Y │ X │ : · │ K ┃ ? ¿ │ Q │ G │ H │ F ┃ ·
┆ / | ┃ - — │ ŷ │ _ │ . … │ æ ┃***¨ │ – │ µ │ © │ ┃ ·
╰╌╌╌╌╌┸─────┴─────┴─────┴─────┴─────┸─────┴─────┴─────┴─────┴─────┚ · · · · · ·
altgr: |
╭╌╌╌╌╌┰─────┬─────┬─────┬─────┬─────┰─────┬─────┬─────┬─────┬─────┰╌╌╌╌╌┬╌╌╌╌╌╮
┆ ┃ ¹ │ ² │ ³ │ ⁴ │ ⁵ ┃ ⁶ │ ⁷ │ ⁸ │ ⁹ │ ⁰ ┃ ┆ ┆
┆ ₍ ┃ ₁ │ ₂ │ ₃ │ ₄ │ ₅ ┃ ₆ │ ₇ │ ₈ │ ₉ │ ₀ ┃ ₎ ┆ ┆
╰╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
· ┃ │ ≤ │ ≥ │ *¤ │ ‰ ┃ *^ │ *µ │ × │ *´ │ *` ┃ ┆ ┆
· ┃ @ │ < │ > │ $ │ % ┃ ^ │ & │ * │ ' │ ` ┃ ┆ ┆
· ┠─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
· ┃ │ ⁽ │ ⁾ │ │ ≠ ┃ */ │ ± │ — │ ÷ │ *¨ ┃*ˇ ┆ *¤ ┆
· ┃ { │ ( │ ) │ } │ = ┃ \ │ + │ - │ / │ " ┃ ┆ ¤ ┆
╭╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┴╌╌╌╌╌╯
┆ ┃ *~ │ │ │ – │ ┃ ¦ │ ¬ │ *¸ │ │ ┃ ·
┆ ┃ ~ │ [ │ ] │ _ │ # ┃ | │ ! │ ; │ : │ ? ┃ ·
╰╌╌╌╌╌┸─────┴─────┴─────┴─────┴─────┸─────┴─────┴─────┴─────┴─────┚ · · · · · ·
spacebar:
shift: "\u202f" # NARROW NO-BREAK SPACE
altgr: "\u0020" # SPACE
altgr_shift: "\u00a0" # NO-BREAK SPACE
1dk: "\u2019" # RIGHT SINGLE QUOTATION MARK
1dk_shift: "\u2019" # RIGHT SINGLE QUOTATION MARK
68 changes: 68 additions & 0 deletions layouts/colemak-french-touch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"name": "Colemak French Touch",
"description": "French (Colemak French Touch)",
"geometry": "ergo",
"keymap": {
"Digit1": [ "1", "", "", "¹" ],
"Digit2": [ "2", "@", "", "²" ],
"Digit3": [ "3", "#", "", "³" ],
"Digit4": [ "4", "$", "", "" ],
"Digit5": [ "5", "%", "", "" ],
"Digit6": [ "6", "^", "", "" ],
"Digit7": [ "7", "&", "", "" ],
"Digit8": [ "8", "*", "", "" ],
"Digit9": [ "9", "«", "", "" ],
"Digit0": [ "0", "»", "", "" ],
"KeyQ": [ "q", "Q", "@" ],
"KeyW": [ "w", "W", "<", "" ],
"KeyE": [ "f", "F", ">", "" ],
"KeyR": [ "p", "P", "$", "" ],
"KeyT": [ "g", "G", "%", "" ],
"KeyY": [ "j", "J", "^", "*^" ],
"KeyU": [ "l", "L", "&" ],
"KeyI": [ "o", "O", "*", "×" ],
"KeyO": [ "**", "!", "'", "" ],
"KeyP": [ "y", "Y", "`", "*`" ],
"KeyA": [ "a", "A", "{" ],
"KeyS": [ "r", "R", "(", "" ],
"KeyD": [ "s", "S", ")", "" ],
"KeyF": [ "t", "T", "}" ],
"KeyG": [ "d", "D", "=", "" ],
"KeyH": [ "m", "M", "\\", "*/" ],
"KeyJ": [ "n", "N", "+", "±" ],
"KeyK": [ "e", "E", "-", "" ],
"KeyL": [ "i", "I", "/", "÷" ],
"Semicolon": [ "u", "U", "\"", "" ],
"KeyZ": [ "z", "Z", "~", "*~" ],
"KeyX": [ "x", "X", "[" ],
"KeyC": [ "c", "C", "]" ],
"KeyV": [ "v", "V", "_", "" ],
"KeyB": [ "b", "B", "#" ],
"KeyN": [ "k", "K", "|", "¦" ],
"KeyM": [ "h", "H", "!", "¬" ],
"Comma": [ "-", "?", ";", "" ],
"Period": [ ",", ";", ":" ],
"Slash": [ ".", ":", "?" ],
"Minus": [ "/", "_" ],
"Equal": [ "=", "+" ],
"BracketLeft": [ "[", "{" ],
"BracketRight": [ "]", "}" ],
"Quote": [ "'", "\"" ],
"Backquote": [ "`", "~" ],
"Backslash": [ "\\", "|" ],
"IntlBackslash": [ "<", ">" ],
"Space": [ " ", "", " ", " " ]
},
"deadkeys": {
"**": { "**": "", "0": "°", "F": "À", "f": "à", "P": "Ù", "p": "ù", "L": "Œ", "l": "œ", "O": "Ô", "o": "ô", "Y": "Î", "y": "î", "A": "Â", "a": "â", "R": "É", "r": "é", "S": "È", "s": "è", "d": "", "m": "(", "n": ")", "E": "Ê", "e": "ê", "U": "Û", "u": "û", "Z": "Æ", "z": "æ", "C": "Ç", "c": "ç", "V": "_", "v": "_", "b": "", "k": "", "h": "", "-": "", ":": "", ".": "·", " ": "", " ": "", " ": "" },
"*`": { "*`": "`", "A": "À", "a": "à", "E": "È", "e": "è", "I": "Ì", "i": "ì", "N": "Ǹ", "n": "ǹ", "O": "Ò", "o": "ò", "U": "Ù", "u": "ù", "W": "", "w": "", "Y": "", "y": "", " ": "`", " ": "`", " ": "`" },
"*´": { "*´": "´", "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": "ź", " ": "'", " ": "'", " ": "'" },
"*^": { "*^": "^", "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": "", "(": "", ")": "", "+": "", "-": "", "=": "", " ": "^", " ": "^", " ": "^" },
"*~": { "*~": "~", "A": "Ã", "a": "ã", "E": "", "e": "", "I": "Ĩ", "i": "ĩ", "N": "Ñ", "n": "ñ", "O": "Õ", "o": "õ", "U": "Ũ", "u": "ũ", "V": "", "v": "", "Y": "", "y": "", "<": "", ">": "", "=": "", " ": "~", " ": "~", " ": "~" },
"*¨": { "*¨": "¨", "A": "Ä", "a": "ä", "E": "Ë", "e": "ë", "H": "", "h": "", "I": "Ï", "i": "ï", "O": "Ö", "o": "ö", "t": "", "U": "Ü", "u": "ü", "W": "", "w": "", "X": "", "x": "", "Y": "Ÿ", "y": "ÿ", " ": "\"", " ": "\"", " ": "\"" },
"*¸": { "*¸": "¸", "C": "Ç", "c": "ç", "D": "", "d": "", "E": "Ȩ", "e": "ȩ", "G": "Ģ", "g": "ģ", "H": "", "h": "", "K": "Ķ", "k": "ķ", "L": "Ļ", "l": "ļ", "N": "Ņ", "n": "ņ", "R": "Ŗ", "r": "ŗ", "S": "Ş", "s": "ş", "T": "Ţ", "t": "ţ", " ": "¸", " ": "¸", " ": "¸" },
"*/": { "*/": "/", "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": "ƶ", "<": "", "≤": "", "≥": "", ">": "", "=": "", " ": "/", " ": "/", " ": "/" },
"*¤": { "*¤": "¤", "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": "¥", " ": "¤", " ": "¤", " ": "¤" }
},
"altgr": true
}
48 changes: 48 additions & 0 deletions layouts/colemak-french-touch.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name = "Colemak French Touch"
name8 = "colemkft"
locale = "fr"
variant = "colemkft"
description = "French (Colemak French Touch)"
author = "Cedric Rossi"
url = "https://github.com/cedricr/colemak-french-touch"
geometry = "ERGO"
version = "0.3.1"

base = '''
╭╌╌╌╌╌┰─────┬─────┬─────┬─────┬─────┰─────┬─────┬─────┬─────┬─────┰╌╌╌╌╌┬╌╌╌╌╌╮
┆ ~ ┃ € │ @ │ # │ $ │ % ┃ ^ │ & │ * │ « │ » ┃ _ ┆ + ┆
┆ ` ┃ 1 │ 2 │ 3 │ 4 │ 5 ┃ 6 │ 7 │ 8 │ 9 │ 0 ° ┃ / ┆ = ┆
╰╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
· ┃ Q │ W │ F │ P │ G ┃ J │ L │ O │ ! │ Y ┃ { ┆ } ┆
· ┃ │ │ à │ ù │ ┃ │ œ │ ô │***¨ │ î ┃ [ ┆ ] ┆
· ┠─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
· ┃ A │ R │ S │ T │ D ┃ M │ N │ E │ I │ U ┃ " ┆ | ┆
· ┃ â │ é │ è │ │ – ┃ ( │ ) │ ê │ │ û ┃ ' ┆ \ ┆
╭╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┴╌╌╌╌╌╯
┆ > ┃ Z │ X │ C │ V _ │ B ┃ K │ H │ ? │ ; │ : • ┃ ·
┆ < ┃ æ │ │ ç │ _ │ — ┃ “ │ ” │ - … │ , │ . · ┃ ·
╰╌╌╌╌╌┸─────┴─────┴─────┴─────┴─────┸─────┴─────┴─────┴─────┴─────┚ · · · · · ·
'''

altgr = '''
╭╌╌╌╌╌┰─────┬─────┬─────┬─────┬─────┰─────┬─────┬─────┬─────┬─────┰╌╌╌╌╌┬╌╌╌╌╌╮
┆ ┃ ¹ │ ² │ ³ │ ⁴ │ ⁵ ┃ ⁶ │ ⁷ │ ⁸ │ ⁹ │ ⁰ ┃ ┆ ┆
┆ ┃ ₁ │ ₂ │ ₃ │ ₄ │ ₅ ┃ ₆ │ ₇ │ ₈ │ ₉ │ ₀ ┃ ┆ ┆
╰╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
· ┃ │ ≤ │ ≥ │ *¤ │ ‰ ┃ *^ │ │ × │ *´ │ *` ┃ ┆ ┆
· ┃ @ │ < │ > │ $ │ % ┃ ^ │ & │ * │ ' │ ` ┃ ┆ ┆
· ┠─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┤
· ┃ │ ⁽ │ ⁾ │ │ ≠ ┃ */ │ ± │ — │ ÷ │ *¨ ┃ ┆ ┆
· ┃ { │ ( │ ) │ } │ = ┃ \ │ + │ - │ / │ " ┃ ┆ ┆
╭╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┴╌╌╌╌╌╯
┆ ┃ *~ │ │ │ – │ ┃ ¦ │ ¬ │ *¸ │ │ ┃ ·
┆ ┃ ~ │ [ │ ] │ _ │ # ┃ | │ ! │ ; │ : │ ? ┃ ·
╰╌╌╌╌╌┸─────┴─────┴─────┴─────┴─────┸─────┴─────┴─────┴─────┴─────┚ · · · · · ·
'''

[spacebar]
shift = "\u202f" # NARROW NO-BREAK SPACE
altgr = "\u0020" # SPACE
altgr_shift = "\u00a0" # NO-BREAK SPACE
1dk = "\u2019" # RIGHT SINGLE QUOTATION MARK
1dk_shift = "\u2019" # RIGHT SINGLE QUOTATION MARK
Loading

0 comments on commit 27b09b5

Please sign in to comment.