Index: doc/keysyms.n ================================================================== --- doc/keysyms.n +++ doc/keysyms.n @@ -13,11 +13,13 @@ .PP Tk recognizes many keysyms when specifying key bindings (e.g., .QW "\fBbind\fR \fB. \fR" ). The following list enumerates the keysyms that will be recognized by Tk. Note that not all keysyms will -be valid on all platforms. For example, on Unix systems, the presence +be valid on all platforms, and some keysyms are also available on +platforms that have a different native name for that key. +For example, on Unix systems, the presence of a particular keysym is dependant on the configuration of the keyboard modifier map. This list shows keysyms along with their decimal and hexadecimal values. .PP .CS @@ -916,13 +918,20 @@ Super_L 65515 0xffeb Super_R 65516 0xffec Hyper_L 65517 0xffed Hyper_R 65518 0xffee Delete 65535 0xffff +XF86AudioLowerVolume 269025041 0x1008FF11 +XF86AudioMute 269025042 0x1008FF12 +XF86AudioRaiseVolume 269025043 0x1008FF13 +XF86AudioPlay 269025044 0x1008FF14 +XF86AudioStop 269025045 0x1008FF15 +XF86AudioPrev 269025046 0x1008FF16 +XF86AudioNext 269025047 0x1008FF17 .CE .SH "SEE ALSO" bind(n), event(n) .SH KEYWORDS bind, binding, event, keysym '\" Local Variables: '\" mode: nroff '\" End: Index: generic/ks_names.h ================================================================== --- generic/ks_names.h +++ generic/ks_names.h @@ -1,7 +1,17 @@ /* - * This file is generated from $(INCLUDESRC)/keysymdef.h. Do not edit. + * This file should be maintained in sync with xlib/X11/keysymdefs.h + * + * Note that this should be done manually only, because in some cases + * keysymdefs.h defines the same integer for multiple keysyms, e.g.: + * + * #define XK_Greek_LAMDA 0x7cb + * #define XK_Greek_LAMBDA 0x7cb + * + * #define XK_Cyrillic_DZHE 0x6bf + * #define XK_Serbian_DZE 0x6bf (deprecated) + * */ { "BackSpace", 0xFF08 }, { "Tab", 0xFF09 }, { "Linefeed", 0xFF0A }, { "Clear", 0xFF0B }, @@ -918,5 +928,12 @@ { "hebrew_kuf", 0xcf7 }, { "hebrew_resh", 0xcf8 }, { "hebrew_shin", 0xcf9 }, { "hebrew_taf", 0xcfa }, { "Hebrew_switch", 0xFF7E }, +{ "XF86AudioLowerVolume", 0x1008FF11 }, +{ "XF86AudioMute", 0x1008FF12 }, +{ "XF86AudioRaiseVolume", 0x1008FF13 }, +{ "XF86AudioPlay", 0x1008FF14 }, +{ "XF86AudioStop", 0x1008FF15 }, +{ "XF86AudioPrev", 0x1008FF16 }, +{ "XF86AudioNext", 0x1008FF17 }, Index: win/tkWinKey.c ================================================================== --- win/tkWinKey.c +++ win/tkWinKey.c @@ -19,11 +19,12 @@ * the alternative, in which we walked a list of keycodes looking for a match. * Since this lookup is performed for every Windows keypress event, it seems * like a worthwhile improvement to use the table. */ -#define MAX_KEYCODE 145 /* VK_SCROLL is the last entry in our table below */ +#define MAX_KEYCODE 179 /* VK_MEDIA_PLAY_PAUSE 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, @@ -51,11 +52,17 @@ 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 + XK_Scroll_Lock, NoSymbol, NoSymbol, NoSymbol, NoSymbol, + 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, XK_XF86AudioMute, XK_XF86AudioLowerVolume, /*170 0xaa*/ + XK_XF86AudioRaiseVolume, XK_XF86AudioNext, XK_XF86AudioPrev, XK_XF86AudioStop, XK_XF86AudioPlay /*175 0xaf*/ }; /* * Prototypes for local functions defined in this file: */ Index: xlib/X11/keysymdef.h ================================================================== --- xlib/X11/keysymdef.h +++ xlib/X11/keysymdef.h @@ -1165,5 +1165,17 @@ #define XK_hebrew_taw 0xcfa #define XK_hebrew_taf 0xcfa /* deprecated */ #define XK_Hebrew_switch 0xFF7E /* Alias for mode_switch */ #endif /* XK_HEBREW */ +/* Multimedia keys, defined same as on Linux + * /usr/include/pkg/libxkbcommon/xkbcommon/xkbcommon-keysyms.h + */ + +#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 */ +