Catch/Read keyboard input

I wanted to make a marco to move to different spaces depending on the inputed number. First I tried this:

However the key also get input into the current app. So I wanted to know how to capture the input instead of waiting for it. Any ideas if this is possible?

1 Like

Use this trigger to monitoring your keyboard input:

Hi @Zaitam, below this post you will find a detailed tutorial with KM macros:

I myself use KM in conjunction with functions of the BetterTouchTool app.


Here is the macro for working with the BTT AppleScript macro:

12)UUID AS <B85F 210307T221109>.kmmacros (25,2 KB)

These are the 2 KM macros you will start the Spaces workflow with:

@_Window Presets Macros <Multi 210307T214154>.kmmacros (5,1 KB)

This is the sub macro to "Switch Window to..."

BTT Spaces :Forum Macros <E688 210307T221019>.kmmacros (25,5 KB)

Lastly, the sub macro to move the apps to another Spaces:

BTT Window:App :Forum Macros <37D7 210307T221033>.kmmacros (25,5 KB)

Thanks for the resource. Didn't think that macros could be so complex. If I have another doubt (How can I merge input from keyboard and mouse, so that when I press a trigger on my mouse if a modifier, like shift, is pressed the action will be different) do I open another post?

Sorry, my English is not so good.
@Zaitam can you describe this to me in more detail (example/macro)?

Yes, I mean to press a keyboard shortcut CMD + C on a keyboard (In reality I will use a mouse) and shift another keyboard. Letting the macro be CMD + SHIFT + C

1 Like

@Zaitam in KM the possibilities for a mouse trigger are limited.

CMD + C:

Hold down the CMD key and move your mouse to the left

Mouse Copy <DB6A 211220T200144>.kmmacros (17,0 KB)

Mouse Copy <DB6A 211220T200144>


Hold down the CMD key and move the mouse to the right

Mouse Paste <1FBD 211220T200510>.kmmacros (15,7 KB)

Mouse Paste <1FBD 211220T200510>

That's why I use BetterTouchTool as a trigger for 95% of my macros. There is much more possible. The KM macros can be executed there as ApplesScript via a BTT gesture :wink: