Tk Source Code

Changes On Branch tip-464
Login
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch tip-464 Excluding Merge-Ins

This is equivalent to a diff from 1896a918 to ddd16aac

2017-03-26
15:16
Merged tip-464 following positive vote by the TCT. check-in: 684b7661 user: fvogel tags: core-8-6-branch
15:14
Merged tip-464 following positive vote by the TCT. check-in: b20b6d95 user: fvogel tags: core-8-5-branch
13:16
merge core-8-6-branch Closed-Leaf check-in: ddd16aac user: fvogel tags: tip-464
08:59
Fix [28a3c366e6]: memory leak in the text widget. Patch contributed anonymously Closed-Leaf check-in: f3f5eeb9 user: fvogel tags: bug-28a3c366e6
2017-03-24
10:39
Merge trunk. Upstream androwish changes check-in: e7b556e3 user: jan.nijtmans tags: androwish
2017-03-22
10:56
Fix test-case safe-1.2. Failure introduced by commit b13eeffcd1 in Tcl check-in: 9720ad3f user: jan.nijtmans tags: trunk
10:26
Fix test-case safe-1.2. Failure introduced by commit b82ff15ca6 in Tcl check-in: 1896a918 user: jan.nijtmans tags: core-8-6-branch
2017-03-14
01:13
added a remark about some keysyms being valid across platforms... check-in: 11af7ed4 user: avl tags: tip-464
2017-03-11
14:53
Fix [77527326e5]: ttk artifacts on Ubuntu. Patch from Csaba Nemethi. check-in: af5fda33 user: fvogel tags: core-8-6-branch

Changes to doc/keysyms.n.

11
12
13
14
15
16
17


18
19
20
21
22
23
24
25
.BE
.SH DESCRIPTION
.PP
Tk recognizes many keysyms when specifying key bindings (e.g.,
.QW "\fBbind\fR \fB. <Key-\fR\fIkeysym\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
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
space                               32     0x0020
exclam                              33     0x0021






>
>
|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.BE
.SH DESCRIPTION
.PP
Tk recognizes many keysyms when specifying key bindings (e.g.,
.QW "\fBbind\fR \fB. <Key-\fR\fIkeysym\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, 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
space                               32     0x0020
exclam                              33     0x0021
914
915
916
917
918
919
920







921
922
923
924
925
926
927
928
Alt_L                            65513     0xffe9
Alt_R                            65514     0xffea
Super_L                          65515     0xffeb
Super_R                          65516     0xffec
Hyper_L                          65517     0xffed
Hyper_R                          65518     0xffee
Delete                           65535     0xffff







.CE
.SH "SEE ALSO"
bind(n), event(n)
.SH KEYWORDS
bind, binding, event, keysym
'\" Local Variables:
'\" mode: nroff
'\" End:






>
>
>
>
>
>
>








916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
Alt_L                            65513     0xffe9
Alt_R                            65514     0xffea
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:

Changes to generic/ks_names.h.

1
2










3
4
5
6
7
8
9
/*
 * This file is generated from $(INCLUDESRC)/keysymdef.h.  Do not edit.










 */
{ "BackSpace", 0xFF08 },
{ "Tab", 0xFF09 },
{ "Linefeed", 0xFF0A },
{ "Clear", 0xFF0B },
{ "Return", 0xFF0D },
{ "Pause", 0xFF13 },
|
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * 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 },
{ "Return", 0xFF0D },
{ "Pause", 0xFF13 },
916
917
918
919
920
921
922







{ "hebrew_finalzadi", 0xcf5 },
{ "hebrew_zadi", 0xcf6 },
{ "hebrew_kuf", 0xcf7 },
{ "hebrew_resh", 0xcf8 },
{ "hebrew_shin", 0xcf9 },
{ "hebrew_taf", 0xcfa },
{ "Hebrew_switch", 0xFF7E },













>
>
>
>
>
>
>
926
927
928
929
930
931
932
933
934
935
936
937
938
939
{ "hebrew_finalzadi", 0xcf5 },
{ "hebrew_zadi", 0xcf6 },
{ "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 },

Changes to win/tkWinKey.c.

17
18
19
20
21
22
23
24

25
26
27
28
29
30
31
 * Windows ever comes along and changes the value of their keycodes, this will
 * break all kinds of things. However, this table lookup is much faster than
 * 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 */


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,






|
>







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 * Windows ever comes along and changes the value of their keycodes, this will
 * break all kinds of things. However, this table lookup is much faster than
 * 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 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,
    NoSymbol, XK_Shift_L, XK_Control_L, XK_Alt_L, XK_Pause,
    XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, NoSymbol,
49
50
51
52
53
54
55
56






57
58
59
60
61
62
63
    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






};

/*
 * Prototypes for local functions defined in this file:
 */

static KeySym		KeycodeToKeysym(unsigned int keycode,






|
>
>
>
>
>
>







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
    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, 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:
 */

static KeySym		KeycodeToKeysym(unsigned int keycode,

Changes to xlib/X11/keysymdef.h.

1163
1164
1165
1166
1167
1168
1169












#define XK_hebrew_resh                                 0xcf8
#define XK_hebrew_shin                                 0xcf9
#define XK_hebrew_taw                                  0xcfa
#define XK_hebrew_taf                                  0xcfa  /* deprecated */
#define XK_Hebrew_switch        0xFF7E  /* Alias for mode_switch */
#endif /* XK_HEBREW */



















>
>
>
>
>
>
>
>
>
>
>
>
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
#define XK_hebrew_resh                                 0xcf8
#define XK_hebrew_shin                                 0xcf9
#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                 */