keyboard: recombine translations in include syntax
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 7 Apr 2024 15:29:40 +0000 (17:29 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 22 Apr 2024 22:53:55 +0000 (00:53 +0200)
commitc4ca0bd3e94a7978772dadaa3b941ecc84741407
tree26bae83f68cce69546fc935ec99cf92ff26150bd
parent2e8c1e3cc39cc1c6e4b858242d2a3a39481b9640
keyboard: recombine translations in include syntax

Append {key} descriptions to {def} classes to prevent partial declarations
and simplify maintenance.  Distinct translations did not materialise as
expected, and can still be implemented in another way.

Undoes the painstaking separation in commit v1.3-0-g2034c72e12 (2010-06-18)
[overhaul keyboard module include syntax], already rejoined in commit
v1.10-46-g4c43bcbed6 (2017-07-17) [move key definitions into translation
includes], now basically completely reverted by some dumb labour helped by
this vim macro:

:%s/=> '=\([^']\+\)',/=> \\'\1',/  " replace aliases
:let @a="^mo\"eyi'[{^\"uyi'gg/\\V'\<C-r>u\<C-r>e'\<CR>4lf \"iy$dd'o4lf a[\ef,\"ipi]\ej"
"        └(1)└(2) └(3)     └(4)  └──────────────┘     └(5)       └(6)   └─────────┘

(1): Original position before {key} declaration
(2): e = single-quoted character
(3): u = key character(s) from containing hash (lead)
(4): find topmost lead+key match for corresponding {def}
(5): i = definition value, then delete definition line
(6): wrap Original key in array and add def value
24 files changed:
Shiar_Sheet/Keyboard.pm
Shiar_Sheet/KeyboardChars.pm
keyboard.plp
keyboard/altgr/apl.eng.inc.pl
keyboard/altgr/emojiworks.eng.inc.pl
keyboard/altgr/index.inc.pl
keyboard/altgr/index.inc.plp
keyboard/altgr/msx-graph.eng.inc.pl
keyboard/altgr/msx.eng.inc.pl
keyboard/altgr/spacecadet.eng.inc.pl
keyboard/altgr/symbolics.eng.inc.pl
keyboard/altgr/unigraph.eng.inc.pl
keyboard/altgr/windows.eng.inc.pl
keyboard/altgr/zoo.eng.inc.pl
keyboard/less.eng.inc.pl
keyboard/mplayer.eng.inc.pl
keyboard/mpv.eng.inc.pl
keyboard/mutt.eng.inc.pl
keyboard/nethack.eng.inc.pl
keyboard/readline.eng.inc.pl
keyboard/screen.eng.inc.pl
keyboard/vi.eng.inc.pl
keyboard/vimperator.eng.inc.pl
keys.inc.pl