aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorPascal Bellard <pascal.bellard@ads-lu.com>2011-04-11 03:52:53 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-04-11 03:52:53 +0200
commit6161cdbb83bc35c20cf582bfce203f3e0632fbda (patch)
tree3cefae86b24fb72ba763f8fbb4d72de0b906ed83 /miscutils
parent5bc8c005a8e15c43285bc595a8d404de67a482ac (diff)
downloadbusybox-6161cdbb83bc35c20cf582bfce203f3e0632fbda.tar.gz
conspy: fix ESC key lost
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/conspy.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/miscutils/conspy.c b/miscutils/conspy.c
index 9c5405332..90ef91c5c 100644
--- a/miscutils/conspy.c
+++ b/miscutils/conspy.c
@@ -504,16 +504,17 @@ int conspy_main(int argc UNUSED_PARAM, char **argv)
}
}
poll_timeout_ms = 250;
+ if (option_mask32 & FLAG(v)) continue;
// Insert all keys pressed into the virtual console's input
// buffer. Don't do this if the virtual console is in scan
// code mode - giving ASCII characters to a program expecting
// scan codes will confuse it.
- if (!(option_mask32 & FLAG(v)) && G.escape_count == 0) {
+ G.key_count += bytes_read;
+ if (G.escape_count == 0) {
int handle, result;
long kbd_mode;
- G.key_count += bytes_read;
handle = xopen(tty_name, O_WRONLY);
result = ioctl(handle, KDGKBMODE, &kbd_mode);
if (result >= 0) {