Remote Desktop Connection for MacOS - How to Remap Cmd/Opt keys

Daniel Carmingham 31 Reputation points
2021-06-23T01:18:02.923+00:00

Is there any way to remap keys on the MacOS version of Remote Desktop?

The mapping of the Command and Option keys to the Windows keyboard layout is backwards to every US keyboard layout I can find. (For example, on Apple and Microsoft's own websites at the keyboards they make and sell)

On a Mac keyboard the keys to the left of the spacebar, in order from left-to-right are:

  1. Control
  2. Option
  3. Command

On Windows keyboards/laptops, they are:

  1. Ctrl
  2. Win
  3. Alt

So it would make sense to map in that order, from left to right, wouldn't it?

  1. Control -> Ctrl
  2. Option -> Win
  3. Command -> Alt

Instead, what we have is that the first makes sense, but for some reason these last two are swapped:

  1. Control -> Ctrl
  2. Option -> Alt
  3. Command -> Win

This means that if you, like me, switch between Mac and Windows and RDC from Mac to Windows, the muscle memory is all wrong and you will constantly hit the wrong keys.

This is incredibly frustrating. Is there any way at all to reverse these two keys? I don't need full mapping, just these two keys need to be reversed.

Thank you,
Daniel

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,252 questions
0 comments No comments
{count} vote

Accepted answer
  1. Jenny Yan-MSFT 9,326 Reputation points
    2021-06-23T07:36:57.907+00:00

    Hi,
    Mac keyboard layouts differ from the Windows keyboard layouts. Some of these are Mac specific layouts or custom layouts for which an exact match may not be available on the version of Windows you are remoting into.

    Following are examples for Mac keyboard layouts differ from the Windows keyboard layouts

    • The Command key on the Mac keyboard equals the Windows key.
    • To perform actions that use the Command button on the Mac, you will need to use the control button in Windows (for example Copy = Ctrl+C).
    • The function keys can be activated in the session by pressing additionally the FN key (for example, FN+F1).
    • The Alt key to the right of the space bar on the Mac keyboard equals the Alt Gr/right Alt key in Windows.

    However per further searching, some users shared their experience to map the keyboard like usage of “third party app Karabiner” to customize the keyboard layout.
    https://karabiner-elements.pqrs.org/

    Reference links:
    How would I remap Mac CMD to CTRL keys in Remote Desktop Connection for Mac application?
    https://superuser.com/questions/263647/how-would-i-remap-mac-cmd-to-ctrl-keys-in-remote-desktop-connection-for-mac-appl
    Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.

     

    Hope this helps and please help to accept as Answer if the response is useful.

    Thanks,
    Jenny

    0 comments No comments

9 additional answers

Sort by: Newest
  1. Dan Mundy 0 Reputation points
    2023-01-20T00:21:08.9466667+00:00

    Anyone else struggling with this may want to check out the setting I just found in the Preferences for Microsoft Remote Desktop application:

    "Use Mac shortcuts for copy, cut, paste and select all, undo, and find"

    It doesn't completely swap Command and Windows keys, but does at least stop the constant frustration of Command-V not working :)

    0 comments No comments

  2. Daniel Fransson 0 Reputation points
    2023-12-14T10:00:54.17+00:00

    I had the same problem, but I think I might have solved it for my exact use case (Windows muscle memory, Windows at work, Mac at home, remote into the Windows machine from Mac). It might appear to be a lot of tweaks, but they are actually not that revolutionary.

    Prerequisites

    • AltTab.app installed on the Mac. This is an app that makes the window switching work like in Windows (see point 2 below).
    • AutoHotkey installed on the Windows machine you remote into (see point 3 below).

    Step 1

    Since Cmd on Mac is more or less Ctrl and the rest of the function keys are in the same sequence as in Windows, you can move the function keys one step to the right in the Mac system settings. This will make the Mac behave more or less like a Windows machine.

    • Control key = Fn/globe action
    • Option key = Control action
    • Command key = Option action
    • Fn/globe key = Command action (leftmost function button, like Ctrl in Windows)

    Step 2

    The problem is that you can’t change the shortcut for switching apps to Option + tab in system settings (Cmd key now behaves as Alt). This (and other stuff) can be remedied with the AltTab app. Set up a shortcut that switches between all windows with Option + tab. It is pre-configured in the app, you just need to change the hotkey to Option + tab instead of Cmd + tab. Now the Mac shortcuts behave like Windows, in general. You will find some differences that you can fix in the Mac system settings if they are annoying enough.

    Step 3

    Now, the next problem is that the Use Mac shortcuts for copy, cut, paste, select all and find in the MS RDC client doesn’t seem to do anything. No difference whatsoever whether it’s checked or not. Ctrl on the remote Windows machine is now the Option key, and Fn/globe (Ctrl/Cmd) behaves like the Win key on the remote machine. Had it worked, it seems to be what we all wanted. This is where AutoHotkey comes into play. You want to remap the Windows key to Ctrl. Since AutoHotkey runs on the Windows machine it won’t mess up the mapping on the Mac that you did in step 1. What took me some time to figure out was that Windows interprets the Cmd key as the right Windows, not left which seemed natural to me :). Add this to your AutoHotkey script file (with a descriptive comment).

    ; Remaps the Win key to Ctrl when using MS RDC from a Mac.
    RWin::Ctrl
    

    Now, enjoy selecting entire words with Ctrl + shift on both your Mac and a remote Windows machine!

    Notes

    • You might want to add the AutoHotkey script to a separate script file that you only run when you remote into the Windows machine. Otherwise you probably want to comment it out when you are on your Windows machine.
    • Image 1: Mac keys remapping (in Swedish, but you'll get the point).

    User's image

    • Image 2: AltTab setup (in Swedish, but you'll get the point).

    User's image


  3. Slasheal 5 Reputation points
    2023-11-03T10:23:26.35+00:00

    I'm surprised that microsoft isn't able to provide a better alternative.
    Using RDC from my Macbook is a pain and it shouldn't be.

    1 person found this answer helpful.
    0 comments No comments

  4. robotlearn 0 Reputation points
    2023-06-05T01:23:22.44+00:00

    +1 for the original poster.

    If you plug an Apple keyboard into a Windows PC, the CTRL key will act as 'CTRL' and CMD will act as WINKEY.

    This is absolutely what should happen in the macOS RDP client. At the very least, there should be an easy way to toggle the silly 'swapping' OFF.

    I am a programmer who regularly switches between macs and PCs, often several times a day. I have my mac(s) set up so that CTRL and CMD are swapped, so I can use both OSs and copy/paste correctly.

    But now if I RDP into Windows from a Mac, The CTRL key doesn't act as 'CTRL' in WINDOWS - which makes absolutely no sense, and it's insanely frustrating.

    0 comments No comments