Author Topic: 122-Key keyboard  (Read 5013 times)

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 492
    • View Profile
Re: 122-Key keyboard
« Reply #15 on: October 04, 2018, 10:42:32 am »
As far as PS/2 to USB conversion goes I wonder if there can be a generic solution. The PS/2 to USB adapter acts as a USB device from the computer's point of view. That said, it should provide all the descriptor info (standard USB device and config descriptors as well as HID device specific HID descriptor) to present itself as a USB keyboard and/or mouse.

But of course, that HID info cannot possibly cover each and every keyboard on planet earth. I would expect that most of these adapters will limit themselves to a MF102 keyboard. And USBKBD.SYS (and USBMOUSE.SYS) can only serve what the USB device reports as being supported.

Neil Waldhauer

  • Hero Member
  • *****
  • Thank You
  • -Given: 9
  • -Receive: 40
  • Posts: 516
    • View Profile
    • Blonde Guy
Re: 122-Key keyboard
« Reply #16 on: October 04, 2018, 03:32:29 pm »
So far, I only considered the case of supporting just this USB device. There are actually two of the devices, one for 5250 and one for 3270, that are interesting. There are more industrial users who are stuck with OS/2 because they used Personal Communications. When IBM discontinued Personal Communications for Windows, their migration path became unclear, and they are lost in the woods.

It would be nice to support any device that claimed to be a keyboard. But a keyboard through a USB adapter would not even claim to be a keyboard, would it?

For now, I like the solution with adding the PS/2 assembly to the computer. I checked, and the PS/2 socket is still on the latest MB, the one I plan to support once USB 3 is available.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 492
    • View Profile
Re: 122-Key keyboard
« Reply #17 on: October 05, 2018, 07:48:15 am »
Maybe I should have read your posts more thoroughly:
Quote
The PS/2 to USB adapter does work for supported operating systems

If that means that say under Windows all keys of this keyboard did work with the PS/2 to USB adapter then my assumption was wrong and it should be possible to support all keys with the USBKBD.SYS driver.

As to what exactly the PS/2 to USB adapter reports to the USB host (computer): maybe you can plug in just the adapter and then run a tool like "lsusb.exe" with the "-v" switch and see what you get back as HID info. I would expect that the OS sees a combination of a keyboard and mouse (plus a generic HID device maybe) even if no such device is plugged into the adapter.

ivan

  • Hero Member
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 35
  • Posts: 1074
    • View Profile
Re: 122-Key keyboard
« Reply #18 on: October 05, 2018, 01:39:18 pm »
Hi Lars,

Here are the outputs from usbres and lsusb for a similar adapter to the one Neil is using.  It passes the multimedia keys from my Logotech PS/2 keyboard but on a  Kensington USB keyboard they are not seen even the ones with identical keycodes.

Neil Waldhauer

  • Hero Member
  • *****
  • Thank You
  • -Given: 9
  • -Receive: 40
  • Posts: 516
    • View Profile
    • Blonde Guy
Re: 122-Key keyboard
« Reply #19 on: October 05, 2018, 04:30:12 pm »
Thanks, Ivan, for the example. I have fixed my installation of lsusb and posted a verbose dump of my PS/2 to USB converter.

This is the PS/2 to USB converter that came with the keyboard and is pictured in the original post.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Andreas Schnellbacher

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 26
  • Posts: 476
    • View Profile
Re: 122-Key keyboard
« Reply #20 on: October 05, 2018, 06:34:31 pm »
they are not seen even the ones with identical keycodes.
That sounds strange. Which code do you mean? Scancode, charcode or vk_code?

ivan

  • Hero Member
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 35
  • Posts: 1074
    • View Profile
Re: 122-Key keyboard
« Reply #21 on: October 05, 2018, 11:35:20 pm »
Sorry that was scan codes.  I used win05key-v309 on OS/2 and checkscancode v4 on win 7
« Last Edit: October 06, 2018, 01:23:36 am by ivan »

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 492
    • View Profile
Re: 122-Key keyboard
« Reply #22 on: October 07, 2018, 03:49:28 pm »
If I ever find the time, I'll try and read the USB HID specification (https://usb.org/sites/default/files/documents/hid1_11.pdf) plus the HID usage tables doc (https://usb.org/sites/default/files/documents/hut1_12v2.pdf).
These are horrible documents to read but they should give a clue what scancode range the adapter supports.

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 492
    • View Profile
Re: 122-Key keyboard
« Reply #23 on: October 07, 2018, 06:54:48 pm »
Neil: I have a vague idea of what needs to be done. I have now modified USBKBD.SYS to hopefully support the F13-F24 keys. Where do you want me to send you an updated USBKBD.SYS ?

By the way: when you hit Shift-F1 on this keyboard, is this equivalent to hitting SysReq on an ordinary AT keyboard ?

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 492
    • View Profile
Re: 122-Key keyboard
« Reply #24 on: October 07, 2018, 07:05:48 pm »
Neil: Never mind, found your email address. I have sent the updated driver to you.

Neil Waldhauer

  • Hero Member
  • *****
  • Thank You
  • -Given: 9
  • -Receive: 40
  • Posts: 516
    • View Profile
    • Blonde Guy
Re: 122-Key keyboard
« Reply #25 on: October 08, 2018, 05:25:41 am »
Thanks Lars. I got your new USBKBD.SYS.

My first attempt didn't go well, because your USBKBD.SYS doesn't work well with the Arca Noae stack. I should have known that.

I installed the whole 224 stack, and then added the new USBKBD.SYS to it, and it seems to work well with my standard usb keyboard. However, keys F13-F24 still don't work on the 122 key keyboard when connected via USB.

I plugged the 122 key keyboard into a PS/2 port, and I tried SysReq to see if it was the same as Shift F1. SysReq doesn't give any output on the 122-key keyboard. I'll have to find an AT keyboard to try. SysReq gives no keyboard output on my standard USB keyboard.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 492
    • View Profile
Re: 122-Key keyboard
« Reply #26 on: October 08, 2018, 08:03:04 am »
Hi Neil,

1) how do you query the received scan codes (how did you get the results in the AN ticket) ? If you have written a REXX util, can you post it here ? Do I understand correctly that you get scancodes for the F13-F24 keys only if you directly attach the 122 key keyboard to a PS/2 port ?

2) <quote>SysReq gives no keyboard output on my standard USB keyboard</quote>. So that means, that disregarding the 122 key keyboard you also don't get a scancode for this key on a "normal" keyboard ? Maybe that gives me a chance to find a common cause.


Lars

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 45
  • Posts: 492
    • View Profile
Re: 122-Key keyboard
« Reply #27 on: October 08, 2018, 03:40:20 pm »
I found the piece of information I was looking for. I am going to update USBKBD.SYS and send it to you.
Let's hope for the best ...

Neil Waldhauer

  • Hero Member
  • *****
  • Thank You
  • -Given: 9
  • -Receive: 40
  • Posts: 516
    • View Profile
    • Blonde Guy
Re: 122-Key keyboard
« Reply #28 on: October 08, 2018, 08:33:18 pm »
Thanks for looking into the USB keyboard driver. As far as the original problem, I found out how to add standard PS/2 ports, so I'm in no rush to get results.

But it would be great to find, fix and document what is wrong with the original IBM USB keyboard. I will try to help and test.

I have a Microsoft Ergonomic keyboard I'm still using after my bicycle accident. That's pretty much a standard USB keyboard without the multi-media keys found on some new keyboards, but with the extra Microsoft keys. On this keyboard, SysRq is a key that is also PrtScn.

The 122-key keyboard only shows F13-F24 when plugged into PS/2 port. I have now shipped the machine to which I added the PS/2 port, so I'll now be testing on an older machine with a PS/2 port. I hope the PS/2 ports are equivalent.

Still to do is to get a standard IBM PS/2 keyboard and test that in the PS/2 port.

The code for my REXX utility is below. Please feel free to improve it.


Code: [Select]
/* program to test keyboard input */

CALL RxFuncAdd 'SysGetKey','RexxUtil','SysGetKey'
SAY 'Press q to quit:'
SAY
do while key <> 'q'
   key=SysGetKey()
   say ''
   SAY 'Key (' || Length(key) || '): '
   DO j=1 TO Length(key)
      say ' '||C2X(SubStr(key,j,1))
   END j
   SAY
END
return
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

ivan

  • Hero Member
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 35
  • Posts: 1074
    • View Profile
Re: 122-Key keyboard
« Reply #29 on: October 08, 2018, 09:19:44 pm »
Hi Lars,

Any chance you could send me the modified USBKBD.SYS so I can test it with my USB keyboards with extra keys?

ivan10 at free dot fr

Thanks