Add DECPAM and DECPNM
This commit is contained in:
parent
f9cc8f6584
commit
5088f9b8e5
@ -934,8 +934,17 @@ class Screen(QObject):
|
|||||||
y -= self.margins.top
|
y -= self.margins.top
|
||||||
self.write_process_input(ctrl.CSI + "{0};{1}R".format(y, x).encode('ascii'))
|
self.write_process_input(ctrl.CSI + "{0};{1}R".format(y, x).encode('ascii'))
|
||||||
|
|
||||||
|
def numeric_keypad_mode(self):
|
||||||
|
pass # TODO: Implement this
|
||||||
|
|
||||||
|
def application_keypad_mode(self):
|
||||||
|
pass # TODO: Implement this
|
||||||
|
|
||||||
def debug(self, *args, **kwargs):
|
def debug(self, *args, **kwargs):
|
||||||
"""Endpoint for unrecognized escape sequences.
|
"""Endpoint for unrecognized escape sequences.
|
||||||
|
|
||||||
By default is a noop.
|
By default is a noop.
|
||||||
"""
|
"""
|
||||||
|
import traceback
|
||||||
|
traceback.print_stack()
|
||||||
|
print('unknown escape code:', args, kwargs)
|
||||||
|
|||||||
@ -39,6 +39,12 @@ DECSC = b"7"
|
|||||||
#: selection. If none were saved, move cursor to home position.
|
#: selection. If none were saved, move cursor to home position.
|
||||||
DECRC = b"8"
|
DECRC = b"8"
|
||||||
|
|
||||||
|
#: Set numeric keypad mode
|
||||||
|
DECPNM = b'>'
|
||||||
|
|
||||||
|
#: Set application keypad mode
|
||||||
|
DECPAM = b'='
|
||||||
|
|
||||||
# "Sharp" escape sequences.
|
# "Sharp" escape sequences.
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
||||||
|
|||||||
@ -82,6 +82,8 @@ class Stream(object):
|
|||||||
esc.HTS: "set_tab_stop",
|
esc.HTS: "set_tab_stop",
|
||||||
esc.DECSC: "save_cursor",
|
esc.DECSC: "save_cursor",
|
||||||
esc.DECRC: "restore_cursor",
|
esc.DECRC: "restore_cursor",
|
||||||
|
esc.DECPNM: 'numeric_keypad_mode',
|
||||||
|
esc.DECPAM: 'application_keypad_mode',
|
||||||
}
|
}
|
||||||
|
|
||||||
#: "sharp" escape sequences -- ``ESC # <N>``.
|
#: "sharp" escape sequences -- ``ESC # <N>``.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user