| View previous topic :: View next topic |
| Author |
Message |
cheek
Joined: 01 Apr 2009 Posts: 2
|
Posted: Wed Apr 08, 2009 2:41 am Post subject: 'Custom Hotkeys' as correct 'chord' behavior? |
|
|
Hi,
I wrote the little script today:
| Code: |
LButton::SendInput {LButton down}
LButton UP::SendInput {LButton up}
~LButton & RButton::SendInput {MButton down}
~LButton & RButton UP::SendInput {MButton up}
|
and was disappointed to see that it did not perform as I had expected. The first key is interpreted as a modifier, like control or alt. Modifier keys are held down prior to the action key and typically released after, as well.
Is it possible to define a hotkey that behaves like a chord? That is, all the keys of the chord are pressed in unison.
I used to have this functionality enabled via a mouse driver setting, but have a new mouse which does not support this configuration.
please help!
~cheek |
|
| Back to top |
|
 |
Icarus
Joined: 24 Nov 2005 Posts: 824
|
Posted: Wed Apr 08, 2009 9:49 am Post subject: |
|
|
Maybe something like this will point you in the right direction?
| Code: |
#SingleInstance Force
return
LButton::
RButton::
BothAreDown := GetKeyState( "LButton" , "P" ) and GetKeyState( "RButton" , "P" )
if( BothAreDown ) {
SoundPlay *64
SendInput {MButton}
}
else
SendInput {%A_ThisHotkey% Down}
return
LButton Up::
RButton Up::
if( !BothAreDown )
SendInput {%A_ThisHotkey%}
BothAreDown := false
return
ESC::ExitApp
|
_________________ Sector-Seven - Freeware tools built with AutoHotkey |
|
| Back to top |
|
 |
|