Closed Bug 1258153 Opened 8 years ago Closed 8 years ago

Alt codes to input unicode is broken

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 10
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox47 --- unaffected
firefox48 - fixed

People

(Reporter: kbrosnan, Assigned: masayuki)

References

Details

(Keywords: regression)

Attachments

(1 file)

I am unable to use <alt> + num pad to type unicode characters. For example typing <alt> + 0171 will type «.

 9:16.03 INFO: Narrowed inbound regression window from [29022393, 1d96035b] (3 revisions) to [290223
93, eb7c36e2] (2 revisions) (~1 steps left)
 9:16.03 INFO: Oh noes, no (more) inbound revisions :(
 9:16.03 INFO: Last good revision: 29022393615224517283b16adae938128f75e27b
 9:16.03 INFO: First bad revision: eb7c36e2ef5d48262bc8566da9ea37623e7d0883
 9:16.04 INFO: Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=29022393615224517283b16ada
e938128f75e27b&tochange=eb7c36e2ef5d48262bc8566da9ea37623e7d0883
Yep I'm seeing this too. You get a nothing output.

Typically I use long dash Alt 0151
> <000006> 2DF013BA P WM_SYSKEYDOWN nVirtKey:VK_MENU cRepeat:1 ScanCode:38 fExtended:0 fAltDown:1 fRepeat:1 fUp:0
> <000007> 2DF013BA P WM_SYSKEYDOWN nVirtKey:VK_NUMPAD0 cRepeat:1 ScanCode:52 fExtended:0 fAltDown:1 fRepeat:0 fUp:0
> <000008> 2DF013BA P WM_SYSKEYUP nVirtKey:VK_NUMPAD0 cRepeat:1 ScanCode:52 fExtended:0 fAltDown:1 fRepeat:1 fUp:1
> <000009> 2DF013BA P WM_SYSKEYDOWN nVirtKey:VK_NUMPAD1 cRepeat:1 ScanCode:4F fExtended:0 fAltDown:1 fRepeat:0 fUp:0
> <000010> 2DF013BA P WM_SYSKEYUP nVirtKey:VK_NUMPAD1 cRepeat:1 ScanCode:4F fExtended:0 fAltDown:1 fRepeat:1 fUp:1
> <000011> 2DF013BA P WM_SYSKEYDOWN nVirtKey:VK_NUMPAD7 cRepeat:1 ScanCode:47 fExtended:0 fAltDown:1 fRepeat:0 fUp:0
> <000012> 2DF013BA P WM_SYSKEYUP nVirtKey:VK_NUMPAD7 cRepeat:1 ScanCode:47 fExtended:0 fAltDown:1 fRepeat:1 fUp:1
> <000013> 2DF013BA P WM_SYSKEYDOWN nVirtKey:VK_NUMPAD1 cRepeat:1 ScanCode:4F fExtended:0 fAltDown:1 fRepeat:0 fUp:0
> <000014> 2DF013BA P WM_SYSKEYUP nVirtKey:VK_NUMPAD1 cRepeat:1 ScanCode:4F fExtended:0 fAltDown:1 fRepeat:1 fUp:1
> <000015> 2DF013BA P WM_KEYUP nVirtKey:VK_MENU cRepeat:1 ScanCode:38 fExtended:0 fAltDown:0 fRepeat:1 fUp:1
> <000016> 2DF013BA P WM_CHAR chCharCode:'171' (171) cRepeat:1 ScanCode:38 fExtended:0 fAltDown:0 fRepeat:1 fUp:1

WM_CHAR is received after WM_KEYUP of Alt key. I should check this.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
When user types a Unicode character with Alt + Numpad keys, recevied messages are:

1. WM_SYSKEYDOWN for Alt (VK_MENU)
2. WM_SYSKEYDOWN and WM_SYSKEYUP of Numpad keys
3. WM_KEYUP for Alt (VK_MENU)
4. WM_CHAR for the Unicode character

The WM_CHAR indicates Alt key with its scancode.  Then, we shouldn't set the key value of the keypress event as "Alt".  Instead of that, we should set key value to the inputted Unicode character.  Then, the keypress event won't be supprressed by WidgetKeyboardEvent::ShouldCauseKeypressEvents() in TextEventDispatcher (this is what the cause of bug 1253153 is.

Review commit: https://reviewboard.mozilla.org/r/41715/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/41715/
Attachment #8733279 - Flags: review?(m_kato)
Comment on attachment 8733279 [details]
MozReview Request: Bug 1258153 Initialize mozilla::widget::Native key with actual inputting character if it's created for WM_CHAR r?m_kato

https://reviewboard.mozilla.org/r/41715/#review38405
Attachment #8733279 - Flags: review?(m_kato) → review+
https://hg.mozilla.org/mozilla-central/rev/8786bbb9702f
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Depends on: 1294536
You need to log in before you can comment on or make changes to this bug.