summaryrefslogtreecommitdiff
path: root/keyboards/hhkb/ansi
diff options
context:
space:
mode:
authorJames Young <18669334+noroadsleft@users.noreply.github.com>2020-05-30 13:14:59 -0700
committerGitHub <noreply@github.com>2020-05-30 13:14:59 -0700
commitfced377ac007d27f2650ccffbe0b18abcdcfe23d (patch)
treebd5b141987394a5a16cfc416bfe2b9efdb14d067 /keyboards/hhkb/ansi
parent7b8a013826ad90714a05ea522de53adf964ab3b9 (diff)
2020 May 30 Breaking Changes Update (#9215)
* Branch point for 2020 May 30 Breaking Change * Migrate `ACTION_LAYER_TOGGLE` to `TG()` (#8954) * Migrate `ACTION_MODS_ONESHOT` to `OSM()` (#8957) * Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (#8958) * Migrate `ACTION_LAYER_MODS` to `LM()` (#8959) * Migrate `ACTION_MODS_TAP_KEY` to `MT()` (#8968) * Convert V-USB usbdrv to a submodule (#8321) * Unify Tap Hold functions and documentation (#8348) * Changing board names to prevent confusion (#8412) * Move the Keyboardio Model01 to a keyboardio/ subdir (#8499) * Move spaceman keyboards (#8830) * Migrate miscellaneous `fn_actions` entries (#8977) * Migrate `ACTION_MODS_KEY` to chained mod keycodes (#8979) * Organizing my keyboards (plaid, tartan, ergoinu) (#8537) * Refactor Lily58 to use split_common (#6260) * Refactor zinc to use split_common (#7114) * Add a message if bin/qmk doesn't work (#9000) * Fix conflicting types for 'tfp_printf' (#8269) * Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (#6480) * Refactor and updates to TKC1800 code (#8472) * Switch to qmk forks for everything (#9019) * audio refactor: replace deprecated PLAY_NOTE_ARRAY (#8484) * Audio enable corrections (2/3) (#8903) * Split HHKB to ANSI and JP layouts and Add VIA support for each (#8582) * Audio enable corrections (Part 4) (#8974) * Fix typo from PR7114 (#9171) * Augment future branch Changelogs (#8978) * Revert "Branch point for 2020 May 30 Breaking Change"
Diffstat (limited to 'keyboards/hhkb/ansi')
-rw-r--r--keyboards/hhkb/ansi/ansi.c1
-rw-r--r--keyboards/hhkb/ansi/ansi.h23
-rw-r--r--keyboards/hhkb/ansi/config.h104
-rw-r--r--keyboards/hhkb/ansi/hhkb_avr.h157
-rw-r--r--keyboards/hhkb/ansi/info.json73
-rw-r--r--keyboards/hhkb/ansi/keymaps/blakedietz/README.md134
-rw-r--r--keyboards/hhkb/ansi/keymaps/blakedietz/config.h24
-rw-r--r--keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c125
-rw-r--r--keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk3
-rw-r--r--keyboards/hhkb/ansi/keymaps/brett/config.h17
-rw-r--r--keyboards/hhkb/ansi/keymaps/brett/keymap.c119
-rw-r--r--keyboards/hhkb/ansi/keymaps/brett/readme.md13
-rw-r--r--keyboards/hhkb/ansi/keymaps/brett/rules.mk4
-rw-r--r--keyboards/hhkb/ansi/keymaps/cinaeco/README.md23
-rw-r--r--keyboards/hhkb/ansi/keymaps/cinaeco/config.h20
-rw-r--r--keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c178
-rw-r--r--keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk20
-rw-r--r--keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c89
-rw-r--r--keyboards/hhkb/ansi/keymaps/dbroqua/readme.md26
-rw-r--r--keyboards/hhkb/ansi/keymaps/default/keymap.c56
-rw-r--r--keyboards/hhkb/ansi/keymaps/eric/keymap.c73
-rw-r--r--keyboards/hhkb/ansi/keymaps/krusli/config.h1
-rw-r--r--keyboards/hhkb/ansi/keymaps/krusli/keymap.c75
-rw-r--r--keyboards/hhkb/ansi/keymaps/lxol/keymap.c200
-rw-r--r--keyboards/hhkb/ansi/keymaps/mjt/config.h72
-rw-r--r--keyboards/hhkb/ansi/keymaps/mjt/keymap.c112
-rw-r--r--keyboards/hhkb/ansi/keymaps/mjt/readme.md16
-rw-r--r--keyboards/hhkb/ansi/keymaps/mjt/rules.mk1
-rw-r--r--keyboards/hhkb/ansi/keymaps/schaeferdev/README.md36
-rw-r--r--keyboards/hhkb/ansi/keymaps/schaeferdev/config.h9
-rw-r--r--keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c76
-rw-r--r--keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk1
-rw-r--r--keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c143
-rw-r--r--keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h15
-rw-r--r--keyboards/hhkb/ansi/keymaps/shela/config.h12
-rw-r--r--keyboards/hhkb/ansi/keymaps/shela/keymap.c186
-rw-r--r--keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h32
-rw-r--r--keyboards/hhkb/ansi/keymaps/shela/readme.md14
-rw-r--r--keyboards/hhkb/ansi/keymaps/shela/rules.mk1
-rw-r--r--keyboards/hhkb/ansi/keymaps/smt/keymap.c172
-rw-r--r--keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c20
-rw-r--r--keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md22
-rw-r--r--keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore3
-rw-r--r--keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c12
-rw-r--r--keyboards/hhkb/ansi/keymaps/via/keymap.c68
-rw-r--r--keyboards/hhkb/ansi/keymaps/via/rules.mk1
-rw-r--r--keyboards/hhkb/ansi/keymaps/xyverz/keymap.c137
-rw-r--r--keyboards/hhkb/ansi/matrix.c211
-rw-r--r--keyboards/hhkb/ansi/readme.md14
-rw-r--r--keyboards/hhkb/ansi/rules.mk71
50 files changed, 3015 insertions, 0 deletions
diff --git a/keyboards/hhkb/ansi/ansi.c b/keyboards/hhkb/ansi/ansi.c
new file mode 100644
index 0000000000..cefc4e0690
--- /dev/null
+++ b/keyboards/hhkb/ansi/ansi.c
@@ -0,0 +1 @@
+#include "ansi.h" \ No newline at end of file
diff --git a/keyboards/hhkb/ansi/ansi.h b/keyboards/hhkb/ansi/ansi.h
new file mode 100644
index 0000000000..28e8d2fef8
--- /dev/null
+++ b/keyboards/hhkb/ansi/ansi.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ K31, K30, K00, K10, K11, K20, K21, K40, K41, K60, K61, K70, K71, K50, K51, \
+ K32, K01, K02, K13, K12, K23, K22, K42, K43, K62, K63, K73, K72, K52, \
+ K33, K04, K03, K14, K15, K24, K25, K45, K44, K65, K64, K74, K53, \
+ K34, K05, K06, K07, K16, K17, K26, K46, K66, K76, K75, K55, K54, \
+ K35, K36, K37, K57, K56) \
+ \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07 }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17 }, \
+ { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37 }, \
+ { K40, K41, K42, K43, K44, K45, K46, KC_NO }, \
+ { K50, K51, K52, K53, K54, K55, K56, K57 }, \
+ { K60, K61, K62, K63, K64, K65, K66, KC_NO }, \
+ { K70, K71, K72, K73, K74, K75, K76, KC_NO } \
+}
+
+#define LAYOUT_60_hhkb LAYOUT
diff --git a/keyboards/hhkb/ansi/config.h b/keyboards/hhkb/ansi/config.h
new file mode 100644
index 0000000000..689fd55681
--- /dev/null
+++ b/keyboards/hhkb/ansi/config.h
@@ -0,0 +1,104 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x4848 // HH = happy hacking
+#define PRODUCT_ID 0x0001 // ANSI HHKB
+#define DEVICE_VER 0x0104
+#define MANUFACTURER q.m.k
+#define PRODUCT HHKB mod
+#define DESCRIPTION q.m.k keyboard firmware for HHKB
+
+/* key matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 8
+
+#define TAPPING_TERM 200
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 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
+
+#ifdef HHKB_RN42_ENABLE
+// rn42 support -- acquired from the tmk repo. This is almost certainly not
+// integrated with qmk in the correct way.
+
+#define SUART_OUT_PORT PORTD
+#define SUART_OUT_BIT 0
+#define SUART_IN_PIN PIND
+#define SUART_IN_BIT 1
+
+#ifdef __AVR_ATmega32U4__
+ /* iom32u4.h has no definition of UCSR1D. copy from iom32u2.h */
+ #define UCSR1D _SFR_MEM8(0xCB)
+ #define RTSEN 0
+ #define CTSEN 1
+
+ #define SERIAL_UART_BAUD 115200
+ #define SERIAL_UART_DATA UDR1
+ #define SERIAL_UART_UBRR ((F_CPU/(16.0*SERIAL_UART_BAUD)-1+0.5))
+ #define SERIAL_UART_RXD_VECT USART1_RX_vect
+ #define SERIAL_UART_TXD_READY (UCSR1A&(1<<UDRE1))
+ #define SERIAL_UART_INIT() do { \
+ UBRR1L = (uint8_t) SERIAL_UART_UBRR; /* baud rate */ \
+ UBRR1H = ((uint16_t)SERIAL_UART_UBRR>>8); /* baud rate */ \
+ UCSR1B |= (1<<RXCIE1) | (1<<RXEN1); /* RX interrupt, RX: enable */ \
+ UCSR1B |= (0<<TXCIE1) | (1<<TXEN1); /* TX interrupt, TX: enable */ \
+ UCSR1C |= (0<<UPM11) | (0<<UPM10); /* parity: none(00), even(01), odd(11) */ \
+ UCSR1D |= (0<<RTSEN) | (0<<CTSEN); /* RTS, CTS(no flow control by hardware) */ \
+ DDRD |= (1<<5); PORTD &= ~(1<<5); /* RTS for flow control by firmware */ \
+ sei(); \
+ } while(0)
+ #define SERIAL_UART_RTS_LO() do { PORTD &= ~(1<<5); } while (0)
+ #define SERIAL_UART_RTS_HI() do { PORTD |= (1<<5); } while (0)
+#else
+ #error "USART configuration is needed."
+#endif
+
+/* power control of key switch board */
+#define HHKB_POWER_SAVING
+
+#endif
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+*/
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
diff --git a/keyboards/hhkb/ansi/hhkb_avr.h b/keyboards/hhkb/ansi/hhkb_avr.h
new file mode 100644
index 0000000000..f9446deef7
--- /dev/null
+++ b/keyboards/hhkb/ansi/hhkb_avr.h
@@ -0,0 +1,157 @@
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <avr/io.h>
+#include <avr/interrupt.h>
+#include <util/delay.h>
+
+
+// Timer resolution check
+#if (1000000/TIMER_RAW_FREQ > 20)
+# error "Timer resolution(>20us) is not enough for HHKB matrix scan tweak on V-USB."
+#endif
+
+
+/*
+ * HHKB Matrix I/O
+ *
+ * row: HC4051[A,B,C] selects scan row0-7
+ * row-ext: [En0,En1] row extention for JP
+ * col: LS145[A,B,C,D] selects scan col0-7 and enable(D)
+ * key: on: 0/off: 1
+ * prev: hysteresis control: assert(1) when previous key state is on
+ */
+
+
+#if defined(__AVR_ATmega32U4__)
+/*
+ * For TMK HHKB alt controller(ATMega32U4)
+ *
+ * row: PB0-2
+ * col: PB3-5,6
+ * key: PD7(pull-uped)
+ * prev: PB7
+ * power: PD4(L:off/H:on)
+ * row-ext: PC6,7 for HHKB JP(active low)
+ */
+static inline void KEY_ENABLE(void) { (PORTB &= ~(1<<6)); }
+static inline void KEY_UNABLE(void) { (PORTB |= (1<<6)); }
+static inline bool KEY_STATE(void) { return (PIND & (1<<7)); }
+static inline void KEY_PREV_ON(void) { (PORTB |= (1<<7)); }
+static inline void KEY_PREV_OFF(void) { (PORTB &= ~(1<<7)); }
+#ifdef HHKB_POWER_SAVING
+static inline void KEY_POWER_ON(void) {
+ DDRB = 0xFF; PORTB = 0x40; // change pins output
+ DDRD |= (1<<4); PORTD |= (1<<4); // MOS FET switch on
+ /* Without this wait you will miss or get false key events. */
+ _delay_ms(5); // wait for powering up
+}
+static inline void KEY_POWER_OFF(void) {
+ /* input with pull-up consumes less than without it when pin is open. */
+ DDRB = 0x00; PORTB = 0xFF; // change pins input with pull-up
+ DDRD |= (1<<4); PORTD &= ~(1<<4); // MOS FET switch off
+}
+static inline bool KEY_POWER_STATE(void) { return PORTD & (1<<4); }
+#else
+static inline void KEY_POWER_ON(void) {}
+static inline void KEY_POWER_OFF(void) {}
+static inline bool KEY_POWER_STATE(void) { return true; }
+#endif
+static inline void KEY_INIT(void)
+{
+ /* row,col,prev: output */
+ DDRB = 0xFF;
+ PORTB = 0x40; // unable
+ /* key: input with pull-up */
+ DDRD &= ~0x80;
+ PORTD |= 0x80;
+
+ KEY_UNABLE();
+ KEY_PREV_OFF();
+
+ KEY_POWER_OFF();
+}
+static inline void KEY_SELECT(uint8_t ROW, uint8_t COL)
+{
+ PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07);
+
+}
+
+
+#elif defined(__AVR_AT90USB1286__)
+/*
+ * For Teensy++(AT90USB1286)
+ *
+ * HHKB pro HHKB pro2
+ * row: PB0-2 (6-8) (5-7)
+ * col: PB3-5,6 (9-12) (8-11)
+ * key: PE6(pull-uped) (4) (3)
+ * prev: PE7 (5) (4)
+ *
+ * TODO: convert into 'staitc inline' function
+ */
+#define KEY_INIT() do { \
+ DDRB |= 0x7F; \
+ DDRE |= (1<<7); \
+ DDRE &= ~(1<<6); \
+ PORTE |= (1<<6); \
+} while (0)
+#define KEY_SELECT(ROW, COL) (PORTB = (PORTB & 0xC0) | \
+ (((COL) & 0x07)<<3) | \
+ ((ROW) & 0x07))
+#define KEY_ENABLE() (PORTB &= ~(1<<6))
+#define KEY_UNABLE() (PORTB |= (1<<6))
+#define KEY_STATE() (PINE & (1<<6))
+#define KEY_PREV_ON() (PORTE |= (1<<7))
+#define KEY_PREV_OFF() (PORTE &= ~(1<<7))
+#define KEY_POWER_ON()
+#define KEY_POWER_OFF()
+#define KEY_POWER_STATE() true
+
+
+#else
+# error "define code for matrix scan"
+#endif
+
+
+#if 0
+// For ATMega328P with V-USB
+//
+// #elif defined(__AVR_ATmega328P__)
+// Ports for V-USB
+// key: PB0(pull-uped)
+// prev: PB1
+// row: PB2-4
+// col: PC0-2,3
+// power: PB5(Low:on/Hi-z:off)
+#define KEY_INIT() do { \
+ DDRB |= 0x3E; \
+ DDRB &= ~(1<<0); \
+ PORTB |= 1<<0; \
+ DDRC |= 0x0F; \
+ KEY_UNABLE(); \
+ KEY_PREV_OFF(); \
+} while (0)
+#define KEY_SELECT(ROW, COL) do { \
+ PORTB = (PORTB & 0xE3) | ((ROW) & 0x07)<<2; \
+ PORTC = (PORTC & 0xF8) | ((COL) & 0x07); \
+} while (0)
+#define KEY_ENABLE() (PORTC &= ~(1<<3))
+#define KEY_UNABLE() (PORTC |= (1<<3))
+#define KEY_STATE() (PINB & (1<<0))
+#define KEY_PREV_ON() (PORTB |= (1<<1))
+#define KEY_PREV_OFF() (PORTB &= ~(1<<1))
+// Power supply switching
+#define KEY_POWER_ON() do { \
+ KEY_INIT(); \
+ PORTB &= ~(1<<5); \
+ _delay_ms(1); \
+} while (0)
+#define KEY_POWER_OFF() do { \
+ DDRB &= ~0x3F; \
+ PORTB &= ~0x3F; \
+ DDRC &= ~0x0F; \
+ PORTC &= ~0x0F; \
+} while (0)
+#endif
diff --git a/keyboards/hhkb/ansi/info.json b/keyboards/hhkb/ansi/info.json
new file mode 100644
index 0000000000..a36f1d44c8
--- /dev/null
+++ b/keyboards/hhkb/ansi/info.json
@@ -0,0 +1,73 @@
+{
+ "keyboard_name": "HHKB",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ { "label": "Esc", "x": 0, "y": 0 },
+ { "label": "!", "x": 1, "y": 0 },
+ { "label": "@", "x": 2, "y": 0 },
+ { "label": "#", "x": 3, "y": 0 },
+ { "label": "$", "x": 4, "y": 0 },
+ { "label": "%", "x": 5, "y": 0 },
+ { "label": "^", "x": 6, "y": 0 },
+ { "label": "&", "x": 7, "y": 0 },
+ { "label": "*", "x": 8, "y": 0 },
+ { "label": "(", "x": 9, "y": 0 },
+ { "label": ")", "x": 10, "y": 0 },
+ { "label": "_", "x": 11, "y": 0 },
+ { "label": "+", "x": 12, "y": 0 },
+ { "label": "|", "x": 13, "y": 0 },
+ { "label": "~", "x": 14, "y": 0 },
+ { "label": "Tab", "x": 0, "y": 1, "w": 1.5 },
+ { "label": "Q", "x": 1.5, "y": 1 },
+ { "label": "W", "x": 2.5, "y": 1 },
+ { "label": "E", "x": 3.5, "y": 1 },
+ { "label": "R", "x": 4.5, "y": 1 },
+ { "label": "T", "x": 5.5, "y": 1 },
+ { "label": "Y", "x": 6.5, "y": 1 },
+ { "label": "U", "x": 7.5, "y": 1 },
+ { "label": "I", "x": 8.5, "y": 1 },
+ { "label": "O", "x": 9.5, "y": 1 },
+ { "label": "P", "x": 10.5, "y": 1 },
+ { "label": "{", "x": 11.5, "y": 1 },
+ { "label": "}", "x": 12.5, "y": 1 },
+ { "label": "Delete", "x": 13.5, "y": 1, "w": 1.5 },
+ { "label": "Control", "x": 0, "y": 2, "w": 1.75 },
+ { "label": "A", "x": 1.75, "y": 2 },
+ { "label": "S", "x": 2.75, "y": 2 },
+ { "label": "D", "x": 3.75, "y": 2 },
+ { "label": "F", "x": 4.75, "y": 2 },
+ { "label": "G", "x": 5.75, "y": 2 },
+ { "label": "H", "x": 6.75, "y": 2 },
+ { "label": "J", "x": 7.75, "y": 2 },
+ { "label": "K", "x": 8.75, "y": 2 },
+ { "label": "L", "x": 9.75, "y": 2 },
+ { "label": ":", "x": 10.75, "y": 2 },
+ { "label": "\"", "x": 11.75, "y": 2 },
+ { "label": "Return", "x": 12.75, "y": 2, "w": 2.25 },
+ { "label": "Shift", "x": 0, "y": 3, "w": 2.25 },
+ { "label": "Z", "x": 2.25, "y": 3 },
+ { "label": "X", "x": 3.25, "y": 3 },
+ { "label": "C", "x": 4.25, "y": 3 },
+ { "label": "V", "x": 5.25, "y": 3 },
+ { "label": "B", "x": 6.25, "y": 3 },
+ { "label": "N", "x": 7.25, "y": 3 },
+ { "label": "M", "x": 8.25, "y": 3 },
+ { "label": "<", "x": 9.25, "y": 3 },
+ { "label": ">", "x": 10.25, "y": 3 },
+ { "label": "?", "x": 11.25, "y": 3 },
+ { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 },
+ { "label": "Fn", "x": 14, "y": 3 },
+ { "label": "", "x": 1.5, "y": 4 },
+ { "label": "", "x": 2.5, "y": 4, "w": 1.5 },
+ { "x": 4, "y": 4, "w": 6 },
+ { "label": "", "x": 10, "y": 4, "w": 1.5 },
+ { "label": "", "x": 11.5, "y": 4 }
+ ]
+ }
+ }
+}
diff --git a/keyboards/hhkb/ansi/keymaps/blakedietz/README.md b/keyboards/hhkb/ansi/keymaps/blakedietz/README.md
new file mode 100644
index 0000000000..4dff47a6e8
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/blakedietz/README.md
@@ -0,0 +1,134 @@
+# QMK HHKB Keymap: blakedietz
+
+<!-- TODO: Link to Hasu's geekhack page from his name -->
+<!-- TODO: Link to the ergodox ez layout in this repository -->
+
+This is my (Blake Dietz's) own take on a QMK keymap for the Happy Hacking Keyboard Pro 2 alternate controller made by Hasu. A lot of the
+ functionality was inspired by the ergodox ez default layout.
+
+## Dependencies
+
+### macOS
+
+```bash
+brew tap osx-cross/avr
+brew install avr-libc
+brew install dfu-programmer
+```
+
+### Windows/Linux
+
+[Build Environment Setup](https://github.com/jackhumbert/qmk_firmware/wiki#build-environment-setup)
+
+## Flashing
+
+You will need to make sure that you have something that you can use to press the button on the alternate controller in
+order to put it into boot mode.
+
+From the hhkb directory run the following:
+
+```bash
+make clean
+make hhkb:blakedietz:dfu
+```
+
+Press the button on the alternate controller to put the board into boot mode.
+
+You'll see an output similar to the following:
+
+```bash
+make hhkb:blakedietz:dfu
+
+Making hhkb with keymap blakedietz and target dfu
+
+avr-gcc (GCC) 6.2.0
+Copyright (C) 2016 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+Size before:
+ text data bss dec hex filename
+ 0 22162 0 22162 5692 hhkb_blakedietz.hex
+
+Compiling: keyboards/hhkb/keymaps/blakedietz/keymap.c [OK]
+Compiling: ./tmk_core/common/command.c [OK]
+Linking: .build/hhkb_blakedietz.elf [OK]
+Creating load file for Flash: .build/hhkb_blakedietz.hex [OK]
+
+Size after:
+ text data bss dec hex filename
+ 0 22162 0 22162 5692 hhkb_blakedietz.hex
+
+dfu-programmer: no device present.
+Error: Bootloader not found. Trying again in 5s.
+dfu-programmer: no device present.
+Error: Bootloader not found. Trying again in 5s.
+Bootloader Version: 0x00 (0)
+Erasing flash... Success
+Checking memory from 0x0 to 0x6FFF... Empty.
+Checking memory from 0x0 to 0x56FF... Empty.
+0% 100% Programming 0x5700 bytes...
+[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
+0% 100% Reading 0x7000 bytes...
+[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
+Validating... Success
+0x5700 bytes written into 0x7000 bytes memory (77.68%).
+```
+
+### Layers
+
+#### Default
+
+##### A more "standard" layout
+
+This layout places tilde in the standard location. Backspace is moved to the two upper-right-most keys and pipe
+is put back where it belongs (where backspace is on the default hhkb2 keymapping).
+
+##### Hyper key
+
+<!-- TODO: Link to Brett's article about the thyper key -->
+
+This layout throws out the HHKB's control key in favor of a Hyper key. Ctrl is instead placed on the z and / keys and
+can be activated with a long press. I find that this is far more ergonomic as it's less of a reach and it allows you to
+alternate to either hand when you need to use `ctrl` as a modifier.
+
+The hyper key can be held for hyper and tapped for escape. You'll find that this is quite nice for vim.
+
+Enter is also a hyper key. This allows for symmetry between control and enter. Hold for hyper, tap for enter.
+
+##### Tap to Hold
+
+###### CTL, ALT, GUI
+
+Since the HHKB does not have three super/meta keys, these keys were moved to pinky, ring and middle finger for ctrl, alt/
+ option and super respectively. This is closer to home row which I've found causes less strain.
+
+The Alt and Super keys are instead replaced with layer toggle keys to go to dev and mouse mode respectively.
+
+###### Space
+
+Hold space to switch to dev mode. This will put you on a layer to have vim like arrow functionality on h,j,k and l. Use
+this in editors that don't have vim keybindings.
+
+### Dev
+
+The Dev layer can be activated holding space or hitting the HHKB's Alt key. This will put you in a mode
+where all function keys are available and left, right, up and down are mapped to their vim equivalents. The function
+ keys are mapped in such a way that you can use them for debugging. Typically I map debugging functions in all IDEs to
+ the following for a seamless debugging experience (e.g. jumping from Intellij to chrome dev tools and back):
+
+ - f1 -> step over
+ - f2 -> step into
+ - f3 -> step out
+ - f4 -> continue
+ - f5 -> set break point on current line
+
+### Media
+
+The media layer can be activated by pressing and holding the semi-colon. I've also placed the play and pause key on the
+apostrophe key in the media layer. This allows you to easily roll your pinky from the media toggle (semi-colon) to the
+play/pause key in one fluid motion.
+
+I've also tried to logically map next/previous track along with volume up/down vim behavior. In vim since middle finger
+goes up on k and index finger goes down on j, next/prev track is k/j respectively. ,/m changes volume up/down
+respectively while toggled to the media layer.
diff --git a/keyboards/hhkb/ansi/keymaps/blakedietz/config.h b/keyboards/hhkb/ansi/keymaps/blakedietz/config.h
new file mode 100644
index 0000000000..e0d2bce0f1
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/blakedietz/config.h
@@ -0,0 +1,24 @@
+// Based off of this section:
+// https://github.com/qmk/qmk_firmware/blob/master/doc/BUILD_GUIDE.md#the-configh-file
+#ifndef CONFIG_BLAKEDIETZ_H
+#define CONFIG_BLAKEDIETZ_H
+
+// Bring in original defaults
+#include "../../config.h"
+
+// Define mousekey settings
+#define MOUSEKEY_DELAY 0
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_MAX_SPEED 2
+#define MOUSEKEY_TIME_TO_MAX 5
+#define MOUSEKEY_WHEEL_DELAY 0
+
+// Set up tapdance functionality
+//#define TAPPING_TOGGLE 1
+// TAPPING_TERM is set in config.h this defaults to 200
+
+// This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when
+// you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
+#define IGNORE_MOD_TAP_INTERRUPT
+
+#endif
diff --git a/keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c b/keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c
new file mode 100644
index 0000000000..a9146a4a08
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c
@@ -0,0 +1,125 @@
+#include QMK_KEYBOARD_H
+
+// Layer names
+#define BASE 0
+#define DEV 1
+#define MOUSE 2
+#define MEDIA 3
+
+// Required for leader function. Measured in ms
+// #define LEADER_TIMEOUT 300
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* BASE Level: Default Layer
+ |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----|
+ | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bksp |Lead|
+ |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | \ |
+ |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----|
+ | Esc/Hyper | A | S | D | F | G | H | J | K | L |;/Media| ' | Enter | | |
+ |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----|
+ | Shift | Z/Ctl | X/Alt | C/Gui | V | B | N | M | ,/Gui | ./Alt | //Ctl | Shift | Dev | | |
+ |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----|
+ TODO: Maybe add a photoshop layer for when I need to hold spacebar down. Maybe just make it a layer that you
+ |------+------+-----------------------+------+------|
+ | Dev |Mouse | ******* Space ******* | Dev |Mouse |
+ |------+------+-----------------------+------+------|
+ */
+
+ [BASE] = LAYOUT( // default layer
+ KC_GRV, 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_BSPC, KC_LEAD,
+ 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_BSLS,
+ ALL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(MEDIA, KC_SCLN), KC_QUOT, ALL_T(KC_ENT),
+ KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), GUI_T(KC_C), KC_V, KC_B, KC_N, KC_M, GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, TG(DEV),
+ TG(DEV), TG(MOUSE), LT(DEV, KC_SPC), TG(MOUSE), TG(DEV)),
+
+ /* Layer DEV: DEV mode (DEV Fn)
+ TODO: Add a cmd/tab function to the developer layer for quick switching between different applications when debugging
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | | | | | | | | | | | | | | | |
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | | | | | | | | | | | | | | | |
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | | F1 | F2 | F3 | F4 | F5 | Left | Down | Up | Right | | | | | |
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | | | | | | | | | | | | | | | |
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+
+ |------+------+----------------------+------+------+
+ | **** | **** | ******************** | **** | **** |
+ |------+------+----------------------+------+------+
+ */
+
+ [DEV] = 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV),
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+ /* Layer MOUSE: MOUSE mode (MOUSE Fn)
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | | | | | | | | | | | | | | | |
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | | | | | | | | | | | | | | | |
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | | | | | | | | | | | | | | | |
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | | | | | | | | | | | | | | | |
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+
+ |------+------+----------------------+------+------+
+ | **** | **** | ******************** | **** | **** |
+ |------+------+----------------------+------+------+
+ */
+
+ [MOUSE] = 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_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV),
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+ /* Layer MEDIA: mode (Hold Semi-colon)
+ |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | | | | | | | | | | | | | | | |
+ |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | | | | | | | | | | | | | | | |
+ |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | | | | | | | | Previous | Next | | Play/Pause | | | | |
+ |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | | | | | | | | Volume Down | Volume Up | Mute | | | | | |
+ |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+
+ |------+------+----------------------+------+------+
+ | **** | **** | ******************** | **** | **** |
+ |------+------+----------------------+------+------+
+
+ */
+
+ [MEDIA] = 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_MPRV, KC_MNXT, KC_MUTE, KC_TRNS, KC_MPLY, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV),
+ 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)
+{
+ // MACRODOWN only works in this function
+ switch (id)
+ {
+ case 0:
+ if (record->event.pressed)
+ {
+ register_code(KC_RSFT);
+ }
+ else
+ {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
diff --git a/keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk b/keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk
new file mode 100644
index 0000000000..7d97e7a524
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk
@@ -0,0 +1,3 @@
+TAP_DANCE_ENABLE = no
+UNICODE_ENABLE = no
+LEADER_ENABLE = yes
diff --git a/keyboards/hhkb/ansi/keymaps/brett/config.h b/keyboards/hhkb/ansi/keymaps/brett/config.h
new file mode 100644
index 0000000000..b9a61e10a7
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/brett/config.h
@@ -0,0 +1,17 @@
+#pragma once
+
+// Define mousekey settings
+#define MOUSEKEY_DELAY 0
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_MAX_SPEED 2
+#define MOUSEKEY_TIME_TO_MAX 5
+#define MOUSEKEY_WHEEL_DELAY 0
+
+#define LSPO_KEY KC_9
+#define RSPC_KEY KC_0
+#define LSPO_MOD KC_LSHIFT
+#define RSPC_MOD KC_RSHIFT
+
+// This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when
+// you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
+#define IGNORE_MOD_TAP_INTERRUPT
diff --git a/keyboards/hhkb/ansi/keymaps/brett/keymap.c b/keyboards/hhkb/ansi/keymaps/brett/keymap.c
new file mode 100644
index 0000000000..1201146b00
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/brett/keymap.c
@@ -0,0 +1,119 @@
+/* -*- eval: (turn-on-orgtbl); -*-
+ * Brettm12345 HHKB Layout
+ */
+#include QMK_KEYBOARD_H
+#include "brett.h"
+
+enum layers {
+ BASE = 0,
+ HHKB = 1,
+ PROG = 2,
+ MOUSE = 3
+};
+
+// Tap for tab hold for MOUSE
+#define TAB_MOUSE LT(MOUSE, KC_TAB)
+
+// Tap for space hold for PROG
+#define SPACE_PROG LT(PROG, KC_SPC)
+
+// Tap for ESC hold for CTRL
+#define CTL_ESC CTL_T(KC_ESC)
+
+// Tab for ; hold for PROG
+#define PROG_SCLN LT(PROG, KC_SCLN)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* BASE Level: Default Layer
+ |---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backspace | * |
+ |---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---|
+ | Control | A | S | D | F | G | H | J | K | L | ; | ' | Return | ****** | * |
+ |---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---|
+ | LShift | Z | X | C | V | B | N | M | , | . | / | RShift | HHKB | ****** | * |
+ |---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---|
+
+ |------+------+----------------------------+------+------|
+ | LAlt | LGUI | ******* Space/Prog ******* | RGUI | RAlt |
+ |------+------+----------------------------+------+------|
+ */
+
+ [BASE] = LAYOUT(
+ KC_GESC, 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,
+ TAB_MOUSE, 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,
+ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, PROG_SCLN, KC_QUOT, KC_ENT,
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, MO(HHKB),
+ KC_LALT, KC_LGUI, SPACE_PROG, KC_RGUI, KC_RALT),
+
+ /* HHKB Level: Function Layer
+ |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----|
+ | Flash | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
+ |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----|
+ | Caps | Calc | Mail | Media | Browser | My PC | Browser | u | i | o | Print | [ | ] | Backsp | * |
+ | | | | Player | Refresh | | Favorites | | | | Screen | | | | |
+ |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----|
+ | Control | Prev | Next | Find | f | g | Browser | Browser | Browser | Browser | ; | ' | Exec | ****** | * |
+ | | | | | | | Back | Home | Search | Forward | | | | | |
+ |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----|
+ | LShift | Vol+ | Vol- | Mute | Select | b | n | m | , | Again | Browser Search | RShift | HHKB | ****** | * |
+ |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----|
+
+ |------+------+----------------------+------+------|
+ | Menu | LGUI | ******* Play ******* | RGUI | Menu |
+ |------+------+----------------------+------+------|
+ */
+ [HHKB] = LAYOUT(
+ FLASH, 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_CALC, KC_MAIL, KC_MSEL, KC_WREF, KC_MYCM, KC_WFAV, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_BSPC,
+ KC_TRNS, KC_MPRV, KC_MNXT, KC_FIND, KC_TRNS, KC_TRNS, KC_WBAK, KC_WHOM, KC_WSCH, KC_WFWD, KC_TRNS, KC_TRNS, KC_EXEC,
+ KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_SLCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AGIN, KC_WSCH, KC_TRNS, KC_TRNS,
+ KC_MENU, KC_TRNS, KC_MPLY, KC_TRNS, KC_MENU),
+
+
+ /* Programming Level: Symbols Layer
+ |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---|
+ | Esc | TTY 1 | TTY 2 | TTY 3 | TTY 4 | TTY 5 | TTY 6 | TTY 7 | TTY 8 | TTY 9 | TTY 10 | TTY 11 | TTY 12 | \ | ` |
+ |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---|
+ | Tab/Mouse | => | @ | >>= | =<< | ‖ | <> | <|> | <*> | <@> | |> | <$ | $> | Backsp | * |
+ |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---|
+ | Toggle Mouse | -> | * | <$> | <#> | && | Left | Down | Up | Right | :: | ` | Return | ****** | * |
+ |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---|
+ | LShift | z | x | c | v | b | n | m | <- | -> | <> | Shift | HHKB | ****** | * |
+ |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---|
+
+ |------+------+----------------------------+------+------|
+ | LAlt | LGUI | ******* Space/Prog ******* | RGUI | RAlt |
+ |------+------+----------------------------+------+------|
+ */
+ [PROG] = LAYOUT(
+ KC_GESC, LCA(KC_F1), LCA(KC_F2), LCA(KC_F3), LCA(KC_F4), LCA(KC_F5), LCA(KC_F6), LCA(KC_F7), LCA(KC_F8), LCA(KC_F9), LCA(KC_F10), LCA(KC_F11), LCA(KC_F12), KC_TRNS, KC_TRNS,
+ KC_TRNS, FAT_ARROW, KC_AT, BIND, BIND_FLIPPED, OR, CONCAT, ALT, APPLY, FLAP, PIPE, VOID_LEFT, VOID_RIGHT, KC_TRNS,
+ TG(MOUSE), SKINNY_ARROW, KC_ASTR, MAP, MAP_FLIPPED, AND, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, DOUBLE_COLON, KC_GRV, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, REVERSE_ARROW, SKINNY_ARROW, CONCAT, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+
+ /* Mouse Level: Mouse Layer
+ |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---|
+ | Esc | Speed 1 | Speed 2 | Speed 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---|
+ | Mouse(Tab) | Q | Up | Button3 | Button4 | Button5 | Y | U | Button3 | Button4 | Button5 | [ | ] | Backsp | * |
+ |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---|
+ | Control(Esc) | Left | Down | Right | Button1 | Button2 | SLeft | SDown | SUp | SRight | Button1 | Button2 | Control(Return) | ****** | * |
+ |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---|
+ | LShift(() | Z | X | C | V | B | N | M | Button5 | Button4 | Button3 | RShift()) | HHKB | ****** | * |
+ |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---|
+
+ |---------+---------+----------------------------+---------+---------|
+ | LAlt([) | LGUI({) | ******* Space/Prog ******* | RGUI(}) | RAlt(]) |
+ |---------+---------+----------------------------+---------+---------|
+ */
+ [MOUSE] = LAYOUT(
+ KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_MS_U, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_TRNS,
+ TG(MOUSE), KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_BTN2, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN1, KC_BTN2, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/ansi/keymaps/brett/readme.md b/keyboards/hhkb/ansi/keymaps/brett/readme.md
new file mode 100644
index 0000000000..fd07b155fb
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/brett/readme.md
@@ -0,0 +1,13 @@
+# Generated Keymap Layout
+
+This layout was generated by the QMK API. You can find the JSON data used to
+generate this keymap in the file layers.json.
+
+To make use of this file you will need follow the following steps:
+
+* Download or Clone QMK Firmware: <https://github.com/qmk/qmk_firmware/>
+* Extract QMK Firmware to a location on your hard drive
+* Copy this folder into %s
+* You are now ready to compile or use your keymap with the source
+
+More information can be found in the QMK docs: <https://docs.qmk.fm> \ No newline at end of file
diff --git a/keyboards/hhkb/ansi/keymaps/brett/rules.mk b/keyboards/hhkb/ansi/keymaps/brett/rules.mk
new file mode 100644
index 0000000000..88f57515f1
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/brett/rules.mk
@@ -0,0 +1,4 @@
+MOUSEKEY_ENABLE = yes
+TAP_DANCE_ENABLE = no
+LEADER_ENABLE = no
+UNICODE_ENABLE = no
diff --git a/keyboards/hhkb/ansi/keymaps/cinaeco/README.md b/keyboards/hhkb/ansi/keymaps/cinaeco/README.md
new file mode 100644
index 0000000000..c1c48e6093
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/cinaeco/README.md
@@ -0,0 +1,23 @@
+# QMK Keyboard Firmware for HHKB
+
+## Modifications
+
+### HHKB Fn Layer
+
+Added some Media keys.
+
+### Utility Layer (SpaceFN)
+
+Hold `Space` for:
+
+- Vi-style direction keys.
+- WASD-style mouse keys.
+- Dynamic macro playback on `1` and `2`.
+- Qwerty/Colemak/Dvorak layout selection on `-`, `=` and `\ `
+
+### Dynamic Macros
+
+Hold `q` and press:
+
+- `1` or `2` to record macro 1 or 2.
+- `s` to stop recording.
diff --git a/keyboards/hhkb/ansi/keymaps/cinaeco/config.h b/keyboards/hhkb/ansi/keymaps/cinaeco/config.h
new file mode 100644
index 0000000000..c7b4c784c0
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/cinaeco/config.h
@@ -0,0 +1,20 @@
+#ifndef CONFIG_CINAECO_H
+#define CONFIG_CINAECO_H
+
+#include "../../config.h"
+
+#undef MANUFACTURER
+#undef PRODUCT
+#undef DESCRIPTION
+#define MANUFACTURER QMK
+#define PRODUCT HHKB QMK cinaeco
+#define DESCRIPTION HHKB on QMK Firmware with cinaeco keymap
+
+// Increase "Tap" detection window. Avoid missing 'q' or 'z' when typing slowly.
+#undef TAPPING_TERM
+#define TAPPING_TERM 230
+
+// Uncomment to enable NKRO by default. May cause issues with KVM switches.
+//#define FORCE_NKRO
+
+#endif
diff --git a/keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c b/keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c
new file mode 100644
index 0000000000..c27e37d8a0
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c
@@ -0,0 +1,178 @@
+/* -*- eval: (turn-on-orgtbl); -*-
+ * cinaeco's HHKB Layout
+ */
+#include QMK_KEYBOARD_H
+
+// Layers.
+#define QWER 0
+#define COLE 1
+#define DVOR 2
+#define HHKB 3
+#define UTIL 4
+#define MREC 5
+
+// Easier-to-read Layer Arrays.
+#define ____ KC_TRNS
+
+enum hhkb_keycodes
+{
+ DYNAMIC_MACRO_RANGE = SAFE_RANGE,
+};
+
+#include "dynamic_macro.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* QWER Layer: Qwerty Default
+ *
+ * ,--------------------------------------------------------------.
+ * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|
+ * |--------------------------------------------------------------|
+ * |Tab |Q/MREC| W| E| R| T| Y| U| I| O| P| [| ]|Backs|
+ * |--------------------------------------------------------------|
+ * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Ent/Ctrl|
+ * |--------------------------------------------------------------|
+ * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0|
+ * `--------------------------------------------------------------'
+ * |Alt|Gui | Space/UTIL |Gui |Alt|
+ * `-------------------------------------------'
+ *
+ */
+
+ [QWER] = 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, LT(MREC, 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, CTL_T(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(HHKB),
+ KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT),
+
+ /* COLE Layer: Colemak
+ *
+ * ,--------------------------------------------------------------.
+ * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|
+ * |--------------------------------------------------------------|
+ * |Tab |Q/MREC| W| F| P| G| J| L| U| Y| ;| [| ]|Backs|
+ * |--------------------------------------------------------------|
+ * |Ctrl | A| R| S| T| D| H| N| E| I| O| '|Ent/Ctrl|
+ * |--------------------------------------------------------------|
+ * |Shift | Z| X| C| V| K| B| M| ,| .| /|Shift |Fn0|
+ * `--------------------------------------------------------------'
+ * |Alt|Gui | Space/UTIL |Gui |Alt|
+ * `-------------------------------------------'
+ *
+ */
+
+ [COLE] = 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, LT(MREC, KC_Q), KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC,
+ KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, CTL_T(KC_ENT),
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_K, KC_B, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB),
+ KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT),
+
+ /* DVOR Layer: Dvorak
+ *
+ * ,--------------------------------------------------------------.
+ * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `|
+ * |--------------------------------------------------------------|
+ * |Tab |'/MREC| ,| .| P| Y| F| G| C| R| L| /| =|Backs|
+ * |--------------------------------------------------------------|
+ * |Ctrl | A| O| E| U| I| D| H| T| N| S| -|Ent/Ctrl|
+ * |--------------------------------------------------------------|
+ * |Shift | ;| Q| J| K| X| B| M| W| V| Z|Shift |Fn0|
+ * `--------------------------------------------------------------'
+ * |Alt|Gui | Space/UTIL |Gui |Alt|
+ * `-------------------------------------------'
+ *
+ */
+
+ [DVOR] = LAYOUT(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
+ KC_TAB, LT(MREC, KC_QUOT), KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC,
+ KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, CTL_T(KC_ENT),
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(HHKB),
+ KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT),
+
+ /* HHKB Layer: HHKB mode (HHKB Fn)
+ *
+ * ,-----------------------------------------------------------.
+ * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|
+ * |-----------------------------------------------------------|
+ * |Caps |PLA|PRV|NXT| | | | |Psc|Slk|Pus|Up | |Backs|
+ * |-----------------------------------------------------------|
+ * | |VoD|VoU|Mut|Ejc| | *| /|Hom|PgU|Lef|Rig|Enter |
+ * |-----------------------------------------------------------|
+ * | | | | | | | +| -|End|PgD|Dow| | |
+ * `-----------------------------------------------------------'
+ * | | | |STOP | |
+ * `-------------------------------------------'
+ */
+
+ [HHKB] = LAYOUT(
+ KC_PWR, 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_MPLY, KC_MPRV, KC_MNXT, ____, ____, ____, ____, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ____, KC_BSPC,
+ ____, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, ____, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
+ ____, ____, ____, ____, ____, ____, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ____, ____,
+ ____, ____, ____, KC_MSTP, ____),
+
+ /* UTIL Layer: Extra utilities
+ *
+ * ,-------------------------------------------------------------.
+ * |DFU|PLY1|PLY2| | | | | | | | |QWE|COL|DVO|DBG|
+ * |-------------------------------------------------------------|
+ * | |MLB |M-Up|MRB|MwU| |Hom|PgD|PgU|End| | | | |
+ * |-------------------------------------------------------------|
+ * | |M-Lt|M-Dn|M-R|MwD| |LEF|DOW|UP |RIG| | | |
+ * |-------------------------------------------------------------|
+ * | | | | | |SPC| | | | | | | |
+ * `-------------------------------------------------------------'
+ * | | | | | |
+ * `-------------------------------------------'
+ *
+ */
+
+ [UTIL] = LAYOUT(
+ RESET, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, ____, ____, ____, ____, ____, ____, ____, ____, DF(QWER), DF(COLE), DF(DVOR), DEBUG,
+ ____, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, ____, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ____, ____, ____, ____,
+ ____, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ____, ____, ____,
+ ____, ____, ____, ____, ____, KC_SPC, ____, ____, ____, ____, ____, ____, ____,
+ ____, ____, ____, ____, ____),
+
+ /* MREC Layer: Record macros with `q`
+ *
+ * ,-------------------------------------------------------------.
+ * | |REC1|REC2| | | | | | | | | | | | |
+ * |-------------------------------------------------------------|
+ * | | | | | | | | | | | | | | |
+ * |-------------------------------------------------------------|
+ * | | |RSTP| | | | | | | | | | |
+ * |-------------------------------------------------------------|
+ * | | | | | | | | | | | | | |
+ * `-------------------------------------------------------------'
+ * | | | | | |
+ * `-------------------------------------------'
+ *
+ */
+
+ [MREC] = LAYOUT(
+ ____, DYN_REC_START1, DYN_REC_START2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
+ ____, ____, DYN_REC_STOP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
+ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
+ ____, ____, ____, ____, ____)
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ return MACRO_NONE;
+};
+
+// For Dynamic Macros.
+bool process_record_user(uint16_t keycode, keyrecord_t *record)
+{
+ if (!process_record_dynamic_macro(keycode, record))
+ {
+ return false;
+ }
+ return true;
+}
diff --git a/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk b/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk
new file mode 100644
index 0000000000..a85669aa2f
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk
@@ -0,0 +1,20 @@
+# cinaeco's HHKB firmware
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # 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 = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
diff --git a/keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c b/keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c
new file mode 100644
index 0000000000..e230a87fb2
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c
@@ -0,0 +1,89 @@
+/*
+ * dbroqua HHKB Layout
+ */
+#include QMK_KEYBOARD_H
+
+enum planck_layers {
+ _DEFAULT,
+ _ALTERNATE,
+ _FN
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* BASE layer: Default Layer
+ * ,-----------------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ * |-----------------------------------------------------------------------------------------+
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
+ * |-----------------------------------------------------------------------------------------+
+ * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
+ * |-----------------------------------------------------------------------------------------+
+ * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn |
+ * +-----------------------------------------------------------------------------------------+
+ * | Alt | Gui | Space | Gui |RCtrl|
+ * `----------------------------------------------------------------´
+ */
+ [_DEFAULT] = 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(_FN),
+ KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RCTL),
+ /* Alternamte layer: swap alt/gui
+ * ,-----------------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ * |-----------------------------------------------------------------------------------------+
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
+ * |-----------------------------------------------------------------------------------------+
+ * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
+ * |-----------------------------------------------------------------------------------------+
+ * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn |
+ * +-----------------------------------------------------------------------------------------+
+ * | Gui | Alt | Space | AltGr |RCtrl|
+ * `----------------------------------------------------------------´
+ */
+ [_ALTERNATE] = 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(_FN),
+ KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, KC_RCTL),
+
+ /* FN Layer
+ * ,-----------------------------------------------------------------------------------------.
+ * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del|
+ * |-----------------------------------------------------------------------------------------+
+ * | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | Vol-| Vol+| Mute|Eject| | * | / | Home| PgUp| Left |Right| |
+ * |-----------------------------------------------------------------------------------------+
+ * | | Prev| Play| Next| | | + | - | End |PgDwn| Down| | |
+ * +-----------------------------------------------------------------------------------------+
+ * | | | Adjust | Stop | |
+ * `----------------------------------------------------------------´
+ */
+ [_FN] = LAYOUT(
+ KC_PWR, 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_TRNS, KC_TRNS,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
+ KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
+ DF(_DEFAULT), DF(_ALTERNATE), KC_TRNS, KC_MSTP, KC_TRNS)};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch (id)
+ {
+ case 0:
+ if (record->event.pressed)
+ {
+ register_code(KC_RSFT);
+ }
+ else
+ {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
diff --git a/keyboards/hhkb/ansi/keymaps/dbroqua/readme.md b/keyboards/hhkb/ansi/keymaps/dbroqua/readme.md
new file mode 100644
index 0000000000..3b8950fee0
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/dbroqua/readme.md
@@ -0,0 +1,26 @@
+# Dbroqua Layout
+
+* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/78eaf35e80bb714eea80cb4049dedb01
+
+## Switch layout
+
+Default bottom layer:
+
+* LALT / LGUI / SPACE / RGUI / RCTRL
+
+Alternate bottom layer:
+
+* LGUI / LALT / SPACE / RALT / RCTRL
+
+To switch from default to alternate (or alternate to default) simple press FN + (LALT/LGUI).
+
+
+## Media keys :
+
+* fn + a = vol_dn
+* fn + s = vol_up
+* fn + d = mute
+* fn + z = previous song
+* fn + x = play/pause
+* fn + c = next song
+* fn + (RGUI/RALT) = stop
diff --git a/keyboards/hhkb/ansi/keymaps/default/keymap.c b/keyboards/hhkb/ansi/keymaps/default/keymap.c
new file mode 100644
index 0000000000..c63ef6a579
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/default/keymap.c
@@ -0,0 +1,56 @@
+/* -*- eval: (turn-on-orgtbl); -*-
+ * default HHKB Layout
+ */
+#include QMK_KEYBOARD_H
+
+#define BASE 0
+#define HHKB 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* BASE Level: Default Layer
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+
+ |------+------+-----------------------+------+------|
+ | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
+ |------+------+-----------------------+------+------|
+ */
+
+ [BASE] = LAYOUT( // default layer
+ 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(HHKB),
+ KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT),
+
+ /* Layer HHKB: HHKB mode (HHKB Fn)
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | | | | | | + | - | End | PgD | Dow | | | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+
+ |------+------+----------------------+------+------+
+ | **** | **** | ******************** | **** | **** |
+ |------+------+----------------------+------+------+
+
+ */
+
+ [HHKB] = LAYOUT(
+ KC_PWR, 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_TRNS, KC_BSPC,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)};
diff --git a/keyboards/hhkb/ansi/keymaps/eric/keymap.c b/keyboards/hhkb/ansi/keymaps/eric/keymap.c
new file mode 100644
index 0000000000..bf788b2ffd
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/eric/keymap.c
@@ -0,0 +1,73 @@
+/* -*- eval: (turn-on-orgtbl); -*-
+ * default HHKB Layout
+ */
+#include QMK_KEYBOARD_H
+
+#define BASE 0
+#define HHKB 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* BASE Level: Default Layer
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ |------+------+-----------------------+------+------|
+ | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
+ |------+------+-----------------------+------+------|
+ */
+
+ [BASE] = LAYOUT( // default layer
+ 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(HHKB),
+ KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT),
+
+ /* Layer HHKB: HHKB mode (HHKB Fn)
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | PgU | Up | PgD | Hm | & | ~ | | | | Psc | Up | Del | Backs | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | Lef | Dow | Rig | En | * | | | PgU | Hom | Lef | Rig | Enter | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | _ | + | ( | ) | | | | | PgD | End | Dow | | | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ |------+------+----------------------+------+------+
+ | **** | **** | ******************** | **** | **** |
+ |------+------+----------------------+------+------+
+
+ */
+
+ [HHKB] = LAYOUT(
+ KC_CAPS, 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_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_HOME, KC_AMPR, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_UP, KC_DEL, KC_BSPC,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_ASTR, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_LEFT, KC_RGHT, KC_TRNS,
+ KC_TRNS, KC_UNDS, KC_PLUS, KC_LPRN, KC_RPRN, KC_PIPE, KC_TRNS, KC_TRNS, KC_PGDN, KC_END, KC_DOWN, 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)
+{
+ // MACRODOWN only works in this function
+ switch (id)
+ {
+ case 0:
+ if (record->event.pressed)
+ {
+ register_code(KC_RSFT);
+ }
+ else
+ {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
diff --git a/keyboards/hhkb/ansi/keymaps/krusli/config.h b/keyboards/hhkb/ansi/keymaps/krusli/config.h
new file mode 100644
index 0000000000..af2fb9d8a5
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/krusli/config.h
@@ -0,0 +1 @@
+#define USB_MAX_POWER_CONSUMPTION 100
diff --git a/keyboards/hhkb/ansi/keymaps/krusli/keymap.c b/keyboards/hhkb/ansi/keymaps/krusli/keymap.c
new file mode 100644
index 0000000000..af6102f108
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/krusli/keymap.c
@@ -0,0 +1,75 @@
+/* -*- eval: (turn-on-orgtbl); -*-
+ * default HHKB Layout
+ */
+#include QMK_KEYBOARD_H
+
+#define BASE 0
+#define HHKB 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* BASE Level: Default Layer
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+
+ |------+------+-----------------------+------+------|
+ | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
+ |------+------+-----------------------+------+------|
+ */
+
+ [BASE] = LAYOUT( // default layer
+ 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(HHKB),
+ KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT),
+
+ /* Layer HHKB: HHKB mode (HHKB Fn)
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | | | | | | + | - | End | PgD | Dow | | | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+
+ |------+------+----------------------+------+------+
+ | **** | **** | ******************** | **** | **** |
+ |------+------+----------------------+------+------+
+
+ */
+
+ [HHKB] = LAYOUT(
+ KC_PWR, 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_TRNS, KC_BSPC,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, 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)
+{
+ // MACRODOWN only works in this function
+ switch (id)
+ {
+ case 0:
+ if (record->event.pressed)
+ {
+ register_code(KC_RSFT);
+ }
+ else
+ {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
diff --git a/keyboards/hhkb/ansi/keymaps/lxol/keymap.c b/keyboards/hhkb/ansi/keymaps/lxol/keymap.c
new file mode 100644
index 0000000000..462a980471
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/lxol/keymap.c
@@ -0,0 +1,200 @@
+/* -*- eval: (turn-on-orgtbl); -*-
+ * lxol HHKB Layout
+ */
+#include QMK_KEYBOARD_H
+
+#define BASE 0
+#define WIN 1
+#define HHKB 2
+#define RGUILEV 3
+#define LGUILEV 4
+#define RALTLEV 5
+#define LALTLEV 6
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Layer 0: Default Layer
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Contro | A | S | D | F | G | H | J | K | L | ; | ' | RCtl/Ent | | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+
+ |------+------+-------+------+------|
+ | LAlt | LGUI | Space | RGUI | RAlt |
+ |------+------+-------+------+------|
+ */
+
+ [BASE] = LAYOUT( // layer 0 : default
+
+ 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, LT(LALTLEV, KC_A), LT(LGUILEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RGUILEV, KC_L), LT(RALTLEV, KC_SCLN), KC_QUOT, MT(MOD_RCTL, 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(HHKB),
+ KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT),
+
+ /* Layer 1: HHKB mode (HHKB Fn)
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | | | | | | + | - | End | PgD | Dow | | | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+
+ |---+---+---+---+---|
+ | | | | | |
+ |---+---+---+---+---|
+ */
+
+ [HHKB] = LAYOUT(
+ KC_PWR, 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_TRNS, KC_BSPC,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+ /* Layer LGUI: All keys with RGUI modifier
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Contro | A | S | D | F | G | H | J | K | | ; | ' | RCtl/Ent | | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+
+ |------+------+-------+------+------|
+ | LAlt | LGUI | Space | RGUI | RAlt |
+ |------+------+-------+------+------|
+ */
+
+ [RGUILEV] = LAYOUT( // Right GUI layer by KC_L
+
+ RGUI(KC_ESC), RGUI(KC_1), RGUI(KC_2), RGUI(KC_3), RGUI(KC_4), RGUI(KC_5), RGUI(KC_6), RGUI(KC_7), RGUI(KC_8), RGUI(KC_9), RGUI(KC_0), RGUI(KC_MINS), RGUI(KC_EQL), RGUI(KC_BSLS), RGUI(KC_GRV),
+ RGUI(KC_TAB), RGUI(KC_Q), RGUI(KC_W), RGUI(KC_E), RGUI(KC_R), RGUI(KC_T), RGUI(KC_Y), RGUI(KC_U), RGUI(KC_I), RGUI(KC_O), RGUI(KC_P), RGUI(KC_LBRC), RGUI(KC_RBRC), RGUI(KC_BSPC),
+ RGUI(KC_LCTL), RGUI(KC_A), RGUI(KC_S), RGUI(KC_D), RGUI(KC_F), RGUI(KC_G), RGUI(KC_H), RGUI(KC_J), RGUI(KC_K), KC_TRNS, KC_TRNS, RGUI(KC_QUOT), MT(MOD_RCTL, KC_ENT),
+ RGUI(KC_LSFT), RGUI(KC_Z), RGUI(KC_X), RGUI(KC_C), RGUI(KC_V), RGUI(KC_B), RGUI(KC_N), RGUI(KC_M), RGUI(KC_COMM), RGUI(KC_DOT), RGUI(KC_SLSH), RGUI(KC_RSFT), KC_TRNS,
+ KC_LALT, KC_LGUI, RGUI(KC_SPC), KC_RGUI, KC_RALT),
+
+ /* Layer LGUI: All keys with LGUI modifier
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Contro | A | S | D | F | G | H | J | K | | ; | ' | RCtl/Ent | | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+
+ |------+------+-------+------+------|
+ | LAlt | LGUI | Space | LGUI | RAlt |
+ |------+------+-------+------+------|
+ */
+
+ [LGUILEV] = LAYOUT( // Right GUI layer by KC_L
+
+ LGUI(KC_ESC), LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LGUI(KC_MINS), LGUI(KC_EQL), LGUI(KC_BSLS), LGUI(KC_GRV),
+ LGUI(KC_TAB), LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), LGUI(KC_BSPC),
+ LGUI(KC_LCTL), KC_TRNS, KC_TRNS, LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), LGUI(KC_SCLN), LGUI(KC_QUOT), MT(MOD_RCTL, KC_ENT),
+ KC_LSFT, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), KC_RSFT, KC_TRNS,
+ KC_LALT, KC_LGUI, LGUI(KC_SPC), KC_LGUI, KC_RALT),
+
+ /* Layer LALT: All keys with RALT modifier
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Contro | A | S | D | F | G | H | J | K | | ; | ' | RCtl/Ent | | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+
+ |------+------+-------+------+------|
+ | LAlt | LGUI | Space | RGUI | RAlt |
+ |------+------+-------+------+------|
+ */
+
+ [RALTLEV] = LAYOUT( // Right ALT layer by KC_L
+
+ RALT(KC_ESC), RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), RALT(KC_EQL), RALT(KC_BSLS), RALT(KC_GRV),
+ RALT(KC_TAB), RALT(KC_Q), RALT(KC_W), RALT(KC_E), RALT(KC_R), RALT(KC_T), RALT(KC_Y), RALT(KC_U), RALT(KC_I), RALT(KC_O), RALT(KC_P), RALT(KC_LBRC), RALT(KC_RBRC), RALT(KC_BSPC),
+ RALT(KC_LCTL), RALT(KC_A), RALT(KC_S), RALT(KC_D), RALT(KC_F), RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), KC_TRNS, KC_TRNS, RALT(KC_QUOT), MT(MOD_RCTL, KC_ENT),
+ RALT(KC_LSFT), RALT(KC_Z), RALT(KC_X), RALT(KC_C), RALT(KC_V), RALT(KC_B), RALT(KC_N), RALT(KC_M), RALT(KC_COMM), RALT(KC_DOT), RALT(KC_SLSH), RALT(KC_RSFT), KC_TRNS,
+ KC_LALT, KC_LGUI, RALT(KC_SPC), KC_RGUI, KC_RALT),
+
+ /* Layer LALT: All keys with LALT modifier
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Contro | A | S | D | F | G | H | J | K | | ; | ' | RCtl/Ent | | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+ | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | |
+ |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+
+ |------+------+-------+------+------|
+ | LAlt | LGUI | Space | LGUI | RAlt |
+ |------+------+-------+------+------|
+ */
+
+ [LALTLEV] = LAYOUT( // Right ALT layer by KC_L
+
+ LALT(KC_ESC), LALT(KC_1), LALT(KC_2), LALT(KC_3), LALT(KC_4), LALT(KC_5), LALT(KC_6), LALT(KC_7), LALT(KC_8), LALT(KC_9), LALT(KC_0), LALT(KC_MINS), LALT(KC_EQL), LALT(KC_BSLS), LALT(KC_GRV),
+ LALT(KC_TAB), LALT(KC_Q), LALT(KC_W), LALT(KC_E), LALT(KC_R), LALT(KC_T), LALT(KC_Y), LALT(KC_U), LALT(KC_I), LALT(KC_O), LALT(KC_P), LALT(KC_LBRC), LALT(KC_RBRC), LALT(KC_BSPC),
+ LALT(KC_LCTL), KC_TRNS, KC_TRNS, LALT(KC_D), LALT(KC_F), LALT(KC_G), LALT(KC_H), LALT(KC_J), LALT(KC_K), LALT(KC_L), LALT(KC_SCLN), LALT(KC_QUOT), MT(MOD_RCTL, KC_ENT),
+ KC_LSFT, LALT(KC_Z), LALT(KC_X), LALT(KC_C), LALT(KC_V), LALT(KC_B), LALT(KC_N), LALT(KC_M), LALT(KC_COMM), LALT(KC_DOT), LALT(KC_SLSH), KC_RSFT, KC_TRNS,
+ KC_LALT, KC_LGUI, LALT(KC_SPC), KC_LGUI, KC_RALT),
+
+ /* Layer WIN: Win layer
+ |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
+ |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---|
+ | Contro | A | S | D | F | G | H | J | K | L | ; | ' | RCtl/Ent | | |
+ |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---|
+ | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | |
+ |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---|
+
+ |------+------+-------+------+------|
+ | LGui | LAlt | Space | RGui | Ralt |
+ |------+------+-------+------+------|
+ */
+
+ [WIN] = LAYOUT( // BASE level with swapped GUI/ALT
+
+ 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, LT(LGUILEV, KC_A), LT(LALTLEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RALTLEV, KC_L), LT(RGUILEV, KC_SCLN), KC_QUOT, MT(MOD_RCTL, 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(HHKB),
+ KC_RGUI, KC_RALT, KC_SPC, KC_RALT, KC_RGUI)};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch (id)
+ {
+ case 0:
+ if (record->event.pressed)
+ {
+ register_code(KC_RSFT);
+ }
+ else
+ {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
diff --git a/keyboards/hhkb/ansi/keymaps/mjt/config.h b/keyboards/hhkb/ansi/keymaps/mjt/config.h
new file mode 100644
index 0000000000..3b8f2e676c
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/mjt/config.h
@@ -0,0 +1,72 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0xCAFE
+#define DEVICE_VER 0x0104
+#define MANUFACTURER q.m.k
+#define PRODUCT HHKB mod
+#define DESCRIPTION q.m.k keyboard firmware for HHKB
+
+/* key matrix size */
+#ifdef HHKB_JP
+# define MATRIX_ROWS 16
+#else
+# define MATRIX_ROWS 8
+#endif
+#define MATRIX_COLS 8
+
+#define TAPPING_TERM 200
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+#define USB_MAX_POWER_CONSUMPTION 50
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 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
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+*/
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/hhkb/ansi/keymaps/mjt/keymap.c b/keyboards/hhkb/ansi/keymaps/mjt/keymap.c
new file mode 100644
index 0000000000..b62676edd9
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/mjt/keymap.c
@@ -0,0 +1,112 @@
+/* -*- eval: (turn-on-orgtbl); -*-
+ * default HHKB Layout
+ */
+#include QMK_KEYBOARD_H
+
+#define BASE 0
+#define HHKB 1
+#define FUNK 2
+#define DYN 3
+#define CTL_ESC CTL_T(KC_ESC)
+#define MACSLEEP LCTL(LSFT(KC_POWER))
+
+enum hhkb_keycodes
+{
+ QWERTY = SAFE_RANGE,
+ DYNKEY,
+ DYNAMIC_MACRO_RANGE,
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* BASE Level: Default Layer
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+
+ |------+------+-----------------------+------+------|
+ | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
+ |------+------+-----------------------+------+------|
+ */
+
+ [BASE] = LAYOUT( // default layer
+ KC_GRV, 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_DEL,
+ 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,
+ CTL_ESC, 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, SFT_T(KC_ENT), TT(FUNK),
+ KC_LALT, KC_LGUI, /* */ KC_SPC, MO(DYN), KC_RALT),
+
+ /* Layer HHKB: HHKB mode (HHKB Fn)
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | | | | | | + | - | End | PgD | Dow | | | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+
+ |------+------+----------------------+------+------+
+ | **** | **** | ******************** | **** | **** |
+ |------+------+----------------------+------+------+
+
+
+
+ [HHKB] = LAYOUT(
+ KC_PWR, 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_TRNS, KC_BSPC, \
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+ */
+ [FUNK] = LAYOUT(
+ KC_PWR, 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_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+ [DYN] = LAYOUT(
+ KC_TRNS, DYN_REC_START1, DYN_REC_START2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACSLEEP, KC_HOME, 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_PGDN, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, DYN_REC_STOP, KC_TRNS, KC_TRNS)};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch (id)
+ {
+ case 0:
+ if (record->event.pressed)
+ {
+ register_code(KC_RSFT);
+ }
+ else
+ {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record)
+{
+ uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode);
+ if (!process_dynamic_macro(macro_kc, record))
+ {
+ return false;
+ }
+
+ return true;
+}
diff --git a/keyboards/hhkb/ansi/keymaps/mjt/readme.md b/keyboards/hhkb/ansi/keymaps/mjt/readme.md
new file mode 100644
index 0000000000..ff575ce247
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/mjt/readme.md
@@ -0,0 +1,16 @@
+# Mike's HHKB
+
+- Surprisingly stock for the most part
+- Dynamic macros
+- ctrl key has tapkey for escape
+- right shift has tapkey for enter
+- Works with iPhone Camera Adapter
+
+## Layers
+
+Base for letters and mods.
+
+Funk layer is my tweaked function layer
+
+Dyn layer has dynamic macros. Record with 1 and 2, playback with \ and
+upper-right-most key. Also turns the arrow clusters into nav keys.
diff --git a/keyboards/hhkb/ansi/keymaps/mjt/rules.mk b/keyboards/hhkb/ansi/keymaps/mjt/rules.mk
new file mode 100644
index 0000000000..9e6797ed30
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/mjt/rules.mk
@@ -0,0 +1 @@
+DYNAMIC_MACRO_ENABLE = yes
diff --git a/keyboards/hhkb/ansi/keymaps/schaeferdev/README.md b/keyboards/hhkb/ansi/keymaps/schaeferdev/README.md
new file mode 100644
index 0000000000..15b87c498d
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/README.md
@@ -0,0 +1,36 @@
+ # QMK HHKB Keymap: schaeferdev
+
+This is my QMK keymap for the Happy Hacking Keyboard Pro 2 alternate controller made by Hasu.
+
+
+## Movement Layer
+
+The main difference from the Default layer is the introduction of a Movement layer than can be used by holding the right command button. This layer enables to move the mouse and scroll using Page up and Page down. Additionally it allows to use Arrow-keys in VIM-like fashion on hjkl.
+
+I prefer this movement to the default HHKB FN layer as it allows all my fingers to remain on the home row.
+
+## Minor Changes
+
+- swapped Y and Z (as I am German and used to the different order).
+- changed position of Delete Key
+- both ` and ~
+
+
+## Setup (for macOS)
+```bash
+brew tap osx-cross/avr
+brew install avr-gcc
+brew install dfu-programmer
+```
+
+
+## Flashing
+
+```bash
+make clean
+make hhkb:schaeferdev:dfu
+```
+
+
+## Troubleshooting
+For some reason I ran into the issue that my CMD key no longer recognized. I am not entirely sure what caused this but the problem occured regardless of the layout I flashed (was also broken for the default hhkb layout). I was able to fix this issue by resetting EEPROM of the keyboard. The easiest way to do this is probably to use the QMK Toolbox.
diff --git a/keyboards/hhkb/ansi/keymaps/schaeferdev/config.h b/keyboards/hhkb/ansi/keymaps/schaeferdev/config.h
new file mode 100644
index 0000000000..b3c799bb82
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/config.h
@@ -0,0 +1,9 @@
+// Based off of this section:
+// https://github.com/qmk/qmk_firmware/blob/master/doc/BUILD_GUIDE.md#the-configh-file
+#pragma once
+
+// Define mousekey settings
+#define MOUSEKEY_DELAY 0
+#define MOUSEKEY_INTERVAL 4
+#define MOUSEKEY_MAX_SPEED 1
+#define MOUSEKEY_TIME_TO_MAX 70 \ No newline at end of file
diff --git a/keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c b/keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c
new file mode 100644
index 0000000000..ea6da450cf
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c
@@ -0,0 +1,76 @@
+/* -*- eval: (turn-on-orgtbl); -*-
+ * default HHKB Layout
+ */
+#include QMK_KEYBOARD_H
+
+#define BASE 0
+#define HHKB 1
+#define MOVEMENT 2
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* BASE Level: Default Layer
+ |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----|
+ | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backs |Backs|
+ |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |
+ |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----|
+ |Ctrl/ESC| A | S | D | F | G | H | J | K | L | ; | ' | Ent | | |
+ |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----|
+ | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | |
+ |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----|
+ |------+------+-----------------------+------+------|
+ | LAlt | LGUI | ******* Space ******* | MOUSE| RAlt |
+ |------+------+-----------------------+------+------|
+ */
+
+ [BASE] = LAYOUT( // default layer
+ 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_BSPC, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ CTL_T(KC_ESC), 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_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB),
+ KC_LALT, KC_LCMD, /* */ KC_SPC, /* */ MO(MOVEMENT), KC_RALT),
+
+ /* Layer HHKB: HHKB mode (HHKB Fn)
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | DEL |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | | | | | | + | - | End | PgD | Dow | | | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ |------+------+----------------------+------+------+
+ | **** | **** | ******************** | **** | **** |
+ |------+------+----------------------+------+------+
+ */
+
+ [HHKB] = LAYOUT(
+ KC_PWR, 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_DEL, 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_TRNS, KC_BSPC,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+ /* Layer MOUSE: MOUSE mode (MOUSE Fn)
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | `~ |ACC1 |ACC2 |ACC3 | | | | | | | | | | DEL | DEL |
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | |MBTN2| | up | | PgU| | | | | | | | | |
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | |MBTN1|right|down |left| PgD| <- | down arrow | up arrow | -> | | | | | |
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ | |MBTN3| | | | | | ~ (N) | | | | | | | |
+ |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----|
+ |------+------+----------------------+------+------+
+ | **** | **** | ******************** | **** | **** |
+ |------+------+----------------------+------+------+
+ */
+
+ [MOVEMENT] = LAYOUT(
+ KC_GRV, KC_ACL0, KC_ACL1, KC_ACL2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_BTN2, KC_TRNS, KC_MS_U, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_R, KC_PGDN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; \ No newline at end of file
diff --git a/keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk b/keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk
new file mode 100644
index 0000000000..35591533cc
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk
@@ -0,0 +1 @@
+MOUSEKEY_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c
new file mode 100644
index 0000000000..a15f5e5e0b
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c
@@ -0,0 +1,143 @@
+#include "quantum.h"
+#include "command.h"
+#include "action_pseudo_lut.h"
+
+static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE];
+
+/*
+ * Pseudo layout action.
+ * This action converts a keycode in order to output the character according to the keymap you specified
+ * still your keyboard layout recognized wrongly on your OS.
+ * Memo: Using other layer keymap to get keycode
+ */
+void action_pseudo_lut(keyrecord_t *record, uint8_t base_keymap_id, const uint16_t (*keymap)[2]) {
+ uint8_t prev_shift;
+ uint16_t keycode;
+ uint16_t pseudo_keycode;
+
+ /* get keycode from keymap you specified */
+ keycode = keymap_key_to_keycode(base_keymap_id, record->event.key);
+
+ prev_shift = keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT));
+
+ if (record->event.pressed) {
+ /* when magic commands entered, keycode does not converted */
+ if (IS_COMMAND()) {
+ if (prev_shift) {
+ add_shift_bit(keycode);
+ }
+ register_code(keycode);
+ return;
+ }
+
+ if (prev_shift) {
+ pseudo_keycode = convert_keycode(keymap, keycode, true);
+ dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode);
+ add_shift_bit(keycode);
+
+ if (IS_LSFT(pseudo_keycode)) {
+ register_code(QK_LSFT ^ pseudo_keycode);
+ } else {
+ /* delete shift mod temporarily */
+ del_mods(prev_shift);
+ send_keyboard_report();
+ register_code(pseudo_keycode);
+ add_mods(prev_shift);
+ send_keyboard_report();
+ }
+ } else {
+ pseudo_keycode = convert_keycode(keymap, keycode, false);
+ dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode);
+
+ if (IS_LSFT(pseudo_keycode)) {
+ add_weak_mods(MOD_BIT(KC_LSFT));
+ send_keyboard_report();
+ register_code(QK_LSFT ^ pseudo_keycode);
+ /* on Windows, prevent key repeat to avoid unintended output */
+ unregister_code(QK_LSFT ^ pseudo_keycode);
+ del_weak_mods(MOD_BIT(KC_LSFT));
+ send_keyboard_report();
+ } else {
+ register_code(pseudo_keycode);
+ }
+ }
+ } else {
+ if (get_shift_bit(keycode)) {
+ del_shift_bit(keycode);
+ pseudo_keycode = convert_keycode(keymap, keycode, true);
+ } else {
+ pseudo_keycode = convert_keycode(keymap, keycode, false);
+ }
+ dprintf("released: %02X, converted: %04X\n", keycode, pseudo_keycode);
+
+ if (IS_LSFT(pseudo_keycode)) {
+ unregister_code(QK_LSFT ^ pseudo_keycode);
+ } else {
+ unregister_code(pseudo_keycode);
+ }
+ }
+}
+
+uint16_t convert_keycode(const uint16_t (*keymap)[2], uint16_t keycode, bool shift_modded)
+{
+ uint16_t pseudo_keycode;
+
+ switch (keycode) {
+ case KC_A ... KC_CAPSLOCK:
+#if defined(__AVR__)
+ if (shift_modded) {
+ pseudo_keycode = pgm_read_word(&keymap[keycode][1]);
+ } else {
+ pseudo_keycode = pgm_read_word(&keymap[keycode][0]);
+ }
+#else
+ if (shift_modded) {
+ pseudo_keycode = keymap[keycode][1];
+ } else {
+ pseudo_keycode = keymap[keycode][0];
+ }
+#endif
+ /* if undefined, use got keycode as it is */
+ if (pseudo_keycode == 0x00) {
+ if (shift_modded) {
+ pseudo_keycode = S(keycode);
+ } else {
+ pseudo_keycode = keycode;
+ }
+ }
+ break;
+ default:
+ if (shift_modded) {
+ pseudo_keycode = S(keycode);
+ } else {
+ pseudo_keycode = keycode;
+ }
+ break;
+ }
+ return pseudo_keycode;
+}
+
+uint8_t get_shift_bit(uint16_t keycode) {
+ if ((keycode >> 3) < SHIFT_BIT_SIZE) {
+ return send_key_shift_bit[keycode >> 3] & (1 << (keycode & 7));
+ } else {
+ dprintf("get_shift_bit: Can't get shift bit. keycode: %02X\n", keycode);
+ return 0;
+ }
+}
+
+void add_shift_bit(uint16_t keycode) {
+ if ((keycode >> 3) < SHIFT_BIT_SIZE) {
+ send_key_shift_bit[keycode >> 3] |= (1 << (keycode & 7));
+ } else {
+ dprintf("add_shift_bit: Can't add shift bit. keycode: %02X\n", keycode);
+ }
+}
+
+void del_shift_bit(uint16_t keycode) {
+ if ((keycode >> 3) < SHIFT_BIT_SIZE) {
+ send_key_shift_bit[keycode >> 3] &= ~(1 << (keycode & 7));
+ } else {
+ dprintf("del_shift_bit: Can't delete shift bit. keycode: %02X\n", keycode);
+ }
+}
diff --git a/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h
new file mode 100644
index 0000000000..681252440f
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h
@@ -0,0 +1,15 @@
+#ifndef ACTION_PSEUDO_LUT_H
+#define ACTION_PSEUDO_LUT_H
+
+#define SHIFT_BIT_SIZE (0xE7 / 8 + 1) // 1bit per 1key
+
+#define IS_LSFT(kc) ((QK_LSFT & (kc)) == QK_LSFT)
+
+void action_pseudo_lut(keyrecord_t *, uint8_t, const uint16_t (*)[2]);
+uint16_t convert_keycode(const uint16_t (*)[2], uint16_t, bool);
+
+uint8_t get_shift_bit(uint16_t);
+void add_shift_bit(uint16_t);
+void del_shift_bit(uint16_t);
+
+#endif
diff --git a/keyboards/hhkb/ansi/keymaps/shela/config.h b/keyboards/hhkb/ansi/keymaps/shela/config.h
new file mode 100644
index 0000000000..08cc1fb46e
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/shela/config.h
@@ -0,0 +1,12 @@
+#ifndef CONFIG_SHELA_H
+#define CONFIG_SHELA_H
+
+#include "../../config.h"
+
+#undef TAPPING_TERM
+#define TAPPING_TERM 230
+
+#define ONESHOT_TAP_TOGGLE 2
+#define ONESHOT_TIMEOUT 2000
+
+#endif
diff --git a/keyboards/hhkb/ansi/keymaps/shela/keymap.c b/keyboards/hhkb/ansi/keymaps/shela/keymap.c
new file mode 100644
index 0000000000..3971e8f945
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/shela/keymap.c
@@ -0,0 +1,186 @@
+/*
+ * HHKB Pro 2 US Layout for shela
+ */
+#include QMK_KEYBOARD_H
+#include "keymap_jis2us.h"
+#include "action_pseudo_lut.h"
+
+enum keymap_layout
+{
+ BASE = 0,
+ PSEUDO_US,
+ DVORAK,
+ MOUSE,
+ TENKEY,
+ HHKB,
+ SPACE_FN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Layer 0: Default Layer
+ * ,-----------------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` | BSp |
+ * |-----------------------------------------------------------------------------------------|
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
+ * |-----------------------------------------------------------------------------------------|
+ * | Control | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
+ * |-----------------------------------------------------------------------------------------|
+ * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 |
+ * `-----------------------------------------------------------------------------------------'
+ * |LAlt | LGui | SpaceFN | RGui |RAlt |
+ * `-----------------------------------------------------------------'
+ */
+ [BASE] =
+ 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_GRV, KC_BSPC,
+ 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_BSLS,
+ 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,
+ OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB),
+ KC_LALT, KC_LGUI, LT(SPACE_FN, KC_SPACE), KC_RGUI, KC_RALT),
+
+ /* Layer 1: Pseudo US Layout Layer
+ * ,-----------------------------------------------------------------------------------------.
+ * | Esc | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | BSp |
+ * |-----------------------------------------------------------------------------------------|
+ * | Tab | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 |
+ * |-----------------------------------------------------------------------------------------|
+ * | Control | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Enter |
+ * |-----------------------------------------------------------------------------------------|
+ * | Shift | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Shift | Fn0 |
+ * `-----------------------------------------------------------------------------------------'
+ * |LGui | Fn3 | SpaceFN | Fn4 |RGui |
+ * `-----------------------------------------------------------------'
+ */
+ [PSEUDO_US] =
+ LAYOUT(KC_ESC, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_BSPC,
+ KC_TAB, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1,
+ KC_LCTL, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_ENT,
+ KC_LSFT, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT, MO(HHKB),
+ KC_LGUI, MT(MOD_LALT, KC_MHEN), LT(SPACE_FN, KC_SPACE), MT(MOD_RALT, KC_KANA), KC_RGUI),
+
+ /* Layer 2: Dvorak Layer
+ * ,-----------------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | ` | BSp |
+ * |-----------------------------------------------------------------------------------------|
+ * | Tab | ' | , | . | P | Y | F | G | C | R | L | / | = | \ |
+ * |-----------------------------------------------------------------------------------------|
+ * | Control | A | O | E | U | I | D | H | T | N | S | - | Enter |
+ * |-----------------------------------------------------------------------------------------|
+ * | Shift | ; | Q | J | K | X | B | M | W | V | Z | Shift | Fn0 |
+ * `-----------------------------------------------------------------------------------------'
+ * |LAlt | LGui | SpaceFN | RGui |RAlt |
+ * `-----------------------------------------------------------------'
+ */
+ [DVORAK] =
+ LAYOUT(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC,
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS,
+ KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(HHKB),
+ KC_LALT, KC_LGUI, LT(SPACE_FN, KC_SPACE), KC_RGUI, KC_RALT),
+
+ /* Layer 3: Mouse layer
+ * ,-----------------------------------------------------------------------------------------.
+ * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | |
+ * |-----------------------------------------------------------------------------------------|
+ * | | | | | | | MwL | MwD | MwU | MwR | | | | |
+ * |-----------------------------------------------------------------------------------------|
+ * | | | | | | | McL | McD | McU | McR | | | |
+ * |-----------------------------------------------------------------------------------------|
+ * | | | | | | | Mb1 | Mb2 | Mb3 | | | | Fn0 |
+ * `-----------------------------------------------------------------------------------------'
+ * | | | Mb1 | | |
+ * `-----------------------------------------------------------------'
+ */
+ [MOUSE] =
+ LAYOUT(KC_ESC, 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_NO, KC_TRNS,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NO, KC_NO, KC_TRNS,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_BTN2, KC_BTN3, KC_NO, KC_NO, KC_TRNS, MO(HHKB),
+ KC_TRNS, KC_TRNS, KC_BTN1, KC_TRNS, KC_TRNS),
+
+ /* Layer 4: Tenkey layer
+ * ,-----------------------------------------------------------------------------------------.
+ * | Esc | | | | | | | | | | / | * | - | | BSp |
+ * |-----------------------------------------------------------------------------------------|
+ * | | | | | | | | | | 7 | 8 | 9 | + | |
+ * |-----------------------------------------------------------------------------------------|
+ * | | | | | | | | | | 4 | 5 | 6 | Enter |
+ * |-----------------------------------------------------------------------------------------|
+ * | | | | | | | | | 1 | 2 | 3 | + | Fn0 |
+ * `-----------------------------------------------------------------------------------------'
+ * | | | SpaceFN | 0 | . |
+ * `-----------------------------------------------------------------'
+ */
+ [TENKEY] =
+ LAYOUT(KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, KC_NO, KC_BSPC,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_NO,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_4, KC_KP_5, KC_KP_6, KC_PENT,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, MO(HHKB),
+ KC_TRNS, KC_TRNS, LT(SPACE_FN, KC_SPACE), KC_KP_0, KC_PDOT),
+
+ /* Layer 5: HHKB mode (HHKB Fn)
+ * ,-----------------------------------------------------------------------------------------.
+ * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
+ * |-----------------------------------------------------------------------------------------|
+ * | Caps | Fn5 | Fn6 | Fn7 | Fn8 | Fn9 | | | Psc | Slk | Pus | Up | | BSp |
+ * |-----------------------------------------------------------------------------------------|
+ * | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter |
+ * |-----------------------------------------------------------------------------------------|
+ * | | | | | | | + | - | End | PgD | Dow | | |
+ * `-----------------------------------------------------------------------------------------'
+ * | | | | | |
+ * `-----------------------------------------------------------------'
+ */
+ [HHKB] =
+ LAYOUT(KC_PWR, 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, DF(BASE), DF(PSEUDO_US), DF(MOUSE), DF(TENKEY), DF(DVORAK), KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+ /* Layer 6: SpaceFN
+ * ,-----------------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Del |
+ * |-----------------------------------------------------------------------------------------|
+ * | | Hom | Up | End | | | | Hom | End | | Psc | Slk | Pau | Ins |
+ * |-----------------------------------------------------------------------------------------|
+ * | | Lef | Dow | Rig | PgU | | Lef | Dow | Up | Rig | | | |
+ * |-----------------------------------------------------------------------------------------|
+ * | | | | PgD | | Spc | | PgD | PgU | | | | |
+ * `-----------------------------------------------------------------------------------------'
+ * | | | | | |
+ * `-----------------------------------------------------------------'
+ */
+ [SPACE_FN] =
+ LAYOUT(KC_TRNS, 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_NO, KC_DEL,
+ KC_TRNS, KC_HOME, KC_UP, KC_END, KC_NO, KC_NO, KC_NO, KC_HOME, KC_END, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_NO, KC_TRNS,
+ KC_TRNS, KC_NO, KC_NO, KC_PGDN, KC_NO, KC_SPC, KC_NO, KC_PGDN, KC_PGUP, KC_NO, KC_NO, KC_TRNS, KC_NO,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+};
+
+/*
+ * user defined action function
+ */
+enum function_id
+{
+ PSEUDO_US_FUNCTION,
+};
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+
+ switch (id)
+ {
+ case PSEUDO_US_FUNCTION:
+ action_pseudo_lut(record, BASE, keymap_jis2us);
+ break;
+ }
+}
+
+/*
+ * Fn action definition
+ */
+const uint16_t PROGMEM fn_actions[] = {
+ [1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION),
+};
diff --git a/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h
new file mode 100644
index 0000000000..edc1e6d869
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h
@@ -0,0 +1,32 @@
+#ifndef LAYOUT_JIS2US_H
+#define LAYOUT_JIS2US_H
+
+/* keymap for convert from JIS to US */
+const uint16_t PROGMEM keymap_jis2us[][2] = {
+ [KC_A ... KC_CAPS] = { 0x00, 0x00 }, /* default value */
+
+ [KC_1] = { KC_1, KC_EXLM }, /* 1 and ! -> 1 and ! */
+ [KC_2] = { KC_2, KC_LBRC }, /* 2 and " -> 2 and @ */
+ [KC_3] = { KC_3, KC_HASH }, /* 3 and # -> 3 and # */
+ [KC_4] = { KC_4, KC_DLR }, /* 4 and $ -> 4 and $ */
+ [KC_5] = { KC_5, KC_PERC }, /* 5 and % -> 5 and % */
+ [KC_6] = { KC_6, KC_EQL }, /* 6 and & -> 6 and ^ */
+ [KC_7] = { KC_7, KC_CIRC }, /* 7 and ' -> 7 and & */
+ [KC_8] = { KC_8, KC_DQT }, /* 8 and ( -> 8 and * */
+ [KC_9] = { KC_9, KC_ASTR }, /* 9 and ) -> 9 and ( */
+ [KC_0] = { KC_0, KC_LPRN }, /* 0 and (no assign) -> 0 and ) */
+ [KC_MINS] = { KC_MINS, S(KC_RO) }, /* - and = -> - and _ */
+ [KC_EQL] = { KC_UNDS, KC_COLN }, /* ^ and ~ -> = and + */
+ [KC_LBRC] = { KC_RBRC, KC_RCBR }, /* @ and ` -> [ and { */
+ [KC_RBRC] = { KC_BSLS, KC_PIPE }, /* [ and { -> ] and } */
+ [KC_BSLS] = { KC_JYEN, S(KC_JYEN) }, /* ] and } -> / and | */
+ [KC_NUHS] = { KC_NUHS, S(KC_NUHS) }, /* (no assign) */
+ [KC_SCLN] = { KC_SCLN, KC_QUOT }, /* ; and + -> ; and : */
+ [KC_QUOT] = { KC_AMPR, KC_AT }, /* : and * -> ' and " */
+ [KC_GRV] = { KC_LCBR, KC_PLUS }, /* (no assign) -> ` and ~ */
+ [KC_COMM] = { KC_COMM, KC_LT }, /* , and < -> , and < */
+ [KC_DOT] = { KC_DOT, KC_GT }, /* . and > -> . and > */
+ [KC_SLSH] = { KC_SLSH, KC_QUES }, /* / and ? -> / and ? */
+};
+
+#endif
diff --git a/keyboards/hhkb/ansi/keymaps/shela/readme.md b/keyboards/hhkb/ansi/keymaps/shela/readme.md
new file mode 100644
index 0000000000..5a06a83632
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/shela/readme.md
@@ -0,0 +1,14 @@
+# Shela's HHKB Layout
+
+Layer 0: US Layout
+Layer 1: Pseudo US Layout
+Layer 2: Dvorak Layout
+Layer 3: Mouse
+Layer 4: Tenkey
+Layer 5: HHKB Fn Key
+Layer 6: SpaceFN
+
+## Pseudo US Layout
+
+On japanese Windows, HHKB Professional 2 US layout model recognized wrongly as JIS layout without changing OS settings.
+But, you can use HHKB like a US layout keyboard as it is.
diff --git a/keyboards/hhkb/ansi/keymaps/shela/rules.mk b/keyboards/hhkb/ansi/keymaps/shela/rules.mk
new file mode 100644
index 0000000000..d0586bda68
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/shela/rules.mk
@@ -0,0 +1 @@
+SRC += action_pseudo_lut.c
diff --git a/keyboards/hhkb/ansi/keymaps/smt/keymap.c b/keyboards/hhkb/ansi/keymaps/smt/keymap.c
new file mode 100644
index 0000000000..e1d8bae2e4
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/smt/keymap.c
@@ -0,0 +1,172 @@
+/* -*- eval: (turn-on-orgtbl); -*-
+ * default HHKB Layout
+ */
+#include QMK_KEYBOARD_H
+
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _HHKB 3
+
+enum planck_keycodes
+{
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK,
+ HHKB
+};
+
+// Custom macros
+#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
+#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
+#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift)
+#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Layer QWERTY: Qwerty Layer
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+
+ |------+------+-----------------------+------+------|
+ | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
+ |------+------+-----------------------+------+------|
+ */
+
+ [_QWERTY] = LAYOUT( // Qwerty layer
+ 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, MEH_GRV,
+ HPR_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,
+ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, SFT_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(_HHKB),
+ KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT),
+
+ /* Layer COLEMAK: Colemak Layer
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Tab | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | Backs | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Cont | A | R | S | T | D | H | N | E | I | O | ' | Ent | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Shift | Z | X | C | V | B | K | M | , | . | / | Shift | Fn | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+
+ |------+------+-----------------------+------+------|
+ | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
+ |------+------+-----------------------+------+------|
+ */
+
+ [_COLEMAK] = LAYOUT( // Colemak layer
+ 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, MEH_GRV,
+ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC,
+ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, SFT_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_HHKB),
+ KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT),
+
+ /* Layer DVORAK: Dvorak Layer
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | \ | ` |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Tab | ' | , | . | P | Y | F | G | C | R | L | / | = | Backs | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Cont | A | O | E | U | I | D | H | T | N | S | - | Ent | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Shift | ; | Q | J | K | X | B | M | W | V | Z | Shift | Fn | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+
+ |------+------+-----------------------+------+------|
+ | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
+ |------+------+-----------------------+------+------|
+ */
+
+ [_DVORAK] = LAYOUT( // Dvorak layer
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, MEH_GRV,
+ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC,
+ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, SFT_ENT,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(_HHKB),
+ KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT),
+
+ /* Layer HHKB: HHKB mode (HHKB Fn)
+ |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----|
+ | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
+ |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----|
+ | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | |
+ |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----|
+ | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | |
+ |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----|
+ | | | Qwt | Cmk | Dvk | | + | - | End | PgD | Dow | | | | |
+ |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----|
+
+ |------+------+----------------------+------+------+
+ | **** | **** | ******************** | **** | **** |
+ |------+------+----------------------+------+------+
+
+ */
+
+ [_HHKB] = LAYOUT(
+ KC_PWR, 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_BSPC,
+ _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
+ _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______,
+ _______, _______, _______, _______, _______)};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch (id)
+ {
+ case 0:
+ if (record->event.pressed)
+ {
+ register_code(KC_RSFT);
+ }
+ else
+ {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
+
+void persistent_default_layer_set(uint16_t default_layer)
+{
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record)
+{
+ switch (keycode)
+ {
+ case QWERTY:
+ if (record->event.pressed)
+ {
+ persistent_default_layer_set(1UL << _QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed)
+ {
+ persistent_default_layer_set(1UL << _COLEMAK);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed)
+ {
+ persistent_default_layer_set(1UL << _DVORAK);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c
new file mode 100644
index 0000000000..68e23b45df
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c
@@ -0,0 +1,20 @@
+#include QMK_KEYBOARD_H
+
+#define SPACE_FN LT(1, KC_SPC)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT( // default layer
+ KC_GESC, 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_RBRC, 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_NUHS, 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, KC_NUBS,
+ KC_LALT, KC_LGUI, SPACE_FN, KC_RGUI, KC_RALT),
+
+ [1] = LAYOUT(
+ KC_GRV, 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_PGUP, KC_UP, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______,
+ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______)
+};
diff --git a/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md
new file mode 100644
index 0000000000..0da9d96ee4
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md
@@ -0,0 +1,22 @@
+# tobiasvl's ISO layout for HHKB
+
+This is my attempt to adapt my regular 60% Norwegian ISO layout to the physical HHKB layout, on the Happy Hacking Keyboard Pro 2 keyboard with the alternate QMK-compatible Hasu controller.
+
+## Base layer
+
+![HHKB ISO](https://i.imgur.com/8n4Kixw.png)
+
+The following changes have been made from standard HHKB:
+
+* The ] and \ keys are swapped so they're in the ISO locations, but a row higher. Whether or not this is a good idea depends heavily on what specific language layout you're using, but it makes sense for Norwegian, I think.
+* The Fn key is replaced with the ISO key (ie. "non-US backslash"). It's gotta go somewhere!
+* The spacebar doubles as space when tapped and Fn when held (ie. SpaceFN). This is a personal preference, but my second and more traditional choice would probably be to replace right GUI/Super with Fn.
+* Grave Escape has been added (shift + Esc produces ~).
+
+## Function layer
+
+This is just how I personally prefer to set up my function layer, and doesn't have anything to do with ISO. You probably want to swap out this wholesale for your own function layer.
+
+* Navigation is moved: Arrow keys on WASD, Page Up and Page Down on QE, Home and End on the right (I have them to the left of the vertical Enter on ISO layouts).
+* Grave Escape has been added (Fn + Esc produces \`).
+* No media keys or anything. I don't use them.
diff --git a/keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore b/keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore
new file mode 100644
index 0000000000..4b8c99bfb8
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore
@@ -0,0 +1,3 @@
+*.h
+matrix.c
+rules.mk
diff --git a/keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c b/keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c
new file mode 100644
index 0000000000..d7aea97736
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c
@@ -0,0 +1,12 @@
+#include QMK_KEYBOARD_H
+#include "tominabox1.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT(KC_GESC, 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_DEL, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, TD(TD_SFT_CPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2)),
+
+ [1] = LAYOUT(KC_ESC, 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_MFFD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC__MUTE, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, 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),
+
+ [2] = LAYOUT(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS),
+
+ [3] = LAYOUT(KC_GESC, KC_EXLM, KC_EML, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS)
+};
diff --git a/keyboards/hhkb/ansi/keymaps/via/keymap.c b/keyboards/hhkb/ansi/keymaps/via/keymap.c
new file mode 100644
index 0000000000..bdbd32898a
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/via/keymap.c
@@ -0,0 +1,68 @@
+#include QMK_KEYBOARD_H
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* BASE Level: Default Layer
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+ | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | |
+ |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+
+ |------+------+-----------------------+------+------|
+ | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
+ |------+------+-----------------------+------+------|
+ */
+
+ [0] = LAYOUT( // default layer
+ 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
+ ),
+
+ /* Layer HHKB: HHKB mode (HHKB Fn)
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+ | | | | | | | + | - | End | PgD | Dow | | | | |
+ |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+
+ |------+------+----------------------+------+------+
+ | **** | **** | ******************** | **** | **** |
+ |------+------+----------------------+------+------+
+
+ */
+
+ [1] = LAYOUT(
+ KC_PWR, 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_TRNS, KC_BSPC,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+ [2] = 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
+ ),
+ [3] = 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
+ )
+};
diff --git a/keyboards/hhkb/ansi/keymaps/via/rules.mk b/keyboards/hhkb/ansi/keymaps/via/rules.mk
new file mode 100644
index 0000000000..1e5b99807c
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/hhkb/ansi/keymaps/xyverz/keymap.c b/keyboards/hhkb/ansi/keymaps/xyverz/keymap.c
new file mode 100644
index 0000000000..eebaede979
--- /dev/null
+++ b/keyboards/hhkb/ansi/keymaps/xyverz/keymap.c
@@ -0,0 +1,137 @@
+/*
+Xyverz's HHKB layout
+
+Rev 0.1, initial commit.
+
+This is my initial keymap for the HHKB with Hasu's alternate controller.
+The default layer is Dvorak, with Qwerty and Colemak being optional.
+Will probably add to it later, but for now I'm going to enjoy this as it is.
+*/
+
+#include QMK_KEYBOARD_H
+
+enum layer_names {
+ _QW,
+ _DV,
+ _CM,
+ _FL,
+};
+
+enum planck_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK };
+
+#define FN_TAB LT(_FL, KC_TAB)
+
+// clang-format off
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /*
+ * _QW: Qwerty Layer
+ * ,-----------------------------------------------------------.
+ * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |Del|
+ * |-----------------------------------------------------------|
+ * |Fn/Tb| Q| W| E| R| T| Y| U| I| O| P| [| ]|BkSpc|
+ * |-----------------------------------------------------------|
+ * |Control| A| S| D| F| G| H| J| K| L| ;| '| Return|
+ * |-----------------------------------------------------------|
+ * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift |Fn|
+ * |-----------------------------------------------------------|
+ * | |Alt |Gui | Space |Gui |Alt | |
+ * `-----------------------------------------------------------'
+ */
+ /* Layer 0: Qwerty */
+ [_QW] = LAYOUT(
+ KC_GESC, 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_DEL ,
+ FN_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(_FL),
+ KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT
+ ),
+
+ /*
+ * _DV: Dvorak Layer
+ * ,-----------------------------------------------------------.
+ * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \ |Del|
+ * |-----------------------------------------------------------|
+ * |Fn/Tb| '| ,| .| P| Y| F| G| C| R| L| /| =|BkSpc|
+ * |-----------------------------------------------------------|
+ * |Control| A| O| E| U| I| D| H| T| N| S| -| Return|
+ * |-----------------------------------------------------------|
+ * |Shift | ;| Q| J| K| X| B| M| W| V| Z| Shift |Fn|
+ * |-----------------------------------------------------------|
+ * | |Alt |Gui | Space |Gui |Alt | |
+ * `-----------------------------------------------------------'
+ */
+ /* Layer 1: Dvorak */
+ [_DV] = LAYOUT(
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL ,
+ FN_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC,
+ KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(_FL),
+ KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT
+ ),
+
+ /*
+ * _CM: Colemak Layer
+ * ,-----------------------------------------------------------.
+ * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |Del|
+ * |-----------------------------------------------------------|
+ * |Fn/Tb| Q| W| F| P| G| J| L| U| Y| ;| [| ]|BkSpc|
+ * |-----------------------------------------------------------|
+ * |Control| A| R| S| T| D| H| N| E| I| O| '| Return|
+ * |-----------------------------------------------------------|
+ * |Shift | Z| X| C| V| B| K| M| ,| .| /| Shift |Fn|
+ * |-----------------------------------------------------------|
+ * | |Alt |Gui | Space |Gui |Alt | |
+ * `-----------------------------------------------------------'
+ */
+ /* Layer 2: Colemak */
+ [_CM] = LAYOUT(
+ KC_GESC, 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_DEL ,
+ FN_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC,
+ KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL),
+ KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT
+ ),
+
+ /*
+ * _FL: Function Layer
+ * ,-----------------------------------------------------------.
+ * |Grv |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |RST|
+ * |-----------------------------------------------------------|
+ * | | |_QW|_DV|_CM| | |PgU| Up|PgD|PSc|SLk|Pau| |
+ * |-----------------------------------------------------------|
+ * | | |MPr|MPl|MNx| |Hom| Lt| Dn| Rt| | | |
+ * |-----------------------------------------------------------|
+ * |CAPS | |Mut|VlD|VlU| |End| | | | | | |
+ * |-----------------------------------------------------------|
+ * | | | | Ins | | | |
+ * `-----------------------------------------------------------'
+ */
+ /* Layer 3: Functions */
+ [_FL] = LAYOUT(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RESET ,
+ _______, _______, QWERTY, DVORAK, COLEMAK, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______,
+ KC_CAPS, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
+ _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_END, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______
+ ),
+
+};
+// clang-format on
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+ switch (keycode) {
+ case DVORAK:
+ set_single_persistent_default_layer(_DV);
+ return false;
+ case QWERTY:
+ set_single_persistent_default_layer(_QW);
+ return false;
+ case COLEMAK:
+ set_single_persistent_default_layer(_CM);
+ return false;
+ }
+ }
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/hhkb/ansi/matrix.c b/keyboards/hhkb/ansi/matrix.c
new file mode 100644
index 0000000000..f22e69f6b0
--- /dev/null
+++ b/keyboards/hhkb/ansi/matrix.c
@@ -0,0 +1,211 @@
+/*
+Copyright 2011 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * scan matrix
+ */
+#include <stdint.h>
+#include <stdbool.h>
+#include <util/delay.h>
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include "timer.h"
+#include "matrix.h"
+#include "hhkb_avr.h"
+#include <avr/wdt.h>
+#include "suspend.h"
+#include "lufa.h"
+
+
+// matrix power saving
+#define MATRIX_POWER_SAVE 10000
+static uint32_t matrix_last_modified = 0;
+
+// matrix state buffer(1:on, 0:off)
+static matrix_row_t *matrix;
+static matrix_row_t *matrix_prev;
+static matrix_row_t _matrix0[MATRIX_ROWS];
+static matrix_row_t _matrix1[MATRIX_ROWS];
+
+
+inline
+uint8_t matrix_rows(void)
+{
+ return MATRIX_ROWS;
+}
+
+inline
+uint8_t matrix_cols(void)
+{
+ return MATRIX_COLS;
+}
+
+void matrix_init(void)
+{
+#ifdef DEBUG
+ debug_enable = true;
+ debug_keyboard = true;
+#endif
+
+ KEY_INIT();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00;
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00;
+ matrix = _matrix0;
+ matrix_prev = _matrix1;
+}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+}
+
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
+
+uint8_t matrix_scan(void)
+{
+ uint8_t *tmp;
+
+ tmp = matrix_prev;
+ matrix_prev = matrix;
+ matrix = tmp;
+
+ // power on
+ if (!KEY_POWER_STATE()) KEY_POWER_ON();
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ for (uint8_t col = 0; col < MATRIX_COLS; col++) {
+ KEY_SELECT(row, col);
+ _delay_us(5);
+
+ // Not sure this is needed. This just emulates HHKB controller's behaviour.
+ if (matrix_prev[row] & (1<<col)) {
+ KEY_PREV_ON();
+ }
+ _delay_us(10);
+
+ // NOTE: KEY_STATE is valid only in 20us after KEY_ENABLE.
+ // If V-USB interrupts in this section we could lose 40us or so
+ // and would read invalid value from KEY_STATE.
+ uint8_t last = TIMER_RAW;
+
+ KEY_ENABLE();
+
+ // Wait for KEY_STATE outputs its value.
+ // 1us was ok on one HHKB, but not worked on another.
+ // no wait doesn't work on Teensy++ with pro(1us works)
+ // no wait does work on tmk PCB(8MHz) with pro2
+ // 1us wait does work on both of above
+ // 1us wait doesn't work on tmk(16MHz)
+ // 5us wait does work on tmk(16MHz)
+ // 5us wait does work on tmk(16MHz/2)
+ // 5us wait does work on tmk(8MHz)
+ // 10us wait does work on Teensy++ with pro
+ // 10us wait does work on 328p+iwrap with pro
+ // 10us wait doesn't work on tmk PCB(8MHz) with pro2(very lagged scan)
+ _delay_us(5);
+
+ if (KEY_STATE()) {
+ matrix[row] &= ~(1<<col);
+ } else {
+ matrix[row] |= (1<<col);
+ }
+
+ // Ignore if this code region execution time elapses more than 20us.
+ // MEMO: 20[us] * (TIMER_RAW_FREQ / 1000000)[count per us]
+ // MEMO: then change above using this rule: a/(b/c) = a*1/(b/c) = a*(c/b)
+ if (TIMER_DIFF_RAW(TIMER_RAW, last) > 20/(1000000/TIMER_RAW_FREQ)) {
+ matrix[row] = matrix_prev[row];
+ }
+
+ _delay_us(5);
+ KEY_PREV_OFF();
+ KEY_UNABLE();
+
+ // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE.
+ // This takes 25us or more to make sure KEY_STATE returns to idle state.
+
+ _delay_us(75);
+
+ }
+ if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32();
+ }
+ // power off
+ if (KEY_POWER_STATE() &&
+ (USB_DeviceState == DEVICE_STATE_Suspended ||
+ USB_DeviceState == DEVICE_STATE_Unattached ) &&
+ timer_elapsed32(matrix_last_modified) > MATRIX_POWER_SAVE) {
+ KEY_POWER_OFF();
+ suspend_power_down();
+ }
+
+ matrix_scan_quantum();
+
+ return 1;
+}
+
+bool matrix_is_modified(void)
+{
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ if (matrix[i] != matrix_prev[i])
+ return true;
+ }
+ return false;
+}
+
+inline
+bool matrix_has_ghost(void)
+{
+ return false;
+}
+
+inline
+bool matrix_is_on(uint8_t row, uint8_t col)
+{
+ return (matrix[row] & (1<<col));
+}
+
+inline
+matrix_row_t matrix_get_row(uint8_t row)
+{
+ return matrix[row];
+}
+
+void matrix_print(void)
+{
+ print("\nr/c 01234567\n");
+ for (uint8_t row = 0; row < matrix_rows(); row++) {
+ xprintf("%02X: %08b\n", row, bitrev(matrix_get_row(row)));
+ }
+}
+
+uint8_t matrix_key_count(void) {
+ uint8_t count = 0;
+ for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) {
+ count += bitpop16(matrix_get_row(r));
+ }
+ return count;
+}
+
+void matrix_power_up(void) {
+ KEY_POWER_ON();
+}
+void matrix_power_down(void) {
+ KEY_POWER_OFF();
+}
diff --git a/keyboards/hhkb/ansi/readme.md b/keyboards/hhkb/ansi/readme.md
new file mode 100644
index 0000000000..495aa4c3f7
--- /dev/null
+++ b/keyboards/hhkb/ansi/readme.md
@@ -0,0 +1,14 @@
+HHKB Alternate Controller
+===
+
+An alternative controler for the HHKB designed by hasu.
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: HHKB Alternate Controller
+Hardware Availability: https://geekhack.org/index.php?topic=12047.0
+
+Make example for this keyboard (after setting up your build environment):
+
+ make hhkb/ansi:default
+
+See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
diff --git a/keyboards/hhkb/ansi/rules.mk b/keyboards/hhkb/ansi/rules.mk
new file mode 100644
index 0000000000..a367ef48d1
--- /dev/null
+++ b/keyboards/hhkb/ansi/rules.mk
@@ -0,0 +1,71 @@
+# MCU name
+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 = atmel-dfu
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
+CUSTOM_MATRIX = yes # Custom matrix file for the HHKB
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+# SLEEP_LED_ENABLE = yes # 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 = yes # Enable keyboard backlight functionality
+# MIDI_ENABLE = yes # MIDI controls
+# UNICODE_ENABLE = yes # Unicode
+# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
+
+
+# HHKB_RN42_ENABLE = yes # Enable support for hasu's BT alt controller -- code borrowed from tmk source tree.
+
+# Either uncomment the HHKB_RN42_ENABLE line above, or run make enabling the
+# feature. Be sure to clean any existing build before trying to enable rn42
+# support. For example:
+#
+# make hhkb-keymap-clean
+# make hhkb-keymap-dfu HHKB_RN42_ENABLE=yes
+
+# project specific files
+SRC = matrix.c
+
+ifeq ($(strip $(HHKB_RN42_ENABLE)), yes)
+
+OPT_DEFS += -DHHKB_RN42_ENABLE
+
+# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT
+# HHKB Alt controller.
+RN42_DIR = ../rn42
+
+SRC += serial_uart.c \
+ ../rn42/suart.S \
+ ../rn42/rn42.c \
+ ../rn42/rn42_task.c \
+ ../rn42/battery.c \
+ ../rn42/main.c
+
+VPATH += $(RN42_DIR)
+
+endif
+
+
+# debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION
+# debug-on: all
+
+# debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT
+# debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS))
+# debug-off: all
+
+LAYOUTS = 60_hhkb