gecko-dev/servo/ports
Josh Matthews 57518b13d8 servo: Merge #11950 - Support non-QWERTY keyboards (from jdm:keylayout2); r=emilio
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 68fb9ebc413f9cfc1ad4ca578d904c164836db74
2016-07-06 02:51:50 -07:00
..
cef servo: Merge #11950 - Support non-QWERTY keyboards (from jdm:keylayout2); r=emilio 2016-07-06 02:51:50 -07:00
geckolib servo: Merge #11950 - Support non-QWERTY keyboards (from jdm:keylayout2); r=emilio 2016-07-06 02:51:50 -07:00
glutin servo: Merge #11950 - Support non-QWERTY keyboards (from jdm:keylayout2); r=emilio 2016-07-06 02:51:50 -07:00
stable-rust servo: Merge #11945 - Add mach build-stable to build with stable rustc (from gpoesia:master); r=SimonSapin 2016-07-05 07:17:48 -07:00