ayufan / steam-deck-tools

(Windows) Steam Deck Tools - Fan, Overlay, Power Control and Steam Controller for Windows
https://steam-deck-tools.ayufan.dev
Other
937 stars 67 forks source link

Bug: Allow to hold CTRL, SHIFT, ALT and WIN keys #81

Open imjinjia opened 1 year ago

imjinjia commented 1 year ago

Every windows key is turbo on any mode , such as back buttons and a button , b button...

ayufan commented 1 year ago

Impossible. Please re-open if you have more information on what and when.

imjinjia commented 1 year ago

Impossible. Please re-open if you have more information on what and when. @ayufan

First , thank you for your work , and forgive me for my poor English .

I've tried everything , re-open or re-install , still the same.

Please try two keys shortcut in setting , like ctrl + c , shortcut won't work easily because all the windows keys are turbo can't hold the keys .

Please test it with keyboardtestutility. keyboardtestutility.zip

ayyoubmiftah commented 1 year ago

@imjinjia do you found a solution to this probleme ?

imjinjia commented 1 year ago

@ayyoubmiftah I didn't find a solution to this probleme. The author does not believe that SteamController has this problem๏ผŒi think you should create an issue.

ayufan commented 1 year ago

I need more details, so if someone would have or record a video with it, it would make it easier for me to see what and when it happens :)

imjinjia commented 1 year ago

@ayufan hold any button on desktop mode , if you test it with keyboardtestutility , you will see the probleme.

ayufan commented 1 year ago

Sorry, I'm a little sceptical on running some random programs from internet. Can you describe different method of reproducing it?

imjinjia commented 1 year ago

@ayufan Hold an button , like a button or b button , and it just keep repeat.

ayufan commented 1 year ago

Yes, but what I should see?

ayyoubmiftah commented 1 year ago

@imjinjia @ayufan for example if you long click in Ybuton in steam deck to do long press in shift button for example but shift button (clicked down and up many times)

ayufan commented 1 year ago

It is expected that keys do generate repeats, this is how keyboard work. Some do should not like (SHIFT), but if you press Key-A it will generate first press and repeats.

So, maybe we should not generate repeats on function keys?

ayyoubmiftah commented 1 year ago

@ayufan yeah exactly , do you know how to do long press for 2 seconds in Key (for example :VK_A) with c#

ayufan commented 1 year ago

@ayyoubmiftah There's nothing such as long press with a correct interval. It is about events generated:

imjinjia commented 1 year ago

I just want hold ctrl key to multi-select.

ayyoubmiftah commented 1 year ago

@ayufan ah ,Thanks so (we just work with repeated clicks) cause I need to simulate shift+tab or alt+enter or alt+tab or....... Xbtn=shift; Ybtn=alt; R1=tab .......

ayufan commented 1 year ago

Will fix it, fixed description here.

ayyoubmiftah commented 1 year ago

@imjinjia -------------I just want hold ctrl key to multi-select.----------- Me too

Thanks @ayufan

ayyoubmiftah commented 1 year ago

@imjinjia I found a solution with https://github.com/AntiMicroX/antimicrox it can do a long press emulation and work Great with SDT

imjinjia commented 1 year ago

@ayyoubmiftah thank you for telling me.

ayyoubmiftah commented 1 year ago

@imjinjia problem is solved . if you are familiar to c# work with this function :

[DllImport("user32.dll", SetLastError = true)] static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);

public static void KeyPress(int keycode, int delay = 0) { keybd_event((byte)keycode, 0x0, 0, 0);// presses System.Threading.Thread.Sleep(delay); keybd_event((byte)keycode, 0x0, 2, 0); //releases }

or used like this

if(c.CUSTOMBTN.justPressed()) keybd_event((byte)keycode, 0x0, 0, 0); else if(c.CUSTOMBTN.pressed()) keybd_event((byte)keycode, 0x0, 2, 0);

and finally you can make a long click ๐Ÿ‘ ๐Ÿ† (Now just waiting for custom butons/profiles with interface )

ofbakirci commented 5 months ago

@imjinjia problem is solved . if you are familiar to c# work with this function :

[DllImport("user32.dll", SetLastError = true)] static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);

public static void KeyPress(int keycode, int delay = 0) { keybd_event((byte)keycode, 0x0, 0, 0);// presses System.Threading.Thread.Sleep(delay); keybd_event((byte)keycode, 0x0, 2, 0); //releases }

or used like this

if(c.CUSTOMBTN.justPressed()) keybd_event((byte)keycode, 0x0, 0, 0); else if(c.CUSTOMBTN.pressed()) keybd_event((byte)keycode, 0x0, 2, 0);

and finally you can make a long click ๐Ÿ‘ ๐Ÿ† (Now just waiting for custom butons/profiles with interface )

@ayyoubmiftah Would you mind briefly explaining or pointing in the right direction about how to get these C# functions work? I'm a tech savvy and familiar with coding but that's all