• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
Parametric Keyboard / Keypad Generator 3D Printer File Image 1
Parametric Keyboard / Keypad Generator 3D Printer File Image 2
Parametric Keyboard / Keypad Generator 3D Printer File Thumbnail 1
Parametric Keyboard / Keypad Generator 3D Printer File Thumbnail 2

Parametric Keyboard / Keypad Generator

Steve DeGroof avatarSteve DeGroof

September 25, 2023

printables-icon
DescriptionCommentsTags

Description

NOTE: This is a work in progress. The code's pretty stable but I may update it occasionally as needed.

The OpenSCAD code included here (genKeyboard.scad) can be used to create custom keyboards and keypads with arbitrary layouts. By default, keys are 16mm×16mm, with a 3mm spacing but you can override that on a per-key basis.

Keycap graphics can consist of any number of text or SVG items and can be arranged on the keys using the dx/dy offsets.

Each keyboard consists of 4 layers:

  1. keys - the actual keys
  2. cover - a layer that fills in the gaps between ykeys
  3. springs - a flexible layer that the keys attach to
  4. base - the bottom layer containing the electrical contacts

There are several options for the base layer:
CROSSPOINT - base uses 2 bare wires to make contact
TACTILE6MM - base uses a 6mm tactile switch 
TACTILE12MM - base uses a 12mm tactile switch
DOME12MM - base uses a 12mm circular tactile dome
DOMEGX12900 - base uses a Snaptron GX12900 dome
DOME5176 - base uses a Keystone 5176 dome

Of these, I prefer the 6mm switches. They're cheap, easy to find, reliable, and have a nice tactile feedback. 

Printing

Printing in PLA with a 0.2mm layer height works fine. Using PETG for the spring layer will give a bit more flexibility but isn't strictly necessary.

Wiring

The crosspoint and dome bases require integrated wiring, using 12AWG solid wire to complete the electrical connections. The 6mm and 12mm switch bases are intended to be wired from underneath; any sort of hookup wire is acceptable for these. If you're feeling ambitious, you can skip printing the base altogether and mount the spring layer on a custom PCB with switches soldered onto it.

Assembly

The spring layer snaps on to the base, the keys snap on to the spring layer, and the cover sits on top. To create a complete keyboard, you'll need to print an enclosure for the assembly, plus any electronics used to scan the keys. An Arduino (or compatible microcontroller) is perfectly capable of scanning the keys.

Examples

I've included 2 example files: keyboard104.scad (a 104 key keyboard) and keypad-2x3.scad (a 2×3 keypad). I've printed the 2×3 keypad and am using it as a custom character keypad for my laptop. The 104 key keyboard? No, I haven't attempted to print that. It's really just there as an extreme example of the code's capabilities.

The example code demonstrates how to generate layouts using either the genRow or genColumn functions, depending on your needs. 

Caveat: The SCAD code uses recursive functions which, under certain conditions, can generate a huge number of error messages. I'd recommend turning on the “Stop on the first warning” setting in preferences, just in case.

License:

Creative Commons — Attribution — Noncommercial

Related Models

Thor Mjolnir Hammer Bic Pen preview image

Thor Mjolnir Hammer Bic Pen

effektz profile image

effektz

9,096

Diverse Schilder / various labels  for hobby & makers preview image

Diverse Schilder / various labels for hobby & makers

RPK profile image

RPK

2

Cute Fluffy Puppy Figurine to Print preview image

Cute Fluffy Puppy Figurine to Print

bonowski. profile image

bonowski.

3

Vorpal The Hexapod Walking Robot preview image

Vorpal The Hexapod Walking Robot

vorpal profile image

vorpal

4,986

MakerZ – Open Source 1/28 RC Drift Chassis by Fails & Makes | Açık Kaynak 1/28 RC Drift Şasisi preview image

MakerZ – Open Source 1/28 RC Drift Chassis by Fails & Makes | Açık Kaynak 1/28 RC Drift Şasisi

Fails&Makes profile image

Fails&Makes

Customizable EU License Plate Keychain preview image

Customizable EU License Plate Keychain

John_M profile image

John_M

45

Snap-Together Mini Minecraft Jack-O-Lantern with integrated LED preview image

Snap-Together Mini Minecraft Jack-O-Lantern with integrated LED

scottrlindsey profile image

scottrlindsey

4,456

Small Parts Storage Drawers - Organizer preview image

Small Parts Storage Drawers - Organizer

GT 3D Makers profile image

GT 3D Makers

29

10