With just 47 keys on this keyboard, there has to be some trick for getting all the missing keys somehow, so I'm going to try and explain how the 40% layouts usually work.
Of course the main trick is layers and layer switching keys. The mechanism should be familiar from laptops or on-screen keyboards: you have a special key, that, when pressed switches the keyboard into a mode in which the keys have different functions than normally. This is common for F1-F12 keys on laptops, or for media keys, but sometimes even for keys like Home, End, PgUp and PgDn. On the 40% keyboards you have to use this switching key pretty much for anything that us not a letter.
Let's look at an example. Here's the layout of Dorsch 48k:
The legends in the upper left corner of the keys are what you get if you just simply press that key. They are usually all placed as close to the original location of the given key on a "standard" keyboard.
Now, suppose you want to type "1". You look for it, and you see it's on the "Q" key, but in the lower right corner. That means you need to press a function key, labelled "Raise", and then the "Q" key. They keyboard will act as if you pressed the "1" key.
But what if you wanted to press "!"? You could press and hold "Raise", then press and hold "Shift" and then press "Q", but that is a bit of gimnastics, so the Planck layout that this layout is loosely based on invented a shortcut: the "Lower" key, which is basically equivalent to "Raise"+"Shift". So to type "!" you simply press and hold "Lower" and then press "Q". This way you almost never have to press more than two keys at once. The "Raise" and "Lower" keys are pressed with your thumbs, so they don't interfere with your regular typing movements.
The only problem is that you now how to learn where all the symbols are again. But if you look carefully, you will notice that they are pretty much in the same places as on a regular keyboard, only compressed a little bit. So the top row is numbers, like on QWERTY, with the minus and plus keys wrapped around. Quote and colon merged together, question mark moved up one row, and square brackets got pushed down a bit, but they now sit on the same keys as greater than and lower than, so that's easy to remember. Backslash is always a problem, it landed in the only spot that was left.
All the cursor movement keys are in their logical places too. Page up and down are on up and down arrows, and Home and End are on the left and right ones. Del and Ins got moved away a bit in this particular layout, because I *really* need the right Alt key where it is, for typing Polish accented characters. Normally Del would go there, so it's together with all the other cursor movement keys.
I still have some room for additional keys if I needed them. Backspace, for example, could have a "lock screen" as a second function. But I figured I will be adding those as I need them and get used to the rest.
Since I forked this project from #Dorsch 40k Keyboard, most of the technical details are there, so I thought it makes sense to repeat it a little bit. I decided on a very minimal design — just the PCB, no support plate and no case.
So this is basically just the PCB with the switches soldered directly on it. The microcontroller had to be squeezed in there between the switches, because the back needs to stay flat, so that I can cover it with foam stickers.
They don't look so great because I had to remove and re-attach them a couple of times while I worked on the keyboard. They look much better freshly applied, but I didn't take that photo.
Since the USB port didn't fit between the keys, I decided to go with a permanently attached USB cable. It's soldered to the header, and then glued to the PCB using a glue-soaked fabric ribbon, which also acts as stress relief for the cable.
Computer keyboards are sub-optimal. Everybody knows that. You can find hundreds of articles extolling the virtues of alternate layouts that tell the story of how first typewriters had their keys in an alphabetic order, but they would jam, so they have been rearranged to slow the typist down and avoid jamming. Those stories are mostly made up, and virtually all research that shows substantial improvements from using layouts like Dvorak is done by the proponents of those layouts themselves. People get so focused on that debate, that they ignore other problems computer keyboards have.
Typewriters were complex, precise mechanical devices, very expensive to make. That means that if there was a change to the design that made it slightly less comfortable or required getting used to, but made the machine easier to build, it was embraced. Today there is no reason to keep following all those design decisions, but they have become tradition.
Take the staggering of the keys. If you look at a traditional keyboard, you will note that the Q key is shifted by ¼ horizontally from A, and that A is similarly shifted by ½ from Z. The reason for this is not human convenience, it's because the keys were originally mounted on metal stems, and there needed to be room for the stems to go all the way up to the rest of the mechanism. This doesn't seem to matter much, until you start to learn proper touch-typing and they tell you that your fingers should follow the "columns" of keys. What columns, you ask, they are all jumbled up! Well, the columns that would be there if they weren't jumbled up:
Also note how your right pinky finger – the smallest and weakest finger you have – is supposed to handle 13 keys, just because the whole layout is skewed that way.
I have struggled with this for years, because it simply doesn't make any sense — it's easier to press the B key with right hand, and to press the Y key with left, for example. Don't even mention using the correct finger.
Or another thing, the relative sizes of the keys. Originally typing machines were powered by the muscles of the typist. And you needed to use quite some force to get it to work properly. But the most force was needed on the special keys that did something else than just swing a tiny little hammer — the space bar, which moved the whole mechanism forward, the enter key (or rather, lever), which scrolled the sheet of paper, the shifts that moved the whole assembly up or down, and the backspace. And if you look at the keyboard, those are the largest keys. It's because it was easier to press them with force when they were bigger, but on a computer keyboard, where each key has the same tiny switch underneath it makes no sense, maybe with the small exception of the space bar, which needs to accommodate or famous opposable thumbs.
Then there is the issue of the number of keys. Some typewriters had separate keys for lower and for upper case letters — Linotype is one famous machine that retained this design. Others introduced the "shift", which moved the whole mechanism a little, so that the second set of symbols could be used. But there was still quite a lot of keys needed, so traditional layouts have five rows of keys. On any touch-typing lessons they tell you that your hands should rest on the so called "home row" — where the F and J keys are, and only reach up or down from there, without moving your wrist. But this is impossible for most people with average finger length — to reach the number row you already have to stretch, and reaching the functions keys or the Esc key is practically impossible without moving your hands. There are too many rows of keys! (And also all those keys to the right of the keyboard, there is now way you can reach them with your poor pinky.) Today we don't need all those rows, we can have as many modifier keys for switching layers as we want. In fact, we already have those Ctrl and Alt and Super keys that we hardly ever use.
I'm splitting this project from #Dorsch 40k Keyboard, because it has acquired life of its own, the keyboard being my main daily keyboard now. I'm still doing some cosmetic tweaks and changes to the layout and code, but it is mostly as I want it to be, and it's way more comfortable than traditional keyboards.
So just to catch up from the previous project: I made this minimal, 40-key keyboard with low-profile chocolate switches just to see if such a small keyboard layout could even work. It turned out that it not only works, but makes it much easier to learn touch typing for me, so I started using it as my default keyboard. After a few days I identified a few annoyances, some of which I was able to fix with layout tweaks, but some required extra keys to be present. So I designed a bigger version with a popular "planck" layout. And that's where we are now.