Skip to main content
Inspiring
Dec 9, 2024 2:13 AM UTC
Open for Voting

P: Shortcut key for ‘constrain crop’

I use Loupedeck where I can easily press a key for the transform functions'level' or Auto'.  Sometimes it is necessary to use constrain crop on the image, which requires a mouse over to select the box.  It would add to speed and efficiency to have a shortcut key to select that function.

3 replies

jrsforumsAuthor
Inspiring
Dec 10, 2024 12:22 AM UTC

With the multi-step KB actions capabilities of Loupedeck (or Stream Deck) you can avoid need for a shortcut/hotkey.  Again, thanks for the script!!

Translate
jrsforumsAuthor
Inspiring
Dec 9, 2024 2:39 PM UTC

John.....Thank you!

Translate
johnrellis
Legend
Dec 9, 2024 5:55 AM UTC

While waiting for Adobe to implement this (if ever), here's how you can do that now.

 

Copy these lines into a text file using Textedit or Notepad and save it as "toggle-constrain-crop.lua":

local LrDevelopController = import "LrDevelopController"
LrDevelopController.setValue ("CropConstrainToWarp", 
    LrDevelopController.getValue ("CropConstrainToWarp") == 0 and 1 or 0)

 

Install that file into the Lightroom Scripts folder following these steps:

https://helpx.adobe.com/lightroom-classic/kb/extract-previews-for-lost-images-lightroom.html

 

After restarting LR, you can use the menu command Scripts > toggle-constrain-crop to toggle the Transform > Constrain Crop and Crop > Constrain To Image setting (they're the same).

 

Assign a keyboard shortcut to that script using System Settings on Mac or the free Autohotkey utility on Windows. See these instructions as a guide:

https://johnrellis.com/lightroom/anyvision.htm#shortcuts

 

Translate