show and hide the keyboard api

Asked by tom schuring on 2013-09-25

i'm trying to use onboard as the virtual keyboard for my Qt application

is there an api to show and hide the keyboard ?

i saw somebody do a
dbus-send --type=method_call --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.Show

but that doesn't seem to work. no errors but if i look at the dbus list i get:

$gsettings list-recursively | grep onboard
apps.onboard.theme-settings color-scheme '/usr/share/onboard/themes/Aubergine.colors'
apps.onboard.theme-settings key-fill-gradient 8
apps.onboard.theme-settings key-gradient-direction 4
apps.onboard.theme-settings key-label-font 'Ubuntu'
apps.onboard.theme-settings key-label-overrides ['LWIN::super', 'RWIN::super']
apps.onboard.theme-settings key-stroke-gradient 32
apps.onboard.theme-settings key-style 'gradient'
apps.onboard.theme-settings roundrect-radius 30
org.gnome.desktop.screensaver embedded-keyboard-command 'onboard --xid'
apps.onboard.icon-palette height 64
apps.onboard.icon-palette in-use false
apps.onboard.icon-palette width 64
apps.onboard.icon-palette x 40
apps.onboard.icon-palette y 40
apps.onboard background-transparency 10.0
apps.onboard current-settings-page 0
apps.onboard enable-click-type-window-on-exit true
apps.onboard enable-inactive-transparency false
apps.onboard enable-scanning false
apps.onboard force-to-top false
apps.onboard height 300
apps.onboard hide-click-type-window true
apps.onboard inactive-transparency 50.0
apps.onboard inactive-transparency-delay 1.0
apps.onboard key-label-font 'Ubuntu'
apps.onboard key-label-overrides ['LWIN::super', 'RWIN::super']
apps.onboard layout 'Compact'
apps.onboard scanning-interval 750
apps.onboard show-click-buttons false
apps.onboard show-status-icon true
apps.onboard show-tooltips true
apps.onboard snippets ['0:Onboard\\nHome:https\\://launchpad.net/onboard', '1:Example:Create your macros here.']
apps.onboard start-minimized false
apps.onboard theme '/usr/share/onboard/themes/Ambiance.theme'
apps.onboard transparency 0.0
apps.onboard transparent-background false
apps.onboard use-system-defaults false
apps.onboard width 800
apps.onboard window-decoration false
apps.onboard x 40
apps.onboard xembed-onboard true
apps.onboard y 40

is there a documented api that i can use ?

update:

dpkg -l | grep onboard
ii onboard 0.96.1-0ubuntu0.1 Simple On-screen Keyboard

Question information

Language:
English Edit question
Status:
Solved
For:
Onboard Edit question
Assignee:
No assignee Edit question
Solved by:
marmuta
Solved:
2013-09-30
Last query:
2013-09-30
Last reply:
2013-09-26

This question was reopened

marmuta (marmuta) said : #1

Hi, thanks for the details.
Unfortunately, Onboard 0.96 didn't have a way to be controlled from the outside. The D-Bus service was finally released with the first 0.99 alpha. If you can, update to the latest 0.99.0. The README then has examples on how to show and hide with dbus-send.
http://bazaar.launchpad.net/~onboard/onboard/trunk/view/head:/README#L27

Onboard 0.99.0 is available in our PPA at
https://launchpad.net/~onboard/+archive/stable

tom schuring (tomschuring) said : #2

thank you for that.
doesn't look like my 11.10 armel isn't supported by the ppa.
i'll see if i can build it from source..
again. thank you for your help

tom schuring (tomschuring) said : #3

i have been able to build it on my x64 machine, but am having heaps of problems to get it to build on an armel 11.10 ubuntu

0.97 seems to be the last one in the ppa for oneiric

has anyone build an Oneiric .deb package for armel i can use ?

Best marmuta (marmuta) said : #4

Not for armel, sorry. We did have some alpha armhf builds for the Nexus 7 for a while
https://launchpad.net/~onboard/+archive/ppa
but the problem is probably Oneiric, not the architecture. You will have a hard time to get the required python 3 dependencies for 0.99.0 in 11.10.

I guess if you were able to upgrade to 12.04, you would have done so already, so the one theoretically possible option left is to try building Onboard for python 2.
Thing is, we just recently purged python 2 support due to lack of demand and lack of testing. You could revive it with

bzr branch lp:onboard
cd onboard
bzr merge -r 1542..1541
bzr resolve --take-other debian/rules

Then switch to the python2 build system with
make -f debian/rules python2

Build packages and install as usual.
debuild binary
sudo dpkg -i ../onboard*.deb

This is probably worth a try, but I can't guarantee it works. Onboard with python2 hasn't been thoroughly tested in a long time...

tom schuring (tomschuring) said : #5

thanks for that marmuta !

i tried it but ended up with the same problem where XI_RawTouchBegin (and many others) isn't defined in my libxi-dev header files.

i might have to throw in the towel and go back to the matchbox-keyboard.

thank you for your help though ! it is much appreciated.

tom

tom schuring (tomschuring) said : #6

Thanks marmuta, that solved my question.

marmuta (marmuta) said : #7

Right, the XInput stuff requires XInput 2.2. Onboard would run without it though. If I find the time I'll install an Oneiric VM and see if I can get it to run.