I bought a USB Touchpad which sends specific keycombinations when doing 3 and 4 finger gestures.
For the left and right 3 finger swipe it sends Alt+Tab/Alt+Shift+Tab.
The problem is that when I swipe too long/wide, it starts sending Left/Right additionally.
(Probably to allow a user to browse through all opene applications more easily.)
Anyway, for me it's disturbing, so I'm trying to block Left/Right temporarily right after I perform a 3 finger left/right swipe.
That's the code, but I'm having two problems.
Code: Select all
!+Tab:: ; 3 fingers left-swipe
Send left
blockKeys := 1 ; Block ON
Sleep, 1000 ; After 1 second:
blockKeys := 0 ; Block OFF
;Block_Keys_Temporarily() ; Blocks a list of specified keys for 1 second - FUNKTION DOES NOT WORK
return
!Tab:: ; 3 fingers right-swipe
Send right
blockKeys := 1 ; Block ON
Sleep, 1000 ; After 1 second:
blockKeys := 0 ; Block OFF
;Block_Keys_Temporarily() ; Sperrt eine Liste von definierten Tasten für 1 Sekunde - FUNKTION DOES NOT WORK
return
Block_Keys_Temporarily() ; Blocks a list of specified keys for 1 second - #FUNKTION#
{
blockKeys := 1 ; Block ON
Sleep, 1000 ; After 1 second:
blockKeys := 0 ; Block OFF
}
#if blockKeys ; Block all those keys:
Left::
Right::
return
#if
Problem 2: If I try it with the blocking function, it does not even work when I press Alt+Tab on my keyboard
When I swipe too widely, this will be the result:
lfte
letf
letf
lfte
Instead of left
I don't want that it sends left/right, because it could disturb.
P.S. I also tried it this way, but that was even worse:
Code: Select all
!+Tab:: ; 3 fingers left-swipe
blockKeys := 1 ; Block ON
Send left
Sleep, 1000 ; After 1 second:
blockKeys := 0 ; Block OFF
;Block_Keys_Temporarily() ; Blocks a list of specified keys for 1 second - FUNKTION DOES NOT WORK
return