Alt codes to input unicode is broken

RESOLVED FIXED in Firefox 48

Status

()

Core
Widget: Win32
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: kbrosnan, Assigned: masayuki)

Tracking

({regression})

Trunk
mozilla48
x86_64
Windows 10
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox47 unaffected, firefox48- fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
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

Comment 1

2 years ago
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
Created 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

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+

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8786bbb9702f
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox48: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
tracking-firefox48: ? → -

Updated

2 years ago
Depends on: 1294536
You need to log in before you can comment on or make changes to this bug.