Apple Script works only with physical keyboard connected (Mojave)
up vote
0
down vote
favorite
I'm trying to activate the Target Display Mode for my iMac (macOS 10.11) using SSH from my MacBook (macOS 10.14). I tried to execute the script via the terminal and Automator.app.
The script is:
osascript -e 'tell application "System Events" to key code 144 using command down'
However, the script only works when my iMac is connected to a physical keyboard. Is there any workaround for using the script without a connected keyboard?
macos automation applescript automator
add a comment |
up vote
0
down vote
favorite
I'm trying to activate the Target Display Mode for my iMac (macOS 10.11) using SSH from my MacBook (macOS 10.14). I tried to execute the script via the terminal and Automator.app.
The script is:
osascript -e 'tell application "System Events" to key code 144 using command down'
However, the script only works when my iMac is connected to a physical keyboard. Is there any workaround for using the script without a connected keyboard?
macos automation applescript automator
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to activate the Target Display Mode for my iMac (macOS 10.11) using SSH from my MacBook (macOS 10.14). I tried to execute the script via the terminal and Automator.app.
The script is:
osascript -e 'tell application "System Events" to key code 144 using command down'
However, the script only works when my iMac is connected to a physical keyboard. Is there any workaround for using the script without a connected keyboard?
macos automation applescript automator
I'm trying to activate the Target Display Mode for my iMac (macOS 10.11) using SSH from my MacBook (macOS 10.14). I tried to execute the script via the terminal and Automator.app.
The script is:
osascript -e 'tell application "System Events" to key code 144 using command down'
However, the script only works when my iMac is connected to a physical keyboard. Is there any workaround for using the script without a connected keyboard?
macos automation applescript automator
macos automation applescript automator
asked Nov 10 at 13:16
Niklas
65
65
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53239327%2fapple-script-works-only-with-physical-keyboard-connected-mojave%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown