Typing special characters with non-US layout get repeated indefinitely

Bug #1562381 reported by RussianNeuroMancer
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Onboard
Fix Released
High
Unassigned
onboard (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

Typing special characters like .,:;-()"@# (and other) or numbers with non-US keyboard layout get repeated indefinitely, like this:

тест...............................................................................................

This will continue to happen untl other symbol is entered or other button is pressed. Reproducible with GTK and Xinput. Testng was done on Ubuntu Gnome 16.04.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: onboard 1.2.0-0ubuntu4
ProcVersionSignature: Ubuntu 4.4.0-15.31-generic 4.4.6
Uname: Linux 4.4.0-15-generic x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CurrentDesktop: GNOME
Date: Sun Mar 27 02:29:05 2016
InstallationDate: Installed on 2016-03-19 (6 days ago)
InstallationMedia: Ubuntu-GNOME 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160319)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=ru_RU.UTF-8
 SHELL=/bin/bash
SourcePackage: onboard
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :
description: updated
Revision history for this message
marmuta (marmuta) wrote :

Hmm, I can't reproduce this here, neither with touch nor mouse pointer.
Does the "." key visibly get stuck in pressed state when it happens? Every time you press it or only occasionally?

Debug output might help. Please run
$ killall onboard; onboard -dall &>onboard-debug-output.txt
make the erroneous repeat happen once, exit Onboard and attach the file here.

Changed in onboard (Ubuntu):
status: New → Incomplete
Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Debug log is attached.

Changed in onboard (Ubuntu):
status: Incomplete → New
Revision history for this message
Francesco Fumanti (frafu) wrote :

I also have stuck buttons from time to time for a long time yet. Unfortunately, I have not found a pattern yet to reproduce it. The problem is disturbing when for example the backspace key is stuck...

When it happens, the stuck key remains highlighted.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in onboard (Ubuntu):
status: New → Confirmed
Revision history for this message
Francesco Fumanti (frafu) wrote :

The bug I see might however be a different one, as I did not notice it to only happen with special characters.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Stuck backspace is also happened for me few times.

Changed in onboard (Ubuntu):
importance: Undecided → Critical
Revision history for this message
marmuta (marmuta) wrote :

Sorry for the delay. I want to help, but I'm not sure I can. I didn't get answers to my questions in #2. Is this bug about visibly stuck keys or not? If not, then everything else about visibly stuck keys is unrelated and should go into a different bug report.

The log file shows the symptom but no cause, unfortunately. There's a possibility, though that only Small layout might be affected and not the default Compact.

I'm trying to be constructive, so here's what I'll do: I've ordered another tablet, decidedly the lowest-end one I could find that will (hopefully) still run desktop Ubuntu. Perhaps I'll be able to reproduce the issues there.

@Francesco, we tried to get the the bottom of your stuck key issues before, but I suppose my requests got lost in the stress before the release back then. This commit was for you:
https://bazaar.launchpad.net/~onboard/onboard/trunk/revision/1973
Remember, your setup with two pointing devices is special enough that any stuck keys might as well be unique to that particular situation. If you're ready now we can retry, but be warned this will probably require a couple of iterations. Remote debugging is hard and takes effort from both sides.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Oh, I thought I was answered your questions. Unfortunately, my tablet in on RMA right now, so I will recheck when I get it back.

Revision history for this message
marmuta (marmuta) wrote :

The tablet arrived last week, but it took me a couple of tries to get plain Ubuntu 16.04 installed and the touch-screen working. It runs pretty well now, maybe too good. I typed for half an hour into various applications and didn't get a key stuck or excessive repeats happening.

However, I did notice random repeated keys running the live image and typing with an USB keyboard. My touch-screen isn't supported there, unfortunately, so I couldn't meaningfully test Onboard until after installation, at which point the issue disappeared.

I'll try Ubuntu-GNOME next.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Did you checked non-US layout while testing?

Revision history for this message
marmuta (marmuta) wrote :

A few, I tried English, German, Russian and Greek. I can't imagine how it could depend on the keymap, though. The keys of Small's second layer are basically the same for all.

I did eventually find a problem however that seems to occur only on this tablet: the AltGr key in Compact layout doesn't unlatch, I have to turn it off manually after each use. I 'll look into that.

Oh, and I can reproduce bug #1530609 there. Another hard to debug issue, but now I have at least a chance.

Revision history for this message
marmuta (marmuta) wrote :

Can finally confirm with Russian on Ubuntu-GNOME. Onboard layout doesn't matter.

What appears to happen is that certain key-presses cause a switch of the system keyboard layout (group) to English (US). We've seen that before in
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/837456

The workaround still works too:
$ setxkbmap ru
fixes it for the session.

The key repeats happen when the layout switch occurs right after pressing down on Onboard's keys, before they get a chance to be released. Punctuation keys in Onboard act on press down, unlike letter keys, hence only the former cause key repeats. The real problem is the layout switch in the first place, though.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Is some code-fix is possible? (On xorg side or onboard side.)
Do I have to mark my issue as duplicate?

btw, is Wayland-version of onboard is coming or work on it is not started?

Revision history for this message
marmuta (marmuta) wrote :

I'm not sure about the responsible package, that's why I hesitated to mark it as a duplicate. I could reproduce bug #837456 anywhere, but this one seems to be restricted to Ubuntu-GNOME. I want to check what exactly Onboard does when it happens too. Haven't had time yet.

Wayland support is on my list, but there isn't much progress beyond displaying the keyboard yet. XTest, XKb, XInput and plenty of regular X trickery have to be replaced.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Today I get my tablet from RMA and tried to use suggested workaround. Unfortunately, after using workaround command switching to English keyboard layout stop workng.

Revision history for this message
marmuta (marmuta) wrote :

I had that problem too with some languages. Try adding more input sources in System Settings->Text Entry. Then temporarily select one that isn't one of the four listed in
$ setxkbmap -query | grep layout

Ubuntu-GNOME seems to always set up the maximum of 4 layout groups and only switches between those as long as possible. I believe if you pick a language that isn't part of those yet, it is forced to reload the whole layout.

Or, you know, run
$ setxkbmap en

Not convenient, I know, but that's the best I have at the moment.

Revision history for this message
marmuta (marmuta) wrote :

What Onboard exactly does at the point of the layout switch is calling XSync() right after XTestFakeKeyEvent() (not remapping the layout on the fly, which it can do to). So its probably the same bug #837456.

I'm still hesitant to duplicate. That bug is so old and nothing ever came from it. I feel we need get more specific and then talk straight to upstream, whoever that will be.

I have some tiny sample code that generates a MappingNotify event, seemingly for no reason. If we find the source of that we're perhaps a bit closer to a solution.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Issue not reproducible with Opera and Franz applications. Shortly, with Chromium-based apps.

marmuta (marmuta)
Changed in onboard:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
marmuta (marmuta) wrote :

Finally fixed in trunk, I believe. Not a duplicate of bug #837456 after all. It took rewriting key parts of virtkey and a number of workarounds at the python level, so regression potential is high-ish. However I didn't notice any remaining issues after rev. 2151. I believe it's ready for more exposure.

I'll ask Francesco for a snapshot so you can try it. If you get any weird behavior, like say stuck SHIFT, CTRL, etc., let me know.

Changed in onboard:
status: Confirmed → Fix Committed
Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Ok, thanks! I can test if fixed version will be installable as deb package or from ppa.

Revision history for this message
Francesco Fumanti (frafu) wrote :

Revision 2152 is available in our Snapshots PPA for xenial:
https://launchpad.net/~onboard/+archive/ubuntu/snapshots

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

So far I wasn't able to reproduce this issue with Revision 2152.

Revision history for this message
marmuta (marmuta) wrote :

Me neither, thanks for testing. Typing emoji and various diacritics seems a lot more reliable too. I have yet to find a key that doesn't work. Also, I can't reproduce bug #1352549 anymore.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.5 KiB)

This bug was fixed in the package onboard - 1.3.0-0ubuntu1

---------------
onboard (1.3.0-0ubuntu1) yakkety; urgency=medium

  * Request for sponsorship for new upstream release (LP: #1613063)
  * debian/control:
      - Bump Standards-Version to 3.9.8
      - Add libwayland-dev to Build-Depends
      - Add libxkbcommon-dev to Build-Depends
  * debian/copyright: update
  * debian/onboard.install: add usr/share/dbus-1/services entry
  * debian/patches:
    - Drop bzr_fix_untranslatable_buttons.patch: applied upstream
    - Drop fix_arrows_on_compact_layout.patch: applied upstream
    - Refresh add_defaults_for_ubuntu.patch
  * debian/source.lintian-overrides: update entries line number
  * Status icon:
    - Move AppIndicator and GtkStatusIcon into separate backends
    - Allow left-clicking AppIndicator in KDE Plasma
    - Don't crash when Appindicator or Atspi are not available
    - Fix fallback to GtkStatusIcon when Applndicator is not available
    - Fix tooltip of status icon provider (LP: #1570318). Thanks Ubuntu-QC-1
  * Word suggestions and auto-correction:
    - Add Esperanto language model
    - Elipsize very large words and fix them being invisible
    - Fix Compact layout not showing the "More suggestions" arrows
    - Improve auto-correction of URLs and filenames in long texts
  * Virtkey:
    - Improve search for available keysyms in X (LP:1562381)
    - Move key mapping from X functions to Xkb
    - Make Xkb-based mapping also work in Ubuntu-GNOME
    - Add uinput backend to virtkey for initial support of non-X desktops
    - Isolate X related parts of virtkey in preparation for non-X desktops
    - Add initial Wayland support (blocker: gtk_window_set_accept_focus())
  * D-Bus service:
    - Add support for properties via python decorator
    - Setup D-Bus activation to simplify showing on hotkey press (LP: #1607235)
    - Update D-Bus usage examples in README
  * Add fallback to default system font family for themes:
    - High contrast themes get a font this way
    - Fixes Ubuntu logo not appearing in yakkety
  * Add aspect ratio limits when the keyboard is docked or expanded (LP:1586493)
  * Add touch handle to adjust the docking aspect ratio limit
  * Expand docked keyboard on landscape oriented screens by default
  * Auto-detect default status-icon provider in major desktop environments
  * Improve alignment of some labels in the Preferences dialog
  * Fix former stock buttons in Preferences not being translated (LP: #1567301)
  * Add small bitmap icons to prevent aliasing issues (LP: #1552484)
  * Add more example keys to onboard-defaults.conf.example (LP: #1546654)
  * Improve pep8 compliance of various source files
  * Don't let the return key leave the screen for Small and Phone layouts
  * Prevent setting new home position after accidental resize frame clicks
  * Work around shadows becoming visible during resize when docked with sidebars
  * Fix errors uncovered in Keyboard.py by flake8
  * Fix unwanted key-repeats when typing into Gtk-3 applications (LP: #1562381)
  * Fix keyboard sometimes starting up at unexpected positions on system start
  * Fix build failure with gcc-6 that switched to C++14. Thanks Jeremy Bi...

Read more...

Changed in onboard (Ubuntu):
status: Confirmed → Fix Released
Changed in onboard:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.