<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.inkscape.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Afamefula</id>
	<title>Inkscape Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.inkscape.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Afamefula"/>
	<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/Special:Contributions/Afamefula"/>
	<updated>2026-05-01T11:59:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=Adding_interface_verbs&amp;diff=68353</id>
		<title>Adding interface verbs</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=Adding_interface_verbs&amp;diff=68353"/>
		<updated>2011-03-29T15:50:07Z</updated>

		<summary type="html">&lt;p&gt;Afamefula: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction to Verbs=&lt;br /&gt;
&lt;br /&gt;
Commands in Inkscape are called 'Verbs'.  They permit invoking internal functionality through menus and keyboard shortcuts.  For example, they could allow you to assign a shortcut key to a set of actions you use a lot.&lt;br /&gt;
&lt;br /&gt;
Verbs are not terribly difficult to add.  You don't need to have much coding know-how in order to add a verb, and only a minimal knowledge of Inkscape internals.  The aim of this page is to provide novice coders with a &amp;quot;paint by numbers&amp;quot; process that can be followed to add a new verb to Inkscape.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=How to Add a Verb=&lt;br /&gt;
&lt;br /&gt;
First, add IDs for your new verbs to verbs.h:&lt;br /&gt;
&lt;br /&gt;
[http://svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/verbs.h?r1=13280&amp;amp;r2=13309&amp;amp;sortby=date verbs.h]&lt;br /&gt;
&lt;br /&gt;
The place of the ID in the list determines to which group it belongs&lt;br /&gt;
(EditVerbs, FileVerbs, etc) - however, this is pretty arbitrary, so&lt;br /&gt;
don't sweat if you can't find a perfect group for your verb, just use&lt;br /&gt;
whichever makes most sense.&lt;br /&gt;
&lt;br /&gt;
Then is the meat of the matter.  In verbs.cpp, fill in the verb structure with the name,&lt;br /&gt;
description, action ID, etc; also in the same file, write the actual&lt;br /&gt;
commands that the verb will do, in a switch case in one of ::perform&lt;br /&gt;
methods:&lt;br /&gt;
&lt;br /&gt;
[http://svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/verbs.cpp?r1=13281&amp;amp;r2=13311&amp;amp;sortby=date verbs.cpp]&lt;br /&gt;
[http://www.essaywriters.net/ online jobs]&lt;br /&gt;
&lt;br /&gt;
As you see, these verbs do different things depending on which tool&lt;br /&gt;
you are in. Before verbification, this was coded into tool context&lt;br /&gt;
files, and now we can remove that:&lt;br /&gt;
&lt;br /&gt;
[http://svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/node-context.cpp?r1=13296&amp;amp;r2=13309&amp;amp;sortby=date  node-context.cpp]&lt;br /&gt;
[http://svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/select-context.cpp?r1=13200&amp;amp;r2=13309&amp;amp;sortby=date select-context.cpp]&lt;br /&gt;
[http://svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/draw-context.cpp?r1=13148&amp;amp;r2=13310&amp;amp;sortby=date draw-context.cpp]&lt;br /&gt;
[http://svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/draw-context.cpp?r1=13148&amp;amp;r2=13310&amp;amp;sortby=date draw-context.cpp]&lt;br /&gt;
&lt;br /&gt;
(the last one required writing two functions that will be called by the&lt;br /&gt;
verb).&lt;br /&gt;
&lt;br /&gt;
Now assign the keys to the newly created verbs:&lt;br /&gt;
&lt;br /&gt;
[http://svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/share/keys/inkscape.xml?r1=13302&amp;amp;r2=13307&amp;amp;sortby=date inkscape.xml]&lt;br /&gt;
&lt;br /&gt;
and then copy inkscape.xml to default.xml.&lt;br /&gt;
&lt;br /&gt;
Note: even if you are not assigning any key, you MUST list the new&lt;br /&gt;
verb in inkscape.xml, using a &amp;lt;bind&amp;gt; without a key. Not only this file&lt;br /&gt;
is a keymap, but it's also a reference for keymap writers, so it must&lt;br /&gt;
have all verbs, assigned or not.&lt;br /&gt;
&lt;br /&gt;
If you added a shortcut which didn't exist before, update also doc/keys.xml.&lt;br /&gt;
&lt;br /&gt;
If you want the new verb in the menu, edit menus-skeleton.h and&lt;br /&gt;
insert it there in an appropriate place.&lt;br /&gt;
&lt;br /&gt;
Also review the other keymaps to see if you can assign the new verb to&lt;br /&gt;
some key that would make sense. So in adobe-illustrator.xml, I&lt;br /&gt;
assigned the new verbs to Alt+Ctrl+[], which seems to be the same&lt;br /&gt;
thing according to the comments:&lt;br /&gt;
&lt;br /&gt;
[http://svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/share/keys/adobe-illustrator-cs2.xml?r1=13304&amp;amp;r2=13308&amp;amp;sortby=date adobe-illustrator-cs2.xml]&lt;br /&gt;
&lt;br /&gt;
Finally update the [[Release Notes|release notes]] with your new work!  :-)&lt;br /&gt;
&lt;br /&gt;
=Candidates for New Verbs=&lt;br /&gt;
&lt;br /&gt;
A couple words on what might be good candidates for verbification:&lt;br /&gt;
&lt;br /&gt;
* anything that all tools do but which is still not a verb, such as Esc for deselection&lt;br /&gt;
&lt;br /&gt;
* anything that is needed for more complete keymaps emulating other editors, for example as listed [http://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=1532158&amp;amp;group_id=93438&amp;amp;atid=604309 in this bug report].  &lt;br /&gt;
** the bug report requests includes various suggestions including: additional Zoom percentages; increase text, size and decrease text size; bold, italic, underline, text.  &lt;br /&gt;
**See also the alternate keyboard shortcut layouts found in inkscape/share/keys/ which contain comments about missing features or verbs.  &lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
* any global action (i.e. which is not limited to some tool's context) for which it just makes sense to have a quick shortcut, even if it is already available via a dialog, a tool control, or some other more complicated way (example: centering selected objects; increasing/decreasing blur/opacity/stroke width in selection, etc.).&lt;br /&gt;
&lt;br /&gt;
=Requests for New Verbs=&lt;br /&gt;
&lt;br /&gt;
If the above sounds like something you're interested in doing, here is a listing of actions that have been requested, that we'll need verbs for.&lt;br /&gt;
&lt;br /&gt;
* Align-middle-and-center:  Need a shortcut key for aligning selected objects to their centers (horizontally and vertically).  [https://sourceforge.net/mailarchive/message.php?msg_id=37258028]&lt;br /&gt;
&lt;br /&gt;
* Hide Selected/Unselected &amp;amp; Lock Selected/Unselected: Some shortcuts keys to hide any objects that are selected or objects that aren't and a similar system for locking.&lt;br /&gt;
&lt;br /&gt;
If you'd like to see a verb added for a new action, but can't implement it yourself, you can add it to the above list.&lt;/div&gt;</summary>
		<author><name>Afamefula</name></author>
	</entry>
</feed>