Oct 31, 201610891 views

Programming the Red Scarf Keyboards


Introduction First off, GeekHack users azhdar and Ryu and kai1103 have done most of the grunt work in organizing a lot of the data on how programming the Red Scarf series of boards works on this GeekHack thread (https://geekhack.org/index.php?topic=69282.0). Definitely a thread worth checking out for more information! Please make sure to get the manual by kai1103 as well, it is a PDF available for download in the linked GH thread!
For this guide I have been using a Red Scarf II( (96 key layout) but this should work for the other keyboards in the series as well. I will update it once I get the other keyboards to tinker with if needed.
I have made the raw data available for KLE for all possible layouts available to download at the bottom of the page. For some layouts I will go ahead and include the FN Import text for TMK and the .eep files .
Overview The Red Scarf keyboards are relatively easy to program once you understand the process. You will be using Keyboard Layout Editor (KLE), an online layout creation tool, and TMK Keymap Generator, another online tool that will actually create the configuration file to be flashed to the keyboard.
In this guide I will be going over the easiest way I've found to create a layout and flash it to the keyboard. Obviously one of the key selling points to the RS keyboards are the fact that they have quite a few possible layouts. Here are the possible ones for the RS96 that I built:

Because there are so many different layouts available, creating your own physical layout is just half the battle, afterwards you will need to make sure the keyboard recognizes the keys in the way that you want it to. This guide will go over how to do just that.
Creating Your Keyboard Layout in Keyboard Layout Editor Keyboard Layout Editor (http://www.keyboard-layout-editor.com/) is an excellent online tool that can be used for a variety of things. We will be using it to create the layout for the Red Scarf. To begin, you will need to perfectly replicate the layout of your keyboard in KLE. The easiest way I have found to do this is go to Preset -> ANSI 104 and edit the keyboard to match the Red Scarf Layout from there. (If you need help using KLE be sure to read the Help and Keyboard Shortcuts at the bottom right of the page). Be sure to perfectly replicate the physical layout of your keyboard.
  • Note: During this stage while you are setting up your keyboard layout, go ahead and label the spacebar as space in the top legend slot. Without doing this the space bar will not register after flashing the new layout to the keyboard.
This is what my layout came out looking like:

Creating Your FN Layer In Keyboard Layout Editor There are actually three ways to create FN layers in KLE that can be ported into TMK, but for this guide I will be showing you the one that I found to be the easiest called a simple layout. To begin, you will want to choose the key you want to act as your FN key, and label it fn0. In my case, you can see in the image above that I am using the Right CTRL key as my FN key.
The simple layout FN layer is created by putting any keys or controls that you want to be on the FN layer onto the front legend of the corresponding key. Please use ONLY the labels allowed by TMK, for a full list of available labels see the TMK help page (http://tkg.io/#help)
  • Note: Before going nuts with the FN keys, I should note that Fn1-Fn24 are used by the remote for lighting controls, leaving you Fn25-Fn32 to use as you please.
Having a remote for the Red Scarf keyboard can be a fun little trick to have, but honestly I don't want to have to rely on a remote every time I want to change the color of SMD LED's on the bottom of the PCB every time. It is possible to program every single button from the remote right into the FN layer of the Red Scarf. The remote cooresponds to the Fn# as shown in this image by azhdar:

So, for now all that you need to do is put Fn1-Fn24 onto the front legend of the caps you want to control in KLE. If you take a closer look at my layout above you will notice that I grouped my reds, blues, and greens all together and then grouped the lighting control functions together. This just made it easy for me to remember on the go, but you can put them anywhere you'd like.
  • I would STRONGLY recommend that you login to GitHub or sign up for GitHub so that you can save your newly created layout in KLE. This will allow you to create multpile layouts to try, or allow you to pull up the current layout of your keyboard again if you need to. Save often!
Creating the Configuration File In TMK Keymap Generator Keeping the KLE tab open in your browser, head over to TMK Keymap Generator (http://tkg.io/#). The very first thing to do when hitting the page is to select the keyboard you are creating a layout for in the General - Keyboard tab. In my case it was the RedScarfIII.
Next under Layer - Layer Mode select Simple. This is telling TMK that you want to use the front legends as the FN layer essentially.


Finally it is time to post the raw data from KLE into the Composite Layer box. Open up your KLE tab again and click on the raw data tab under the keyboard layout. Select and copy all, and post it into the Composite Layer box. If done correctly, wait a few seconds and you should see a string of FN options appear in TMK Keymap Generator.
The FN layer is where you will actually define what the Fn's do that you set in KLE. Setting up the lighting is the major task that I will show you how to configure.
First, set the Fn0 as Layer action > momentary and select layer 1 in the second drop-down box. This will set up the key as a standard Fn key able to access the Fn layer (any key on the front legend's in KLE).
To set up the lighting simply copy the Fn actions as seen in my image below:


Now that lighting has been set up, finish selecting what any additional Fn's you may have added should do.
Flashing The Keyboard The Red Scarf boards should ship with the newest firmware already on them, and we are not flashing new firmware to the keyboards. This is a good thing, because if you screw up the process you won't brick the keyboard. All we will be flashing is a configuration file (.eep) and not the firmware (.hex) file.
If you have entered in all of the information correctly you should see the Download .eep file at the bottom of the page go from grey to green. TMK Keymap Generator will not allow you to have errors in your layout.
  • Note: the most common errors you will get will come from having the wrong labels used in KLE, and TMK can't recognize them. Should this happen simply fix the errors in your KLE file and paste the corrected raw data into the box.
After you have downloaded the .eep file open up Notepad. After you have Notepad open find the .eep file in the file broswer and drag it into Notepad.

Now all that is left to do is flash the file to the keyboard. To do this put the keyboard in bootloader mode (plug the keyboard in holding the top left key - the Caps Lock LED will flash if there is one installed). Then in notepad File - Print - Generic / Text Only. If successful the Caps Light will flash rapidly and then turn off. All that is left is to unplug the keyboard and plug it back in normally, and the new layout should be instantly available.
Questions and Updates Should any new information get added to this guide I will make note of it here with the date of the edit to keep it easy for everyone to have the most current information. I will also make any updates needed as I get other keyboards in the series.
I will be working on some KLE files of the most popular layouts along with .eep files to go with them and share them on my GitHub when I have time.
If you have any questions feel free to contact me here, on GeekHack, Deskthority, Reddit, or from my website KeyChatter.com.
  • Added all layouts w/ raw data to copy/past into KLE.

Layouts w/ .eep Files To Download I will make a few layouts and have them available to download from here. Remember, the physical layout of your keyboard will have to match the layout of the .eep file exactly or it won't work correctly.
Winkeyless w/ Arrow keys (7u Spacebar)

Or if you want to tinker with my layout a bit:

Winkeyless w/o Arrow Keys (7u Spacebar)

6.25u Spacebar w/ Arrow keys


Standard 6.25u Layout w/o Arrow Keys

6u Spacebar w/ Arrow Keys

Bé Thỏ, tulbot, and 23 others

I must have built up static electricity walking around the office, and when I sat down and started to type, I shocked my Red Scarf III. Now when i hit some of the keys, I get strange output like '4rfc' instead of r. I don't think my ESC key is working so I can't get into boot loader / printer mode when I hold ESC and plug it in. It's always just recognized as RedScarfIII. Is there any way to FORCE it into bootloader mode so I can reflash the key layout and hopefully save this board?
Load 1 more comment
I gave up and got a new board. Never again with RedScarf
I've had mine for 2 years or so, perfectly fine until today.. based on some basic scouring of the message boards, it reads like a fried PCB... oh well, I'll just have to use one of the 8 other keyboards within reach...
Whenever I try to add the keyboard for firmware update, Windows 10 identifies it as a, "RedScarf HID EEPROM" Unspecified device. Is there a trick to make it show up as a printer?
Can someone kindly post the article's KLE downloads on pastebin and NOT tinyupload. All of the tinyupload links are dead.
Since the links for the FN code are now dead, here's the FN codes shown in the article:
This doesn't include any backlight functions, which you may want to add to FN25-FN28
Does anyone have the same issue? I can't figure it out what is "POSITION MISMATCH" in this case!

I'm having trouble getting a num lock indicator working. Is this supported by the firmware? My caps lock indicator is working fine, and flashes when in bootloader mode.
Load 2 more comments
that would do it. I can try to take a look this week at mine and see what it is using
thanks man! I appreciate it
I am running windows 10 and am unable to install the printer driver to flash the keyboard - my backlight isn't working T.T
Load 5 more comments
did you ever get this working? Im trying to program one now. basically having the same issue you describe
Nope. No one ever helped me. I just lived without back lighting until i got a new case/board. Very dissapointed that no one even othered to respond. I scoured the internet looking for answers, but found none.
what is the difference between uploading an EPP and flashing with a HEX? I understand flashing, your replacing the basic code on the processor and loosing the original. My question is what is an EPP? Is this software executed by the firmware or as you say a "configuration file"? Can an EPP by compiled from QMK or only TMK?
Will QMK work or only TMK?
I keep getting "no matching keys" errors for the numbers on my numpad when pasting the KLE raw data into tkg.io. I've modified the layout a bit, but it doesn't seem like it shouldn't work. Strangely I get similar errors even when pasting in some of the sample KLE's provided above.
Here is the raw data for my layout, can anyone figure out what I'm doing wrong?


I think I think i figured it out. I didn't realize that the numpad numbers need to have their 'Bottom Legend' filled out with whats indicated on the tgk.io help page. I guess that's the only way it can delineate between top row numbers and numpad numbers.
For those having issues, I would recommend using https://tkg.io/ to flash your board as opposed to using the 'Generic/Text only' print setting from a .txt file. https://kairyu.gitbooks.io/red-scarf-ii-plus-user-guide-how-to-custom-layout/content/online_reflash.html This article has some good instructions on how to flash your layout. I think the problem for me is that there really wasn't a good way of knowing that my keyboard was in flash mode, or to know whether or not printing from notepad was doing anything, so every time I tried to flash my board that way, nothing actually happened.
So I finally tried to actually flash my layout (attached) to my RSII+, and it did something, but certainly not what I wanted it to do. The only change that I noticed is that now my left arrow key is the windows button. (Not sure how that makes sense). This is my first time doing this so I'm probably doing something wrong, but at this point I've been living without arrow keys for about 2 months and the madness needs to stop. Please help!
Load 8 more comments
Hey, it's been awhile, but I'm still having issues with programming my board. I'm beginning to think that there might be something wrong with the pcb now though because of how it's behaving. After flashing the last layout in this conversation to my board, I observe the following:
Expected behavior/ Observed behavior left / win right / ins (and fn2) end / end (this one's fine for some reason) home / left(and fn1) delete / home down / ctrl up / fn0
So a lot of the functionality that I'm trying to program is there, but just absolutely not in the right places. Additionally, my layers work for the function keys that I programmed (top row F1-F12). What do you make of this? Am I still just not doing it right?
I have a problem with my RS68 II+ rev C.
Both red keys on this layout does the same thing when I press them: http://www.keyboard-layout-editor.com/#/gists/462f442185cbc90095344fe50ecc9261
i.e. the right one behaves like the left one although the layout as shown here is different.
Can anyone help?
Can anyone help with getting the back lit keys to turn on? I soldered in all the led's and it says it is supported on this pcb. RedScarfII VerC
I'm getting a 'position mismatch' error on the TMK site. I'm trying to program the Red Scarf II+ and tried shifting each of the rows over 2 units as one of the previous users mentioned, but I still can't get TMK to accept my layout. Any ideas?
Ah, it was 2.25 units I needed to add. I'll leave my question here in case anyone else runs into the same issue.
If anyone has a 68 variant, let me know if this works. If not ill try to acquire one and note any differences. thanks!
Hot damn! You did what I was thinking about doing, trying to decipher how to program my RS68 between 4 different posts was a hassle.
@livingspeedbump Something you may want to add for the sake of RS68 users, there needs to be a 2.25u gap to the left of the KLE layout in order for the keymap to work. (The RS68 and RS78 share the same PCB programming option so you have to offset it for the 2 columns worth of switches the RS78 has.)
Here is my layout below ↓
Here is the KLE raw data - http://s000.tinyupload.com/index.php?file_id=00099711759020537269 Here is the .eep link - http://s000.tinyupload.com/index.php?file_id=46565370561248739738

Notes: • Fn1 - Toggle LED on/off • Fn2 - Cycle LED down • Fn3 - Cycle LED up
Load 1 more comment
Chrome blocks it as malware for some reason...
Thanks a heap for this! Im still waiting to get my hands on the 68 variant and knew it had a few wonky little thing about it. Will definitely make sure to get this up in the OP
Is there any chance of the Red Scarf III coming to MD sometime in the future??
I'd join a drop for the 96 key version of the RS III
Or any of the Red Scarf boards really? I feel like Im always broke when the really unique stuff drops.
LOVE the stepped Capslock Key...
YES! I understand not having a stepped key if you use that position for FN or something more useful than Caps, but stepped caps is just so glorious looking
I have updated the OP to include KLE Raw Data for all possible layouts. IF you use Fn0 to label the FN key, and Fn1-Fn24 for the lighting the file I provided for TMK FN Import should work with all layouts.
Yassss. I can finally use the arrows on mine now hopefully. Will give this a shot today/tomorrow
Load 4 more comments
sounds like he is the resident MD preacher.
Thanks! And I'm just getting ready to put my Red Scarf together, so this is very much appreciated!
Load 1 more comment
Now that I have it together, I do have a question... what is the generic text printer? I don't see that...
You can also use https://tkg.io/# and Chrome to flash for the rs78. When you go there, reboot to flash (using the ESC button), then install the chrome extension (https://chrome.google.com/webstore/detail/tkg-chrome-app/kmbmjdabhpdnpeobnbdchihdcdaccidi) and when you go to tkg.io, the burn .eep file will have the dropdown enabled. You should see the keyboard there if it's in flash mode. Choose flash, and off you go. All if this is in the gitbook manual (https://kairyu.gitbooks.io/red-scarf-ii-plus-user-guide-how-to-custom-layout/content/)