USB keyboard and USB-to-PS/2 adapter scancode

0

1

I have configuration like this:
USB keyboard ---> USB-to-PS/2 adapter ---> PS/2 port.
Below is the image of the adapter.

USB-to-PS/2 adapter

My question is which scancode will be produced at the end of the chain? Will it be an USB scancode or PS/2 scancode (set 2 probably)?

After reading online, I'm not clear on this. Some say that the adapter has a chip which does USB to PS/2 translation, and others say that it is a straightforward pass-through connection.

evilpascal

Posted 2018-08-31T14:17:36.180

Reputation: 3

So, it will be a USB scancode? – evilpascal – 2018-08-31T14:25:27.717

How would I know if the keyboard does that (apart from using an oscilloscope)? – evilpascal – 2018-08-31T14:48:37.717

Answers

0

If your "USB keyboard" does work in this combination (over PS/2 port), it means that this is a special "dual-mode" keyboard. It is designed to understand both USB 1.1 LS protocol and the alternative PS/2 protocol. Not all keyboards are made this way.

The adapter doesn't have any chip inside, it is just a passive connector. The keyboard switches automatically depending on what kind of initial signaling it sees from the port.

Not sure what do you mean by "scan code", but the port is PS/2, and operates as PS/2. It is the keyboard that enters the alternative PS/2 mode. and therefore work with PS/2 scancode SET. See also this SE EE post.

Ale..chenski

Posted 2018-08-31T14:17:36.180

Reputation: 9 749

When I wrote "USB scancode" I meant HID Usage ID code. OK, so if the keyboard is dual-mode, then a PS/2 scancode from a set will be produced. If the keyboard doesn't support dual-mode and I plug it in a USB port, how will an ASCII be produced? It is clear for PS/2 keyboard (serial ---> scancode ---> ASCII), but what is the process for USB keyboard? – evilpascal – 2018-09-03T15:04:13.510

Nevermind, I found this on USB keyboard packets: https://arduino.stackexchange.com/questions/20047/how-are-hids-keyboard-joypad-created-and-mapped. Thanks for your help Ale..chenski.

– evilpascal – 2018-09-03T16:07:38.783

@evilpascal, this Microsoft document might help, http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf

– Ale..chenski – 2018-09-03T16:11:01.993