From c2f9c9e9c05d8639e4d968efd26c393fcf6da1f1 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 15 Dec 2023 23:49:10 +0100 Subject: [PATCH] keyboard: custom rows overrides in moderows attribute --- keyboard.plp | 2 +- nethack.eng.inc.pl | 1 + nethack.plp | 1 - readline.eng.inc.pl | 1 + readline.plp | 1 - 5 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboard.plp b/keyboard.plp index ea62b5a..8bbe8f7 100644 --- a/keyboard.plp +++ b/keyboard.plp @@ -33,7 +33,7 @@ say "

", $info->{mode}->{''}, " (default)

" use Shiar_Sheet::Keyboard 2.08; my $keys = Shiar_Sheet::Keyboard->new($info); $keys->map($get{map}) or undef $get{map}; -$keys->print_rows($get{rows}, $info->{rows}); +$keys->print_rows($get{rows} || $info->{moderows}, $info->{rows}); { say "
\n"; diff --git a/nethack.eng.inc.pl b/nethack.eng.inc.pl index ba24b9e..19aa7a3 100644 --- a/nethack.eng.inc.pl +++ b/nethack.eng.inc.pl @@ -10,6 +10,7 @@ description => [ intro => "Command bindings for version 3.6.1 of the vanilla NetHack game.", keywords => [qw' nethack rogue game controls '], rows => [3, 2, 1, 0], +moderows => '4321-421', key => { 'b' => "step left down\nnumpad 1", diff --git a/nethack.plp b/nethack.plp index 474fa10..81d9ee3 100644 --- a/nethack.plp +++ b/nethack.plp @@ -1,4 +1,3 @@ <: $Request = 'nethack'; -$get{rows} ||= '4321-421'; Include 'keyboard.plp'; diff --git a/readline.eng.inc.pl b/readline.eng.inc.pl index 643c5de..5e5b0cd 100644 --- a/readline.eng.inc.pl +++ b/readline.eng.inc.pl @@ -9,6 +9,7 @@ description => [ ], keywords => [qw( readline gnu bash emacs editing curses )], rows => [4, 3, 2], +moderows => '^x=213', key => { '+<' => "history start", diff --git a/readline.plp b/readline.plp index 0bb69d6..62dd7fc 100644 --- a/readline.plp +++ b/readline.plp @@ -1,4 +1,3 @@ <: $Request = 'readline'; -$get{rows} ||= '^x=213'; Include 'keyboard.plp'; -- 2.30.0