Konqueror and Autosuggest boxes

Neill Jones neilljones at yahoo.co.uk
Wed Feb 14 21:48:47 GMT 2007


Hi all,

I hope this is the right forum for this question ... I've included a 
sample page
which demonstrates the problem.

I am trying to implement an autosuggest drop down box and have built one up
from an example on the web. It works in IE, Firefox, Ephiphany and to an 
extent
in Opera. Unfortunately in Konqueror, the drop down box does not appear. 
Does
anyone have any experience of writing these for Konqueror, or know of 
any pitfalls
that one needs to be aware of? When I've tested what keyCodes are 
returned when
pressing keys in the input, it comes back with 0 each time in Konqueror 
but the
expected keys on the other browsers, so I suspect it is the way the 
keyCodes are
being picked up that is the problem.

The keypresses on the text input are registered to the autoSuggest 
object using
                this.textbox.onkeydown = function (oEvent) {
                    if (!oEvent) oEvent = window.event;
                    oThis.handleKeyDown(oEvent);
                };
(where oThis is a reference to an AutoSuggestControl object) etc for 
other key presses,
and the autoSuggest object handles these as ...
              AutoSuggestControl.prototype.handleKeyUp = function (oEvent) {
                var iKeyCode = oEvent.keyCode;
// alert(iKeyCode);
                if (iKeyCode == 8 || iKeyCode == 46)
                    this.provider.requestSuggestions(this, false);
                if (iKeyCode < 32 || (iKeyCode >= 33 && iKeyCode <= 46) 
|| (iKeyCode >= 112 && iKeyCode <= 123)) {
                    //ignore
                } else {
                    this.provider.requestSuggestions(this);
                }
            };
When I check the keyCodes here they are 0 in Konqueror.

How can you extract the keys from events in Konqueror and on what elements?
Does anyone have any good sources for event programming on Konqueror, in 
particular picking
up key presses?

Thank in advance for any pointers

Regards

Neill Jones

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20070214/57fbc956/attachment.html>


More information about the kfm-devel mailing list