XT/AT/PS2/Terminal to USB Converter with NKRO
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
Something to do with a default case for PS/2 keyboards with generic ID. I needed either an if else or a way to if against !something.
Because I think in C and can't help it!
Because I think in C and can't help it!
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
Well, it's an idea that might be useful. Particularly for ifselect, since that's the only one that will help you work with multiple PS/2 keyboards with the same ID! But you can probably use the fact that later remappings override earlier ones to achieve the same effect...
Code: Select all
remapblock
F1 F2 # remap some keys
endblock
ifselect 1
remapblock
F1 F1 # undo some remaps
F2 F3 # remap some other keys
endblock
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
I dunno. I have the hardware, but it keeps slipping down my todo list.
hasu and darkness have code already!
hasu and darkness have code already!
- j0hnn0
- Main keyboard: Model M
- Main mouse: Orochi
- Favorite switch: Buckling spring
- DT Pro Member: -
Hey Soarer, thanks for the good work. I'm awaiting a shipment of 12 old IBM's, which I believe is a mix of XT, AT and Model M's. Will definitely convert them using your code. Already bought the Teensy's - a whole pack. Can't wait!
I'm also considering ordering a 122 from Unicomp as a PS/2 model, so I can remap all the unused keys to something useful and convert it to USB. Do you think this will work? They sell a couple of different protocol versions, I believe, so I'll have to be careful to get the right one.
I'm also considering ordering a 122 from Unicomp as a PS/2 model, so I can remap all the unused keys to something useful and convert it to USB. Do you think this will work? They sell a couple of different protocol versions, I believe, so I'll have to be careful to get the right one.
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
Unicomp only seem to have one variant of PS/2 122-key now, and I'm not sure which it is! If it's the one which can have its behaviour modified by a jumper inside then that's fine. What you don't want is one that sends combos (e.g. shift + F1) instead of F13 to F24 and which doesn't have that jumper.
- lamune
- Main keyboard: IBM 122
- Main mouse: Razer Habu
- Favorite switch: Buckling spring
- DT Pro Member: -
Soarer, thanks for this. Hacked up a Model M 122 terminal keyboard and I'll probably spend a month or two trying to figure out the best way to remap all these function keys.
What do you think about the possibility of adding a rotary encoder to the Teensy to act as a volume knob that triggers the Media Vol +/- codes? I think it's the only thing I'm going to miss from the multimedia Dell keyboard that I was using previously.
What do you think about the possibility of adding a rotary encoder to the Teensy to act as a volume knob that triggers the Media Vol +/- codes? I think it's the only thing I'm going to miss from the multimedia Dell keyboard that I was using previously.
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
Hmm, I dunno. It would be a lot easier to implement an absolute control driven by a potentiometer, if it would work well (HID supports absolute controls, but there might be niggles)! That's probably what I'd prefer to use, myself.
It should be possible though to use an external decoder circuit to drive a couple of the aux key inputs - not sure if that's available as a single chip solution, or if someone has code that does it using a very cheap PIC or TinyAVR.
It should be possible though to use an external decoder circuit to drive a couple of the aux key inputs - not sure if that's available as a single chip solution, or if someone has code that does it using a very cheap PIC or TinyAVR.
- lamune
- Main keyboard: IBM 122
- Main mouse: Razer Habu
- Favorite switch: Buckling spring
- DT Pro Member: -
Soarer, I have on order a rotary encoder that's designed for arduino usage, so perhaps it'd be an easy retrofit. The analog pot is a pretty interesting idea though I tend to think the rotary's pulses would be much easier translated into HID keypresses, but I'd certainly be curious to try an analog volume control. The Teensy does have inputs that could potentially be used for such a purpose.
I'll take a look and see how this thing works when I get it and provide more info.
I'll take a look and see how this thing works when I get it and provide more info.
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
The good thing about a pot is that it wouldn't have to be translated into keypresses! The downside is that is takes over completely, and you can't set the volume any other way. Hmm.
Got a link to the encoder? The problem with them is debouncing - can't do that on an interrupt since it would swamp the CPU at times, and possibly miss edges. This one looks pretty neat and easy to use on an interrupt, since all the hard work is already done!
Got a link to the encoder? The problem with them is debouncing - can't do that on an interrupt since it would swamp the CPU at times, and possibly miss edges. This one looks pretty neat and easy to use on an interrupt, since all the hard work is already done!
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
From West Calder! I should pop down on my bike, if I had a need for these myself…
Say, Soarer, do you happen to know a little about USB MIDI? I've a 16x8 straight matrix PS/2 Tipro and I'm getting strange ideas…
Say, Soarer, do you happen to know a little about USB MIDI? I've a 16x8 straight matrix PS/2 Tipro and I'm getting strange ideas…
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
Heh, neighbours! I don't know USB MIDI at all, sorry.Muirium wrote:From West Calder! I should pop down on my bike, if I had a need for these myself…
Say, Soarer, do you happen to know a little about USB MIDI? I've a 16x8 straight matrix PS/2 Tipro and I'm getting strange ideas…
- lamune
- Main keyboard: IBM 122
- Main mouse: Razer Habu
- Favorite switch: Buckling spring
- DT Pro Member: -
It does have a PCB. It's not clear if it's a "smart" or "dumb" controller. Looks like you'd need two interrupts to decode/debounce a bare encoder from the code I've been looking at. I think the encoder you've pointed out is the better way to go. Here's what I think makes sense: you need 8 inputs to implement a full dedicated set of media keys. We have AUX1-AUX5, so we need 3 more.
Using three inputs would do it in two ways- as 3 more standard key inputs that map directly to VOL+, Mute, VOL-, or as 3 inputs from the smart encoder: direction and step decode to VOL+/VOL- and one "button" input for Mute.
Seems simple enough, in theory anyway.
Using three inputs would do it in two ways- as 3 more standard key inputs that map directly to VOL+, Mute, VOL-, or as 3 inputs from the smart encoder: direction and step decode to VOL+/VOL- and one "button" input for Mute.
Seems simple enough, in theory anyway.
- lamune
- Main keyboard: IBM 122
- Main mouse: Razer Habu
- Favorite switch: Buckling spring
- DT Pro Member: -
Incidentally, I tried a Soarer-enhanced keyboard on a KVM (Avocent switchview DVI) and the keyboard won't initialize. If I use one of the "hub" ports, it works but no response via the keyboard console input. The LEDs light up and then go out, and that's all I see happen. Other keyboards work fine, so I wonder what may be going on here.
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
KVMs are fickle... at best they read the 6KRO report, and I guess many are only tested with low-speed USB keyboards (and mice). They certainly only ever present a 6KRO keyboard to the attached computers, and are unlikely to have media key support. They might get startled if the keyboard is swapped while they're on. Etc! I've got an Aten which works with my converter at least for basic 6KRO functionality, but macros can fox it since they replay at 1000Hz and it's only expecting 125Hz.
- lamune
- Main keyboard: IBM 122
- Main mouse: Razer Habu
- Favorite switch: Buckling spring
- DT Pro Member: -
I figured as much. I really don't need the KVM, but it was an interesting test. By the way, do you have the source for the converter up somewhere? I've done some AVR work in the past and I wouldn't mind taking a stab at the rotary encoder work.
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
I want to rewrite some of my USB descriptor handling to be more flexible, so perhaps I'll add a low-speed 6KRO mode at some point. Shame, because apart from KVMs and PS3s the current setup is very compatible with the main OSs. I haven't opened the source yet.
-
- Main keyboard: Leopold White Otaku Tenkeyless /w Soarer converter
- Main mouse: G500
- Favorite switch: MX Browns
- DT Pro Member: -
Been using this converter for about a year now, thanks for all your hard work.
You've made something fantastic and easy to use, and provided it for free.
I'm using this to supplement a keyboard that already supports USB(Leopold Tenkeyless), my interest is in the NKRO over USB, macros, and keymap layers.
After struggling with hasu's converter for hours (probably my fault, but still frustrating), I tried yours and had it working and configured in about 20 minutes.
I even went so far as to hook up the teensy output to the internal USB connector, and it looks completely stock on the outside.
Thanks again, this is perfect for using multiple layouts without changing any OS settings, media keys, and throwing in a numpad layout for my tenkeyless board, on the off chance I actually need the specific numpad keycodes for a program.(it happens)
You've made something fantastic and easy to use, and provided it for free.
I'm using this to supplement a keyboard that already supports USB(Leopold Tenkeyless), my interest is in the NKRO over USB, macros, and keymap layers.
After struggling with hasu's converter for hours (probably my fault, but still frustrating), I tried yours and had it working and configured in about 20 minutes.
I even went so far as to hook up the teensy output to the internal USB connector, and it looks completely stock on the outside.
Thanks again, this is perfect for using multiple layouts without changing any OS settings, media keys, and throwing in a numpad layout for my tenkeyless board, on the off chance I actually need the specific numpad keycodes for a program.(it happens)
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
Yes, this converter is essential. So glad Soarer made it for us all!
I'm finally drilling holes in aluminium for my external multi-input converter box. (Complete with a rotary input switch with vintage knob.) Perhaps I'll put in the trio of lock LEDs. But here's a thought: I've found the Teensy's own light quite informative (for hitting low rollover limits on some boards, and for telling me my data line had failed one time too). Could all three LEDs shine at once as an external version of that handy indicator? I seldom use caps, num or scroll locks myself anyway. A separate LED would be just fine too.
By the way: I have a sweet looking vintage on/off switch too. I'd love to empower my laziness and put that in the box so I can flip the switch and turn the knob to change between keyboards, no plug pulling required. The switch is two pole. Which of the four USB lines do you suggest putting through it or am I just nuts?
I'm finally drilling holes in aluminium for my external multi-input converter box. (Complete with a rotary input switch with vintage knob.) Perhaps I'll put in the trio of lock LEDs. But here's a thought: I've found the Teensy's own light quite informative (for hitting low rollover limits on some boards, and for telling me my data line had failed one time too). Could all three LEDs shine at once as an external version of that handy indicator? I seldom use caps, num or scroll locks myself anyway. A separate LED would be just fine too.
By the way: I have a sweet looking vintage on/off switch too. I'd love to empower my laziness and put that in the box so I can flip the switch and turn the knob to change between keyboards, no plug pulling required. The switch is two pole. Which of the four USB lines do you suggest putting through it or am I just nuts?
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
Thanks randku, glad you like it! Sounds like a really neat build
Muirium, everyone already knows you're nuts
You can wire an extra LED to the PD6 pin if you want, in the same way as the lock LEDs, to make an external copy of the onboard LED.
Switching needs to disconnect at least 3 USB wires, and the data lines must disconnect first, before power (and vice versa when reconnecting). So not really practical, I'm afraid. I'll try and look into what I could do in code... perhaps so you can have a button that resets the converter (without jumping to the bootloader).
Muirium, everyone already knows you're nuts
You can wire an extra LED to the PD6 pin if you want, in the same way as the lock LEDs, to make an external copy of the onboard LED.
Switching needs to disconnect at least 3 USB wires, and the data lines must disconnect first, before power (and vice versa when reconnecting). So not really practical, I'm afraid. I'll try and look into what I could do in code... perhaps so you can have a button that resets the converter (without jumping to the bootloader).
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
Ah, of course! I vaguely remember one of the Teensy's pins being the oddball LED pin. Thanks for reminding me.
An instantaneous (ie. push) button sounds like a good idea. I'll try to find a vintage one of those!
An instantaneous (ie. push) button sounds like a good idea. I'll try to find a vintage one of those!