AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Override a key - please see schematic photo attached

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
sebastian___



Joined: 05 Oct 2007
Posts: 13

PostPosted: Tue Dec 11, 2007 5:53 pm    Post subject: Override a key - please see schematic photo attached Reply with quote

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
View user's profile Send private message
bmcclure



Joined: 24 Nov 2007
Posts: 446

PostPosted: Tue Dec 11, 2007 8:12 pm    Post subject: Reply with quote

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 Smile
_________________
-Ben

SteamLab
SteamLab Wiki

[Broken] - My industrial music [on GarageBand]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group