mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 08:42:13 +00:00
ed18f14624
Gecko decides keyCode from an ASCII character which is produced by the key by itself or with Shift on active keyboard layout or alternative ASCII capable keyboard layout if active keyboard layout isn't ASCII capable. However, we've ignored alternative ASCII capable keyboard layout's character if both the key itself and with Shift don't produce ASCII alphabet nor ASCII numeral, i.e., ASCII punctuation characters are not used in alternative ASCII capable keyboard layout because of avoiding mapping a keyCode value to 2 or more keys. However, setting 0 to keyCode value makes Firefox unusable with some web applications which are aware of neither KeyboardEvent.key nor KeyboardEvent.code. So, even if we map same keyCode value to a key, we should avoid setting keyCode value to 0 as far as possible. This patch's approach is, we behave same keyCode value as the alternative ASCII capable keyCode is selected when computed keyCode value of active keyboard layout is 0. This means that we will make some language users whose keyboard layout for their language is not ASCII capable can use global web services which support US keyboard layout of Firefox since the new keyCode values are mostly computed with US layout on Windows or actual alternative ASCII capable keyboard layout on macOS and Linux. In other words, we cannot improve compatibility with web applications which don't support Firefox by this patch since our keyCode values are really different from Chrome's. So, unfortunately, if we'd use exactly same keyCode computation as Chromium, we'd break compatibility with existing web applications which are aware of Firefox since it's necessary to check UA name or something before using keyCode values. Note that the most important difference between Windows and the others is, such keyCode value is computed with alternative ASCII capable keyboard layout on macOS and Linux but only on Windows, it's computed with OEM virtual keycode. This means that only on Windows, the keyCode value may be different from actual alternative ASCII capable keyboard layout's keyCode. MozReview-Commit-ID: As289r9wp6i --HG-- extra : rebase_source : 66181403dbe8ca8dab893edc8f4eec1991d544d0 |
||
---|---|---|
.. | ||
unit | ||
bug586713_window.xul | ||
chrome_context_menus_win.xul | ||
chrome.ini | ||
empty_window.xul | ||
file_bug596600.html | ||
file_input_events_on_deactive_window.html | ||
file_secure_input.html | ||
mochitest.ini | ||
moz.build | ||
native_menus_window.xul | ||
native_mouse_mac_window.xul | ||
standalone_native_menu_window.xul | ||
taskbar_previews.xul | ||
test_assign_event_data.html | ||
test_bug343416.xul | ||
test_bug413277.html | ||
test_bug428405.xul | ||
test_bug429954.xul | ||
test_bug444800.xul | ||
test_bug466599.xul | ||
test_bug478536.xul | ||
test_bug485118.xul | ||
test_bug517396.xul | ||
test_bug522217.xul | ||
test_bug538242.xul | ||
test_bug565392.html | ||
test_bug586713.xul | ||
test_bug593307.xul | ||
test_bug596600.xul | ||
test_bug673301.xul | ||
test_bug760802.xul | ||
test_bug1123480.xul | ||
test_bug1151186.html | ||
test_chrome_context_menus_win.xul | ||
test_clipboard.xul | ||
test_composition_text_querycontent.xul | ||
test_imestate.html | ||
test_input_events_on_deactive_window.xul | ||
test_key_event_counts.xul | ||
test_keycodes.xul | ||
test_mouse_scroll.xul | ||
test_native_key_bindings_mac.html | ||
test_native_menus.xul | ||
test_native_mouse_mac.xul | ||
test_panel_mouse_coords.xul | ||
test_picker_no_crash.html | ||
test_platform_colors.xul | ||
test_plugin_input_event.html | ||
test_plugin_scroll_consistency.html | ||
test_position_on_resize.xul | ||
test_secure_input.html | ||
test_sizemode_events.xul | ||
test_standalone_native_menu.xul | ||
test_system_status_bar.xul | ||
test_taskbar_progress.xul | ||
test_wheeltransaction.xul | ||
TestAppShellSteadyState.cpp | ||
TestChromeMargin.cpp | ||
utils.js | ||
window_bug429954.xul | ||
window_bug478536.xul | ||
window_bug522217.xul | ||
window_bug538242.xul | ||
window_bug593307_centerscreen.xul | ||
window_bug593307_offscreen.xul | ||
window_composition_text_querycontent.xul | ||
window_imestate_iframes.html | ||
window_mouse_scroll_win.html | ||
window_picker_no_crash_child.html | ||
window_state_windows.xul | ||
window_wheeltransaction.xul |