r/KeyboardLayouts • Other • Apr 21 '23

MaxKeys

Hi

Since Google is becoming increasingly useless at finding things, let me ask Reddit ...

What is the maximum number of keys on computer keyboard?

Thanks, Ian

0 Upvotes

6 comments sorted by

2

u/[deleted] Apr 21 '23

There is no upper limit, with the right MCU and pcb you can even add 1000s (given some IO expanders probably) of keys.

It would probably easier to help you if we know what the purpose of that question is.

2

u/iandoug Other Apr 21 '23

I thought the USB interface and/or how (XKB/whatever) defines the keyboard might inflict some absolute limit.

My new design has 125 keys. Expanded Nav cluster, expanded Numpad, and extra modifiers.

It will be using QMK most likely, but I am worrying ahead about getting the softwares to play nice. And not just for Linux.

So don't want to go halfway down the tunnel and find a dead end...

I don't think my Teensy 2.0++ has enough pins to support that plus 5 LEDs either ... :-(

2

u/[deleted] Apr 21 '23

The firmware handles all the keys and only sends keycodes to the PC. In some cases you can use Unicode, but mostly just keycodes. All the extra keys are mapped in QMK. That will not be you dead end.

Maybe an elite-c has enough pins. Or a black pill.

2

u/iandoug Other Apr 21 '23

mmm. black pill looks interesting. Thanks. Don't know enough about the hardware/software side.

Last time I looked at QMK it could not really handle keys that had different shifted character to US ANSI. I believe they have fixed that now.

I'm just wondering if XKB will be happy with odd values for key <AE02>

etc. Will probably have to define new geometry as well so that KConfig can draw it ...

2

u/Ok-Party-3033 Apr 21 '23

The USB 2 interface has limited current to drive LEDs, but USB 3 has more current and USB-C has still more. That’s only if you’re doing per-key LEDs.

2

u/iandoug Other Apr 21 '23

Thanks. Not into disco lighting on keyboards :-) (not a gamer).

It's only for 5 status LEDs.

I think if I do it as logically 12 × 12 grid (as opposed to actual physical 21 × 5) then I will have enough pins. Gonna buy 3 of those black pills, way cheaper than Teensy 2.0++.