On Fri, Sep 30, 2005 at 14:51:40 +0200, Stephan Brunner wrote:
Hi all, I'd thought this is a common problem, but didn't find a solution in the docs or via google: In my application, I would like to have some "fast and simple" accelerators like <u> or <delete>. On the other hand, I have some Gtk2::Entry and Gtk2::TextBuffer for text editing. Of course, I still do want to be able to insert 'u' in those...
It should work. Out of the box. Have you _tried_ it? The reason this should work is, that the active widget gets the input. If the widget does not handle it, it passes it on to it's parent. And so on up to the window, which handles the accels.
Is there any way to give the Entry / TextBuffer a higher "priority" than the accels, so that (while editing text) <u> inserts a 'u' and doesn't fire up the associated action? Something like $widget->set_listen_to_accels(FALSE)? Maybe it would work (didn't try yet) to have a key_press_event-callback for the text widgets that manually inserts a 'u' (and all the other accelerated chars), but that doesn't look like a elegant solution...
It would work iff it is not necessary. The widget itself does the insertion in a key-press-event callback. -- Jan 'Bulb' Hudec <bulb ucw cz>
Attachment:
signature.asc
Description: Digital signature