Photo Corners headlinesarchivemikepasini.com


A   S C R A P B O O K   O F   S O L U T I O N S   F O R   T H E   P H O T O G R A P H E R

Enhancing the enjoyment of taking pictures with news that matters, features that entertain and images that delight. Published frequently.

A Keypad for Photoshop Share This on LinkedIn   Tweet This   Forward This

18 March 2024

We've been using Photoshop for well over 30 years now and in that time we must have moused over to the menu bar or panels enough times to have circled the globe, gone to the moon and set off for Mars.

For 30 years we haven't complained about that. What those menu commands accomplish still strikes us as a miracle.*

But the other day we were rummaging around in a box of discarded computer stuff and came across a wireless numeric keypad. We'd been reading about the programmable buttons on a Steam Deck, which start at $350, with some envy. So we wondered if we could define the keypad's keys with Keyboard Maestro macros.

It would be nice, we thought to have a macro keypad so we didn't have to remember all the key chords we use to launch our macros.

HARDWARE

It didn't take us long to find out.

Because Keyboard Maestro can distinguish between the main keyboard and a 10-key numeric keypad, it is indeed possible to use a keypad as a poor man's Steam Deck.

Keypad. A wireless 10-key for $14 at Central Computers (in black or white).

Our experiment was so successful we ran out to buy another keypad for our backup system. USB keypads can be had for less than $10 and wireless ones for less than $15. Our Bluetooth keypad was $14 at Central Computers.

We love that store, by the way. We used to get dizzy in computer stores like Fry's, never quite finding what we needed. But we've never gone into Central Computers without finding exactly what we wanted at a price we could afford.

You can skip this step entirely, though, if you have an extended keyboard with the built-in numeric keypad. Our solution works just as well with that keypad.

SOFTWARE

You'll need a copy of Keyboard Maestro, the indispensable macOS utility. But that's it.

Well, you'll need our two macros, too.

Put them together with your keypad and you'll get:

  • Custom keypad definitions for all but the and keys
  • A popup legend on the . (Period) key
  • Switchable sets of defined keys*
  • Auto switching of layouts based on application name

We called the suite SpeedKeys in homage to a discontinued Lightroom keypad from Kubota Image Tools.

SETUP

We accomplish this with two macros.

  • SpeedKeys Layout contains a Custom HTML action for each set of keys (or layout) and code to display that window when the . key on the keypad is pressed. When the key is released, the window is closed.
  • SpeedKeys Definitions contains the hot key triggers for all but the and keys of the keypad in various sets. A default, inactive set is included as well as code to switch between sets and toggle Auto Switching when (Control-Esc) is pressed.

One global variable (SpeedKeys) is used to indicate the current layout and remember if automatic layout switching has been enabled.

PHOTOSHOP

We have a variety of layouts the define what the keys do based on which application is at the front. You can disable that and stick to one just as easily but we really like having the functions change with the software we're running.

Photoshop Keys. Color coded by function, some are universal (on every layout) like Switch (to switch to the previous window) and Mirror Mirror (our backup macro) while the blue keys are Photoshop specific.

Of course that can make it hard to remember what each key does. We decided to dedicate a few keys to the same function on every layout. One key switches between the current and previous application's windows. Another starts our backup macro. And another does screen shots.

But the rest of them change with the application. And to keep track of that, we use the . key on the keypad to display the layout. That's what you see above.

As long as you hold down the key, the layout is visible. You can find what you're looking for and tap the key to run the macro.

CODE

There are really only two approaches needed to put commands on a key. One for selecting menu items and the other for running Photoshop Actions. Both are dead simple to configure.

Menu Commands

Menu only commands save a lot of mousing around, particularly when you combine a couple of them on one key.

Select Menu Command. This Keyboard Maestro action runs a menu command, in this case, Crop.

Keyboard Maestro makes it easy to navigate to a menu command to complete this action with a flyout menu of all the available commands.

Photoshop Actions

When an operation gets more sophisticated than just selecting a menu command, you've probably created a Photoshop Action for it with dialog box settings baked in. To assign an Action to a key, you use this simple AppleScript:

Run an Action. We use an AppleScript to run the Photoshop Action named Contrast Mask from the folder Personal.

The AppleScript will require changing the name of the application every year. It's Photoshop 2024 this year, but it will have to be changed to Photoshop 2025 next year.

Options. Set it and forget it.

OPTIONS

A special key cord brings up an option window to select Auto Switching or a specific layout. We've left it on Auto Switching, which switches to a Default layout (with pretty generic key definitions) if an application layout hasn't been defined.

CONCLUSION

We were delighted to be able to select a subject and crop it with one keystroke on the keypad. And just as happy to be able to resize and sharpen an image for publication with another keypad key.

And because SpeedKeys automatically configures itself for any application, it's far more versatile than a dedicated keyboard or keypad. To see what's active, all you have to do it hold down the . key.

It's a poor man's Steam Deck but it's just as powerful.


BackBack to Photo Corners