diff options
author | Christopher Faylor <me@cgf.cx> | 2003-09-27 02:36:50 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-09-27 02:36:50 +0000 |
commit | 63726a5eb47ec3a95be7dfa96443119e1c762f6b (patch) | |
tree | 34082d9620f9b98d231c498b761c4a790dcdc402 /winsup/cygwin/fhandler_tty.cc | |
parent | ecc28ff8db7c43779f328d31633d5f8358a3cf5b (diff) | |
download | cygnal-63726a5eb47ec3a95be7dfa96443119e1c762f6b.tar.gz cygnal-63726a5eb47ec3a95be7dfa96443119e1c762f6b.tar.bz2 cygnal-63726a5eb47ec3a95be7dfa96443119e1c762f6b.zip |
* fhandler_console.c (fhandler_console::read): Record the state of the SHIFT,
CTRL and ALT keys at the time of the last keyboard input event.
(fhandler_console::ioctl): Handle requests to retrieve the keyboard modifiers
via the TIOCLINUX command.
* fhandler_tty.c (fhandler_tty_slave::read): Ditto.
* include/sys/termios.h (TIOCLINUX): New macro definition.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index d0499f236..87aaca73a 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1028,6 +1028,7 @@ fhandler_tty_slave::ioctl (unsigned int cmd, void *arg) { case TIOCGWINSZ: case TIOCSWINSZ: + case TIOCLINUX: break; case FIONBIO: set_nonblocking (*(int *) arg); @@ -1071,6 +1072,21 @@ fhandler_tty_slave::ioctl (unsigned int cmd, void *arg) WaitForSingleObject (ioctl_done_event, INFINITE); } break; + case TIOCLINUX: + int val = * (unsigned char *) arg; + if (val == 6 && ioctl_request_event && ioctl_done_event) + { + get_ttyp ()->arg.value = val; + SetEvent (ioctl_request_event); + WaitForSingleObject (ioctl_done_event, INFINITE); + * (unsigned char *) arg = get_ttyp ()->arg.value & 0xFF; + } + else + { + get_ttyp ()->ioctl_retval = -1; + set_errno (EINVAL); + } + break; } release_output_mutex (); |