Firefox 46 | Desktop | Windows 7 | Multiple Key Codes for CTRL + 3 - JavaScript Keydown Event




2 years ago
2 years ago


(Reporter: mrpatrickbrown77, Unassigned, NeedInfo)


46 Branch

Firefox Tracking Flags

(Not tracked)


(Whiteboard: btpp-followup-2016-07-05)



2 years ago
User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13F69 Safari/601.1

Steps to reproduce:

- Create a number input in HTML5.

<input id="num" type="number" />

- Attach a keydown event using:

document.getElementById('num').onkeydown = function (e) { console.log(e.keyCode);  }:

- Click into the box and hit CTRL + 3 (UK keyboard).

Actual results:

- Several key codes are output for the £ symbol (instead of 1)
- CTRL is output correctly
- 3 on its own is correct as well

Expected results:

- One should be present for CTRL + 3 (£)


2 years ago
Summary: Firefox 46 | Desktop | Windows 7 | Multiple Key Codes - JavaScript Keydown Event → Firefox 46 | Desktop | Windows 7 | Multiple Key Codes for CTRL + 3 - JavaScript Keydown Event


2 years ago
Component: Untriaged → Event Handling
Product: Firefox → Core
smaug knows about this sort of thing.
Flags: needinfo?(bugs)
Whiteboard: btpp-followup-2016-07-05
Sorry, I'm missing to see what the issue here is.
I'd expect to get keydown for ctrl and then keydown for 3, and
that is what I see in Nightly on linux, and also Chrome on linux.

Is this perhaps Windows only issue? I guess I should trý, but don't have Win running atm.
Flags: needinfo?(bugs)
> Is this perhaps Windows only issue?

Could be because only on Windows, we don't compute keyCode value by ourselves, we just expose native virtual keycode value except VK_OEM_*.  However, if this is problem, I guess IE/Edge and Chrome also have same issue... I'll check it later.
Flags: needinfo?(masayuki)
I don't see any odd behavior Nightly on both Win10 and Win7. The keycode for '3' key is always 51.
(I tested on

Reporter, please explain what's the problem and what should be with more details.
Flags: needinfo?(masayuki) → needinfo?(mrpatrickbrown77)

Comment 5

2 years ago
It turns out this had something to do with a site called BrowserStack.

It is meant to emulate browsers 100% but had this issue on FireFox.

I have checked normal FireFox and everything works great.

I am shutting this issue.

Thanks for looking all.


2 years ago
Last Resolved: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.