Alastair Davies - 2007-04-06

Logged In: YES
user_id=988604
Originator: NO

The problem appears to be that (to quote the manual):

"For a binding to match a given event, the modifiers in the event must include all of those specified in the event pattern. An event may also contain additional modifiers not specified in the binding. For example, if button 1 is pressed while the shift and control keys are down, the pattern <Control-Button-1> will match the event, but <Mod1-Button-1> will not."

In other words, the binding for Button for the <Key-space> event, which invokes the button, will also fire for Alt-space, Control-space, etc.

I notice that when using an Entry, however, no space is inserted into the entry box when Alt-space is pressed. This is because the Entry widget has a general binding for the Alt modifier as follows

% bind Entry <Alt-Key>
# nothing

A similar command added to the bindings for Button solves this problem.

% bind Button <Alt-Key> {# nothing}