Onboard should release all modifier locks upon hiding

Bug #1277255 reported by Lee Hyde on 2014-02-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Onboard
Low
Unassigned

Bug Description

I often use onboard from a distance, triggering it via compiz's hotcorners feature. On those occasions when I've accidentally hidden onboard with one or more modifiers (e.g. Ctrl + Alt) locked, I am left with few means of interacting with my system (as with Ctrl + Alt locked, all of my keyboard shortcuts and hotcorners won't work). I can't even unhide onboard to unlock the modifiers in questions.

I would suggest that as a matter of good practice, when onboard is hidden, it should automatically release all locks.

Lee Hyde (anubeon) on 2014-02-06
summary: - Onboard to release all modifier locks on exit
+ Onboard should release all modifier locks on exit

Actually, all pressed, latched or locked keys, except for NumLock are supposed to be released on exit. Same when killing the process with SIGTERM. I just tried it here with trunk and it still seems to do it.

Very old versions of Onboard, might not clean up properly though. What version do you have installed?
$ apt-cache policy onboard

Changed in onboard:
status: New → Incomplete
Lee Hyde (anubeon) wrote :

This is the output for apt-cache policy onboard:

onboard:
  Installed: 0.99.0-0ubuntu1
  Candidate: 0.99.0-0ubuntu1
  Version table:
 *** 0.99.0-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
        100 /var/lib/dpkg/status
     0.99.0-0ppa~saucy1 0
        500 http://ppa.launchpad.net/onboard/stable/ubuntu/ saucy/main amd64 Packages

marmuta (marmuta) wrote :

That's the latest release, that should do.
I could imagine two ways the key release won't happen. Either the onboard process gets killed from the outside with SIGKILL (i.e. kill -9), or it somehow crashes on its own.

When you say you accidentally closed Onboard, how did you do that?
And when you run it from terminal, do you get any errors when it closes (accidentally)?
$ killall onboard; onboard

Francesco Fumanti (frafu) wrote :

Could it be, that he is only hiding Onboard and not quitting it?

Lee Hyde (anubeon) wrote :

> When you say you accidentally closed Onboard, how did you do that?
> And when you run it from terminal, do you get any errors when it closes (accidentally)?

I mean when I idle mindedly click close (top right of the keyboard). Judging by the terminal output (onboard does not exit and 'release' the terminal) though, clicking on this cross mearly hides onboard. Is this normal behaviour?

I guess the answer (for me, for now) is to add a few more hotcorners and/or hotkeys so that I can unhide onboard when various modifier keys are locked, although this is far from ideal.

Here is the terminal output. Note, I 'closed' onboard several times herein, but there was never any corresponding terminal output, nor did the onboard close and release the terminal.

killall onboard; onboard

(onboard:27122): Gtk-WARNING **: Unknown key gtk-decoration-layout in /usr/share/themes/elementary/gtk-3.0/settings.ini
2014-02-08 11:34:10,906:ERROR:Onboard.WPEngine: Bad file format, unexpected end of file in '/home/ch2lah/.local/share/onboard/models/user.lm'
2014-02-08 11:34:10,907:ERROR:Onboard.WPEngine: Saving word suggestions disabled to prevent further data loss.

** (onboard:27122): WARNING **: AT-SPI: Error in GetItems, sender=org.freedesktop.DBus, error=The name :1.68 was not provided by any .service files

** (onboard:27122): WARNING **: AT-SPI: Error in GetItems, sender=org.freedesktop.DBus, error=The name :1.69 was not provided by any .service files

(-c:27144): Gtk-WARNING **: Unknown key gtk-decoration-layout in /usr/share/themes/elementary/gtk-3.0/settings.ini

** (onboard:27122): WARNING **: AT-SPI: Error in GetItems, sender=org.freedesktop.DBus, error=The name :1.71 was not provided by any .service files

I have to dash off now, but I could run onboard with the/a debug option later if you'd like?

marmuta (marmuta) wrote :

> clicking on this cross mearly hides onboard. Is this normal behaviour?
Yes it is. That icon may not be the best choice, but the tooltip says "Hide Onboard". Onboard has to keep running for auto-show, the panel indicator, etc. to work. I'd be too slow to start it up all the time too.

Francesco called it, I get it now. You want to have the modifiers released when Onboard hides. Makes sense, I remember talk about this before. Perhaps the key release should happen a few seconds after hiding, though. I'll look into this.

> I guess the answer (for me, for now) is to add a few more hotcorners and/or hotkeys so that I can unhide onboard when various modifier keys are locked, although this is far from ideal.
Or set Preferences->Keyboard->Advanced->Modifier auto-release delay. This would release modifiers after the given number of seconds, keyboard visible or not.

> Here is the terminal output. Note, I 'closed' onboard several times
> herein, but there was never any corresponding terminal output,
> nor did the onboard close and release the terminal.
Yep, everything seems fine. Those warnings aren't critical and we have no control over them.

> I have to dash off now, but I could run onboard with the/a debug option later if you'd like?
No need, thanks.

Changed in onboard:
status: Incomplete → Confirmed
importance: Undecided → Low
marmuta (marmuta) wrote :

Added it to trunk. By default the key release happens 5.0s after hiding. The delay can be changed with
$ gsettings set org.onboard.keyboard sticky-key-release-on-hide-delay 10.0
for example, or set it to 0.0 to have it disabled.

Changed in onboard:
status: Confirmed → Fix Committed
Lee Hyde (anubeon) wrote :

>Or set Preferences->Keyboard->Advanced->Modifier auto-release delay. This would release modifiers after the given number of seconds, keyboard visible or not.

I had no idea that this preference existed. Thanks for the heads up.

>Yep, everything seems fine. Those warnings aren't critical and we have no control over them.

I figured as much. It's all gibberish to me mind, being a perennial 'end user'.

> Added it to trunk. By default the key release happens 5.0s after hiding.
> The delay can be changed with
$ gsettings set org.onboard.keyboard sticky-key-release-on-hide-delay 10.0
for example, or set it to 0.0 to have it disabled.

Excellent, thanks! This is exactly what I needed. I look forward to it landing in the PPA (though I may get impatient and build from trunk). Onboard developers are so responsive. :-D

summary: - Onboard should release all modifier locks on exit
+ Onboard should release all modifier locks upon hiding
description: updated
description: updated
marmuta (marmuta) wrote :

You're welcome. But, uh...

>>Yep, everything seems fine. Those warnings aren't critical and we have no control over them.
>I figured as much. It's all gibberish to me mind, being a perennial 'end user'.

I just realized not quite everything is fine. I was too quickly scanning for a certain error pattern and totally missed this unrelated problem:
2014-02-08 11:34:10,906:ERROR:Onboard.WPEngine: Bad file format, unexpected end of file in '/home/ch2lah/.local/share/onboard/models/user.lm'
2014-02-08 11:34:10,907:ERROR:Onboard.WPEngine: Saving word suggestions disabled to prevent further data loss.

This means that word suggestions won't remember what you typed between Onboard sessions. That's the first time I see this in the wild.
I've opened Bug #1278599 and subscribed you.

Francesco Fumanti (frafu) wrote :

This bug should be fixed with the 1.0.0 release. If you still encounter problems, please feel free to reopen this bug or file a new one.

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

Other bug subscribers