Skip to main content
Participating Frequently
September 9, 2020
Question

Changing Foreground Fill Shortcut

  • September 9, 2020
  • 1 reply
  • 657 views

I'm trying to change the shortcut for filling a layer with the foreground color from 'alt + backspace' to 'ctrl + F' and I'm having trouble finding where that shortcut is in the Keyboard Shortcuts panel. 

 

I've been able to link 'ctrl + F' to the Edit > Fill function, which is probably the second best option, but it would be nice if I could simply hit 'ctrl + F' and have the layer be filled without having to press Enter as well. 

 

Thanks in advance! 

This topic has been closed for replies.

1 reply

JJMack
Community Expert
Community Expert
September 9, 2020

Simply record an action fill foreground color and set a f key for the action,

 

Now if you add a little script step to the action you have a random color fill key.

app.foregroundColor = randomHSB(0, 360);

/**
* returns a random HSB color that has some brightness & saturation
* @returns a SolidColor 
* 
*/
function randomHSB(hmin, hmax){
    colorobj = new SolidColor()
    colorobj.hsb.hue = getRndInteger(hmin, hmax);
    colorobj.hsb.saturation = getRndInteger(10, 100);
    colorobj.hsb.brightness = getRndInteger(30, 100); 
    return colorobj;
};


/**
* @ returns a random number between min and max
* 
*/
function getRndInteger(min, max) {
    return Math.floor(Math.random() * (max - min ) ) + min;
}; 	

.

 

JJMack
mvs94Author
Participating Frequently
September 9, 2020

Great! Thank you for the help!