Closed Bug 896362 Opened 11 years ago Closed 11 years ago

Support special keys VK_ABNT_C1 and VK_ABNT_C2 of Brazilian keyboard

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: intl)

Attachments

(2 files, 1 obsolete file)

VK_ABNT_C1 is the right key of the left shift key which is a printable key. VK_ABNT_C2 is separator key on numpad. KeyboardEvent.key supports this key by bug 865566, but we need more work for it.
This patch makes: KeyboardEvent.location for VK_ABNT_C2 is DOM_LOCATION_NUMPAD. KeyboardEvent.keyCode for VK_ABNT_C1 is computed from the input character. KeyboardEvent.keyCode for VK_ABNT_C2 is NS_VK_SEPARATOR. IE uses 0xC2 (the raw value of VK_ABNT_C2). However, we're already using NS_VK_SEPARATOR for the key on Mac and Linux. Let's keep the consistency between Gecko on all platforms.
Attachment #779143 - Attachment is obsolete: true
Attachment #779187 - Flags: review?(jmathies)
Attachment #779187 - Flags: review?(bugs)
Comment on attachment 779144 [details] [diff] [review] part.2 Add tests for VK_ABNT_C1 and VK_ABNT_C2 Note that only keydown and keyup events are fired at WIN_VK_ABNT_C2 with Japanese keyboard layout. This is a bug at least under our rules. I'll file a bug for it.
Attachment #779144 - Flags: review?(jmathies)
Attachment #779144 - Flags: review?(bugs)
Attachment #779144 - Flags: review?(jmathies) → review+
Comment on attachment 779187 [details] [diff] [review] part.1 Support VK_ABNT_C1 and VK_ABNT_C2 (keyCode and location) I don't have the ability to test, the code looks correct though afaict.
Attachment #779187 - Flags: review?(jmathies) → review+
You can test only VK_ABNT_C1, which can be pressed with screen keyboard of Windows. For testing VK_ABNT_C2, you need Brazilian full keyboard or JIS full keyboard for Mac.
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #0) > VK_ABNT_C1 is the right key of the left shift key which is a printable key. Oops, the left key of the right shift key.
Comment on attachment 779187 [details] [diff] [review] part.1 Support VK_ABNT_C1 and VK_ABNT_C2 (keyCode and location) Do you know what Chrome or Safari reports for VK_ABNT_C2?
Attachment #779187 - Flags: review?(bugs) → review+
Attachment #779144 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #9) > Comment on attachment 779187 [details] [diff] [review] > part.1 Support VK_ABNT_C1 and VK_ABNT_C2 (keyCode and location) > > Do you know what Chrome or Safari reports for VK_ABNT_C2? Chrome uses 0xC2 on Windows but 0xBC on Mac. Safari uses 0xBC. And I check Gecko for Mac, Gecko for Mac uses DOM_VK_COMMA. I checked TextInputHandler.mm, then, I realized that I forgot to handle kVK_JIS_KeypadComma as a special key :-( I'll file a bug for it.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: