New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 842548 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 16
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug


Participants' hotlists:
Hotlist-1
Hotlist-2


Sign in to add a comment

onKeyEvent not triggered when pressing space on fallback on-screen keyboard

Reported by mar...@noredink.com, May 14 2018

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS x86_64 10452.74.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.137 Safari/537.36
Platform: 10452.74.0 (Official Build) stable-channel eve

Steps to reproduce the problem:
1. Download the attached zip file, unarchive, and load it as an unpacked extension. This is the sample code provided at https://developer.chrome.com/extensions/samples#search:input.ime unaltered.
2. Enable the IME at Settings > Languages and input > Input method > Manage input methods
3. In chrome://extensions, click on "background page" of the Test IME extension to open the inspector.
4. Switch to tablet mode and activate the Test IME.
5. Focus on the JavaScript console of the background page, and tap the space key

What is the expected behavior?
A new "onKeyEvent: context: .." log is appended to the console 

What went wrong?
No log is appended

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 66.0.3359.137  Channel: stable
OS Version: 10452.74.0
Flash Version: 

Further diagnostic info:
https://w3c.github.io/uievents/tools/key-event-viewer.html shows that the space key fires a key event with "Process" as its `key` property.

Motivation:
I'm using this IME to input Japanese on Chrome OS: https://github.com/jmuk/chrome-skk
which relies on the space key event to trigger a conversion. Right now, in tablet mode, pressing space appends a space character when it should be doing a conversion. 

The extension does receive an event when the space key is pressed by way of the onSurroundingTextChanged listener, but it's not straightforward to have to determine if the event was triggered by a space key by diffing the new surrounding text and the last known surrounding text.

I'd expect to be able to receive an onKeyEvent event, or through a separate event that represents a user request for performing conversion.
 
basic.zip
2.9 KB Download
Components: UI>Input>Text>IME
Components: -UI>Input>Text>IME UI>Input>VirtualKeyboard
Owner: shuchen@chromium.org
Status: Assigned (was: Unconfirmed)
Labels: M-72
Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e6a23ced97496da4e94f1c15adc0d3bcd9382cd5

commit e6a23ced97496da4e94f1c15adc0d3bcd9382cd5
Author: Shu Chen <shuchen@google.com>
Date: Tue Nov 27 18:19:56 2018

Generates correct key code for space key in the system fallback vk.

Bug:  842548 
Change-Id: I42a81f539d57ec244f2583bbc8bda9126b11256e
Reviewed-on: https://chromium-review.googlesource.com/c/1351197
Commit-Queue: Shu Chen <shuchen@chromium.org>
Reviewed-by: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611199}
[modify] https://crrev.com/e6a23ced97496da4e94f1c15adc0d3bcd9382cd5/chrome/test/data/chromeos/virtual_keyboard/default_extension/typing_test.js
[modify] https://crrev.com/e6a23ced97496da4e94f1c15adc0d3bcd9382cd5/ui/keyboard/resources/inputview_adapter.js

Status: Fixed (was: Started)

Sign in to add a comment