[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/7] Reduce curses escdelay from 1s to 25ms
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 1/7] Reduce curses escdelay from 1s to 25ms |
Date: |
Thu, 7 Mar 2019 16:11:35 +0100 |
From: Samuel Thibault <address@hidden>
By default, curses will only report single ESC key event after 1s delay,
since ESC is also used for keypad escape sequences. This however makes
users believe that ESC is not working. Reducing to 25ms provides good user
experience, while still allowing 25ms for keypad sequences to get in, which
should be enough.
Signed-off-by: Samuel Thibault <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/curses.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui/curses.c b/ui/curses.c
index 6e0091c3b286..870273de51a9 100644
--- a/ui/curses.c
+++ b/ui/curses.c
@@ -231,7 +231,7 @@ static void curses_refresh(DisplayChangeListener *dcl)
keycode = curses2keycode[chr];
keycode_alt = 0;
- /* alt key */
+ /* alt or esc key */
if (keycode == 1) {
int nextchr = getch();
@@ -361,6 +361,7 @@ static void curses_setup(void)
initscr(); noecho(); intrflush(stdscr, FALSE);
nodelay(stdscr, TRUE); nonl(); keypad(stdscr, TRUE);
start_color(); raw(); scrollok(stdscr, FALSE);
+ set_escdelay(25);
/* Make color pair to match color format (3bits bg:3bits fg) */
for (i = 0; i < 64; i++) {
--
2.18.1
- [Qemu-devel] [PULL 0/7] Ui 20190307 patches, Gerd Hoffmann, 2019/03/07
- [Qemu-devel] [PULL 1/7] Reduce curses escdelay from 1s to 25ms,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 3/7] iconv: detect and make curses depend on it, Gerd Hoffmann, 2019/03/07
- [Qemu-devel] [PULL 5/7] vnc: fix update stalls, Gerd Hoffmann, 2019/03/07
- [Qemu-devel] [PULL 4/7] curses: add option to specify VGA font encoding, Gerd Hoffmann, 2019/03/07
- [Qemu-devel] [PULL 2/7] curses: support wide input, Gerd Hoffmann, 2019/03/07
- [Qemu-devel] [PULL 6/7] vnc: allow specifying a custom authorization object name, Gerd Hoffmann, 2019/03/07
- [Qemu-devel] [PULL 7/7] monitor: deprecate acl_show, acl_reset, acl_policy, acl_add, acl_remove, Gerd Hoffmann, 2019/03/07
- Re: [Qemu-devel] [PULL 0/7] Ui 20190307 patches, Peter Maydell, 2019/03/08