AutoHotkey Community

It is currently May 27th, 2012, 4:52 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Win Shift Tab?
PostPosted: February 1st, 2010, 1:59 am 
I am trying to "trap" win-shift-tab (command is windows on OSX hosts):

; This works for win-tab
LWin & Tab::AltTab ; the motherlode, alt-tab!

; This is okay, but not right
LShift & #tab::ShiftAltTab

; This doesn't work at all:
; LWin & shift & tab::ShiftAltTab


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2010, 4:35 am 
Offline

Joined: March 19th, 2009, 5:08 pm
Posts: 548
Location: Texas, USA
Dude! Put your post in [ code ] tags!!! Like this...

Code:
; This works for win-tab
LWin & Tab::AltTab ; the motherlode, alt-tab!

; This is okay, but not right
LShift & #tab::ShiftAltTab

; This doesn't work at all:
; LWin & shift & tab::ShiftAltTab


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2010, 5:12 am 
Offline

Joined: March 19th, 2009, 5:08 pm
Posts: 548
Location: Texas, USA
Now that some saint came along and put your stuff in code tags (bless his soul), we can move on to the problem... modifier keys! Let's comment as we go:

Quote:
Code:
; This works for win-tab
LWin & Tab::AltTab ; the motherlode, alt-tab!

This is good, but I'd use #tab:: instead

Quote:
Code:
; This is okay, but not right
LShift & #tab::ShiftAltTab

Your syntax is not allowed because it uses two conflicting items at the same time (modifier keys and prefix keys). It doesn't seem to throw a compile error, but the keypress combo is never detected. It's nice that prefix keys and modifier keys are both available for use, but this is a drawback to that. In this case, you'll want to stick to modifier keys so use #+tab::

Quote:
Code:
; This doesn't work at all:
; LWin & shift & tab::ShiftAltTab

This doesn't work because prefix keys (aka key combinations) don't allow three keys, only two. Ideally, I think that should work in AHK, so that you could create your own modifier keys (such as the AppsKey, as I am trying to do here: http://www.autohotkey.com/forum/viewtopic.php?t=53971).

I'm not sure if you had any reason for only using LWin, but now it'll override Rwin, too. Chris did say in the pending changes section (http://www.autohotkey.com/changelog/PendingChanges.htm) that he'd like to support key combinations with three keys, but I don't know how far off that is. Additionally, I think it would be cool if some sort of compile-time error was thrown so that you knew you were using prefix (combination) keys and modifier keys in the same statement.

So here's your code:
Code:
#tab::AltTab
#+tab::ShiftAltTab


Correction: that throws compile errors about AltTab and ShiftAltTab (L or R) anybody have a clue on how to get around that?


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Wasn't Being Clear
PostPosted: February 1st, 2010, 12:48 pm 
cameronbaustian, thanks for your help!

This

Code:
 #+tab


doesn't work because it's mapping to alt tab which needs to know about its component keys.

This

Code:
LWin & Tab::AltTab


works because when you let go of tab and then press it again, it repeats the action (or something like that). So I need to solve shift-win-tab just like I solved this (though I have no idea).

True that three keys don't seem to work... other ideas?

Thanks!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 5th, 2010, 3:51 pm 
Offline

Joined: October 6th, 2008, 5:55 pm
Posts: 13
Has anyone figured this out? I'm looking to do the same thing.

Basically I would like my AltTab substitute hotkey combo to reverse direction when I hold shift down the same way that the standard alt-tab key combo does. Would be nice if by default whatever is assigned to AltTab would do ShiftAltTab automatically when shift is held down. So if I assign ...

Code:
<#Tab::AltTab


I would like it to reverse the direction when I press shift. Since AltTab appears to be a special assignment it doesn't seem possible to do this right now. Right?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 5th, 2010, 4:00 pm 
Offline

Joined: March 19th, 2009, 5:08 pm
Posts: 548
Location: Texas, USA
What does the < do? I'm curious about that.

You should be able to do:
Code:
<#Tab::AltTab
<+#Tab::ShiftAltTab


I use the following, and it works well for me:
Code:
;Alt-Tab Replacements (no need to let go of AppsKey)
AppsKey & RShift:: AltTab
AppsKey & Enter::  ShiftAltTab

_________________
Aren't you glad that I didn't put an annoying gif here?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: 0x150||ISO, Yahoo [Bot] and 71 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group