Thanks allot! This solves my problem.

As I said before I don't need the keyCode, charCode and keyIdentifier at all. I just want to detect the keyup and keydown event.

Best regards...



Fabian Jakobs schrieb:
Dietrich Streifert schrieb:
Hi Fabian,

please consider delivering the keyup and keydown events even if they do not reliable get the keycode. For this cases the keycode can be set to null or can somehow be marked as not usable.

I think just not sending the event (which realy happened) is not the right way.

Maybe there has to be distinguished between the key events by having different classes for the different event types:

qx.event.type.KeyPressedEvent
qx.event.type.KeyUpEvent
qx.event.type.KeyDownEvent

where KeyUp and KeyDown event instances do not have the keyCode property.

Hello Dietrich,

I have modified the key event handler to return a keyIdentifier of "Unidentified" if the key could not reliably detected. Are you shure you want to use keyup/keydown in your case. These events are not repeated if you keep the button pressed.

In case you want to patch your qooxdoo here is the patch:

--- 
trunk/qooxdoo/frontend/framework/source/class/qx/event/handler/KeyEventHandler.js
   2007-01-18 17:45:01 UTC (rev 5721)
+++ 
trunk/qooxdoo/frontend/framework/source/class/qx/event/handler/KeyEventHandler.js
   2007-01-19 09:55:20 UTC (rev 5722)
@@ -380,22 +380,15 @@
   if (keyCode)
   {
     keyIdentifier = this._keyCodeToIdentifier(keyCode);
-
-    if (keyIdentifier != "Unidentified") {
-      qx.event.handler.EventHandler.getInstance()._onkeyevent_post(domEvent, 
eventType, keyCode, charCode, keyIdentifier);
-    }
+    qx.event.handler.EventHandler.getInstance()._onkeyevent_post(domEvent, 
eventType, keyCode, charCode, keyIdentifier);
   }
// Use: charCode
   else
   {
     keyIdentifier = this._charCodeToIdentifier(charCode);
-
-    if (keyIdentifier != "Unidentified")
-    {
-      qx.event.handler.EventHandler.getInstance()._onkeyevent_post(domEvent, 
"keypress", keyCode, charCode, keyIdentifier);
-      qx.event.handler.EventHandler.getInstance()._onkeyevent_post(domEvent, 
"keyinput", keyCode, charCode, keyIdentifier);
-    }
+    qx.event.handler.EventHandler.getInstance()._onkeyevent_post(domEvent, 
"keypress", keyCode, charCode, keyIdentifier);
+    qx.event.handler.EventHandler.getInstance()._onkeyevent_post(domEvent, 
"keyinput", keyCode, charCode, keyIdentifier);
   }

 };



Best Fabian

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

--
Mit freundlichen Grüßen
Dietrich Streifert
Visionet GmbH

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to