Send key up while blockinput is on
-
- Posts: 296
- Joined: 07 Nov 2020, 08:37
Send key up while blockinput is on
Hey
How can I send key up while blockinput is on? AHK will "lost track" of the key state if it's up during a blockinput.
Thanks
How can I send key up while blockinput is on? AHK will "lost track" of the key state if it's up during a blockinput.
Thanks
Re: Send key up while blockinput is on
Hallo,
this will release of all pressed keys:
this will release of all pressed keys:
Code: Select all
Loop, 0xFF
IF GetKeyState(Key:=Format("VK{:X}",A_Index))
SendInput, {%Key% up}
-
- Posts: 296
- Joined: 07 Nov 2020, 08:37
Re: Send key up while blockinput is on
Can you help me implement it into the following code? The end goal is to get the "if getkeystate" catch a rbutton up that can occur before it.
Code: Select all
!RButton::
If (A_Cursor = "SizeNS")
{
BlockInput, On
While (A_Cursor = "SizeNS")
MouseMove, 3, 0,, R ; RButton can be released here
Sleep 10
If !GetKeyState("RButton", "P") ; This wont receive the released signal is it was released before
Msgbox Release catch
Click, Down
BlockInput, Off
KeyWait, RButton
Click, Up
}
Return
Re: Send key up while blockinput is on
Use:
The manual says:
BlockInput, On Disables the user's ability to interact with the computer via keyboard and mouse.
This means that all keys and buttons should have been physically released beforehand. If this was not the case, problems may occur.
Do not block the disturbing inputs of the user but compensate them.
For example, instead of a series of relative MouseMoves, use a series of absolute ones along a given path.
Code: Select all
!RButton Up::
KeyWait, Alt
…
BlockInput, On Disables the user's ability to interact with the computer via keyboard and mouse.
This means that all keys and buttons should have been physically released beforehand. If this was not the case, problems may occur.
Do not block the disturbing inputs of the user but compensate them.
For example, instead of a series of relative MouseMoves, use a series of absolute ones along a given path.
-
- Posts: 296
- Joined: 07 Nov 2020, 08:37
Re: Send key up while blockinput is on
It's not solving the problem, I have to use a relative mouse move and a blockinput, I tried all other ways so far.
Re: Send key up while blockinput is on
(You have to ... ? Yes, living a self-determined life is not for everyone.)
Try to see the difference:
Try to see the difference:
Code: Select all
q:: ;series of relative MouseMoves
While GetKeyState(A_ThisHotkey, "P")
MouseMove, 3, 0,, R
Return
w:: ;series of absolute MouseMoves along a given path
MouseGetPos, X, Y
While GetKeyState(A_ThisHotkey, "P")
MouseMove, X+=3, Y
Return
-
- Posts: 296
- Joined: 07 Nov 2020, 08:37
Re: Send key up while blockinput is on
I don't understand, it's still not preventing RButton from getting stuck