bobo38 / TheCoreLite

TheCoreLite .SC2Hotkeys for many keyboard layouts + infrastructure to convert &check&release from for .SC2Hotkey master seeds
112 stars 38 forks source link

Unable to issue any commands with Alt+Tab+___ in Windows 10 #52

Open dlithio opened 3 years ago

dlithio commented 3 years ago

Is anyone able to use Alt+Tab as a part of any commands in Windows 10? It's not super essential, so I'm not super worried about it - just wanted to see if other people were successfully doing this and if they remembered what they did to get it working.

Some unnecessary detail

The current defaults includes one key combo with Alt+Tab (Camera Center, with a bunch of alternates). It's also mentioned in Control Key Placement that you can switch Capslock for Tab, which would mean that two commands have Alt+Tab as a part of it (ControlGroupAppend6=Control+Alt+Tab and ControlGroupAssign6=Shift+Alt+Tab). I can't get any of these to work in game. I also can't even assign Alt+Tab+anything to a hotkey in the hotkey UI (it always ends up just being Alt+Anything or something like that). Tab works normally though. I've tried:

bobo38 commented 2 years ago

Sorry for late answer

Alt+Tab has many alternates: CameraCenter=Alt+Tab,Alt+CapsLock,Alt+Grave,Alt+Shift Feel free to use anyone you like

This Control Group 6 is one Tab but could be moved. Feel free to do it on your local copy.

I will keep your issue opened, it could be a good update more Windows-user friendly (I'm a Linux player and do not face this Tab issue). I'm not allocating much time to this project anymore as Starcraft II is in sedimentation and i have to allocate time to other topics

therelm commented 1 year ago

I've been trying to get Alt+Tab to work, too. It turns out Windows 10 intercepts that combination of keys at the OS level, with no easy way of disabling this behavior.

What I've done to get it to work is to remap the Tab key to another keycode at OS level (I chose F14), which I then map to yet another (final) key depending on context (e.g. StarCraft or Not StarCraft) using AutoHotkey. For Not StarCraft, I map back to Tab, meaning default behavior including window switching is restored outside of StarCraft.

Lastly you'll have to change all instances of Tab in your SC2 hotkey config to whatever you're having AHK map to when the sc2 window is active. It just can't be Tab or any key already in use by Core Lite. I use I. You can do this manually, or by forking this project and adding your own keyboard layout based on your physical layout, but with Tab replaced by the final key you chose above.

For step 1, use SharpKeys or modify the registry by hand. My replacements are Caps -> F13, Tab -> F14.

Step 2 (example): input.ahk

Step 3 (example): [USQwertyRemap] in KeyboardLayouts.ini.

Confirm that your input.ahk is running before playing. You could add it to autostart.

This process also works great for remapping Caps to something useful which (unlike the default caps keycode) can be assigned in any game (included in my example).