keyboard/altgr/weur: dweurak reimplementation for dvorak map
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 15 Mar 2024 22:47:22 +0000 (23:47 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 8 Apr 2024 15:39:26 +0000 (17:39 +0200)
Replace random results from qwerty positioning by a complete reorder
where accents can consistently repeat the aoeui vowels, with consonants
(including ß) still at base letters, and remaining dead keys clustered
neatly at the top right.

Seriously wondering if this was the original layout as it all fits so much
better.

keyboard/altgr/weur.eng.inc.pl

index 6ef09eb6188412c5656cd2e5a1e759df038387e9..c3b35163c90def680611b26df6463e4ca609b951 100644 (file)
@@ -1,6 +1,7 @@
 use utf8;
 use strict;
 use warnings;
+no warnings 'qw';
 use Shiar_Sheet::KeyboardChars 'kbmodes';
 
 my %rows = (
@@ -154,6 +155,23 @@ my %rows = (
        },
 );
 
+our %get;
+my $dweur = $get{map} && $get{map} eq 'dvorak';
+if ($dweur) {
+       my $dq = q{
+               'z ,l .d pj yk  fq gt  r, l'
+               dv hb s8  tw 8.
+               ;s qp jr ky xm  bx m; wf vh zg
+       };
+       my %dq = split //, $dq =~ s/\s//gr;  # dvorak => qwerty key
+
+       my %uc = (qw{ ' "  , <  . >  ; :  - _  8 * }, map {lc, uc} 'a'..'z');
+       $dq{ $uc{$_} } = $uc{ $dq{$_} } for keys %dq;  # same shifted
+
+       @{ $rows{''} }{keys %dq} = map { $rows{''}{$_} } values %dq;
+       $rows{S} = delete $rows{'*'};
+}
+
 +{
        %{ kbmodes(\%rows) },
        mode => {
@@ -161,7 +179,7 @@ my %rows = (
                '*' => 'greek mode ⌥*',
        },
        version => '1.0', # upstream v2.0 2021/04/12
-       title => 'Western European',
+       title => $dweur ? 'dWEURak' : 'Western European',
        category => 'latin/thirdparty/xorg',
        intro => join("\n",
                'Layout (<a href="https://altgr-weur.eu/" target=_blank>available</a> for major OSes)',