Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds ANSI control codes #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pyte/escape.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,9 @@

#: *Horizontal position adjust*: Same as :data:`CHA`.
HPA = "'"

#: *Set Alternate keypad mode*: Not sure what this is. Maybe what it says on the tin?
DECKPAM = "="

#: * Set numeric keypad mode*: Undocumented for now.
DECKPNM = ">"
6 changes: 6 additions & 0 deletions pyte/screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,12 @@ def backspace(self):
"""
self.cursor_back()

def set_alternate_keypad(self):
pass

def set_numeric_keypad(self):
pass

def save_cursor(self):
"""Push the current cursor position onto the stack."""
self.savepoints.append(Savepoint(copy.copy(self.cursor),
Expand Down
2 changes: 2 additions & 0 deletions pyte/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ class Stream(object):
esc.HTS: "set_tab_stop",
esc.DECSC: "save_cursor",
esc.DECRC: "restore_cursor",
esc.DECKPAM: "set_alternate_keypad",
esc.DECKPNM: "set_numeric_keypad",
}

#: "sharp" escape sequences -- ``ESC # <N>``.
Expand Down