How to setup a hotkey to a custom extension

General discussions about Inkscape.
area5one
Posts: 2
Joined: Fri Sep 13, 2013 7:25 pm

How to setup a hotkey to a custom extension

Postby area5one » Fri Sep 13, 2013 7:36 pm

Hi,

I just follwed a 'hello_world.py' tutorial, together with a hello_world.inx file appears as a custom extension. 'Extensions -> Examples -> Hello world ..' it produces the text-greeting when run.

Simple question, how do I setup a hotkey to to run it, e.g. Ctrl+8 or similar? (I found the below answer on another thread, but I don't know what to put in the action attribute, in /share/keys/default.xml)

Code: Select all

<!-- EggBot -->
<bind key="8" modifiers="Ctrl" action="command.evilmadscience.plotd6.eggbot" display="true"/>

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: How to setup a hotkey to a custom extension

Postby hulf2012 » Sat Sep 14, 2013 1:27 pm

Hello:
Consulting this:
http://tavmjong.free.fr/INKSCAPE/MANUAL ... -Shortcuts
I'm not sure but in your hello_world.inx there must be an attribute like <id> xxx.xxx.xxx</id>
I thin you must put what is between the <id> tags. Beware of not puting any blank space.
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: How to setup a hotkey to a custom extension

Postby ragstian » Sat Sep 14, 2013 2:40 pm

Hi.

The content of the action attribute is the ID in the third line of the INX file - minus the id tag: org.ekips.filter.hello_world

Your line will then look like this:

Code: Select all

<bind key="8" modifiers="Ctrl" action="org.ekips.filter.hello_world" display="true"/>


Good Luck.

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

area5one
Posts: 2
Joined: Fri Sep 13, 2013 7:25 pm

Re: How to setup a hotkey to a custom extension

Postby area5one » Sat Sep 14, 2013 11:43 pm

Thanks both, it works now!


Return to “General Discussions”