Teensy Coding (M122 key mapping)
- Go-Kart
- Location: England
- Main keyboard: HHKB & AnyKey
- Main mouse: Orochi v2
- Favorite switch: Topre 45 g & MaxiSwitch D/S
So I have a brilliant M122 (thanks Muirium!), have built a terminal to USB with a Teensy 2.0 and been using the keyboard with the ATmega32U4 firmware. All good.
My next mission was to map useful functions outside of the standard alphas/mods to the additional F keys, etc. and to remap some keys with odd placements (e.g. Num Lock outputs Escape). I've got HID Listen, can see the scan codes. I have the Soarer code table, I have the config files and the scaswr tool. I'm just a little stuck on what exactly to do next. After perusing the legacy.sc config, I spotted that that may remap some of the functionality I wanted so I tried to load it onto scaswr but nothing seems to happen.
My thinking was I could then simply copy and modify the legacy config file to my needs and then I'd be set. I've tried searching the forums and Wiki, along with YouTube too; I've been over the Soarer's site and I can't figure out where I'm going wrong. This is my first try at such a thing and although I have decent instincts, I'm on the edge of my understanding as it is. If someone could please point me to a thread or give me a hint where I'm going wrong, that would be greatly appreciated!
Thanks,
Adam
My next mission was to map useful functions outside of the standard alphas/mods to the additional F keys, etc. and to remap some keys with odd placements (e.g. Num Lock outputs Escape). I've got HID Listen, can see the scan codes. I have the Soarer code table, I have the config files and the scaswr tool. I'm just a little stuck on what exactly to do next. After perusing the legacy.sc config, I spotted that that may remap some of the functionality I wanted so I tried to load it onto scaswr but nothing seems to happen.
My thinking was I could then simply copy and modify the legacy config file to my needs and then I'd be set. I've tried searching the forums and Wiki, along with YouTube too; I've been over the Soarer's site and I can't figure out where I'm going wrong. This is my first try at such a thing and although I have decent instincts, I'm on the edge of my understanding as it is. If someone could please point me to a thread or give me a hint where I'm going wrong, that would be greatly appreciated!
Thanks,
Adam
- 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: µ
Soarer's converter can handle this, no bother! What you need in your config file is a remapblock something like this:
These are straight out of my own config file. Change them to whatever you like.
Layer 0 is the default layer: that means these are automatically active. So all you have to do is use hid_listen to find the keycode of each key you want to remap, and then assign it something useful from the list. Then build with scas and write to your keyboard with scwr.
I included the keycode file list in my 64-bit tools thread. Just click the spoiler button by codes to see the whole list.
Code: Select all
remapblock
layer 0
insert fn1
caps_lock lctrl
lctrl lalt
lalt lgui
ralt rgui
rctrl ralt
num_lock select_1 # Toggle numpad to navigation block
printscreen mute # Media keys where I expect them
scroll_lock volume_down
pause volume_up
endblock
Layer 0 is the default layer: that means these are automatically active. So all you have to do is use hid_listen to find the keycode of each key you want to remap, and then assign it something useful from the list. Then build with scas and write to your keyboard with scwr.
I included the keycode file list in my 64-bit tools thread. Just click the spoiler button by codes to see the whole list.
- depletedvespene
- Location: Chile
- Main keyboard: IBM Model F122
- Main mouse: Logitech G700s
- Favorite switch: buckling spring
- DT Pro Member: 0224
- Contact:
If you want, unzip my collection of SC files into a directory, open F122_and_M122.sc with a text editor and start perusing. All files are thoroughly documented, so you shouldn't have any problems understanding how to make changes to better serve your own needs and whims.Go-Kart wrote: 10 Mar 2021, 15:47 So I have a brilliant M122 (thanks Muirium!), have built a terminal to USB with a Teensy 2.0 and been using the keyboard with the ATmega32U4 firmware. All good.
My next mission was to map useful functions outside of the standard alphas/mods to the additional F keys, etc. and to remap some keys with odd placements (e.g. Num Lock outputs Escape). I've got HID Listen, can see the scan codes. I have the Soarer code table, I have the config files and the scaswr tool. I'm just a little stuck on what exactly to do next. After perusing the legacy.sc config, I spotted that that may remap some of the functionality I wanted so I tried to load it onto scaswr but nothing seems to happen.
My thinking was I could then simply copy and modify the legacy config file to my needs and then I'd be set. I've tried searching the forums and Wiki, along with YouTube too; I've been over the Soarer's site and I can't figure out where I'm going wrong. This is my first try at such a thing and although I have decent instincts, I'm on the edge of my understanding as it is. If someone could please point me to a thread or give me a hint where I'm going wrong, that would be greatly appreciated!
Thanks,
Adam
- Go-Kart
- Location: England
- Main keyboard: HHKB & AnyKey
- Main mouse: Orochi v2
- Favorite switch: Topre 45 g & MaxiSwitch D/S
Thanks very much, guys! This isn't quite my problem though. I can just about handle the editing of the .sc files (although I may not have to now, thank you very much
). It's the how to put the .sc file onto the Teensy. When I hit scas.exe, nothing happens (I've checked and Bitdefender ain't blocking it). When I hit scaswr.bat it opens command line, says, "Assembling" , etc. but I can't insert or do anything. It just says "Press any key to continue..." I press a key and it closes.
It's getting the the .sc file onto the Teensy that's stumping me.

It's getting the the .sc file onto the Teensy that's stumping me.
- 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: µ
Run scas and scwr separately. scaswr is just a batch file that runs them sequentially, and may be hiding errors from your view.
Oh, and try running scinfo to check the converter is running correctly on your Teensy. That always helps!
Oh, and try running scinfo to check the converter is running correctly on your Teensy. That always helps!

- Go-Kart
- Location: England
- Main keyboard: HHKB & AnyKey
- Main mouse: Orochi v2
- Favorite switch: Topre 45 g & MaxiSwitch D/S
Oh I've tried
When I hit any of the executable files in the Soarer tools folder, either nothing happens or cmd briefly flashes up for a split second then disappears! I've tried opening as administrator too. scaswr is the only one that opens and stays open.
This makes me think that it may be a computer issue... Bloody Windows. I'll jump on my laptop and investigate.

This makes me think that it may be a computer issue... Bloody Windows. I'll jump on my laptop and investigate.
- depletedvespene
- Location: Chile
- Main keyboard: IBM Model F122
- Main mouse: Logitech G700s
- Favorite switch: buckling spring
- DT Pro Member: 0224
- Contact:
Start up a command line window (cmd.exe) and work from there, not from Windows Explorer. Pass the .sc file as an argument to the .bat file.Go-Kart wrote: 10 Mar 2021, 18:02 Oh I've triedWhen I hit any of the executable files in the Soarer tools folder, either nothing happens or cmd briefly flashes up for a split second then disappears! I've tried opening as administrator too. scaswr is the only one that opens and stays open.
This makes me think that it may be a computer issue... Bloody Windows. I'll jump on my laptop and investigate.
-
- Location: USA
- Main keyboard: CM Storm Stealth
- Main mouse: Elecom HUGE
- Favorite switch: Buckling spring
I really do wonder what was up when the M122 configuration was decided on. The entire numpad is a trainwreck. I can imagine how it went after months of developing the hardware and other layouts Soarer gets to that thing and just goes "Nah, if they want this behemoth they can deal with it themselves." 

- Go-Kart
- Location: England
- Main keyboard: HHKB & AnyKey
- Main mouse: Orochi v2
- Favorite switch: Topre 45 g & MaxiSwitch D/S
lol. O.K. gents, I was close to a headache but I've got it all working! I now also know how to pass sc files as arguments to bat files!
I'm gonna put every F to work
Thanks the help!
I'm gonna put every F to work

Thanks the help!
- 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: µ
Well done! You’re learning the zen of Soarer now. May the forced scan codes be with you.
I think we actually need a complete n00bs guide for Soarer, given how “passing arguments” on the command line is not everyone’s native language any more. Folk just double click like Windows taught them.
Correct. Open your terminal and type the commands. The GUI is not helping you here!depletedvespene wrote: 10 Mar 2021, 18:21Start up a command line window (cmd.exe) and work from there, not from Windows Explorer. Pass the .sc file as an argument to the .bat file.Go-Kart wrote: 10 Mar 2021, 18:02 Oh I've triedWhen I hit any of the executable files in the Soarer tools folder, either nothing happens or cmd briefly flashes up for a split second then disappears! I've tried opening as administrator too. scaswr is the only one that opens and stays open.
This makes me think that it may be a computer issue... Bloody Windows. I'll jump on my laptop and investigate.
I think we actually need a complete n00bs guide for Soarer, given how “passing arguments” on the command line is not everyone’s native language any more. Folk just double click like Windows taught them.
Actually, look at Soarer’s key code list and you’ll see it’s all there. The 122s are just doing their thing. Wacky as it is. The F122s did it all before them, remember.micmil wrote: 10 Mar 2021, 19:15 I really do wonder what was up when the M122 configuration was decided on. The entire numpad is a trainwreck. I can imagine how it went after months of developing the hardware and other layouts Soarer gets to that thing and just goes "Nah, if they want this behemoth they can deal with it themselves."![]()
-
- Location: USA
- Main keyboard: CM Storm Stealth
- Main mouse: Elecom HUGE
- Favorite switch: Buckling spring
I know, I'm just riffing on the oddball mapping compared to what we would mentally expect today. I can't tell you how many times I've hit F13 looking for ESC, for example, and that numpad mapping is just plain wacky.Muirium wrote: 10 Mar 2021, 19:34 Actually, look at Soarer’s key code list and you’ll see it’s all there. The 122s are just doing their thing. Wacky as it is. The F122s did it all before them, remember.
The command line was deprecated in major use sometime around '73 when PARC developed the Alto. It's just taken some people a while to catch up. Like "sysadmins" and "developers," whoever they are.I think we actually need a complete n00bs guide for Soarer, given how “passing arguments” on the command line is not everyone’s native language any more. Folk just double click like Windows taught them.

- 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: µ
You’re quite right. What we really want is a GUI for Soarer’s converter. The way he designed it—no need to reflash just to remap—is actually very nicely aligned with a live running config interface.
Xwhatsit managed that, with his cap sense controller hardware too. But his Qt app doesn’t run on current Macs any more and I’ve no idea how to rebuild it.
Xwhatsit managed that, with his cap sense controller hardware too. But his Qt app doesn’t run on current Macs any more and I’ve no idea how to rebuild it.
- depletedvespene
- Location: Chile
- Main keyboard: IBM Model F122
- Main mouse: Logitech G700s
- Favorite switch: buckling spring
- DT Pro Member: 0224
- Contact:
Words of true ignorance right there.micmil wrote: 10 Mar 2021, 21:27 The command line was deprecated in major use sometime around '73 when PARC developed the Alto.
Don't confuse "text-only screen" with "command line interface".
- Go-Kart
- Location: England
- Main keyboard: HHKB & AnyKey
- Main mouse: Orochi v2
- Favorite switch: Topre 45 g & MaxiSwitch D/S
I feel I have the very minimum amount of computer knowledge enough to muddle my way through something like what I was doing today. God help any newly minted vintage keyboard enthusiast who know even less than I do! Though I suppose that's where pre-made Soarer's converters come in, right?
- depletedvespene
- Location: Chile
- Main keyboard: IBM Model F122
- Main mouse: Logitech G700s
- Favorite switch: buckling spring
- DT Pro Member: 0224
- Contact:
I know a lot and I still prefer pre-made Soarer's converters, as knowledge ain't no match against thick, clumsy fingers (like mine are).Go-Kart wrote: 10 Mar 2021, 23:16 I feel I have the very minimum amount of computer knowledge enough to muddle my way through something like what I was doing today. God help any newly minted vintage keyboard enthusiast who know even less than I do! Though I suppose that's where pre-made Soarer's converters come in, right?

- 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: µ
To actually program one of those pre-made Soarer's, your clumsy fingers are still going to have to work the command line…
People aren't "ignorant" of the old ways of computers, so much as we nerds can be ignorant of why the hell they should know all these things which died before they were born!
People aren't "ignorant" of the old ways of computers, so much as we nerds can be ignorant of why the hell they should know all these things which died before they were born!

- depletedvespene
- Location: Chile
- Main keyboard: IBM Model F122
- Main mouse: Logitech G700s
- Favorite switch: buckling spring
- DT Pro Member: 0224
- Contact:
Well, of course... that's why I like keyboards with a strong tactile response, like Model F and M keyboards.Muirium wrote: 10 Mar 2021, 23:53 To actually program one of those pre-made Soarer's, your clumsy fingers are still going to have to work the command line…
Sure, but that kind of thinking applies to things like a slide rule, not to the command line...Muirium wrote: 10 Mar 2021, 23:53 People aren't "ignorant" of the old ways of computers, so much as we nerds can be ignorant of why the hell they should know all these things which died before they were born!![]()
ShiRting aside, the Soarer's Converter's documentation is lacking in several areas, which we could work on.
-
- Location: USA
- Main keyboard: CM Storm Stealth
- Main mouse: Elecom HUGE
- Favorite switch: Buckling spring
Because, of course, anyone with a different opinion from yours is "ignorant." It's not decades of experience coming to a different conclusion, ever.depletedvespene wrote: 10 Mar 2021, 22:52 Words of true ignorance right there.
Don't confuse "text-only screen" with "command line interface".
It applies equally. Someone out there uses a slide rule on the daily. It may be to clean out their ears, but they're using it.Sure, but that kind of thinking applies to things like a slide rule, not to the command line...
Definitely. I see some of the stuff other people put together and wonder where in the documentation that is and it turns out it came from a forum post they read back in aught-five.ShiRting aside, the Soarer's Converter's documentation is lacking in several areas, which we could work on.

Also, it's a good idea to remember I exaggerate my opinion just enough to get up the maximum amount of noses.

- depletedvespene
- Location: Chile
- Main keyboard: IBM Model F122
- Main mouse: Logitech G700s
- Favorite switch: buckling spring
- DT Pro Member: 0224
- Contact:
Well, YOU are the one claiming the command line interface has been "deprecated" "since 1973" because of the development of the first GUI, so...micmil wrote: 11 Mar 2021, 01:22Because, of course, anyone with a different opinion from yours is "ignorant." It's not decades of experience coming to a different conclusion, ever.depletedvespene wrote: 10 Mar 2021, 22:52 Words of true ignorance right there.
Don't confuse "text-only screen" with "command line interface".
Then don't defend yourself by claiming as "differing opinions" facts that don't suit you.micmil wrote: 11 Mar 2021, 01:22 Also, it's a good idea to remember I exaggerate my opinion just enough to get up the maximum amount of noses.![]()
Weeeeeeeeeell... some of the documentation I've seen would be improved if it were man pagey.micmil wrote: 11 Mar 2021, 01:22Definitely. I see some of the stuff other people put together and wonder where in the documentation that is and it turns out it came from a forum post they read back in aught-five.ShiRting aside, the Soarer's Converter's documentation is lacking in several areas, which we could work on.It's far from the worst, that's for certain, but it can be made much more straightforward and less "man pagey" for lack of a better term.
Let's focus on that instead of one-up-trolling.
-
- Location: USA
- Main keyboard: CM Storm Stealth
- Main mouse: Elecom HUGE
- Favorite switch: Buckling spring
"Don't one-up-troll after my one-up-troll!"
Anyway, back to the actual off-topic, so we at least agree the documentation is weak and that a GUI tool would be ideal. Hooray. I can help on the documentation (who would have guessed I have a knack for dumbing things down?) once I feel I'm up to speed with how the thing actually operates.
It's weird to me how Soarer's convertor is one of the most common tools in the hobby but the wiki page is essentially empty. Is there any reason it couldn't be used as a repository for all of this info? I have no idea what is and is not considered appropriate content.

Anyway, back to the actual off-topic, so we at least agree the documentation is weak and that a GUI tool would be ideal. Hooray. I can help on the documentation (who would have guessed I have a knack for dumbing things down?) once I feel I'm up to speed with how the thing actually operates.
It's weird to me how Soarer's convertor is one of the most common tools in the hobby but the wiki page is essentially empty. Is there any reason it couldn't be used as a repository for all of this info? I have no idea what is and is not considered appropriate content.
- 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: µ
Soarer’s docs (included in his original zip file) should really all be on the wiki, then separate pages written to illustrate the good stuff everyone wants to know.
I say “should” instead of jumping in to do it myself because I’ve a bad habit of writing looooooong essays with stories all their own instead of short, sweet, straightforward docs. Not a strength of mine!
I say “should” instead of jumping in to do it myself because I’ve a bad habit of writing looooooong essays with stories all their own instead of short, sweet, straightforward docs. Not a strength of mine!
-
- Location: USA
- Main keyboard: CM Storm Stealth
- Main mouse: Elecom HUGE
- Favorite switch: Buckling spring
That's a good call. It would be pretty easy to do that. I could get the info basically moved over verbatim over the weekend then work through breaking it down into different pages for the different aspects.