Skip to content

Instantly share code, notes, and snippets.

@wch
Created September 26, 2012 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wch/3789190 to your computer and use it in GitHub Desktop.
Save wch/3789190 to your computer and use it in GitHub Desktop.
Keyboard input speed test for RStudio
tell application "RStudio"
activate
tell application "System Events"
tell application process "RStudio"
keystroke "t0 <- Sys.time()"
key code 36 using command down
key code 36
keystroke "asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf"
key code 36
keystroke "t1 <- Sys.time(); t1-t0"
key code 36 using command down
key code 36
end tell
end tell
end tell
@wch
Copy link
Author

wch commented Sep 26, 2012

  • Chrome: use "Google Chrome" instead of RStudio.
  • Firefox: use "Firefox"
  • Safari: use "Safari"
  • Sublime Text 2: use "Sublime Text 2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment