keyboard/altgr/index: move ctrl rows to distinct inventory mode master
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 20 May 2024 22:45:41 +0000 (00:45 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 21 May 2024 19:50:13 +0000 (21:50 +0200)
Prevent inflation of emojiworks, similar to meta rows elsewhere.

keyboard/altgr/index.inc.pl

index 1f77fa7c855cc148e1a211842330f45a1d28cb6d..b864e13c8d3593060d523664690f256b0acd438d 100644 (file)
@@ -18,10 +18,10 @@ for my $name (map {@{$_}} values %cat) {
 
        $row{mode} //= {'' => undef};
 
-       if (($keys->{moderows} // '') =~ /^\d* [45] \d{2,}/x) {
-               # move root +meta keys to distinct mode
+       if (($keys->{moderows} // '') =~ /^\d* [3-9] \d{2,}/x) {
+               # move root ^ctrl or +meta keys to distinct mode
                $row{mode}{"\e"} = '+';
-               /^\+./ and $keys->{def}{"\e"}{$_} = delete $keys->{def}{''}{$_}
+               /^[+^]./ and $keys->{def}{"\e"}{$_} = delete $keys->{def}{''}{$_}
                        for keys %{ $keys->{def}{''} };
        }