Add keypad mode support to replay commands
Also name the constants correctly
This commit is contained in:
@@ -34,6 +34,14 @@ def screen_bell() -> None:
|
|||||||
pass
|
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:
|
def screen_cursor_position(y: int, x: int) -> None:
|
||||||
write(CSI + '%s;%sH' % (y, x))
|
write(CSI + '%s;%sH' % (y, x))
|
||||||
|
|
||||||
|
|||||||
@@ -110,10 +110,10 @@
|
|||||||
#define ESC_DECRC '8'
|
#define ESC_DECRC '8'
|
||||||
|
|
||||||
// Set normal keypad mode
|
// Set normal keypad mode
|
||||||
#define ESC_DECPNM '>'
|
#define ESC_DECKPNM '>'
|
||||||
|
|
||||||
// Set alternate keypad mode
|
// Set alternate keypad mode
|
||||||
#define ESC_DECPAM '='
|
#define ESC_DECKPAM '='
|
||||||
|
|
||||||
// ECMA-48 CSI sequences.
|
// 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;
|
CALL_ED(screen_save_cursor); break;
|
||||||
case ESC_DECRC:
|
case ESC_DECRC:
|
||||||
CALL_ED(screen_restore_cursor); break;
|
CALL_ED(screen_restore_cursor); break;
|
||||||
case ESC_DECPNM:
|
case ESC_DECKPNM:
|
||||||
CALL_ED(screen_normal_keypad_mode); break;
|
CALL_ED(screen_normal_keypad_mode); break;
|
||||||
case ESC_DECPAM:
|
case ESC_DECKPAM:
|
||||||
CALL_ED(screen_alternate_keypad_mode); break;
|
CALL_ED(screen_alternate_keypad_mode); break;
|
||||||
case '%':
|
case '%':
|
||||||
case '(':
|
case '(':
|
||||||
|
|||||||
Reference in New Issue
Block a user