Way to make a button launch an application?

Asked by Will Best on 2013-02-22

I am working with someone who has no use of their arms and legs and accesses the computer using a single switch and scanning.

Is there a way that we could make one of the buttons launch an application, or a key combination "like alt+d" in one click.

I looked at the layout in leafpad and can see how the buttons are enumerated, but I have no idea how to modify it or if it can be modified.

Any suggestions would be appreciated.


Question information

English Edit question
Onboard Edit question
No assignee Edit question
Last query:
Last reply:
marmuta (marmuta) said : #1

Hi, thanks for your question.

Onboard doesn't have direct support for launching applications, however the "script" attribute can run arbitrary python scripts on button press. Have a lock at this previous question for more:

I can't think of a built-in way to send key combinations on click, but if you still need this, you can in principle do it from Python too, for example with python3-virtkey. Let me know if you need an example.

The easiest way to get started with a new layout is customizing an existing one. In Preferences->Layout select the layout you would like to modify and press the Personalize button. You can then freely modify the resulting files.

New keys need to be added in two spots:

1) as rectangle in one of the svg files, we like to use inkscape for that.
Just make sure to give those rectangles unique ids, "launch_myapp1" for example. In inkscape this can be done in the object's properties (right-click).

2) as <key ....> tag in the *.onboard file. Example:
<key id='launch_myapp1' label='myapp' script='launch_myapp'/>

Hope that gets you started. Just ask if you have more questions.

Can you help with this problem?

Provide an answer of your own, or ask Will Best for more information if necessary.

To post a message you must log in.