Author Topic: TMK IBM PC Keyboard Converter  (Read 31730 times)

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #150 on: Tue, 17 November 2020, 17:20:04 »
You can post detailed infomation to improve this converter. Your contribution are welcome.

I'm getting a lot of key chatter or freezing with this converter vs Soarer's

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Mikhail

  • Posts: 51
  • Location: Moscow, Russia
Re: TMK IBM PC Keyboard Converter
« Reply #151 on: Tue, 17 November 2020, 20:59:51 »
Hi!
Chicony kb-5191 in XT mode:
Pressing Pause/Break:

Listening:
rE1 r1D r45 rE1 r9D rC5

All 6 byte in press, no hold and release (like it should be in DOS). In Windows it should generate first 3 byte by press and hold, and rest of 3 bytes by release (as told Wiki)

Keyboard testers in Win shows the key stand pressed.
If remap key in Macs carabiner, key stand pressed too.


Waiting for device:...........................
Listening:


TMK:12eaedf9/LUFA


USB configured.

Keyboard start.

PRT:22 ISR:AAC0 I1582 wFF A2619
ERR:11 ISR:0000 X3121 rAA W3229 wF2 R3765
ID:FFFF(1)
ERR:11 ISR:AAC0 S3766 L3766 rAA


For Siemens F500:
Waiting for device:........
Listening:


TMK:12eaedf9/LUFA


USB configured.

Keyboard start.

PRT:21 ISR:AFA0 I1582 wFF A2619
ERR:11 ISR:AFA0 X3121 e20
ERR:20 ISR:4000 rEA W3207 rAF W3208 wF2 R3744
ID:FFFF(1)
ERR:11 ISR:AFA0 S3745 L3745
« Last Edit: Tue, 17 November 2020, 21:19:17 by Mikhail »

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #152 on: Tue, 17 November 2020, 22:10:03 »
Mikhail, Thanks for the report
I found and fixed a bug on handling of XT Pause key. Fixed firmware is attached. * ibmpc_usb_debug_pause_fix.hex (52.55 kB - downloaded 18 times.)


'ERR:11' in debug outputs is expected and no problem for XT keyobard when plugin and startup.
But 'ERR:20' is not expected and a bit weird. This is not problem if the error is temporary and happens only after plugin.

Try attached firmware on Siemens F500 and type some keys to see if the error happens. Its debug output would be helpful again.

Assuming both kb-5191 and F500 have LED indicators, how they work in XT mode when you press capslock or numlock?


For Siemens F500:
Waiting for device:........
Listening:


TMK:12eaedf9/LUFA


USB configured.

Keyboard start.

PRT:21 ISR:AFA0 I1582 wFF A2619
ERR:11 ISR:AFA0 X3121 e20
ERR:20 ISR:4000 rEA W3207 rAF W3208 wF2 R3744
ID:FFFF(1)
ERR:11 ISR:AFA0 S3745 L3745




TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Mikhail

  • Posts: 51
  • Location: Moscow, Russia
Re: TMK IBM PC Keyboard Converter
« Reply #153 on: Tue, 17 November 2020, 22:26:54 »
Hasu,
Now its hard to test Siemens because it without switches. Original blacks was to scratchy so i decide to desolder it to clean and lube. I will try.
Also the reset pin are connected.
Num lock is light when Num lock is OFF, and not light when ON.
Same thing with Pause/Break on Chicony((
« Last Edit: Tue, 17 November 2020, 22:43:16 by Mikhail »

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #154 on: Wed, 18 November 2020, 00:32:47 »
XT keyboard  have no lock indicator originally and XT protocol doesn't support indicator.
The keyboard just controls its LEDs internally and it can lost sync with lock key status of computer. Conveter is not reloated here.

Fixed again. Try this firmware then.
* ibmpc_usb_debug_pause_fix2.hex (52.55 kB - downloaded 19 times.)
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Mikhail

  • Posts: 51
  • Location: Moscow, Russia
Re: TMK IBM PC Keyboard Converter
« Reply #155 on: Wed, 18 November 2020, 07:07:11 »
XT keyboard  have no lock indicator originally and XT protocol doesn't support indicator.
The keyboard just controls its LEDs internally and it can lost sync with lock key status of computer. Conveter is not reloated here.

Fixed again. Try this firmware then.
(Attachment Link)

Ok, now seems all work! Pause press and release without holding.

Chicony 5191
Listening:


TMK:4f845302/LUFA


USB configured.

Keyboard start.

PRT:22 ISR:AAC0 I1583 wFF A2620
ERR:11 ISR:0000 X3122 rAA W3230 wF2 R3766
ID:FFFF(1)
ERR:11 ISR:AAC0 S3767 L3767 rAA



Siemens F500
Listening:


TMK:4f845302/LUFA


USB configured.

Keyboard start.

PRT:21 ISR:AFA0 I1583 wFF A2620
ERR:11 ISR:AFA0 X3122
ERR:20 ISR:4000 e20 rEA W3208 rAF W3209 wF2 R3745
ID:FFFF(1)
ERR:11 ISR:AFA0 S3746 L3746



The "TERM FUNC" key generate r65 rE5 scan code.
I'll wait when you make changes to the main firmware ti use Keymap Editor. Thank you again!
« Last Edit: Wed, 18 November 2020, 07:11:26 by Mikhail »

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #156 on: Wed, 18 November 2020, 08:12:43 »
Great. I'll update firmware on repo and Keymap Editor some later.

The Siemens keyboard seems to be unusual on startup at least, let me know when you find problem.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #157 on: Sat, 21 November 2020, 13:39:21 »
Updated firmware on github repository and Keymap Editor.

- Fixed Pause key for enhanced XT keyboard
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Mikhail

  • Posts: 51
  • Location: Moscow, Russia
Re: TMK IBM PC Keyboard Converter
« Reply #158 on: Fri, 27 November 2020, 18:32:33 »
Hello! I have assembled Siemens F500. Everything works as expected. Tried TMK Keymap Editor, works too. The only thing would be cool to be able to reassign the TERM FUNC button (r65 rE5 scan code / ACPI Wake function).

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #159 on: Fri, 27 November 2020, 19:53:08 »
Hi,  great to hear that.
Scan code 0x65 of Code Set 1(XT) is assigned to 'F14'(USB) here and you can remap the F14 on keymap editor.
I guess Windows recognizes F14 as ACPI Wake probably. In general how F13-F24 keys are handled depends on your OS.

https://github.com/tmk/tmk_keyboard/blob/master/converter/ibmpc_usb/unimap_trans.h#L91
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Mikhail

  • Posts: 51
  • Location: Moscow, Russia
Re: TMK IBM PC Keyboard Converter
« Reply #160 on: Sat, 28 November 2020, 11:23:34 »
Yea, F14 remap is working))

Offline cparrot

  • Posts: 2
Re: TMK IBM PC Keyboard Converter
« Reply #161 on: Wed, 02 December 2020, 13:23:55 »
Updated firmware on github repository and Keymap Editor.

- Fixed Pause key for enhanced XT keyboard

Hi and thank you for your awesome work on this.
I noticed that the printscreen/* key below enter is only *, NumLock on or off,
with this new version. I will adjust my mapping to that, but I wanted to let you know.
Until this version the firmware worked like a charm on my XT, with my costum mapping.

I had troubles with random keys registering on my XT and updated to this version in hopes of fixing that.
It didn't work still, but I found that my problem probably came from the only screw on the boards PCB being too loose,
leading to grounding issues.
After thightening it the random presses went away, but the unremapped firmware had that behaviour.
« Last Edit: Wed, 02 December 2020, 17:02:08 by cparrot »

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #162 on: Tue, 08 December 2020, 20:02:27 »
cparrot,
What is behaviour you expected on the key and how did you do in your custom mapping actually?

Orignally on IBM PC/XT the 'PrtSc *' key spits out 'Keypad *' usually while 'PrintScreen' with holding Shift(this is recognized in BIOS, not keyboard).
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol#print-screen

The keys are assigned as 'Keypad *' in the converter and this is intended behaviour. The converter doesn't  emulate the original key behaviour by default, it is not my goal.
You can remap the key if you don't like default mapping anyway.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline cparrot

  • Posts: 2
Re: TMK IBM PC Keyboard Converter
« Reply #163 on: Mon, 14 December 2020, 12:40:59 »
Thanks, I didn't know about the Shift+KP* behaviour.

Before the new version my mapping had a layer 2 toggle in place of the NumLock key
and on the default layer were the (back then) locked num keys.
Layer 2 was exactly like the legends, but L2 Keypad 5 acted as a second enter key.

I was really confused for a bit, because I didn't know NumLock was handled by OS and I got stuck with unlocked num key behaviour
on both layers. I must have toggled NumLock somewhen in the process of updating and I don't have any indicator for that.

To get this mapping right all the time I would have to ditch KP keys completely,
but until now I just left it stock and used a different shortcut for screenshots.

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #164 on: Mon, 14 December 2020, 18:49:38 »
cparrot, Thanks for the explanation.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Alectardy98

  • Posts: 16
  • Location: United States
  • Pre Dental
Re: TMK IBM PC Keyboard Converter
« Reply #165 on: Sat, 19 December 2020, 14:02:11 »
hey I wanted to say that this let me use my focus 2001 that I was unable to get to work reliably using a soarers, anyways I wanted a bit of help programing TMK with the focus 2001. The focus 2001 has a blank key on the left that when pressed gives this imput to hd listen
r61 rF0 r61

what would I do if I wanted this button to be my lgui key?

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #166 on: Sat, 19 December 2020, 20:53:35 »
Need some info to answer you quesiton.

First, show me outputs from hid_listen when startup to know how the converter recognize the keyboard.
What's  your keyboard layout setting on your OS? US or European ISO?
And the keyboard seems to be AT/XT switchable, which protocol is selected?

What exactly happens with Soarer's converter?

hey I wanted to say that this let me use my focus 2001 that I was unable to get to work reliably using a soarers, anyways I wanted a bit of help programing TMK with the focus 2001. The focus 2001 has a blank key on the left that when pressed gives this imput to hd listen
r61 rF0 r61

what would I do if I wanted this button to be my lgui key?

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Alectardy98

  • Posts: 16
  • Location: United States
  • Pre Dental
Re: TMK IBM PC Keyboard Converter
« Reply #167 on: Sun, 20 December 2020, 12:37:50 »
When I Plug in the keyboard, This is what HID listen does
Keyboard start.
I210 wFF rFA A1215
PRT:10 ISR:FE90 rAA W1294 wF2 rFA rAB r83 R1801
ID:AB83(AT) S1802 wED rFA w00 rFA L1809


The keyboard is set to US, and I have fliped the switch from at to xt so may times that I Lost track, but I belive it is AT because lock lights works

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #168 on: Sun, 20 December 2020, 19:46:03 »
The log shows that the keyboards is recognized  as AT keyboard with Code Set 2.
So the scan code '61' of the key means ISO key between Left shift and Z(on usual layout). You can remap it with keymap editor or editing unimap_plain.c.
https://github.com/tmk/tmk_keyboard/blob/c230460b12f1d6ff149a6139166bed8247eeeb60/converter/ibmpc_usb/unimap_trans.h#L99-L136

It would be appreciated if you can take some time to test and improve the converter firmware.
- Can you test TMK firmware with the keyobard in XT mode?  hid_listen log would be helpful too here.

- Optionally, but I'm still curious, can you test Soarer's firmware with the keyboard in both mode?
I've never heard Soarer's firmware has problem with the keyboard and think it works without problem.
hid_listen log would be helpful again if you find something weird.

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Alectardy98

  • Posts: 16
  • Location: United States
  • Pre Dental
re
« Reply #169 on: Sun, 20 December 2020, 20:44:47 »
Thank you for the help, that was the right button to change! AT Mode works perfect
okay I did a very short test in xt mode, and everything is working fine, for reference I wrote this using XT mode,  Also Lock Lights work on XT Mode
here is what HID listen had to say

USB configured.

Keyboard start.
I182 wFF A1219
ERR:11 ISR:AAC0
PRT:22 ISR:0000 X1721 rAA W1722 wF2 R2258
ID:FFFF(XT)
ERR:11 ISR:AAC0 S2259 L2259

With Soarers it is another story, Like I said I couldn't get it to work, but I know the converters work, I have three of them and none of them work, Here is what I get with HID listen in XT mode
Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

(and I get no inputs)

This is what I get with soarers in at mode

Keyboard ID: 00AB
Code Set: 2 (extended)
Mode: AT/PS2

wED rFA w00 rFA

It recognizes inputs but it has heavy ghosting, even worse than my zenith z150 had with soarers. also, a lot of keys lag or fail to recognize presses, overall over with the soarers I have an inconsistent and unusable keyboard, and using this tmk firmware it works perfectly in both modes.

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #170 on: Sun, 20 December 2020, 21:15:56 »
Thanks for the tests and logs.

The converter recognizes it as XT. (those 'ERR's are expected at startup).
Its lock lights are controled by keyboard itself, interesting. Converter/host can't change them in XT mode due to its protocol limitation.

Hmm, FK-2001 may use unusual signal timing and Soarer's seems to miss it occasionally, perhaps. Good to know.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Alectardy98

  • Posts: 16
  • Location: United States
  • Pre Dental
Re: TMK IBM PC Keyboard Converter
« Reply #171 on: Sat, 26 December 2020, 12:45:25 »
could someone knowledgeable with tmk tell me how to assign macros, I am having a hard time with it

Offline Alectardy98

  • Posts: 16
  • Location: United States
  • Pre Dental
Re: TMK IBM PC Keyboard Converter
« Reply #172 on: Sat, 26 December 2020, 17:02:48 »
IBM Numpad 1396199 does not work


TMK:e473e8ce/LUFA


USB configured.

Keyboard start.
I282 wFF A1319
ERR:11 ISR:0000 X1820



Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #173 on: Sat, 26 December 2020, 23:31:09 »
The log shows it can't seems to read anything on signal lines.

The converter is same as one used with your Focus before?
The numpad works with usual PS/2 converter or Soarer's?

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Alectardy98

  • Posts: 16
  • Location: United States
  • Pre Dental
Re: TMK IBM PC Keyboard Converter
« Reply #174 on: Fri, 15 January 2021, 00:05:37 »
sorry for the late response, I believe the Numpad was electrically shot, i don't think it had anything to do with tmk, sorry about that

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #175 on: Fri, 05 February 2021, 23:43:06 »
If there is someone with Zenith Z-150 AT here ...

Can you try this firmware and post your result with 'hid_listen' log?
https://github.com/tmk/tmk_keyboard/tree/09e4aa77072393c89e7f75202bf6531445dc2d56/converter/ibmpc_usb/binary

- Type keys and check if they work without glitch
- Press CapsLock or NumLock key and check if its LED indicator changes

Thanks



Detailed Issue Description:
- https://github.com/tmk/tmk_keyboard/issues/661
- https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#zenith-z-150-at
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline gottspeed

  • Posts: 2
Re: TMK IBM PC Keyboard Converter
« Reply #176 on: Sun, 07 February 2021, 20:03:14 »
IBM Rapid Access Keyboard conversion

Hi, I'd like to work towards converting a PS/2 keyboard to a USB unit, but its an unusual case. This keyboard requires that a scan-code be sent to it to initialize its multimedia and shortcut buttons. Its not a keyboard I've seen covered on here so I'm wondering what the path forward would be to get this working. I see lots of different converters available for purchase but I'm not sure which one would work, and what would be required to customize its firmware to initialize and handle the scancodes from the extra buttons.

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #177 on: Sun, 07 February 2021, 20:15:51 »
Check first post and program default firmware on your converter.
You can download the firmware from Keymap Editor or github.

And then post debug outputs on 'hid_listen'. I'd like to know ID of the keyboard, first.


EDIT:
Check this page to compile firmware as well.
https://github.com/tmk/tmk_keyboard/wiki#build-firmware
« Last Edit: Sun, 07 February 2021, 20:21:51 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline gottspeed

  • Posts: 2
Re: TMK IBM PC Keyboard Converter
« Reply #178 on: Sun, 07 February 2021, 20:34:02 »
Thank you, I'll purchase a converter this evening. The make scancodes are published for the multimedia keys on this keyboard, but not the break scancodes. Will the converter report these non-standard scan codes through hid_listen?

I'm going to put my mind to this but I may need a bit of spoonfeeding as to where to add the initializing scancode of "ea 71" to the firmware code.

Offline hasu

  • Thread Starter
  • Posts: 3199
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #179 on: Sun, 07 February 2021, 22:11:05 »
hmm, 'no break code' makes it difficult to integrate its support into default firmware, perhaps.
It will need custom code for the keys and this is tricker than what I expected.

Sending the "ea 71" code at startup won't be a problem if the keyboard has useful ID to discriminate it from others.

Thank you, I'll purchase a converter this evening. The make scancodes are published for the multimedia keys on this keyboard, but not the break scancodes. Will the converter report these non-standard scan codes through hid_listen?

I'm going to put my mind to this but I may need a bit of spoonfeeding as to where to add the initializing scancode of "ea 71" to the firmware code.

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline TheNeonKnight

  • Posts: 10
Re: TMK IBM PC Keyboard Converter
« Reply #180 on: Fri, 12 February 2021, 17:00:22 »
Is it possible to add the second key under Numpad 0 to the unimap_plain.c? It is in unimap_trans but i'm not sure on the bearing b/w the 2.