Merge pull request #169 from RyuKojiro/hhkb

Add HHKB layout
This commit is contained in:
Bob 2022-10-14 18:23:49 -04:00 committed by GitHub
commit bfed8b8779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 66 additions and 0 deletions

View File

@ -1,4 +1,5 @@
include <constants.scad>
include <settings.scad>
// I use functions when I need to compute special variables off of other special variables
// functions need to be explicitly included, unlike special variables, which

View File

@ -1,3 +1,6 @@
use <../functions.scad>
include <../settings.scad>
module asa_row(row=3, column = 0) {
$key_shape_type = "sculpted_square";
$bottom_key_height = 18.06;

View File

@ -1,3 +1,6 @@
use <../functions.scad>
include <../settings.scad>
// based off GMK keycap set
module cherry_row(row=3, column=0) {

View File

@ -1,3 +1,6 @@
use <../functions.scad>
include <../settings.scad>
module dcs_row(row=3, column=0) {
$bottom_key_width = 18.16;
$bottom_key_height = 18.16;

View File

@ -1,3 +1,6 @@
use <../functions.scad>
include <../settings.scad>
module dsa_row(row=3, column = 0) {
$key_shape_type = "sculpted_square";
$bottom_key_width = 18.24; // 18.4;

View File

@ -1,3 +1,6 @@
use <../functions.scad>
include <../settings.scad>
module dss_row(n=3, column=0) {
$key_shape_type = "sculpted_square";
$bottom_key_width = 18.24;

View File

@ -1,3 +1,6 @@
use <../functions.scad>
include <../settings.scad>
module g20_row(row=3, column = 0) {
$bottom_key_width = 18.16;
$bottom_key_height = 18.16;

View File

@ -1,3 +1,6 @@
use <../functions.scad>
include <../settings.scad>
module grid_row(row=3, column = 0) {
$bottom_key_width = 18.16;
$bottom_key_height = 18.16;

View File

@ -1,3 +1,6 @@
use <../functions.scad>
include <../settings.scad>
module hipro_row(row=3, column=0) {
$key_shape_type = "sculpted_square";

View File

@ -1,3 +1,6 @@
use <../functions.scad>
include <../settings.scad>
// This is an imperfect attempt to clone the MT3 profile
module mt3_row(row=3, column=0, deep_dish=false) {
$key_shape_type = "sculpted_square";

View File

@ -1,3 +1,6 @@
use <../functions.scad>
include <../settings.scad>
module oem_row(row=3, column = 0) {
$bottom_key_width = 18.05;
$bottom_key_height = 18.05;

View File

@ -1,3 +1,5 @@
use <../functions.scad>
include <../settings.scad>
include <../constants.scad>
// Regular polygon shapes CIRCUMSCRIBE the sphere of diameter $bottom_key_width
// This is to make tiling them easier, like in the case of hexagonal keycaps etc

View File

@ -1,3 +1,6 @@
use <../functions.scad>
include <../settings.scad>
module sa_row(n=3, column=0) {
$key_shape_type = "sculpted_square";
$bottom_key_width = 18.4;

View File

@ -1,3 +1,5 @@
use <../functions.scad>
include <../settings.scad>
include <../constants.scad>
// Regular polygon shapes CIRCUMSCRIBE the sphere of diameter $bottom_key_width
// This is to make tiling them easier, like in the case of hexagonal keycaps etc

View File

@ -1,4 +1,6 @@
include <functions.scad>
use <key_sizes.scad>
use <key_transformations.scad>
module spacebar() {
$inverted_dish = $dish_type != "disable";

View File

@ -0,0 +1,21 @@
include <../layout.scad>
hhkb_layout = [
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1.5,1,1,1,1,1,1,1,1,1,1,1,1,1.5],
[1.75,1,1,1,1,1,1,1,1,1,1,1,2.25],
[2.25,1,1,1,1,1,1,1,1,1,1,1.75,1],
[-1.5,1,1.5,6,1.5,1]
];
hhkb_legends = [
["Esc", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "\\", "`"],
["Tab", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", "]", "Delete"],
["Ctrl", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'", "Return"],
["Shift", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "Shift", "Fn"],
["", "Alt", "Cmd", "", "Cmd", "Alt"],
];
module hhkb_default(profile) {
layout(hhkb_layout, profile, hhkb_legends) children();
}

View File

@ -1,3 +1,8 @@
use <../key_transformations.scad>
use <../key_profiles.scad>
use <../key_sizes.scad>
use <../key_types.scad>
// sums all values, unless a value is negative, in which case it makes it positive
// dirty hack to allow for large gaps in keysets
function abs_sum(list, x=0) =