XT/AT/PS2/Terminal to USB Converter with NKRO
- sealclubber
- Main keyboard: Whatever I made most recently
- Main mouse: N/A
- Favorite switch: Raw copper contacts
- DT Pro Member: -
I am honestly surprised that this is so easy!
Thank you for all of your help
Thank you for all of your help
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
Cool!
I made a little mistake in the last three macros - well, not really a mistake, but... when setting modifiers it's usually more appropriate to just set one of them! So I've edited it now to say ASSIGN_META LCTRL instead of ASSIGN_META CTRL, which would make both controls. (Conversely, when clearing modifiers it's best to do both, so CLEAR_META SHIFT is correct in the other macro).
I made a little mistake in the last three macros - well, not really a mistake, but... when setting modifiers it's usually more appropriate to just set one of them! So I've edited it now to say ASSIGN_META LCTRL instead of ASSIGN_META CTRL, which would make both controls. (Conversely, when clearing modifiers it's best to do both, so CLEAR_META SHIFT is correct in the other macro).
- sealclubber
- Main keyboard: Whatever I made most recently
- Main mouse: N/A
- Favorite switch: Raw copper contacts
- DT Pro Member: -
Gotcha. Just popped in again to tell you everything is working all nice and smooth. The original ideas for remapping most of those other keys was because I thought my control key didn't work... thankfully it was just a matter of cleaning out the housing and it's working nicely now.
Thank you again for all of your great help sir!
Thank you again for all of your great help sir!
- wcass
- Location: Columbus, OH, USA
- Main keyboard: ibm model m
- Main mouse: kensington expert mouse
- Favorite switch: buckeling spring
- DT Pro Member: 0185
feature request:
i know that all of the guys that like trackpoints would like to see a PS2 pass through and keyboard equivalent to left, right, center mouse buttons. i personally am not a trackpoint fan, but i would like to make this:
i know that all of the guys that like trackpoints would like to see a PS2 pass through and keyboard equivalent to left, right, center mouse buttons. i personally am not a trackpoint fan, but i would like to make this:
- wcass
- Location: Columbus, OH, USA
- Main keyboard: ibm model m
- Main mouse: kensington expert mouse
- Favorite switch: buckeling spring
- DT Pro Member: 0185
a trackpoint mod would have bare leads rather than a proper PS2 plug. yes, i could cram a plug, PS2/USB converter, and USB hub and teensy adapter into my jumbo keyboard case, and finally run a single USB out of the case - but it would be better if i could just go from bare lead on trackpoint to bare lead on teensy. hasu included this feature with his origional code, but last i heard he had not used it in a while - but i don't think he is a trackpoint fan.Soarer wrote:Hmm. I might add mousekeys functions at some point (similar to hasu's code), but I'm not sure there's much benefit to adding another PS/2 input for pointer devices (apart from neatness) since existing converters work pretty well for them.
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
Are you sure? I'd only spotted the Mouse Keys ("You can emulates mouse move and button click using keyboard"), and I recall him saying he didn't really find it as useful as he thought it would be.wcass wrote:a trackpoint mod would have bare leads rather than a proper PS2 plug. yes, i could cram a plug, PS2/USB converter, and USB hub and teensy adapter into my jumbo keyboard case, and finally run a single USB out of the case - but it would be better if i could just go from bare lead on trackpoint to bare lead on teensy. hasu included this feature with his origional code, but last i heard he had not used it in a while - but i don't think he is a trackpoint fan.
I know it would be better for you, but you'll need to get a bunch more people to ask for it because it would be quite a lot of work for me!
- wcass
- Location: Columbus, OH, USA
- Main keyboard: ibm model m
- Main mouse: kensington expert mouse
- Favorite switch: buckeling spring
- DT Pro Member: 0185
https://github.com/tmk/tmk_keyboard - Features section, 5th bullet item.
if you have a copy of his code, look for ps2_mouse.c and ps2_mouse.h and maybe usb_mouse.c and h
i dreamt up the idea for the 92key+trackball after reading his feature set but i don't have the programming skill to actually use it (i tried!). i did not have any problems building and customizing your code though and used it for 3 keyboards now.
if you have a copy of his code, look for ps2_mouse.c and ps2_mouse.h and maybe usb_mouse.c and h
i dreamt up the idea for the 92key+trackball after reading his feature set but i don't have the programming skill to actually use it (i tried!). i did not have any problems building and customizing your code though and used it for 3 keyboards now.
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
I'm a fan of trackpoint, sure But it is very difficult to integrate it into my favorite keyboard(HHKB/Poker) mainly because of keycap/case/PCB moding work. If you can use Trackpoint unit with PS/2 interface electrical or firmware part is not big problem. Also, we can obtain detail specification of Trackpoint extension commands to support exotic Trackpoint functions.
I'm currently happy with mousekey as main pointing device and living without real mouse most of the time except for funcy GUI apps. Mousekey is not complete replacement for real mouse, though, it is comfortable to do pointing job without leting my hand leave from keyboard. To be honest, I occasionally use physical mouse unintentionally if it is placed on side of keyboard.
I'm currently happy with mousekey as main pointing device and living without real mouse most of the time except for funcy GUI apps. Mousekey is not complete replacement for real mouse, though, it is comfortable to do pointing job without leting my hand leave from keyboard. To be honest, I occasionally use physical mouse unintentionally if it is placed on side of keyboard.
- Icarium
- Location: Germany
- Main keyboard: These fields just
- Main mouse: opened my eyes
- Favorite switch: I need to bring stuff to work
- DT Pro Member: -
Actually there is another good reason for putting PS/2 through the Teensy but I haven't tried it yet. I would like to
1. be able to flip the coordinates on the trackpoint to have that option for mounting it
2. be able to map the motion to scrolling using a modifier
but I have no idea how much strain that would put on the Teensy and whether it is doable.
1. be able to flip the coordinates on the trackpoint to have that option for mounting it
2. be able to map the motion to scrolling using a modifier
but I have no idea how much strain that would put on the Teensy and whether it is doable.
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
I might pencil it in for v2.0
It sounds like quite a lot of work to do it nicely - detect pointer device type, utilize trackpoint commands if trackpoint, deal with extra buttons / wheels (which are presumably not standardized on PS/2), add some config commands... and all of that after adding a mouse endpoint with all the bells and whistles so everything can be output, mousekeys for testing that, and optimizing my PS/2 code so that two of it can run at once. Not to mention a real risk of introducing bugs into code that's been pretty well tested by now, and dealing with them
It sounds like quite a lot of work to do it nicely - detect pointer device type, utilize trackpoint commands if trackpoint, deal with extra buttons / wheels (which are presumably not standardized on PS/2), add some config commands... and all of that after adding a mouse endpoint with all the bells and whistles so everything can be output, mousekeys for testing that, and optimizing my PS/2 code so that two of it can run at once. Not to mention a real risk of introducing bugs into code that's been pretty well tested by now, and dealing with them
- suka
- frobiac
- Location: Germany
- Main keyboard: custom split ergonomic "RedTilt"
- Main mouse: IBM trackpoint
- Favorite switch: MX red
- DT Pro Member: 0046
I have used exactly such a setup in my custom board for the last couple of months, and it has been reliable and very responsive, so the Teensy is definitely capable of handling PS/2 in addition to the general keyboard functions. Implementation of these two features is also fairly trivial if you start with some established PS/2 code. And the trackpoint specifics are not that hard to implement thanks to the great reference manual of IBM that was already mentioned - that's where I got the idea to use press-to-select as a scrolling modifier from in the first placeIcarium wrote:I would like to
1. be able to flip the coordinates on the trackpoint to have that option for mounting it
2. be able to map the motion to scrolling using a modifier
but I have no idea how much strain that would put on the Teensy and whether it is doable.
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
Heh, I'm not saying it would be hard, just that it would take time
And I don't even have a trackpoint module!
To match the ethos of my keyboard code, I'd want it to handle most different PS/2 pointing devices without recompilation. That takes more effort, but allows people to do just a little DIY and get stuff working without having to learn how to compile and tweak the source code.
And I don't even have a trackpoint module!
To match the ethos of my keyboard code, I'd want it to handle most different PS/2 pointing devices without recompilation. That takes more effort, but allows people to do just a little DIY and get stuff working without having to learn how to compile and tweak the source code.
- fossala
- Elite +1
- Location: UK
- Main keyboard: HHKB Type-S
- Main mouse: Rollermouse Free2
- Favorite switch: Topre
- DT Pro Member: -
I've got a teensy coming for a 122 key terminal M. What would be the best way to connect it inside the case? Should I strip the wire or just remove the wire completely? What pins/wires are which?
- wcass
- Location: Columbus, OH, USA
- Main keyboard: ibm model m
- Main mouse: kensington expert mouse
- Favorite switch: buckeling spring
- DT Pro Member: 0185
I installed a teensy inside the case of my keyboard. i'll post pictures of how i did it when i get home.fossala wrote:I've got a teensy coming for a 122 key terminal M. What would be the best way to connect it inside the case? Should I strip the wire or just remove the wire completely? What pins/wires are which?
Icarium wrote:Actually there is another good reason for putting PS/2 through the Teensy but I haven't tried it yet. I would like to
1. be able to flip the coordinates on the trackpoint to have that option for mounting it
i would like this too. i am making a trackball out of a generic mouse, so one axis needs to be swapped. i could do it through a modified driver, but would prefer to use native drivers and be plug and play. the mouse buttons will be unused and instead i will be using regular keyboard keys.Soarer wrote:To match the ethos of my keyboard code, I'd want it to handle most different PS/2 pointing devices without recompilation. That takes more effort, but allows people to do just a little DIY and get stuff working without having to learn how to compile and tweak the source code.
- wcass
- Location: Columbus, OH, USA
- Main keyboard: ibm model m
- Main mouse: kensington expert mouse
- Favorite switch: buckeling spring
- DT Pro Member: 0185
This is what i did and it has worked very well for me. You will need a 6' USB A-to-miniB cable. I just use old cell phone cables.fossala wrote:I've got a teensy coming for a 122 key terminal M. What would be the best way to connect it inside the case? Should I strip the wire or just remove the wire completely? What pins/wires are which?
1. Cut the wire about 6” from the case.
2. Disassemble the case. The wire might be a bit tight – if so, lift the plastic piece around the grommet straight up while holding the cable and grommet down. The grommet should slide out the bottom of the plastic piece. Remove the wires from the controller. You might need to temporarily remove a mounting screw. 3. Pull the wires free of the wire casing if they come easily. Use a razor to slice the rubber grommet on one of the long sides (top or bottom). Slice all the way to the wire casing. Open the slice and pull the wire casing off of the grommet. Slide your USB cable into the grommet and check the fit. You may want to ream the hole to improve the fit. 4. Using the wires pulled free from the casing, attach as follows: black=VCC, white=GND, red=PD0, yellow=PD1. I prefer to use the VCC and GND from the pins furthest away from the USB port for this. I also like a caps-lock LED so I make a connection to GND and PF5. I feed the LED to a light pipe that replaces one of the rivets directly below the caps-lock key. Wrap the Teensy with electrical tape. 5. Attack the plug to the pins and USB cable and reassemble the case.
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
That's excellent, wcass!
I'll just add my usual caveat about not trusting the wire colours - check that yours has them going to the same pins on the connector!
If you don't want to hack at the original cable you could try and find a connector to fit, or solder to the connector's solder pads on the back of the PCB (if you're confident with your soldering).
I'll just add my usual caveat about not trusting the wire colours - check that yours has them going to the same pins on the connector!
If you don't want to hack at the original cable you could try and find a connector to fit, or solder to the connector's solder pads on the back of the PCB (if you're confident with your soldering).
- fossala
- Elite +1
- Location: UK
- Main keyboard: HHKB Type-S
- Main mouse: Rollermouse Free2
- Favorite switch: Topre
- DT Pro Member: -
OK, the teensy turned up yesterday. I've stripped the wires ready for doing the soldering at the weekend. When I load the code is all that I need to load is the hexfiles? I then use scas to assemble the config file and then load it using scwr? Do I need to load a config file for it to work or can I just use the hexfile and get a basic working converter?
-
- Location: Belgium, land of Liberty Wafles and Freedom Fries
- Main keyboard: G80-3K with Clears
- Favorite switch: Capacitative BS
- DT Pro Member: 0049
It should work fine without a config loaded. Only when you got some ancient keyboard like a model F PC / terminal keyboard will it be needed to get some keys like Print Screen or Break to work.
The config file is mostly used for macros, function layers or to remap e.g. caps lock to control.
The config file is mostly used for macros, function layers or to remap e.g. caps lock to control.
- Vierax
- Location: France (Lille)
- Main keyboard: Tipro MID KM128 Bépo layout
- Main mouse: Kensington Orbit Trackball
- Favorite switch: MX Clear / MX Grey (under thumbs)
- DT Pro Member: -
- Contact:
Hello, just a noob in C (in Python too but work in progress for both…) so I might missunderstand the code.
I was just wondering if with this code the Teensy still sends keycodes or characters?
With appropriate drivers, a keyboard can have any layout like Neo, bépo… but not directly in hard except for the US qwerty dvorak colemak and workman which are ASCII, am I right ? (It sounds obvious to me and it's just to be sure)
I saw only the 4 modifiers but is it possible to add a key and make a "Fn" layout in hard with a Teensy ? If yes, by passing through the serial I suppose, or may be sacrificing the CJK modifier keys as Henkan, Muhekan ?
thx for replies
I was just wondering if with this code the Teensy still sends keycodes or characters?
With appropriate drivers, a keyboard can have any layout like Neo, bépo… but not directly in hard except for the US qwerty dvorak colemak and workman which are ASCII, am I right ? (It sounds obvious to me and it's just to be sure)
I saw only the 4 modifiers but is it possible to add a key and make a "Fn" layout in hard with a Teensy ? If yes, by passing through the serial I suppose, or may be sacrificing the CJK modifier keys as Henkan, Muhekan ?
thx for replies
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
It still sends keycodes, so yes, the sensible layouts to do in hardware are those which are mainly key-swapping (colemak etc). Macros can do a lot more than key-swapping of course, but it would require so many of them for something like bépo that a driver on the host makes a lot more sense.
You can define up to 8 keys as Fn keys, giving a theoretical total of 255 extra layers! You'd run out of memory long before that though (both your own and the converter's ). There's three parts to defining a layer, this example is in the configs directory:
That's actually a bit inconsistent, because I've defined what happens with FN2 as well as FN1, but I haven't defined a FN2. The last remapblock could be replaced by this one to use the Windows keys as FN keys:
You can define up to 8 keys as Fn keys, giving a theoretical total of 255 extra layers! You'd run out of memory long before that though (both your own and the converter's ). There's three parts to defining a layer, this example is in the configs directory:
Code: Select all
# basic layer example - cursors on r.h. home position when caps lock is held
# define that FN1 accesses layer 1
layerblock
FN1 1
FN2 1 # in case FN2 is used as well, define it as an alternative
FN1 FN2 1 # both together still gets layer 1
endblock
# the layer itself is just some remaps tagged with the layer number
remapblock
layer 1
I UP
J LEFT
K DOWN
L RIGHT
endblock
# need to map the FN key into the base layer (0)
remapblock
layer 0
CAPS_LOCK FN1
endblock
Code: Select all
# need to map FN keys into the base layer (0)
remapblock
layer 0
LGUI FN1
RGUI FN2
endblock
- Vierax
- Location: France (Lille)
- Main keyboard: Tipro MID KM128 Bépo layout
- Main mouse: Kensington Orbit Trackball
- Favorite switch: MX Clear / MX Grey (under thumbs)
- DT Pro Member: -
- Contact:
Oh yeah macros, that's clever ! You just need a referential layout who can handle the whole signs as « ¨+u=ü » (seems not so easy to find this pearl) or to display the unicode shortcut but it sounds difficult as different OS have different Unicode shortcuts and this kb is useless during POST and terminal sessions :/
255 Fn layers ! Oo Well, it's better to think larger to provide any request but it's a way too much here
Thx for the code, that's pretty clear. Now this part of the program doesn't seems difficult
255 Fn layers ! Oo Well, it's better to think larger to provide any request but it's a way too much here
Thx for the code, that's pretty clear. Now this part of the program doesn't seems difficult
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
Hmm, true, and being OS specific would make it a bit pointless really, unless you weren't allowed to install a keyboard layout on the OS.
255 layers just follows from the method of implementation... I wanted to allow using 4 layers, and having left and right Fn keys for each. So that's 8 Fn keys, which could be 255 layers, but is far more likely to be 4
255 layers just follows from the method of implementation... I wanted to allow using 4 layers, and having left and right Fn keys for each. So that's 8 Fn keys, which could be 255 layers, but is far more likely to be 4
- Vierax
- Location: France (Lille)
- Main keyboard: Tipro MID KM128 Bépo layout
- Main mouse: Kensington Orbit Trackball
- Favorite switch: MX Clear / MX Grey (under thumbs)
- DT Pro Member: -
- Contact:
Yes the simplest way seems to have hard dvorak and colemak and combining the hard qwerty with a layout driver. With a soft like PKL, you don't have to be admin to use an exotic layout on Windows, and on Linux you can add one in your home repository. For MacOS or BSD I have no idea but may be it's the same than Linux as they're part of Unix family.
For the 255 hypothetic layers, I followed you in the calculation I think that 4 layers layout is ever well enough, after more than 6 (Neo) it seems to be hard to remember (as you said)
I should go back to my C learning lessons now
For the 255 hypothetic layers, I followed you in the calculation I think that 4 layers layout is ever well enough, after more than 6 (Neo) it seems to be hard to remember (as you said)
I should go back to my C learning lessons now