Add keypad mode support to replay commands
Also name the constants correctly
This commit is contained in:
parent
c68516ca8d
commit
025f6d7701
@ -34,6 +34,14 @@ def screen_bell() -> None:
|
||||
pass
|
||||
|
||||
|
||||
def screen_normal_keypad_mode() -> None:
|
||||
write('\x1b>')
|
||||
|
||||
|
||||
def screen_alternate_keypad_mode() -> None:
|
||||
write('\x1b=')
|
||||
|
||||
|
||||
def screen_cursor_position(y: int, x: int) -> None:
|
||||
write(CSI + '%s;%sH' % (y, x))
|
||||
|
||||
|
||||
@ -110,10 +110,10 @@
|
||||
#define ESC_DECRC '8'
|
||||
|
||||
// Set normal keypad mode
|
||||
#define ESC_DECPNM '>'
|
||||
#define ESC_DECKPNM '>'
|
||||
|
||||
// Set alternate keypad mode
|
||||
#define ESC_DECPAM '='
|
||||
#define ESC_DECKPAM '='
|
||||
|
||||
// ECMA-48 CSI sequences.
|
||||
// ---------------------
|
||||
|
||||
@ -225,9 +225,9 @@ handle_esc_mode_char(Screen *screen, uint32_t ch, PyObject DUMP_UNUSED *dump_cal
|
||||
CALL_ED(screen_save_cursor); break;
|
||||
case ESC_DECRC:
|
||||
CALL_ED(screen_restore_cursor); break;
|
||||
case ESC_DECPNM:
|
||||
case ESC_DECKPNM:
|
||||
CALL_ED(screen_normal_keypad_mode); break;
|
||||
case ESC_DECPAM:
|
||||
case ESC_DECKPAM:
|
||||
CALL_ED(screen_alternate_keypad_mode); break;
|
||||
case '%':
|
||||
case '(':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user