Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save plasmacel/febee3cdf01a59d7161e8bd8a26d25a0 to your computer and use it in GitHub Desktop.

Select an option

Save plasmacel/febee3cdf01a59d7161e8bd8a26d25a0 to your computer and use it in GitHub Desktop.
Windows App (Microsoft Remote Desktop Client) on-board keyboard mapping for macOS (without karabiner) -> see README.md for details.

Getting started

Simple keyboard mapping for macOS users of the Windows App.app with no need of external programms like karabiner.

Default mappings:

Action macOS Windows From
Select all CMD + A CTRL + A Microsoft
Copy selected CMD + C CTRL + C Microsoft
Find string CMD + F CTRL + F Microsoft
Paste from clipboard CMD + V CTRL + V Microsoft
Cut selected CMD + X CTRL + X Microsoft
Undo CMD + Z CTRL + Z Microsoft
Redo CMD + Shift + Z CTRL + Shift + Z Additional
Save CMD + S CTRL + S Additional

Hint: Users with a non US keyboard may have to switch some keys. For example German keyboards have to replace Z with Y. If you use Dvorak instead of QWERTY you can also set layout name to <layout name="com.apple.keylayout.Dvorak">.

Download here: https://apps.apple.com/de/app/microsoft-remote-desktop/id1295203466

1. Change keyboard mode

Make sure that the keyboard mode is set to unicode. Go to menu and activate Connections > Keyboard Mode > Unicode.

2. Replace config file

Path to file: Applications > Windows App.app > Contents > Resources > Keyboard > ClipboardActionTransformations.xml

3. Add your own key shortcuts

You can add more shortcuts if you want. For example add the transform tag below to tranformations tag inside the default layout. This will open a print diaglog in common programs.

<?xml version="1.0" encoding="utf-8" ?>
<!-- transformation for clipboard actions (cut copy paste) -->
<!-- layout specific -->
<layouts>
    <!-- the default is US keyboard physical position for X C V -->
    <layout name="default">
        <transformations>
            
            ...
            
            <!-- Command+P to Control+P -->
            <transform>
                <from command="1" key="P" />
                <to control="1" key="P" />
            </transform>
            
            ...
            
        </transformations>
    </layout>
</layouts>

Hint: Besides command and control, shift is also available. Set shift="1" in a from or to tag.

<?xml version="1.0" encoding="utf-8" ?>
<!-- transformation for clipboard actions (cut copy paste) -->
<!-- layout specific -->
<layouts>
<!-- Dvorak X C V are not on same physical position as on US keyboard. -->
<layout name="com.apple.keylayout.Dvorak">
<transformations>
<!-- Command+X to Control+X -->
<transform>
<from command="1" key="B" />
<to control="1" key="B" />
</transform>
<!-- Command+C to Control+C -->
<transform>
<from command="1" key="I" />
<to control="1" key="I" />
</transform>
<!-- Command+V to Control+V -->
<transform>
<from command="1" key="Period" />
<to control="1" key="Period" />
</transform>
<!-- Command+A to Control+A, the A in dvorak is in the same position as in qwerty -->
<transform>
<from command="1" key="A" />
<to control="1" key="A" />
</transform>
<!-- Command+Z to Control+Z -->
<transform>
<from command="1" key="Slash" />
<to control="1" key="Slash" />
</transform>
<!-- Command+F to Control+F -->
<transform>
<from command="1" key="Y" />
<to control="1" key="Y" />
</transform>
</transformations>
</layout>
<!-- the default is US keyboard physical position for X C V -->
<layout name="default">
<transformations>
<!-- Command+X to Control+X -->
<transform>
<from command="1" key="X" />
<to control="1" key="X" />
</transform>
<!-- Command+C to Control+C -->
<transform>
<from command="1" key="C" />
<to control="1" key="C" />
</transform>
<!-- Command+V to Control+V -->
<transform>
<from command="1" key="V" />
<to control="1" key="V" />
</transform>
<!-- Command+A to Control+A -->
<transform>
<from command="1" key="A" />
<to control="1" key="A" />
</transform>
<!-- Command+Z to Control+Z -->
<transform>
<from command="1" key="Z" />
<to control="1" key="Z" />
</transform>
<!-- Command+F to Control+F -->
<transform>
<from command="1" key="F" />
<to control="1" key="F" />
</transform>
<!-- Command+S to Control+S (added) -->
<transform>
<from command="1" key="S" />
<to control="1" key="S" />
</transform>
<!-- Command+Shift+Z to Control+Y (added) -->
<transform>
<from command="1" shift="1" key="Z" />
<to control="1" key="Y" />
</transform>
<!-- Command+T to Control+T (added) -->
<transform>
<from command="1" key="T" />
<to control="1" key="T" />
</transform>
<!-- Command+P to Control+P (added) -->
<transform>
<from command="1" key="P" />
<to control="1" key="P" />
</transform>
<!-- Command+N to Control+N (added) -->
<transform>
<from command="1" key="N" />
<to control="1" key="N" />
</transform>
</transformations>
</layout>
</layouts>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment