Custom PCB with macro capability for AEK2?

yaun

09 Sep 2022, 12:27

Hi,

I am using an AEK2 (ISO German) every day, and I like the extra key on the Numpad. As I have to use a converter (Teensy with tmk in my case) I remapped that key to “.”. That way I have “.” and “,” and “:” on the Numpad, which comes in really handy. I used tmk to use the two Command keys (they’re one key electrically!) as AltGr instead of “alt gr”, so I have AtlGr for both hands. Very nice under GNU/Linux, as there are a lot of special characters you can type using AltGr and Shift+AltGr:

– — … ÷ · × ” ’ “ ‘ „ ‚ ¢ © « ‹ » › ˇ ˝ ł Ł ħ Ħ ŋ Ŋ đ ª ð Ð ſ ẞ æ Æ þ Þ ø Ø → ı ↓ ↑ ← ¥ ŧ Ŧ ¶ ® ł Ł Ω ¹ ¡ ² ⅛ ³ £ ¼ ¤ ½ ⅜ ¬ ⅝ { ⅞ [ ™ ] ± } ° \ ¿ ~ ¯ ’ ˘

That’s much more convenient than holding Alt and remembering codes you then have to type in on the numpad, as you have to under Windows.

Now, there is a Power button on that old Apple board, and I'd like to use that to program macros on the fly. And I’d like the Numpad to have one more key (make the 0 1u and add a key next to it).

I have seen the Amoeba PCBs, but I’d like to have one big, single PCB, and no hot swap. I think, both has a significant effect on the typing sound. And of course I would stick with the Alps switches and keycaps. As far as I know I have to anyway with the AEK2 case.

I have no experience with macro capable boards, and I don’t know what QMK/tmk can do. What do you think would be the best way to go for that macro function? I haven’t thought of any UI, yet.

User avatar
Muirium
µ

09 Sep 2022, 13:43

TMK and QMK should be able to handle everything besides the “on the fly” macro recording you describe. They support macros but these must be defined in source code, so dynamic stuff like that is beyond them.

As for a DIY PCB, the only thing that could improve that a converter can’t is rollover. You’ve spotted the indistinguishable Command keys on the AEK (the original Macintosh keyboard did it too). AEKs are 2KRO as I recall, with the modifier keys prioritised so you generally won’t notice (uch like consumer Model Ms). If your non-1980s Apple-intended use is slipping up on rollover, that’s the one excuse I can think of to tear out the whole PCB and hack it up from scratch.

See: controllers and converters all rely on the firmware they are running to do the fancy stuff. A PCB is just a PCB. The brains are in the chip. Your converter has exactly the same one already.

yaun

09 Sep 2022, 17:44

Ah, yeah, thanks. I completely forgot that the chip doesn’t have to be on the PCB (I know that the brains are not in the PCB ;)). On the other hand, the idea for a new PCB came to me when I thought that I would like to change the numpad layout.

So, is there no way to build one’s own dynamically programmable keyboard?

User avatar
vvp

09 Sep 2022, 18:34

On the fly programmability (macros or remap) is a matter of firmware. The programmability does not depend on the controller, MCU or PCB. The firmware is not likely to be ported to uncommon HW. E.g. here is a sample of firmware which supports on the fly programmability: https://github.com/chrisandreae/keyboard-firmware

User avatar
Muirium
µ

09 Sep 2022, 21:22

From the link:
Can support most ATMega series AVR microcontrollers, using LUFA if native USB is available
8 bit AVR ATmega chips (especially the 32u4) are, for whatever reason, hegemonic in this community so yes you have the right chip in your converter already.
An extensively programmable USB keyboard firmware for AVR microcontrollers, easily adaptable to new keyboard hardware.
Well, insert your own value for “easy”. But yes it sounds doable with this firmware.

yaun

10 Sep 2022, 13:35

Cool, thanks! There doesn’t seem to be much activity in that project, but the firmware looks promising.

User avatar
vvp

10 Sep 2022, 21:11

@muriium: Yeah, I know. I use a branch of that firmware ported to ATxmega for many years already. It is easy to port a firmware for a software developer. It is hard for other people though.

I guess there are more firmwares with on the fly remap and macros now. But Chris Andreae's firmware was the only one I was able to find when I was starting with keyboards. And I requested this feature ... and I still use it. Kinesis Advantage is one of the commercial keyboards supporting it as well.

User avatar
Muirium
µ

11 Sep 2022, 16:21

Coincidental chatter on the Ellipsesaver thread just made me aware of this:
QMK supports temporary macros created on the fly. We call these Dynamic Macros. They are defined by the user from the keyboard and are lost when the keyboard is unplugged or otherwise rebooted.
Temporary though. But part of the way there.

Post Reply

Return to “Workshop”