Tk Source Code

Check-in [f4758af0]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Fix for keyboard modifier events, thanks to Trevor Williams for patch
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f4758af0380863259adf566d13fc9c1b5e70f784
User & Date: kevin_walzer 2015-03-05 15:55:30
Context
2015-03-05
15:57
Merge mark check-in: be999214 user: kevin_walzer tags: trunk
15:55
Fix for keyboard modifier events, thanks to Trevor Williams for patch check-in: f4758af0 user: kevin_walzer tags: trunk
2015-03-02
08:56
Deleted Win95/98-specific documentation as those platforms have long been unsupported. check-in: e4a9133b user: ashok tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to macosx/tkMacOSXKeyboard.c.

730
731
732
733
734
735
736

737
738
739
740
741
742
743
744
    /*
     * Handle pure modifier keys specially. We use -1 as a signal for
     * this.
     */

    if (eventPtr->xany.send_event == -1) {

	int modifier = eventPtr->xkey.keycode;

	if (modifier == NSCommandKeyMask) {
	    return XK_Meta_L;
	} else if (modifier == NSShiftKeyMask) {
	    return XK_Shift_L;
	} else if (modifier == NSAlphaShiftKeyMask) {
	    return XK_Caps_Lock;






>
|







730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
    /*
     * Handle pure modifier keys specially. We use -1 as a signal for
     * this.
     */

    if (eventPtr->xany.send_event == -1) {

	int modifier = eventPtr->xkey.keycode & NSDeviceIndependentModifierFlagsMask;

	if (modifier == NSCommandKeyMask) {
	    return XK_Meta_L;
	} else if (modifier == NSShiftKeyMask) {
	    return XK_Shift_L;
	} else if (modifier == NSAlphaShiftKeyMask) {
	    return XK_Caps_Lock;