Created
February 6, 2025 01:19
-
-
Save 0187773933/179cdd5bbe8f28051e6a4476ee6633b0 to your computer and use it in GitHub Desktop.
Types MacOSX Clipboard for Copy/Paste Sync
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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