Launch Calculator scancode abbreviation

I’m trying to put NumLock and launch calculator actions on the same key via macro, but I don’t see a scancode abbreviation for the calculator in the ref manual. Is there any way to enter launchCalculator or launchEmailClient using macro commands, instead of key actions? Or can we somehow manually enter actual scancodes in macros?

Hoping for something like the following, which I don’t think is possible because it looks like you can only use the key action drop-down menu to select “Launch Calculator”.

ifShift tapKey numLock
ifNotShift tapKey launchCalculator

See this article. You need to send consumer page code 192, so I think you need to enter ‘m192’ in the box.

Actually, 192 is the hex code, but you have to enter a decimal number. So it’s ‘m402’. When I just tried that in Agent, I realised that this is actually converted and shows up as “Launch Calculator” in the popup.

So then I realised it’s even easier. You can just select it from the list; you don’t have to remember the code :smirking_face:


After going through all of this I finally realised what you are really asking: Is there a macro command to send this scancode?

I don’t know how you could directly send this scancode out of macro commands.
BUT: You can combine macro commands and keypress actions in one macro:

This types c when tapped and launches the calculator when held.

2 Likes

Thanks! This is the direction I needed. I never would’ve figured that out. I spent an embarrassing amount of time trying to figure out a way to mix macro commands and keypress actions. I wasn’t even close :sweat_smile:.

Glad I could help.

In my example, you could probably just do the one-liner command ifNotHold final tapKey c followed by the Keypress action below.

2 Likes

Even better, thanks again! :smiling_face_with_sunglasses:
I went with ifNotDoubletap final tapKey numLock, that way double-tapping turns on numlock and launches the calculator together.

That’s a pretty cool use of the side effect of the DoubleTap detection (that it triggers the single tap first). Nice!

1 Like