Skip to content

Commit

Permalink
Delay typing-out on macOS for 250ms, hopefully fixing 'avocado' on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kernc committed Jan 6, 2024
1 parent 8874330 commit ae0a88d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions efck/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,11 @@ def _type_macos(text):
tell application "System Events"
keystroke "v" using command down
key code 124 -- right arrow clears the selection
delay 0.15
end tell
set the clipboard to prev_contents
'''
text = text.replace('"', '\\"')
proc = subprocess.run(['sh', '-c', f"sleep .2 && nohup osascript -e '{_OSASCRIPT.format(text)}' & disown"])
proc = subprocess.run(['sh', '-c', f"sleep .25 && nohup osascript -e '{_OSASCRIPT.format(text)}' & disown"])
return proc.returncode


Expand Down

0 comments on commit ae0a88d

Please sign in to comment.