7

Does someone know if it is possible to bind a command to a button which will reveal the onscreen keyboard? (Note: The onscreen keyboard has already be started.)

Currently when I want to reveal the onscreen keyboard, I have to click the keyboard icon in the tray bar. This is not very convenient mainly because the onscreen keyboard does not reveal itself when you are yet still focused on a text field. Hence I want to bind it to a button.

2 Answers 2

9

We can do that by creating a custom keyboard shortcut to the onscreen keyboard. The onscreen keyboard used in Ubuntu is Onboard.

Search for Keyboard and move to Shortcuts tab. Go to Custom Shortcuts and click the + button. After that a small dialog box will appear. Give an appropriate name to the shortcut and enter onboard in the command box. Then, press Apply button.

enter image description here

After saving it, click on Disabled and hold down the new shortcut key that you want to assign to the command.

enter image description here

After that, pressing the keyboard combination will pop up the onscreen keyboard.

4
  • 1
    Thank you @jokerdino. I ended up using another program, xbindkeys, to bind a shortcut. Because I wanted it to bind to a special key (hardware key), on my laptop.
    – WG-
    Sep 3, 2012 at 12:54
  • Thanks for the accept. It looks like my answer is not the one you found useful. May I suggest you add your own solution and accept that instead? It would be really useful to those who would want to do it that way in the future. Thanks.
    – jokerdino
    Sep 3, 2012 at 13:00
  • As said, I ended up using xbindkeys, you can then press a random key (also hardware ones) and it finds the correct "command" to activate that key. You can then bind a command to it. However it does not work anymore, at least for me, in Ubuntu 12.04, because it can't detect the hardware key anymore :(
    – WG-
    Sep 3, 2012 at 13:04
  • Oh yes. You did. Nothing much to do otherwise then?
    – jokerdino
    Sep 3, 2012 at 13:10
1

I'm using Ubuntu Mate 20.04 and using keyboard shortcuts, you can bind any key with these commands to show and hide the on-screen keyboard

I have bound F8 to show onboard

dbus-send --type=method_call --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.Show

I have bound F10 to hide onboard

dbus-send --type=method_call --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.Hide

Or you can bind just one key like F10 to toggle the onboard

dbus-send --type=method_call --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.ToggleVisible

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .