[vlc-commits] [Git][videolan/vlc][master] 8 commits: actions: shift special keys to make space

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Wed Nov 17 17:11:39 UTC 2021



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
30519571 by Rémi Denis-Courmont at 2021-11-17T16:42:06+00:00
actions: shift special keys to make space

- - - - -
de1a9b0b by Rémi Denis-Courmont at 2021-11-17T16:42:06+00:00
actions: define F13 through F35 keys

This recognises all the numbered function defined by X11 and Qt.

- - - - -
c5fa8315 by Rémi Denis-Courmont at 2021-11-17T16:42:06+00:00
xcb: map F13-F35

- - - - -
e284e894 by Rémi Denis-Courmont at 2021-11-17T16:42:06+00:00
win32: map F13-F24

- - - - -
0e6a684b by Rémi Denis-Courmont at 2021-11-17T16:42:06+00:00
Qt: map F13-F35

- - - - -
787b9b9d by Rémi Denis-Courmont at 2021-11-17T16:42:06+00:00
skins/x11: map F13-F35

- - - - -
d8e7b500 by Rémi Denis-Courmont at 2021-11-17T16:42:06+00:00
skins/win32: map F13-F24

- - - - -
b1e72e11 by Rémi Denis-Courmont at 2021-11-17T16:42:06+00:00
caca: map F13-F15

- - - - -


8 changed files:

- include/vlc_actions.h
- modules/gui/qt/widgets/native/customwidgets.cpp
- modules/gui/skins2/win32/win32_loop.cpp
- modules/gui/skins2/x11/x11_loop.cpp
- modules/video_output/caca.c
- modules/video_output/win32/window.c
- modules/video_output/xcb/xcb_keysym.h
- src/misc/actions.c


Changes:

=====================================
include/vlc_actions.h
=====================================
@@ -51,64 +51,65 @@ libvlc_InternalActionsClean(libvlc_int_t *p_libvlc);
 #define KEY_ENTER                  0x0D
 #define KEY_ESC                    0x1B
 /* End of Unicode range:     0x0010FFFF */
-#define KEY_LEFT             0x00210000
-#define KEY_RIGHT            0x00220000
-#define KEY_UP               0x00230000
-#define KEY_DOWN             0x00240000
-#define KEY_F1               0x00270000
-#define KEY_F2               0x00280000
-#define KEY_F3               0x00290000
-#define KEY_F4               0x002A0000
-#define KEY_F5               0x002B0000
-#define KEY_F6               0x002C0000
-#define KEY_F7               0x002D0000
-#define KEY_F8               0x002E0000
-#define KEY_F9               0x002F0000
-#define KEY_F10              0x00300000
-#define KEY_F11              0x00310000
-#define KEY_F12              0x00320000
-#define KEY_HOME             0x00330000
-#define KEY_END              0x00340000
-#define KEY_INSERT           0x00350000
-#define KEY_DELETE           0x00360000
-#define KEY_MENU             0x00370000
-#define KEY_PAGEUP           0x00390000
-#define KEY_PAGEDOWN         0x003A0000
-#define KEY_PRINT            0x003B0000
-#define KEY_PAUSE            0x003D0000
-
-#define KEY_BROWSER_BACK     0x003F0000
-#define KEY_BROWSER_FORWARD  0x00400000
-#define KEY_BROWSER_REFRESH  0x00410000
-#define KEY_BROWSER_STOP     0x00420000
-#define KEY_BROWSER_SEARCH   0x00430000
-#define KEY_BROWSER_FAVORITES 0x00440000
-#define KEY_BROWSER_HOME     0x00450000
-#define KEY_VOLUME_MUTE      0x00460000
-#define KEY_VOLUME_DOWN      0x00470000
-#define KEY_VOLUME_UP        0x00480000
-#define KEY_MEDIA_NEXT_TRACK 0x00490000
-#define KEY_MEDIA_PREV_TRACK 0x004A0000
-#define KEY_MEDIA_STOP       0x004B0000
-#define KEY_MEDIA_PLAY_PAUSE 0x004C0000
-#define KEY_MEDIA_RECORD     0x004D0000
-#define KEY_MEDIA_REWIND     0x004E0000
-#define KEY_MEDIA_FORWARD    0x004F0000
-#define KEY_MEDIA_REPEAT     0x00500000
-#define KEY_MEDIA_SHUFFLE    0x00510000
-#define KEY_MEDIA_SUBTITLE   0x00520000
-#define KEY_MEDIA_AUDIO      0x00530000
-#define KEY_MEDIA_ANGLE      0x00540000
-#define KEY_MEDIA_TIME       0x00550000
-#define KEY_MEDIA_FRAME_PREV 0x00560000
-#define KEY_MEDIA_FRAME_NEXT 0x00570000
-#define KEY_MEDIA_SELECT     0x00580000
-#define KEY_MEDIA_VIEW       0x00590000
-#define KEY_MEDIA_MENU       0x005A0000
-#define KEY_ZOOM_IN          0x00600000
-#define KEY_ZOOM_OUT         0x00610000
-#define KEY_BRIGHTNESS_UP    0x00620000
-#define KEY_BRIGHTNESS_DOWN  0x00630000
+#define KEY_LEFT              0x00200000
+#define KEY_RIGHT             0x00210000
+#define KEY_UP                0x00220000
+#define KEY_DOWN              0x00230000
+#define KEY_F(n)             (0x00230000 + ((n) << 16))
+#define KEY_F1                KEY_F(1)
+#define KEY_F2                KEY_F(2)
+#define KEY_F3                KEY_F(3)
+#define KEY_F4                KEY_F(4)
+#define KEY_F5                KEY_F(5)
+#define KEY_F6                KEY_F(6)
+#define KEY_F7                KEY_F(7)
+#define KEY_F8                KEY_F(8)
+#define KEY_F9                KEY_F(9)
+#define KEY_F10               KEY_F(10)
+#define KEY_F11               KEY_F(11)
+#define KEY_F12               KEY_F(12)
+/*      KEY_F35               0x00460000 */
+#define KEY_HOME              0x00470000
+#define KEY_END               0x00480000
+#define KEY_INSERT            0x00490000
+#define KEY_DELETE            0x004A0000
+#define KEY_MENU              0x004B0000
+#define KEY_PAGEUP            0x004C0000
+#define KEY_PAGEDOWN          0x004D0000
+#define KEY_PRINT             0x004E0000
+#define KEY_PAUSE             0x004F0000
+#define KEY_BROWSER_BACK      0x00500000
+#define KEY_BROWSER_FORWARD   0x00510000
+#define KEY_BROWSER_REFRESH   0x00520000
+#define KEY_BROWSER_STOP      0x00530000
+#define KEY_BROWSER_SEARCH    0x00540000
+#define KEY_BROWSER_FAVORITES 0x00550000
+#define KEY_BROWSER_HOME      0x00560000
+#define KEY_VOLUME_MUTE       0x00570000
+#define KEY_VOLUME_DOWN       0x00580000
+#define KEY_VOLUME_UP         0x00590000
+#define KEY_MEDIA_NEXT_TRACK  0x005A0000
+#define KEY_MEDIA_PREV_TRACK  0x005B0000
+#define KEY_MEDIA_STOP        0x005C0000
+#define KEY_MEDIA_PLAY_PAUSE  0x005D0000
+#define KEY_MEDIA_RECORD      0x005E0000
+#define KEY_MEDIA_REWIND      0x005F0000
+#define KEY_MEDIA_FORWARD     0x00600000
+#define KEY_MEDIA_REPEAT      0x00610000
+#define KEY_MEDIA_SHUFFLE     0x00620000
+#define KEY_MEDIA_SUBTITLE    0x00630000
+#define KEY_MEDIA_AUDIO       0x00640000
+#define KEY_MEDIA_ANGLE       0x00650000
+#define KEY_MEDIA_TIME        0x00660000
+#define KEY_MEDIA_FRAME_PREV  0x00670000
+#define KEY_MEDIA_FRAME_NEXT  0x00680000
+#define KEY_MEDIA_SELECT      0x00690000
+#define KEY_MEDIA_VIEW        0x006A0000
+#define KEY_MEDIA_MENU        0x006B0000
+#define KEY_ZOOM_IN           0x006C0000
+#define KEY_ZOOM_OUT          0x006D0000
+#define KEY_BRIGHTNESS_UP     0x006E0000
+#define KEY_BRIGHTNESS_DOWN   0x006F0000
 
 #define KEY_MOUSEWHEELUP     0x00F00000
 #define KEY_MOUSEWHEELDOWN   0x00F10000


=====================================
modules/gui/qt/widgets/native/customwidgets.cpp
=====================================
@@ -150,6 +150,30 @@ static const vlc_qt_key_t keys[] =
     { Qt::Key_F10,                   KEY_F10 },
     { Qt::Key_F11,                   KEY_F11 },
     { Qt::Key_F12,                   KEY_F12 },
+    { Qt::Key_F13,                   KEY_F(13) },
+    { Qt::Key_F14,                   KEY_F(14) },
+    { Qt::Key_F15,                   KEY_F(15) },
+    { Qt::Key_F16,                   KEY_F(16) },
+    { Qt::Key_F17,                   KEY_F(17) },
+    { Qt::Key_F18,                   KEY_F(18) },
+    { Qt::Key_F19,                   KEY_F(19) },
+    { Qt::Key_F20,                   KEY_F(20) },
+    { Qt::Key_F21,                   KEY_F(21) },
+    { Qt::Key_F22,                   KEY_F(22) },
+    { Qt::Key_F23,                   KEY_F(23) },
+    { Qt::Key_F24,                   KEY_F(24) },
+    { Qt::Key_F25,                   KEY_F(25) },
+    { Qt::Key_F26,                   KEY_F(26) },
+    { Qt::Key_F27,                   KEY_F(27) },
+    { Qt::Key_F28,                   KEY_F(28) },
+    { Qt::Key_F29,                   KEY_F(29) },
+    { Qt::Key_F30,                   KEY_F(30) },
+    { Qt::Key_F31,                   KEY_F(31) },
+    { Qt::Key_F32,                   KEY_F(32) },
+    { Qt::Key_F33,                   KEY_F(33) },
+    { Qt::Key_F34,                   KEY_F(34) },
+    { Qt::Key_F35,                   KEY_F(35) },
+
     // Qt::Key_Super_L
     // Qt::Key_Super_R
     { Qt::Key_Menu,                  KEY_MENU },


=====================================
modules/gui/skins2/win32/win32_loop.cpp
=====================================
@@ -58,6 +58,18 @@ Win32Loop::Win32Loop( intf_thread_t *pIntf ): OSLoop( pIntf )
     virtKeyToVlcKey[VK_F10] = KEY_F10;
     virtKeyToVlcKey[VK_F11] = KEY_F11;
     virtKeyToVlcKey[VK_F12] = KEY_F12;
+    virtKeyToVlcKey[VK_F13] = KEY_F(13);
+    virtKeyToVlcKey[VK_F14] = KEY_F(14);
+    virtKeyToVlcKey[VK_F15] = KEY_F(15);
+    virtKeyToVlcKey[VK_F16] = KEY_F(16);
+    virtKeyToVlcKey[VK_F17] = KEY_F(17);
+    virtKeyToVlcKey[VK_F18] = KEY_F(18);
+    virtKeyToVlcKey[VK_F19] = KEY_F(19);
+    virtKeyToVlcKey[VK_F20] = KEY_F(20);
+    virtKeyToVlcKey[VK_F21] = KEY_F(21);
+    virtKeyToVlcKey[VK_F22] = KEY_F(22);
+    virtKeyToVlcKey[VK_F23] = KEY_F(23);
+    virtKeyToVlcKey[VK_F24] = KEY_F(24);
     virtKeyToVlcKey[VK_RETURN] = KEY_ENTER;
     virtKeyToVlcKey[VK_SPACE] = ' ';
     virtKeyToVlcKey[VK_ESCAPE] = KEY_ESC;


=====================================
modules/gui/skins2/x11/x11_loop.cpp
=====================================
@@ -67,6 +67,29 @@ X11Loop::X11Loop( intf_thread_t *pIntf, X11Display &rDisplay ):
         m_keymap[XK_F10] = KEY_F10;
         m_keymap[XK_F11] = KEY_F11;
         m_keymap[XK_F12] = KEY_F12;
+        m_keymap[XK_F13] = KEY_F(13);
+        m_keymap[XK_F14] = KEY_F(14);
+        m_keymap[XK_F15] = KEY_F(15);
+        m_keymap[XK_F16] = KEY_F(16);
+        m_keymap[XK_F17] = KEY_F(17);
+        m_keymap[XK_F18] = KEY_F(18);
+        m_keymap[XK_F19] = KEY_F(19);
+        m_keymap[XK_F20] = KEY_F(20);
+        m_keymap[XK_F21] = KEY_F(21);
+        m_keymap[XK_F22] = KEY_F(22);
+        m_keymap[XK_F23] = KEY_F(23);
+        m_keymap[XK_F24] = KEY_F(24);
+        m_keymap[XK_F25] = KEY_F(25);
+        m_keymap[XK_F26] = KEY_F(26);
+        m_keymap[XK_F27] = KEY_F(27);
+        m_keymap[XK_F28] = KEY_F(28);
+        m_keymap[XK_F29] = KEY_F(29);
+        m_keymap[XK_F30] = KEY_F(30);
+        m_keymap[XK_F31] = KEY_F(31);
+        m_keymap[XK_F32] = KEY_F(32);
+        m_keymap[XK_F33] = KEY_F(33);
+        m_keymap[XK_F34] = KEY_F(34);
+        m_keymap[XK_F35] = KEY_F(35);
         m_keymap[XK_Return] = KEY_ENTER;
         m_keymap[XK_Escape] = KEY_ESC;
         m_keymap[XK_Left] = KEY_LEFT;


=====================================
modules/video_output/caca.c
=====================================
@@ -242,9 +242,9 @@ static const struct {
     { CACA_KEY_F10,     KEY_F10 },
     { CACA_KEY_F11,     KEY_F11 },
     { CACA_KEY_F12,     KEY_F12 },
-    { CACA_KEY_F13,     -1 },
-    { CACA_KEY_F14,     -1 },
-    { CACA_KEY_F15,     -1 },
+    { CACA_KEY_F13,     KEY_F(13) },
+    { CACA_KEY_F14,     KEY_F(14) },
+    { CACA_KEY_F15,     KEY_F(15) },
 
     { CACA_KEY_UP,      KEY_UP },
     { CACA_KEY_DOWN,    KEY_DOWN },


=====================================
modules/video_output/win32/window.c
=====================================
@@ -249,7 +249,11 @@ static struct
     { VK_F1, KEY_F1 }, { VK_F2, KEY_F2 }, { VK_F3, KEY_F3 }, { VK_F4, KEY_F4 },
     { VK_F5, KEY_F5 }, { VK_F6, KEY_F6 }, { VK_F7, KEY_F7 }, { VK_F8, KEY_F8 },
     { VK_F9, KEY_F9 }, { VK_F10, KEY_F10 }, { VK_F11, KEY_F11 },
-    { VK_F12, KEY_F12 },
+    { VK_F12, KEY_F12 }, { VK_F13, KEY_F(13) }, { VK_F14, KEY_F(14) },
+    { VK_F15, KEY_F(15) }, { VK_F16, KEY_F(16) }, { VK_F17, KEY_F(17) },
+    { VK_F18, KEY_F(18) }, { VK_F19, KEY_F(19) }, { VK_F20, KEY_F(20) },
+    { VK_F21, KEY_F(21) }, { VK_F22, KEY_F(22) }, { VK_F23, KEY_F(23) },
+    { VK_F24, KEY_F(24) },
 
     { VK_RETURN, KEY_ENTER },
     { VK_SPACE, ' ' },


=====================================
modules/video_output/xcb/xcb_keysym.h
=====================================
@@ -70,6 +70,29 @@
         { XK_F10,           KEY_F10, },
         { XK_F11,           KEY_F11, },
         { XK_F12,           KEY_F12, },
+        { XK_F13,           KEY_F(13), },
+        { XK_F14,           KEY_F(14), },
+        { XK_F15,           KEY_F(15), },
+        { XK_F16,           KEY_F(16), },
+        { XK_F17,           KEY_F(17), },
+        { XK_F18,           KEY_F(18), },
+        { XK_F19,           KEY_F(19), },
+        { XK_F20,           KEY_F(20), },
+        { XK_F21,           KEY_F(21), },
+        { XK_F22,           KEY_F(22), },
+        { XK_F23,           KEY_F(23), },
+        { XK_F24,           KEY_F(24), },
+        { XK_F25,           KEY_F(25), },
+        { XK_F26,           KEY_F(26), },
+        { XK_F27,           KEY_F(27), },
+        { XK_F28,           KEY_F(28), },
+        { XK_F29,           KEY_F(29), },
+        { XK_F30,           KEY_F(30), },
+        { XK_F31,           KEY_F(31), },
+        { XK_F32,           KEY_F(32), },
+        { XK_F33,           KEY_F(33), },
+        { XK_F34,           KEY_F(34), },
+        { XK_F35,           KEY_F(35), },
         { XK_Delete,        KEY_DELETE, },
 
         /* XFree86 extensions */


=====================================
src/misc/actions.c
=====================================
@@ -68,8 +68,31 @@ static const struct key_descriptor
     { N_("F10"),               KEY_F10               },
     { N_("F11"),               KEY_F11               },
     { N_("F12"),               KEY_F12               },
+    { N_("F13"),               KEY_F(13)             },
+    { N_("F14"),               KEY_F(14)             },
+    { N_("F15"),               KEY_F(15)             },
+    { N_("F16"),               KEY_F(16)             },
+    { N_("F17"),               KEY_F(17)             },
+    { N_("F18"),               KEY_F(18)             },
+    { N_("F19"),               KEY_F(19)             },
     { N_("F2"),                KEY_F2                },
+    { N_("F20"),               KEY_F(20)             },
+    { N_("F21"),               KEY_F(21)             },
+    { N_("F22"),               KEY_F(22)             },
+    { N_("F23"),               KEY_F(23)             },
+    { N_("F24"),               KEY_F(24)             },
+    { N_("F25"),               KEY_F(25)             },
+    { N_("F26"),               KEY_F(26)             },
+    { N_("F27"),               KEY_F(27)             },
+    { N_("F28"),               KEY_F(28)             },
+    { N_("F29"),               KEY_F(29)             },
     { N_("F3"),                KEY_F3                },
+    { N_("F30"),               KEY_F(30)             },
+    { N_("F31"),               KEY_F(31)             },
+    { N_("F32"),               KEY_F(32)             },
+    { N_("F33"),               KEY_F(33)             },
+    { N_("F34"),               KEY_F(34)             },
+    { N_("F35"),               KEY_F(35)             },
     { N_("F4"),                KEY_F4                },
     { N_("F5"),                KEY_F5                },
     { N_("F6"),                KEY_F6                },



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/67a781788ad37dfa0f76be3e117d9a8144c00188...b1e72e112b82c8fa68c9a1c020abe93d3a7f4e17

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/67a781788ad37dfa0f76be3e117d9a8144c00188...b1e72e112b82c8fa68c9a1c020abe93d3a7f4e17
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list