steam-deck-tools icon indicating copy to clipboard operation
steam-deck-tools copied to clipboard

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

Open imjinjia opened this issue 2 years ago • 21 comments

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

imjinjia avatar Mar 04 '23 00:03 imjinjia

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

ayufan avatar Mar 07 '23 11:03 ayufan

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

imjinjia avatar Mar 07 '23 11:03 imjinjia

@imjinjia do you found a solution to this probleme ?

ayyoubmiftah avatar Mar 13 '23 10:03 ayyoubmiftah

@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.

imjinjia avatar Mar 13 '23 14:03 imjinjia

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 :)

ayufan avatar Mar 13 '23 14:03 ayufan

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

imjinjia avatar Mar 13 '23 15:03 imjinjia

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

ayufan avatar Mar 13 '23 15:03 ayufan

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

imjinjia avatar Mar 13 '23 15:03 imjinjia

Yes, but what I should see?

ayufan avatar Mar 13 '23 15:03 ayufan

@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)

ayyoubmiftah avatar Mar 13 '23 15:03 ayyoubmiftah

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?

ayufan avatar Mar 13 '23 15:03 ayufan

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

ayyoubmiftah avatar Mar 13 '23 15:03 ayyoubmiftah

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

  • WK_KEYDOWN
  • and repeats if needed
  • WK_KEYUP

ayufan avatar Mar 13 '23 15:03 ayufan

I just want hold ctrl key to multi-select.

imjinjia avatar Mar 13 '23 15:03 imjinjia

@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 .......

ayyoubmiftah avatar Mar 13 '23 15:03 ayyoubmiftah

Will fix it, fixed description here.

ayufan avatar Mar 13 '23 15:03 ayufan

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

Thanks @ayufan

ayyoubmiftah avatar Mar 13 '23 15:03 ayyoubmiftah

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

ayyoubmiftah avatar Mar 14 '23 09:03 ayyoubmiftah

@ayyoubmiftah thank you for telling me.

imjinjia avatar Mar 14 '23 10:03 imjinjia

@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 avatar Mar 21 '23 16:03 ayyoubmiftah

@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

ofbakirci avatar May 19 '24 20:05 ofbakirci