diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-19 23:34:33 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-19 23:34:33 (GMT) |
commit | 688b3b33a5b2f177d38eaeba93404b83178dc8b0 (patch) | |
tree | e10619e55a7b26344cb8639e46e326054812e8d9 | |
parent | d622513cebfc12213d08aa8c6f9fa12712776524 (diff) | |
parent | 3c4afbb99a505d4162648d8050ea7c993abbca61 (diff) | |
download | tk-688b3b33a5b2f177d38eaeba93404b83178dc8b0.zip tk-688b3b33a5b2f177d38eaeba93404b83178dc8b0.tar.gz tk-688b3b33a5b2f177d38eaeba93404b83178dc8b0.tar.bz2 |
Merge trunk
-rw-r--r-- | win/tkWinKey.c | 74 | ||||
-rw-r--r-- | xlib/X11/keysymdef.h | 15 |
2 files changed, 53 insertions, 36 deletions
diff --git a/win/tkWinKey.c b/win/tkWinKey.c index a0ff736..c3816bf 100644 --- a/win/tkWinKey.c +++ b/win/tkWinKey.c @@ -11,6 +11,7 @@ */ #include "tkWinInt.h" +#include "X11/XF86keysym.h" /* * The keymap table holds mappings of Windows keycodes to X keysyms. If @@ -21,46 +22,47 @@ * like a worthwhile improvement to use the table. */ -#define MAX_KEYCODE 179 /* VK_MEDIA_PLAY_PAUSE is the last entry in our table below */ +#define MAX_KEYCODE 183 /* VK_LAUNCH_APP2 is the last entry in our table below */ /* cf. https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx */ static const KeySym keymap[] = { - NoSymbol, NoSymbol, NoSymbol, XK_Cancel, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, XK_BackSpace, XK_Tab, - NoSymbol, NoSymbol, XK_Clear, XK_Return, NoSymbol, - NoSymbol, XK_Shift_L, XK_Control_L, XK_Alt_L, XK_Pause, - XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, XK_Escape, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, XK_space, XK_Prior, XK_Next, - XK_End, XK_Home, XK_Left, XK_Up, XK_Right, - XK_Down, XK_Select, XK_Print, XK_Execute, NoSymbol, - XK_Insert, XK_Delete, XK_Help, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, XK_Win_L, XK_Win_R, XK_App, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, XK_F1, XK_F2, XK_F3, - XK_F4, XK_F5, XK_F6, XK_F7, XK_F8, - XK_F9, XK_F10, XK_F11, XK_F12, XK_F13, - XK_F14, XK_F15, XK_F16, XK_F17, XK_F18, - XK_F19, XK_F20, XK_F21, XK_F22, XK_F23, - XK_F24, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, XK_Num_Lock, - XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, NoSymbol, + NoSymbol, NoSymbol, NoSymbol, XK_Cancel, NoSymbol, /*0 0x0*/ + NoSymbol, NoSymbol, NoSymbol, XK_BackSpace, XK_Tab, /*5 0x5*/ + NoSymbol, NoSymbol, XK_Clear, XK_Return, NoSymbol, /*10 0xA*/ + NoSymbol, XK_Shift_L, XK_Control_L, XK_Alt_L, XK_Pause, /*15 0xE*/ + XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*20 0x14*/ + NoSymbol, NoSymbol, XK_Escape, NoSymbol, NoSymbol, /*25 0x19*/ + NoSymbol, NoSymbol, XK_space, XK_Prior, XK_Next, /*30 0x1E*/ + XK_End, XK_Home, XK_Left, XK_Up, XK_Right, /*35 0x23*/ + XK_Down, XK_Select, XK_Print, XK_Execute, NoSymbol, /*40 0x28*/ + XK_Insert, XK_Delete, XK_Help, NoSymbol, NoSymbol, /*45 0x2D*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*50 0x32*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*55 0x37*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*60 0x3C*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*65 0x41*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*70 0x46*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*75 0x4B*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*80 0x50*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*85 0x55*/ + NoSymbol, XK_Win_L, XK_Win_R, XK_App, NoSymbol, /*90 0x5A*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*95 0x5F*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*100 0x64*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*105 0x69*/ + NoSymbol, NoSymbol, XK_F1, XK_F2, XK_F3, /*110 0x6E*/ + XK_F4, XK_F5, XK_F6, XK_F7, XK_F8, /*115 0x73*/ + XK_F9, XK_F10, XK_F11, XK_F12, XK_F13, /*120 0x78*/ + XK_F14, XK_F15, XK_F16, XK_F17, XK_F18, /*125 0x7D*/ + XK_F19, XK_F20, XK_F21, XK_F22, XK_F23, /*130 0x82*/ + XK_F24, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*135 0x87*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, XK_Num_Lock, /*140 0x8C*/ + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*145 0x91*/ NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*150 0x96*/ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*155 0x9b*/ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*160 0xa0*/ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*165 0xa5*/ - NoSymbol, NoSymbol, NoSymbol, XF86XK_AudioMute, XF86XK_AudioLowerVolume, /*170 0xaa*/ - XF86XK_AudioRaiseVolume, XF86XK_AudioNext, XF86XK_AudioPrev, XF86XK_AudioStop, XF86XK_AudioPlay /*175 0xaf*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*155 0x9B*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*160 0xA0*/ + NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, /*165 0xA5*/ + NoSymbol, NoSymbol, NoSymbol, XF86XK_AudioMute, XF86XK_AudioLowerVolume, /*170 0xAA*/ + XF86XK_AudioRaiseVolume, XF86XK_AudioNext, XF86XK_AudioPrev, XF86XK_AudioStop, XF86XK_AudioPlay, /*175 0xAF*/ + XF86XK_Mail, XF86XK_AudioMedia, XF86XK_Launch0, XF86XK_Launch1 /*180 0xB4*/ }; /* diff --git a/xlib/X11/keysymdef.h b/xlib/X11/keysymdef.h index 2431b7f..30ca537 100644 --- a/xlib/X11/keysymdef.h +++ b/xlib/X11/keysymdef.h @@ -1732,3 +1732,18 @@ SOFTWARE. #define XK_braille_dot_9 0xfff9 #define XK_braille_dot_10 0xfffa #endif /* XK_BRAILLE */ + +/* Multimedia keys, defined same as on Linux + * /usr/include/pkg/libxkbcommon/xkbcommon/xkbcommon-keysyms.h + */ + +#ifndef TK_NO_DEPRECATED +#define XK_XF86AudioLowerVolume 0x1008FF11 /* Volume control down */ +#define XK_XF86AudioMute 0x1008FF12 /* Mute sound from the system */ +#define XK_XF86AudioRaiseVolume 0x1008FF13 /* Volume control up */ +#define XK_XF86AudioPlay 0x1008FF14 /* Start playing of audio > */ +#define XK_XF86AudioStop 0x1008FF15 /* Stop playing audio */ +#define XK_XF86AudioPrev 0x1008FF16 /* Previous track */ +#define XK_XF86AudioNext 0x1008FF17 /* Next track */ +#endif /* !TK_NO_DEPRECATED */ + |