You are not logged in.

#1 2018-09-19 14:56

jschall
Member
Registered: 2018-09-16
Posts: 51

How to add a keyboard shortcut to an executable file?

I want to launch the executable file /usr/bin/apwal (http://apwal.free.fr/index.html), which I installed with Synaptic, via a keyboard shortcut, preferably <ALT>+<SPACE>.

The Keyboard Shortcuts utility only assigns shortcuts to programs that are already in the Menu.

My apwal launcher can be launched from the RUN command and I have also added it to my Quick Launcher in the Panel.

But it is nowhere to be found in the Menu.

So, is there a way to add the executable /usr/bin/apwal to the Menu, so I could then add a keyboard shortcut?

Alternatively, can I simply edit a text file to add the keyboard shortcut?

Offline

#2 2018-09-19 15:07

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,501
Website

Re: How to add a keyboard shortcut to an executable file?

jschall wrote:

... is there a way to add the executable /usr/bin/apwal to the Menu ...

Yes, you need to create 'apwal.desktop' file in the '/usr/share/applications/' directory. It could look for example like the following:

[Desktop Entry]
Name=_subst_an_application_name
GenericName=something
Comment=something
Exec=/usr/bin/apwal
Icon=subst_the_icon_name
Type=Application
Terminal=false
Categories=System;
OnlyShowIn=TDE;

Offline

#3 2018-09-19 15:40

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: How to add a keyboard shortcut to an executable file?

You could create a .desktop file which would launch apwal and then use that attach a keyboard shortcut.

[Desktop Entry]
Name=Apwal Launcher
Exec=/usr/bin/apwal
Type=Application
Comment=application Launcher
Categories=Qt;TDE;Utility;X-TDE-Utilities-Desktop;
NoDisplay=false

I used this as the content of my file and place it as /usr/share/applications/apwal.desktop then went to Keyboard Shortcuts and added Ctrl+space as shortcut and it works fine here.

I went away from the pc for a while (damn visitors! smile ) and went to post this and saw the devs beat me, but will post it anyway as mine is minutely different as I use the desktop utilities section.

Offline

#4 2018-09-19 16:59

jschall
Member
Registered: 2018-09-16
Posts: 51

Re: How to add a keyboard shortcut to an executable file?

Thank you, Q4OS Team and Dai_Trying.

I saved /usr/share/applications/apwal.desktop.

But where is it in the Menu?

Last edited by jschall (2018-09-19 17:09)

Offline

#5 2018-09-19 17:09

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,501
Website

Re: How to add a keyboard shortcut to an executable file?

You can run kate using 'sudo' command:
$ sudo kate
or run filemanager in root mode from start menu, navigate the file and open it to edit.

Offline

#6 2018-09-19 17:09

jschall
Member
Registered: 2018-09-16
Posts: 51

Re: How to add a keyboard shortcut to an executable file?

Thank you, Q4OS Team.

I saved /usr/share/applications/apwal.desktop.

I found it it in the Menu under Programs/Accessories/Utilities/Desktop.

But <Alt>+<Space> doesn't work - why not?

<Alt>+<A> works, though.

Last edited by jschall (2018-09-19 18:39)

Offline

#7 2018-09-19 21:32

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: How to add a keyboard shortcut to an executable file?

when I tested it worked with Ctrl+space but I didn't test it with Alt+space and am out at moment so cannot check until I get back. Did you set the key combo in the keyboard shortcuts?

Offline

#8 2018-09-19 21:40

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,501
Website

Re: How to add a keyboard shortcut to an executable file?

'Alt+Space' is predefined for switching between different keyboard layouts. You would need to revoke this shortcut first

Offline

#9 2018-09-19 23:12

jschall
Member
Registered: 2018-09-16
Posts: 51

Re: How to add a keyboard shortcut to an executable file?

q4osteam wrote:

'Alt+Space' is predefined for switching between different keyboard layouts. You would need to revoke this shortcut first

Thanks! Now I can use Alt+Space to launch my launcher.

Offline

Board footer

Powered by FluxBB