onboard won't come up on hotkey press

Asked by jadaja

i have f5 set for onboards hotkey and onboard won't show up when f5 is pressed. i've also tried other key combos and none of them work. f5 used to bring onboard up and i have no idea where to look to fix the problem. i use onboard cuz some of my keys don't work and i currently don't have an external one. thanx for any help, i tried ubuntu forums 1st to find an answer and haven't found 1. i'm using wily werewolf on a hp pavilion g7 with 6 gb ram 650 gb hd. btw currently when i press f5 the screen flashes.

Question information

Language:
English Edit question
Status:
Solved
For:
Onboard Edit question
Assignee:
No assignee Edit question
Solved by:
marmuta
Solved:
Last query:
Last reply:
Revision history for this message
marmuta (marmuta) said :
#1

Hi, I've tried this here on Yakkety and it seems to work:

System Settings->Keyboard->Shortcuts->Custom Shortcuts, add new shortcut
Name = Show Onboard
Command = onboard
Then click the new entry and press F5 to assign the the shortcut key.

When I press F5, Onboard pops up.

You possibly may have to turn off auto-hide on key-press in Onboard's preferences, though I didn't have to. The timing is just right for me I suppose.
Preferences->General->Auto-show when...->Settings->Hide when using a physical keyboard

Hope that helps.

Revision history for this message
jadaja (wyndlass) said :
#2

On 2016-07-27 06:37, marmuta wrote:

> Your question #303050 on Onboard changed:
> https://answers.launchpad.net/onboard/+question/303050
>
> Status: Open => Answered
>
> marmuta proposed the following answer:
> Hi, I've tried this here on Yakkety and it seems to work:
>
> System Settings->Keyboard->Shortcuts->Custom Shortcuts, add new shortcut
> Name = Show Onboard
> Command = onboard
> Then click the new entry and press F5 to assign the the shortcut key.
>
> When I press F5, Onboard pops up.
>
> You possibly may have to turn off auto-hide on key-press in Onboard's preferences, though I didn't have to. The timing is just right for me I suppose.
> Preferences->General->Auto-show when...->Settings->Hide when using a physical keyboard
>
> Hope that helps.
>
> thanx marmuta, is there a way to hide onboard w\o clicking on it's x in the top right corner by making a custom hot key? i went into terminal and didn't see a option for doing such unless i missed read the help listing for it.

Revision history for this message
Best marmuta (marmuta) said :
#3

The onboard command itself can only show, but you can show, hide or toggle visibility with D-Bus calls. See https://bazaar.launchpad.net/~onboard/onboard/trunk/view/head:/README#L26.

For example, replace the command of the shortcut with
dbus-send --type=method_call --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.ToggleVisible
and you can press F5 to show and again to hide.

This time I had to disable auto-hide on key-press, though, or it wouldn't stay visible.

Revision history for this message
marmuta (marmuta) said :
#4

I realized that this dbus-send command has the disadvantage that it only works when Onboard was already running. If you want the key-press to auto-start Onboard, you can set up D-Bus activation.

Create /usr/share/dbus-1/services/org.onboard.Onboard.service with these contents:
[D-BUS Service]
Name=org.onboard.Onboard
Exec=/usr/bin/onboard

That should immediately allow the hotkey to start Onboard. We should add that file to the project actually.

One more problem: the keyboard won't be visible initially. To fix that add --print-reply to the dbus-send command. That forces a synchronous call.
dbus-send --type=method_call --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.ToggleVisible
I'll update the README.

Revision history for this message
jadaja (wyndlass) said :
#5

sorry it to me a while to get back, i just did the dbus stuff for my custom command for onboard and that works great. .i have onboard set to auto start thru the startup manager. thanx for your help, marmuta, i appreciate it. i also saved this page as a pdf in case i need the info again.

Revision history for this message
jadaja (wyndlass) said :
#6

Thanks marmuta, that solved my question.