This looks like another bug with Tk on macOS.

The menu item's key binding should never actually be triggered itself but it's somehow happening with the French keyboard mapping and this interferes with the bind all shortcuts. I was able to stop this from happening when removing the "Shift" menu accelerator, but then the menu item displays the wrong short cut keys with the Shift icon.

 Looks like another reason to dive into the Tk code itself as we need to fix the issues with [key] as well.

On Mar 24, 2018, at 2:01 AM, Dan Wilcox <danomatika@gmail.com> wrote:

After some testing, it looks like the issue is how the Tk is handling the Shift key with the French keyboard mapping.

For example, the Bang shortcut is bound as:

bind all <$::modifier-Shift-Key-B> {menu_send %W bng}
bind all <$::modifier-Shift-Key-b> {menu_send %W bng}

and the menu item:

$mymenu add command -label [_ "Bang"]     -accelerator "$accelerator+Shift+B" \
        -command {menu_send $::focused_window bng}

With the English keyboard mapping, the $::modifier-Shift-Key-b fires and the menu item's command is ignored (expected behavior).

With the French keyboard mapping, the $::modifier-Shift-Key-B fires AND the menu item command fires. It seems as though the capital B doesn't get matched to the menu accelerator binding.

The German keyboard mapping behaves the same as the English one.

On Mar 23, 2018, at 10:29 PM, Dan Wilcox <danomatika@gmail.com> wrote:

I can confirm seeing this with a French keyboard mapping and my system set to English.



--------
Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com