diff options
author | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-05-30 13:14:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-30 13:14:59 -0700 |
commit | fced377ac007d27f2650ccffbe0b18abcdcfe23d (patch) | |
tree | bd5b141987394a5a16cfc416bfe2b9efdb14d067 /keyboards/hhkb | |
parent | 7b8a013826ad90714a05ea522de53adf964ab3b9 (diff) | |
download | qmk_firmware-fced377ac007d27f2650ccffbe0b18abcdcfe23d.tar.gz qmk_firmware-fced377ac007d27f2650ccffbe0b18abcdcfe23d.zip |
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')
-rw-r--r-- | keyboards/hhkb/ansi/ansi.c | 1 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/ansi.h | 23 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/config.h (renamed from keyboards/hhkb/config.h) | 15 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/hhkb_avr.h | 157 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/info.json | 73 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/blakedietz/README.md (renamed from keyboards/hhkb/keymaps/blakedietz/README.md) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/blakedietz/config.h (renamed from keyboards/hhkb/keymaps/blakedietz/config.h) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c (renamed from keyboards/hhkb/keymaps/blakedietz/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk (renamed from keyboards/hhkb/keymaps/blakedietz/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/brett/config.h (renamed from keyboards/hhkb/keymaps/brett/config.h) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/brett/keymap.c (renamed from keyboards/hhkb/keymaps/brett/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/brett/readme.md (renamed from keyboards/hhkb/keymaps/brett/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/brett/rules.mk (renamed from keyboards/hhkb/keymaps/brett/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/cinaeco/README.md (renamed from keyboards/hhkb/keymaps/cinaeco/README.md) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/cinaeco/config.h (renamed from keyboards/hhkb/keymaps/cinaeco/config.h) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c (renamed from keyboards/hhkb/keymaps/cinaeco/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk (renamed from keyboards/hhkb/keymaps/cinaeco/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c (renamed from keyboards/hhkb/keymaps/dbroqua/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/dbroqua/readme.md (renamed from keyboards/hhkb/keymaps/dbroqua/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/default/keymap.c (renamed from keyboards/hhkb/keymaps/default/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/eric/keymap.c (renamed from keyboards/hhkb/keymaps/eric/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/krusli/config.h (renamed from keyboards/hhkb/keymaps/dhertz/config.h) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/krusli/keymap.c (renamed from keyboards/hhkb/keymaps/krusli/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/lxol/keymap.c (renamed from keyboards/hhkb/keymaps/lxol/keymap.c) | 16 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/mjt/config.h (renamed from keyboards/hhkb/keymaps/mjt/config.h) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/mjt/keymap.c (renamed from keyboards/hhkb/keymaps/mjt/keymap.c) | 3 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/mjt/readme.md (renamed from keyboards/hhkb/keymaps/mjt/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/mjt/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/schaeferdev/README.md (renamed from keyboards/hhkb/keymaps/schaeferdev/README.md) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/schaeferdev/config.h (renamed from keyboards/hhkb/keymaps/schaeferdev/config.h) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c (renamed from keyboards/hhkb/keymaps/schaeferdev/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk (renamed from keyboards/hhkb/keymaps/schaeferdev/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c (renamed from keyboards/hhkb/keymaps/shela/action_pseudo_lut.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h (renamed from keyboards/hhkb/keymaps/shela/action_pseudo_lut.h) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/shela/config.h (renamed from keyboards/hhkb/keymaps/shela/config.h) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/shela/keymap.c (renamed from keyboards/hhkb/keymaps/shela/keymap.c) | 11 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h (renamed from keyboards/hhkb/keymaps/shela/keymap_jis2us.h) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/shela/readme.md (renamed from keyboards/hhkb/keymaps/shela/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/shela/rules.mk (renamed from keyboards/hhkb/keymaps/shela/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/smt/keymap.c (renamed from keyboards/hhkb/keymaps/smt/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c (renamed from keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md (renamed from keyboards/hhkb/keymaps/tobiasvl_iso/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore (renamed from keyboards/hhkb/keymaps/tominabox1/.gitignore) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c (renamed from keyboards/hhkb/keymaps/tominabox1/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/via/keymap.c | 68 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/via/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/keymaps/xyverz/keymap.c (renamed from keyboards/hhkb/keymaps/xyverz/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/matrix.c | 211 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/readme.md | 14 | ||||
-rw-r--r-- | keyboards/hhkb/ansi/rules.mk (renamed from keyboards/hhkb/rules.mk) | 12 | ||||
-rw-r--r-- | keyboards/hhkb/hhkb.c | 1 | ||||
-rw-r--r-- | keyboards/hhkb/jp/config.h | 104 | ||||
-rw-r--r-- | keyboards/hhkb/jp/hhkb_avr.h (renamed from keyboards/hhkb/hhkb_avr.h) | 13 | ||||
-rw-r--r-- | keyboards/hhkb/jp/info.json (renamed from keyboards/hhkb/info.json) | 67 | ||||
-rw-r--r-- | keyboards/hhkb/jp/jp.c | 1 | ||||
-rw-r--r-- | keyboards/hhkb/jp/jp.h (renamed from keyboards/hhkb/hhkb.h) | 26 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/bakingpy/keymap.c (renamed from keyboards/hhkb/keymaps/bakingpy/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/bakingpy/rules.mk (renamed from keyboards/hhkb/keymaps/bakingpy/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/default/keymap.c (renamed from keyboards/hhkb/keymaps/jp/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/default/rules.mk (renamed from keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/default_mac/keymap.c (renamed from keyboards/hhkb/keymaps/jp_mac/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/default_mac/rules.mk (renamed from keyboards/hhkb/keymaps/jp/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/dhertz/config.h (renamed from keyboards/hhkb/keymaps/krusli/config.h) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/dhertz/keymap.c (renamed from keyboards/hhkb/keymaps/dhertz/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/dhertz/keymap.h (renamed from keyboards/hhkb/keymaps/dhertz/keymap.h) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/dhertz/rules.mk (renamed from keyboards/hhkb/keymaps/dhertz/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c (renamed from keyboards/hhkb/keymaps/enoch_jp/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/enoch_jp/rules.mk (renamed from keyboards/hhkb/keymaps/enoch_jp/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/halfqwerty_jp/README.md (renamed from keyboards/hhkb/keymaps/halfqwerty_jp/README.md) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c (renamed from keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/halfqwerty_jp/rules.mk (renamed from keyboards/hhkb/keymaps/jp_mac/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c (renamed from keyboards/hhkb/keymaps/rdg_jp/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/rdg_jp/rules.mk (renamed from keyboards/hhkb/keymaps/rdg_jp/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/sh_jp/README.md (renamed from keyboards/hhkb/keymaps/sh_jp/README.md) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/sh_jp/keymap.c (renamed from keyboards/hhkb/keymaps/sh_jp/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/sh_jp/rules.mk (renamed from keyboards/hhkb/keymaps/sh_jp/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/via/config.h | 2 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/via/keymap.c | 58 | ||||
-rw-r--r-- | keyboards/hhkb/jp/keymaps/via/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/hhkb/jp/matrix.c (renamed from keyboards/hhkb/matrix.c) | 5 | ||||
-rw-r--r-- | keyboards/hhkb/jp/readme.md (renamed from keyboards/hhkb/readme.md) | 2 | ||||
-rw-r--r-- | keyboards/hhkb/jp/rules.mk | 69 |
82 files changed, 812 insertions, 143 deletions
diff --git a/keyboards/hhkb/ansi/ansi.c b/keyboards/hhkb/ansi/ansi.c new file mode 100644 index 000000000..cefc4e069 --- /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 000000000..28e8d2fef --- /dev/null +++ b/keyboards/hhkb/ansi/ansi.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "quantum.h" | ||
4 | |||
5 | #define LAYOUT( \ | ||
6 | K31, K30, K00, K10, K11, K20, K21, K40, K41, K60, K61, K70, K71, K50, K51, \ | ||
7 | K32, K01, K02, K13, K12, K23, K22, K42, K43, K62, K63, K73, K72, K52, \ | ||
8 | K33, K04, K03, K14, K15, K24, K25, K45, K44, K65, K64, K74, K53, \ | ||
9 | K34, K05, K06, K07, K16, K17, K26, K46, K66, K76, K75, K55, K54, \ | ||
10 | K35, K36, K37, K57, K56) \ | ||
11 | \ | ||
12 | { \ | ||
13 | { K00, K01, K02, K03, K04, K05, K06, K07 }, \ | ||
14 | { K10, K11, K12, K13, K14, K15, K16, K17 }, \ | ||
15 | { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ | ||
16 | { K30, K31, K32, K33, K34, K35, K36, K37 }, \ | ||
17 | { K40, K41, K42, K43, K44, K45, K46, KC_NO }, \ | ||
18 | { K50, K51, K52, K53, K54, K55, K56, K57 }, \ | ||
19 | { K60, K61, K62, K63, K64, K65, K66, KC_NO }, \ | ||
20 | { K70, K71, K72, K73, K74, K75, K76, KC_NO } \ | ||
21 | } | ||
22 | |||
23 | #define LAYOUT_60_hhkb LAYOUT | ||
diff --git a/keyboards/hhkb/config.h b/keyboards/hhkb/ansi/config.h index fc747a6e9..689fd5568 100644 --- a/keyboards/hhkb/config.h +++ b/keyboards/hhkb/ansi/config.h | |||
@@ -15,25 +15,20 @@ You should have received a copy of the GNU General Public License | |||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef CONFIG_H | 18 | #pragma once |
19 | #define CONFIG_H | ||
20 | 19 | ||
21 | #include "config_common.h" | 20 | #include "config_common.h" |
22 | 21 | ||
23 | /* USB Device descriptor parameter */ | 22 | /* USB Device descriptor parameter */ |
24 | #define VENDOR_ID 0xFEED | 23 | #define VENDOR_ID 0x4848 // HH = happy hacking |
25 | #define PRODUCT_ID 0xCAFE | 24 | #define PRODUCT_ID 0x0001 // ANSI HHKB |
26 | #define DEVICE_VER 0x0104 | 25 | #define DEVICE_VER 0x0104 |
27 | #define MANUFACTURER q.m.k | 26 | #define MANUFACTURER q.m.k |
28 | #define PRODUCT HHKB mod | 27 | #define PRODUCT HHKB mod |
29 | #define DESCRIPTION q.m.k keyboard firmware for HHKB | 28 | #define DESCRIPTION q.m.k keyboard firmware for HHKB |
30 | 29 | ||
31 | /* key matrix size */ | 30 | /* key matrix size */ |
32 | #ifdef HHKB_JP | 31 | #define MATRIX_ROWS 8 |
33 | # define MATRIX_ROWS 16 | ||
34 | #else | ||
35 | # define MATRIX_ROWS 8 | ||
36 | #endif | ||
37 | #define MATRIX_COLS 8 | 32 | #define MATRIX_COLS 8 |
38 | 33 | ||
39 | #define TAPPING_TERM 200 | 34 | #define TAPPING_TERM 200 |
@@ -107,5 +102,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
107 | //#define NO_ACTION_ONESHOT | 102 | //#define NO_ACTION_ONESHOT |
108 | //#define NO_ACTION_MACRO | 103 | //#define NO_ACTION_MACRO |
109 | //#define NO_ACTION_FUNCTION | 104 | //#define NO_ACTION_FUNCTION |
110 | |||
111 | #endif | ||
diff --git a/keyboards/hhkb/ansi/hhkb_avr.h b/keyboards/hhkb/ansi/hhkb_avr.h new file mode 100644 index 000000000..f9446deef --- /dev/null +++ b/keyboards/hhkb/ansi/hhkb_avr.h | |||
@@ -0,0 +1,157 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include <stdint.h> | ||
4 | #include <stdbool.h> | ||
5 | #include <avr/io.h> | ||
6 | #include <avr/interrupt.h> | ||
7 | #include <util/delay.h> | ||
8 | |||
9 | |||
10 | // Timer resolution check | ||
11 | #if (1000000/TIMER_RAW_FREQ > 20) | ||
12 | # error "Timer resolution(>20us) is not enough for HHKB matrix scan tweak on V-USB." | ||
13 | #endif | ||
14 | |||
15 | |||
16 | /* | ||
17 | * HHKB Matrix I/O | ||
18 | * | ||
19 | * row: HC4051[A,B,C] selects scan row0-7 | ||
20 | * row-ext: [En0,En1] row extention for JP | ||
21 | * col: LS145[A,B,C,D] selects scan col0-7 and enable(D) | ||
22 | * key: on: 0/off: 1 | ||
23 | * prev: hysteresis control: assert(1) when previous key state is on | ||
24 | */ | ||
25 | |||
26 | |||
27 | #if defined(__AVR_ATmega32U4__) | ||
28 | /* | ||
29 | * For TMK HHKB alt controller(ATMega32U4) | ||
30 | * | ||
31 | * row: PB0-2 | ||
32 | * col: PB3-5,6 | ||
33 | * key: PD7(pull-uped) | ||
34 | * prev: PB7 | ||
35 | * power: PD4(L:off/H:on) | ||
36 | * row-ext: PC6,7 for HHKB JP(active low) | ||
37 | */ | ||
38 | static inline void KEY_ENABLE(void) { (PORTB &= ~(1<<6)); } | ||
39 | static inline void KEY_UNABLE(void) { (PORTB |= (1<<6)); } | ||
40 | static inline bool KEY_STATE(void) { return (PIND & (1<<7)); } | ||
41 | static inline void KEY_PREV_ON(void) { (PORTB |= (1<<7)); } | ||
42 | static inline void KEY_PREV_OFF(void) { (PORTB &= ~(1<<7)); } | ||
43 | #ifdef HHKB_POWER_SAVING | ||
44 | static inline void KEY_POWER_ON(void) { | ||
45 | DDRB = 0xFF; PORTB = 0x40; // change pins output | ||
46 | DDRD |= (1<<4); PORTD |= (1<<4); // MOS FET switch on | ||
47 | /* Without this wait you will miss or get false key events. */ | ||
48 | _delay_ms(5); // wait for powering up | ||
49 | } | ||
50 | static inline void KEY_POWER_OFF(void) { | ||
51 | /* input with pull-up consumes less than without it when pin is open. */ | ||
52 | DDRB = 0x00; PORTB = 0xFF; // change pins input with pull-up | ||
53 | DDRD |= (1<<4); PORTD &= ~(1<<4); // MOS FET switch off | ||
54 | } | ||
55 | static inline bool KEY_POWER_STATE(void) { return PORTD & (1<<4); } | ||
56 | #else | ||
57 | static inline void KEY_POWER_ON(void) {} | ||
58 | static inline void KEY_POWER_OFF(void) {} | ||
59 | static inline bool KEY_POWER_STATE(void) { return true; } | ||
60 | #endif | ||
61 | static inline void KEY_INIT(void) | ||
62 | { | ||
63 | /* row,col,prev: output */ | ||
64 | DDRB = 0xFF; | ||
65 | PORTB = 0x40; // unable | ||
66 | /* key: input with pull-up */ | ||
67 | DDRD &= ~0x80; | ||
68 | PORTD |= 0x80; | ||
69 | |||
70 | KEY_UNABLE(); | ||
71 | KEY_PREV_OFF(); | ||
72 | |||
73 | KEY_POWER_OFF(); | ||
74 | } | ||
75 | static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) | ||
76 | { | ||
77 | PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07); | ||
78 | |||
79 | } | ||
80 | |||
81 | |||
82 | #elif defined(__AVR_AT90USB1286__) | ||
83 | /* | ||
84 | * For Teensy++(AT90USB1286) | ||
85 | * | ||
86 | * HHKB pro HHKB pro2 | ||
87 | * row: PB0-2 (6-8) (5-7) | ||
88 | * col: PB3-5,6 (9-12) (8-11) | ||
89 | * key: PE6(pull-uped) (4) (3) | ||
90 | * prev: PE7 (5) (4) | ||
91 | * | ||
92 | * TODO: convert into 'staitc inline' function | ||
93 | */ | ||
94 | #define KEY_INIT() do { \ | ||
95 | DDRB |= 0x7F; \ | ||
96 | DDRE |= (1<<7); \ | ||
97 | DDRE &= ~(1<<6); \ | ||
98 | PORTE |= (1<<6); \ | ||
99 | } while (0) | ||
100 | #define KEY_SELECT(ROW, COL) (PORTB = (PORTB & 0xC0) | \ | ||
101 | (((COL) & 0x07)<<3) | \ | ||
102 | ((ROW) & 0x07)) | ||
103 | #define KEY_ENABLE() (PORTB &= ~(1<<6)) | ||
104 | #define KEY_UNABLE() (PORTB |= (1<<6)) | ||
105 | #define KEY_STATE() (PINE & (1<<6)) | ||
106 | #define KEY_PREV_ON() (PORTE |= (1<<7)) | ||
107 | #define KEY_PREV_OFF() (PORTE &= ~(1<<7)) | ||
108 | #define KEY_POWER_ON() | ||
109 | #define KEY_POWER_OFF() | ||
110 | #define KEY_POWER_STATE() true | ||
111 | |||
112 | |||
113 | #else | ||
114 | # error "define code for matrix scan" | ||
115 | #endif | ||
116 | |||
117 | |||
118 | #if 0 | ||
119 | // For ATMega328P with V-USB | ||
120 | // | ||
121 | // #elif defined(__AVR_ATmega328P__) | ||
122 | // Ports for V-USB | ||
123 | // key: PB0(pull-uped) | ||
124 | // prev: PB1 | ||
125 | // row: PB2-4 | ||
126 | // col: PC0-2,3 | ||
127 | // power: PB5(Low:on/Hi-z:off) | ||
128 | #define KEY_INIT() do { \ | ||
129 | DDRB |= 0x3E; \ | ||
130 | DDRB &= ~(1<<0); \ | ||
131 | PORTB |= 1<<0; \ | ||
132 | DDRC |= 0x0F; \ | ||
133 | KEY_UNABLE(); \ | ||
134 | KEY_PREV_OFF(); \ | ||
135 | } while (0) | ||
136 | #define KEY_SELECT(ROW, COL) do { \ | ||
137 | PORTB = (PORTB & 0xE3) | ((ROW) & 0x07)<<2; \ | ||
138 | PORTC = (PORTC & 0xF8) | ((COL) & 0x07); \ | ||
139 | } while (0) | ||
140 | #define KEY_ENABLE() (PORTC &= ~(1<<3)) | ||
141 | #define KEY_UNABLE() (PORTC |= (1<<3)) | ||
142 | #define KEY_STATE() (PINB & (1<<0)) | ||
143 | #define KEY_PREV_ON() (PORTB |= (1<<1)) | ||
144 | #define KEY_PREV_OFF() (PORTB &= ~(1<<1)) | ||
145 | // Power supply switching | ||
146 | #define KEY_POWER_ON() do { \ | ||
147 | KEY_INIT(); \ | ||
148 | PORTB &= ~(1<<5); \ | ||
149 | _delay_ms(1); \ | ||
150 | } while (0) | ||
151 | #define KEY_POWER_OFF() do { \ | ||
152 | DDRB &= ~0x3F; \ | ||
153 | PORTB &= ~0x3F; \ | ||
154 | DDRC &= ~0x0F; \ | ||
155 | PORTC &= ~0x0F; \ | ||
156 | } while (0) | ||
157 | #endif | ||
diff --git a/keyboards/hhkb/ansi/info.json b/keyboards/hhkb/ansi/info.json new file mode 100644 index 000000000..a36f1d44c --- /dev/null +++ b/keyboards/hhkb/ansi/info.json | |||
@@ -0,0 +1,73 @@ | |||
1 | { | ||
2 | "keyboard_name": "HHKB", | ||
3 | "url": "", | ||
4 | "maintainer": "qmk", | ||
5 | "width": 15, | ||
6 | "height": 5, | ||
7 | "layouts": { | ||
8 | "LAYOUT": { | ||
9 | "layout": [ | ||
10 | { "label": "Esc", "x": 0, "y": 0 }, | ||
11 | { "label": "!", "x": 1, "y": 0 }, | ||
12 | { "label": "@", "x": 2, "y": 0 }, | ||
13 | { "label": "#", "x": 3, "y": 0 }, | ||
14 | { "label": "$", "x": 4, "y": 0 }, | ||
15 | { "label": "%", "x": 5, "y": 0 }, | ||
16 | { "label": "^", "x": 6, "y": 0 }, | ||
17 | { "label": "&", "x": 7, "y": 0 }, | ||
18 | { "label": "*", "x": 8, "y": 0 }, | ||
19 | { "label": "(", "x": 9, "y": 0 }, | ||
20 | { "label": ")", "x": 10, "y": 0 }, | ||
21 | { "label": "_", "x": 11, "y": 0 }, | ||
22 | { "label": "+", "x": 12, "y": 0 }, | ||
23 | { "label": "|", "x": 13, "y": 0 }, | ||
24 | { "label": "~", "x": 14, "y": 0 }, | ||
25 | { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, | ||
26 | { "label": "Q", "x": 1.5, "y": 1 }, | ||
27 | { "label": "W", "x": 2.5, "y": 1 }, | ||
28 | { "label": "E", "x": 3.5, "y": 1 }, | ||
29 | { "label": "R", "x": 4.5, "y": 1 }, | ||
30 | { "label": "T", "x": 5.5, "y": 1 }, | ||
31 | { "label": "Y", "x": 6.5, "y": 1 }, | ||
32 | { "label": "U", "x": 7.5, "y": 1 }, | ||
33 | { "label": "I", "x": 8.5, "y": 1 }, | ||
34 | { "label": "O", "x": 9.5, "y": 1 }, | ||
35 | { "label": "P", "x": 10.5, "y": 1 }, | ||
36 | { "label": "{", "x": 11.5, "y": 1 }, | ||
37 | { "label": "}", "x": 12.5, "y": 1 }, | ||
38 | { "label": "Delete", "x": 13.5, "y": 1, "w": 1.5 }, | ||
39 | { "label": "Control", "x": 0, "y": 2, "w": 1.75 }, | ||
40 | { "label": "A", "x": 1.75, "y": 2 }, | ||
41 | { "label": "S", "x": 2.75, "y": 2 }, | ||
42 | { "label": "D", "x": 3.75, "y": 2 }, | ||
43 | { "label": "F", "x": 4.75, "y": 2 }, | ||
44 | { "label": "G", "x": 5.75, "y": 2 }, | ||
45 | { "label": "H", "x": 6.75, "y": 2 }, | ||
46 | { "label": "J", "x": 7.75, "y": 2 }, | ||
47 | { "label": "K", "x": 8.75, "y": 2 }, | ||
48 | { "label": "L", "x": 9.75, "y": 2 }, | ||
49 | { "label": ":", "x": 10.75, "y": 2 }, | ||
50 | { "label": "\"", "x": 11.75, "y": 2 }, | ||
51 | { "label": "Return", "x": 12.75, "y": 2, "w": 2.25 }, | ||
52 | { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, | ||
53 | { "label": "Z", "x": 2.25, "y": 3 }, | ||
54 | { "label": "X", "x": 3.25, "y": 3 }, | ||
55 | { "label": "C", "x": 4.25, "y": 3 }, | ||
56 | { "label": "V", "x": 5.25, "y": 3 }, | ||
57 | { "label": "B", "x": 6.25, "y": 3 }, | ||
58 | { "label": "N", "x": 7.25, "y": 3 }, | ||
59 | { "label": "M", "x": 8.25, "y": 3 }, | ||
60 | { "label": "<", "x": 9.25, "y": 3 }, | ||
61 | { "label": ">", "x": 10.25, "y": 3 }, | ||
62 | { "label": "?", "x": 11.25, "y": 3 }, | ||
63 | { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, | ||
64 | { "label": "Fn", "x": 14, "y": 3 }, | ||
65 | { "label": "", "x": 1.5, "y": 4 }, | ||
66 | { "label": "", "x": 2.5, "y": 4, "w": 1.5 }, | ||
67 | { "x": 4, "y": 4, "w": 6 }, | ||
68 | { "label": "", "x": 10, "y": 4, "w": 1.5 }, | ||
69 | { "label": "", "x": 11.5, "y": 4 } | ||
70 | ] | ||
71 | } | ||
72 | } | ||
73 | } | ||
diff --git a/keyboards/hhkb/keymaps/blakedietz/README.md b/keyboards/hhkb/ansi/keymaps/blakedietz/README.md index 4dff47a6e..4dff47a6e 100644 --- a/keyboards/hhkb/keymaps/blakedietz/README.md +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/README.md | |||
diff --git a/keyboards/hhkb/keymaps/blakedietz/config.h b/keyboards/hhkb/ansi/keymaps/blakedietz/config.h index e0d2bce0f..e0d2bce0f 100644 --- a/keyboards/hhkb/keymaps/blakedietz/config.h +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/config.h | |||
diff --git a/keyboards/hhkb/keymaps/blakedietz/keymap.c b/keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c index a9146a4a0..a9146a4a0 100644 --- a/keyboards/hhkb/keymaps/blakedietz/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/blakedietz/rules.mk b/keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk index 7d97e7a52..7d97e7a52 100644 --- a/keyboards/hhkb/keymaps/blakedietz/rules.mk +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/brett/config.h b/keyboards/hhkb/ansi/keymaps/brett/config.h index b9a61e10a..b9a61e10a 100644 --- a/keyboards/hhkb/keymaps/brett/config.h +++ b/keyboards/hhkb/ansi/keymaps/brett/config.h | |||
diff --git a/keyboards/hhkb/keymaps/brett/keymap.c b/keyboards/hhkb/ansi/keymaps/brett/keymap.c index 1201146b0..1201146b0 100644 --- a/keyboards/hhkb/keymaps/brett/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/brett/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/brett/readme.md b/keyboards/hhkb/ansi/keymaps/brett/readme.md index fd07b155f..fd07b155f 100644 --- a/keyboards/hhkb/keymaps/brett/readme.md +++ b/keyboards/hhkb/ansi/keymaps/brett/readme.md | |||
diff --git a/keyboards/hhkb/keymaps/brett/rules.mk b/keyboards/hhkb/ansi/keymaps/brett/rules.mk index 88f57515f..88f57515f 100644 --- a/keyboards/hhkb/keymaps/brett/rules.mk +++ b/keyboards/hhkb/ansi/keymaps/brett/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/cinaeco/README.md b/keyboards/hhkb/ansi/keymaps/cinaeco/README.md index c1c48e609..c1c48e609 100644 --- a/keyboards/hhkb/keymaps/cinaeco/README.md +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/README.md | |||
diff --git a/keyboards/hhkb/keymaps/cinaeco/config.h b/keyboards/hhkb/ansi/keymaps/cinaeco/config.h index c7b4c784c..c7b4c784c 100644 --- a/keyboards/hhkb/keymaps/cinaeco/config.h +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/config.h | |||
diff --git a/keyboards/hhkb/keymaps/cinaeco/keymap.c b/keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c index c27e37d8a..c27e37d8a 100644 --- a/keyboards/hhkb/keymaps/cinaeco/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/cinaeco/rules.mk b/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk index a85669aa2..a85669aa2 100644 --- a/keyboards/hhkb/keymaps/cinaeco/rules.mk +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c index e230a87fb..e230a87fb 100644 --- a/keyboards/hhkb/keymaps/dbroqua/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/dbroqua/readme.md b/keyboards/hhkb/ansi/keymaps/dbroqua/readme.md index 3b8950fee..3b8950fee 100644 --- a/keyboards/hhkb/keymaps/dbroqua/readme.md +++ b/keyboards/hhkb/ansi/keymaps/dbroqua/readme.md | |||
diff --git a/keyboards/hhkb/keymaps/default/keymap.c b/keyboards/hhkb/ansi/keymaps/default/keymap.c index c63ef6a57..c63ef6a57 100644 --- a/keyboards/hhkb/keymaps/default/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/default/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/eric/keymap.c b/keyboards/hhkb/ansi/keymaps/eric/keymap.c index bf788b2ff..bf788b2ff 100644 --- a/keyboards/hhkb/keymaps/eric/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/eric/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/dhertz/config.h b/keyboards/hhkb/ansi/keymaps/krusli/config.h index af2fb9d8a..af2fb9d8a 100644 --- a/keyboards/hhkb/keymaps/dhertz/config.h +++ b/keyboards/hhkb/ansi/keymaps/krusli/config.h | |||
diff --git a/keyboards/hhkb/keymaps/krusli/keymap.c b/keyboards/hhkb/ansi/keymaps/krusli/keymap.c index af6102f10..af6102f10 100644 --- a/keyboards/hhkb/keymaps/krusli/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/krusli/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/lxol/keymap.c b/keyboards/hhkb/ansi/keymaps/lxol/keymap.c index 3e3b3d2ed..462a98047 100644 --- a/keyboards/hhkb/keymaps/lxol/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/lxol/keymap.c | |||
@@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
33 | 33 | ||
34 | 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, | 34 | 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, |
35 | 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, | 35 | 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, |
36 | 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, KC_FN0, | 36 | 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), |
37 | 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), | 37 | 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), |
38 | KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT), | 38 | KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT), |
39 | 39 | ||
@@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
80 | 80 | ||
81 | 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), | 81 | 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), |
82 | 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), | 82 | 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), |
83 | 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), KC_FN0, | 83 | 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), |
84 | 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, | 84 | 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, |
85 | KC_LALT, KC_LGUI, RGUI(KC_SPC), KC_RGUI, KC_RALT), | 85 | KC_LALT, KC_LGUI, RGUI(KC_SPC), KC_RGUI, KC_RALT), |
86 | 86 | ||
@@ -104,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
104 | 104 | ||
105 | 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), | 105 | 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), |
106 | 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), | 106 | 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), |
107 | 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), KC_FN0, | 107 | 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), |
108 | 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, | 108 | 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, |
109 | KC_LALT, KC_LGUI, LGUI(KC_SPC), KC_LGUI, KC_RALT), | 109 | KC_LALT, KC_LGUI, LGUI(KC_SPC), KC_LGUI, KC_RALT), |
110 | 110 | ||
@@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
128 | 128 | ||
129 | 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), | 129 | 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), |
130 | 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), | 130 | 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), |
131 | 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), KC_FN0, | 131 | 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), |
132 | 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, | 132 | 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, |
133 | KC_LALT, KC_LGUI, RALT(KC_SPC), KC_RGUI, KC_RALT), | 133 | KC_LALT, KC_LGUI, RALT(KC_SPC), KC_RGUI, KC_RALT), |
134 | 134 | ||
@@ -152,7 +152,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
152 | 152 | ||
153 | 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), | 153 | 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), |
154 | 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), | 154 | 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), |
155 | 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), KC_FN0, | 155 | 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), |
156 | 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, | 156 | 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, |
157 | KC_LALT, KC_LGUI, LALT(KC_SPC), KC_LGUI, KC_RALT), | 157 | KC_LALT, KC_LGUI, LALT(KC_SPC), KC_LGUI, KC_RALT), |
158 | 158 | ||
@@ -176,14 +176,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
176 | 176 | ||
177 | 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, | 177 | 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, |
178 | 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, | 178 | 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, |
179 | 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, KC_FN0, | 179 | 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), |
180 | 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), | 180 | 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), |
181 | KC_RGUI, KC_RALT, KC_SPC, KC_RALT, KC_RGUI)}; | 181 | KC_RGUI, KC_RALT, KC_SPC, KC_RALT, KC_RGUI)}; |
182 | 182 | ||
183 | const uint16_t PROGMEM fn_actions[] = { | ||
184 | [0] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT) // RControl with tap Enter* | ||
185 | }; | ||
186 | |||
187 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 183 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
188 | { | 184 | { |
189 | // MACRODOWN only works in this function | 185 | // MACRODOWN only works in this function |
diff --git a/keyboards/hhkb/keymaps/mjt/config.h b/keyboards/hhkb/ansi/keymaps/mjt/config.h index 3b8f2e676..3b8f2e676 100644 --- a/keyboards/hhkb/keymaps/mjt/config.h +++ b/keyboards/hhkb/ansi/keymaps/mjt/config.h | |||
diff --git a/keyboards/hhkb/keymaps/mjt/keymap.c b/keyboards/hhkb/ansi/keymaps/mjt/keymap.c index e51eb8bf9..b62676edd 100644 --- a/keyboards/hhkb/keymaps/mjt/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/mjt/keymap.c | |||
@@ -17,7 +17,6 @@ enum hhkb_keycodes | |||
17 | DYNAMIC_MACRO_RANGE, | 17 | DYNAMIC_MACRO_RANGE, |
18 | }; | 18 | }; |
19 | 19 | ||
20 | #include "dynamic_macro.h" | ||
21 | 20 | ||
22 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
23 | 22 | ||
@@ -104,7 +103,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
104 | bool process_record_user(uint16_t keycode, keyrecord_t *record) | 103 | bool process_record_user(uint16_t keycode, keyrecord_t *record) |
105 | { | 104 | { |
106 | uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode); | 105 | uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode); |
107 | if (!process_record_dynamic_macro(macro_kc, record)) | 106 | if (!process_dynamic_macro(macro_kc, record)) |
108 | { | 107 | { |
109 | return false; | 108 | return false; |
110 | } | 109 | } |
diff --git a/keyboards/hhkb/keymaps/mjt/readme.md b/keyboards/hhkb/ansi/keymaps/mjt/readme.md index ff575ce24..ff575ce24 100644 --- a/keyboards/hhkb/keymaps/mjt/readme.md +++ b/keyboards/hhkb/ansi/keymaps/mjt/readme.md | |||
diff --git a/keyboards/hhkb/ansi/keymaps/mjt/rules.mk b/keyboards/hhkb/ansi/keymaps/mjt/rules.mk new file mode 100644 index 000000000..9e6797ed3 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/mjt/rules.mk | |||
@@ -0,0 +1 @@ | |||
DYNAMIC_MACRO_ENABLE = yes | |||
diff --git a/keyboards/hhkb/keymaps/schaeferdev/README.md b/keyboards/hhkb/ansi/keymaps/schaeferdev/README.md index 15b87c498..15b87c498 100644 --- a/keyboards/hhkb/keymaps/schaeferdev/README.md +++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/README.md | |||
diff --git a/keyboards/hhkb/keymaps/schaeferdev/config.h b/keyboards/hhkb/ansi/keymaps/schaeferdev/config.h index b3c799bb8..b3c799bb8 100644 --- a/keyboards/hhkb/keymaps/schaeferdev/config.h +++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/config.h | |||
diff --git a/keyboards/hhkb/keymaps/schaeferdev/keymap.c b/keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c index ea6da450c..ea6da450c 100644 --- a/keyboards/hhkb/keymaps/schaeferdev/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/schaeferdev/rules.mk b/keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk index 35591533c..35591533c 100644 --- a/keyboards/hhkb/keymaps/schaeferdev/rules.mk +++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c index a15f5e5e0..a15f5e5e0 100644 --- a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c +++ b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c | |||
diff --git a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.h b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h index 681252440..681252440 100644 --- a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.h +++ b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h | |||
diff --git a/keyboards/hhkb/keymaps/shela/config.h b/keyboards/hhkb/ansi/keymaps/shela/config.h index 08cc1fb46..08cc1fb46 100644 --- a/keyboards/hhkb/keymaps/shela/config.h +++ b/keyboards/hhkb/ansi/keymaps/shela/config.h | |||
diff --git a/keyboards/hhkb/keymaps/shela/keymap.c b/keyboards/hhkb/ansi/keymaps/shela/keymap.c index 2d5f4c64a..3971e8f94 100644 --- a/keyboards/hhkb/keymaps/shela/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/shela/keymap.c | |||
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
56 | 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, | 56 | 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, |
57 | 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, | 57 | 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, |
58 | 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), | 58 | 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), |
59 | KC_LGUI, KC_FN3, LT(SPACE_FN, KC_SPACE), KC_FN4, KC_RGUI), | 59 | KC_LGUI, MT(MOD_LALT, KC_MHEN), LT(SPACE_FN, KC_SPACE), MT(MOD_RALT, KC_KANA), KC_RGUI), |
60 | 60 | ||
61 | /* Layer 2: Dvorak Layer | 61 | /* Layer 2: Dvorak Layer |
62 | * ,-----------------------------------------------------------------------------------------. | 62 | * ,-----------------------------------------------------------------------------------------. |
@@ -133,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
133 | */ | 133 | */ |
134 | [HHKB] = | 134 | [HHKB] = |
135 | 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, | 135 | 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, |
136 | KC_CAPS, KC_FN5, KC_FN6, KC_FN7, KC_FN8, KC_FN9, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, | 136 | 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, |
137 | 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, | 137 | 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, |
138 | 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, | 138 | 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, |
139 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | 139 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), |
@@ -183,11 +183,4 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
183 | */ | 183 | */ |
184 | const uint16_t PROGMEM fn_actions[] = { | 184 | const uint16_t PROGMEM fn_actions[] = { |
185 | [1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION), | 185 | [1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION), |
186 | [3] = ACTION_MODS_TAP_KEY(MOD_LALT, KC_MHEN), | ||
187 | [4] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_KANA), | ||
188 | [5] = ACTION_DEFAULT_LAYER_SET(BASE), | ||
189 | [6] = ACTION_DEFAULT_LAYER_SET(PSEUDO_US), | ||
190 | [7] = ACTION_DEFAULT_LAYER_SET(MOUSE), | ||
191 | [8] = ACTION_DEFAULT_LAYER_SET(TENKEY), | ||
192 | [9] = ACTION_DEFAULT_LAYER_SET(DVORAK), | ||
193 | }; | 186 | }; |
diff --git a/keyboards/hhkb/keymaps/shela/keymap_jis2us.h b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h index edc1e6d86..edc1e6d86 100644 --- a/keyboards/hhkb/keymaps/shela/keymap_jis2us.h +++ b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h | |||
diff --git a/keyboards/hhkb/keymaps/shela/readme.md b/keyboards/hhkb/ansi/keymaps/shela/readme.md index 5a06a8363..5a06a8363 100644 --- a/keyboards/hhkb/keymaps/shela/readme.md +++ b/keyboards/hhkb/ansi/keymaps/shela/readme.md | |||
diff --git a/keyboards/hhkb/keymaps/shela/rules.mk b/keyboards/hhkb/ansi/keymaps/shela/rules.mk index d0586bda6..d0586bda6 100644 --- a/keyboards/hhkb/keymaps/shela/rules.mk +++ b/keyboards/hhkb/ansi/keymaps/shela/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/smt/keymap.c b/keyboards/hhkb/ansi/keymaps/smt/keymap.c index e1d8bae2e..e1d8bae2e 100644 --- a/keyboards/hhkb/keymaps/smt/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/smt/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c index 68e23b45d..68e23b45d 100644 --- a/keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/tobiasvl_iso/readme.md b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md index 0da9d96ee..0da9d96ee 100644 --- a/keyboards/hhkb/keymaps/tobiasvl_iso/readme.md +++ b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md | |||
diff --git a/keyboards/hhkb/keymaps/tominabox1/.gitignore b/keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore index 4b8c99bfb..4b8c99bfb 100644 --- a/keyboards/hhkb/keymaps/tominabox1/.gitignore +++ b/keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore | |||
diff --git a/keyboards/hhkb/keymaps/tominabox1/keymap.c b/keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c index d7aea9773..d7aea9773 100644 --- a/keyboards/hhkb/keymaps/tominabox1/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c | |||
diff --git a/keyboards/hhkb/ansi/keymaps/via/keymap.c b/keyboards/hhkb/ansi/keymaps/via/keymap.c new file mode 100644 index 000000000..bdbd32898 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/via/keymap.c | |||
@@ -0,0 +1,68 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | |||
4 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
5 | |||
6 | /* BASE Level: Default Layer | ||
7 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
8 | | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | | ||
9 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
10 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | | ||
11 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
12 | | Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | | | ||
13 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
14 | | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | | | ||
15 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
16 | |||
17 | |------+------+-----------------------+------+------| | ||
18 | | LAlt | LGUI | ******* Space ******* | RGUI | RAlt | | ||
19 | |------+------+-----------------------+------+------| | ||
20 | */ | ||
21 | |||
22 | [0] = LAYOUT( // default layer | ||
23 | 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, | ||
24 | 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, | ||
25 | 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, | ||
26 | 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), | ||
27 | KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT | ||
28 | ), | ||
29 | |||
30 | /* Layer HHKB: HHKB mode (HHKB Fn) | ||
31 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
32 | | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | | ||
33 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
34 | | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | | | ||
35 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
36 | | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | | | ||
37 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
38 | | | | | | | | + | - | End | PgD | Dow | | | | | | ||
39 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
40 | |||
41 | |------+------+----------------------+------+------+ | ||
42 | | **** | **** | ******************** | **** | **** | | ||
43 | |------+------+----------------------+------+------+ | ||
44 | |||
45 | */ | ||
46 | |||
47 | [1] = LAYOUT( | ||
48 | 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, | ||
49 | 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, | ||
50 | 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, | ||
51 | 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, | ||
52 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
53 | ), | ||
54 | [2] = LAYOUT( | ||
55 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
56 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
57 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
58 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
59 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
60 | ), | ||
61 | [3] = LAYOUT( | ||
62 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
63 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
64 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
65 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
66 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
67 | ) | ||
68 | }; | ||
diff --git a/keyboards/hhkb/ansi/keymaps/via/rules.mk b/keyboards/hhkb/ansi/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/hhkb/keymaps/xyverz/keymap.c b/keyboards/hhkb/ansi/keymaps/xyverz/keymap.c index eebaede97..eebaede97 100644 --- a/keyboards/hhkb/keymaps/xyverz/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/xyverz/keymap.c | |||
diff --git a/keyboards/hhkb/ansi/matrix.c b/keyboards/hhkb/ansi/matrix.c new file mode 100644 index 000000000..f22e69f6b --- /dev/null +++ b/keyboards/hhkb/ansi/matrix.c | |||
@@ -0,0 +1,211 @@ | |||
1 | /* | ||
2 | Copyright 2011 Jun Wako <wakojun@gmail.com> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | /* | ||
19 | * scan matrix | ||
20 | */ | ||
21 | #include <stdint.h> | ||
22 | #include <stdbool.h> | ||
23 | #include <util/delay.h> | ||
24 | #include "print.h" | ||
25 | #include "debug.h" | ||
26 | #include "util.h" | ||
27 | #include "timer.h" | ||
28 | #include "matrix.h" | ||
29 | #include "hhkb_avr.h" | ||
30 | #include <avr/wdt.h> | ||
31 | #include "suspend.h" | ||
32 | #include "lufa.h" | ||
33 | |||
34 | |||
35 | // matrix power saving | ||
36 | #define MATRIX_POWER_SAVE 10000 | ||
37 | static uint32_t matrix_last_modified = 0; | ||
38 | |||
39 | // matrix state buffer(1:on, 0:off) | ||
40 | static matrix_row_t *matrix; | ||
41 | static matrix_row_t *matrix_prev; | ||
42 | static matrix_row_t _matrix0[MATRIX_ROWS]; | ||
43 | static matrix_row_t _matrix1[MATRIX_ROWS]; | ||
44 | |||
45 | |||
46 | inline | ||
47 | uint8_t matrix_rows(void) | ||
48 | { | ||
49 | return MATRIX_ROWS; | ||
50 | } | ||
51 | |||
52 | inline | ||
53 | uint8_t matrix_cols(void) | ||
54 | { | ||
55 | return MATRIX_COLS; | ||
56 | } | ||
57 | |||
58 | void matrix_init(void) | ||
59 | { | ||
60 | #ifdef DEBUG | ||
61 | debug_enable = true; | ||
62 | debug_keyboard = true; | ||
63 | #endif | ||
64 | |||
65 | KEY_INIT(); | ||
66 | |||
67 | // initialize matrix state: all keys off | ||
68 | for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; | ||
69 | for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00; | ||
70 | matrix = _matrix0; | ||
71 | matrix_prev = _matrix1; | ||
72 | } | ||
73 | |||
74 | __attribute__ ((weak)) | ||
75 | void matrix_scan_user(void) { | ||
76 | } | ||
77 | |||
78 | void matrix_scan_kb(void) { | ||
79 | matrix_scan_user(); | ||
80 | } | ||
81 | |||
82 | uint8_t matrix_scan(void) | ||
83 | { | ||
84 | uint8_t *tmp; | ||
85 | |||
86 | tmp = matrix_prev; | ||
87 | matrix_prev = matrix; | ||
88 | matrix = tmp; | ||
89 | |||
90 | // power on | ||
91 | if (!KEY_POWER_STATE()) KEY_POWER_ON(); | ||
92 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
93 | for (uint8_t col = 0; col < MATRIX_COLS; col++) { | ||
94 | KEY_SELECT(row, col); | ||
95 | _delay_us(5); | ||
96 | |||
97 | // Not sure this is needed. This just emulates HHKB controller's behaviour. | ||
98 | if (matrix_prev[row] & (1<<col)) { | ||
99 | KEY_PREV_ON(); | ||
100 | } | ||
101 | _delay_us(10); | ||
102 | |||
103 | // NOTE: KEY_STATE is valid only in 20us after KEY_ENABLE. | ||
104 | // If V-USB interrupts in this section we could lose 40us or so | ||
105 | // and would read invalid value from KEY_STATE. | ||
106 | uint8_t last = TIMER_RAW; | ||
107 | |||
108 | KEY_ENABLE(); | ||
109 | |||
110 | // Wait for KEY_STATE outputs its value. | ||
111 | // 1us was ok on one HHKB, but not worked on another. | ||
112 | // no wait doesn't work on Teensy++ with pro(1us works) | ||
113 | // no wait does work on tmk PCB(8MHz) with pro2 | ||
114 | // 1us wait does work on both of above | ||
115 | // 1us wait doesn't work on tmk(16MHz) | ||
116 | // 5us wait does work on tmk(16MHz) | ||
117 | // 5us wait does work on tmk(16MHz/2) | ||
118 | // 5us wait does work on tmk(8MHz) | ||
119 | // 10us wait does work on Teensy++ with pro | ||
120 | // 10us wait does work on 328p+iwrap with pro | ||
121 | // 10us wait doesn't work on tmk PCB(8MHz) with pro2(very lagged scan) | ||
122 | _delay_us(5); | ||
123 | |||
124 | if (KEY_STATE()) { | ||
125 | matrix[row] &= ~(1<<col); | ||
126 | } else { | ||
127 | matrix[row] |= (1<<col); | ||
128 | } | ||
129 | |||
130 | // Ignore if this code region execution time elapses more than 20us. | ||
131 | // MEMO: 20[us] * (TIMER_RAW_FREQ / 1000000)[count per us] | ||
132 | // MEMO: then change above using this rule: a/(b/c) = a*1/(b/c) = a*(c/b) | ||
133 | if (TIMER_DIFF_RAW(TIMER_RAW, last) > 20/(1000000/TIMER_RAW_FREQ)) { | ||
134 | matrix[row] = matrix_prev[row]; | ||
135 | } | ||
136 | |||
137 | _delay_us(5); | ||
138 | KEY_PREV_OFF(); | ||
139 | KEY_UNABLE(); | ||
140 | |||
141 | // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. | ||
142 | // This takes 25us or more to make sure KEY_STATE returns to idle state. | ||
143 | |||
144 | _delay_us(75); | ||
145 | |||
146 | } | ||
147 | if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); | ||
148 | } | ||
149 | // power off | ||
150 | if (KEY_POWER_STATE() && | ||
151 | (USB_DeviceState == DEVICE_STATE_Suspended || | ||
152 | USB_DeviceState == DEVICE_STATE_Unattached ) && | ||
153 | timer_elapsed32(matrix_last_modified) > MATRIX_POWER_SAVE) { | ||
154 | KEY_POWER_OFF(); | ||
155 | suspend_power_down(); | ||
156 | } | ||
157 | |||
158 | matrix_scan_quantum(); | ||
159 | |||
160 | return 1; | ||
161 | } | ||
162 | |||
163 | bool matrix_is_modified(void) | ||
164 | { | ||
165 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | ||
166 | if (matrix[i] != matrix_prev[i]) | ||
167 | return true; | ||
168 | } | ||
169 | return false; | ||
170 | } | ||
171 | |||
172 | inline | ||
173 | bool matrix_has_ghost(void) | ||
174 | { | ||
175 | return false; | ||
176 | } | ||
177 | |||
178 | inline | ||
179 | bool matrix_is_on(uint8_t row, uint8_t col) | ||
180 | { | ||
181 | return (matrix[row] & (1<<col)); | ||
182 | } | ||
183 | |||
184 | inline | ||
185 | matrix_row_t matrix_get_row(uint8_t row) | ||
186 | { | ||
187 | return matrix[row]; | ||
188 | } | ||
189 | |||
190 | void matrix_print(void) | ||
191 | { | ||
192 | print("\nr/c 01234567\n"); | ||
193 | for (uint8_t row = 0; row < matrix_rows(); row++) { | ||
194 | xprintf("%02X: %08b\n", row, bitrev(matrix_get_row(row))); | ||
195 | } | ||
196 | } | ||
197 | |||
198 | uint8_t matrix_key_count(void) { | ||
199 | uint8_t count = 0; | ||
200 | for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { | ||
201 | count += bitpop16(matrix_get_row(r)); | ||
202 | } | ||
203 | return count; | ||
204 | } | ||
205 | |||
206 | void matrix_power_up(void) { | ||
207 | KEY_POWER_ON(); | ||
208 | } | ||
209 | void matrix_power_down(void) { | ||
210 | KEY_POWER_OFF(); | ||
211 | } | ||
diff --git a/keyboards/hhkb/ansi/readme.md b/keyboards/hhkb/ansi/readme.md new file mode 100644 index 000000000..495aa4c3f --- /dev/null +++ b/keyboards/hhkb/ansi/readme.md | |||
@@ -0,0 +1,14 @@ | |||
1 | HHKB Alternate Controller | ||
2 | === | ||
3 | |||
4 | An alternative controler for the HHKB designed by hasu. | ||
5 | |||
6 | Keyboard Maintainer: QMK Community | ||
7 | Hardware Supported: HHKB Alternate Controller | ||
8 | Hardware Availability: https://geekhack.org/index.php?topic=12047.0 | ||
9 | |||
10 | Make example for this keyboard (after setting up your build environment): | ||
11 | |||
12 | make hhkb/ansi:default | ||
13 | |||
14 | 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/rules.mk b/keyboards/hhkb/ansi/rules.mk index 68fb51a30..a367ef48d 100644 --- a/keyboards/hhkb/rules.mk +++ b/keyboards/hhkb/ansi/rules.mk | |||
@@ -47,14 +47,14 @@ OPT_DEFS += -DHHKB_RN42_ENABLE | |||
47 | 47 | ||
48 | # Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT | 48 | # Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT |
49 | # HHKB Alt controller. | 49 | # HHKB Alt controller. |
50 | RN42_DIR = rn42 | 50 | RN42_DIR = ../rn42 |
51 | 51 | ||
52 | SRC += serial_uart.c \ | 52 | SRC += serial_uart.c \ |
53 | rn42/suart.S \ | 53 | ../rn42/suart.S \ |
54 | rn42/rn42.c \ | 54 | ../rn42/rn42.c \ |
55 | rn42/rn42_task.c \ | 55 | ../rn42/rn42_task.c \ |
56 | rn42/battery.c \ | 56 | ../rn42/battery.c \ |
57 | rn42/main.c | 57 | ../rn42/main.c |
58 | 58 | ||
59 | VPATH += $(RN42_DIR) | 59 | VPATH += $(RN42_DIR) |
60 | 60 | ||
diff --git a/keyboards/hhkb/hhkb.c b/keyboards/hhkb/hhkb.c deleted file mode 100644 index a9d35123f..000000000 --- a/keyboards/hhkb/hhkb.c +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include "hhkb.h" \ No newline at end of file | ||
diff --git a/keyboards/hhkb/jp/config.h b/keyboards/hhkb/jp/config.h new file mode 100644 index 000000000..01dab6d44 --- /dev/null +++ b/keyboards/hhkb/jp/config.h | |||
@@ -0,0 +1,104 @@ | |||
1 | /* | ||
2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | #include "config_common.h" | ||
21 | |||
22 | /* USB Device descriptor parameter */ | ||
23 | #define VENDOR_ID 0x4848 // HH = happy hacking | ||
24 | #define PRODUCT_ID 0x0002 // HHKB JP | ||
25 | #define DEVICE_VER 0x0104 | ||
26 | #define MANUFACTURER q.m.k | ||
27 | #define PRODUCT HHKB mod | ||
28 | #define DESCRIPTION q.m.k keyboard firmware for HHKB | ||
29 | |||
30 | /* key matrix size */ | ||
31 | #define MATRIX_ROWS 16 | ||
32 | #define MATRIX_COLS 8 | ||
33 | |||
34 | #define TAPPING_TERM 200 | ||
35 | |||
36 | /* number of backlight levels */ | ||
37 | #define BACKLIGHT_LEVELS 3 | ||
38 | |||
39 | /* Set 0 if debouncing isn't needed */ | ||
40 | #define DEBOUNCE 5 | ||
41 | |||
42 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
43 | //#define LOCKING_SUPPORT_ENABLE | ||
44 | /* Locking resynchronize hack */ | ||
45 | //#define LOCKING_RESYNC_ENABLE | ||
46 | |||
47 | #ifdef HHKB_RN42_ENABLE | ||
48 | // rn42 support -- acquired from the tmk repo. This is almost certainly not | ||
49 | // integrated with qmk in the correct way. | ||
50 | |||
51 | #define SUART_OUT_PORT PORTD | ||
52 | #define SUART_OUT_BIT 0 | ||
53 | #define SUART_IN_PIN PIND | ||
54 | #define SUART_IN_BIT 1 | ||
55 | |||
56 | #ifdef __AVR_ATmega32U4__ | ||
57 | /* iom32u4.h has no definition of UCSR1D. copy from iom32u2.h */ | ||
58 | #define UCSR1D _SFR_MEM8(0xCB) | ||
59 | #define RTSEN 0 | ||
60 | #define CTSEN 1 | ||
61 | |||
62 | #define SERIAL_UART_BAUD 115200 | ||
63 | #define SERIAL_UART_DATA UDR1 | ||
64 | #define SERIAL_UART_UBRR ((F_CPU/(16.0*SERIAL_UART_BAUD)-1+0.5)) | ||
65 | #define SERIAL_UART_RXD_VECT USART1_RX_vect | ||
66 | #define SERIAL_UART_TXD_READY (UCSR1A&(1<<UDRE1)) | ||
67 | #define SERIAL_UART_INIT() do { \ | ||
68 | UBRR1L = (uint8_t) SERIAL_UART_UBRR; /* baud rate */ \ | ||
69 | UBRR1H = ((uint16_t)SERIAL_UART_UBRR>>8); /* baud rate */ \ | ||
70 | UCSR1B |= (1<<RXCIE1) | (1<<RXEN1); /* RX interrupt, RX: enable */ \ | ||
71 | UCSR1B |= (0<<TXCIE1) | (1<<TXEN1); /* TX interrupt, TX: enable */ \ | ||
72 | UCSR1C |= (0<<UPM11) | (0<<UPM10); /* parity: none(00), even(01), odd(11) */ \ | ||
73 | UCSR1D |= (0<<RTSEN) | (0<<CTSEN); /* RTS, CTS(no flow control by hardware) */ \ | ||
74 | DDRD |= (1<<5); PORTD &= ~(1<<5); /* RTS for flow control by firmware */ \ | ||
75 | sei(); \ | ||
76 | } while(0) | ||
77 | #define SERIAL_UART_RTS_LO() do { PORTD &= ~(1<<5); } while (0) | ||
78 | #define SERIAL_UART_RTS_HI() do { PORTD |= (1<<5); } while (0) | ||
79 | #else | ||
80 | #error "USART configuration is needed." | ||
81 | #endif | ||
82 | |||
83 | /* power control of key switch board */ | ||
84 | #define HHKB_POWER_SAVING | ||
85 | |||
86 | #endif | ||
87 | |||
88 | /* | ||
89 | * Feature disable options | ||
90 | * These options are also useful to firmware size reduction. | ||
91 | */ | ||
92 | |||
93 | /* disable debug print */ | ||
94 | //#define NO_DEBUG | ||
95 | |||
96 | /* disable print */ | ||
97 | //#define NO_PRINT | ||
98 | |||
99 | /* disable action features */ | ||
100 | //#define NO_ACTION_LAYER | ||
101 | //#define NO_ACTION_TAPPING | ||
102 | //#define NO_ACTION_ONESHOT | ||
103 | //#define NO_ACTION_MACRO | ||
104 | //#define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/hhkb/hhkb_avr.h b/keyboards/hhkb/jp/hhkb_avr.h index 7ea6322c7..a1f825cfb 100644 --- a/keyboards/hhkb/hhkb_avr.h +++ b/keyboards/hhkb/jp/hhkb_avr.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef HHKB_AVR_H | 1 | #pragma once |
2 | #define HHKB_AVR_H | ||
3 | 2 | ||
4 | #include <stdint.h> | 3 | #include <stdint.h> |
5 | #include <stdbool.h> | 4 | #include <stdbool.h> |
@@ -67,11 +66,11 @@ static inline void KEY_INIT(void) | |||
67 | /* key: input with pull-up */ | 66 | /* key: input with pull-up */ |
68 | DDRD &= ~0x80; | 67 | DDRD &= ~0x80; |
69 | PORTD |= 0x80; | 68 | PORTD |= 0x80; |
70 | #ifdef HHKB_JP | 69 | |
71 | /* row extention for HHKB JP */ | 70 | /* row extention for HHKB JP */ |
72 | DDRC |= (1<<6|1<<7); | 71 | DDRC |= (1<<6|1<<7); |
73 | PORTC |= (1<<6|1<<7); | 72 | PORTC |= (1<<6|1<<7); |
74 | #endif | 73 | |
75 | KEY_UNABLE(); | 74 | KEY_UNABLE(); |
76 | KEY_PREV_OFF(); | 75 | KEY_PREV_OFF(); |
77 | 76 | ||
@@ -80,10 +79,10 @@ static inline void KEY_INIT(void) | |||
80 | static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) | 79 | static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) |
81 | { | 80 | { |
82 | PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07); | 81 | PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07); |
83 | #ifdef HHKB_JP | 82 | |
84 | if ((ROW) & 0x08) PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<6); | 83 | if ((ROW) & 0x08) PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<6); |
85 | else PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<7); | 84 | else PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<7); |
86 | #endif | 85 | |
87 | } | 86 | } |
88 | 87 | ||
89 | 88 | ||
@@ -163,5 +162,3 @@ static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) | |||
163 | PORTC &= ~0x0F; \ | 162 | PORTC &= ~0x0F; \ |
164 | } while (0) | 163 | } while (0) |
165 | #endif | 164 | #endif |
166 | |||
167 | #endif | ||
diff --git a/keyboards/hhkb/info.json b/keyboards/hhkb/jp/info.json index 3beaff83d..7594987d9 100644 --- a/keyboards/hhkb/info.json +++ b/keyboards/hhkb/jp/info.json | |||
@@ -1,75 +1,10 @@ | |||
1 | { | 1 | { |
2 | "keyboard_name": "hhkb", | 2 | "keyboard_name": "HHKB JP", |
3 | "url": "", | 3 | "url": "", |
4 | "maintainer": "qmk", | 4 | "maintainer": "qmk", |
5 | "width": 15, | 5 | "width": 15, |
6 | "height": 5, | 6 | "height": 5, |
7 | "layouts": { | 7 | "layouts": { |
8 | "LAYOUT": { | ||
9 | "layout": [ | ||
10 | { "label": "Esc", "x": 0, "y": 0 }, | ||
11 | { "label": "!", "x": 1, "y": 0 }, | ||
12 | { "label": "@", "x": 2, "y": 0 }, | ||
13 | { "label": "#", "x": 3, "y": 0 }, | ||
14 | { "label": "$", "x": 4, "y": 0 }, | ||
15 | { "label": "%", "x": 5, "y": 0 }, | ||
16 | { "label": "^", "x": 6, "y": 0 }, | ||
17 | { "label": "&", "x": 7, "y": 0 }, | ||
18 | { "label": "*", "x": 8, "y": 0 }, | ||
19 | { "label": "(", "x": 9, "y": 0 }, | ||
20 | { "label": ")", "x": 10, "y": 0 }, | ||
21 | { "label": "_", "x": 11, "y": 0 }, | ||
22 | { "label": "+", "x": 12, "y": 0 }, | ||
23 | { "label": "|", "x": 13, "y": 0 }, | ||
24 | { "label": "~", "x": 14, "y": 0 }, | ||
25 | { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, | ||
26 | { "label": "Q", "x": 1.5, "y": 1 }, | ||
27 | { "label": "W", "x": 2.5, "y": 1 }, | ||
28 | { "label": "E", "x": 3.5, "y": 1 }, | ||
29 | { "label": "R", "x": 4.5, "y": 1 }, | ||
30 | { "label": "T", "x": 5.5, "y": 1 }, | ||
31 | { "label": "Y", "x": 6.5, "y": 1 }, | ||
32 | { "label": "U", "x": 7.5, "y": 1 }, | ||
33 | { "label": "I", "x": 8.5, "y": 1 }, | ||
34 | { "label": "O", "x": 9.5, "y": 1 }, | ||
35 | { "label": "P", "x": 10.5, "y": 1 }, | ||
36 | { "label": "{", "x": 11.5, "y": 1 }, | ||
37 | { "label": "}", "x": 12.5, "y": 1 }, | ||
38 | { "label": "Delete", "x": 13.5, "y": 1, "w": 1.5 }, | ||
39 | { "label": "Control", "x": 0, "y": 2, "w": 1.75 }, | ||
40 | { "label": "A", "x": 1.75, "y": 2 }, | ||
41 | { "label": "S", "x": 2.75, "y": 2 }, | ||
42 | { "label": "D", "x": 3.75, "y": 2 }, | ||
43 | { "label": "F", "x": 4.75, "y": 2 }, | ||
44 | { "label": "G", "x": 5.75, "y": 2 }, | ||
45 | { "label": "H", "x": 6.75, "y": 2 }, | ||
46 | { "label": "J", "x": 7.75, "y": 2 }, | ||
47 | { "label": "K", "x": 8.75, "y": 2 }, | ||
48 | { "label": "L", "x": 9.75, "y": 2 }, | ||
49 | { "label": ":", "x": 10.75, "y": 2 }, | ||
50 | { "label": "\"", "x": 11.75, "y": 2 }, | ||
51 | { "label": "Return", "x": 12.75, "y": 2, "w": 2.25 }, | ||
52 | { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, | ||
53 | { "label": "Z", "x": 2.25, "y": 3 }, | ||
54 | { "label": "X", "x": 3.25, "y": 3 }, | ||
55 | { "label": "C", "x": 4.25, "y": 3 }, | ||
56 | { "label": "V", "x": 5.25, "y": 3 }, | ||
57 | { "label": "B", "x": 6.25, "y": 3 }, | ||
58 | { "label": "N", "x": 7.25, "y": 3 }, | ||
59 | { "label": "M", "x": 8.25, "y": 3 }, | ||
60 | { "label": "<", "x": 9.25, "y": 3 }, | ||
61 | { "label": ">", "x": 10.25, "y": 3 }, | ||
62 | { "label": "?", "x": 11.25, "y": 3 }, | ||
63 | { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, | ||
64 | { "label": "Fn", "x": 14, "y": 3 }, | ||
65 | { "label": "", "x": 1.5, "y": 4 }, | ||
66 | { "label": "", "x": 2.5, "y": 4, "w": 1.5 }, | ||
67 | { "x": 4, "y": 4, "w": 6 }, | ||
68 | { "label": "", "x": 10, "y": 4, "w": 1.5 }, | ||
69 | { "label": "", "x": 11.5, "y": 4 } | ||
70 | ] | ||
71 | }, | ||
72 | |||
73 | "LAYOUT_JP": { | 8 | "LAYOUT_JP": { |
74 | "layout": [ | 9 | "layout": [ |
75 | { "label": "Esc", "x": 0, "y": 0 }, | 10 | { "label": "Esc", "x": 0, "y": 0 }, |
diff --git a/keyboards/hhkb/jp/jp.c b/keyboards/hhkb/jp/jp.c new file mode 100644 index 000000000..f1f1388c7 --- /dev/null +++ b/keyboards/hhkb/jp/jp.c | |||
@@ -0,0 +1 @@ | |||
#include "jp.h" \ No newline at end of file | |||
diff --git a/keyboards/hhkb/hhkb.h b/keyboards/hhkb/jp/jp.h index 668f78eec..a95796f25 100644 --- a/keyboards/hhkb/hhkb.h +++ b/keyboards/hhkb/jp/jp.h | |||
@@ -1,28 +1,7 @@ | |||
1 | #ifndef HHKB_H | 1 | #pragma once |
2 | #define HHKB_H | ||
3 | 2 | ||
4 | #include "quantum.h" | 3 | #include "quantum.h" |
5 | 4 | ||
6 | #define LAYOUT( \ | ||
7 | K31, K30, K00, K10, K11, K20, K21, K40, K41, K60, K61, K70, K71, K50, K51, \ | ||
8 | K32, K01, K02, K13, K12, K23, K22, K42, K43, K62, K63, K73, K72, K52, \ | ||
9 | K33, K04, K03, K14, K15, K24, K25, K45, K44, K65, K64, K74, K53, \ | ||
10 | K34, K05, K06, K07, K16, K17, K26, K46, K66, K76, K75, K55, K54, \ | ||
11 | K35, K36, K37, K57, K56) \ | ||
12 | \ | ||
13 | { \ | ||
14 | { K00, K01, K02, K03, K04, K05, K06, K07 }, \ | ||
15 | { K10, K11, K12, K13, K14, K15, K16, K17 }, \ | ||
16 | { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ | ||
17 | { K30, K31, K32, K33, K34, K35, K36, K37 }, \ | ||
18 | { K40, K41, K42, K43, K44, K45, K46, KC_NO }, \ | ||
19 | { K50, K51, K52, K53, K54, K55, K56, K57 }, \ | ||
20 | { K60, K61, K62, K63, K64, K65, K66, KC_NO }, \ | ||
21 | { K70, K71, K72, K73, K74, K75, K76, KC_NO } \ | ||
22 | } | ||
23 | |||
24 | #define LAYOUT_60_hhkb LAYOUT | ||
25 | |||
26 | #define LAYOUT_JP( \ | 5 | #define LAYOUT_JP( \ |
27 | K02, K32, K62, K22, K12, K52, K72, KA2, K92, K82, KB2, KE2, KF2, KD2, KC2, \ | 6 | K02, K32, K62, K22, K12, K52, K72, KA2, K92, K82, KB2, KE2, KF2, KD2, KC2, \ |
28 | K03, K63, K23, K13, K53, K73, KA3, K93, K83, KB3, KE3, KF3, KD3, \ | 7 | K03, K63, K23, K13, K53, K73, KA3, K93, K83, KB3, KE3, KF3, KD3, \ |
@@ -47,6 +26,3 @@ | |||
47 | { KC_NO, KC_NO, KE2, KE3, KE4, KE5, KE6, KC_NO }, \ | 26 | { KC_NO, KC_NO, KE2, KE3, KE4, KE5, KE6, KC_NO }, \ |
48 | { KC_NO, KC_NO, KF2, KF3, KF4, KF5, KF6, KC_NO } \ | 27 | { KC_NO, KC_NO, KF2, KF3, KF4, KF5, KF6, KC_NO } \ |
49 | } | 28 | } |
50 | |||
51 | |||
52 | #endif | ||
diff --git a/keyboards/hhkb/keymaps/bakingpy/keymap.c b/keyboards/hhkb/jp/keymaps/bakingpy/keymap.c index 04d79f924..04d79f924 100644 --- a/keyboards/hhkb/keymaps/bakingpy/keymap.c +++ b/keyboards/hhkb/jp/keymaps/bakingpy/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/bakingpy/rules.mk b/keyboards/hhkb/jp/keymaps/bakingpy/rules.mk index a7f700f01..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/bakingpy/rules.mk +++ b/keyboards/hhkb/jp/keymaps/bakingpy/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/jp/keymap.c b/keyboards/hhkb/jp/keymaps/default/keymap.c index 6fd06638c..6fd06638c 100644 --- a/keyboards/hhkb/keymaps/jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/default/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk b/keyboards/hhkb/jp/keymaps/default/rules.mk index a7f700f01..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk +++ b/keyboards/hhkb/jp/keymaps/default/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/jp_mac/keymap.c b/keyboards/hhkb/jp/keymaps/default_mac/keymap.c index f3ef3d6af..f3ef3d6af 100644 --- a/keyboards/hhkb/keymaps/jp_mac/keymap.c +++ b/keyboards/hhkb/jp/keymaps/default_mac/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/jp/rules.mk b/keyboards/hhkb/jp/keymaps/default_mac/rules.mk index a7f700f01..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/jp/rules.mk +++ b/keyboards/hhkb/jp/keymaps/default_mac/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/krusli/config.h b/keyboards/hhkb/jp/keymaps/dhertz/config.h index af2fb9d8a..af2fb9d8a 100644 --- a/keyboards/hhkb/keymaps/krusli/config.h +++ b/keyboards/hhkb/jp/keymaps/dhertz/config.h | |||
diff --git a/keyboards/hhkb/keymaps/dhertz/keymap.c b/keyboards/hhkb/jp/keymaps/dhertz/keymap.c index 951af069b..951af069b 100644 --- a/keyboards/hhkb/keymaps/dhertz/keymap.c +++ b/keyboards/hhkb/jp/keymaps/dhertz/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/dhertz/keymap.h b/keyboards/hhkb/jp/keymaps/dhertz/keymap.h index dbefc6380..dbefc6380 100644 --- a/keyboards/hhkb/keymaps/dhertz/keymap.h +++ b/keyboards/hhkb/jp/keymaps/dhertz/keymap.h | |||
diff --git a/keyboards/hhkb/keymaps/dhertz/rules.mk b/keyboards/hhkb/jp/keymaps/dhertz/rules.mk index 5656057b4..5656057b4 100644 --- a/keyboards/hhkb/keymaps/dhertz/rules.mk +++ b/keyboards/hhkb/jp/keymaps/dhertz/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/enoch_jp/keymap.c b/keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c index 15dc29773..15dc29773 100644 --- a/keyboards/hhkb/keymaps/enoch_jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/enoch_jp/rules.mk b/keyboards/hhkb/jp/keymaps/enoch_jp/rules.mk index d35c58b77..d35c58b77 100644 --- a/keyboards/hhkb/keymaps/enoch_jp/rules.mk +++ b/keyboards/hhkb/jp/keymaps/enoch_jp/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/README.md b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/README.md index 222ad898e..222ad898e 100644 --- a/keyboards/hhkb/keymaps/halfqwerty_jp/README.md +++ b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/README.md | |||
diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c index 0d4a24c60..0d4a24c60 100644 --- a/keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/jp_mac/rules.mk b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/rules.mk index a7f700f01..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/jp_mac/rules.mk +++ b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/rdg_jp/keymap.c b/keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c index f40df74e8..f40df74e8 100644 --- a/keyboards/hhkb/keymaps/rdg_jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/rdg_jp/rules.mk b/keyboards/hhkb/jp/keymaps/rdg_jp/rules.mk index a7f700f01..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/rdg_jp/rules.mk +++ b/keyboards/hhkb/jp/keymaps/rdg_jp/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/sh_jp/README.md b/keyboards/hhkb/jp/keymaps/sh_jp/README.md index 4f82f2f4e..4f82f2f4e 100644 --- a/keyboards/hhkb/keymaps/sh_jp/README.md +++ b/keyboards/hhkb/jp/keymaps/sh_jp/README.md | |||
diff --git a/keyboards/hhkb/keymaps/sh_jp/keymap.c b/keyboards/hhkb/jp/keymaps/sh_jp/keymap.c index 79515c5a6..79515c5a6 100644 --- a/keyboards/hhkb/keymaps/sh_jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/sh_jp/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/sh_jp/rules.mk b/keyboards/hhkb/jp/keymaps/sh_jp/rules.mk index a7f700f01..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/sh_jp/rules.mk +++ b/keyboards/hhkb/jp/keymaps/sh_jp/rules.mk | |||
diff --git a/keyboards/hhkb/jp/keymaps/via/config.h b/keyboards/hhkb/jp/keymaps/via/config.h new file mode 100644 index 000000000..96c85573d --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/via/config.h | |||
@@ -0,0 +1,2 @@ | |||
1 | // 3 layers or else it will not fit in EEPROM | ||
2 | #define DYNAMIC_KEYMAP_LAYER_COUNT 3 | ||
diff --git a/keyboards/hhkb/jp/keymaps/via/keymap.c b/keyboards/hhkb/jp/keymaps/via/keymap.c new file mode 100644 index 000000000..cb1ba76fb --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/via/keymap.c | |||
@@ -0,0 +1,58 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | /* Layer 0: HHKB JP | ||
4 | * ,-----------------------------------------------------------. | ||
5 | * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| | ||
6 | * |-----------------------------------------------------------| | ||
7 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | ||
8 | * |------------------------------------------------------` Ent| | ||
9 | * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | | ||
10 | * |-----------------------------------------------------------| | ||
11 | * |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| | ||
12 | * |-----------------------------------------------------------| | ||
13 | * | ||Ctl|Alt|Cmd| | Spc |Bsp| | | ||Lft|Dwn|Rgh| | ||
14 | * `-----------------------------------------------------------' | ||
15 | */ | ||
16 | |||
17 | /* Layer 1: HHKB mode (HHKB Fn) | ||
18 | * ,-----------------------------------------------------------. | ||
19 | * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| | ||
20 | * |-----------------------------------------------------------| | ||
21 | * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | | ||
22 | * |------------------------------------------------------` | | ||
23 | * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | | ||
24 | * |-----------------------------------------------------------| | ||
25 | * | | | | | | | +| -|End|PgD|Dow| | | | | ||
26 | * |-----------------------------------------------------------| | ||
27 | * | || | | | | | | | | || | | | | ||
28 | * `-----------------------------------------------------------' | ||
29 | */ | ||
30 | |||
31 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
32 | [0] = LAYOUT_JP( | ||
33 | 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_JYEN, KC_BSPC, | ||
34 | 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, | ||
35 | 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_BSLS, KC_ENT, | ||
36 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, | ||
37 | MO(1), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_KANA, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), | ||
38 | |||
39 | [1] = LAYOUT_JP( | ||
40 | 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, | ||
41 | KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, | ||
42 | _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, | ||
43 | _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, | ||
44 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
45 | ), | ||
46 | [2] = LAYOUT_JP( | ||
47 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
48 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
49 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
51 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
52 | ) | ||
53 | }; | ||
54 | |||
55 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) | ||
56 | { | ||
57 | return MACRO_NONE; | ||
58 | } | ||
diff --git a/keyboards/hhkb/jp/keymaps/via/rules.mk b/keyboards/hhkb/jp/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/hhkb/matrix.c b/keyboards/hhkb/jp/matrix.c index 666b6f595..437356af6 100644 --- a/keyboards/hhkb/matrix.c +++ b/keyboards/hhkb/jp/matrix.c | |||
@@ -140,13 +140,10 @@ uint8_t matrix_scan(void) | |||
140 | 140 | ||
141 | // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. | 141 | // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. |
142 | // This takes 25us or more to make sure KEY_STATE returns to idle state. | 142 | // This takes 25us or more to make sure KEY_STATE returns to idle state. |
143 | #ifdef HHKB_JP | 143 | |
144 | // Looks like JP needs faster scan due to its twice larger matrix | 144 | // Looks like JP needs faster scan due to its twice larger matrix |
145 | // or it can drop keys in fast key typing | 145 | // or it can drop keys in fast key typing |
146 | _delay_us(30); | 146 | _delay_us(30); |
147 | #else | ||
148 | _delay_us(75); | ||
149 | #endif | ||
150 | } | 147 | } |
151 | if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); | 148 | if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); |
152 | } | 149 | } |
diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/jp/readme.md index 57eb81439..41c1d2214 100644 --- a/keyboards/hhkb/readme.md +++ b/keyboards/hhkb/jp/readme.md | |||
@@ -9,6 +9,6 @@ Hardware Availability: https://geekhack.org/index.php?topic=12047.0 | |||
9 | 9 | ||
10 | Make example for this keyboard (after setting up your build environment): | 10 | Make example for this keyboard (after setting up your build environment): |
11 | 11 | ||
12 | make hhkb:default | 12 | make hhkb/jp:default |
13 | 13 | ||
14 | 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. | 14 | 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/jp/rules.mk b/keyboards/hhkb/jp/rules.mk new file mode 100644 index 000000000..774b444c5 --- /dev/null +++ b/keyboards/hhkb/jp/rules.mk | |||
@@ -0,0 +1,69 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | # Teensy halfkay | ||
6 | # Pro Micro caterina | ||
7 | # Atmel DFU atmel-dfu | ||
8 | # LUFA DFU lufa-dfu | ||
9 | # QMK DFU qmk-dfu | ||
10 | # ATmega32A bootloadHID | ||
11 | # ATmega328P USBasp | ||
12 | BOOTLOADER = atmel-dfu | ||
13 | |||
14 | # Build Options | ||
15 | # comment out to disable the options. | ||
16 | # | ||
17 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration | ||
18 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
19 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
20 | CONSOLE_ENABLE = yes # Console for debug | ||
21 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
22 | CUSTOM_MATRIX = yes # Custom matrix file for the HHKB | ||
23 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
24 | # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | ||
25 | # NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
26 | # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
27 | # MIDI_ENABLE = yes # MIDI controls | ||
28 | # UNICODE_ENABLE = yes # Unicode | ||
29 | # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID | ||
30 | |||
31 | |||
32 | # HHKB_RN42_ENABLE = yes # Enable support for hasu's BT alt controller -- code borrowed from tmk source tree. | ||
33 | |||
34 | # Either uncomment the HHKB_RN42_ENABLE line above, or run make enabling the | ||
35 | # feature. Be sure to clean any existing build before trying to enable rn42 | ||
36 | # support. For example: | ||
37 | # | ||
38 | # make hhkb-keymap-clean | ||
39 | # make hhkb-keymap-dfu HHKB_RN42_ENABLE=yes | ||
40 | |||
41 | # project specific files | ||
42 | SRC = matrix.c | ||
43 | |||
44 | ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) | ||
45 | |||
46 | OPT_DEFS += -DHHKB_RN42_ENABLE | ||
47 | |||
48 | # Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT | ||
49 | # HHKB Alt controller. | ||
50 | RN42_DIR = ../rn42 | ||
51 | |||
52 | SRC += serial_uart.c \ | ||
53 | ../rn42/suart.S \ | ||
54 | ../rn42/rn42.c \ | ||
55 | ../rn42/rn42_task.c \ | ||
56 | ../rn42/battery.c \ | ||
57 | ../rn42/main.c | ||
58 | |||
59 | VPATH += $(RN42_DIR) | ||
60 | |||
61 | endif | ||
62 | |||
63 | |||
64 | # debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION | ||
65 | # debug-on: all | ||
66 | |||
67 | # debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT | ||
68 | # debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) | ||
69 | # debug-off: all | ||