From e4ce0f02155c2900ad53e2c556fc2d422d0f4a75 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sun, 24 May 2020 11:44:02 +0800 Subject: [PATCH 01/23] Initial commit for HHKB Lite 2 --- keyboards/hhkb_lite_2/config.h | 58 +++++ keyboards/hhkb_lite_2/kb.c | 1 + keyboards/hhkb_lite_2/kb.h | 26 +++ .../hhkb_lite_2/keymaps/default/keymap.c | 218 ++++++++++++++++++ keyboards/hhkb_lite_2/rules.mk | 56 +++++ 5 files changed, 359 insertions(+) create mode 100644 keyboards/hhkb_lite_2/config.h create mode 100644 keyboards/hhkb_lite_2/kb.c create mode 100644 keyboards/hhkb_lite_2/kb.h create mode 100644 keyboards/hhkb_lite_2/keymaps/default/keymap.c create mode 100644 keyboards/hhkb_lite_2/rules.mk diff --git a/keyboards/hhkb_lite_2/config.h b/keyboards/hhkb_lite_2/config.h new file mode 100644 index 000000000000..49ffb71ead97 --- /dev/null +++ b/keyboards/hhkb_lite_2/config.h @@ -0,0 +1,58 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER qmkbuilder +#define PRODUCT keyboard +#define DESCRIPTION Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 14 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B3, B2, B1, B0, F0, F1, F4, F5 } +#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, C6, C7, D5, D4, D6, D7, B4, B5, B6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif \ No newline at end of file diff --git a/keyboards/hhkb_lite_2/kb.c b/keyboards/hhkb_lite_2/kb.c new file mode 100644 index 000000000000..e5e00a329624 --- /dev/null +++ b/keyboards/hhkb_lite_2/kb.c @@ -0,0 +1 @@ +#include "kb.h" diff --git a/keyboards/hhkb_lite_2/kb.h b/keyboards/hhkb_lite_2/kb.h new file mode 100644 index 000000000000..9648a401e015 --- /dev/null +++ b/keyboards/hhkb_lite_2/kb.h @@ -0,0 +1,26 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define KEYMAP( \ + K000, K001, K002, K004, K005, K006, K009, K010, K011, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, \ + K300, K302, K303, K304, K305, K306, K309, K311, K313, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K413, \ + K502, K505, K506, K509, K512, \ + K600, K603, K605, K606, K607, K608, K609, K611, K613, \ + K702, K705, K706, K712, K713 \ +) { \ + { K000, K001, K002, KC_NO, K004, K005, K006, KC_NO, KC_NO, K009, K010, K011, KC_NO, KC_NO }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, KC_NO, KC_NO, K309, KC_NO, K311, KC_NO, K313 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, KC_NO, KC_NO, KC_NO, K413 }, \ + { KC_NO, KC_NO, K502, KC_NO, KC_NO, K505, K506, KC_NO, KC_NO, K509, KC_NO, KC_NO, K512, KC_NO }, \ + { K600, KC_NO, KC_NO, K603, KC_NO, K605, K606, K607, K608, K609, KC_NO, K611, KC_NO, K613 }, \ + { KC_NO, KC_NO, K702, KC_NO, KC_NO, K705, K706, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K712, K713 } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/hhkb_lite_2/keymaps/default/keymap.c b/keyboards/hhkb_lite_2/keymaps/default/keymap.c new file mode 100644 index 000000000000..c4043b84926b --- /dev/null +++ b/keyboards/hhkb_lite_2/keymaps/default/keymap.c @@ -0,0 +1,218 @@ +#include "kb.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + KEYMAP( + KC_UP, MO(1), KC_MINS, KC_EQL, KC_6, KC_5, KC_GRV, KC_LCTL, MO(1), + KC_DOWN, KC_0, KC_9, KC_8, KC_7, KC_4, KC_3, KC_2, KC_1, + KC_RGHT, KC_P, KC_O, KC_I, KC_U, KC_R, KC_E, KC_W, KC_Q, + KC_RGUI, KC_LBRC, KC_LEFT, KC_RBRC, KC_Y, KC_T, KC_TAB, KC_LSFT, KC_BSPC, + KC_LGUI, KC_SCLN, KC_L, KC_K, KC_J, KC_F, KC_D, KC_S, KC_A, KC_BSLS, + KC_QUOT, KC_H, KC_G, KC_ESC, KC_LALT, + KC_COMM, KC_DOT, KC_M, KC_V, KC_C, KC_X, KC_Z, KC_RSFT, KC_ENT, + KC_SLSH, KC_N, KC_B, KC_LALT, KC_SPC), + + KEYMAP( + KC_PGUP, KC_TRNS, KC_F11, KC_F12, KC_F6, KC_F5, KC_DEL, KC_TRNS, KC_TRNS, + KC_PGDN, KC_F10, KC_F9, KC_F8, KC_F7, KC_F4, KC_F3, KC_F2, KC_F1, + KC_END, KC_PAUS, KC_SLCK, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_UP, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_TRNS, KC_DEL, + KC_TRNS, KC_LEFT, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, + KC_RGHT, KC_TRNS, KC_TRNS, RESET, KC_TRNS, + KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + /* keyevent_t event = record->event; */ + + switch (id) { + + } + return MACRO_NONE; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/hhkb_lite_2/rules.mk b/keyboards/hhkb_lite_2/rules.mk new file mode 100644 index 000000000000..021cb04e0d68 --- /dev/null +++ b/keyboards/hhkb_lite_2/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no # Commands for debug and configuration +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality +AUDIO_ENABLE ?= no +RGBLIGHT_ENABLE ?= no \ No newline at end of file From 2269498e51ea5dd7b7c64ec483fe29f16666fa03 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sun, 24 May 2020 15:45:25 +0800 Subject: [PATCH 02/23] Rearrange keymap --- keyboards/hhkb_lite_2/kb.h | 19 +- .../hhkb_lite_2/keymaps/default/keymap.c | 177 ++---------------- 2 files changed, 26 insertions(+), 170 deletions(-) diff --git a/keyboards/hhkb_lite_2/kb.h b/keyboards/hhkb_lite_2/kb.h index 9648a401e015..ee68ffb9fffc 100644 --- a/keyboards/hhkb_lite_2/kb.h +++ b/keyboards/hhkb_lite_2/kb.h @@ -4,16 +4,15 @@ #include "quantum.h" #define KEYMAP( \ - K000, K001, K002, K004, K005, K006, K009, K010, K011, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, \ - K300, K302, K303, K304, K305, K306, K309, K311, K313, \ - K400, K402, K403, K404, K405, K406, K407, K408, K409, K413, \ - K502, K505, K506, K509, K512, \ - K600, K603, K605, K606, K607, K608, K609, K611, K613, \ - K702, K705, K706, K712, K713 \ + K509, K109, K108, K107, K106, K006, K005, K105, K104, K103, K102, K002, K004, K413, K009, \ + K309, K209, K208, K207, K206, K306, K305, K205, K204, K203, K202, K302, K304, K313, \ + K010, K409, K408, K407, K406, K506, K505, K405, K404, K403, K402, K502, K613, \ + K311, K609, K608, K607, K606, K706, K705, K605, K600, K603, K702, K611, \ + K001, K512, K400, K713, K300, K712, \ + K000, \ + K303, K100, K200 \ ) { \ - { K000, K001, K002, KC_NO, K004, K005, K006, KC_NO, KC_NO, K009, K010, K011, KC_NO, KC_NO }, \ + { K000, K001, K002, KC_NO, K004, K005, K006, KC_NO, KC_NO, K009, K010, KC_NO, KC_NO, KC_NO }, \ { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, KC_NO, KC_NO, KC_NO, KC_NO }, \ { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, KC_NO, KC_NO, KC_NO, KC_NO }, \ { K300, KC_NO, K302, K303, K304, K305, K306, KC_NO, KC_NO, K309, KC_NO, K311, KC_NO, K313 }, \ @@ -23,4 +22,4 @@ { KC_NO, KC_NO, K702, KC_NO, KC_NO, K705, K706, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K712, K713 } \ } -#endif \ No newline at end of file +#endif diff --git a/keyboards/hhkb_lite_2/keymaps/default/keymap.c b/keyboards/hhkb_lite_2/keymaps/default/keymap.c index c4043b84926b..48aa97043702 100644 --- a/keyboards/hhkb_lite_2/keymaps/default/keymap.c +++ b/keyboards/hhkb_lite_2/keymaps/default/keymap.c @@ -1,167 +1,24 @@ #include "kb.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - KEYMAP( - KC_UP, MO(1), KC_MINS, KC_EQL, KC_6, KC_5, KC_GRV, KC_LCTL, MO(1), - KC_DOWN, KC_0, KC_9, KC_8, KC_7, KC_4, KC_3, KC_2, KC_1, - KC_RGHT, KC_P, KC_O, KC_I, KC_U, KC_R, KC_E, KC_W, KC_Q, - KC_RGUI, KC_LBRC, KC_LEFT, KC_RBRC, KC_Y, KC_T, KC_TAB, KC_LSFT, KC_BSPC, - KC_LGUI, KC_SCLN, KC_L, KC_K, KC_J, KC_F, KC_D, KC_S, KC_A, KC_BSLS, - KC_QUOT, KC_H, KC_G, KC_ESC, KC_LALT, - KC_COMM, KC_DOT, KC_M, KC_V, KC_C, KC_X, KC_Z, KC_RSFT, KC_ENT, - KC_SLSH, KC_N, KC_B, KC_LALT, KC_SPC), - - KEYMAP( - KC_PGUP, KC_TRNS, KC_F11, KC_F12, KC_F6, KC_F5, KC_DEL, KC_TRNS, KC_TRNS, - KC_PGDN, KC_F10, KC_F9, KC_F8, KC_F7, KC_F4, KC_F3, KC_F2, KC_F1, - KC_END, KC_PAUS, KC_SLCK, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_UP, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_TRNS, KC_DEL, - KC_TRNS, KC_LEFT, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, - KC_RGHT, KC_TRNS, KC_TRNS, RESET, KC_TRNS, - KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) - + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, \ + KC_UP, \ + KC_LEFT, KC_DOWN, KC_RGHT \ + ), + KEYMAP( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_PGUP, \ + KC_HOME, KC_PGDN, KC_END \ + ), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { From 4ea132333cb9167abecde4a885ff81248e89e661 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sun, 24 May 2020 15:45:46 +0800 Subject: [PATCH 03/23] Clean up config --- keyboards/hhkb_lite_2/config.h | 31 +++------------- keyboards/hhkb_lite_2/rules.mk | 64 ++++++++++------------------------ 2 files changed, 24 insertions(+), 71 deletions(-) diff --git a/keyboards/hhkb_lite_2/config.h b/keyboards/hhkb_lite_2/config.h index 49ffb71ead97..5f139807e1d2 100644 --- a/keyboards/hhkb_lite_2/config.h +++ b/keyboards/hhkb_lite_2/config.h @@ -4,12 +4,12 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER qmkbuilder +#define VENDOR_ID 0x1337 +#define PRODUCT_ID 0x88b2 +#define DEVICE_VER 0x0002 +#define MANUFACTURER PFU #define PRODUCT keyboard -#define DESCRIPTION Keyboard +#define DESCRIPTION HHKB Lite 2 /* key matrix size */ #define MATRIX_ROWS 8 @@ -23,21 +23,9 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* number of backlight levels */ - -#ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 3 -#endif - /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE - -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - /* key combination for command */ #define IS_COMMAND() ( \ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ @@ -46,13 +34,4 @@ /* prevent stuck modifiers */ #define PREVENT_STUCK_MODIFIERS - -#ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 0 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 #endif - -#endif \ No newline at end of file diff --git a/keyboards/hhkb_lite_2/rules.mk b/keyboards/hhkb_lite_2/rules.mk index 021cb04e0d68..e06ce2ad9749 100644 --- a/keyboards/hhkb_lite_2/rules.mk +++ b/keyboards/hhkb_lite_2/rules.mk @@ -1,56 +1,30 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=512 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) CONSOLE_ENABLE ?= no # Console for debug(+400) COMMAND_ENABLE ?= no # Commands for debug and configuration SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no \ No newline at end of file +RGBLIGHT_ENABLE ?= no # Enable keyboard RGB underglow +MIDI_ENABLE ?= no # MIDI support +UNICODE_ENABLE ?= yes # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 +HD44780_ENABLE ?= no # Enable support for HD44780 based LCDs From 816d28e0c8593ec8f0b7a71618ffd993bafb3722 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sun, 24 May 2020 17:14:25 +0800 Subject: [PATCH 04/23] Fix pin assignments --- keyboards/hhkb_lite_2/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/hhkb_lite_2/config.h b/keyboards/hhkb_lite_2/config.h index 5f139807e1d2..971684848dd5 100644 --- a/keyboards/hhkb_lite_2/config.h +++ b/keyboards/hhkb_lite_2/config.h @@ -16,8 +16,8 @@ #define MATRIX_COLS 14 /* key matrix pins */ -#define MATRIX_ROW_PINS { B3, B2, B1, B0, F0, F1, F4, F5 } -#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, C6, C7, D5, D4, D6, D7, B4, B5, B6 } +#define MATRIX_ROW_PINS { F5, F4, F1, F0, B0, B1, B2, B3 } +#define MATRIX_COL_PINS { F6, F7, B6, B5, B4, D7, D6, D4, D5, C7, C6, D3, D2, D1} #define UNUSED_PINS /* COL2ROW or ROW2COL */ From 29ccd97d743c993881e77aeb9e366120db371d52 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sun, 24 May 2020 17:17:03 +0800 Subject: [PATCH 05/23] Code and filename cleanup --- keyboards/hhkb_lite_2/hhkb_lite_2.c | 1 + keyboards/hhkb_lite_2/{kb.h => hhkb_lite_2.h} | 0 keyboards/hhkb_lite_2/kb.c | 1 - .../hhkb_lite_2/keymaps/default/keymap.c | 36 +------------------ 4 files changed, 2 insertions(+), 36 deletions(-) create mode 100644 keyboards/hhkb_lite_2/hhkb_lite_2.c rename keyboards/hhkb_lite_2/{kb.h => hhkb_lite_2.h} (100%) delete mode 100644 keyboards/hhkb_lite_2/kb.c diff --git a/keyboards/hhkb_lite_2/hhkb_lite_2.c b/keyboards/hhkb_lite_2/hhkb_lite_2.c new file mode 100644 index 000000000000..d0eaf250d606 --- /dev/null +++ b/keyboards/hhkb_lite_2/hhkb_lite_2.c @@ -0,0 +1 @@ +#include "hhkb_lite_2.h" diff --git a/keyboards/hhkb_lite_2/kb.h b/keyboards/hhkb_lite_2/hhkb_lite_2.h similarity index 100% rename from keyboards/hhkb_lite_2/kb.h rename to keyboards/hhkb_lite_2/hhkb_lite_2.h diff --git a/keyboards/hhkb_lite_2/kb.c b/keyboards/hhkb_lite_2/kb.c deleted file mode 100644 index e5e00a329624..000000000000 --- a/keyboards/hhkb_lite_2/kb.c +++ /dev/null @@ -1 +0,0 @@ -#include "kb.h" diff --git a/keyboards/hhkb_lite_2/keymaps/default/keymap.c b/keyboards/hhkb_lite_2/keymaps/default/keymap.c index 48aa97043702..8aeab4aeea1b 100644 --- a/keyboards/hhkb_lite_2/keymaps/default/keymap.c +++ b/keyboards/hhkb_lite_2/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "kb.h" +#include "hhkb_lite_2.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( @@ -39,37 +39,3 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } - -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } - -} From 7ca18bb2f408814e536856f88e489273cc102659 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sun, 24 May 2020 17:25:03 +0800 Subject: [PATCH 06/23] Add README --- keyboards/hhkb_lite_2/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 keyboards/hhkb_lite_2/README.md diff --git a/keyboards/hhkb_lite_2/README.md b/keyboards/hhkb_lite_2/README.md new file mode 100644 index 000000000000..c048ca74e6ec --- /dev/null +++ b/keyboards/hhkb_lite_2/README.md @@ -0,0 +1,28 @@ +# HHKB Lite 2 + +![HHKB Lite 2](https://deskthority.net/wiki/images/e/ed/HHKB_Lite_2.jpg) + +This is for the [HHKB Lite 2](https://deskthority.net/wiki/HHKB_Lite) +by PFU, identified by model numbers PD-KB200W/U or PD-KB200B/U. It +uses the replacement Teensy 2.0 board from [my other +project](https://github.com/thirteen37/HHKB-Lite-2-Teensy). + +Compile and flash this firmware (after setting up your build environment): + + qmk flash -kb hhkb_lite_2 -km default + +See the [build environment +setup](https://docs.qmk.fm/#/getting_started_build_tools) and the +[make instructions](https://docs.qmk.fm/#/getting_started_make_guide) +for more information. Brand new to QMK? Start with our [Complete Newbs +Guide](https://docs.qmk.fm/#/newbs). + +## Details + +The `default` keymap is nearly the official standard US QWERTY, except +with the `Delete` key behaving like `BS`, which is as if DIP `SW3` is +set. + +While there are two physical `Fn` keys on the keyboard, they are +electrically indistinguishable (same wiring matrix) so they can not be +assigned different keycodes. From 6db2fc87bd5b0d5f6a6cde3702d91f458d9c9a11 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Thu, 28 May 2020 00:09:01 +0800 Subject: [PATCH 07/23] Apply suggestions from code review Code cleanup Co-authored-by: Drashna Jaelre Co-authored-by: Joel Challis --- keyboards/hhkb_lite_2/config.h | 14 ++-------- keyboards/hhkb_lite_2/hhkb_lite_2.h | 7 ++--- .../hhkb_lite_2/keymaps/default/keymap.c | 23 ++------------- keyboards/hhkb_lite_2/rules.mk | 28 +++++++++---------- 4 files changed, 20 insertions(+), 52 deletions(-) diff --git a/keyboards/hhkb_lite_2/config.h b/keyboards/hhkb_lite_2/config.h index 971684848dd5..a1f834c9f62b 100644 --- a/keyboards/hhkb_lite_2/config.h +++ b/keyboards/hhkb_lite_2/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -24,14 +23,5 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* prevent stuck modifiers */ -#define PREVENT_STUCK_MODIFIERS - -#endif diff --git a/keyboards/hhkb_lite_2/hhkb_lite_2.h b/keyboards/hhkb_lite_2/hhkb_lite_2.h index ee68ffb9fffc..ccdd765a2307 100644 --- a/keyboards/hhkb_lite_2/hhkb_lite_2.h +++ b/keyboards/hhkb_lite_2/hhkb_lite_2.h @@ -1,9 +1,8 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K509, K109, K108, K107, K106, K006, K005, K105, K104, K103, K102, K002, K004, K413, K009, \ K309, K209, K208, K207, K206, K306, K305, K205, K204, K203, K202, K302, K304, K313, \ K010, K409, K408, K407, K406, K506, K505, K405, K404, K403, K402, K502, K613, \ @@ -21,5 +20,3 @@ { K600, KC_NO, KC_NO, K603, KC_NO, K605, K606, K607, K608, K609, KC_NO, K611, KC_NO, K613 }, \ { KC_NO, KC_NO, K702, KC_NO, KC_NO, K705, K706, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K712, K713 } \ } - -#endif diff --git a/keyboards/hhkb_lite_2/keymaps/default/keymap.c b/keyboards/hhkb_lite_2/keymaps/default/keymap.c index 8aeab4aeea1b..df9e0ce0f729 100644 --- a/keyboards/hhkb_lite_2/keymaps/default/keymap.c +++ b/keyboards/hhkb_lite_2/keymaps/default/keymap.c @@ -1,7 +1,7 @@ -#include "hhkb_lite_2.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( + LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -20,22 +20,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_HOME, KC_PGDN, KC_END \ ), }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - /* keyevent_t event = record->event; */ - - switch (id) { - - } - return MACRO_NONE; -} - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/keyboards/hhkb_lite_2/rules.mk b/keyboards/hhkb_lite_2/rules.mk index e06ce2ad9749..fbbb4222d072 100644 --- a/keyboards/hhkb_lite_2/rules.mk +++ b/keyboards/hhkb_lite_2/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= no # Commands for debug and configuration -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE ?= no # Enable keyboard RGB underglow -MIDI_ENABLE ?= no # MIDI support -UNICODE_ENABLE ?= yes # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 -HD44780_ENABLE ?= no # Enable support for HD44780 based LCDs +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output +HD44780_ENABLE = no # Enable support for HD44780 based LCDs From bb2d16266982302c3ae96a7253febec05b850bbb Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Thu, 28 May 2020 00:09:47 +0800 Subject: [PATCH 08/23] Update keyboards/hhkb_lite_2/README.md Documentation cleanup Co-authored-by: Joel Challis --- keyboards/hhkb_lite_2/README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/keyboards/hhkb_lite_2/README.md b/keyboards/hhkb_lite_2/README.md index c048ca74e6ec..ea380245bcb5 100644 --- a/keyboards/hhkb_lite_2/README.md +++ b/keyboards/hhkb_lite_2/README.md @@ -11,11 +11,7 @@ Compile and flash this firmware (after setting up your build environment): qmk flash -kb hhkb_lite_2 -km default -See the [build environment -setup](https://docs.qmk.fm/#/getting_started_build_tools) and the -[make instructions](https://docs.qmk.fm/#/getting_started_make_guide) -for more information. Brand new to QMK? Start with our [Complete Newbs -Guide](https://docs.qmk.fm/#/newbs). +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). ## Details From 20c1d53d3fcbabccecad628b406842fb1d694f95 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Thu, 28 May 2020 00:12:24 +0800 Subject: [PATCH 09/23] Change Vendor ID to unused --- keyboards/hhkb_lite_2/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/hhkb_lite_2/config.h b/keyboards/hhkb_lite_2/config.h index a1f834c9f62b..cbf30f058b07 100644 --- a/keyboards/hhkb_lite_2/config.h +++ b/keyboards/hhkb_lite_2/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x1337 +#define VENDOR_ID 0x88B2 #define PRODUCT_ID 0x88b2 #define DEVICE_VER 0x0002 #define MANUFACTURER PFU From 918fc7db9db6151b4968305ea8f8c10d35f9533c Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sat, 13 Jun 2020 00:35:05 +0800 Subject: [PATCH 10/23] One more LAYOUT --- keyboards/hhkb_lite_2/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/hhkb_lite_2/keymaps/default/keymap.c b/keyboards/hhkb_lite_2/keymaps/default/keymap.c index df9e0ce0f729..fe4e50471ed3 100644 --- a/keyboards/hhkb_lite_2/keymaps/default/keymap.c +++ b/keyboards/hhkb_lite_2/keymaps/default/keymap.c @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_UP, \ KC_LEFT, KC_DOWN, KC_RGHT \ ), - KEYMAP( + LAYOUT( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_NO, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, \ From 7f03f20a7e7127308dc93ac633a77738f3a400df Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sat, 13 Jun 2020 00:26:31 +0800 Subject: [PATCH 11/23] Via keymap for HHKB Lite 2 --- keyboards/hhkb_lite_2/keymaps/via/config.h | 3 ++ keyboards/hhkb_lite_2/keymaps/via/keymap.c | 32 ++++++++++++ keyboards/hhkb_lite_2/keymaps/via/keymap.json | 49 +++++++++++++++++++ keyboards/hhkb_lite_2/keymaps/via/rules.mk | 13 +++++ 4 files changed, 97 insertions(+) create mode 100644 keyboards/hhkb_lite_2/keymaps/via/config.h create mode 100644 keyboards/hhkb_lite_2/keymaps/via/keymap.c create mode 100644 keyboards/hhkb_lite_2/keymaps/via/keymap.json create mode 100644 keyboards/hhkb_lite_2/keymaps/via/rules.mk diff --git a/keyboards/hhkb_lite_2/keymaps/via/config.h b/keyboards/hhkb_lite_2/keymaps/via/config.h new file mode 100644 index 000000000000..b98573870895 --- /dev/null +++ b/keyboards/hhkb_lite_2/keymaps/via/config.h @@ -0,0 +1,3 @@ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COL 9 +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/hhkb_lite_2/keymaps/via/keymap.c b/keyboards/hhkb_lite_2/keymaps/via/keymap.c new file mode 100644 index 000000000000..2f10653317f9 --- /dev/null +++ b/keyboards/hhkb_lite_2/keymaps/via/keymap.c @@ -0,0 +1,32 @@ +#include "hhkb_lite_2.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, \ + KC_UP, \ + KC_LEFT, KC_DOWN, KC_RGHT \ + ), + LAYOUT( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_PGUP, \ + KC_HOME, KC_PGDN, KC_END \ + ), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, + ), +}; diff --git a/keyboards/hhkb_lite_2/keymaps/via/keymap.json b/keyboards/hhkb_lite_2/keymaps/via/keymap.json new file mode 100644 index 000000000000..bf1dc392f6b4 --- /dev/null +++ b/keyboards/hhkb_lite_2/keymaps/via/keymap.json @@ -0,0 +1,49 @@ +{ + "name": "HHKB Lite 2", + "vendorId": "0x1337", + "productId": "0x88b2", + "keyboard": "hhkb_lite_2", + "lighting": "none", + "matrix": { "rows": 8, "cols": 14 }, + "keymap": "via", + "layout": "LAYOUT", + "layouts": { + "keymap": [ + [{"y": 1.5, "c": "#777777", "f": 4}, "5,9", {"c": "#cccccc", "f": 5}, "1,9", "1,8", "1,7", "1,6", "0,6", "0,5", "1,5", "1,4", "1,3", "1,2", "0,2", "0,4", "4,13", {"f": 4}, "0,9"], + [{"c": "#777777", "w": 1.5}, "3,9", {"c": "#cccccc", "f": 5}, "2,9", "2,8", "2,7", "2,6", "3,6", "3,5", "2,5", "2,4", "2,3", "2,2", "3,2", "3,4", {"c": "#777777", "w": 1.5}, "3,13"], + [{"c": "#aaaaaa", "f": 4, "w": 1.75}, "0,10", {"c": "#cccccc", "f": 5}, "4,9", "4,8", "4,7", "4,6", "5,6", "5,5", "4,5", "4,4", "4,3", "4,2", "5,2", {"c": "#777777", "w": 2.25}, "6,13"], + [{"c": "#aaaaaa", "f": 4, "w": 2.25}, "3,11", {"c": "#cccccc", "f": 5}, "6,9", "6,8", "6,7", "6,6", "7,6", "7,5", "6,5", "6,0", "6,3", "7,2", {"c": "#aaaaaa", "w": 1.75}, "6,11"], + [{"x": 1, "f": 4}, "0,1", "5,12", "4,0", {"c": "#cccccc", "f": 5, "w": 6}, "7,13", {"c": "#aaaaaa", "f": 4}, "3,0", "7,12", {"x": 1, "c": "#777777", "f": 3, "h": 0.75}, "0,0"], + [{"y": -0.25, "x": 12, "h": 0.75}, "3,3", {"h": 0.75}, "1,0", {"h": 0.75}, "2,0"] + ] + }, + "layers": [ + [ + "KC_ESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSLS", "KC_GRV", + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSPC", + "KC_LCTL", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_ENT", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", + "MO(1)", "KC_LALT", "KC_LGUI", "KC_SPC", "KC_RGUI", "KC_RALT", + "KC_UP", + "KC_LEFT", "KC_DOWN", "KC_RGHT" + ], + [ + "RESET", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_INS", "KC_DEL", + "KC_CAPS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_SLCK", "KC_PAUS", "KC_UP", "KC_NO", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_HOME", "KC_PGUP", "KC_LEFT", "KC_RIGHT", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_END", "KC_PGDN", "KC_DOWN", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_PGUP", + "KC_HOME", "KC_PGDN", "KC_END" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS" + ] + ] +} diff --git a/keyboards/hhkb_lite_2/keymaps/via/rules.mk b/keyboards/hhkb_lite_2/keymaps/via/rules.mk new file mode 100644 index 000000000000..bf8398632c13 --- /dev/null +++ b/keyboards/hhkb_lite_2/keymaps/via/rules.mk @@ -0,0 +1,13 @@ +VIA_ENABLE = yes + +BOOTMAGIC_ENABLE = lite + +# save space +LTO_ENABLE = yes +LEADER_ENABLE = no +FAUXCLICKY_ENABLE = no +MIDI_ENABLE = no +BLUETOOTH_ENABLE = no +KEY_LOCK_ENABLE = no +TERMINAL_ENABLE = no +MOUSEKEY_ENABLE = no From 445cb430ef2f0f55ca6cc7776783eec2c8b65c6c Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sat, 13 Jun 2020 00:35:17 +0800 Subject: [PATCH 12/23] Remove redundant keymap.c --- keyboards/hhkb_lite_2/keymaps/via/keymap.c | 32 ---------------------- 1 file changed, 32 deletions(-) delete mode 100644 keyboards/hhkb_lite_2/keymaps/via/keymap.c diff --git a/keyboards/hhkb_lite_2/keymaps/via/keymap.c b/keyboards/hhkb_lite_2/keymaps/via/keymap.c deleted file mode 100644 index 2f10653317f9..000000000000 --- a/keyboards/hhkb_lite_2/keymaps/via/keymap.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "hhkb_lite_2.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, \ - KC_UP, \ - KC_LEFT, KC_DOWN, KC_RGHT \ - ), - LAYOUT( - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_PGUP, \ - KC_HOME, KC_PGDN, KC_END \ - ), - - LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, - ), -}; From cb8f9268eabfc13325c33a073a9c2edf1e2d565d Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sat, 13 Jun 2020 00:37:25 +0800 Subject: [PATCH 13/23] Add README for Via keymap --- keyboards/hhkb_lite_2/keymaps/via/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 keyboards/hhkb_lite_2/keymaps/via/README.md diff --git a/keyboards/hhkb_lite_2/keymaps/via/README.md b/keyboards/hhkb_lite_2/keymaps/via/README.md new file mode 100644 index 000000000000..6eee36480ea0 --- /dev/null +++ b/keyboards/hhkb_lite_2/keymaps/via/README.md @@ -0,0 +1,3 @@ +# Via-enabled keymap for HHKB Lite 2 + +See https://caniusevia.com/ From 6c52795072295b010781e28f250be6da04f30230 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sat, 13 Jun 2020 00:39:38 +0800 Subject: [PATCH 14/23] Fix vendorId for Via keymap --- keyboards/hhkb_lite_2/keymaps/via/keymap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/hhkb_lite_2/keymaps/via/keymap.json b/keyboards/hhkb_lite_2/keymaps/via/keymap.json index bf1dc392f6b4..a98c2d7534d0 100644 --- a/keyboards/hhkb_lite_2/keymaps/via/keymap.json +++ b/keyboards/hhkb_lite_2/keymaps/via/keymap.json @@ -1,6 +1,6 @@ { "name": "HHKB Lite 2", - "vendorId": "0x1337", + "vendorId": "0x88b2", "productId": "0x88b2", "keyboard": "hhkb_lite_2", "lighting": "none", From 95aad51865ef10e3ef7f64b8d35ecada5f5614d9 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Mon, 29 Jun 2020 22:35:50 +0800 Subject: [PATCH 15/23] Apply suggestions from code review Cleanup based on review feedback Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Ryan --- keyboards/hhkb_lite_2/config.h | 5 ++-- .../hhkb_lite_2/keymaps/default/keymap.c | 28 +++++++++---------- keyboards/hhkb_lite_2/rules.mk | 1 - 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/keyboards/hhkb_lite_2/config.h b/keyboards/hhkb_lite_2/config.h index cbf30f058b07..30d27eb679d0 100644 --- a/keyboards/hhkb_lite_2/config.h +++ b/keyboards/hhkb_lite_2/config.h @@ -7,8 +7,8 @@ #define PRODUCT_ID 0x88b2 #define DEVICE_VER 0x0002 #define MANUFACTURER PFU -#define PRODUCT keyboard -#define DESCRIPTION HHKB Lite 2 +#define PRODUCT HHKB Lite 2 +#define DESCRIPTION keyboard /* key matrix size */ #define MATRIX_ROWS 8 @@ -24,4 +24,3 @@ /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 - diff --git a/keyboards/hhkb_lite_2/keymaps/default/keymap.c b/keyboards/hhkb_lite_2/keymaps/default/keymap.c index fe4e50471ed3..dd2d552e0b52 100644 --- a/keyboards/hhkb_lite_2/keymaps/default/keymap.c +++ b/keyboards/hhkb_lite_2/keymaps/default/keymap.c @@ -2,21 +2,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, \ - KC_UP, \ - KC_LEFT, KC_DOWN, KC_RGHT \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, + KC_UP, + KC_LEFT, KC_DOWN, KC_RGHT ), LAYOUT( - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_PGUP, \ - KC_HOME, KC_PGDN, KC_END \ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PGUP, + KC_HOME, KC_PGDN, KC_END ), }; diff --git a/keyboards/hhkb_lite_2/rules.mk b/keyboards/hhkb_lite_2/rules.mk index fbbb4222d072..da68be6d3a1a 100644 --- a/keyboards/hhkb_lite_2/rules.mk +++ b/keyboards/hhkb_lite_2/rules.mk @@ -27,4 +27,3 @@ MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output -HD44780_ENABLE = no # Enable support for HD44780 based LCDs From 8249e304a2cf2e8e16143141bb45b3f64cc1e1a0 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Mon, 29 Jun 2020 23:35:14 +0800 Subject: [PATCH 16/23] Clean up via keymap makefile rules Co-authored-by: Ryan --- keyboards/hhkb_lite_2/keymaps/via/rules.mk | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/keyboards/hhkb_lite_2/keymaps/via/rules.mk b/keyboards/hhkb_lite_2/keymaps/via/rules.mk index bf8398632c13..36b7ba9cbc98 100644 --- a/keyboards/hhkb_lite_2/keymaps/via/rules.mk +++ b/keyboards/hhkb_lite_2/keymaps/via/rules.mk @@ -1,13 +1,2 @@ VIA_ENABLE = yes - -BOOTMAGIC_ENABLE = lite - -# save space LTO_ENABLE = yes -LEADER_ENABLE = no -FAUXCLICKY_ENABLE = no -MIDI_ENABLE = no -BLUETOOTH_ENABLE = no -KEY_LOCK_ENABLE = no -TERMINAL_ENABLE = no -MOUSEKEY_ENABLE = no From d11ed5eb016c1e71a42b5d390163a0c994963535 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Mon, 29 Jun 2020 23:35:39 +0800 Subject: [PATCH 17/23] Switch to C keymap instead of JSON for Via layout --- keyboards/hhkb_lite_2/keymaps/via/keymap.c | 31 ++++++++++++ keyboards/hhkb_lite_2/keymaps/via/keymap.json | 49 ------------------- 2 files changed, 31 insertions(+), 49 deletions(-) create mode 100644 keyboards/hhkb_lite_2/keymaps/via/keymap.c delete mode 100644 keyboards/hhkb_lite_2/keymaps/via/keymap.json diff --git a/keyboards/hhkb_lite_2/keymaps/via/keymap.c b/keyboards/hhkb_lite_2/keymaps/via/keymap.c new file mode 100644 index 000000000000..ec43973f3f90 --- /dev/null +++ b/keyboards/hhkb_lite_2/keymaps/via/keymap.c @@ -0,0 +1,31 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ + LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, + KC_UP, + KC_LEFT, KC_DOWN, KC_RGHT + ), + LAYOUT( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PGUP, + KC_HOME, KC_PGDN, KC_END + ), + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/hhkb_lite_2/keymaps/via/keymap.json b/keyboards/hhkb_lite_2/keymaps/via/keymap.json deleted file mode 100644 index a98c2d7534d0..000000000000 --- a/keyboards/hhkb_lite_2/keymaps/via/keymap.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "HHKB Lite 2", - "vendorId": "0x88b2", - "productId": "0x88b2", - "keyboard": "hhkb_lite_2", - "lighting": "none", - "matrix": { "rows": 8, "cols": 14 }, - "keymap": "via", - "layout": "LAYOUT", - "layouts": { - "keymap": [ - [{"y": 1.5, "c": "#777777", "f": 4}, "5,9", {"c": "#cccccc", "f": 5}, "1,9", "1,8", "1,7", "1,6", "0,6", "0,5", "1,5", "1,4", "1,3", "1,2", "0,2", "0,4", "4,13", {"f": 4}, "0,9"], - [{"c": "#777777", "w": 1.5}, "3,9", {"c": "#cccccc", "f": 5}, "2,9", "2,8", "2,7", "2,6", "3,6", "3,5", "2,5", "2,4", "2,3", "2,2", "3,2", "3,4", {"c": "#777777", "w": 1.5}, "3,13"], - [{"c": "#aaaaaa", "f": 4, "w": 1.75}, "0,10", {"c": "#cccccc", "f": 5}, "4,9", "4,8", "4,7", "4,6", "5,6", "5,5", "4,5", "4,4", "4,3", "4,2", "5,2", {"c": "#777777", "w": 2.25}, "6,13"], - [{"c": "#aaaaaa", "f": 4, "w": 2.25}, "3,11", {"c": "#cccccc", "f": 5}, "6,9", "6,8", "6,7", "6,6", "7,6", "7,5", "6,5", "6,0", "6,3", "7,2", {"c": "#aaaaaa", "w": 1.75}, "6,11"], - [{"x": 1, "f": 4}, "0,1", "5,12", "4,0", {"c": "#cccccc", "f": 5, "w": 6}, "7,13", {"c": "#aaaaaa", "f": 4}, "3,0", "7,12", {"x": 1, "c": "#777777", "f": 3, "h": 0.75}, "0,0"], - [{"y": -0.25, "x": 12, "h": 0.75}, "3,3", {"h": 0.75}, "1,0", {"h": 0.75}, "2,0"] - ] - }, - "layers": [ - [ - "KC_ESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSLS", "KC_GRV", - "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSPC", - "KC_LCTL", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_ENT", - "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", - "MO(1)", "KC_LALT", "KC_LGUI", "KC_SPC", "KC_RGUI", "KC_RALT", - "KC_UP", - "KC_LEFT", "KC_DOWN", "KC_RGHT" - ], - [ - "RESET", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_INS", "KC_DEL", - "KC_CAPS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_SLCK", "KC_PAUS", "KC_UP", "KC_NO", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_HOME", "KC_PGUP", "KC_LEFT", "KC_RIGHT", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_END", "KC_PGDN", "KC_DOWN", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_PGUP", - "KC_HOME", "KC_PGDN", "KC_END" - ], - [ - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS" - ] - ] -} From 2bd1fafdcea84d88bd56713561bae3d465a6857c Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Mon, 29 Jun 2020 23:41:37 +0800 Subject: [PATCH 18/23] Move bootmagic key config to main Moved to main keyboard config to be shared by all keymaps. --- keyboards/hhkb_lite_2/config.h | 4 ++++ keyboards/hhkb_lite_2/keymaps/via/config.h | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/hhkb_lite_2/config.h b/keyboards/hhkb_lite_2/config.h index 30d27eb679d0..6f3f58cd169e 100644 --- a/keyboards/hhkb_lite_2/config.h +++ b/keyboards/hhkb_lite_2/config.h @@ -24,3 +24,7 @@ /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 + +/* Bootmagic keys are non-standard because of matrix */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COL 9 diff --git a/keyboards/hhkb_lite_2/keymaps/via/config.h b/keyboards/hhkb_lite_2/keymaps/via/config.h index b98573870895..0865e452088d 100644 --- a/keyboards/hhkb_lite_2/keymaps/via/config.h +++ b/keyboards/hhkb_lite_2/keymaps/via/config.h @@ -1,3 +1 @@ -#define BOOTMAGIC_LITE_ROW 5 -#define BOOTMAGIC_LITE_COL 9 #define DYNAMIC_KEYMAP_LAYER_COUNT 3 From 7d4deb25df5975c715e7c245b72f94869d97a88d Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sun, 16 Aug 2020 19:00:46 +0800 Subject: [PATCH 19/23] Address PR feedback --- keyboards/hhkb_lite_2/config.h | 4 ++-- keyboards/hhkb_lite_2/keymaps/via/config.h | 2 ++ keyboards/hhkb_lite_2/keymaps/via/keymap.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/keyboards/hhkb_lite_2/config.h b/keyboards/hhkb_lite_2/config.h index 6f3f58cd169e..6407b3acd12a 100644 --- a/keyboards/hhkb_lite_2/config.h +++ b/keyboards/hhkb_lite_2/config.h @@ -4,7 +4,7 @@ /* USB Device descriptor parameter */ #define VENDOR_ID 0x88B2 -#define PRODUCT_ID 0x88b2 +#define PRODUCT_ID 0x88B2 #define DEVICE_VER 0x0002 #define MANUFACTURER PFU #define PRODUCT HHKB Lite 2 @@ -27,4 +27,4 @@ /* Bootmagic keys are non-standard because of matrix */ #define BOOTMAGIC_LITE_ROW 5 -#define BOOTMAGIC_LITE_COL 9 +#define BOOTMAGIC_LITE_COLUMN 9 diff --git a/keyboards/hhkb_lite_2/keymaps/via/config.h b/keyboards/hhkb_lite_2/keymaps/via/config.h index 0865e452088d..a3b77a5b4d0b 100644 --- a/keyboards/hhkb_lite_2/keymaps/via/config.h +++ b/keyboards/hhkb_lite_2/keymaps/via/config.h @@ -1 +1,3 @@ +#pragma once + #define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/hhkb_lite_2/keymaps/via/keymap.c b/keyboards/hhkb_lite_2/keymaps/via/keymap.c index ec43973f3f90..7cbe7331c3d7 100644 --- a/keyboards/hhkb_lite_2/keymaps/via/keymap.c +++ b/keyboards/hhkb_lite_2/keymaps/via/keymap.c @@ -1,6 +1,6 @@ #include QMK_KEYBOARD_H -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, From ad90306e4b24fc7c0c9a0da13ff7174a8700869a Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sun, 16 Aug 2020 19:32:48 +0800 Subject: [PATCH 20/23] Reformat config comments --- keyboards/hhkb_lite_2/config.h | 1 - keyboards/hhkb_lite_2/{README.md => readme.md} | 0 keyboards/hhkb_lite_2/rules.mk | 16 +++++----------- 3 files changed, 5 insertions(+), 12 deletions(-) rename keyboards/hhkb_lite_2/{README.md => readme.md} (100%) diff --git a/keyboards/hhkb_lite_2/config.h b/keyboards/hhkb_lite_2/config.h index 6407b3acd12a..d9dd641951a5 100644 --- a/keyboards/hhkb_lite_2/config.h +++ b/keyboards/hhkb_lite_2/config.h @@ -8,7 +8,6 @@ #define DEVICE_VER 0x0002 #define MANUFACTURER PFU #define PRODUCT HHKB Lite 2 -#define DESCRIPTION keyboard /* key matrix size */ #define MATRIX_ROWS 8 diff --git a/keyboards/hhkb_lite_2/README.md b/keyboards/hhkb_lite_2/readme.md similarity index 100% rename from keyboards/hhkb_lite_2/README.md rename to keyboards/hhkb_lite_2/readme.md diff --git a/keyboards/hhkb_lite_2/rules.mk b/keyboards/hhkb_lite_2/rules.mk index da68be6d3a1a..e9d15eb6caf7 100644 --- a/keyboards/hhkb_lite_2/rules.mk +++ b/keyboards/hhkb_lite_2/rules.mk @@ -2,13 +2,6 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = halfkay # Build Options @@ -17,13 +10,14 @@ BOOTLOADER = halfkay BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes # Unicode From c81d2d8658d39d9027139c7a8f07b7fc6b5d26e0 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sun, 16 Aug 2020 22:42:53 +0800 Subject: [PATCH 21/23] Format rules.mk comments Co-authored-by: Ryan --- keyboards/hhkb_lite_2/rules.mk | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/keyboards/hhkb_lite_2/rules.mk b/keyboards/hhkb_lite_2/rules.mk index e9d15eb6caf7..dd02717921f2 100644 --- a/keyboards/hhkb_lite_2/rules.mk +++ b/keyboards/hhkb_lite_2/rules.mk @@ -5,19 +5,19 @@ MCU = atmega32u4 BOOTLOADER = halfkay # Build Options -# comment out to disable the options. +# change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output -UNICODE_ENABLE = yes # Unicode +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes From ec4670d598e40d6ae408fe662851d5b9bc2de29a Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Sun, 16 Aug 2020 22:45:43 +0800 Subject: [PATCH 22/23] Rename README -> readme --- keyboards/hhkb_lite_2/keymaps/via/{README.md => readme.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename keyboards/hhkb_lite_2/keymaps/via/{README.md => readme.md} (100%) diff --git a/keyboards/hhkb_lite_2/keymaps/via/README.md b/keyboards/hhkb_lite_2/keymaps/via/readme.md similarity index 100% rename from keyboards/hhkb_lite_2/keymaps/via/README.md rename to keyboards/hhkb_lite_2/keymaps/via/readme.md From 37de444a086039947f53f1ce7b26f5db13b51b62 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Mon, 17 Aug 2020 11:05:38 +0800 Subject: [PATCH 23/23] Use `make` instead of `qmk` in examples Co-authored-by: Ryan --- keyboards/hhkb_lite_2/readme.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/keyboards/hhkb_lite_2/readme.md b/keyboards/hhkb_lite_2/readme.md index ea380245bcb5..a4b9f1611567 100644 --- a/keyboards/hhkb_lite_2/readme.md +++ b/keyboards/hhkb_lite_2/readme.md @@ -7,9 +7,13 @@ by PFU, identified by model numbers PD-KB200W/U or PD-KB200B/U. It uses the replacement Teensy 2.0 board from [my other project](https://github.com/thirteen37/HHKB-Lite-2-Teensy). -Compile and flash this firmware (after setting up your build environment): +Make example for this keyboard (after setting up your build environment): - qmk flash -kb hhkb_lite_2 -km default + make hhkb_lite_2:default + +Flashing example for this keyboard: + + make hhkb_lite_2:default:flash See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).