kpart container eats away keypresses

David Faure dfaure at trolltech.com
Tue Aug 19 13:20:40 BST 2003


On Tuesday 19 August 2003 13:24, Leo Savernik wrote:
> Hello,
> 
> For caret navigation, I detect in KHTMLView::keyPressEvent whether a keypress 
> is directed towards an editable element and divert from there if it is. 
> However, this does not catch keyboard accels that are managed by the 
> container -- they are handled somewhere *before* the event handler.
> 
> This is especially nagging for Ctrl+Home which is a shortcut to file:///$HOME, 
> but shouldn't take effect while navigating (like in html textareas).
> 
> So where should i install an event filter? On kapp? On the part object? On the 
> parts main window? Or is there a better solution?

Try an event filter on the HTML widget (textarea or khtmlview, whichever is convenient)
which filters AccelOverride events (NOT KeyPress events).

-- 
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kfm-devel mailing list