[vlc-commits] commit: Qt: fix F* keys in Preferences - #3827 (Jean-Baptiste Kempf )
git at videolan.org
git at videolan.org
Thu Jul 1 15:10:25 CEST 2010
vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jul 1 15:00:56 2010 +0200| [c34a9f9f70827b518743cf739b25be883e3c8443] | committer: Jean-Baptiste Kempf
Qt: fix F* keys in Preferences - #3827
KEY_F* are not sequential, while Qt::Key_F* are
Close #3827
(cherry picked from commit fe4a2f20f202d0c6ad275d33639d27ae04957f8d)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=c34a9f9f70827b518743cf739b25be883e3c8443
---
modules/gui/qt4/util/customwidgets.cpp | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/util/customwidgets.cpp b/modules/gui/qt4/util/customwidgets.cpp
index f0eeb2f..5b460c3 100644
--- a/modules/gui/qt4/util/customwidgets.cpp
+++ b/modules/gui/qt4/util/customwidgets.cpp
@@ -275,7 +275,19 @@ static const vlc_qt_key_t keys[] =
// Qt::Key_CapsLock
// Qt::Key_NumLock
// Qt::Key_ScrollLock
- /* F1 - F35 */
+ /* F1 - F35 - Qt goes to F35, VLC stops at F12 */
+ { Qt::Key_F1, KEY_F1 },
+ { Qt::Key_F2, KEY_F2 },
+ { Qt::Key_F3, KEY_F3 },
+ { Qt::Key_F4, KEY_F4 },
+ { Qt::Key_F5, KEY_F5 },
+ { Qt::Key_F6, KEY_F6 },
+ { Qt::Key_F7, KEY_F7 },
+ { Qt::Key_F8, KEY_F8 },
+ { Qt::Key_F9, KEY_F9 },
+ { Qt::Key_F10, KEY_F10 },
+ { Qt::Key_F11, KEY_F11 },
+ { Qt::Key_F12, KEY_F12 },
// Qt::Key_Super_L
// Qt::Key_Super_R
{ Qt::Key_Menu, KEY_MENU },
@@ -385,9 +397,6 @@ int qtEventToVLCKey( QKeyEvent *e )
#else
# error FIXME
#endif
- else /* Qt and X11 go to F35, but VLC stops at F12 */
- if( qtk >= Qt::Key_F1 && qtk <= Qt::Key_F12 )
- i_vlck = qtk - Qt::Key_F1 + KEY_F1;
else
{
const vlc_qt_key_t *map;
More information about the vlc-commits
mailing list