Jump to content


Alt+tab mapping isn't working anymore in Windows 8


  • Please log in to reply
10 replies to this topic

#1 guestx

guestx
  • Guests

Posted 15 September 2012 - 04:15 PM

I tried all sorts of scripts and commands it just won't work in Windows 8. Physical keys work fine. Mapping them to another key won't work.

This isn't just in autohotkey it happens in other software like my driver software by Logitech that still hasn't been updated for windows 8.

#2 Wingfat

Wingfat
  • Members
  • 932 posts

Posted 19 September 2012 - 08:13 PM

Hey, I had the same problem with Win 8 and I found a little workaround for myself.
You can still toggle between the windows but I didn't found a way to show the AltTab menu.
It's possible if you use

LAlt::AltTabMenu

xyz & Alt::AltTabMenu

You can try to use your mouse software to map a button to Alt (that's what I did) or use AHK to do this.




#3 guestx

guestx
  • Guests

Posted 24 September 2012 - 11:23 AM

Then you lose function of Alt key. I'm not happy with that. I'm wondering what has been changed in Windows 8...

#4 Wingfat

Wingfat
  • Members
  • 932 posts

Posted 24 September 2012 - 03:40 PM

wouldnt this work then:
~LAlt & z::AltTabMenu
~doesnt supperss the function of the key
so now, Left Alt + letter Z should make it launch..

#5 guestx

guestx
  • Guests

Posted 30 September 2012 - 08:21 AM

That last example doesn't work either.

#6 Lexikos

Lexikos
  • Administrators
  • 8846 posts

Posted 27 October 2012 - 05:14 AM

Setting UIAccess=true in the executable's embedded manifest appears to solve this problem. The executable must also be in a trusted location, such as the Program Files folder. For more information and a script which makes the necessary modification for you, see EnableUIAccess.

Thanks to Cliff Smolinsky for posting the following on the Synergy issue tracker:

A number of security changes have been implemented in Windows 8 which prevent programs which are not Metro apps from injecting keys that would remove you from the Metro environment. The way this works is that the keyboard shortcut is ignored if it doesn't come from a physical keyboard or a program that has the appropriate permissions. [...] In order to have the proper permissions, the program must be built with UIAccess (see http://msdn.microsof...y/ms742884.aspx).


I was unable to confirm this via any official source, aside from the following vague comment at MSDN:

An accessibility application can use SendInput to inject keystrokes corresponding to application launch shortcut keys that are handled by the shell. This functionality is not guaranteed to work for other types of applications.



#7 knaif

knaif
  • Members
  • 1 posts

Posted 27 October 2012 - 09:51 PM

Alt-Tab simulation is a problem for Windows 8This could help http://social.msdn.m...1d2001e2d0dalso

Now I am using SetWindowsHookEx(WH_KEYBOARD_LL, MyTaskKeyHookLL, ...) to hook system keys (Win, Alt+TAB). Function MyTaskKeyHookLL located in separate DLL and works in separate thread.However, MyTaskKeyHookLL catches ALT and TAB presses and releases. It seems that window switching works before hooking.


http://www.autohotke...ative-programs/ doesn't help now, because 1). you still can't sign autohotkey compiled exe file and 2). loading EnableUIAccess.ahk will lead to #Include file "" cannot be opened. 3). edit in EnableUIAccess.ahk #Include <Cert.ahk> into #Include Cert.ahk will solve "2)." but will lead to another warning
I have no idea how configure Compatibility Administrator for allowing use Alt-Tab for my script

In win8 you need to handle alt-tab as SendSAS();

at http://social.msdn.microsoft.com/Forums/en-US/windowsaccessibilityandautomation/thread/4b6dbc43-a026-4957-9178-91d2001e2d0d

We could develop/use Windows apps now, because #{Tab} works instead of !{Tab} (#{Tab} = "Windows key + Tab" -Cycles through Metro style apps; !{Tab} = "Alt + Tab" - Cycle forward through open windows )

#8 Lexikos

Lexikos
  • Administrators
  • 8846 posts

Posted 27 October 2012 - 10:33 PM

1). you still can't sign autohotkey compiled exe file


AutoHotkey_L compiled exe files can be signed. However, you still need to put it in a trusted location (i.e. Program Files).

2). loading EnableUIAccess.ahk will lead to #Include file "" cannot be opened. 3). edit in EnableUIAccess.ahk #Include <Cert.ahk> into #Include Cert.ahk will solve "2)." but will lead to another warning


You are using the wrong version of AutoHotkey.

#9 webtax

webtax
  • Members
  • 2 posts

Posted 31 October 2012 - 01:30 AM

anybody made it work? i need to to assign alt tab to a mouse button in setpoint trough uberoptions and autohotkey, but i'm a little lost in what i have to do with AHK and win8

#10 luizhrocha

luizhrocha
  • Members
  • 73 posts

Posted 01 November 2012 - 12:47 AM

Having the same problem here. Can someone capable solve this??

#11 webtax

webtax
  • Members
  • 2 posts

Posted 21 November 2012 - 06:26 AM

ok, so i thought i should bite the bullet and go ahead. It's working now and it wasn't that difficult (it's just that i'm new to autohotkey)


1. First, make sure your autohotkey script is working alright in seven. I was using alt-tab to cycle between the last two applications, so my script was like this:
 



F13::
{
send,{lalt down}{tab}
sleep 10
send, {lalt up}
Return
}


 

Pretty simple, then setpoint (with uberoptions installed) calls F13 and that does the magic.

2. Install autohotkey on win8 inside program files, express install will do.

3. Go to Lexiko's post about enabling ui access, download and run the script at the bottom of the first post. Follow the instructions. It should create a new autohotkey.exe, replace yours with it.

4. Execute the script. it should work now.

edit1: it still doesn't work on some windows, being those admin windows like task manager and regedit. I'll have to see if there's a way around this.
edit2: it doesn't work if you do the enablelua registry hack, soif you want to reduce UAC warnings and have this fix together, you may have to do something like this

 

edit3: make sure to run setpoint with administrative rights, that fixes the alt tabing on admin windows. (task manaher-startup- right click setpoint- properties- compatibility- run this program as administrator)