MFC Deck Key Command

The MFC Deck Key Command shortcut works with MFC Deck to send keystrokes and keyboard shortcuts to a remote macOS computer. The screenshot below shows a deck for controlling the Mail application in macOS:

A deck tailored for controlling macOS Mail

Adding Credentials

When you first install the shortcut, you’ll be prompted to enter the credentials of the remote macOS computer you wish to control.

Add the host, username, and password (in the credentials dictionary).

NOTE: The password to the macOS computer is stored in the clear. This is a limitation of the Shortcuts app. Do not share the shortcut after configuring it, as it may retain your computer’s credentials.

Configuring the MFC Deck Key Command shortcut

Enabling Accessibility in macOS

The shortcut works by opening an SSH connection to the remote Mac and sending an AppleScript using the shell command osascript.

In order for this shortcut to work, you must enable the following items on your Mac in System Preferences:

Enabling Remote Login

Adjusting Accessibility settings to allow Terminal and System Events to control the Mac

Input Format

Each card’s action runs the shortcut MFC Deck Key Command. The input to the shortcut can follow one of two formats:


Enter a string that is the keyboard shortcut you want to send. For instance:

Case doesn’t matter. Supported modifier keys include:

Additional strings you can enter include:

For instance, this will send the Command-W command to the frontmost application:

Command w

Creating a card to to close the frontmost window on a Mac

Application + Command

Add a line above the command with the exact name of the application you wish to control. For instance:

command n

This will activate the Mail app and send the Command-N keystroke.

Creating a card to to create a new mail message on a Mac


Specify the string input to display a simple interface in Shortcuts for sending arbitrary text to the remote Mac to manually send a keyboard shortcut.

Key Command Input Interface

MFC Deck Shortcuts Gallery