diff options
| author | Weiyi Lou <cinaeco@gmail.com> | 2017-04-29 22:05:31 +1000 |
|---|---|---|
| committer | Weiyi Lou <cinaeco@gmail.com> | 2017-04-30 19:30:39 +1000 |
| commit | 1201d4910fd7346ac27937e46071e09ec352f87f (patch) | |
| tree | e568fcaa5433b1f3d27f703cb0ce53c0b572bf76 | |
| parent | 4ff40a551a310e9b29a5838f87a9db58c0e5767e (diff) | |
| download | qmk_firmware-1201d4910fd7346ac27937e46071e09ec352f87f.tar.gz qmk_firmware-1201d4910fd7346ac27937e46071e09ec352f87f.zip | |
Add cinaeco hhkb keymap
| -rw-r--r-- | keyboards/hhkb/keymaps/cinaeco/Makefile | 23 | ||||
| -rw-r--r-- | keyboards/hhkb/keymaps/cinaeco/README.md | 23 | ||||
| -rw-r--r-- | keyboards/hhkb/keymaps/cinaeco/config.h | 20 | ||||
| -rw-r--r-- | keyboards/hhkb/keymaps/cinaeco/keymap.c | 186 |
4 files changed, 252 insertions, 0 deletions
diff --git a/keyboards/hhkb/keymaps/cinaeco/Makefile b/keyboards/hhkb/keymaps/cinaeco/Makefile new file mode 100644 index 000000000..05b724051 --- /dev/null +++ b/keyboards/hhkb/keymaps/cinaeco/Makefile | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # cinaeco's HHKB firmware | ||
| 2 | |||
| 3 | # Build Options | ||
| 4 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 5 | # the appropriate keymap folder that will get included automatically | ||
| 6 | # | ||
| 7 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 8 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 9 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 10 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 11 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 12 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 13 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 14 | MIDI_ENABLE = no # MIDI controls | ||
| 15 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 16 | UNICODE_ENABLE = no # Unicode | ||
| 17 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 18 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 19 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 20 | |||
| 21 | ifndef QUANTUM_DIR | ||
| 22 | include ../../../../Makefile | ||
| 23 | endif | ||
diff --git a/keyboards/hhkb/keymaps/cinaeco/README.md b/keyboards/hhkb/keymaps/cinaeco/README.md new file mode 100644 index 000000000..c1c48e609 --- /dev/null +++ b/keyboards/hhkb/keymaps/cinaeco/README.md | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # QMK Keyboard Firmware for HHKB | ||
| 2 | |||
| 3 | ## Modifications | ||
| 4 | |||
| 5 | ### HHKB Fn Layer | ||
| 6 | |||
| 7 | Added some Media keys. | ||
| 8 | |||
| 9 | ### Utility Layer (SpaceFN) | ||
| 10 | |||
| 11 | Hold `Space` for: | ||
| 12 | |||
| 13 | - Vi-style direction keys. | ||
| 14 | - WASD-style mouse keys. | ||
| 15 | - Dynamic macro playback on `1` and `2`. | ||
| 16 | - Qwerty/Colemak/Dvorak layout selection on `-`, `=` and `\ ` | ||
| 17 | |||
| 18 | ### Dynamic Macros | ||
| 19 | |||
| 20 | Hold `q` and press: | ||
| 21 | |||
| 22 | - `1` or `2` to record macro 1 or 2. | ||
| 23 | - `s` to stop recording. | ||
diff --git a/keyboards/hhkb/keymaps/cinaeco/config.h b/keyboards/hhkb/keymaps/cinaeco/config.h new file mode 100644 index 000000000..c7b4c784c --- /dev/null +++ b/keyboards/hhkb/keymaps/cinaeco/config.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #ifndef CONFIG_CINAECO_H | ||
| 2 | #define CONFIG_CINAECO_H | ||
| 3 | |||
| 4 | #include "../../config.h" | ||
| 5 | |||
| 6 | #undef MANUFACTURER | ||
| 7 | #undef PRODUCT | ||
| 8 | #undef DESCRIPTION | ||
| 9 | #define MANUFACTURER QMK | ||
| 10 | #define PRODUCT HHKB QMK cinaeco | ||
| 11 | #define DESCRIPTION HHKB on QMK Firmware with cinaeco keymap | ||
| 12 | |||
| 13 | // Increase "Tap" detection window. Avoid missing 'q' or 'z' when typing slowly. | ||
| 14 | #undef TAPPING_TERM | ||
| 15 | #define TAPPING_TERM 230 | ||
| 16 | |||
| 17 | // Uncomment to enable NKRO by default. May cause issues with KVM switches. | ||
| 18 | //#define FORCE_NKRO | ||
| 19 | |||
| 20 | #endif | ||
diff --git a/keyboards/hhkb/keymaps/cinaeco/keymap.c b/keyboards/hhkb/keymaps/cinaeco/keymap.c new file mode 100644 index 000000000..0b204600d --- /dev/null +++ b/keyboards/hhkb/keymaps/cinaeco/keymap.c | |||
| @@ -0,0 +1,186 @@ | |||
| 1 | /* -*- eval: (turn-on-orgtbl); -*- | ||
| 2 | * cinaeco's HHKB Layout | ||
| 3 | */ | ||
| 4 | #include "hhkb.h" | ||
| 5 | |||
| 6 | // Layers. | ||
| 7 | #define QWER 0 | ||
| 8 | #define COLE 1 | ||
| 9 | #define DVOR 2 | ||
| 10 | #define HHKB 3 | ||
| 11 | #define UTIL 4 | ||
| 12 | #define MREC 5 | ||
| 13 | |||
| 14 | // Easier-to-read Layer Arrays. | ||
| 15 | #define ____ KC_TRNS | ||
| 16 | |||
| 17 | enum hhkb_keycodes { | ||
| 18 | DYNAMIC_MACRO_RANGE = SAFE_RANGE, | ||
| 19 | }; | ||
| 20 | |||
| 21 | #include "dynamic_macro.h" | ||
| 22 | |||
| 23 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 24 | |||
| 25 | |||
| 26 | /* QWER Layer: Qwerty Default | ||
| 27 | * | ||
| 28 | * ,--------------------------------------------------------------. | ||
| 29 | * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| | ||
| 30 | * |--------------------------------------------------------------| | ||
| 31 | * |Tab |Q/MREC| W| E| R| T| Y| U| I| O| P| [| ]|Backs| | ||
| 32 | * |--------------------------------------------------------------| | ||
| 33 | * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Ent/Ctrl| | ||
| 34 | * |--------------------------------------------------------------| | ||
| 35 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| | ||
| 36 | * `--------------------------------------------------------------' | ||
| 37 | * |Alt|Gui | Space/UTIL |Gui |Alt| | ||
| 38 | * `-------------------------------------------' | ||
| 39 | * | ||
| 40 | */ | ||
| 41 | |||
| 42 | [QWER] = KEYMAP( | ||
| 43 | 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, \ | ||
| 44 | 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, \ | ||
| 45 | 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), \ | ||
| 46 | 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), \ | ||
| 47 | KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), | ||
| 48 | |||
| 49 | |||
| 50 | /* COLE Layer: Colemak | ||
| 51 | * | ||
| 52 | * ,--------------------------------------------------------------. | ||
| 53 | * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| | ||
| 54 | * |--------------------------------------------------------------| | ||
| 55 | * |Tab |Q/MREC| W| F| P| G| J| L| U| Y| ;| [| ]|Backs| | ||
| 56 | * |--------------------------------------------------------------| | ||
| 57 | * |Ctrl | A| R| S| T| D| H| N| E| I| O| '|Ent/Ctrl| | ||
| 58 | * |--------------------------------------------------------------| | ||
| 59 | * |Shift | Z| X| C| V| K| B| M| ,| .| /|Shift |Fn0| | ||
| 60 | * `--------------------------------------------------------------' | ||
| 61 | * |Alt|Gui | Space/UTIL |Gui |Alt| | ||
| 62 | * `-------------------------------------------' | ||
| 63 | * | ||
| 64 | */ | ||
| 65 | |||
| 66 | [COLE] = KEYMAP( | ||
| 67 | 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, \ | ||
| 68 | 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, \ | ||
| 69 | 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), \ | ||
| 70 | 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), \ | ||
| 71 | KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), | ||
| 72 | |||
| 73 | |||
| 74 | /* DVOR Layer: Dvorak | ||
| 75 | * | ||
| 76 | * ,--------------------------------------------------------------. | ||
| 77 | * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| | ||
| 78 | * |--------------------------------------------------------------| | ||
| 79 | * |Tab |'/MREC| ,| .| P| Y| F| G| C| R| L| /| =|Backs| | ||
| 80 | * |--------------------------------------------------------------| | ||
| 81 | * |Ctrl | A| O| E| U| I| D| H| T| N| S| -|Ent/Ctrl| | ||
| 82 | * |--------------------------------------------------------------| | ||
| 83 | * |Shift | ;| Q| J| K| X| B| M| W| V| Z|Shift |Fn0| | ||
| 84 | * `--------------------------------------------------------------' | ||
| 85 | * |Alt|Gui | Space/UTIL |Gui |Alt| | ||
| 86 | * `-------------------------------------------' | ||
| 87 | * | ||
| 88 | */ | ||
| 89 | |||
| 90 | [DVOR] = KEYMAP( | ||
| 91 | 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, \ | ||
| 92 | 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, \ | ||
| 93 | 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), \ | ||
| 94 | 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), \ | ||
| 95 | KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), | ||
| 96 | |||
| 97 | |||
| 98 | /* HHKB Layer: HHKB mode (HHKB Fn) | ||
| 99 | * | ||
| 100 | * ,-----------------------------------------------------------. | ||
| 101 | * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| | ||
| 102 | * |-----------------------------------------------------------| | ||
| 103 | * |Caps |PLA|PRV|NXT| | | | |Psc|Slk|Pus|Up | |Backs| | ||
| 104 | * |-----------------------------------------------------------| | ||
| 105 | * | |VoD|VoU|Mut|Ejc| | *| /|Hom|PgU|Lef|Rig|Enter | | ||
| 106 | * |-----------------------------------------------------------| | ||
| 107 | * | | | | | | | +| -|End|PgD|Dow| | | | ||
| 108 | * `-----------------------------------------------------------' | ||
| 109 | * | | | |STOP | | | ||
| 110 | * `-------------------------------------------' | ||
| 111 | */ | ||
| 112 | |||
| 113 | [HHKB] = KEYMAP( | ||
| 114 | 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, \ | ||
| 115 | KC_CAPS, KC_MPLY, KC_MPRV, KC_MNXT, ____, ____, ____, ____, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ____, KC_BSPC, \ | ||
| 116 | ____, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, ____, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \ | ||
| 117 | ____, ____, ____, ____, ____, ____, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ____, ____, \ | ||
| 118 | ____, ____, ____, KC_MSTP, ____), | ||
| 119 | |||
| 120 | |||
| 121 | /* UTIL Layer: Extra utilities | ||
| 122 | * | ||
| 123 | * ,-------------------------------------------------------------. | ||
| 124 | * |DFU|PLY1|PLY2| | | | | | | | |QWE|COL|DVO|DBG| | ||
| 125 | * |-------------------------------------------------------------| | ||
| 126 | * | |MLB |M-Up|MRB|MwU| |Hom|PgD|PgU|End| | | | | | ||
| 127 | * |-------------------------------------------------------------| | ||
| 128 | * | |M-Lt|M-Dn|M-R|MwD| |LEF|DOW|UP |RIG| | | | | ||
| 129 | * |-------------------------------------------------------------| | ||
| 130 | * | | | | | |SPC| | | | | | | | | ||
| 131 | * `-------------------------------------------------------------' | ||
| 132 | * | | | | | | | ||
| 133 | * `-------------------------------------------' | ||
| 134 | * | ||
| 135 | */ | ||
| 136 | |||
| 137 | [UTIL] = KEYMAP( | ||
| 138 | RESET, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, ____, ____, ____, ____, ____, ____, ____, ____, DF(QWER), DF(COLE), DF(DVOR), DEBUG, \ | ||
| 139 | ____, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, ____, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ____, ____, ____, ____, \ | ||
| 140 | ____, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ____, ____, ____, \ | ||
| 141 | ____, ____, ____, ____, ____, KC_SPC, ____, ____, ____, ____, ____, ____, ____, \ | ||
| 142 | ____, ____, ____, ____, ____), | ||
| 143 | |||
| 144 | |||
| 145 | /* MREC Layer: Record macros with `q` | ||
| 146 | * | ||
| 147 | * ,-------------------------------------------------------------. | ||
| 148 | * | |REC1|REC2| | | | | | | | | | | | | | ||
| 149 | * |-------------------------------------------------------------| | ||
| 150 | * | | | | | | | | | | | | | | | | ||
| 151 | * |-------------------------------------------------------------| | ||
| 152 | * | | |RSTP| | | | | | | | | | | | ||
| 153 | * |-------------------------------------------------------------| | ||
| 154 | * | | | | | | | | | | | | | | | ||
| 155 | * `-------------------------------------------------------------' | ||
| 156 | * | | | | | | | ||
| 157 | * `-------------------------------------------' | ||
| 158 | * | ||
| 159 | */ | ||
| 160 | |||
| 161 | [MREC] = KEYMAP( | ||
| 162 | ____, DYN_REC_START1, DYN_REC_START2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ | ||
| 163 | ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ | ||
| 164 | ____, ____, DYN_REC_STOP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ | ||
| 165 | ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ | ||
| 166 | ____, ____, ____, ____, ____) | ||
| 167 | |||
| 168 | }; | ||
| 169 | |||
| 170 | |||
| 171 | |||
| 172 | const uint16_t PROGMEM fn_actions[] = { | ||
| 173 | |||
| 174 | }; | ||
| 175 | |||
| 176 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | ||
| 177 | return MACRO_NONE; | ||
| 178 | }; | ||
| 179 | |||
| 180 | // For Dynamic Macros. | ||
| 181 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 182 | if (!process_record_dynamic_macro(keycode, record)) { | ||
| 183 | return false; | ||
| 184 | } | ||
| 185 | return true; | ||
| 186 | } | ||
