I just tried a snippet of code with a very nasty outcome.
tell application “System Events”
key down comand
keystroke “v”
end tell
(I didn’t put this in the Applescript BBCode for obvious reasons.)
Aparently without the key up line, my system behaves as if the command key is held down, in every app! including the Dock!
I had to restart to restore sanity. I got the snippet from a compile script, and have since searched for the keywords and have not found them anywhere.
Model: Early 2011, 15", MacBook Pro
AppleScript: 2.5.1
Browser: Safari 536.26.17
Operating System: Mac OS X (10.8)
Yes, thanks, thats what I normally use.
I’m just surprised that I don’t see key down in the AS Language Guide, the System Events dictionary or a search on this site.
I have this script, (chmod to u+x killsysevents), in my script folder for the hope of executing it when such things happens. Activity monitor is also open at all times, sometimes I manage there. (When control is down.)
I try those two things before I give up and log out. (Pressing shift and Q should have made you just log out, but I don’t know if the keyboard really gets reset by logging out.