Open Bug 2004800 Opened 1 day ago Updated 1 hour ago

Keyboard event shift + 6 sends incorrect keyCode (0, should be 54)

Categories

(Core :: Widget: Gtk, defect)

Firefox 145
defect

Tracking

()

UNCONFIRMED

People

(Reporter: pedropaulosuzuki1, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:145.0) Gecko/20100101 Firefox/145.0

Steps to reproduce:

'pt-BR' ABNT2 keyboard, GNU/Linux, Firefox 145.0.1, X11.

Try to capture a 'keydown', 'keyup' or 'keypress' event and capture Shift + 6 in any way.

Test:

  1. Open new tab
  2. document.open();document.close();document.addEventListener('keydown', event => console.log(event));
  3. Press Shift + 6

Actual results:

{
key: "Dead",
keyCode: 0,
which: 0
}

Expected results:

{
key: "¨",
keyCode: 54,
which: 54
}

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Chromium returns this:

{ key: "Dead", keyCode: 54, which: 54 }

Please run on terminal with MOZ_LOG=KeyboardHandler:4,sync env variable and investigate the log - it should show how the key is processed.

Flags: needinfo?(pedropaulosuzuki1)
Attached file log.txt
Flags: needinfo?(pedropaulosuzuki1)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: