Onboard should support a keyboard shortcut for show/hide toggle

Bug #1232107 reported by Jörn Schönyan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Onboard
Won't Fix
Wishlist
Unassigned

Bug Description

Everything said in the description. Workaround using a small bash script is possible - but a real shortcut would be nice.

Revision history for this message
marmuta (marmuta) wrote :

Hi, thanks for the bug report. Some more details would help us to understand better what you are asking for. I guess this is about working with a physical keyboard in parallel with Onboard. Is this primarily about hiding Onboard when you switch to the keyboard?

Changed in onboard:
status: New → Incomplete
importance: Undecided → Wishlist
Revision history for this message
Jörn Schönyan (joern-schoenyan) wrote :

Possible usecase: an HTPC with a remote or joypad. It is easy to control the mouse cursor, so web browsing is quite cool. But if I need to type something on a web page, I need the virtual keyboard. At the very moment, I use a simple script that starts/kills Onboard. My remote sends a keyboard shortcut (and joypads can be configured to do so), I've bound this shortcut to the script.

Automatic detection doesn't work for me, as I experiment with KDE Plasma. KDE has virtual keyboards, too, but these are really horrible! If you want, I can make a video to explain it further.

Thank you for your time,

Jörn :-)

Revision history for this message
marmuta (marmuta) wrote :

I see, thanks for the details. Two thoughts:

Have you considered using Onboard's D-Bus interface? This would eliminate the delay for restarting. If the remote can run arbitrary commands instead of sending keyboard shortcuts you could show Onboard with
dbus-send --type=method_call --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.Show
The README has more examples:
http://bazaar.launchpad.net/~onboard/onboard/trunk/view/head:/README#L26
This is only available since the first alpha of Onboard 0.99, though. The most recent version is 0.99.0.

Second, I believe auto-show can be made to work with KDE. There's a fresh, still ongoing discussion in this thread
https://answers.launchpad.net/onboard/+question/236220
where we just managed to get it going in Mageia, albeit with glitches. I'm not 100% positive it is Plasma, but it sure looks very similar to this here:
http://www.kde.org/workspaces/plasmadesktop.

What is your distribution and which version of Onboard do you have installed?

Revision history for this message
marmuta (marmuta) wrote :

if you need help with help setting up showing by D-Bus call or auto-show, just ask. It'll be easier knowing your Onboard version and distribution, though.

Revision history for this message
Jörn Schönyan (joern-schoenyan) wrote :

I finally some time to look into it. At first, my distro is Kubuntu Raring at the very moment, the Onboard version is:
onboard (0.99.0~alpha1~tr1190-0ubuntu1) raring

The d-bus variant has no toggle feature (or I can't find it), so I need again a script for this. Just to mention, there is no delay for restarting, just the first start takes a second or so. I use this script: (maybe it is helpful for someone :D )

#!/bin/bash

if [ "$(pgrep -x onboard)" ]
then
  pkill -x onboard
else
  onboard
fi

exit 0

Revision history for this message
marmuta (marmuta) wrote :

There is no single call to toggle visibility in the D-Bus interface, that's true. It can be pieced together with what is available, but doing this from the command line is somewhat cumbersome. Would it help if I added a ToggleVisibilty method? I'd prefer doing this over adding a global keyboard shortcut.

In Kubuntu Saucy auto-show mostly works for me. I haven't tried with Raring, but I suspect not much has changed. I'm not fully sure what is and isn't installed by default, but I would start with
$ sudo apt-get install qt-at-spi libatk-adaptor
Then turn on auto-show in Onboard's preferences
Preferences->General->Auto-show...
and log out and in again.

Concerning your script, If you don't notice the delay, then killing and restarting Onboard should be alright. Pressed keys are still released and stuff like window position and word suggestions (in 0.99.0) is saved, as long as you don't kill -9 it. However, our intention is to keep Onboard running to allow auto-show do its job.

Revision history for this message
marmuta (marmuta) wrote :

Trunk has a ToggleVisible method now. You can call it from command line like this:
$ dbus-send --type=method_call --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.ToggleVisible

I'll ask Francesco to add a snapshot of trunk to our PPA for Raring. If you'd like to try the method (and the cutting edge of Onboard) you can install it from there. If you do, please let me know how it goes.

Revision history for this message
Jörn Schönyan (joern-schoenyan) wrote :

Yery cool :-)

Will be glad to test it!

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

Revision 1627 of trunk is in our Snapshots PPA for raring and saucy. They should be available as soon as launchpad has finished building the packages. Thanks in advance for testing the new method.

Revision history for this message
Jörn Schönyan (joern-schoenyan) wrote : Re: [Bug 1232107] Re: Onboard should support a keyboard shortcut for show/hide toggle

Hello Francesco,

I tried the new build in Saucy, but it is crashing. I found a bug report
for this and updated it: https://bugs.launchpad.net/onboard/+bug/1204896/

Jörn
////

Am 15.10.2013 19:13, schrieb Francesco Fumanti:
> Revision 1627 of trunk is in our Snapshots PPA for raring and saucy.
> They should be available as soon as launchpad has finished building the
> packages. Thanks in advance for testing the new method.
>

Revision history for this message
marmuta (marmuta) wrote :

Jörn, I left a reply at bug #1204896. Since I haven't seen you subscribed there, I went ahead and did that for you. Apologies, If you were already subscribed by some other means.

Revision history for this message
Jörn Schönyan (joern-schoenyan) wrote :

Now as the snapshot works, I tested the new feature and it is awesome. Really big thanks for that :-)

Revision history for this message
marmuta (marmuta) wrote :

Great, you're welcome :)
Can we leave it at that? If it can be avoided, I'd rather not add the shortcut you were originally asking for.

Revision history for this message
Jörn Schönyan (joern-schoenyan) wrote :

I can now avoid the workaround of an additional script - so for me, this is perfectly fine! Almost (?) every DE/WM can be configured for keyboard shortcuts, so everyone should be able to use the new functionality.

Revision history for this message
marmuta (marmuta) wrote :

OK, I'll close the bug with 'Won't Fix" then. If someone desperately needs that feature we can still think over again.

Changed in onboard:
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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