-
Notifications
You must be signed in to change notification settings - Fork 188
KeyV2 Helper Documentation
ok so it's not really an API but it's definitely not a DSL. let's get going:
Functions that transform parts of the key. Bit of a catch-all to be honest:
Translate the key a certain amount of units, where a unit = 19.04mm. Helps with placing keys how they would be arranged on a keyboard
Add a brim around the stem to support it during printing
Add small threads connecting the stem to the outside of the keycap. Less intrusive than a brim. Can be cut off with flush cutters
Enable a Minkowski sum, rounding the keycap. This is a very expensive operation, and depending on the version of OpenSCAD you have often fails due to the complexity of the object, but produces amazing results when it works. Use with caution
Invert the dish on the keycap. Mostly used for spacebars in conjunction with the 'sideways cylindrical' dish type
Rotate the stem 90 degrees. Since the default cherry stem is asymmetric this is needed in situations where the switch is rotated.
Add stabilizers to the keycap mm
distance away. 12mm (for backspace et al) and 50mm (for space) are normal values here. vertical
arranges them vertically. type
is the stem_type
that will be used, and defaults to costar_stabilizer
, which is just an alias for cherry
stem. If you have cherry stabilizers switch type
to cherry_stabilizer
.
Disable the dish
Inset the stem some number of mm. Hard to print, but more realistic for some key profiles
Fill the keycap. Currently broken :(
Give the keycap no stem at all. Good for artisans, if the stem will be cast separately
Use a cherry stem, with a slop factor. Default is 0.3mm, which shaves off 0.15mm from each side, and a few other places
Use an alps stem, with a slop factor.
Use a rounded cherry stem, with a slop factor. very difficult to print on FDM printers.
Use a cherry stem that will fit in a box switch, like the Kailh box series. Very difficult to print on FDM printers.
Use support that flares from the top of the stem. Default
Use support bars that intersect the top of the stem. More realistic, but makes the keycap more difficult to print.
Use a flat ceiling of support, as low as possible without touching the switch
Add a legend to the keycap. The text is what the legend should say. the position are coordinates, with possible values of -1, 0, and 1 corresponding to 9 separate positions on the keycap. Size is the font size.
Add a homing bump to the keycap of a certain depth
Generate a row of keycaps of a single profile. Must still use key()
, eg row_profile("dsa") cherry() key()
.
Pre-packaged settings for key profiles for you to use!
Imitates DCS profile keycaps.
Imitates DSA profile keycaps. Sculpted version is approximated.
Imitates G20 profile keycaps. Rounded keys look fantastic. Sculpted version is approximated.
Imitates certain OEM style keycaps
Imitates SA profile keycaps.
Pre-packaged settings for certain common types of keys
Spacebar! includes directives for inverted and sideways cylindrical dishing
Left shift
Right shift
Backspace
Enter
Numpad enter (vertical)
Numpad plus (alias for numpad_enter
)
Numpad 0 (alias for backspace
)
Stepped caps lock. Does not have actual step, but moves stem correctly.
Experimental iso_enter. Due to the shape being concave (and weird), ISO enter is very tricky, and thus still isn't finalized.
Change how long and how tall the keycap is!
Change how many units long the keycap is.
Change how many units tall the keycap is.