[Laszlo-dev] For Review: Change 20090207-hqm-7 Summary: Fix for missing key up events in swf runtime

André Bargull andre.bargull at udo.edu
Sat Feb 7 08:25:40 PST 2009


Not approved. There are now two bugs in Firefox.

Firefox3+SWF9: Press ctrl, press v, release v, release ctrl:
---
onkeydown for 17
onkeydown for 86
onkeyup for 17
onkeyup for 86
onkeyup for 17
---
=> an additional onkeyup-event for ctrl

Firefox3+SWF8/9,DHTML: Press v, press ctrl, release ctrl, release v
---
onkeydown for 86
onkeydown for 17
onkeyup for 86
onkeyup for 17
onkeydown for 86
onkeyup for 86
---
=> additional onkeydown/up sequence

<canvas debug="true" >
   <handler name="onkeydown" args="kc" reference="lz.Keys" >
     Debug.write("onkeydown for %s", kc);
   </handler>
   <handler name="onkeyup" args="kc" reference="lz.Keys" >
     Debug.write("onkeyup for %s", kc);
   </handler>
</canvas>

On 2/7/2009 6:50 AM, Henry Minsky wrote:
> Change 20090207-hqm-7 by hqm at badtzmaru.home on 2009-02-07 00:36:40 EST
>     in /Users/hqm/openlaszlo/trunk-clean
>     for http://svn.openlaszlo.org/openlaszlo/trunk
> 
> Summary: workaround for missing Flash keyboard events
> 
> Summary:  Fix for missing key up events in swf runtime
> 
> New Features:
> 
> Bugs Fixed: LPP-7012
> 
> Technical Reviewer: andre
> QA Reviewer: max
> Doc Reviewer: (pending)
> 
> Documentation:
> 
> Release Notes:
> 
> Details:
> 
> + This works around the bug with the LFC tracking whether the command key
> is down, which shows up in the debugger where keyboard commands like
> 'enter' no longer respond.
> 
> It does have the effect of making the model of the down keys slightly
> wrong; if the user presses 'v', then 'command', and then releases the
> 'command' key, the 'v' key will be regarded as having gone up also.
> 
> + Added a "ctrlKey" flag which is passed from the SWF8 and SWF9 kernel
> up to the LFC LzKeysService object.  For a key up event, this flag
> says whether Flash thinks the control key was down when a key is
> pressed or released.
> 
> This is used to by lzKeys.gotKeyUp to try to correct the state of the
> downKeys table. The workaround is to err on the side of believing that
> the control key is up.
> 
> 
> + Also a cleanup of swf8 keyboard and mouse event dispatch -- removed the
> obscure setup of keyboard and mouse handler from SWFFile.java, and
> replaced with more conventional modern listeners in LzKeyboardKernel
> and LzMouseKernel
> 
> 
> Tests:
> 
> + in app running in Flash (8 or 9), type command key sequence
> 
> [ctrl down] [v down] [ctrl up] [v up]
> 
> See if Debugger still responds to "Enter" command to evaluate an expression
> 
> 
> + in app running in Flash (8 or 9), type command key sequence
> 
> [ctrl down] [v down] [v up] [ctrl up]
> 
> See if Debugger still responds to "Enter" command to evaluate an expression
> 
> 
> Files:
> M      WEB-INF/lps/lfc/kernel/swf/LzMouseKernel.as
> M      WEB-INF/lps/lfc/kernel/swf/LzKeyboardKernel.as
> M      WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.as
> M      WEB-INF/lps/lfc/services/LzKeys.lzs
> M      WEB-INF/lps/server/src/org/openlaszlo/compiler/SWFFile.java
> 
> 
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090207-hqm-7.tar
> 


More information about the Laszlo-dev mailing list