Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Alt+Tab remap


  • Please log in to reply
10 replies to this topic
PHew
  • Guests
  • Last active:
  • Joined: --
I would like to remap Alt+Tab to Win+Tab (to get the nice view of Flip-3D available after pressing Win+Tab every time when I press Alt+Tab).

I tried suggestions from here: http://www.autohotke...topic44934.html

But it works as described in user's comment at the end: "I press alt-tab, it gives me a quick glimpse of flip-3d before giving me back my desktop".

Any working ideas?
PHew, Win7Prof, 64-bit

x79animal
  • Members
  • 1021 posts
  • Last active: May 14 2013 04:21 PM
  • Joined: 01 May 2010
edit: nevermind for now

LAlt::LWin

works but you lose your alt key

x79animal
  • Members
  • 1021 posts
  • Last active: May 14 2013 04:21 PM
  • Joined: 01 May 2010
ok i think i found the solution

$*Tab::
Getkeystate, Laltstate, Lalt, P
if Laltstate = D
Send {LAlt up}{LWin down}{Tab}
else
Send {Tab}
return


~$*LAlt up::Send {Lwin up}

bit sloppy but works

PHew
  • Guests
  • Last active:
  • Joined: --
Thanks a lot. It has some side-effects (original Win+Tab no longer works), but I don't care.

The link I sent was wrong, I meant http://superuser.com... ... ke-win-tab, so I'd better post your solution there.

Thanks again,
PHew

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
If you add {Blind} to the beginning of each Send, Win+Tab should continue to work. As a bonus, Alt+Shift+Tab will cycle backwards, as Win+Shift+Tab does.

PHew
  • Guests
  • Last active:
  • Joined: --
Well, now's perfect...

Thank you, experts,
PHew

PHew
  • Guests
  • Last active:
  • Joined: --
OK, I found one more improvement: Alt+Tab (and Win+Tab too, since it's its original behaviour) shows the top window in the foreground, so when you press it just once and release the keys, you don't switch anywhere and get the same window in the foreground.

How can I improve the script to make Alt+Tab immediately switch to the next window if pressed only once? I thought sending another Tab would be enough, but it works just initially - then after I press Tab again I get it scrolled by two windows at a time.

Any ideas? Thanks.
PHew

FIXED
  • Guests
  • Last active:
  • Joined: --
Ok so there was some debate after the original code block was posted as a solution. I have tested all of these ideas and I got the desired effect. Here is the code for the solution with all the problems in this thread solved:

$*Tab::
Getkeystate, Laltstate, Lalt, P
if Laltstate = D 
{
   Send {Blind}{LAlt up}{LWin down}{Tab}
   ifequal FixB, 0, Send {Tab}
   FixB = 1
}
else
   Send {Blind}{Tab}
return

~$*LAlt up::
Send {Blind}{Lwin up}
FixB = 0
return


William
  • Guests
  • Last active:
  • Joined: --
Hey guys!

Hope you are still around and great that you have found a solution for this.

I've been googling for the oppsite thing. I wish to make my Win-tab behave like alt-tab, in the sense that it would switch the windows with just one press as alt-tab does. The reason for this is that my other keyboard has the windows and alt keys switched, and it's irritating to always press the wrong key. I don't care wheter it looks like alt-tab or win-tab, I just press it once and expect the windows to be switched swiftly.

I had a look at the code and couldn't figure out how to reverse it. If anyone is willing to help, it would be greatly appreciated!

jonabru
  • Members
  • 1 posts
  • Last active: Oct 28 2012 08:30 AM
  • Joined: 28 Oct 2012
i want to change my alt+tab and my Win+Tab. can i use the same document for both codes?

traedoril
  • Members
  • 17 posts
  • Last active: Aug 12 2014 12:21 AM
  • Joined: 18 Jul 2012

Find Window Switcher.lnk in C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch .

Copy the The shortcut to somewhere else (I use documents/ahk).

 

Use this script: 

 

#Tab:: Run, "C:\Users\YourUserNameHere\Documents\ahk\Window Switcher"

 

If you are trying to use the app switcher in SetPoint then I suggest this: 

 

^!*0:: Run, "C:\Users\YourUserNameHere\Documents\ahk\Window Switcher"

 

Then in SetPoint Bind the keystroke for app switcher to Ctrl+Alt+Shift+0