{"id":139,"date":"2014-02-04T17:39:31","date_gmt":"2014-02-04T17:39:31","guid":{"rendered":"http:\/\/visualgdb.com\/w\/?p=139"},"modified":"2014-02-04T17:39:31","modified_gmt":"2014-02-04T17:39:31","slug":"custom-shortcuts","status":"publish","type":"post","link":"https:\/\/visualgdb.com\/tutorials\/custom\/shortcuts\/","title":{"rendered":"Using Custom Shortcuts with VisualGDB"},"content":{"rendered":"\n<p>This tutorial shows how to define and use custom shortcuts for VisualGDB projects outside of building and debugging.<\/p>\n<p>Before we begin, ensure that <a href=\"\/download\">VisualGDB 4.1<\/a> or later is installed.<\/p>\n<ol>\n<li>For the purpose of this tutorial we use the code from the <a href=\"\/tutorials\/linux\/ImageMagick\/\">ImageMagick tutorial<\/a>, but create the project using file transfer instead of shared folders. Note that the techniques described in this tutorial apply to all VisualGDB Project types (e.g. also for <a href=\"\/tutorials\/mingw\"> Windows<\/a>, <a href=\"\/tutorials\/android\/\">Android<\/a> or <a href=\"\/tutorials\/arm\/stm32\/\">Embedded<\/a>).<\/li>\n<li>Build the project and make sure there is a image file to modify. Here we use the ArrowRight.png file in the project directory as in the previous tutorial.<\/li>\n<li>In the next steps we will make a custom shortcut that will transfer the image file to the build machine, run our program with it, then transfer back the transformed image and open it.<\/li>\n<li>Open VisualGDB Project Properties.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/001-properties.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/001-properties.png\" alt=\"001-properties\" width=\"700\" height=\"606\" \/><\/a><\/li>\n<li>Go to the Custom shortcuts page and click on Add.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/002-shortcuts.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/002-shortcuts.png\" alt=\"002-shortcuts\" width=\"700\" height=\"535\" \/><\/a><\/li>\n<li>Name the new action list and click on &#8220;Add&#8221; to add a new command. The action list name will be displayed in menus later on.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/002-new.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/002-new.png\" alt=\"002-new\" width=\"500\" height=\"324\" \/><\/a><\/li>\n<li>Add a command to transfer the ArrowRight.png file from the local machine to the build machine. Click on OK.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/004-transfer.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/004-transfer.png\" alt=\"004-transfer\" width=\"627\" height=\"256\" \/><\/a><\/li>\n<li>Add another command to execute the program with the arguments on the remote machine. Click on OK.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/005-run.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/005-run.png\" alt=\"005-run\" width=\"627\" height=\"284\" \/><\/a><\/li>\n<li>Add a command to transfer the resulting ArrowRotated.png back to the local machine. Click on OK.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/006-retrieve.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/006-retrieve.png\" alt=\"006-retrieve\" width=\"627\" height=\"256\" \/><\/a><\/li>\n<li>Add a command to open the ArrowRotated.png on the local machine. Click on OK.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/007-open.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/007-open.png\" alt=\"007-open\" width=\"627\" height=\"284\" \/><\/a><\/li>\n<li>The resulting command list looks as follows. Click on OK.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/008-shortcut.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/008-shortcut.png\" alt=\"008-shortcut\" width=\"500\" height=\"324\" \/><\/a><\/li>\n<li>Now a custom shortcut is specified. Click on OK to exit the Project Properties.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/010-customshortcut.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/010-customshortcut.png\" alt=\"010-customshortcut\" width=\"700\" height=\"501\" \/><\/a><\/li>\n<li>Go to the Project menu and execute the custom shortcut.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/009-test.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/009-test.png\" alt=\"009-test\" width=\"700\" height=\"606\" \/><\/a><\/li>\n<li>A window will appear showing the custom actions of the shortcut.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/011-runninf.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/011-runninf.png\" alt=\"011-runninf\" width=\"484\" height=\"214\" \/><\/a><\/li>\n<li>The picture will be opened. You can close the command window now.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/012-paint.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/012-paint.png\" alt=\"012-paint\" width=\"457\" height=\"425\" \/><\/a><\/li>\n<li>All the text output from custom shortcuts is put into a special filter of the Output window.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/013-output.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/013-output.png\" alt=\"013-output\" width=\"699\" height=\"554\" \/><\/a><\/li>\n<li>You can also execute custom shortcuts from the toolbar. To show the VisualGDB toolbar, right-click in the toolbar area and choose &#8220;VisualGDB&#8221;. <a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/014-addtoolbar.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/014-addtoolbar.png\" alt=\"014-addtoolbar\" width=\"699\" height=\"555\" \/><\/a><\/li>\n<li>To execute custom shortcuts from the toolbar, first select the command from the list and click on &#8220;Execute Shortcut&#8221;. The command will execute the same way as from the Project menu.<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/015-executefromtoolbar.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/tutorials\/custom\/shortcuts\/015-executefromtoolbar.png\" alt=\"015-executefromtoolbar\" width=\"699\" height=\"554\" \/><\/a><\/li>\n<\/ol>\n<p><\/root><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to define and use custom shortcuts for VisualGDB projects outside of building and debugging. Before we<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[38],"_links":{"self":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/139"}],"collection":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":0,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"wp:attachment":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}