forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 900750 - part 4: Make NativeKey replaces MODIFIER_CONTROL and MOD…
…IFIER_ALT of mModKeyState with MODIFIER_ALTGRAPH if user emulates AltGr key press with pressing both Ctrl and Alt keys and current keydown produces character(s) r=m_kato,smaug Users can emulate AltGr key with pressing both Ctrl key and Alt key on Windows since AltGr is represented as so in Windows and physical keyboard may not have AltRight key. If user emulates AltGr key, we should set MODIFIER_ALTGRAPH to a set of keyboard events for printable keys only when the key press produces character(s) or a dead key. For example: 1. ControlLeft keydown event should make ctrlKey true. 2. AltLeft keydown event should make altKey true (not AltGraph state). 3. ctrlKey and altKey of printable keydown, keypress and keyup events should be set to false, but getModifierState("AltGraph") should return true. 4. AltLeft keyup event should make altKey false. 5. ControlLeft keyup event should make ctrlKey false. (If AltLeft key is pressed first, altKey of AltLeft keydown is true and both altKey and ctrlKey of the following ControlLeft keydown are true as usual.) MozReview-Commit-ID: 8Km8GXPDQw1 --HG-- extra : rebase_source : f4924f075c68361c8ce563910280ea24774c519f
- Loading branch information
1 parent
ad475fd
commit cccab7b
Showing
4 changed files
with
160 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters