Jump to content

need help with key press

Recommended Posts


i would like to have a script, that disable a specific (not all) key while another key is pressed.


if key A is pressed then

disable key B

end if

thanks alot. :(


This blockes the "b" key if the "a" key is used before the "b" key. The only thing is that it blockes the key until the script is closed. I hope this helps.

While 1
        Case _IsPressed(41); 41 is the hexkey for the letter "A" 
            HotKeySet("b","_blockB"); If a key is set as a hotkey
        ;then the key only does the function it is set to.

Func _IsPressed($hexKey)
Local $aR, $bRv
$hexKey = '0x' & $hexKey
$aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey)

If $aR[0] <> 0 Then
    $bRv = 1
    $bRv = 0

Return $bRv
Func _BlockB(); a funtion that does nothing, just used for the hotkey.
Edited by quick_sliver007


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...