 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
sebastian___
Joined: 05 Oct 2007 Posts: 13
|
Posted: Tue Dec 11, 2007 5:53 pm Post subject: Override a key - please see schematic photo attached |
|
|
Let's say there is this software called IvyGenerator. If you press and held down the RButton a traveling movement occur.
I wanna replace that (remap) with LAlt & MButton.
| Code: | !Mbutton::
Sendinput, {RButton down}
Keywait, Mbutton,
SendInput, {RButton Up}
Return |
That code should do the trick. It is working fine in other software.
The problem here is the IvyGenerator software the moment you press the Alt Button, stops the mouse button from working.
And if I use that code - somehow the software still receives the Alt Button.. Difficult to explain..so I made the following schematic.
 |
|
| Back to top |
|
 |
bmcclure
Joined: 24 Nov 2007 Posts: 446
|
Posted: Tue Dec 11, 2007 8:12 pm Post subject: |
|
|
Your app is probably catching the "Alt Down" key, when you press Alt and before you trigger your AHK hotkey.
This is just an idea, but perhaps you could specify your hotkey as Alt Down
Then, in that hotkey, loop a GetKeyState to check if either the Alt key was released, or the MButton was pressed down, and trigger either your hotkey or send an Alt press to your application.
Unless you expanded the code, it would prevent other Alt+key hotkeys from working though. You could limit the hotkey to only your application.
Maybe there's an easier way to do this, but I just figured I'd chime in  _________________ -Ben
SteamLab
SteamLab Wiki
[Broken] - My industrial music [on GarageBand] |
|
| 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
|