Is it possible to disable the command-tab application switcher in Mac OS X Lion?
You can map command-tab to another key combination with Karabiner Elements:
<autogen>__KeyToKey__ KeyCode::TAB, VK_COMMAND | ModifierFlag::NONE, KeyCode::F19</autogen>
This would disable command-tab and shift-command-tab:
<autogen>__KeyToKey__ KeyCode::TAB, VK_COMMAND | ModifierFlag::NONE, KeyCode::VK_NONE</autogen>
<autogen>__KeyToKey__ KeyCode::TAB, VK_COMMAND | VK_SHIFT | ModifierFlag::NONE, KeyCode::VK_NONE</autogen>
You can do it as the assembly level. For ML 10.8.3, this Cmd+Tab registration happens in subroutine at address 0x10000b258. In pseudo-code, it looks like:
rax = CPSRegisterForKeyOnConnection(*(int32_t *)rbx, 0x1002cd078, 0x1, 0x1);
if (rax != 0x0) {
fprintf(**__stderrp, "Error registering cmd-tab key, %d\\n");
}
rax = CPSRegisterForKeyOnConnection(*(int32_t *)0x1002ccda8, 0x1002cd078, 0x2, 0x1);
if (rax != 0x0) {
fprintf(**__stderrp, "Error registering cmd-shift-tab key, %d\\n");
}
So if you replace the following byte codes:
488D35691C2C008B3BBA01000000B901000000E85CD71B0085C0741A488B0DD5FC2400488B39488D355B341C0089C230C0E892C51B00488D0563192C008B38488D352A1C2C00BA02000000B901000000E81FD71B0085C0741A488B0D98FC2400488B39488D3541341C0089C230C0E855C51B00
with:
90909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090
And resign your Dock.app, it will work. You also have to unprotect the Dock binary before you do this as the Dock binary is encrypted.