Accelerate Access to Lightroom Plugin Extras
Many Lightroom plugins add new menu items to the Lightroom user interface. Examples include my own LR Backup plugin, those from the prolific Jeffrey Friedl (the grandmaster of Lightroom plugin development) and recent pluginitis victim John Beardsworth. Adobe decided to bury these new menu items in Plug-in Extras sub-menus found under the File, Library and Help menus. While I can understand the desire for Adobe to clearly identify which parts of the product they are responsible for, this does slow down access to these extra features the user chose to add and requires the use of a mouse to access them. If the Lightroom user interface provided a shortcut key to access the Plug-in Extras menu, or the SDK provided a way to specify keyboard shortcuts for your new menu items, this issue would go away. I’ve recently discovered a way to work around this issue until Adobe provides a more permanent solution.
Accelerator Usage
If you look closely at the screenshot above you will notice an underlined character in each menu item. Specifically the s character in Plug-in Extras, the B character in Customisable Configuration Backups, and the 1 character in 1-Click Configuration Backup. These are known as accelerators and are a standard Windows feature to allow the use of your keyboard to navigate menus. For Mac users I’ve been receiving mixed messages as to whether this feature can be directly applied on your platform. An alternate approach compatible with your operating system is listed at the end of the post.
To use the accelerators provided above you would press:
- Alt + F to open the File menu
- S to open the Plug-in Extras sub menu
- 1 to execute the 1-Click Configuration Backup
And so on. This might seem convoluted but your average keyboard shortcut junkie can slam those keypresses into the machine pretty quickly If the menu item is something you need to call pretty regularly (say a Photomatix HDR menu item) this time can start to add up.
Setting Up Accelerators
Adding the accelerators to Lightroom takes advantage of Lightroom’s existing localisation capabilities.
1) Locate your resources directory
You will need to create or update your TranslatedStrings.txt configuration file. This is found in the resources directory found at the following location:
\Resources\
For example on my English localised Windows XP system this translates to:
C:\Program Files\Adobe\Adobe Photoshop Lightroom 2\Resources\en
Other language codes are fr and de for French and German respectively.
2) Create or update your TranslatedStrings.txt file
If you are using the English version of Lightroom your resources directory is unlikely to contain a TranslatedStrings.txt file. In this case you can simply copy this file into the directory.
If your directory does contain a TranslatedStrings.txt file:
- Open TranslatedStrings.txt in a text file editor
- Search for the string “AgSdkMenus/Menu/PluginExtras”
- If the string does exist, add an ampersand (&) into the text following the equals (=) sign. This should be placed immediately before the character you want to be the accelerator. e.g.
"$$$/AgSdkMenus/Menu/PluginExtras=Plug-in Extras"
would become"$$$/AgSdkMenus/Menu/PluginExtras=Plug-in Extra&s"
to make s the accelerator character - If the string does not exist, add the following line to the file:
"$$$/AgSdkMenus/Menu/PluginExtras=Plug-in Extra&s"
French and German speakers should translate the value after the equals (=) sign so it makes sense to you. Just be sure to include an ampersand (&) to mark the character to become the accelerator key.
3) Accelerator enable the plugin
Plugin developers can accelerator enable their menu items using code similar to the following in their Info.lua file:
LrExportMenuItems = {
{
title = "Customisable Configuration &Backups",
file = "ManageBackup.lua",
},
},
Please note the only difference between this and your average menu item definition is the single ampersand character.
If you are trying to accelerator enable a third party plugin things get a little trickier. If the plugin is open sourced you can directly modify the Info.lua file in the manner mentioned above. Reload the plugin after the change and the accelerator will be enabled. If the plugin is compiled you can’t modify the file directly. If the plugin is localised (i.e. you will see $$$ strings in the Info.lua file after opening it in a text editor) then you can add a new line to the TranslatedStrings.txt file to override that value and add the accelerator. Unfortunately the Photomatix Pro plugin is not localised otherwise I would add that as an example here.
Mac OS X Alternative
Mac OS X includes a facility to create keyboard shortcuts for any menu item in any program. Details are available here. Once you enable the keyboard shortcut capabilities you can try using Ctrl-F2 (Focus on Menu Bar), arrow keys and the accelerator keys above to access your plugin menu items.
If you still can’t take advantage of the accelerators then consider adding a shortcut directly to the feature in question.
- As mentioned in the article above you control these settings in System Preferences -> Keyboard & Mouse -> Keyboard Shortcuts.
- Once there press the "+" button to add a new keyboard shortcut.
- Choose which application it applies to (Lightroom) then enter the exact name of the menu item.
Important: Make sure you prefix the menu item with the three spaces Lightroom uses to indent the plugin menu item in Lightroom 3 and 4. e.g. “Run Manual Backup” needs to be entered as “ Run Manual Backup” for the shortcut to work as expected. - Enter the keyboard shortcut you want to use and you should now have direct keyboard access to the menu item!
Closing Remarks
I hope you find this useful and please leave a comment if you wish to share your experiences. I’m particularly interested to hear if any Mac users can access the accelerators via the Ctrl-F2 key combination, and if any other developers choose to accelerator enable their plugins.
Related Posts:
In: Howto, Software, Tip · Tagged with: configuration, keyboard, lightroom, lr2, plugin, shortcut, Software
[…] the original post: Accelerate Access to Lightroom Plugin Extras | The Photo Geek Share and […]
Useful, thanks.
That is EXACTLY what I was looking for. Thanks for the tip!
Thanks for this tip Matt, I missed it before.
*starts updating his plug-ins* 😉
Hi,
I’m running the En version and used your TranslatedStrings.txt, restarted LR 2.4 and I’ve no Plugin&s and Auto Adva&nce underlining/shortcut key working in my LR 🙁
I’ve also nothing in my PluginExtra’s menu (none defined) so maybe that’s the problem?
@Mark, Thanks for supporting this approach. If a few more of us do it Adobe might even formalise a shortcut/accelerator key approach in LR3 SDK. Fingers crossed.
@Dancedar, for some unknown reason the accelerators will only show if you use the keyboard to activate the menu. e.g. use Alt + F to open the file menu, and the accelerators should show. If that doesn’t give you any joy please confirm exact location where you have installed the TranslatedStrings.txt file. Any empty Plugin Extra’s menu should be irrelevant.
Matt, thanks for that- how stupid am I! A little strange they don’t show when ‘clicked’ but extremely useful – Alt-f + s + g for Friedl’s Geoencoding plugin works flawlessly as he’s just updated it to be supported – hooray!
@Dancedar, don’t feel bad. I almost wrote a bug report to Adobe about that until I finally worked out the triggers for when it showed and when it didn’t.
I noticed that Jeffery was starting to rollout this support in his plugins. Good to see!
Hi,
Two of the primary adjustments I use in lightroom are WB and exposure. There are presently no keyboard shortcuts to increase or decrease either of these adjustments. Will the plug in route solve this? Also, I’m trying to figure out how Kevin Kubota got it right with his wireless tool – http://kubotaworkshops.com/store/cart.php?target=product&product_id=16300&category_id=258
@Kets, The accelerators only work with menu items unfortunately. If there is no menu item for the adjustment then this technique won’t be able to provide an alternate access path to it.
Not 100% sure how Kevin does this but I believe it would just be some kind of macro functionality. You might be able to mock up something similar using AutoKey or some other macro recording/executing software. Open Source Keys has also popped up onto the radar recently and might offer a cheaper alternative, though it is less proven so you need to weigh up whether you are willing to put the effort into making it work.
In the mean time you might want to consider the Quick develop feature in the Library module as well. It provides quick access to most of these adjustments. Works for me.
Brilliant.
Thank you for sharing this.
I spent 20 minutes searching for the file on Windows 7 then, read this page properly and downloaded the file.
Works a Dream
Simon
@Simon, glad to hear it worked for you. Is there something I need to document better to make the process clearer?
Just what I need when I need it. Haven’t tried it yet but am confident, thanks! Jeffrey Friedl needs his own menu
@Charles, Thanks for the feedback. Jeffrey has been adding keyboard accelerators to his menu items so if you use this technique it should help you make easy use of his many plugins. And if you try the LR3 Beta 2 you don’t even need this hack because they have added this to the base product.
[…] when Lightroom 2 was the latest and greatest version available I wrote about how to configure it to use keyboard shortcuts to access plugin menu items. At the time the […]
still useful!