XT/AT/PS2/Terminal to USB Converter with NKRO

User avatar
j0d1

06 Jul 2017, 18:42

(I tried searching this post but I did not find anything relevant... also hope it helps someone in the same situation as me in the future!)

I'm converting a 1392595 and I successfully remapped all the keys I need.
However, for a cluster of 10 keys, the micro-controller emits 2 HID codes instead of 1.
Here is what happens when I press those keys:

Code: Select all

9 => 9 0 # sometimes 09, same for all other keys.
0 => 0 9
- => F8 - # yes! F8 and minus...

o => o p
p => p o
[ => F7 [

l => l ;
; => ; l
. => EUROPE_1 .
* Those keys are exactly arranged like a numpad so I feel like I'm missing a configuration somewhere...
* The comma key (next to Return) lights up the LED on the Teensy for a few seconds.

I don't see anything abnormal is hid_listen, apart from the fact that two keys are pressed. For example, when pressing 0:

Code: Select all

r46 +26 d26 r45 +27 d27 
rF0 r46 -26 u26 rF0 r45 -27 u27
My configuration is simple:

Code: Select all

force set3

remapblock
  F13 ESC
  ESC NUM_LOCK
  NUM_LOCK PAD_SLASH
  SCROLL_LOCK PAD_ASTERIX
  PAD_ASTERIX PAD_MINUS
  PAD_MINUS PAD_PLUS
  PAD_PLUS PAD_ENTER

  F23 PRINTSCREEN
  F24 SCROLL_LOCK
  LANG_4 PAUSE
endblock
This is the ouput of hid_listen when I plug the keyboard:

Code: Select all

Listening:
rAA rBF rBF 

remaining: 0018
18@0008 remaps 
layerdefs: 00
max_layer: 00
total_macros: 00
alloc ok.
wF8 rFA 

Keyboard ID: 0000
Code Set: 3
Mode: AT/PS2

wED rFA w00 rFA 
EDIT: Plot twist... my ribbon cables were dirty...! I cleaned them and now I only have one HID code sent for those keys... I was deep into macros when the internals of my keyboard moved a little bit (because of a broken plastic pin holding the membrane) and the problem fixed itself... sigh (and yeah!).

User avatar
Wingklip

23 Jul 2017, 23:54

coreinsane wrote: I made a Soarer's converter for my terminal model m, I partially manage to remap some of the keys, but I don't know how should I remap the key which don't have a keycap on the picture next to Enter, any suggestions? Which key should it be called? (ISO QWERTZ layout preferred)
17806910_1359434987433429_580975657_n.jpg
17760653_1359462984097296_1337643887_n.jpg
ABS on a model M?!!!

User avatar
wobbled

24 Jul 2017, 00:09

Wingklip wrote:
coreinsane wrote: I made a Soarer's converter for my terminal model m, I partially manage to remap some of the keys, but I don't know how should I remap the key which don't have a keycap on the picture next to Enter, any suggestions? Which key should it be called? (ISO QWERTZ layout preferred)
17806910_1359434987433429_580975657_n.jpg
17760653_1359462984097296_1337643887_n.jpg
ABS on a model M?!!!
Late UK models used ABS space bars to bring the cost of manufacturing down. PBT spacebars were a great way to waste money as a lot of them had to be discarded.

User avatar
Wingklip

24 Jul 2017, 01:15

wobbled wrote:
Wingklip wrote:
coreinsane wrote: I made a Soarer's converter for my terminal model m, I partially manage to remap some of the keys, but I don't know how should I remap the key which don't have a keycap on the picture next to Enter, any suggestions? Which key should it be called? (ISO QWERTZ layout preferred)
17806910_1359434987433429_580975657_n.jpg
17760653_1359462984097296_1337643887_n.jpg
ABS on a model M?!!!
Late UK models used ABS space bars to bring the cost of manufacturing down. PBT spacebars were a great way to waste money as a lot of them had to be discarded.
Discarded?

applehugger

09 Aug 2017, 03:34

Wingklip wrote: Discarded?
Yes: PBT is very prone to warping on large keys. A spacebar is extremely long; basically a worst-case scenario for PBT extrusion. Therefore, the manufacturing process suffers a high number of defective (warped) spacebars. ABS doesn't suffer from the shrinkage and warping issues PBT does, so making ABS spacebars is much easier and produces more reliable results.

I'm hoping someone can help me with problems I've been having with my ANSI Modded IBM Modem-M Terminal keyboard (manufactured on 9 September 1986 in case anyone is interested.) I'm using Soarer's converter on a genuine Teensy. Key-remapping works flawlessly (I'm typing with it now); however, whenever I try to assign a macro, the first keypress works, but then the entire keyboard becomes disabled. I need to reboot the computer to get it working again. My code is listed below.

Code: Select all

remapblock
	EXTRA_F10 LGUI
	PAD_PLUS PAD_ENTER
	PAD_ASTERIX PAD_PLUS
	SCROLL_LOCK PAD_ASTERIX
	EXTRA_F1 ESC
	F24 MEDIA_VOLUME_UP
	F23 MEDIA_VOLUME_DOWN
	F22 MEDIA_MUTE
	EXTRA_F7 NUM_LOCK
	ESC TAB
	NUM_LOCK PAD_SLASH
	EXTRA_SYSRQ PAD_MINUS
	LANG_4 DOWN
	EXTRA_F9 APP
endblock

macroblock
macro EXTRA_F5
	MAKE RCTRL
	MAKE P
onbreak
	BREAK RCTRL
	BREAK P
endmacro
endblock
I would really appreciate any help as I spent a significant amount of time restoring this keyboard specifically so I could type on these wonderful buckling spring switches and assign macros for the billing software I use at work. I'm not much of a programmer, so I have no idea what I'm doing wrong, but I've tried a number of different approaches and they all yield the same result.

Here's a picture of my keyboard. I used Dupli-Color Vinyl Dye on the top case only. Somewhat hilariously, I very foolishly painted the top and bottom in direct sunlight. The bottom part of the keyboard case became so hot that it warped significantly. Fortunately, Unicomp sold me a brand new bottom shell for the keyboard for $10 shipped. Thanks Unicomp! I left the new bottom shell beige. I kind of like the two-tone look, although when typing, you can't really tell. I was able to preserve all of the original stickers too. I really love this keyboard. It's quite the conversation starter!
File_000.jpg
File_000.jpg (1.02 MiB) Viewed 2987 times

jeb

09 Aug 2017, 19:00

I think the onbreak command may be causing trouble. Otherwise, it may be a little strange to break control before breaking P. I think what may be happening, is that it's pushing down control and P, and then the onbreak is either failing to trigger or the ordering of the commands is preventing them from breaking for some reason, so those remain on. Maybe because control is down after EXTRA_F5 is made, it's not picking up the break because it's then ctrl+EXTRA_F5?

Speculation about why it's not working aside, unless there's some particular reason for how you're doing this, I would structure it as in the documentation, using SET_META and PRESS (and also using PUSH_META and POP_ALL_META, for safety), and not using the onbreak part.

Here is the example from the documentation:

Code: Select all

macroblock
  macro EXTRA_F5
    PUSH_META CLEAR_META all    # save and clear all metas
    PRESS p                     # press some keys...
    PRESS i
    PRESS N                     # case is ignored - this results in lowercase 'n'
    SET_META lshift             # you have to set modifiers yourself
    PRESS g                     # results in a capital 'G', since shift is set
    POP_ALL_META                # restore metas that were active before
  endmacro
endblock
So I think you'd want:

Code: Select all

macroblock
  macro EXTRA_F5
    PUSH_META CLEAR_META all    # save and clear all metas
    SET_META RCTRL             # you have to set modifiers yourself
    PRESS p                     # press some keys...
    POP_ALL_META                # restore metas that were active before
  endmacro
endblock

applehugger

10 Aug 2017, 03:32

jeb wrote: I think the onbreak command may be causing trouble. Otherwise, it may be a little strange to break control before breaking P. I think what may be happening, is that it's pushing down control and P, and then the onbreak is either failing to trigger or the ordering of the commands is preventing them from breaking for some reason, so those remain on. Maybe because control is down after EXTRA_F5 is made, it's not picking up the break because it's then ctrl+EXTRA_F5?

Speculation about why it's not working aside, unless there's some particular reason for how you're doing this, I would structure it as in the documentation, using SET_META and PRESS (and also using PUSH_META and POP_ALL_META, for safety), and not using the onbreak part.

Here is the example from the documentation:

Code: Select all

macroblock
  macro EXTRA_F5
    PUSH_META CLEAR_META all    # save and clear all metas
    PRESS p                     # press some keys...
    PRESS i
    PRESS N                     # case is ignored - this results in lowercase 'n'
    SET_META lshift             # you have to set modifiers yourself
    PRESS g                     # results in a capital 'G', since shift is set
    POP_ALL_META                # restore metas that were active before
  endmacro
endblock
So I think you'd want:

Code: Select all

macroblock
  macro EXTRA_F5
    PUSH_META CLEAR_META all    # save and clear all metas
    SET_META RCTRL             # you have to set modifiers yourself
    PRESS p                     # press some keys...
    POP_ALL_META                # restore metas that were active before
  endmacro
endblock
Oh my goodness, that works perfectly. Thank you so much for your help! I'm off to set macros galore. Now I'll never get to bed....

BLeaCH

13 Aug 2017, 03:11

Hi everyone:

a few days ago i have found a Spanish Layout IBM Model M Keyboard, with a SDL Conector and i want to use the soarer's converter, but i only have a Teensy 3.5 and a Teensy 3.6.

There is a .hex file for this boards? or source files to compile for this boards?

Thanks in advance for your answer

User avatar
Halvar

13 Aug 2017, 07:36

No, there is no publicly available source code to this, just the hex files for the Atmel CPUs mentioned in the first post.

You don't necessarily need a Teensy 2.0, there are cheaper alternatives like the Pro Micro or the Arduino Micro that have the same processor. Getting one of those should be your best option I guess.

Teensy 3.5 and 3.6 use an ARM Chip, which is a totally different platform. If you have to use them, Hasu's TMK firmware could be something worth checking out. It has been ported for the newer Teensies, but I'm not sure if the ARM version can be configured to convert PS/2. Some C required to get it to run.

BLeaCH

02 Sep 2017, 20:05

Hi again:

yesterday i received the teensy 2.0 and i conected to the Model M, everything works!!

now, i have the question: by default there is a way to make the APP (windows) and the "contextual menu" keypress??
or i have to make an aditional config?

thanks in advance for your answer 0_<

Arakula

28 Sep 2017, 15:53

Since neither Windows nor Menu key exist on the original Model M, you definitely have to generate your own config.

User avatar
alh84001
v.001

09 Oct 2017, 15:42

Is anyone else having issues when trying to remap Soarer's converter run keyboard using Mac's own modifier keys remapping? I tried assigning Option key to Command, but it's not working - Option key still registers.

Edit: Same is true when using a generic PS/2 -> USB adapter, so I guess it has to do something with PS/2 being on the keyboard end.

orihalcon

09 Oct 2017, 20:33

alh84001 wrote: Is anyone else having issues when trying to remap Soarer's converter run keyboard using Mac's own modifier keys remapping? I tried assigning Option key to Command, but it's not working - Option key still registers.

Edit: Same is true when using a generic PS/2 -> USB adapter, so I guess it has to do something with PS/2 being on the keyboard end.
Post your configuration file code! Should still be remappable. Option is the equivalent of ALT on mac and command is actually the "windows" key = GUI, so probably shouldn't be using "Option" or "Command" anywhere on the remapping code.

Should look something like to change both Option/ALTs to Command/GUI

Remapblock
LALT LGUI
RALT RGUI
endblock

User avatar
snacksthecat
✶✶✶✶

16 Jan 2018, 02:54

First post :shock:

Hi DT, I'd like to build a converter for this keyboard I acquired[1]. It's an Alps buckling spring board with a c.itoh badge made for terminals. The connection is 6p6c.

I'm a hardware/electronics noob but I believe the first thing I need to determine is which pins are ground and power. Is there any method I can use to determine this? thanks!

[1] https://imgur.com/a/jc1gc

rich1051414

01 Feb 2018, 05:45

This may be a niche thing, but does soarers allow for rapid fire inject?

What this is is, when you press multiple keys at the same time, all of the keys pressed repeat instead of the last key, for example:

Not RFI:
asddddddddddddddddddddddddddddddd

RFI:
asdasdasdasdasdasdasdasdasdasdasdasdasd


As long as a keyboard has NKRO, this feature is possible, but it is dependent on the firmware.

jeb

01 Feb 2018, 17:06

As far as I can see, it does not do that (on the keyboard I'm currently using), and I've never seen any mention of a setting for that, so I would say it's not a possibility.

I'm just curious: is there a reason for wanting that? I can sort of abstractly see that as possibly useful, but I don't know any specific use case.

rich1051414

01 Feb 2018, 20:32

jeb wrote: As far as I can see, it does not do that (on the keyboard I'm currently using), and I've never seen any mention of a setting for that, so I would say it's not a possibility.

I'm just curious: is there a reason for wanting that? I can sort of abstractly see that as possibly useful, but I don't know any specific use case.
It's useful in RTS's. It allows you to do things in rapid succession in a specific order. I only have a few keyboards that can do it(Matias keyboards can do it btw), but none of my adapted keyboards can, some of which do have NKRO, so it is a bit of a limitation for me.

In rare cases, it could also be useful in spreadsheeting as well, I don't think I need to explain that.

zool

23 Apr 2018, 14:05

rich1051414 wrote:
jeb wrote: As far as I can see, it does not do that (on the keyboard I'm currently using), and I've never seen any mention of a setting for that, so I would say it's not a possibility.

I'm just curious: is there a reason for wanting that? I can sort of abstractly see that as possibly useful, but I don't know any specific use case.
It's useful in RTS's. It allows you to do things in rapid succession in a specific order. I only have a few keyboards that can do it(Matias keyboards can do it btw), but none of my adapted keyboards can, some of which do have NKRO, so it is a bit of a limitation for me.

In rare cases, it could also be useful in spreadsheeting as well, I don't think I need to explain that.
not quite the same but close, a couple of the keys on a keyboard i built does something similar to override the os default repeat rate.
you press and hold the key and after a bit the rate increases till you reach the maximum rate the host will accept, on my system 250 press/release cycle per second. It is a custom firmware. you could do similar for multi for other keys using the same method. Some OS don't like it though, I never bothered to track down why. I use it increment and decrement a number.

User avatar
hasu

26 Apr 2018, 01:40

rich1051414 wrote: This may be a niche thing, but does soarers allow for rapid fire inject?

What this is is, when you press multiple keys at the same time, all of the keys pressed repeat instead of the last key, for example:

Not RFI:
asddddddddddddddddddddddddddddddd

RFI:
asdasdasdasdasdasdasdasdasdasdasdasdasd


As long as a keyboard has NKRO, this feature is possible, but it is dependent on the firmware.
I remember that Ripster posted this problem on geekhack long ago. Yes, this is a problem rather than intended feature. "RFI" can happen (on WIndows at least at the time, iirc) when firmware sends 'new' multiple key events in an USB HID report. In most case (if not all the time) USB keyobard firmware should send just one 'new' event at most per report, otherwise computer cannot know right order of the key events. This doesn't need NKRO and can happen with usual 6KRO too. For comparison PS/2, AT and XT keybaord won't have this "RFI" problem due to its protocol.

The "RFI" usually indicates that the keyobard firmware runs at low scan rate, with decent scan rate and reasonable implementation you cannot generate "RFI".

rich1051414 wrote:
jeb wrote: As far as I can see, it does not do that (on the keyboard I'm currently using), and I've never seen any mention of a setting for that, so I would say it's not a possibility.

I'm just curious: is there a reason for wanting that? I can sort of abstractly see that as possibly useful, but I don't know any specific use case.
It's useful in RTS's. It allows you to do things in rapid succession in a specific order. I only have a few keyboards that can do it(Matias keyboards can do it btw), but none of my adapted keyboards can, some of which do have NKRO, so it is a bit of a limitation for me.

In rare cases, it could also be useful in spreadsheeting as well, I don't think I need to explain that.
hmm, interesting. I didn't found there is useful use case.

rich1051414

26 Apr 2018, 20:43

hasu wrote:
rich1051414 wrote:
jeb wrote: As far as I can see, it does not do that (on the keyboard I'm currently using), and I've never seen any mention of a setting for that, so I would say it's not a possibility.

I'm just curious: is there a reason for wanting that? I can sort of abstractly see that as possibly useful, but I don't know any specific use case.
It's useful in RTS's. It allows you to do things in rapid succession in a specific order. I only have a few keyboards that can do it(Matias keyboards can do it btw), but none of my adapted keyboards can, some of which do have NKRO, so it is a bit of a limitation for me.

In rare cases, it could also be useful in spreadsheeting as well, I don't think I need to explain that.
hmm, interesting. I didn't found there is useful use case.
Yeah, unfortunately, it is basically required for competitive star craft as you are at too much of a disadvantage without it, especially if you play zerg.

I was assuming it was a 'no' from the start, but I had to ask.

User avatar
snufflecat

26 May 2018, 14:01

Hi guys,

I've got an IBM PS2 P70 keyboard and want to convert it to USB. Would Soarer's be my best bet for this? I have some experience with making Hasu's ADB-adapter, and I'm guessing Soarer's isn't insanely more complex or something? :)

User avatar
snacksthecat
✶✶✶✶

26 May 2018, 14:37

snufflecat wrote: Hi guys,

I've got an IBM PS2 P70 keyboard and want to convert it to USB. Would Soarer's be my best bet for this? I have some experience with making Hasu's ADB-adapter, and I'm guessing Soarer's isn't insanely more complex or something? :)
It's certainly not any more difficult to assemble than hasu's ADB adapter. In fact, the Soarer's adapter doesn't require any pull up resistors so you shouldn't have to worry about that part.

Do you know the keyboard pinout yet? Once you figure out power/ground/data/clock, it should be very easy for you to test this board with Soarer's. In my limited experience, it's easiest to work on a breadboard when you're first testing if possible. That will allow you to swap connections easily.

I'd also recommend downloading hid_listen [1] and Soarer's simple logic analyzer [2] if you run into any issues. These tools will help you know if you're communicating with the keyboard properly so that you can pinpoint any problems.

Best of luck!

[1] https://www.pjrc.com/teensy/hid_listen.html
[2] workshop-f7/simple-logic-analyzer-for-teensy-t4567.html

User avatar
RaleghDirat
Prisoner of Technology

12 Jun 2018, 08:44

I am assuming the firmware is compiled for atmega32u4 / 16 MHz, as I'm using a Pro Micro 3.3v / 8 MHz please make available a .hex compiled for 8 MHz...
Thanks!

rickard.von.essen

12 Jun 2018, 08:48

RaleghDirat wrote:I am assuming the firmware is compiled for atmega32u4 / 16 MHz, as I'm using a Pro Micro 3.3v / 8 MHz please make available a .hex compiled for 8 MHz...
Thanks!
Check out QMK, it's open source and you can adapt it as you want.

https://github.com/qmk/qmk_firmware/blo ... /README.md

Sent from my SM-G935F using Tapatalk

User avatar
RaleghDirat
Prisoner of Technology

12 Jun 2018, 09:09

rickard.von.essen wrote:
RaleghDirat wrote:I am assuming the firmware is compiled for atmega32u4 / 16 MHz, as I'm using a Pro Micro 3.3v / 8 MHz please make available a .hex compiled for 8 MHz...
Thanks!
Check out QMK, it's open source and you can adapt it as you want.

https://github.com/qmk/qmk_firmware/blo ... /README.md

Sent from my SM-G935F using Tapatalk
Will do.
Thanks.

cdaman

20 Jul 2018, 13:14

I'm a newbie and I just have my first M122 converted and remap. My problem is that everytime my Windows restart, I will need to remap my keyboard again. I thought the remap stick with the keyboard perminately? Are there some step I missing, how do I fix this. Thank you.

User avatar
snacksthecat
✶✶✶✶

20 Jul 2018, 21:53

I'm working on remapping a keyboard that is outputting some mixed up key presses. For the most part this is very straight forward! I'm just wondering how the syntax would be in my config file if I need to remap a key that outputs multiple keypresses. Is this possible to remap?

For instance, when I press "print screen" it outputs "Shift" and "*"

Image

Edit: Actually the behavior wasn't consistent and I was pulling my hair out trying to figure out why things were switching around on me after I thought I'd properly mapped them. Turned out the keyboard was getting recognized as set2 and I had to change the config to force set2ext. :lol:

User avatar
fohat
Elder Messenger

20 Jul 2018, 23:29

cdaman wrote:
I just have my first M122 converted and remap.
I have always used the WCASS method and it has worked perfectly (but I use only genuine Teensy brand):

WCASS programming instructions for Teensy

First, go to the DOCS folder and double-click on index.html. Since you only need help re–mapping keys, go to the Config section and read the Command Reference. If you are starting with a 122 then you probably will only need to study/learn remapblock. You will also need to learn (or keep a cheat sheet handy) what the program expects you to name any keys you will be working with. You will find these in the Codes section. Open one or more of the .sc files in notepad and look at these as examples.

Create your own sc file with a text editor. Start with a comment line (line begins with #) that identifies what you are trying to do. Add a line remapblock to start the remap block. List the keys you want to change and what you want to change each to. Then close the remap block with the endblock command. Save this file with an .sc extension.
Code: [Select]
# Billy's TSSK layout

remapblock

        F17    F11
        F18    F12
        F19    INSERT
        F20    HOME
        F21    PAGE_UP
        F22    SCROLL_LOCK
        F23    UP
        F24    PAUSE

endblock

Open a DOS prompt and navigate to your tools folder. Drag & Drop scas.exe to the command prompt, but don't run it yet. Add a space to the end and then Drag & Drop your custom .sc file to the end of the command line – but don't run it yet. Add a space and then Drag & Drop the same .sc file – and then add a B to the end. Now press Enter to run the command. This "compiles" your code. You will find it in the same folder as your SC file but with SCB as the file extension.

Now that your custom file is compiled, you need to send that to the Teensy. Drag & Drop scwr.exe into the command window, add a space, and then Drag & Drop your .SCB file to the end of the command line. Press Enter to program.

orihalcon

31 Jul 2018, 06:13

cdaman wrote: I'm a newbie and I just have my first M122 converted and remap. My problem is that everytime my Windows restart, I will need to remap my keyboard again. I thought the remap stick with the keyboard perminately? Are there some step I missing, how do I fix this. Thank you.
Hmm, you should post your remapping file. The key map modifications should be stored within the Soarer's Converter, so restarting or unplugging the computer shouldn't make the configuration get lost. Or did you solve the issue? Curious what it could be?

Drecandlere

09 Aug 2018, 10:09

Good advises!Thanks!

Post Reply

Return to “Workshop”