Hammerspoon - how to paste text?

1.5k Views Asked by At

I can't find it in the docs - how do i paste text with Hammerspoon on OS X?

I tried the following:

hs.hotkey.bind({"ctrl", "pad1"}, "1", function()
    hs.eventtap.keyStrokes("this needs to be pasted!")
end)

but it does not work.

I pressed "control" and Numpad's "1" on my keyboard.

Thanks for help!

1

There are 1 best solutions below

0
On

I found out how it works, the keybinding was wrong.

hs.hotkey.bind(
    {"ctrl"}, "Pad1", function()
        hs.eventtap.keyStrokes("asd") end
    )

Thank you all for helping.