hrvach / deskhop

Fast Desktop Switching Device

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Key repeating until Esc is pressed

Gusher123 opened this issue · comments

I got a specific setup that has an issue. I use an IBM model M SSK (PS/2) through a cheap active PS/2 to USB converter sold under the Bandbridge brand. I only use the keyboard port on the PS/2 to USB converter.

When I connect the PS/2 converter to the 'Keyboard' port on the Deskhop and my USB mouse to the 'Mouse' port on the Deskhop and A and B to my Laptop and Desktoop, I get a "stuck key" (repeating a previously pressed key until I press Escape) when I switch between laptop and desktop. When I switch again between laptop and desktop after hitting Escape, the repeating continues.

Initially I thought that I could work around this issue by plugging the mouse in the keyboard port and vice-versa, but after a while the same thing happened in that setup.

My guess is that the PS/2 to USB converter is to blame.

It might be due to ps2 to usb converter, can you please try the latest release fw that has a bugfix for a similar issue (when output is switched before a key is released, it used to keep outputting that to the previously active screen).

Same behaviour? Does it repeat on the previous screen you switched FROM or the one you switched TO?

I used the recompiled binaries from the 0.3 release from 2 days ago.

I also tried with one of my old mouses connected to the PS/2 to USB converter; the mice are not recognized by the Deskhop (the mice are recognised by my Windows machines when the PS/2 to USB is directly plugged into the Desktop or Laptop).

To answer your question; the repeating is occuring on the active screen (where the mouse pointer is) and transfers with the mouse pointer to the other screen.

When the key is repeating and I disconnect the PS/2 converter from the 'keyboard' port on the Dekshop, the repeating stops.

And I discovered that the A and B port get switched over when I switch over the mouse and keyboard. Is that standard behavior?

When the key is repeating and I disconnect the PS/2 converter from the 'keyboard' port on the Dekshop, the repeating stops.

And I discovered that the A and B port get switched over when I switch over the mouse and keyboard. Is that standard behavior?

It's kind of not meant to be swapped (at least until I rewrite some sections to make this a "plug anything anywhere and it does the right thing" kind of deal).

I've tried my trusty old Dell AT102W through a DeLock PS2-to-USB converter and it works just fine. Had no mouse to try though.

It might help if you could do raw usb hid report dump to see what the converter is sending. Does the repeating always happen or occasionally?

Btw congrats on the nice SSK, those are hard to find!

This is the hid report when I connect the PS/2 to USB converter and USB mouse directly to my unix box (not using Deskhop)

002:002:001:DESCRIPTOR         1705163878.394500
 05 01 09 02 A1 01 85 01 05 09 19 01 29 05 15 00
 25 01 95 05 75 01 81 02 95 01 75 03 81 03 05 01
 09 01 A1 00 09 30 09 31 15 81 25 7F 75 08 95 02
 81 06 C0 09 38 95 01 81 06 09 3C 15 00 25 01 75
 01 95 01 B1 22 95 07 B1 01 C0 05 0C 09 01 A1 01
 85 02 19 00 2A 3C 02 15 00 26 3C 02 95 01 75 10
 81 00 C0 05 01 09 80 A1 01 85 03 19 81 29 83 25
 01 75 01 95 03 81 02 95 05 81 01 C0

002:002:000:DESCRIPTOR         1705163878.396479
 05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
 75 01 95 08 81 02 95 01 75 08 81 01 95 05 75 01
 05 08 19 01 29 05 91 02 95 01 75 03 91 01 95 06
 75 08 15 00 26 E7 00 05 07 19 00 29 E7 81 00 C0

002:003:000:DESCRIPTOR         1705163878.397662
 05 01 09 02 A1 01 09 01 A1 00 05 09 19 01 29 05
 15 00 25 01 95 05 75 01 81 02 95 03 81 01 05 01
 16 01 F8 26 FF 07 09 30 09 31 75 0C 95 02 81 06
 15 81 25 7F 09 38 75 08 95 01 81 06 05 0C 0A 38
 02 95 01 81 06 C0 05 01 0A 68 01 95 01 81 02 C0

This all looks OK to me. Could you also do reports when you press down keys (and release them)? Try holding a key too for a few secs and then release (usbhid-dump --entity=stream), but I don't know if I'll be able to figure out what's wrong from just that - I'd have to know what the box is doing too. Let's try and see.

This is the output of the Deskhop gettting into a stuck-key situation. This time the letter "d" stuck. In normal operation, when I press and hold a key, it just repeats 3 times.

.002:002:000:STREAM             1705175731.159235
 02 00 50 23 80 42 00 00

.002:002:000:STREAM             1705175731.163212
 02 00 E0 21 50 42 00 00

.002:002:000:STREAM             1705175731.173230
 02 00 10 20 00 42 00 00

.002:002:000:STREAM             1705175731.183247
 02 00 B0 1D 90 41 00 00

.002:002:000:STREAM             1705175731.189200
 02 00 A0 1A 20 41 00 00

.002:002:000:STREAM             1705175731.199231
 02 00 40 17 A0 40 00 00

.002:002:000:STREAM             1705175731.203207
 02 00 80 13 10 40 00 00

.002:002:000:STREAM             1705175731.213296
 02 00 90 0F 90 3F 00 00

.002:002:000:STREAM             1705175731.223222
 02 00 80 0B 50 3F 00 00

.002:002:000:STREAM             1705175731.229218
 02 00 90 07 40 3F 00 00

.002:002:000:STREAM             1705175731.239254
 02 00 E0 03 40 3F 00 00

.002:002:000:STREAM             1705175731.243296
 02 00 A0 00 40 3F 00 00

.002:002:000:STREAM             1705175731.253207
 02 00 00 00 60 3F 00 00

.002:002:000:STREAM             1705175731.254173
 01 00 00 00 00 00 00 00 00

.002:002:000:STREAM             1705175731.255183
 02 00 FF 7F 00 00 00 00

.002:002:000:STREAM             1705175733.691332
 01 00 00 00 00 00 00 00 00

.002:002:000:STREAM             1705175733.701335
 02 00 70 01 D0 3C 00 00

.002:002:000:STREAM             1705175733.705346
 02 00 60 02 D0 3C 00 00

.002:002:000:STREAM             1705175733.715329
 02 00 20 03 D0 3C 00 00

.002:002:000:STREAM             1705175733.721298
 02 00 80 03 D0 3C 00 00

.002:002:000:STREAM             1705175733.731260
 02 00 C0 03 D0 3C 00 00

.002:002:000:STREAM             1705175733.965286
 01 00 00 07 00 00 00 00 00

.002:002:000:STREAM             1705175734.225356
 01 00 00 07 00 00 00 00 00

.002:002:000:STREAM             1705175734.485360
 01 00 00 07 00 00 00 00 00

.002:002:000:STREAM             1705175734.735347
 01 00 00 07 00 00 00 00 00

.002:002:000:STREAM             1705175734.995343
 01 00 00 07 00 00 00 00 00

.002:002:000:STREAM             1705175735.255347
 01 00 00 07 00 00 00 00 00

.002:002:000:STREAM             1705175735.515348
 01 00 00 07 00 00 00 00 00

.002:002:000:STREAM             1705175735.765370
 01 00 00 07 00 00 00 00 00

.002:002:000:STREAM             1705175736.025378
 01 00 00 07 00 00 00 00 00

.002:002:000:STREAM             1705175736.285365
 01 00 00 07 00 00 00 00 00

.002:002:000:STREAM             1705175736.535360
 01 00 00 07 00 00 00 00 00

Yep, it shows report id 1, no modifiers, and letter D pressed ... the missing piece of data is - what reports did the box read from the ps2-to-hid converter that made it keep sending D. For the keyboard, it just relays whatever it gets unaltered (unless you pressed a hotkey).

During switching, the box restores keyboard LEDs that were active for that output. Maybe the SetReport message confuses the ps2 converter? Probably won't help, but just for the sake of it try to comment out the call to tuh_hid_set_report in led.c and try?

Will first try with another Model M to see if it's de keyboard or the converter.

Will first try with another Model M to see if it's de keyboard or the converter.

Please try this debug fw on board A, then open the corresponding serial port that gets created and see what is sent when this stuck key scenario happens. This might provide some info to shed light on the issue.

Please try this debug fw on board A, then open the corresponding serial port that gets created and see what is sent when this stuck key scenario happens. This might provide some info to shed light on the issue.

I will, but very busy in the comming weeks. Will take some time to report back.

No recent updates, closing. Please reopen if still an issue.