curses numpad handling comments

Update a couple of comments for yesterday's 8-bit escapes M-O to M-^O
fix.
This commit is contained in:
PatR
2023-08-14 13:08:11 -07:00
parent 8b57393027
commit 853613cb68

View File

@@ -1071,7 +1071,7 @@ curses_mouse_support(int mode) /* 0: off, 1: on, 2: alternate on */
#endif #endif
} }
/* caller just got an input character of ESC or M-O; /* caller just got an input character of ESC or M-^O;
note: curses converts a lot of escape sequences to single values greater note: curses converts a lot of escape sequences to single values greater
than 255 and those won't look like ESC to caller so won't get here */ than 255 and those won't look like ESC to caller so won't get here */
static int static int
@@ -1104,7 +1104,7 @@ parse_escape_sequence(int key, boolean *keypadnum)
ret = getch(); ret = getch();
if (ret == ERR) { if (ret == ERR) {
/* there was no additional char; treat as M-O below */ /* there was no additional char; treat as M-O or M-^O below */
ret = (key == '\033') ? 'O' : C('O'); ret = (key == '\033') ? 'O' : C('O');
} else if (ret >= 112 && ret <= 121) { /* 'p'..'y' */ } else if (ret >= 112 && ret <= 121) { /* 'p'..'y' */
*keypadnum = TRUE; /* convert 'p'..'y' to '0'..'9' below */ *keypadnum = TRUE; /* convert 'p'..'y' to '0'..'9' below */