1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-06-30 06:35:24 +00:00

Mention EOT rather than RS

In my testing, not all terminal emulators have the same ctrl+enter
key accelerator for the ascii record seperator, so mention EOT
instead but still leave it in for those that might like it better.
This commit is contained in:
Derek Schmidt 2019-03-29 15:47:56 -07:00 committed by Ivan Habunek
parent 5d652754ec
commit 2a6206903f
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95

View File

@ -361,7 +361,7 @@ class EntryModal(Modal):
self.window.erase()
self.window.box()
draw_lines(self.window, ["{} (Ctrl+Enter to confirm):".format(self.title)], 1, 2, Color.WHITE)
draw_lines(self.window, ["{} (^D to confirm):".format(self.title)], 1, 2, Color.WHITE)
if self.footer:
window_height, window_width = self.window.getmaxyx()
draw_lines(self.window, [self.footer], window_height - self.pad_y + 1, 2, Color.WHITE)
@ -421,7 +421,7 @@ class EntryModal(Modal):
else:
curses.beep()
elif ch in (curses.ascii.RS, curses.ascii.EOT):
elif ch in (curses.ascii.EOT, curses.ascii.RS): # ^D or (for some terminals) Ctrl+Enter
return False, False
elif ch == curses.ascii.ESC:
@ -452,7 +452,7 @@ class EntryModal(Modal):
class ComposeModal(EntryModal):
def __init__(self, stdscr, default_cw=None):
super().__init__(stdscr, title="Compose a toot", footer="Ctrl+Enter to submit, ESC to quit, ^S to mark sensitive (cw)")
super().__init__(stdscr, title="Compose a toot", footer="^D to submit, ESC to quit, ^S to mark sensitive (cw)")
self.cw = default_cw
self.cwmodal = EntryModal(stdscr, title="Content warning", size=(1, 60), default=self.cw)