[MPlayer-dev-eng] [PATCH] F11 and F12 support in the input system
Diego Biurrun
diego at biurrun.de
Fri Jan 16 05:43:59 CET 2004
Hi!
I noticed that F11 and F12 cannot be bound to a command. Here is a
patch that fixes it. It's trivial and tested, so I'll commit tomorrow
if nobody objects.
While grepping through the sources I noticed that keys also get
defined in Gui/wm/wskeys.h and Gui/wm/wsmkeys.h, so I made a second
patch for Gui/. F11 and F12 work in the GUI without adding these
defines. Arpi said on IRC that they have been obsoleted by the new
input system but may still be used by some output drivers. grep did
not turn up anything, though. I'll also commit this in a few days if
nobody objects.
Diego
Index: input/input.c
===================================================================
RCS file: /cvsroot/mplayer/main/input/input.c,v
retrieving revision 1.87
diff -u -r1.87 input.c
--- input/input.c 30 Nov 2003 16:36:07 -0000 1.87
+++ input/input.c 14 Jan 2004 19:56:04 -0000
@@ -166,6 +166,8 @@
{ KEY_F+8, "F8" },
{ KEY_F+9, "F9" },
{ KEY_F+10, "F10" },
+ { KEY_F+11, "F11" },
+ { KEY_F+12, "F12" },
{ KEY_KP0, "KP0" },
{ KEY_KP1, "KP1" },
{ KEY_KP2, "KP2" },
Index: libvo/wskeys.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/wskeys.h,v
retrieving revision 1.7
diff -u -r1.7 wskeys.h
--- libvo/wskeys.h 24 Sep 2003 07:38:57 -0000 1.7
+++ libvo/wskeys.h 14 Jan 2004 19:56:04 -0000
@@ -114,6 +114,8 @@
#define wsF8 0xc5 + 256
#define wsF9 0xc6 + 256
#define wsF10 0xc7 + 256
+#define wsF11 0xc8 + 256
+#define wsF12 0xc9 + 256
#define wsInsert 0x63 + 256
#define wsDelete 0xff + 256
#define wsHome 0x50 + 256
Index: libvo/x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.161
diff -u -r1.161 x11_common.c
--- libvo/x11_common.c 8 Dec 2003 12:03:03 -0000 1.161
+++ libvo/x11_common.c 14 Jan 2004 19:56:05 -0000
@@ -479,6 +479,8 @@
case wsF8: mplayer_put_key(KEY_F+8); break;
case wsF9: mplayer_put_key(KEY_F+9); break;
case wsF10: mplayer_put_key(KEY_F+10); break;
+ case wsF11: mplayer_put_key(KEY_F+11); break;
+ case wsF12: mplayer_put_key(KEY_F+12); break;
case wsq:
case wsQ: mplayer_put_key('q'); break;
case wsp:
Index: Gui/wm/wskeys.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/wskeys.h,v
retrieving revision 1.4
diff -u -r1.4 wskeys.h
--- Gui/wm/wskeys.h 25 May 2002 09:46:37 -0000 1.4
+++ Gui/wm/wskeys.h 14 Jan 2004 19:56:51 -0000
@@ -104,6 +104,8 @@
#define wsF8 0xc5 + 256
#define wsF9 0xc6 + 256
#define wsF10 0xc7 + 256
+#define wsF11 0xc8 + 256
+#define wsF12 0xc9 + 256
#define wsInsert 0x63 + 256
#define wsDelete 0xff + 256
#define wsHome 0x50 + 256
Index: Gui/wm/wsmkeys.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/wsmkeys.h,v
retrieving revision 1.3
diff -u -r1.3 wsmkeys.h
--- Gui/wm/wsmkeys.h 14 May 2002 11:41:01 -0000 1.3
+++ Gui/wm/wsmkeys.h 14 Jan 2004 19:56:51 -0000
@@ -28,6 +28,7 @@
{ wsF1, "F1" }, { wsF2, "F2" }, { wsF3, "F3" }, { wsF4, "F4" }, { wsF5, "F5" },
{ wsF6, "F6" }, { wsF7, "F7" }, { wsF8, "F8" }, { wsF9, "F9" }, { wsF10, "F10" },
+ { wsF12, "F12" }, { wsF11, "F11" },
{ wsEnter, "Enter" }, { wsTab, "Tab" }, { wsSpace, "Space" },
{ wsInsert, "Insert" }, { wsDelete, "Delete" }, { wsHome, "Home" },
More information about the MPlayer-dev-eng
mailing list