├── OfficeKeyFix.cpp └── README.md /OfficeKeyFix.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int main(int argc, wchar_t* argv[]) 8 | { 9 | //Build Array Of Keys To Unregister 10 | //These map to W, T, Y, O, P, D, L, X, N, and Space, respectively. 11 | UINT offendingKeys[10] = { 0x57, 0x54, 0x59, 0x4F, 0x50, 0x44, 0x4C, 0x58, 0x4E, 0x20 }; 12 | 13 | //Kill Explorer 14 | system("taskkill /IM explorer.exe /F"); 15 | 16 | //Register hotkeys with modifiers and keys 17 | for (int i = 0; i < 10; i++) { 18 | RegisterHotKey(NULL, i, 0x1 + 0x2 + 0x4 + 0x8 | MOD_NOREPEAT, offendingKeys[i]); 19 | } 20 | 21 | //Register hotkey with only modifiers, no keys 22 | RegisterHotKey(NULL, 10, 0x1 + 0x2 + 0x4 + 0x8 | MOD_NOREPEAT, NULL); 23 | 24 | //Restart Explorer 25 | system("start C:/Windows/explorer.exe"); 26 | 27 | /* Sleep for a few seconds to make sure Explorer has time to 28 | attempt to register the Office hotkeys, and get blocked by 29 | our hotkeys */ 30 | std::this_thread::sleep_for(std::chrono::milliseconds(4000)); 31 | 32 | //deregister hotkeys by ID 33 | for (int i = 0; i < 11; i++) { 34 | UnregisterHotKey(NULL, i); 35 | } 36 | 37 | return 1; 38 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OfficeKeyFix 2 | 3 | Unbinds the Office Key (Shift+Control+Alt+Win) related shortcuts, allowing you to use Office+W in other applications. 4 | 5 | Full list of unbound shortcuts and their original behavior (`Office` means `Shift+Control+Alt+Win`): 6 | - `Office`: Opens Office UWP app 7 | - `Office+D`: Opens OneDrive 8 | - `Office+L`: Opens LinkedIn by opening `https://go.microsoft.com/fwlink/?linkid=2044786` (which redirects to `https://www.linkedin.com/?trk=Officekey`) in the default browser 9 | - `Office+N`: Opens OneNote for Windows 10 UWP app 10 | - `Office+O`: Opens Outlook 11 | - `Office+P`: Opens PowerPoint 12 | - `Office+T`: Opens Teams by opening `https://go.microsoft.com/fwlink/?linkid=2044782` (which reditects to `https://teams.microsoft.com/`) in the default browser 13 | - `Office+W`: Opens Word 14 | - `Office+X`: Opens Excel 15 | - `Office+Y`: Opens Yammer by opening `https://go.microsoft.com/fwlink/?linkid=2044904` (which reditects to `https://www.yammer.com/`) in the default browser 16 | - `Office+Space`: Opens the emoji picker 17 | 18 | You'll need to compile the script into a binary, and place it in `C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup` so it will run on startup. There is a good guide for this here: https://github.com/anthonyheddings/OfficeKeyFix/issues/1#issuecomment-610310521 19 | --------------------------------------------------------------------------------