Autohotkey long key press through Chrome remote desktop

Get help with using AutoHotkey and its commands and hotkeys
talde
Posts: 3
Joined: 24 Jan 2021, 16:06

Autohotkey long key press through Chrome remote desktop

Post by talde » 24 Jan 2021, 16:20

Hi all,
I have a internet camera with TILT control (moving left and right) connected to my PC. the SW comes with mouse control , so there is a "right" and "left" area in SW screen and when pressed with mouse left click on these areas, it moves the camera left or right. single click moves one step and long click moves the camera continuously until I release the mouse left click
I wanted to control it using keyboards arrows so I did this (only leeft arrow as example, I have the same for all directions):

Code: Select all

Left:: 
Click , Left,Down, 1190,158
KeyWait Left 
Click , Left,Up, 1190,158
Return 
[Mod edit: [code][/code] tags added.]
this means that until I release the left arrow key it is as if the mouse left click is pressed continuously
so this works great when I am on the same computer with the camera SW which is running the Autohotkey script
when I use remote chrome desktop it does not work well and what I can see is that when I have a long press on the left arrow key it actually sends repeatedly a "press" and the "release" and then "press" again and "release" etc ... this causes the continuous camera motion to be broken to step motion again, as if I was pressing and releasing the left arrow key with high frequency instead of single long press

Can anybody advise if this problem can be solved somehow ?
thanks
Tal
braunbaer
Posts: 180
Joined: 22 Feb 2016, 10:49

Re: Autohotkey long key press through Chrome remote desktop

Post by braunbaer » 24 Jan 2021, 16:49

Maybe try some other remote desktop software which does not modify what you are sending to the host?
talde
Posts: 3
Joined: 24 Jan 2021, 16:06

Re: Autohotkey long key press through Chrome remote desktop

Post by talde » 25 Jan 2021, 01:22

Thanks
I will try. I need to have the most simple and non secure connection to the RDP .. I used chrome with some general email. I will try maybe TeamView
Any ideas for a good one which will probably not change what I send ?
talde
Posts: 3
Joined: 24 Jan 2021, 16:06

Re: Autohotkey long key press through Chrome remote desktop

Post by talde » 26 Jan 2021, 06:12

well , I tried some,
the problem is the following, ignoring the usage I do with it, I simplify the problem and describe it here :
when I press in editor a long press of a letter, then after half a second +/- it is being repeated by the system for many times (windows settings of keyboard behavior)
so long press on 'f' will give in the editor after a second 'ffffffffffffffffffffffffffffffffffffffffffffff'
so when I do this script below, no matter how long I press 'f' then 'r' will be only written once. and when I leave it it will write 'g' in this example so for a long press and release it I get 'fg' in the editor and no repetitions

Code: Select all

f:: 
send r
KeyWait f
send g
Return
when I now connect to the editor in remote and will long press 'f' in the controlling computer then I see in the generated stream in the editor:
'rgrgrgrgrgrgrgrgrgrgrgrgrgrgrgrgrgrgrgrgrgrg' as if 'f' is pressed and released multiple times , although I keep it pressed.
this is because the controlling PC breaks the 'f' too according to its define "press repeat" pattern as defined by setting o keyboard
no matter what I did on the controlling computer side, I could not reach the same behavior like I am pressing 'f' directly on the remote computer
even when I cancelled the multiple letter press in windows setting, the press is still broken on the remote computer
I also tried to use autohotkey on the controlling computer with different options but it keeps sending multiple presses for my single press

any idea how to by pass that and get the same behavior even when I press long f on the controlling PC ?
thanks
Tal
Post Reply

Return to “Ask For Help”