Newbie Trying to connect mini keyboard USB Device to work with KM

I'm not sure what macro you are referring to there, but I think all you have to do is create a new macro, add a "USB Device Key" trigger, then click in the box, and then press the USB key that you want to trigger the macro.

I'm also not sure what that means, but if you do what I suggest above, that is the "mapping" between the device key and your macro.

Thank you so much!! I see the dropdown menu you're referring to now. You are so kind, and I really appreciate your response. On the flip side, I'm discovering that the keyboard device must be set up on a PC first and then only will it work on a Mac. The things you discover after buying something lol. It's deceptive because they give a link for the Mac download for their software, but it doesn't work, hehe. Again, deep thanks for your expertise and generosity!!

If you want to do that, go ahead. But I doubt that you need to do that in order to create a trigger in KM like the one I showed you above. I don't think you need to use their software in order to get KM to trigger on that device's keys. I think you should try my advice before bothering with Windows.

I think you are under the impression that some sort of "mappings" must occur inside the device in order to work with Keyboard Maestro. I'm 99% sure that impression is incorrect.

The device as it's set up now only has only a limited amount of letters in the alphabet that it can use. (It seems as though it's set up like a normal keyboard). If I type those letters, it triggers other actions already ascribed to Lightroom actions. I'm not sure there's a way around that other than to re program the keys to other strokes.

Another question just arose though, is possible to tell KM that when I press that key, it should only apply to the Lightroom application?

After re-reading your message several times, I have a question about your goals here. At first I thought that you wanted KM to intercept the device keys and send the commands to Lightroom. But after further consideration, it seems that you want your device to send commands directly to Lightroom, but have KM somehow "record" that. And yet you said, "is possible to tell KM that when I press that key, it should only apply to the Lightroom application?" So which is it? Do you want your device to send its buttons to KM, or to Lightroom? It's either one or the other. I'm sorry for not understanding which option you want.

You might find my SpeedKeys macro helpful. It allows an inexpensive 10-key pad (or extended keyboard 10-key pad) to function as a keyboard for macros that switch automatically to different sets based on the application that is running.

I suspect your keyboard is not much different and might even work with SpeedKeys.

1 Like

Thanks again, and my apologies for the confusion.

Basically, I would like to press one of the keys on this mini keyboard device and it then would activate a mouse click on a button in Lightroom. It would automatically find the button on the screen in Lightroom that ordinarily a mouse would click on, (or shift key is held down with a mouse click). I thought the solution might be that I would use the record function to map out the click by using KM.

There is no speed-key for this action of using a mouse to click on the button in LR, so I thought I could use KM to record the mouse click. I actually had something like this set up a few years back with a Logitec G-13 device, but they discontinued it and the software no longer works. Now, I can't remember clearly how I did this, and with this new device I'm a bit lost.

Hopefully that helps. I would imagine someone with technical know-how may be frustrated with my attempt to describe this properly. My apologies and thanks for all your help so far.

I'll take a look at SpeedKeys, thanks, but I have a feeling it's only for the Develop module in LR and not the "Quick Develop" module in the Library mode.

What precisely would that do in Lightroom?

Sure, as I said, if the software that comes with the device has a way to map its buttons to Lightroom, then feel free to do that, but Keyboard Maestro won't provide any benefit in that case. If you have to configure the device using a Windows PC, because the macOS version of the software isn't working, then you are free to do that. I've had to do that once with a similar device to yours.

But if you want KM to do the work, then you do what I said above. That is, you map each button of the device to a KM macro using the trigger that I pictured for you above. Then you write a KM macro for each button that takes the action you desire. At this point, I don't know what actions you want, and I don't have Lightroom, so there will be some work involved in writing each macro.

If you have a complete list of every function that you want each button to trigger in Lightroom, you should share that list here. We can probably tell you how easy it will be to program each function. Some functions will be easy to implement using a single KM action, like this one:

But some actions may require use of the FindImage action, or other actions that may take a little more work. Until you share the details of all the actions you want each button to take, I can't write any of the macros for you.

In the Quick Develop section of the Library Mode there would be the following buttons set up:

+1/6 stop exposure , +1/3 stop exposure, +1 stop exposure, -1/6 stop exposure , -1/3 stop exposure, - 1 stop exposure

+1/6 temperature , +1/3 temperature, +1 temperature, -1/6 temperature , -1/3 temperature, - 1 temperature

+1/6 tint , +1/3 tint, +1 tint, -1/6 tint , -1/3 tint, - 1 tint

This would be the fastest method to give minor touch ups to a large amount of files.

Thank you so much for an incredibly generous offer. Not to be hyperbolic, it's truly people like you that make this world an incredible place. :slight_smile:

Here's my understanding; currently the device is actually working in regard to triggering the mapping recorded in KM and in turn clicking the proper button in LR. However, since KM has to use a common letter in the alphabet (the keyboard device comes out of the box pre programmed with it's keys set up to type only common letters) it's also triggering a pre-existing action in LR.

My thought is, if I bring the device onto a PC, download the software, and just change the common letters currently set for the keys to something LR does not use, then I think it will work. Supposedly, once you set the keys to the keystrokes (or macro) it stays in the keyboard and will work once brought over to the Mac.

Am I missing something?

I reread all your posts, and this comment seems to be telling me what you are trying to do:

Sure. The first step is to take my advice in my first post. Reread that post and tell me if that works. If it works, we can move forward from that point.

If it doesn't work, then we have to get you to use your device's software to remove the shortcut key from the key that you are using. But if it does work, then we are 50% on our way to success.

I see that you answered Mr Pasini's question with a list of images (or buttons) that you want to press. But you didn't indicate if there were keyboard shortcuts or menu shortcuts for those items. If so, the solution should be easy. If not, then we will probably have to search for another solution (either AppleScript or Find Image.)

I think the OP's problem is that

  1. Their mini keyboard sends character codes, programmable within the keyboard and set to "normal" characters by default
  2. Lightroom has unmodified single-character shortcuts, eg E
  3. KM doesn't swallow USB Device Key triggers -- they're passed through

So, as things stand, if the 5th device key is mapped to E and they have a macro triggered by "USB Device Key 5", when they press the key it will both trigger the macro and put Lightroom into "Library Loupe view".

Hence the need to re-program.

Yes, that is why I said "If it doesn't work, then we have to get you to use your device's software to remove the shortcut key from the key that you are using."

I just took a look at the Koolertron manual for mapping keystrokes on the device. You can map individual function keys (and other keys) to the device or combinations of them (with delays and taps) as "macros." You can't call a Keyboard Maestro macro.

Since there are no keyboard equivalents for the specific controls you want to use in Lightroom, remapping using the Koolertron software isn't going to work unless you have Hot Key triggers on your Keyboard Maestro macros that you an map to the device.

Using a Hot Key to trigger your Keyboard Maestro macros that click Lightroom buttons will swallow the keystroke (unlike the USB Device Key trigger). But you'll have to see if Keyboard Maestro distinguishes the keycode sent by the Koolertron from one sent from your keyboard. It does with a 10-key, which is why SpeedKeys works.

1 Like

Yes, I think this describes it well. What are "hot keys"?

Hot Key Triggers are one way, perhaps the simplest and most common way, of triggering macros. The key combo is "swallowed" by the KM Engine and isn't passed through to the active application, whereas USB Device Key Triggers are passed to the system after triggering a macro.

1 Like

OK I'm trying to get the Hot Key Trigger to work. I tapped my mini keyboard to type in the letter, in this case it was "D", and it worked, but it didn't "swallow" because if I type the letter "d" with my main keyboard in any application, it triggers the KM action. Attached is a screen grab.

"Swallowing" means eating it and not handing it over to the app. Therefore the macro you created is "swallowing." It's not supposed to pass the letter D to the app; instead, your action is supposed to press the button that you desire. Indeed, I see you added a mouse click action to your macro. Did it work? I can't tell if it worked because I can't see your application. If it didn't work, you might have the X,Y coordinates incorrect.

If you are finding it hard to get the correct numerical coordinates, you may want to consider a "Click on Found Image" action instead of the action you are currently using. That has its own peculiarities, so I recommend you first work on the Click action that you are currently using.

As @Airy's explained, it did swallow -- the D isn't being passed to the currently active app.

To see the difference in behaviour between Hot Key and USB Device Key triggers, do the following:

  1. Make a new macro called "HK-A", add a single "Beep" action, add a Hot Key trigger and set it to A, disable the macro by unchecking the box above the trigger
  2. Make a new macro called "USB-A", add a single "Beep" action, add an USB Device Key trigger and set it to the A key on your keyboard, disable the macro
  3. Open a new document in TextEdit
  4. Enable the "HK-A" macro, press your keyboard's A key a few times, see (and hear) what happens
  5. Disable the "HK-A" macro
  6. Enable the "USB-A" macro, press your keyboard's A key a few times, see (and hear) what happens
  7. Disable the "USB-A" macro

Spot the difference?