mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
e8eae5c2a2
On Windows, some keys are called "extended key". Their scan code include 0xE000. For example, Enter key in standard position is 0x001C but Numpad's Enter key is 0xE01C. Unfortunately, both of them cause same virtual keycode value, VK_RETURN. Therefore, currently, nsIDOMWindowUtils.sendNativeKey() can synthesize only one native key event of them (only non-extended key's event). Additionally, MapVirtualKeyEx() API with MAPVK_VK_TO_VSC (even with MAPVK_VK_TO_VSC_EX) don't return extended scancode value as expected. For solving these issues, we should include scan code value to the virtual keycode value at calling sendNativeKey(). Fortunately, virtual keycode value on Windows is 0 ~ 255 (0x00 ~ 0xFF) but aNativeKeyCode of sendNativeKey() is int32_t. So, we can use upper 16 bit for specifying scan code. This patch explicitly specifies scan code value at defining WIN_VK_* in NativeKeyCodes.js. Additionally, this patch duplicates native virtual keycode definition for Home, End, Insert, Delete, PageUp, PageDown, ArrowUp, ArrowLeft, ArrowDown, ArrowRight and Enter as WIN_VK_* and WIN_VK_NUMPAD_*. This makes automated tests can specify both positions' keys explicitly. Finally, this patch adds some tests to test_keycodes.xul for testing KeyboardEvent.code value of those keys in both positions. MozReview-Commit-ID: 8n1rQ71dilg --HG-- extra : rebase_source : 0f4bb9193aa06cd7985590636b77a6e2a71ac2e4 |
||
---|---|---|
.. | ||
config | ||
crashtest | ||
docker | ||
firefox-ui | ||
gtest | ||
instrumentation | ||
luciddream | ||
marionette | ||
mochitest | ||
modules | ||
mozbase | ||
mozharness | ||
profiles | ||
puppeteer | ||
runtimes | ||
specialpowers | ||
talos | ||
tools | ||
tps | ||
web-platform | ||
xpcshell | ||
cppunittest.ini | ||
mach_commands.py | ||
README.txt | ||
remotecppunittests.py | ||
runcppunittests.py | ||
testsuite-targets.mk |
Common testing tools for mozilla codebase projects, test suite definitions for automated test runs, tests that don't fit anywhere else, and other fun stuff