Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Order of "queued" css.awt.KeyEvents not FIFO | ||||||
---|---|---|---|---|---|---|---|
Product: | App Dev | Reporter: | f_specker <florian> | ||||
Component: | api | Assignee: | stephan.wunderlich | ||||
Status: | CLOSED IRREPRODUCIBLE | QA Contact: | issues@api <issues> | ||||
Severity: | Trivial | ||||||
Priority: | P4 | CC: | issues | ||||
Version: | 3.3.0 or older (OOo) | ||||||
Target Milestone: | --- | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||
Developer Difficulty: | --- | ||||||
Attachments: |
|
Description
f_specker
2004-08-11 15:57:57 UTC
SW->f_specker: I just tried the following: Dim returnValue as String sub main toolkit = createUnoService("com.sun.star.awt.Toolkit") keyhandler = createUnoListener("CB_", "com.sun.star.awt.XKeyHandler") returnValue="" toolkit.addKeyHandler(keyhandler) wait 2000 toolkit.removeKeyHandler(keyhandler) msgbox returnValue end sub sub CB_keyPressed(event as Object) returnValue = returnValue + event.keychar end sub sub CB_keyReleased(event as Object) end sub and it works as expected. Can you provide a java-application which demonstrates the behaviour you describe ? Created attachment 17126 [details]
Java Class implementing XKeyHandler
SW, I have to apologize, the order of the KeyEvents is correct. I thought it wasn't because I constructed the String out of the KeyEvents based on the position where the KeyEvents occurred (relative to the document beginning; s. attached java file). But the position is only correct if there are no more KeyEvents waiting to be processed. Also, the typed Characters only get displayed after all waiting KeyEvents have been processed. So i _guess_ that is the actual problem, since I calculate the position out of the information the XTextViewCursor supplies (I know, the way I calculate the position is an ugly hack, but it's the only way I could get it working... alternatives are welcome :-). Sorry again I filed the issue before tracing the root of the problem. SW->f_specker : I just ran you java-program and it also delivers me the pressed keys in the right sequence ... well so far I can't reproduce the described behaviour :-( ... I wonder why you catch every key event from the client side. Since the OOo-files are xml-files and with that "pure-text" why don't you implement a 'send' button and use a cvs-like server-side backend to do the merge ? I need to do it that way for a proof-of-concept for using OOo as a client for a (real-time) collaborative editing system (-> issue 32784). I filed this issue because it makes fast typing impossible in my case; for my proof-of-concept, this is acceptable, but I thought there might be others having the same problem. If it is not reproducable on other configurations, then forget about it. works for me not reproducible => closed |