 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
juhu Guest
|
Posted: Thu Jan 28, 2010 9:43 pm Post subject: Conditionally remap TAB but retain default ALT+TAB |
|
|
Hi all, I've just started using AutoHotKey and so far I'm loving it. However, I've run into a big problem that I can't seem to solve.
If you've ever used OpenOffice Calc, you know that the TAB button functionality isn't exactly the same as in MS Excel. Long story short, in MS Excel, TAB is essentially the same as RIGHT ARROW and that's what I want to port over to Calc.
So I was able to conditionally remap TAB to RIGHT ARROW:
| Code: | #IfWinActive, ahk_class SALFRAME
Tab::Right
|
But once I do that, I lose the default Windows ALT+TAB functionality from within Calc. So I was wondering if there's some way to maybe disable modifiers so that TAB only remaps to RIGHT ARROW when pressed by itself and not when pressed in conjunction with ALT. Thanks in advance! |
|
| Back to top |
|
 |
DevX
Joined: 07 Jan 2009 Posts: 43
|
Posted: Fri Jan 29, 2010 10:06 pm Post subject: |
|
|
You'll have to do it like this
| Code: |
#IfWinActive, ahk_class SALFRAME
Tab::
GetKeyState, CtrlIsDown, Ctrl
GetKeyState, AltIsDown, Alt
GetKeyState, ShiftIsDown, Shift
if ( (CtrlIsDown == "U") && (AltIsDown == "U") && (ShiftIsDown == "U") )
{
Send, {Right}
return
}
return
#IfWinActive
|
|
|
| Back to top |
|
 |
juhu Guest
|
Posted: Sat Jan 30, 2010 12:22 am Post subject: Thanks! |
|
|
| Wow, you are a frickin' genius! I'm no slouch when it comes to programming but I just couldn't get it to work - this is great, thanks again! |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|