partial fix for #K3869 - curses: meta characters

Meta-key fix for curses interface running on top of ncurses library.
Previously only digits and lower case letters would produce a meta
character when combined with Alt (or Option on Apple keyboards), now
it should work for any basic character (not arrows or other function
keys).  It only works on terminals that send two characters ESC k
for Alt+k but that is not a change in behavior.

curses interface running on top of PDcurses library uses different
code which isn't fixed by this.  The alt key fixup it does have was
already present in curses_read_char() and recently got duplicated in
curses_convert_keys().  At least one other routine calls the latter
so it was necessary, but curses_read_char() calls that routine so
doesn't need to keep its own copy of the fixup.
This commit is contained in:
PatR
2023-02-28 10:14:25 -08:00
parent 7c0d65718c
commit 6ba11256ba
2 changed files with 34 additions and 62 deletions
+1 -1
View File
@@ -1541,7 +1541,7 @@ menu_get_selections(WINDOW *win, nhmenu *menu, int how)
if (isdigit(curletter) && !groupaccels[curletter]) {
count = curses_get_count(curletter);
/* after count, we know some non-digit is already pending */
curletter = getch();
curletter = curses_getch();
count_letter = (count > 0L) ? curletter : '\0';
/* remove the count wind (erases last line of message wind) */