Author ned.deily
Recipients ned.deily, ronaldoussoren
Date 2011-03-17.07:22:05
SpamBayes Score 4.29637e-09
Marked as misclassified No
Message-id <>
The actual unwanted event is being generated as a result of the menu "add command" accelerator.  You can see that by playing with Wish.

set w .menu
catch {destroy $w}
toplevel $w
wm title $w "Menu Shift"
menu $ -tearoff 0
set m $
$ add cascade -label "Basic" -menu $m -underline 0
menu $m -tearoff 0

$m add command -label "Test" \
	     -command "puts command" -accelerator Command-Shift-A
bind $w <Command-Shift-A> "puts bind"

$w configure -menu $

It appears that there is a bug in the Cocoa Tk right now where accelerators with "Shift" (at least) in them are not being properly ignored by Tk.  In the Carbon Tk and the X11 Tk, I believe the only effect of the "accelerator" definitions on the "add command" is to be used to create the shortcut characters displayed in the menu entry.  However, apparently a side effect of using the Cocoa APIs is that the menu definitions now cause notifications back into Tk which are not supposed to be translated into Tcl/Tk events back to the app.  For some reason, the shift ones are not being ignored.

Also, it seems that with all three of the Tk implementations (Carbon, X11, and Cocoa), using a capital letter for the menu accelerator implies Shift.
Date User Action Args
2011-03-17 07:22:06ned.deilysetrecipients: + ned.deily, ronaldoussoren
2011-03-17 07:22:06ned.deilysetmessageid: <>
2011-03-17 07:22:05ned.deilylinkissue11055 messages
2011-03-17 07:22:05ned.deilycreate