Qt keyboard fixups

Make ASCII control characters ^[, ^\, ^], ^^, and ^_ work on Qt,
at least partly.  Mainly for ^[ to be treated as ESC, which works
if you're aborting a count on the map but doesn't cancel out of
menus [yet?].  I didn't attempt to make ^@ send NUL.

Also, fix the hardcoded macros (activated by F1: rest 100 turns,
F2: search 20 times, and Tab: ^A to do-again).  The first two sent
'n' before the count so wouldn't work as intended with number_pad
off, and the third was executing twice as if Tab sent two ^A's
instead of just one.  Resting and searching might have been getting
duplicated too; I don't know how to simulate the relevant keys.
(I temporarily swapped definitions for F2 and Tab to test the
number_pad fix but hadn't done that earlier when I discovered the
Tab bug.)
This commit is contained in:
PatR
2020-08-30 16:44:39 -07:00
parent 0902d83d52
commit 3cd21e1d4f
2 changed files with 64 additions and 54 deletions

View File

@@ -1,4 +1,4 @@
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.291 $ $NHDT-Date: 1598661087 2020/08/29 00:31:27 $
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.292 $ $NHDT-Date: 1598831076 2020/08/30 23:44:36 $
General Fixes and Modified Features
-----------------------------------
@@ -392,6 +392,7 @@ Qt: tombstone showed newly constructed date instead of the value set up at
stared at or ignored prior --More-- for long enough on 31 December
Qt: menu choices All, None, Invert were setting, unsetting, or toggling menu
entry checkboxes internally but didn't redraw the menu to show that
Qt: fix the F1/F2/Tab macro keys to not require that number_pad be On
Qt+QSX: fix control key
Qt+OSX: rename menu entry "nethack->Preferences..." for invoking nethack's
'O' command to "Game->Run-time options" and entry "Game->Qt settings"