40

I really love my Mac, but I hate how it destroys my muscle memory from the Windows keyboard I use at work. I want to remap the modifier keys to be as "Windows-keyboard-like" as possible.

I was wondering if it was possible to change the keys that open the command-tab box, and also remap the control-tab key combo.

Since I switched Control and Command keys, command-tab box opens with control-tab. Cycling through tabs is now done with command-tab. Is it possible to cycle through tabs with control-tab and open the command-tab box with option-tab?

Daniel Kats
  • 1,041

6 Answers6

16

Use KeyRemap4MacBook:

`

⌥⇥ is already used for inserting tabs in text fields, entering outline mode in TextEdit, and focusing elements in Safari.

Adding this to private.xml would change ⌘⇥ to ⌃⇥ and ⇧⌘⇥ to ⌃⇧⇥:

<autogen>__KeyToKey__ KeyCode::TAB, VK_COMMAND | ModifierFlag::NONE, KeyCode::TAB, ModifierFlag::CONTROL_L</autogen>
<autogen>__KeyToKey__ KeyCode::TAB, VK_SHIFT | VK_COMMAND | ModifierFlag::NONE, KeyCode::TAB, ModifierFlag::CONTROL_L, ModifierFlag::SHIFT_L</autogen>

You can change the shortcuts of menu bar items from System Preferences:

Lri
  • 42,502
  • 8
  • 126
  • 159
7

Since the answers in this thread is now a bit old and KeyRemap4MacBook doesn't exist anymore, I will give you an update that works:

  • Get Karabiner Elements
    • Go to the Preferences, Tab "Complex Modifications"
    • Add rule, Import more from the internet
    • On the website that opens search for "Exchange Command+Tab (generally 'cycle through applications') and Control+Tab (generally 'cycle through tabs')", Install
    • Back in Karabiner, you will see the imported rule, enable it

But as some others have pointed out, if you're planning on switching to Mac for good, it might be a better idea to go through an initial frustrating learning phase, as you will build new muscle memory, that works for your mac, without loosing the one for Windows, as you probably have different keyboards, the different haptic will help with that.

6

I think this is exactly what you are looking for: https://alt-tab-macos.netlify.app/

The app called "Alt-Tab" (Mac OS) will mimic what happens on Windows when you hit the keys ALT and TAB, i.e. it will display an overview of opened applications as tiles, and allow you to switch between them.

ps: Very old post, I know, but this may be useful for many even today ;)

3

When I first got a Mac, I tried to do this, too. It doesn't work, because there isn't a one-to-one correspondence; that is, the Option key doesn't always correspond to the Alt key.

When I was in college, we still used mechanical typewriters. I had two typewriters, one for each language I used. After a while, I had no difficulty switching between the two even though the layout was different.

The best thing to do is just get used to the Mac. You'll develop bilingual muscle memory.

Ken
  • 47
  • 1
1

I would recommend to take a closer look at free tool AltTab: https://github.com/lwouis/alt-tab-macos/

You may get the latest release there: https://github.com/lwouis/alt-tab-macos/releases

0

I used a combination of:

  • Swapping the modifier keys in System settings from ⌃ ⌥ ⌘ to ⌘ ⌃ ⌥
  • Using Alt-Tab as per above with brew install --cask alt-tab
  • Remapping Cmd-Tab to Send Ctrl-Tab with hammerspoon:
-- =============================================================================
-- remaps: ⌘+Tab → Ctrl+Tab and ⌘+⇧+Tab → Ctrl+⇧+Tab

local eventtap = hs.eventtap local eventTypes = eventtap.event.types local keycodes = hs.keycodes.map

local function remapCmdTab(event) local keyCode = event:getKeyCode() local flags = event:getFlags()

-- Only intercept if Command is held and Tab is pressed if keyCode == keycodes["tab"] and flags.cmd then -- Remove Command, add Control flags.cmd = false flags.ctrl = true event:setFlags(flags) return false -- Let the modified event pass through end

return false end

-- Global event watcher: DO NOT make it a local variable, or hammerspoon will freeze randomly CmdTabWatcher = eventtap.new({ eventTypes.keyDown }, remapCmdTab) CmdTabWatcher:start()

  • This does still leave some few discrepancies, mainly: the Ctrl-keys in terminal ; word-based cursor movement ; and history back/forward. An alternative approach without global modifier remapping is at github.com/zhou13
eddygeek
  • 191