spun off from bug 457523. We need automated tests for Caps Lock key. The patch is coming soon.
Created attachment 343074 [details] [diff] [review] Patch v1.0 I added keydown/keyup testing code. We have two issues: 1. Only on Windows, the modifier keydown/keyup events are fired from syntesizeNativeKeyEvent. So, this patch needs to ignore the key events. It seems that Mac should fire these events too. 2. The key up events are not fired on Mac when Command key is pressed. But these issues should be out of scope of this bug.
+ const SHOULD_DELIVED_NONE = 0x0; + const SHOULD_DELIVED_KEYDOWN = 0x1; + const SHOULD_DELIVED_KEYPRESS = 0x2; + const SHOULD_DELIVED_KEYUP = 0x4; + const SHOULD_DELIVED_ALL = SHOULD_DELIVED_KEYDOWN | + SHOULD_DELIVED_KEYPRESS | + SHOULD_DELIVED_KEYUP; I think DELIVED is meant to be DELIVER. + const SHOULD_NOT_DELIVED_KEYPRESS = SHOULD_DELIVED_KEYDOWN | + SHOULD_DELIVED_KEYUP; + const SHOULD_NOT_DELIVED_KEYUP = SHOULD_DELIVED_KEYDOWN | + SHOULD_DELIVED_KEYPRESS; I wouldn't use NOT. I'd just say SHOULD_DELIVER_KEYDOWN_KEYUP and SHOULD_DELIVER_KEYDOWN_KEYPRESS.
Created attachment 343178 [details] [diff] [review] Patch v1.1 renamed them.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.