klepcbgen icon indicating copy to clipboard operation
klepcbgen copied to clipboard

Key placement produced too many columns

Open alex313962 opened this issue 4 years ago • 4 comments

If i try to create a pcb for my design it gives an error and the script quit

alex313962 avatar May 27 '21 20:05 alex313962

The software is currently limited to generating a PCB for keyboard layouts with a maximum of 18 columns. Apparently the keyboard layout you used has more columns than that. If you think this is not correct, please share the json and I will take a look.

jeroen94704 avatar May 28 '21 11:05 jeroen94704

well, yes my design have more than 18 colums. http://www.keyboard-layout-editor.com/#/gists/643c06cd45f22283325e1aa89aaa87c5 i'm not good with py but i didn't understand why you have set a limit that low. My kb is, in fact, with 4 colums in surplus if compared with a standard 100% iso standard kb (that is also larger than 18 column i guess)

alex313962 avatar May 28 '21 14:05 alex313962

Here's a more canonical example of a layout which is broken: the default 104 key layout from http://www.keyboard-layout-editor.com.

104_ansi_layout.json

Note: GitHub does now allow "attaching" JSON files (it blindly checks the file extension), thus this JSON file has .txt added to the filename.

brianredbeard avatar Aug 27 '21 01:08 brianredbeard

The 18 column limit comes from the available number of inputs (25) on the atmega32u4. Detecting which key gets pressed requires grouping the keys in rows and columns. With 25 inputs, this means a theoretical maximum of 156 keys (12 or 13 rows with 13 or 12 columns), but wiring the keys of a rectangular keyboard layout into a square matrix would make the resulting schematic headache-inducing. So, as a compromise, I opted to reserve 7 input pins for rows and 18 for columns, resulting in the aforementioned limits.

Given that this limit seems to be problematic for many people I may try a square matrix anyway and see what happens.

jeroen94704 avatar Aug 30 '21 07:08 jeroen94704