Lightroom 2.x Enhanced Keyboard Shortcuts

Quick access to Develop and Library module adjustments via your keyboard number pad (Windows only). You'll need AutoHotKey and this script to enhance your productivity.

The library presets shotcut (Ctrl+NumpadX) are custom to your environment. Please open the script in a text editor and change my preset names for your own.
Left/Right    - Prev or Next photo
Up/Down       - Brightness
ALT Up/Down   - Exposure
NumPad 5      - Toggle Dev/Lib Module [new]
ALT NumPad 5  - Crop Tool [new]
+/-           - Fill Light
Page Up/Dn    - Contrast
ALT PgUp/PgDn - Black Clipping
Home/End      - Color Temperature
ALT Home/End  - Recovery
Div/Mult      - Color Tint
Enter         - Paste Previous
ALT Enter     - Sync Settings [new]
Del           - Auto Tone
ALT Del       - Auto White Balance [new]
F5            - Library: Render Standard Previews [new]
Ctrl NumpadX  - Library: Execute a preset [new]
  • NumLock must be engaged (light on).
  • The only external USB number pad that works with this script is the "Targus Wireless Stow-N-Go keypad model AKP01US", that can be purchased from Amazon (click here).
  • Laptop users without a working USB number pad should consider a full USB keyboard.
  • Lightroom's title bar needs to say "Develop" or "Library". When launching Lightroom it displays neither. You'll need to toggle modules to get the title bar indicating the correct information.


kai abresch said...

Gordon, thank you, thank you, thank you... It´s so awesome!

With a little help in the german Autohotkey-Forum, i developed something similar. But the starting point was your idea and the whole glory is on you of course! It just changed my life (almost in a photographic way ;-)) ).


Derek said...

Gordon, with your your help I was able to program my G11 keys to all the develop keys I would use. I just wanted to give thanks to you.

Also, I was curious how you got the "lrdAdd", "lrdSub", "lrlClick" commands? I tried to find these controls but couldn't using window spy or anything similar. What I am trying to do is program specfic keys to some presets I've made in the develop module. I've seen it done before, but I don't know how to go about it. Any help will be great!

Gordon McKinney said...

Those functions perform specific actions. You can see the definitions in the supplied cod.

I haven't written anything to click the develop module presets. Its an interesting idea and there's a couple of ways to achieve it. Good luck though - its probably a bit of work.

Derek said...

Just wanted to update. I was able to apply presets in library mode through:

key:: Control ChooseString, preset name, ComboBox4, Lightroom

It works quite well but will need to be customized according to the presets that you will use.

Gordon McKinney said...

Wow, that's nice... that's for finding that out. I will look to use that in the script.

Alessandro said...


I'm still using Lightroom 1.4 ... where can I find the version of your script that worked with THAT version? I know the answer is to move to Lightroom 2.x but while that may be possible sometime in the early new year, this is not the best time for discretionary spending for me :-)

Gordon McKinney said...

Search the LR Forums... I posted all my versions there over time. But note that the shortcuts only work in the develop module from LR2.0 and beyond.

Mark said...

Really love your L/R keyboard enhancement. Brings L/R up to the state I like to work with.
I have not studied the AHK tutorials and want to pose a question before I spend a lot of time. Would it be difficult for me to integrate into your script a key that would select the actual crop tool (ruler - compass icon) in the develop module? There seems to be no way to keep it active between photos and I like cropping with this tool.


Gordon McKinney said...

I use the "R" key to switch to crop mode. Is that what you're after?

Mark said...

No, I use the R key regularly.

In the develop module there is a "crop tool" located just to the left of the "Aspect:" label and directly above the straighten tool.
All this is of course in the right hand pop out box.


Gordon McKinney said...

It is possible with AHK but it looks like it might be a little tricky. So long as the control's ClassID remains the same from launch to launch then you'll be find to hard code it.

LR 2 introduced buttons changing their ClassID. My new script adapts to that and you may be able to modify it to click that control.

Mark said...

Gordon, I found that the following line does what I had in mind but that the numberpad 5 is not a good location for the workflow.

NumPad5:: Click 1192,358

I tried with some keyboard locations but were non-responsive. Must be the ClassID to which you were reffering.

The N/P enter key would be a good location but I was unsuccessful in changing that. Lack of programing skills is a pain.

Thanks again for the basic program!


Gordon McKinney said...

problem with a fixed location click is that movement of the window or resizing will break your code.

If it works for you then keep using it but I only release code if its multi-system aware.

Robb said...

Wow, just Wow!
This looks really awesome - just what I've been hunting for. I will be loading this asap and giving it a whirl. Just a question - how easy is it to modify the script to do the following 3 things:
* change the contrast to blacks
* change temperature to clarity
* change tint to vibrance

Also, can one map the 0 key to flip between library and develop?

And lastly, can one use the 5 key to act as an ALT key, so that it turns on/off the clipping mask feature?

I have a bit of programming background, but I see you have used some clever ideas to get around control ID changes, so thought best to ask before trying to poke around.



Gordon McKinney said...

You can do all those things my changing my code to use different offsets (for the control ID). It should be trivial for you to make those changes.

Library and Develop on one key, that's a good idea. Use each section and remap the key of your choice to call up E (loupe) or D (develop) as desired. I recommend using a key not normally mapped for typing text! If you have a programmable keyboard (Logitech G series) then I recommend remapping things like #0 (winkey + 0) and then telling the keyboard to issue winkey+0 when Gx key is pressed.

Sorry that I can't mod the script for you directly. I wrote it for my workflow and made it available "as is". Since I don't get any money for this I cannot afford to divert time from revenue generating work to non :-)

Gordon McKinney said...

Bump: I have added black clip, recovery, and brightness to the script.

bill said...


This is a wonderful tool, exactly what I have been looking for to use as a starting point for a new AHK script to control Lightroom from a MIDI keyboard. I'm specifically interested in using the knobs on the keyboard to control many of the parameters, as you do with the numeric keypad, and using the keys for presets and other control functions.

I'm confused by one point, which I have struggled for hours to understand. You are sending a mouse click to a static control, e.g. Static135. This control is a text label to the left of the applicable slider. You then send a character ("=" or "-") to increment or decrement the control. When I do this manually nothing happens. I need to click on the slider, not the text label, for the "=" character to be effective.

Why does this work when you do it from the script?

Why use the Static controls rather than the slider directly, i.e. msctls_trackbar3244?

And one more question, if you don't mind. I was able to find the control offsets, e.g. 135, in the AHK Window Spy but not the other spy tools, WinSpy++ and WinInspector. Any idea why? All they show is Static with nothing resembling an instance or offset anywhere.

Thanks very much,
Bill Wetzel

Gordon McKinney said...

"e.g. 135, in the AHK Window Spy but not the other spy tools, WinSpy++ and WinInspector. Any idea why?"


"You then send a character ("=" or "-") to increment or decrement the control."

Lightroom has that features, use + and - and I think it works. But LR is looking for the KeyCode of = and - instead. Checkout the , and . action in LR develop module.

"Why use the Static controls rather than the slider directly, i.e. msctls_trackbar3244?"

Because I wanted to stay as close to LR's official implementation as possible. They offer + and - nudging in Dev module so I used it.

John said...

I'm a computer numpty. WIll this work with an extra keypad plugged in 'cos my keyboard is a small one with no numbers! Can you give me instructions on how to set this script thing up?

Gordon McKinney said...

Sadly they don't seem to work. I bought a Targus extended keypad and to my surprise the send 0-9 rather than NumPad0-NumPad9.

Your best bet is full plug in USB keyboard.

Joe said...


Thank you so much for the script. This is exactly what I was looking for.

I am curious to "Derek"'s comment. It was using the keyboard to select lightroom presets.

key:: Control ChooseString, preset name, ComboBox4, Lightroom

I am new to AHK and I don't know how to code the key. I am studying the program, but if you have an example, would you share it here?

For example, how you code "Creative - Sepia"

I guess it maybe like this - if I want it to be Window+3 for the key.

key:: Control #3, "Creative - Sepia", ComboBox4, Lightroom

Am I right?

Gordon McKinney said...

I've not used the preset shortcut but your syntax is wrong. Here's my guess for what you describe:

^#3::Control ChooseString, preset name, ComboBox4, Lightroom

^ is control
# is winkey
3 is 3
:: means, "then do this"

Have a tinker. If you get an example working please post it to this comment chain for other users.

hkdcgear said...

Hi Gordon

i come from hongkong. thanks for your great script!

i have a problem ! when i want to edit a photo (jpg format), the temp & tiny not work in develop mode. how can i made it work ?

thank you !


Gordon McKinney said...

Without a lot of conditional coding, you cannot. I stongly suggest you use the library module as its extremely fast compared to the develop module.

Joe said...

Selecting the preset works with following script.

^!3::Control ChooseString, Creative - Cold Tone, ComboBox4, Lightroom

But, it only works in the library module.

I'm guessing I can modify the script for the develop module, but I don't know what designate the 'Presets' window. Do you know?

^!4::Control ChooseString, Creative - Sepia, ????, Lightroom

Gordon McKinney said...

Nope. Check through the thread, another person contributed that preset code fragment. You may be able to ask them.

Anonymous said...

Sorry but am I right in saying i can remap keys to those which Photoshop uses eg "C" for crop?

Gordon McKinney said...

You could but when you type a filename or meta data you'll find the remap is still in effect. i.e. you'll kill normal text editing.

Without some clever conditional programming it becomes progressively harder to remap other keys.

The best thing LR can do is provide user customizable keys as they do in PS.

Gordon McKinney said...

Bump: Version 3.2

Matt B said...

Gordon, do you mind if I make modifications and post them elsewhere(DPR forum), of course linking to you and giving you credit for the original script?



Gordon McKinney said...

Sure. Please link back so that others may get my original version. And I ask you do not charge money for derivative work. I want this to be free. Please drop me a private email, gordon@(you know the rest) :-)

Matt B said...

Hi Gordon,

Of course I would not charge anything, I'm just so immensely pleased to finally have keyboard shortcuts with Lightroom that are actually usable (as I'm sure you are) that I want to share with my friends on the Pentax SLR Talk forum at DP Review. Particularly since I was one of the loudest complainers about Lightroom's ergonomically pathetic and thoroughly ill-concieved keyboard shortcuts...
All I've changed is added the Alt key for the Library controls to use the more course adjustments (Shift unfortunately doesn't seem to work, I would have preferred this as it's more standard) and rearranged things like recovery and black clipping to where I would want them for my editing habits. Perhaps some will prefer my alternate layout, I'll post my version here if there is enought space.

Which domain should I send private mail to?


Matt B said...
This comment has been removed by a blog administrator.
Matt B said...
This comment has been removed by a blog administrator.
Gordon McKinney said...

Maybe my comments on the script were confusing. When I say "pg up / pg dwn" its only the number pad versions of those keys, not the actual keys by the same name.

I'll look at this. My biggest deal with portraiture is using contrast to control how older faces look. A quick decrease allows wrinkles to become less prominent.

Black clip and highlight are less of of a problem for my photography so I will most likely keep them off the "single keystroke" map. Let me have a look at the other mods and see what I can come up with.

Matt B said...
This comment has been removed by a blog administrator.
Gordon McKinney said...

It sounds like you need to work on your baseline presets. I have one for natural light and one for indoors.

And don't forget the TONE CURVE. You can re-balance the contrast for highlight, mid, and shadow independently.

Gordon McKinney said...

Bump, v3.3

Gordon McKinney said...

Bump, v3.5

Joe said...

Regarding presets - I'd love to see the script support preset selection. Though the problem lies in the name. I suggest that you program in numbers (1-20) rather than names. This way all the user has to do is copy their desired preset, rename it to a number between 1-20, and it'll then be active in the script. This would allow the script to officially support presets without having to customize it for every user and their preset names.

Gordon McKinney said...

You can add presets by mapping keys to the following code:

Control ChooseString, preset name, ComboBox4, Lightroom

Joe said...

Thanks Gordon! Is this in Library or Develop module?

jrsforums said...

"You can add presets by mapping keys to the following code:
Control ChooseString, preset name, ComboBox4, Lightroom..."

Gordon, can you give an example...and placement...for those of us who are "users, not creators"?

Gordon McKinney said...

I don't use presets in my shortcut script, the suggestion came from another user. Troll the comment log and contact the contributor directly.

The script is made available for free. The lack of one-on-one user support being a drawback.

Gordon McKinney said...

Bump, latest version. Added ALT-Dot for auto white balance.

Gordon McKinney said...

I've moved the code from the blog into a downloadable script. Double clicking the script gets the whole show running.

Gordon McKinney said...

I have trimmed this comment chain down a little so its easier to read for new users.

@Matt I've removed some of your comments for clarity, not because I thought they were inappropriate. I wish you luck as you evolve the script.

Gordon McKinney said...

bump, new shortcut:

ALT Enter - Sync Settings

Matthew said...

First, thank you Gordon for your work on the script. Its a real time saver.
I wanted to post my experiences here so they might benefit others in the same situation. I tried to get presets to work in the develop module, but it seems impossible, at least with my limited scripting knowledge. So I created something less elegant that works nonetheless.

^#1:: lrdPreset("PRESET NAME")

lrdPreset(delta) {
chosenPreset := delta
SetKeyDelay, 400, 100
Send e
Control ChooseString, %chosenPreset%, ComboBox4, Lightroom
Send d
It first sends you into loupe mode, executes the preset, and them pops back into develop.
Depending on your system speed, you might have to tweak the key delay.
If anyone comes up with anything better, please let me know.

Gordon McKinney said...

Have you considered doing all your adjustments in library-loupe mode? I do virtually all my adjustments there because images load faster and adjustments are realized more quickly.

That would remove the need to toggle to/from the library module. It may also explain why Derek originally posted that particular fragment.

In which case, you can remove the keydelay and function. Put the preset hot keys in the "library" portion of the auto hotkey script.

Matthew said...

I spend most of my time in library mode too, and for the script in the library section it is just a straight call to the preset. But I wanted to be able to access presets in develop mode too, so I came up with the keydelay solution.
Although I don't find myself using presets too much anymore because the basic adjustments are now so easy thanks to the keyboard shortcuts :)
I only use them now for vignettes, setting an arbitrary color-cast, etc.

Patty Boge. said...

This is exactly what I've been looking for, but does anybody have a Mac version?

Gordon McKinney said...

I wish! I'm not sure Mac has an analogue for AutoHotKey.

The reason I made this code public is to put pressure on Adobe to add customizable keyboard shortcuts like Photoshop. At some point they'll do something to break my shortcuts, so the best guarantee I've got is them adding native support.

Please put pressure on Adobe directly via their Lightroom forums. The more people who ask for custom keys the more likely it will happen.

Patty Boge. said...

Thanks so much Gordon. I will.

Anonymous said...

Exactly what I needed, thanks a million

caltucker said...

I am attempting to add presets to the script. First, I have installed your script and the Hotkeys program. It works GREAT! THANK YOU!

How do I add presets to the script?

I read the post, and have inserted: " ^!3::Control ChooseString, Creative - Cold Tone, ComboBox4, Lightroom " just below "!NumPadEnter::Send ^+s " in the LIBRARY SHORTCUTS area. I then click RELOAD SCRIPT.

But when I hold down CTRL + Windows and the number 3, it changes my keyword. It does not laod the preset.

Could this be because my presets are in folders? Better, how do you edit the script to apply presets in Library mode? And how do you do this if the presets are in folders (e.g., Black and Whites)


Gordon McKinney said...

No idea, I've never analyzed how LR handles the presets. There was a blog comment from someone indicating how they did it.

If you work it out please share it with the readers of this post as I'm sure they'd appreciate it.

I will provide credits and an example in the script with your code if you do.

caltucker said...

Thanks Gordon! Do you know where this should be inserted: "^!3::Control ChooseString, Creative - Cold Tone, ComboBox4, Lightroom"
Cheers -Brian

Gordon McKinney said...

Not sure how many times I have to say "never implemented it" but.... I've Never Implemented It!

If you're willing to make a $50 donation then I will spend a couple of hours testing and debugging the feature. Send donations via paypal to gordon [at] night - ray . com

I will refund any payments if I am unable to complete the work.

Anonymous said...

Hi, Gordon!

Great script! would it work with X-keys too?

It would be PERFECT if works with presets using X-keys!

I am willing to donate so you can try to implement this feature.

If someone else wish to donate too, lets say 25,00 each of us and you get like 2 donations or more, would you do it?

Thanks for sharing this!


Dorfl said...

Gordon, I loved the idea but it was really complicated to customize. So I took the key functions for clicks and re-wrote the tool. Now every action for Lightroom has its own function, e.g., Temperature_up(). These global functions recognize which module is running and behave accordingly. I also added Clarity_up()/_down() and a few other things. All this increased the size of the file, but it has three advantages

(1) Very easy to customize. All you need now is something like

Numpad9:: Temperature_up()

No worries which module you are in! This should be very easy to do even for beginners

(2) Anybody can publish new functions and thus ad dto the library!

I would like to publish this but want to stay reasonably anonymous. Can you post this on your site, or maybe some user offers help?



Anonymous said...

Hey, Dorfl

this is very good news!

If Gordon might not be able to help, Im willing to (but dont know how.. forgive my ignorance).

How can I help you out with this?


Anonymous said...

hi, Gordon!

This is totally undestandable!If I could something to help, please let me know.


Anonymous said...

Any idea why I can't get the keys to work under Windows 7 RC? Had no problems under XP pro. Installation was fine.


Gordon McKinney said...

No idea. Check AutoHotKey for the latest version and any FAQs about problems with Windows 7.

I plan on staying with XP Pro until 7 has had 18 months of public usage. At that point I know all the software and drivers I need will have been 'proven'. If I get a new laptop with 7 then I will definitely test this script and LR.

Anonymous said...

I made a cheat sheet that I taped it on my monitor just like a post it.

Theres one key (the "dot" key right side of the "6" key. What does it do?
I noticed I can change from one adjustment to another (contrast, brightness, clarity and so on) but I couldnt find a way to change the values when I select clary or vibrance using this key.



Gordon McKinney said...

dot is "auto adjustment"
alt-dot is "auto whitebalance"

I'm glad you enjoy the shortcuts!

Anonymous said...

Hi, Gordon!

Thanks so much for this aplication!

But the key Im referring to is not the one you explained above, this one Im aware of (since you explained on your first post).

Its the other "dot" key. Its in the same row of 4, 5 and 6 keys (its just to the right of 6 key, under the "plus" key and above "enter key).

Got it?


Anonymous said...

Oh, One more question:

If I use the autohotkeys softwawe, will I be able of program some keys for vibrance and clarity too?

Is any advanced programming knowledge required for it?


Gordon McKinney said...

Rick, I do not have the dot key you refer to. My pad, is a standard US layout:

N / * -
7 8 9 +
4 5 6 +
1 2 3 Enter
0 0 . Enter

You will need advanced programming knowledge if you want to perform actions not already coded. The clarity slider is just a different 'number offset"... checkout the script and you'll see what I mean.

brett maxwell said...

Great stuff, this is very exciting for my workflow!

I am using the most recent script right now with Win 7RC and it works great.

If Dorfl or Gordon could please email me Dorfl's script, I would love to test and perhaps tweak it. I would be happy to provide hosting if that's of benefit as well.

Also, it would be great to develop a reference of all discovered number offsets so people could more easily map out their own buttons.

Ronan Downes said...

Hi,this all sounds azazing but only thing working for me is the 5 toggle.
This work on Vista?

Gordon McKinney said...

Make sure the NumLock Light is ON. Otherwise it won't work.

Nilbert said...

I was wondering, if one wanted to add say Vignette to controls, how would one add that to the list?

I sort of understand whats going on, but at the same time I'm not getting how it knows which to select.

Any help is greatly apprecaited.

Gordon I think I speak for everyone when I say Thank you for putting so much time into getting this working. And thank you for sharing it as well. We realize you don't get paid and just appreciate the effort

Gordon McKinney said...

Nilbert, thank you for your kind words... RPG Keys and et. al. charge a lot of money for this. My hope is this shortcut combo will help bridge photographers until Adobe includes fully customizable keys.

To run a vignette you will need to setup a preset and then use a new type of call (not in my code) to trigger the preset. Check this blog comment history as a couple of contributors have offered possible solutions.

I apply vignette as part of a bulk process after I've selected images for artistic enhancement. As such I don't need to do it on a image-by-image basis.

Nilbert said...
This comment has been removed by the author.
Nilbert said...

Thanks for the Reply Gordon,

I am aware of RPG keys and DQ quickeys and so on. I'm actually just trying to help out an open source project that is similar, but requires more input from the users to get it to work. But should work similairly.

So, Here's my next question, would you need to create a preset for your vibrance, clairty and saturation as well?

Or is it going to be easy to add to your script?

One more quick question, I've read all the comments, and Dorfl seems to have stated he has a super easy script to modify, any updates about that? or when we could possibly see it posted?

Again, Thank you very much for any help you can give.

Anonymous said...

Hi, Gordon!

Oh, so we have different keyboards. That explains all.

Thanks anyway!


Kevin said...
This comment has been removed by the author.
James said...

Hi Gordon,
Looks great, but I can't seem to get it to work. Numlock is on. Has this been tested on Vista?

Gordon McKinney said...

I don't have Vista but I know people who have used it.

Other than numlock you need to switch to another app and then back before Lightroom begins to indicate its module in the title bar. i.e. I have to switch to my browsers and back to LR before the shortcuts begin to work.

Its designed for LR 2.x only.

Good luck!

Alexander said...

I find bug:

Temp +/-
Tint +/-

does not work with imported JPEGs

Gordon McKinney said...

It does in the library module, where I do 95% of my adjustments. Use loupe mode and turn off the histogram for very fast performance.

Try doing your WB adjustments with RAW files in the future. You get far more control than with JPGs.

Profinish Design said...

Hi Gordon, thanks!

Did you have something for The X-keys keyboard? I'm looking for the script for that...


Gordon McKinney said...

Nope. The whole point of my script is that you don't have to invest a fortune for an x-keys or rpg-keys keyboard.

snubz said...

Any word on Dorfl's version. The use of functions there is intriguing, and would go a long way to help me customize a version of the script to my liking.

Gordon, thanks for the scipt! Looking to customize it, but as-is it is still a great help.

Gordon McKinney said...

I'm glad the script is helpful. My challenge is I don't receive any money for my time on it. So my paying clients always get priority.

BUT I am starting get get an itch for a few presets that I regularly use without keyboard access. So, fingers crossed, I may take the plunge.

Keith Pace Asciak said...

Hey Gordon,

Thank you so much for the work you have put into this. I have been looking for something like this for a long time. I was hoping to program a separate keypad to do this but this works just as well for me.

Gordon McKinney said...

My deepest thanks to Derek and Joe who commented on presets for the Library module. As you know, Library module is my favorite place to adjust images because of its sheer speed. I regular switch between loupe and grid view while adjusting my images.

The latest script is online with these new features:

NumPad 5 - Toggle Dev/Lib Module [new]
ALT NumPad 5 - Crop Tool [new]
ALT Enter - Sync Settings [new]
F5 - Library: render standard sized previews [new]
Ctrl NumpadX - Library: Execute a preset [new]

Aaron said...

Thank you, thank you, thank you.. I can't say it enough !! You just saved me a few hundred bucks on the overpriced keypad (RPGmini)

I'd really suggest anyone who plans on using this sweet little app, to go out and buy a Belkin nostromo n52
They have some older versions that are a little cheaper..

The beauty in this is that you can make the nostromo keys ANY KEY that you want or a macro (alt+home)

The keypad has 14 normal keys plus 2 thumb buttons. The device has 4 modes, so each of the 14 keys can do 4 different functions.

Within the nostromo software, i made the thumb button a momentary toggle for the "red" mode. So lets say key #1 was "exposure +" if i press and hold my thumb button (red mode) and press key #1 it becomes "exposure -" I can't figure out the AHK scripting, but i can sure post my nostromo layouts if it helps anyone !

-=< Aaron >=-

Mark said...

You rock Gordon!!!

My only issue was that i forgot to reload the script after editing my presets!!

Am wondering if it is possible to create a hotkey for creating a virtual copy and then applying a preset??

Thanks heaps mate, you are a champ

Gordon McKinney said...

Anything's possible :-)

The official LR shortcut for Virtual Copy is Ctrl+' (that's control and apostrophe). In Autohotkey its Key:: Send, ^' where Key:: is your hotkey.

I use the Logitech G15 keyboard, the left bank of 18 keys can be programmed with Macros. I have a couple defined. Virtual Copies, Invert Selection, etc.

I'm glad this software is helpful. I completely neglected my number pad when I first got the G15 and then discovered its a gold mine for this sort of thing.

Darren said...

just downloaded and testing.. appears that Contrast adjust (page up/dn) & Black Clipping (ALT pgup/pgdn) are not working in LR 2.5. It ppears there's no code in the script for these keys? or am I just missing it?

Gordon McKinney said...

Num Lock must be on. The code is NumPad9:: and NumPad3:: hotkeys.

Please test further as I run LR2.3. I'm fearful of upgrading after the repeated crashes of 2.0, 2.1, and 2.2.

Version 2.6 of LR was released last week. Maybe try that.

Darren said...

Yes, that's it. Likewise instead of Home/End, it's NumPad7/3 for color temp & ALT NumPad7/3 for recovery. Tested all functions in LR 2.5, 2.6, & 3.0 Beta, all appear working.
Thanks for your help and hard work!

Gordon McKinney said...

Great news. Thanks for testing it!

I use the term PgUp and PgDn etc. because I think it aids memory better than 7/1, 9/3 etc.

Have a good Christmas!

William said...

First off, THANK YOU for the script and instructions. I'm using it with a Logitech G13. I even got the LR presets to work.

Is there a way of adding more than 10 LR presets?

Many thanks,


Gordon McKinney said...

I'm glad you like it.

You can add more presets but you have to find unallocated keys to assign. Just go ahead and read the AutoHotKey Quick Start Guide and use my code as a basis for building your own custom version.

Seth said...

Hi Gordon,

wonderful piece of work this, thanks so much for your time and effort which saves us all so much time and effort, it's really appreciated. I'm editing some pictures for stock libraries now and am doing a lot of noise and sharpness adjustments. I'd love to set up a script to give me number pad control over this, have you put up a list of which numbers correspond to which controls anywhere that I could look at? Or are some controls not yet mapped?
Many thanks again,

Gordon McKinney said...

Thank you :-)

The numbers are determined by using AutoHotKey's Spy menu option. You can also guestimate the control by counting from a control that I've already mapped.

The short answer is: Adobe didn't design their software to allow user keyboard shortcuts. As far as I can tell 3.0 won't have them either.

One day they'll step up and provide a feature that clearly everyone wants.

Anonymous said...

I spoke to an Adobe person at PPA in Nashville and "shortcuts" are high on the list of requests. No, it won't be in LR3

Gordon McKinney said...

Not that high on the list if its taken two years and still no sign of something so simple :-)

Thanks for inquiring. Finger's crossed 2011 might bring a release with customizable keys.

George said...

Gordon, as others have said, many thanks for your efforts with this project & for sharing the results.

Just thought I'd pass along some info that may be of use to anyone looking for an external keypad. I've had great success with your LR AutoHotKey script using the Targus Wireless Stow-N-Go keypad model AKP01US (purchased from Amazon.) Currently I'm using it on an HP Pavillion dv6000 series notebook with Vista Home Premium & LR v2.6.

At < $25 the Targus is a winner. It also fits nicely into an inexpensive Caselogic padded case for transport.

Thanks again!


Gordon McKinney said...

Fantastic news, thank you! I will add a note to the main post indicating that external pad works with the script.

Have a great weekend!

George said...

I should make a clarification with respect to the Targus keypad mentioned in my earlier post.

When used per the instructions to set NumLock (main keyboard) ON the Targus works fine with Gordon's script for all functions except Paste Prev & Sync Settings. A simple edit is needed to make it fully functional with the script because the keypad responds with 'ENTER' (same as from the main keyboard enter key) rather than 'numpadEnter', which is the script's trigger for the Paste Prev & Sync Settings.

This simply requires replacing the numpadEnter and !numpadEnter (in both the Library & Development sections)with Enter & !Enter, respectively.

The keypad's NumLock state (in fact probably most external keypads') is by default 'un-synced' with the main keyboard's NumLock state. For notebooks with an embedded numeric pad this is a big advantage since the main keyboard numeric pad keys retain their normal functions.

The Targus works correctly (after the Enter mods above) even with the main keyboard NumLock OFF. However, it appears to use CTRL+numpadX (X = 0 - 9), i.e the very keys used to select the 10 Presets, to set the main keyboard NumLock state ON (at least on the HP dv6000 notebook I use.) This is fortuitous in the sense that the Presets respond to the CTRL+numpad0-9 as defined in Gordon's script. However, it leaves the NumLock state of the main keyboard latched ON, meaning typing errors can result if this isn't noticed, e.g. hitting the K key of my HP would produce a 2.

To overcome this so that the main keyboard remains in the NumLock OFF state the defined Preset shortcuts of CTRL+numpadX (^numpadX) can be replaced by some other key combination. Being a lazy typist I find CTRL+ALT+numpadX (^!numpadX) works nicely & requires just a one character change in 10 lines of code.

I've also tested 2 more keypads with Gordon's AHK script:

A Toshiba wired keypad


a (wired) combo mouse / keypad from Adesso. (The hinged transparent cover over the numeric pad is easily removed & the mouse used, with some practice, w/o inadvertently hitting the numeric pad keys.)

The Toshiba is very nearly identical in behavior to the Targus & also requires changing the code for the numpadEnter & !numpadEnter to Enter & !Enter. With the main keyboard's NumLock set ON & the Enter modification the Toshiba is fully compliant with Gordon's script (again, at least on my HP dv 6000!) Unlike the Targus, however, the Toshiba keypad doesn't automatically set the main keyboard NumLock ON using the CTRL+numpad0-9 keys but rather does this in response to the numpadDot (decimal / DEL) key, i.e the key used for Auto Tone. Be careful! :-)

The Adesso combo pad works without alteration to Gordon's script IF the main keyboard NumLock is set ON. Unlike the Targus & Toshiba it generates the numpadEnter code in response to the keypad Enter press. It can also be used with the main keyboard NumLock OFF, but, just as with the Targus & Toshiba, to do so requires that the Presets' hotkey codes be changed, e.g., to ^!numpad0-9. (I have not found any key combination with this keypad that automatically switches the main keyboard NumLock ON, which I count as a plus.)

I hope this information helps. It's well worth the minimal effort to move the editing functions to an external pad for notebook users!


George said...

Just to add a final footnote to my posts about the external keypads, I've now had a chance to test the 3 keypads on 3 different notebook computers & find each keypad functions identically regardless of which computer is used.

The additional notebooks tested were a Toshiba M45 series (XP / Pentium M) & Sony TR2 (XP Pro / Pentium M), both running LR v2.6. All keypads on all notebooks functioned with XP / Vista native drivers so there was no need to install any additional drivers (nor were any provided.)


Julian said...

If I would like to stay in the develop module, what do I need to do? When I move the next image it always switches to the library (I know this is your preference).

Gordon McKinney said...

Use the left and right arrow key on your keyboard instead.

I use the develop module for 99% of my adjustments because its 2-3 times faster than moving between images in the develop module.

Vie said...

Thanks Gordon, save me hundreds from having to buy an RPG keyboard (some still want that though, with all the good labelings). I'm trying to develope a way to control LR with MIDI controllers. I've just began the project though, not much is happening. What I'm trying to do is modifying your script to repond to MIDI signal instead of the keyboard signal. I don't quite understand your script though, especially how you use the delta # to calculate the exact control in LR. Why not use the control # directly? (I don't see it change every time). What exactly is the delta value?
Thanks for helping out.


Gordon McKinney said...

Here's the thing. LR does change the IDs when you launch it. I haven't noticed it change during execution but decided to play it safe.

So the delta values are calculated from a control that I picked as my reference point.

I don't know about MIDI controllers but I do know that you'll need the same logic as I to locate and then agitate each control.

Bill said...


I had the exact same idea of using a MIDI controller with Lightroom. I was intrigued with the prospect of having individual pots or sliders to control brightness, contrast, black point, etc. without the use of the mouse. I expect that it would be a lot faster.

I spent some time developing the software to do it a little over a year ago but dropped the project when other needs commanded mindshare.

Others have worked with adding MIDI input to AutohotKey. Search around and I believe that you will find most of what you need and can then add the rest.

Bill W.

Vie said...

@ Bill: Thanks Bill. That's what I'm doing, picking up pieces from other people and stitch them into my project. I'll let you know when I'm done and you can use it. (or if you have new idea, please share).

@ Gordon: That's my problem there Gordon. I can't follow your logic. Can you post or email me the lrdGetControl() section with explanation on each line, if it's not too much for you.

Bill said...


Here is a note I sent to a person who contacted me about a year ago on this topic. Perhaps you will find something useful there.



Now to your question...

You have touched on a sore spot. I spent a lot of time working on this in January and February, made a lot of progress exploring each of several areas in isolation, but as I was about to put all of the pieces together other things competed for mindshare and I ran out of time. With spring here and summer rapidly approaching that situation has not changed. It is frustrating. In May I kept hoping for a rainy day so I could spend it inside working on this. Now it is June, we have had nothing but rainy days, but I have not been able to get to it.

My objectives in this project started out as simply controlling LightRoom from a MIDI keyboard. To do that AutoHotKey would have been fine. I probably found the same discussion that you referenced about coupling MIDI to AHK. Someone developed some code for MIDI input, not yet fully integrated with AHK as of February, but easily linked with it. I downloaded it and explored it a bit. It's been a while but if I remember correctly I was able to recognize input from my keyboard and perhaps implement a demonstration of changing a single LightRoom control. I could have continued from this point but I decided not to. I found something a bit un-tidy about the approach, AHK in particular. Maybe it was the specification language, not sure, but I didn't like it.

Instead, I decided that I wanted to implement the Midi->LR software entirely from scratch. In large part I really wanted to learn how to write a gui application for Windows. This application would provide the target of that learning experience. I have a list of several other music-related apps that I have wanted to write as well so the investment in learning would pay off beyond just LR control.

I went looking for a development environment exploring VisualStudio, wx-DevCpp, Perl / perl-win32-gui, etc., before settling on Qt. Lots of reasons for that choice - basic knowledge of Qt from many years ago, quality of documentation, cost, ease-of-use, active development, support, etc. Aside from a learning experience I also wanted to simplify the binding between MIDI events and LR controls with a gui-based set of tools. The "offsets" used in the AHK LR scripts leave a lot to be desired.

Before I got to that point I had already implemented many of the individual pieces using Perl to explore the Windows API, which was totally new to me. Perl is great for exploring a new environment because is is so fast to iterate through test cycles with it - edit, test, edit, test, etc. - compared to any of the IDEs, which all have substantial compile latencies. I didn't want to use Perl for the final tool since I had it in the back of my mind that I would offer my work to others when complete. I don't know how to deploy a Perl app without forcing the user to first install Perl. They may be a way (probably a perl dll) but I don't know what it is.

I finally got to a Qt implementation. As with Perl, I have lots of fragments, individual pieces of the application, but not integrated into a whole. In particular, I either found code or wrote code to: capture MIDI input, make a list of all windows in a named application (windows including text boxes, sliders, spin boxes, etc.), use windows hooks send keyboard input or mouse clicks to those windows, obtain the screen coordinates of all windows for the purpose of highlighting them for confirmation, and probably a couple of other things that I have forgotten. As should be obvious, it is all there, just not connected together, and no idea when I'll get back to it.

Gordon McKinney said...

The best language to control Windows directly is C++ and Visual Studio. You need to learn how to post messages to HWND handles. I suggest downloading the AutoHotKey source code and seeing how it locates and posts messages.

Using the Windows SDK Spy++ is also a good way to learn.

Ultimately Adobe's lack of customizable keys is why this is such a difficult task to accomplish. When that changes everything else will snap into place.

luc said...
This comment has been removed by a blog administrator.
Anonymous said...

Wondering if there is a way to get vignette added and then an alt key mapped? Still can't get my presets to work....anyone out there willing to help?

Anonymous said...

have a genius number pad that has the 00 key and was wondering if anyone knows how to remap it to act as a Ctrl key as it currently sets rating to 0 the same as the 0 key. Help anyone???

Gordon McKinney said...

Hopefully someone here can help. I'm not sure if 00 sends two 0 commands or whether its got its own special key mapping. I'm guessing its the former and cannot be remapped.

If someone has this keypad; your post will be greatly appreciated.

Anonymous said...

Thanks Gordon...I just really need a cntrl and an alt key mapped so that everything can be done via the keypad. Doesn't really matter which key it is...checked through all the posts here but can't see that anyone has managed to do it yet

Gordon McKinney said...

Sounds like you need to read the AutoHotKey documentation to learn how to create your own key combinations:

Anonymous said...

managed to get the Ctrl key mapped to the 0 key but at a loss trying to remap the .(DEL) key to act as an Alt key....

Gordon McKinney said...

AutoHotKey docs/forums is the best place to ask questions as I didn't write that software :-)

Vie said...

For the Genius pad, I don't have it so I don't know about the 00 key, but there is a special help article (sample script) in AutoHotKey help file for the 000 keys on some pads. (Search "numpad 000 key" in the help file.) According to this sample script, I believe the 000 key (as well as your 00 key) sends out multible zeros very rapidly. So maybe not mappable to Ctrl.
Why not use the AutoScriptWriter to check the key stroke?

Anonymous said...

tried HotKeys and could not find an answer.. wondering if anyone that has commented here knows how to script the NumpadDot to act as the Alt key??? I've looked around for about 5 hours and had no luck!

Vie said...

This worked for me:


Cliff Spicer Photography said...

I just wanted to thank you so much for putting all this work into this project Gordon. I have wondered how anyone finds lightroom very effective without a way to create custom keyboards shortcuts. Seems to me that every time I am using a mouse I am slower then I need to be. I was going to purchase a dedicated product that has a small extended keyboard for $300+ but decided to do some research first and I am lucky I did. I found your hard work, tried it out and it works beautifully. I can now tweak hundreds of images in my lazyboy with just a keyboard on my lap and it once again a big thanks to you for that.


Cliff Spicer

Niko Paulanne said...

First, thank You for introducing to this wonderful script!

I had a problem with this script for a long time until now: the preset shortcut-keys did not work at all on my setup LR 2.X + Belkin Nostromo Speedpad n52 + Autohotkey.

Point of problem was secondary display enabled from Lightroom. Pretty common to have another display showing full size photo and editing been done on other display.

How to solve the problem? You have to edit lines having:
"Control ChooseString, preset name, ComboBox4, Lightroom"


"Control ChooseString, preset name, ComboBox4, Lightroom - Library"

That way Autohotkey can choose right window "Lightroom - Library" and not the "Lightroom - Secondary display" to open the preset.

Hope this helps someone struggling with same problems!

Gordon McKinney said...

Thanks for the heads up.... I can make that change to the script however I have one question: wouldn't that disable the feature when you're using the develop module?

Do you think that's a reasonable compromise in return for dual monitor support?

I can also modify the script to change its actions depending on whether the system has one or more monitors.

Mei said...

I've been using Autohotkey with Lightroom 2 for a while now and it works great. Just upgraded to Lightroom 3 and none of the shortcuts work properly.

When I press the key to move a slider it instead increases the last slider I was using then jumps to the new slider.

Eg if I am modifying brightness and I get it where I want, then hit the key to increase contrast, instead of increasing contrast brightness increases again then focus jumps to contrast, which doesn;t change.

I think the problem is the way LR3 is interpreting keystrokes. In my autohotkey script I have lines like:

numpad8:: lrdAdd(18)
numpad2:: lrdSub(18)

to increase and decrease brighness.

I think the problem is in the lrdAdd and lrdSub functions, or how they are being interpreted

lrdAdd(delta) {
instance := lrGetControl( Static, 6, "Treatment :", delta )
ControlClick, Static%instance%
Send {=}

the send seems to be happening before the correct control is selected.

Gordon McKinney said...

I haven't tested on LR3.0 and I haven't paid for the upgrade.

Since this script is provided free of charge I have no burning desire to drop $99 upgrading LR and then spending my time patching this script.

If someone would like to donate $200 to cover my upgrade and time then I'd be more than happy to look at this problem.

Until then... I guess you'll have to wait for another good soul to donate their time on this.

Mei said...

Fair enough, I appreciate the work you did on the version for LR2.

I spent a couple of hours on it myself and came up with a script that works for LR3.

I tried posting it here but it was too long, if anyone wants it email me on

Mei said...

Sorry, typo in my email address, should be

JP said...

Probably the LR3 version (if it works well) should be hosted in some blogspace? I'm eager to try the LR3 version.
I also have a blog but it's mainly in Finnish....

JP said...

Sorry for spamming...

Would anyone have a clue how to add a keyboard shortcut for jumping into Caption field in Library module? Like ctrl+k goes to keyword field?

Mei said...

JP, I've sent it to Gordon who'll look at it and may put it here somewhere.

Gordon McKinney said...

JP... I have received the v3 file from Mei. Once I complete testing on LR2 and an LR3 trial I will be sure to post it to this blog.

Gordon McKinney said...

I have Mei's script but the work around used for LR3 is not robust enough to survive on other people's computers... its also slower than the original.

I will work with Mei to see if he can find a resolution.

But as I've said before... I cannot put non paying clients (you) ahead of my paying clients.

Donations are welcome!

Once I reach $150 I can set aside time and effort to debug this for LR3. Please send PayPal money to gordon[at]

People who donate will get 60 days usage of the LR3 script before release to the general public.

I promise to refund all money if I don't hit my donation target or I fail to solve the problem for LR3.

Nilbert said...

I'd be inclined to donate if there was any chance that in the near future we would see shortcuts for the sliders, exposure, brightness, contrast ETC. I have the xkeys keyboard and had the script previously working on LR2 although not any longer.

Gordon, any way you can make that happen? Those are really the shortcuts that would enhance my workflow the most.

Gordon McKinney said...

Not sure what you mean by 'sliders' since the shortcuts modify the settings you describe in the library and develop module.

Dorfl said...

Hi all,

this is Dorfl from way up there. I apologize for being offline here, had a bit of a bad year. However, I managed to use Gordon's core functions and worked them into a fully customizable tool that I have been using for 10 or so months now. It's possible to assign some of the core tools in LR (Exposure +/-, Tint +/-) to any of 24 keys on the keypad, plus the same with CTRL and ALT - 72 keys in total. All that can be done on the fly via a menu option, and the script saves the settings.

It works well for many months now now for me in LR2. Doesn't mean it works for everybody.

I am happy to spend some free time as well, so I emailed Mei to send me his script. I will find a way to post somewhere as well. I am not a coder, so it's a bit messy and some other eyes on it would be great.

Gordon, question - any reason why we could not go directly for the static or edit controls in the panels? I tried that once and then failed and it was easier to use your script, but maybe LR3 gives us the opportunity to play with this

Dorfl said...

I saw what you did, and now I know why :-)

I am playing around with this in the next week or so, let's see what we come up with

Gordon McKinney said...

Great. Send me an alpha and I'll be more than happy to test and lend my insight. See my email address a couple of posts up.

Have a good end to your week,

G. :o)

Dorfl said...

A bit of late night playing found the issue raised by Mei above. It seems LR3 is now so fast that somehow, the SEND{} is interpreted faster than the click{}. I wrote a quick test, in which I change Gordon's caching algorithm a bit. Basically, now it caches in lrdadd{} and lrdsub{} (instead of one level below) in the following way
- is that the old offset? if yes, just send
- If no, find the new handle, wait 1/2 of a second, then send

that works. the 1/2 second was a guess that worked, we can probably optimize this. Now off to work.

Gordon McKinney said...

You cannot use a hard coded delay. If someone's computer has a slower CPU that you or their hard drive queue is busy then your delay is not long enough for their system.

What happens when someone hits the adjustment key more than once in quick succession?

You need to look at AutoHotkey's SendInput, SendPlay, etc. functions to see which one is synchronous. Possibly switch the click function for a Send instead.

Good luck!

Dorfl said...

Agree. I tried last night whether I can find the focus after the click and wait for that but no luck.

A friend helps me this afternoon to put a small google site up so I can post the code for the world and harness the powers of people that actually know how to code in the modern world.

dorfl68 said...

Alright, we are online with PADDY V0.9.2:

Including a Google discussion group so Gordon's thread doesn't become the main bugfix zone. Coders very welcome, since, as Gordon says, we have a life.

I reworked my original quite a bit over time and spend some hours yesterday on this. I am sure it will break somewhere but as far as I know, it will not break your original pictures. The LR3 trick is at the moment a simple delay. However, you can set that delay in the customization Menu under "settings". (The menu is under the tray icon) If on typing the "old" slider moves, you need more delay. (This whole thing is caused by LR waiting for a double click in the Slider label I think)

Dorfl68 said...


Dorfl here - I think I found one method to directly select the presets from the development module! I am not sure how stable this is - would love if you find time to play. If it works, it will be in the next version of Paddy (, which is the hobby-gotten-out-of-hand version of all this.

It turns out, that Combobox4 (or 3, both work) is just very hidden but not destroyed when Lightroom switches module. The Windows handle stays, and so does LR's reaction to it. So, if you get the WinHandle of the box, and select the preset via this, it works directly from the develop module! Here is what works in my test program, try the same. (In Paddy, I will renew teh handle as soon as we are back in Library, just to make sure). Again, it works but we have to see how stable.

(1) On program start, go to the Library module and get the handle of ComboBox4 in a global variable

send ^!1 ; goto library, maybe wait a bit afterwards
ControlGet, preset_box_handle, Hwnd,, ComboBox4 ,ahk_class AgWinMainFrame

(2) In the hotkey section, from develop module or anywhere, now select the Preset in the box via the handle, not the name

Control ChooseString, Name of Preset here,, ahk_id %preset_box_handle%

This works in the experimental run for Paddy and in a little stand-alone! I will post a little script on the board for Paddy later this week

Light room Keyboard said...

This is very nice blog, I like this a lot. One of the best news at all. Really I need this kind of information’s and I am sure that I got form this blog only which is my fav. one. I think this one must be Inspire the new bloggers. I am with my team appreciate this blog, Thanks for sharing this with us. Keep blogging continue.

Rileyphotographic said...

Really! The posted blogs are very attractive and interesting.

keep it up...

New Hampshire Wedding Photographer