mirror of
https://github.com/python/cpython.git
synced 2024-11-24 00:38:00 +01:00
gh-124027: Support Del, PgUp, and PgDn on TERM=vt100 (#124028)
pyrepl: Support Del, PgUp, and PgDn on TERM=vt100 From Fedora's /etc/inputrc: "\e[5~": history-search-backward "\e[6~": history-search-forward "\e[3~": delete-char Fixes https://github.com/python/cpython/issues/124027
This commit is contained in:
parent
6e06e01881
commit
f4e5643df6
@ -266,7 +266,9 @@ class HistoricalReader(Reader):
|
||||
(r"\M-r", "restore-history"),
|
||||
(r"\M-.", "yank-arg"),
|
||||
(r"\<page down>", "history-search-forward"),
|
||||
(r"\x1b[6~", "history-search-forward"),
|
||||
(r"\<page up>", "history-search-backward"),
|
||||
(r"\x1b[5~", "history-search-backward"),
|
||||
)
|
||||
|
||||
def select_item(self, i: int) -> None:
|
||||
|
@ -150,6 +150,7 @@ default_keymap: tuple[tuple[KeySpec, CommandName], ...] = tuple(
|
||||
(r"\<right>", "right"),
|
||||
(r"\C-\<right>", "forward-word"),
|
||||
(r"\<delete>", "delete"),
|
||||
(r"\x1b[3~", "delete"),
|
||||
(r"\<backspace>", "backspace"),
|
||||
(r"\M-\<backspace>", "backward-kill-word"),
|
||||
(r"\<end>", "end-of-line"), # was 'end'
|
||||
|
@ -0,0 +1,2 @@
|
||||
Support ``<page up>``, ``<page down>``, and ``<delete>`` keys in the Python
|
||||
REPL when ``$TERM`` is set to ``vt100``.
|
Loading…
Reference in New Issue
Block a user