diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-07-06 02:51:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-06 02:51:50 -0700 |
commit | 68fb9ebc413f9cfc1ad4ca578d904c164836db74 (patch) | |
tree | ad09aee288d37a96a8f3b8fec61bc8f1eba93b91 /components/script/task_source/dom_manipulation.rs | |
parent | 23f5264e1c0b48ed0b04defdaa070a4336781d95 (diff) | |
parent | 6496d73210ed26b919b7910400d5a624e11bf646 (diff) | |
download | servo-68fb9ebc413f9cfc1ad4ca578d904c164836db74.tar.gz servo-68fb9ebc413f9cfc1ad4ca578d904c164836db74.zip |
Auto merge of #11950 - jdm:keylayout2, r=emilio
Support non-QWERTY keyboards
Using the ReceivedCharacter event from glutin, we can obtain the actual key characters that the user is pressing and releasing. This gets passed to the script thread along with the physical key data, since KeyboardEvent needs both pieces of information, where they get merged into a single logical key that gets processed by clients like TextInput without any special changes.
Tested by switching my macbook keyboard to dvorak and looking at the output of keypress/keyup/keydown event listeners, as well as playing with tests/html/textarea.html. Non-content keybindings like reload work as expected, too - the remapped keybinding triggers the reload action.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #4144
- [X] These changes do not require tests because I can't think of a way to test remapped keyboard input
Fixes #11991.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11950)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/task_source/dom_manipulation.rs')
0 files changed, 0 insertions, 0 deletions