From: Martin DeMello Date: 2009-12-10T06:31:28+09:00 Subject: Re: overriding key bindings in tktext On Wed, Dec 9, 2009 at 5:17 AM, Hidetoshi NAGAI wrote: > You have to break the evaluation of the widget's bindtag list. > By default, the bindtag list is [_the_widget_, TkText, > _toplevel_window_of_the_widget_, "all"]. > You define a binding to _the_widget_. But after the callback, > Tk evaluates bindings of TkText (depends on the order of bindtags list). > > You can break the evaluation of bindtags by > editor.bind("Any-Key-Return"){...; break; ...} > or editor.bind("Any-Key-Return"){...; Tk.callback_break; ...}. > If the former has no effect (depends on Ruby or Ruby/Tk version), > please use the latter. > The latter should work on any version of Ruby/Tk. Thanks, that works beautifully! martin