[PATCH] key.c: Recognize keyboard modifiers on Cygwin.
- From: "Pavel Tsekov" <ptsekov gmx net>
- To: mc-devel gnome org
- Subject: [PATCH] key.c: Recognize keyboard modifiers on Cygwin.
- Date: Mon, 13 Sep 2004 16:21:30 +0200 (MEST)
Hello,
The attached patch enables retrieving of the state of the keyboard modifiers
when MC is running in Cygwin console as requested in:
http://mail.gnome.org/archives/mc-devel/2003-July/msg00049.html
The required functionality on the Cygwin part was commited almost an year
ago.
Thanks!
Pavel Tsekov
--
NEU: Bis zu 10 GB Speicher für e-mails & Dateien!
1 GB bereits bei GMX FreeMail http://www.gmx.net/de/go/mail
Index: key.c
===================================================================
RCS file: /cvsroot/mc/mc/src/key.c,v
retrieving revision 1.74
diff -u -p -r1.74 key.c
--- key.c 29 Aug 2004 23:30:18 -0000 1.74
+++ key.c 13 Sep 2004 14:10:41 -0000
@@ -59,6 +59,11 @@
# include <sys/ioctl.h>
#endif /* __linux__ */
+#ifdef __CYGWIN__
+# include <termios.h>
+# include <sys/ioctl.h>
+#endif /* __CYGWIN__ */
+
#ifdef __QNXNTO__
# include <dlfcn.h>
# include <Ph.h>
@@ -1276,7 +1281,7 @@ get_modifier (void)
result |= KEY_M_SHIFT;
}
#endif /* __QNXNTO__ */
-#ifdef __linux__
+#if defined __linux__ || (defined __CYGWIN__ && defined TIOCLINUX)
{
unsigned char modifiers = 6;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]