|
|
Chromium Code Reviews
Description[Mac DomCode] Swap 'IntlBackslash' and 'Backquote' on ISO keyboard
According to spec the key to the left of Digit1 should produce DomCode
'Backquote', and the key between ShiftLeft and KeyZ should produce
DomCode 'IntlBackslash'.
The current issues are:
1. On Mac the |keyCode| were swapped on Apple's 102 French keyboard
and PC ISO 102 French keyboard.
2. On Linux and Windows the DomCode were swapped on Apple's 102 French
keyboard.
It sounds like Apple wired their keyboards with the keys swapped, so
we will fix issue 1 on Mac side by swapping these two keys back.
However we could not find a way to detect Apple's keyboard on Linux
and Windows, so we will leave the issue assuming it's rare to use an
Apple's keyboard on PC. (https://crbug.com.608493)
SPEC=https://w3c.github.io/uievents-code/#keyboard-102
BUG=600607
TEST=https://cdn.rawgit.com/w3c/uievents/gh-pages/tests/key-mtest-102fr-fr.html
Committed: https://crrev.com/ba1eb3a80a5fe90b236518a3005f0b6cbde8de00
Cr-Commit-Position: refs/heads/master@{#392970}
Patch Set 1 #
Total comments: 3
Messages
Total messages: 14 (5 generated)
Description was changed from ========== [Mac DomCode] Swap 'IntlBackslash' and 'Backquote' on ISO keyboard According to spec the key to the left of Digit1 should produce DomCode 'Backquote', and the key between ShiftLeft and KeyZ should produce DomCode 'IntlBackslash'. The current issues are: 1. On Mac the |keyCode| were swapped on Apple's 102 French keyboard and PC ISO 102 French keyboard. 2. On Linux and Windows the DomCode were swapped on Apple's 102 French keyboard. It sounds like Apple wired their keyboards with the keys swapped, so we will fix issue 1 on Mac side by swapping these two keys back. However we could not find a way to detect Apple's keyboard on Linux and Windows, so we will leave the issue assuming it's rare to use an Apple's keyboard on PC. SPEC=https://w3c.github.io/uievents-code/#keyboard-102 BUG=600607 TEST=https://cdn.rawgit.com/w3c/uievents/gh-pages/tests/key-mtest-102fr-fr.html ========== to ========== [Mac DomCode] Swap 'IntlBackslash' and 'Backquote' on ISO keyboard According to spec the key to the left of Digit1 should produce DomCode 'Backquote', and the key between ShiftLeft and KeyZ should produce DomCode 'IntlBackslash'. The current issues are: 1. On Mac the |keyCode| were swapped on Apple's 102 French keyboard and PC ISO 102 French keyboard. 2. On Linux and Windows the DomCode were swapped on Apple's 102 French keyboard. It sounds like Apple wired their keyboards with the keys swapped, so we will fix issue 1 on Mac side by swapping these two keys back. However we could not find a way to detect Apple's keyboard on Linux and Windows, so we will leave the issue assuming it's rare to use an Apple's keyboard on PC. (https://crbug.com.608493) SPEC=https://w3c.github.io/uievents-code/#keyboard-102 BUG=600607 TEST=https://cdn.rawgit.com/w3c/uievents/gh-pages/tests/key-mtest-102fr-fr.html ==========
chongz@chromium.org changed reviewers: + garykac@chromium.org
Hi garykac@, PTAL, thanks! https://codereview.chromium.org/1943553002/diff/1/ui/events/keycodes/keyboard... File ui/events/keycodes/keyboard_code_conversion_mac.mm (right): https://codereview.chromium.org/1943553002/diff/1/ui/events/keycodes/keyboard... ui/events/keycodes/keyboard_code_conversion_mac.mm:805: if (KBGetLayoutType(LMGetKbdType()) == kKeyboardISO) { I'm not sure how to test this code, it seems magic to me that |KBGetLayoutType(LMGetKbdType())| can return the keyboard I'm typing on (without touching |event|) even if I have two keyboards connected.
https://codereview.chromium.org/1943553002/diff/1/ui/events/keycodes/keyboard... File ui/events/keycodes/keyboard_code_conversion_mac.mm (right): https://codereview.chromium.org/1943553002/diff/1/ui/events/keycodes/keyboard... ui/events/keycodes/keyboard_code_conversion_mac.mm:805: if (KBGetLayoutType(LMGetKbdType()) == kKeyboardISO) { On 2016/05/02 21:33:25, chongz wrote: > I'm not sure how to test this code, it seems magic to me that > |KBGetLayoutType(LMGetKbdType())| can return the keyboard I'm typing on (without > touching |event|) even if I have two keyboards connected. For which keyboards does this return kKeyboardISO? We know this problem occurs for the 102-key keyboard when set to ISO, but other keyboards (like Japanese) can (AIUI) be set to ISO but do not suffer this problem (i.e., the Grave key is correct). I only tested with a PC Japanese keyboard. I'm ordering a Mac Japanese keyboard to test.
https://codereview.chromium.org/1943553002/diff/1/ui/events/keycodes/keyboard... File ui/events/keycodes/keyboard_code_conversion_mac.mm (right): https://codereview.chromium.org/1943553002/diff/1/ui/events/keycodes/keyboard... ui/events/keycodes/keyboard_code_conversion_mac.mm:805: if (KBGetLayoutType(LMGetKbdType()) == kKeyboardISO) { On 2016/05/02 22:03:23, garykac wrote: > On 2016/05/02 21:33:25, chongz wrote: > > I'm not sure how to test this code, it seems magic to me that > > |KBGetLayoutType(LMGetKbdType())| can return the keyboard I'm typing on > (without > > touching |event|) even if I have two keyboards connected. > > For which keyboards does this return kKeyboardISO? > > We know this problem occurs for the 102-key keyboard when set to ISO, but other > keyboards (like Japanese) can (AIUI) be set to ISO but do not suffer this > problem (i.e., the Grave key is correct). > > I only tested with a PC Japanese keyboard. I'm ordering a Mac Japanese keyboard > to test. It returns |kKeyboardISO| for 1. Apple's ISO Fr Canadian keyboard (cannot change layout) 2. PC JIS keyboard set to ISO 3. PC ANSI keyboard set to ISO From my tests this problem occurs to all three kinds of settings above. e.g. On my PC JIS keyboard with layout set to ISO, the Grace key is wrong and will produce 'IntlBackslash'. I don't have a Mac JIS keyboard though.
Hi garykac@, I was wondering have you got your Mac Japanese keyboard yet? Or is there any updates to this CL? Thanks!
On 2016/05/11 14:12:52, chongz wrote: > Hi garykac@, I was wondering have you got your Mac Japanese keyboard yet? Or is > there any updates to this CL? Thanks! I just received it yesterday. Conveniently, the Japanese Mac keyboard doesn't even have a Backquote key: http://media.tumblr.com/8a802af0eab218f3d3893d386e6f9580/tumblr_inline_mmmtmm... (something I probably could have determined beforehand by looking at the images more carefully) Given that, I can't think of any other issues.
lgtm
The CQ bit was checked by chongz@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1943553002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1943553002/1
Message was sent while issue was closed.
Description was changed from ========== [Mac DomCode] Swap 'IntlBackslash' and 'Backquote' on ISO keyboard According to spec the key to the left of Digit1 should produce DomCode 'Backquote', and the key between ShiftLeft and KeyZ should produce DomCode 'IntlBackslash'. The current issues are: 1. On Mac the |keyCode| were swapped on Apple's 102 French keyboard and PC ISO 102 French keyboard. 2. On Linux and Windows the DomCode were swapped on Apple's 102 French keyboard. It sounds like Apple wired their keyboards with the keys swapped, so we will fix issue 1 on Mac side by swapping these two keys back. However we could not find a way to detect Apple's keyboard on Linux and Windows, so we will leave the issue assuming it's rare to use an Apple's keyboard on PC. (https://crbug.com.608493) SPEC=https://w3c.github.io/uievents-code/#keyboard-102 BUG=600607 TEST=https://cdn.rawgit.com/w3c/uievents/gh-pages/tests/key-mtest-102fr-fr.html ========== to ========== [Mac DomCode] Swap 'IntlBackslash' and 'Backquote' on ISO keyboard According to spec the key to the left of Digit1 should produce DomCode 'Backquote', and the key between ShiftLeft and KeyZ should produce DomCode 'IntlBackslash'. The current issues are: 1. On Mac the |keyCode| were swapped on Apple's 102 French keyboard and PC ISO 102 French keyboard. 2. On Linux and Windows the DomCode were swapped on Apple's 102 French keyboard. It sounds like Apple wired their keyboards with the keys swapped, so we will fix issue 1 on Mac side by swapping these two keys back. However we could not find a way to detect Apple's keyboard on Linux and Windows, so we will leave the issue assuming it's rare to use an Apple's keyboard on PC. (https://crbug.com.608493) SPEC=https://w3c.github.io/uievents-code/#keyboard-102 BUG=600607 TEST=https://cdn.rawgit.com/w3c/uievents/gh-pages/tests/key-mtest-102fr-fr.html ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== [Mac DomCode] Swap 'IntlBackslash' and 'Backquote' on ISO keyboard According to spec the key to the left of Digit1 should produce DomCode 'Backquote', and the key between ShiftLeft and KeyZ should produce DomCode 'IntlBackslash'. The current issues are: 1. On Mac the |keyCode| were swapped on Apple's 102 French keyboard and PC ISO 102 French keyboard. 2. On Linux and Windows the DomCode were swapped on Apple's 102 French keyboard. It sounds like Apple wired their keyboards with the keys swapped, so we will fix issue 1 on Mac side by swapping these two keys back. However we could not find a way to detect Apple's keyboard on Linux and Windows, so we will leave the issue assuming it's rare to use an Apple's keyboard on PC. (https://crbug.com.608493) SPEC=https://w3c.github.io/uievents-code/#keyboard-102 BUG=600607 TEST=https://cdn.rawgit.com/w3c/uievents/gh-pages/tests/key-mtest-102fr-fr.html ========== to ========== [Mac DomCode] Swap 'IntlBackslash' and 'Backquote' on ISO keyboard According to spec the key to the left of Digit1 should produce DomCode 'Backquote', and the key between ShiftLeft and KeyZ should produce DomCode 'IntlBackslash'. The current issues are: 1. On Mac the |keyCode| were swapped on Apple's 102 French keyboard and PC ISO 102 French keyboard. 2. On Linux and Windows the DomCode were swapped on Apple's 102 French keyboard. It sounds like Apple wired their keyboards with the keys swapped, so we will fix issue 1 on Mac side by swapping these two keys back. However we could not find a way to detect Apple's keyboard on Linux and Windows, so we will leave the issue assuming it's rare to use an Apple's keyboard on PC. (https://crbug.com.608493) SPEC=https://w3c.github.io/uievents-code/#keyboard-102 BUG=600607 TEST=https://cdn.rawgit.com/w3c/uievents/gh-pages/tests/key-mtest-102fr-fr.html Committed: https://crrev.com/ba1eb3a80a5fe90b236518a3005f0b6cbde8de00 Cr-Commit-Position: refs/heads/master@{#392970} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/ba1eb3a80a5fe90b236518a3005f0b6cbde8de00 Cr-Commit-Position: refs/heads/master@{#392970} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
