Is there a way to use keyboard combinations that don't physically exist- I'm running out of combinations

I use a streamdeck and I assign the buttons to combinations created via Keyboard Maestro.

I'm on Macbook Pro so I only have F1 - F12 that physically exist. On Keyboard Maestro it only allows you to assign triggers to physically available keys. But I've already run out of F1- F12.

I want to be able to create imaginary F13-F20 triggers that can be triggered by my streamdeck.

The crux of the question is I'm running out of keyboard combinations, I want to utilize combinations that aren't already assigned by applications, how do I access these with KM if i cant physically trigger them with a physical keyboard.

MacOS has a feature that may help. It's called "Keyboard Viewer" which places a virtual copy of a keyboard on your screen that you can click on. I keep an icon for this feature on my system menu bar. I presume you can configure it to show a large keyboard even if you don't have a large one.

Screenshot 2025-02-15 at 02.46.00

I have been unable to figure out how to get the Keyboard Viewer to show F13 to F20 or any of the extended keys or numeric keypad keys. So this may be a dead end, (unless someone can fix that for us) but I have another idea...

Create eight macros (for F13 to F20) that look like this:

Change "105" to different values for F14โ€“F20:

F14 = 107, F15 = 113, F16 = 106, F17 = 64, F18 = 79, F19 = 80, F20 = 90, and F13=105

Lastly #1, you may want to do a quick check if Shift+F1 generates F13. This used to work on some Macs.

Lastly #2, it's possible to merge the 8 macro idea above into a single macro. So if you like the idea of using macros to solve it, I may provide you with a really short macro with a couple of actions.

Lastly #3, it's possible to permanently modify the Keyboard Viewer with "custom buttons", but in order to make this work you will likely have to temporarily borrow an external keyboard with F13 to F20 keys. But it's actually a very good idea, and I'm going to try it for myself right now.

Yahoo!!, I figured it out. Now I can see this:

Notice the tile says "Keyboard - ISO Large" which I got by opening the Customize window, clicking on "Add Panel" and selecting "Keyboard - ISO Large". Then I had to click on the Save menu item in the panel and it restarted the Keyboard Viewer. Let me know if that works for you.

This has solved a problem for myself that I've had for about a decade. Thanks for helping me solve it.

You can ignore the "AA" at the top of the window. That's a custom button I was using for testing. It almost worked (I was trying to press a function key with it) but from what I've concluded, the Keyboard Viewer generates keys in a way that Keyboard Maestro is unable to intercept. KM can't even intercept basic keys like "A" when they are generated by the Keyboard Viewer. I think I'll tag @peternlewis here because I want him to know about this behaviour.

P.S. This proves that I'm still smarter than Chat-GPT, which told me that this was not possible. But someday I'll be rendered useless.

Have you used something like this to check for unused hotkey combinations ?

If you want to trigger Keyboard Maestro macros from a Stream Deck, you should be using KM Link, not hotkeys.

5 Likes

Instead of typing a key, click the little chevron next to "Type". You will be presented with a drop-down menu, from which you can select, among many other keys, function keys F1 โ€“ F20.

image

There are countless possibilities :slightly_smiling_face: Here are two..

  1. Use the normal number keys 1, 2, 3 ...
    Pressed briefly --> the respective number
    Pressed and hold --> something else

  2. use the distinction between left and right modifiers. For example:
    left โŒ˜ + a --> select all
    right โŒ˜ + a --> something else

This works fine here, with the caveat that the Keyboard Viewer will only "type" keys when you're in a field that accepts text input. Here's an example that worked for me:

Obviously this isn't a movie, but I created the "Type D twice" macro, then with TextEdit frontmost and the Keyboard Viewer onscreen, clicked the "d" key cap in Keyboard Viewer. TextEdit immediately spit out two Ds.

That seems to indicate that Keyboard Maestro can capture the actions from Keyboard Viewer.

-rob.

I re-tested it and now it works for me like it did for you. I'm not sure what I did wrong. Hopefully it will fail in the future so I diagnose what the problem was. But you are right, it works.

In short, this method does work (and is a valid solution) for pressing keys that a Mac doesn't have.

I don't think KM can distinguish between left and right modifiers, either for hot keys or for conditional tests.

@Airy :slightly_smiling_face:

I'm going to need a lot more time to understand what you are implying with links to those macros.

For one thing, those macros are testing for Left/Right on USB Device Keys, not Hot Keys. If you read my post again, you will see that I'm specifically referring to hotkeys, not USB device keys.

Just curious, would the "tapped only twice" or "tapped only 3 times" help?
They have opened up a lot of 'keys' for me.

I also will use the method of putting a small (.3 or so) delay after a hot key press.
Then if no other key is pressed it will execute macro "a".
If control is pressed within the time delay then it will execute macro "b".
If option is pressed within the time delay then it will execute macro "c".
If command is pressed within the time delay then it will execute macro "d".
You can easily see the potential here. I use this method extensively. There are like 16 options with one single hot key.

Maybe that will help
Cheers.

I am reviewing this topic again. It touches upon several overlapping issues, doesn't it? I would like to retrace a few steps...


The OP is using a Stream Deck. :wink:


Was my following suggestion wrong in theory? I would be grateful if someone could correct my misunderstanding, if so.


This is surely the answer.

For the record, though, I am somewhat doubtful that the possibilities of even just function keys F1 โ€“ F12, combined with modifiers, will have been exhausted.

Works here, at least for F20 (extended keyboard, so the only one I haven't got).

You have to do the same "trick" in the SD configurator of course, which is equally easy using the pop-up menu to the right of the "Hotkey" field:

I make it 16 combos, including the unmodified key, so 192 available triggers.

But -- and I think this is a good point made by in the OP -- some applications do use F-keys as shortcuts, but rarely above F12 by default. So limiting their own to F13-20 is a good way to avoid clashes.

1 Like

Thanks for confirming. I just wondered if I had missed something.

Certainly F13-20 are relatively obscure enough to offer a lot of scope.

Amongst the applications that I use, I see that, in the case of F1, one app claims the use of โŒƒ-F1, another, โŒฅ-F1 and a third, โŒ˜-F1; the choice of modifier seems rather arbitrary!

Of course, those combinations could be reallocated by a user. Also, combinations with more than one modifier will surely not be a default in any application. In any case, I was really thinking more generally about combinations of the four modifiers (โ‡งโŒƒโŒฅโŒ˜), beyond the focus on function keys. It is the permutations of modifiers with any conventional key that made me sceptical that the possibilities would be nearly exhausted...

And that is before, using the dropdown menu in the KM Editor, we select the likes of JIS Kana + modifiers as a hotkey! If the use case is such that a key combination does not need to be directly pressed on a keyboard, even more combinations are possible when creating hotkeys.

But you do need to limit yourself to what can also be configured in the Deck. Much the newb at that but it looks the list is limited to "standard extended keyboard", so no JIS.

1 Like

Ah... Well, there are still such options as 16 number pad keys, which gives 256 combinations just with those... Oh, and clear... 272.

1 Like

I am not sure - could this solve your problem?
Capto_Capture 2025-02-20_07-24-16_AM

I find it easier to call macros by name. That way I don't have to remember the key. I associate "trigger macro by name" to a simple keystroke. and make sure that the names of the macros are easy to remember and type.

The streamdeck call call macros by name.

1 Like