Remote External Drive How to put microsoft word to work for you Top Tab Extensions for Firefox Convert Files A Minimalist Firefox
Collapsed This Week Collapsed CyberNotes
Collapsed Last Week

AltTab Mouse Shortcut

February 24th, 2008
41 Comments Written by Ryan


Ever since I released the Vista Flip3D mouse shortcut I’ve received a few emails from people who still prefer the Alt+Tab application switching (especially XP users who don’t have Flip3D). I have since modified my Flip3D AutoHotkey script, and spun it into a different variation that works great with the Alt+Tab key combination.

What this standalone (no-install needed) application does is execute the Ctrl+Alt+Tab key combination when you press and hold the left mouse button, and then press the right mouse button. The Alt+Tab application switcher will appear on the screen until you click on one of the windows that you want to switch to:

 AltTab Mouse

This should work in any version of Windows that supports the Alt+Tab key combination, and it can easily be set to start with Windows by placing it in your Startup folder located in the Start Menu. You’ll know this is running when you see the Vista-like orb in the System Tray, and you can temporarily disable the functinoality by right-clicking on the icon. Enjoy!

Here’s the one line of code needed for anyone looking to add this functionality to their own AutoHotkey script:

~LButton & RButton::send, {lalt down}{lctrl down}{tab}{lalt up}{lctrl up}

Download the AltTab Mouse Shortcut

UPDATE: Thanks to the commenters I found out that this script doesn’t work in XP since there is no Ctrl+Alt+Tab command. I’ve created a version that does work with XP, and it can be downloaded here. To use the XP version press and hold the left mouse button while you continue to press the right mouse button to switch between the windows. When you release the mouse buttons you will immediately be switched to the selected window. This version will also work in Vista if you would rather have this behavior over the “click to select” method mentioned above.

RSS Icon Enjoyed the post? Subscribe to our feed to get a daily dose of CyberNet!

Tags: Freeware, Newly Released, Software, , , , , ,

Previous ArticleNext Article
 

Related Posts:


41 Unread Comment Tracking CyberMark This Article
RSS Icon
41

  1. Avatar

    I have a logitech G5 mouse with extra buttons I don’t use outside of gaming… is there anywhere to set this up to use one of those extra mouse keys?

  2. Avatar

    I’m on XP SP2 and it doesn’t seem to be working. At all. In stalled it, opened a host of Explorer windows, apps and my browser…I hold down the left button, then click the right button and nothing happens. Did I read something wrong? Thanks in advance.

  3. Avatar

    My mouse is the Logitech mx510, and it has a button below the mouse wheel that does the same thing without any tweaking. I have had the mouse like 5 years, and game with it every night. Can’t believe how well it has held up.

  4. Avatar

    It doesn’t work at all in WinXP and I’m pretty sure I know why. In WinXP, [ctrl+alt+tab] hotkey does nothing. Can you rebuild it using the [alt+tab] hotkey?

  5. Avatar

    To get the script to work 4 XP heres the code 4 autohotkey:

    ~LButton & RButton::send, {lalt down}{tab}{lalt up}

    Download the .exe here:

    http://tiny.cc/Alt_Tab_Mouse_Script

    Hope it helps!

    -XxDeepxX

  6. Avatar

    Wow guys, sorry about that. I could have sworn that the Ctrl+Alt+Tab shortcut was available in XP as well. Thanks to XxDeepxX for whipping up the XP version, although it doesn’t work quite the way I intended.

  7. Avatar

    Well i think it just switches the windows which are either minimized or maximized, but it works perfectly with 3 windows max… :o

  8. Avatar

    You’re right, XxDeepxX, it only goes back and forth between two windows for me. I even tried not having my windows maximized but it only goes back and forth between the two. Still, it’s a step in the right direction and will definitely come in handy when cross referencing and such. Thanks for workin’ on it.

  9. Avatar

    On the same topic, to switch between tabs in the Opera browser, hold down the right mouse button while scrolling with the mouse wheel.

  10. Avatar

    you can combine this script with TaskswitchXP to get the functionality that the original poster gets in vista. I did have to change the options in tsXP to get it the way I wanted but I’ve been using this same script for months. Guess there is nothing new under the sun.. everythings been done.

  11. Avatar

    ~LButton & RButton::AltTab works exactly like alt tab in autohotkey, and I added ~RButton & LButton::ShiftAltTab to work the opposite way. check it out. It should work like you want.

  12. Avatar

    It doesn’t quite work for me. Sometimes have to right click several times before it switches to different windows. Anyways great concept to make life easier on XP!!

  13. Avatar

    Just keep holding the left button and clicking the right to move the selector in the window and vice versa for the other one.

  14. Avatar

    Press and hold left mouse button while clicking right and vice-versa for the other example should have the same functionality as Alt+Tab/Alt+Shift+Tab. Thanks.

  15. Avatar

    The script by Clarke works, and is better than mine ;)

  16. Avatar

    Thanks 8)

  17. Avatar

    could someone with the know-how please, please make a version which doesn’t respond to rocker gestures (I use these in Opera), but instead to LEFT CLICK + SCROLL? ..and therefore so that it also allows the selection of more than one other window? Thanks :P

    running xp.

  18. Avatar

    I’ve uploaded a modified version of the script and the link is at the end of the article. Thanks to everyone for their help!

    Clarke wrote:
    Press and hold left mouse button while clicking right and vice-versa for the other example should have the same functionality as Alt+Tab/Alt+Shift+Tab. Thanks.

    I’ve created a script before that used the right mouse button first, followed by the left mouse button. I received several complaints because the right-click menu would always appear each time you would use that shortcut, and that’s why I decided against implementing it both ways.

  19. Avatar

    For people who don’t want it to interfere with Opera, just enclose it with two short lines, such as :

    #IfWinNotActive, ahk_class OpWindow
    ~LButton & RButton::AltTab
    #IfWinNotActive

    -B.

  20. Avatar

    Ah, I forgot about the mousewheel request :

    ~LButton & WheelUp::AltTab
    ~LButton & WheelDown::ShiftAltTab

    :-)

  21. Avatar

    nice script :) but is there any chance for someone to code a ram efficient version of this? i mean roughly 6mb of used ram for this only, is a bit too much, especially if you consider that my firewall of choice, which is ultra advanced rocket science in comparison, uses less.

  22. Avatar

    Is Ahk scripting easy?

  23. Avatar

    in case that question in directed at my comment XxDeepxX, I wasn’t talking about easy vs hard, but about complexity. obviously a firewall is in a totally different league in terms of complexity, compared to a script that translates mouse clicks to key presses. i guess there’s no dispute about that, which means that if an advanced firewall is able to fit in less ram than this script, there’s lots of room for improvement. i’m not saying someone write a better ahk script, i was asking if someone was able to code this in a “proper” programming language, because in that case this kind of functionality should fit in a few kb. scripting is nice (i also use it btw), this script works nice too, but i personally just don’t think using scripts in this permanently resident manner is the best way, because it ends up eating a disproportionate amount of ram.

  24. Avatar

    I [heart] your program, but
    (1) My computer is very old and frail, it needs a ram efficient version
    (2) I H8 taskbar icons

    Please bless the world with a version of this program that addresses these concerns.

  25. Avatar

    125 Useful Timesaving Keyboard Shortcuts For Windows XP

    Click here for more details :
    http://www.sacatech.com/ar/key.....ws-xp.html

  26. Avatar

    It’s easy and fast to learn (and to code). Actually, it’s aimed to non-programmers too, and the doc live up to such expectations with its _useful_ exemples.

    @Minimalist :
    Actually, it’s about 6mb since it always launchs the AHK interpreter… either for a one line script or a 2000 one.

    that’s how it’s compiled exe are portables apps, too.

    Which implies that under those same 6mb you could add a whole bunch of many more functions, as you see fit, provided that you either learn some AHK, or just copy-paste some nice code snippets from the autohotkey forums/wiki.

    For exemple, under one script I added functions that I once got from different programs. In other words for you : my system regained far more memory with it than it used to, before ;-)

  27. Avatar

    @John : taskbar button and/or traybar icons are already hiddable in ahk. Again by adding or or two line of code. It’s all in the doc.

    (I’m starting to feel like some PR guy. 8) )

  28. Avatar

    Thanks a lot; this works great!
    (Windows XP SP2 version, at least.)

  29. Avatar
    minimalist wrote:
    nice script :) but is there any chance for someone to code a ram efficient version of this? i mean roughly 6mb of used ram for this only, is a bit too much, especially if you consider that my firewall of choice, which is ultra advanced rocket science in comparison, uses less.

    Takes 428K on my Vista system. I don’t think I can really beat that, and I don’t know what else you could do to optimize it.

  30. Avatar

    No, i wasnt responding to ur comment minimalist :P, i just wanted to know if Ahk Scripting is easy… :D

  31. Avatar

    roger that XxDeepxX, wasn’t sure if your question was genuine or sarcastic, since based on your previous comments you seemed to know something about scripting already ;)
    ryan… your script is just fine, it doesn’t need optimizing to use less ram. like buz said, it’s the ahk interpreter eating up the vast majority of it, which i knew and that’s why i was asking if maybe there’s someone willing & able to make a “real” (as in c++ or similar) app with this functionality, not if someone would make a better script. i personally also use scripts (autoit, not ahk to be precise), but because they need the interpreter to execute, i only use them for actions where they don’t need to be permanently in ram (filling forms for example: i start the script with a hotkey, it then fills the form, closes and does not stay resident).

    vista must report ram usage differently than xp, if 428kb is all that’s shown on your system ryan. admittedly even 6mb doesn’t sound like a lot on today’s machines, but things add up and sooner or later you have to start pruning the less useful “little” helpers, which is why i’m all in favour of as small as possible executables :)

  32. Avatar

    Well, If you want to compile some really low memory app which ties to WinEventHook and you mouse/keyboard, your best choice would probably lies in these pages :

    http://win32assembly.online.fr/tutorials.html

    The clearest and most efficient asm “for windows” tutorials I’ve ever found.

  33. Avatar

    Fantastic, have just downloaded and am using the updated Alt + Tab version and loving it…very useful script.

  34. Avatar

    Hot stuff ;) Firstly didn’t work but the fix came good. Thanks.

  35. Avatar

    Thanks Buz, I downloaded AHK and made it with your code. Unfortunately I’ve had no luck devising a script which does the same thing but with different keyboard keys, such as Alt Gr + O/P for alt-tabbing back and forth. Any ideas?

  36. Avatar

    :evil: McAfee detected the download as a trojan….

  37. Avatar
    eBuddha wrote:
    :evil: McAfee detected the download as a trojan….

    http://www.sophos.com/virusinf.....abotm.html

    TrojanDownloader.Q is the trojan in question. To anyone who has downloaded and installed this app, remove at once, disable system restore, boot into safe mode, do a full av/spyware scan, and check your registry and startup for any unusuall programs. I would also recommend using sone of the Sysinternals stuff to see live registry and process explorer activity. As always try a netstat -a to see if this thing is making outbound connections from your workstation….

  38. Avatar
    eBuddha wrote:
    :evil: McAfee detected the download as a trojan….

    Don’t know why the heck it would think this is a trojan. It’s simply one line of code that I compiled with AutoHotKey, and AutoHotKey definitely isn’t going to be a trojan. Must be a bad virus definition, but if you’re skeptical you can always download AutoHotKey and compile it yourself using the one line of code mentioned above.

  39. Avatar

    Was wondering if you could make a Alt+Esc Mouse Shortcut version of this same program or even better would be a program that has a toggle for either Alt+Tab or Alt+Esc linked to Mouse Shortcut depending on your configuration. Another thing is I get this message when I start the program up which is kind of annoying if there’s a way to fix it that would be handy. Great program btw it’s very helpful.

    An older instance of this script is already running. Replace it with this instance?
    Note: To avoid this message, see #SingleInstance in the help file.

:mrgreen: :| :twisted: :arrow: 8O :) :? 8) :evil: :D :idea: :oops: :P :roll: ;) :cry: :o :lol: :x :( :!: :?:

Note: All links posted in comments will automatically be hyperlinked.

↓ Expand Text Area  or  Decrease Text Area ↑

 Find out how to track new comments!


 

  1. AltTab Mouse Shortcut lets you toggle programs without a keyboard | StartUpToFinish
  2. TPN :: The Global Geek Podcast » Blog Archive » The Global Geek Podcast #79 :: Invaded by the UK