Re: how to bind to event _without_ modifier



"Robert Suetterlin" <robert@xxxxxxxxxx> writes:

> is there a way to specifically bind to an event without modifiers, e.g.
>
> bind bindtag <None-ButtonPress-1> code

That would be nice. Unfortunately, to prevent modified keystrokes
from firing you have to declare a whole set of bindings for the
modified keys.

bind . <Control-ButtonPress-1> {break}
bind . <Shift-ButtonPress-1> {break}
bind . <Lock-ButtonPress-1> {break}
bind . <Meta-ButtonPress-1> {break}
bind . <Alt-ButtonPress-1> {break}
bind . <Double-ButtonPress-1> {break}
bind . <Triple-ButtonPress-1> {break}
bind . <Quadruple-ButtonPress-1> {break}

> BTW. why is a more recent binding used with higher priority in ambigous
> cases? For example if You do

The priority in ambiguous cases is explicitly undefined, so if you
are seeing a tendancy to the most recent, it is just luck (or, rather,
internal implementation details that are not part of the language,
and should not be relied on).


--
Donald Arseneau asnd@xxxxxxxxx
.


Quantcast