home
·
contact
·
privacy
projects
/
ircplom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
96d4572
)
Handle ctrl+l as screen resize event, compatible with dtach's defaults.
master
author
Christian Heller
<c.heller@plomlompom.de>
Tue, 17 Jun 2025 15:52:36 +0000
(17:52 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Tue, 17 Jun 2025 15:52:36 +0000
(17:52 +0200)
ircplom/tui.py
patch
|
blob
|
history
diff --git
a/ircplom/tui.py
b/ircplom/tui.py
index 77d098d3ecc0de84e8a69006eac197cf6bcf663d..7345aa83bb574931a7a72e788203c7e6f2589bb5 100644
(file)
--- a/
ircplom/tui.py
+++ b/
ircplom/tui.py
@@
-28,6
+28,7
@@
_PROMPT_TEMPLATE = '> '
_PROMPT_ELL_IN = '<…'
_PROMPT_ELL_OUT = '…>'
_PROMPT_ELL_IN = '<…'
_PROMPT_ELL_OUT = '…>'
+_ORD_CHAR_RESIZE = 12
_KEYBINDINGS = {
'KEY_BACKSPACE': ('window.prompt.backspace',),
'KEY_ENTER': ('prompt_enter',),
_KEYBINDINGS = {
'KEY_BACKSPACE': ('window.prompt.backspace',),
'KEY_ENTER': ('prompt_enter',),
@@
-402,7
+403,9
@@
class _KeyboardLoop(Loop, BroadcastMixin):
'Loop receiving and translating keyboard events towards main loop.'
def process_bonus(self, yielded: str) -> None:
'Loop receiving and translating keyboard events towards main loop.'
def process_bonus(self, yielded: str) -> None:
- if yielded.startswith(_B64_PREFIX):
+ if yielded and ord(yielded[0]) == _ORD_CHAR_RESIZE:
+ self.broadcast(_SetScreenEvent)
+ elif yielded.startswith(_B64_PREFIX):
encoded = yielded[len(_B64_PREFIX):]
to_paste = ''
for i, c in enumerate(b64decode(encoded).decode('utf-8')):
encoded = yielded[len(_B64_PREFIX):]
to_paste = ''
for i, c in enumerate(b64decode(encoded).decode('utf-8')):