New issue
Advanced search Search tips

Issue 645659 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Oct 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

[Remoting] Linux host should handle text events for keys that are not present on current keyboard

Project Member Reported by yuweih@chromium.org, Sep 9 2016

Issue description

This issue is first mentioned in bug 640469

Version: ToT Linux Host
OS: Goobuntu

What steps will reproduce the problem?
(1) Connect to a Linux host from any client
(2) Type a non-ASCII character

What is the expected output?

The character is correctly injected on the host.

What do you see instead?

Nothing is entered.


Problem & possible solution:

jamiewalch@:

On Linux text events are injected by emulating key events, so it works only for characters present on the current keyboard layout.

Since it's a virtual keyboard, I think we can just add another key to it whenever we need to generate a character that doesn't already exist.

sergeyu@:

It's possible to make text events work correctly with X11 by modifying keyboard layout, it's just not implemented right now.
 
Summary: [Remoting] Linux host should handle text events for keys that are not present on current keyboard (was: [Remoting] Linux host should handle non-ASCII text events)
The current behavior is not really locked to ASCII. Updated the title accordingly.
Owner: yuweih@chromium.org
Status: Assigned (was: Untriaged)

Comment 3 by yuweih@chromium.org, Sep 14 2016

Changing keyboard layout is probably not a reliable solution. XChangeKeyboardMapping takes more than 500ms to take effect. May take a look at how IBUS injects its text to get some idea.

Comment 4 by yuweih@chromium.org, Sep 14 2016

Looks like I'm wrong. Calling XSync will force it to take effect very quick...
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 3 2016

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

commit ab975ef6a5e726359982765e311712f3a0974831
Author: yuweih <yuweih@chromium.org>
Date: Mon Oct 03 23:03:45 2016

[Remoting Host] Handle text event characters that are not presented on the keyboard

This CL allows the x11 injector to remap the last keycode to the character if
the character is not on the current keyboard layout.

BUG= 645659 

Review-Url: https://codereview.chromium.org/2346643003
Cr-Commit-Position: refs/heads/master@{#422585}

[modify] https://crrev.com/ab975ef6a5e726359982765e311712f3a0974831/remoting/host/BUILD.gn
[modify] https://crrev.com/ab975ef6a5e726359982765e311712f3a0974831/remoting/host/input_injector_x11.cc
[modify] https://crrev.com/ab975ef6a5e726359982765e311712f3a0974831/remoting/host/linux/unicode_to_keysym.cc
[modify] https://crrev.com/ab975ef6a5e726359982765e311712f3a0974831/remoting/host/linux/unicode_to_keysym.h
[modify] https://crrev.com/ab975ef6a5e726359982765e311712f3a0974831/remoting/host/linux/unicode_to_keysym_unittest.cc
[add] https://crrev.com/ab975ef6a5e726359982765e311712f3a0974831/remoting/host/linux/x11_character_injector.cc
[add] https://crrev.com/ab975ef6a5e726359982765e311712f3a0974831/remoting/host/linux/x11_character_injector.h
[add] https://crrev.com/ab975ef6a5e726359982765e311712f3a0974831/remoting/host/linux/x11_character_injector_unittest.cc
[add] https://crrev.com/ab975ef6a5e726359982765e311712f3a0974831/remoting/host/linux/x11_keyboard.h
[add] https://crrev.com/ab975ef6a5e726359982765e311712f3a0974831/remoting/host/linux/x11_keyboard_impl.cc
[add] https://crrev.com/ab975ef6a5e726359982765e311712f3a0974831/remoting/host/linux/x11_keyboard_impl.h

Status: Fixed (was: Assigned)
Looks like the easiest way to inject a special character is to connect with Android client then choose a special character from the soft keyboard.
Status: Verified (was: Fixed)
Verified with Arabic and Russian, version 55.0.2883.0 Host

Sign in to add a comment