Is there a way to disable command-tab in Microsoft Remote Desktop connection for Mac OS X?

15,077

Solution 1

Native within OSX, you can remap existing menu items. If your application has a menu item for CMD+TAB, you are in luck.

For me, I needed to disable (or remap) CMD+W when using Microsoft Remote Desktop (muscle memory would press CMD+W to close a tab within a remote session and would accidentally close my remote session). I originally tried karabiner but it was way overkill for this.

How to remap a command for specific application:

  1. Check your application menus for the command you want. NOTE THE exact COMMAND NAME. RDP Menu options example
  2. Within System Preferences -> Keyboard -> Shortcuts Tab -> App Shortcuts pane -> Click the + button to add new application specific command remap App shortcuts control panel
  3. Create a new remap for your application. Note: The Menu Title has to match exactly to the command you identified in step 1. Creating new App shortcut remap
  4. Enjoy your newly remap/"disabled" key shortcut (remap it to some crazy combo to effectively disable it): Close command remapped to new key combination

To Remap within session (e.g. Make Cmd+Z = Ctrl+Z):

  1. Install AutoHotkey.

  2. Add your custom script file to startup folder, containing your custom mappings (example below).

I find this allows me to work physically on Windows PC using Windows-style shortcuts (e.g. Ctrl+C), and on the Mac (RDP'ed in to Windows) using Mac-style shortcuts (e.g. Cmd+C). I don't remap buttons completely, just the sequences I use and that tends to be narrow enough to not trip over when switching between physical and RDP.

sample.ahk

;Win+Z: Send Ctrl+Z
#z::
Send ^z
return

;Win+s: Send Ctrl+S
#s::
Send ^s
return

;Win(CMD)+W: Send Ctrl+W (Close Window)
#w::
Send ^w
return

Solution 2

Is Option-Tab not working? In RDP from a Mac I have gotten used to using the Option key as my Windows Alt. Using this allows me to maintain the Command key for my Mac hot keys and have the actions for alt register in my RDP window.

Solution 3

Old post, but here's a great solution. Use the mac app Karabiner. https://pqrs.org/osx/karabiner/

It allows you to do several things with remote desktop.

Go to the Change Key tab and look under For Applications

Share:
15,077
Micah
Author by

Micah

Updated on September 17, 2022

Comments

  • Micah
    Micah over 1 year

    On my Mac, I use Microsoft's Remote Desktop app to connect to a Windows box. I can see in the preferences how to map the Command key to Alt, and the Option key to the Windows key, so that the Alt and Windows keys are in the same physical layout on my Mac RDP connection as they are on the actual Windows keyboard. That is, the Alt key (Command) is directly to the left of the space bar, and the Windows key (Option) is directly to the left of that.

    But if I set it up that way, I can't use Alt-Tab on the Windows machine--the Mac intercepts it and treats it as a Command-Tab to switch away from the RDP app. I know some programs are able to prevent this--VirtualBox and VMWare, for instance, let you use Command-Tab as Alt-Tab inside a windows guest. (In fact, one solution to this I had was to use a Windows virtual machine on the mac, only to use that to RDP into another machine!)

    Short of creating a windows virtual machine, is there any way I can get the Mac RDP app to send Command-Tab as Alt-Tab to the remote Windows machine?

  • Micah
    Micah almost 15 years
    Yes, if I map Option to Alt instead of Command, then Option-Tab works as Alt-Tab. But that drives me bonkers! I want the Alt key to be in the equivalent place on the keyboard whether I'm using the Windows box locally, or remotely from my Mac, and that means that Command should be the Alt key. And I want to use the Option key as the Windows key (which works fine--but I want my Alt-Tab!)
  • akf
    akf almost 15 years
    I am with you. If I could correct you just a bit - you want the key next to your space bar on your left thumb + tab to work. On my MacBook Pro, the option key actually has 'alt' written above it!
  • Micah
    Micah almost 15 years
    That's right. My apple full-size keyboard that came with my Mac Pro also has "Alt" written above the option key, and if I plug that keyboard into a Windows box, the Option key becomes Alt and the Command key becomes the Windows key. But, as you say, my fingers want to use the key to the left of the spacebar as Alt. I'll edit the question for clarity...
  • Jakuje
    Jakuje over 8 years
    please, do not link solutions. Rather write the important part here, since after the website disapears, it will not be helpful to anyone.
  • Dave M
    Dave M over 8 years
    The link is to the mentioned app.
  • Chris Beshore
    Chris Beshore over 8 years
    Yup. Link is for convenience.
  • Admin
    Admin over 6 years
    Project appears to be deprecated/abandoned, last comment on the site is: 2013-10-23: CoRD don't seem to work on 10.9 Mavericks. Check back next week. :(
  • myoungjin
    myoungjin about 4 years
    thank you very much! you save me