I just started using Hammerspoon
. I'm trying to output multiple lines of text by pressing Cmd+Shift+l .
Here is what I have tried so far :
hs.hotkey.bind({"cmd", "shift"}, "l", function()
hs.eventtap.keyStrokes('from sklearn import metrics')
hs.eventtap.keyStroke("return")
hs.eventtap.keyStrokes('from sklearn.cross_validation import train_test_split')
end)
I also tried with inline "\n" and "%\n"
How can I bind a key combination to output multiple lines of text? Or, How can I send a newline character?