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

Typematrix, keycodes & dead keys #198

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Conversation

wismill
Copy link
Collaborator

@wismill wismill commented Nov 20, 2024

I am creating this MR only to make sure my work does not get lost, but I have no plan anymore to work on Kalamine.

The MR adds:

  • Typematrix geometry
  • Support for special symbols (e.g. Enter, Shift, etc.)
  • Custom dead keys (and corresponding Compose generation)
  • Support for strings (XKB only, but all drivers should support it)
  • Support mapping without using the ASCII art
  • Support cloning keys/levels
  • Keycodes refactor (see Keycodes refactor #171)
  • Numpad keys

This got out of sync and may require KLC and macOS implementation.

Feel free to build on it (leave me as co-author).


Example:

name        = "xxx"
name8       = "xxx"
locale      = "fr"
variant     = "xxx"
description = "xxx"
author      = "xxx"
url         = "https://github.com/Lysquid/Erglace"
geometry    = "TYPEMATRIX"
version     = "0.3.3"

# NOTE: Support for strings, see: U/Où
# NOTE: Support for system symbols: ⌫, ⎇, etc.

base = '''
╭╌╌╌╌╌┰─────┬─────┬─────┬─────┬─────┰─────┰─────┬─────┬─────┬─────┬─────┰╌╌╌╌╌┬╌╌╌╌╌┬╌╌╌╌╌╮
┆     ┆     ┆     ┆     ┆     ┆     ┆ ⌦   ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆
┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆
├╌╌╌╌╌╁─────┼─────┼─────┼─────┼─────╁─────╁─────┼─────┼─────┼─────┼─────╁╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┤
┆ ~   ┃ !   │ @*² │ #   │ $   │ %   ┃ ⌫   ┃ ^ ‚ │ & ‘ │ * ’ │ ( ‹ │ ) › ┃ _ – ┆ + ± ┆     ┆
┆ `   ┃ 1 ä │ 2 ÿ │ 3 ë │ 4 ü │ 5 ö ┃     ┃ 6 „ │ 7 “ │ 8 ” │ 9 « │ 0 » ┃ / ÷ ┆ = ≠ ┆     ┆
├╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────┨     ┠─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┤
┆ ↹   ┃ É   │ Y   │ O   │ F   │ K   ┃     ┃ V   │ P ʺ │ L   │ C   │ Q   ┃ {   ┆ }   ┆     ┆
┆     ┃   â │   ï │   ê │   û │   œ ┃     ┃   – │   ʹ │   " │   ç │   ' ┃ [   ┆ ]   ┆     ┆
├╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┤
┆ ⇬   ┃ A   │ I   │ E   │ UOù │ ;   ┃ ⏎   ┃ B   │ T • │ N   │ S   │ R   ┃ ⇬   ┆ ⇬   ┆     ┆
┆ ⇧   ┃   à │   î │   è │  où │ , ô ┃     ┃   — │   · │   ñ │   ß │   ’ ┃ ⇧   ┆ ⇧   ┆     ┆
┆     ┠─────┼─────┼─────┼─────┼─────┨     ┠─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┤     ├╌╌╌╌╌┤
┆     ┃ :   │ X   │ ⁃   │ H   │ Z   ┃     ┃ W   │ D   │ M   │ G   │ JJ’ ┃ ⎋   ┆     ┆     ┆
┆     ┃ . á │   í │ - ‑ │   ú │   ó ┃     ┃     │   Δ │   µ │  *µ │  j’ ┃     ┆     ┆     ┆
├╌╌╌╌╌╂─────┼─────┼─────┼─────┴─────┸─────┸─────┴─────┼─────┼─────┼─────╀╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┤
┆     ┆ •   ┆ ⎄ „ ┆** “ ┆ _                         ⍽ ┆** ” ┆     ┆     ┆     ┆     ┆     ┆
┆     ┆ + æ ┆   ‚ ┆   ‘ ┆ ␣                        n⍽ ┆   ’ ┆     ┆     ┆     ┆     ┆     ┆
├╌╌╌╌╌┼╌╌╌╌╌┴╌╌┬╌╌┴╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┤     ├╌╌╌╌╌┤
┆ Fn  ┆        ┆    ⎇ ‹ ┆                             ┆ ⇮ › ┆     ┆     ┆     ┆     ┆     ┆
┆     ┆        ┆      « ┆                             ┆   » ┆     ┆     ┆     ┆     ┆     ┆
╰╌╌╌╌╌┴╌╌╌╌╌╌╌╌┴╌╌╌╌╌╌╌╌╯                             ╰╌╌╌╌╌┴╌╌╌╌╌┴╌╌╌╌╌┴╌╌╌╌╌┴╌╌╌╌╌╯╌╌╌╌╌╯
'''

altgr = '''
╭╌╌╌╌╌┰─────┬─────┬─────┬─────┬─────┰─────┰─────┬─────┬─────┬─────┬─────┰╌╌╌╌╌┬╌╌╌╌╌┬╌╌╌╌╌╮
┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆
┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆     ┆
├╌╌╌╌╌╁─────┼─────┼─────┼─────┼─────╁─────╁─────┼─────┼─────┼─────┼─────╁╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┤
┆     ┃   ¹ │   ² │   ³ │   ⁴ │   ⁵ ┃     ┃   ⁶ │   ⁷ │   ⁸ │   ⁹ │   ⁰ ┃     ┆     ┆     ┆
┆     ┃   ₁ │   ₂ │   ₃ │   ₄ │   ₅ ┃     ┃   ₆ │   ₇ │   ₈ │   ₉ │   ₀ ┃     ┆     ┆     ┆
├╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────┨     ┠─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┤
┆     ┃     │     │   ⌘ │   ¡ │   ≈ ┃     ┃     │   ¿ │   ⸢ │   ⸣ │   ‰ ┃     ┆     ┆     ┆
┆     ┃   \ │   @ │   # │   ! │   ~ ┃     ┃   ⸮ │   ? │   [ │   ] │   % ┃     ┆     ┆     ┆
├╌╌╌╌╌╂─────┼─────┼─────┼─────┼─────╂─────╂─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┤
┆     ┃   ÷ │     │     │   ‖ │     ┃     ┃     │   ⅋ │   〈 │   〉 │   ≠ ┃     ┆     ┆     ┆
┆     ┃   / │   ( │   ) │   | │   ; ┃     ┃   ` │   & │   { │   } │   = ┃     ┆     ┆     ┆
┆     ┠─────┼─────┼─────┼─────┼─────┨     ┠─────┼─────┼─────┼─────┼─────╂╌╌╌╌╌┤     ├╌╌╌╌╌┤
┆     ┃   ∘ │   × │   − │   ⩾ │     ┃     ┃   ⋮ │   ⩽ │   ± │     │  *¤ ┃     ┆     ┆     ┆
┆     ┃   : │   * │   - │   > │   ¬ ┃     ┃   … │   < │   + │   ^ │   $ ┃     ┆     ┆     ┆
├╌╌╌╌╌╀─────┼─────┼─────┼─────┴─────┸─────┸─────┴─────┼─────┼─────┼─────╀╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┤
┆     ┆   ± ┆     ┆     ┆                           ⍽ ┆     ┆     ┆     ┆     ┆     ┆     ┆
┆     ┆   + ┆     ┆     ┆                          n⍽ ┆     ┆     ┆     ┆     ┆     ┆     ┆
├╌╌╌╌╌┼╌╌╌╌╌┴╌╌┬╌╌┴╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌┤     ├╌╌╌╌╌┤
┆ Fn  ┆        ┆        ┆                             ┆     ┆     ┆     ┆     ┆     ┆     ┆
┆     ┆        ┆      " ┆                             ┆   ' ┆     ┆     ┆     ┆     ┆     ┆
╰╌╌╌╌╌┴╌╌╌╌╌╌╌╌┴╌╌╌╌╌╌╌╌╯                             ╰╌╌╌╌╌┴╌╌╌╌╌┴╌╌╌╌╌┴╌╌╌╌╌┴╌╌╌╌╌╯╌╌╌╌╌╯
'''

[spacebar]
shift       = "_"
altgr       = "\u202f"  # NARROW NO-BREAK SPACE
altgr_shift = "\u00a0"  # NO-BREAK SPACE
1dk       = "\u202f"  # NARROW NO-BREAK SPACE
1dk_shift = "\u00a0"  # NO-BREAK SPACE

# NOTE: support bindings without relying on the ASCII art
[mapping]
# NOTE: clone whole keys
ab11 = "(bksl)" # RO
i172 = "(lsgt)" # Play/pause
# NOTE: clone levels
bksp = {base = "", altgr="(lalt)", 1dk="(lalt)", 1dk_shift="(lalt)"}
tab  = {            altgr="(ralt)", 1dk="(ralt)", 1dk_shift="(ralt)"}
rtrn = {base = "", altgr="(ralt)", 1dk="(ralt)", 1dk_shift="(ralt)"}

[dead_keys]

# NOTE: custom dead key
[dead_keys."*²"]
name = "superscript"
base = "12"
alt  = "¹²"
alt_space = "²"
alt_self = "²"

@wismill wismill added enhancement New feature or request help wanted Extra attention is needed labels Nov 20, 2024
@Geobert Geobert self-assigned this Dec 4, 2024
@Geobert
Copy link
Collaborator

Geobert commented Dec 4, 2024

I’ll update this as it might fix the numpad decimal not working bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants