Skip to content

Instantly share code, notes, and snippets.

@0187773933
Created February 6, 2025 01:19
Show Gist options
  • Save 0187773933/179cdd5bbe8f28051e6a4476ee6633b0 to your computer and use it in GitHub Desktop.
Save 0187773933/179cdd5bbe8f28051e6a4476ee6633b0 to your computer and use it in GitHub Desktop.
Types MacOSX Clipboard for Copy/Paste Sync
#!/bin/bash
osascript -e '
tell application "System Events"
set clipboardContent to (do shell script "pbpaste")
repeat with char in characters of clipboardContent
if char is equal to linefeed or char is equal to return then
key code 36 -- Simulates Enter key
else if char is equal to tab then
key code 48 -- Simulates Tab key
else
keystroke char
end if
end repeat
end tell
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment