TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, \
LCTL,A, S, D, F, G, H, J, K, L, FN3, QUOT,FN4, \
FN5,Z, X, C, V, B, N, M, COMM,DOT, FN2, RSFT,FN1, \
- LGUI,LALT, FN6, RALT,FN7),
+ LGUI,LALT, FN6, RALT,NO),
/* Layer 1: HHKB mode (HHKB Fn)
* ,-----------------------------------------------------------.
* ,-----------------------------------------------------------.
* |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|
* |-----------------------------------------------------------|
- * |Tab | | | | | |MwL|MwD|MwU|MwR| | | |Backs|
+ * |Tab | | | | | |MwL|MwD|MwU|MwR| |Wbk|Wfr|Close|
* |-----------------------------------------------------------|
* |Contro| | | | | |McL|McD|McU|McR|Fn0| |Return |
* |-----------------------------------------------------------|
* Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel
*/
KEYMAP(ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \
- TAB, NO, NO, NO, NO, NO, WH_L,WH_D,WH_U,WH_R,NO, NO, NO, BSPC, \
+ TAB, NO, NO, NO, NO, NO, WH_L,WH_D,WH_U,WH_R,WSTP,WBAK,WFWD,FN8, \
LCTL,NO, ACL0,ACL1,ACL2,NO, MS_L,MS_D,MS_U,MS_R,NO, NO, ENT, \
LSFT,NO, NO, NO, NO, BTN3,BTN2,BTN1,BTN4,BTN5,NO, RSFT,NO, \
LGUI,LALT, TRNS, RALT,RGUI),
[5] = ACTION_MODS_ONESHOT(MOD_LSFT), // Oneshot Shift*
[6] = ACTION_LAYER_TAP_KEY(5, KC_SPC), // Mousekey layer with Space
[7] = ACTION_LAYER_TOGGLE(3), // Mousekey layer(toggle)
+ [8] = ACTION_MODS_KEY(MOD_LCTL, KC_W), // Close Tab
// [8] = ACTION_LMOD_TAP_KEY(KC_LCTL, KC_BSPC), // LControl with tap Backspace
// [9] = ACTION_LMOD_TAP_KEY(KC_LCTL, KC_ESC), // LControl with tap Esc
# error "Timer resolution(>20us) is not enough for HHKB matrix scan tweak on V-USB."
#endif
-#if (MATRIX_COLS > 16)
-# error "MATRIX_COLS must not exceed 16"
-#endif
-#if (MATRIX_ROWS > 255)
-# error "MATRIX_ROWS must not exceed 255"
-#endif
-
// matrix state buffer(1:on, 0:off)
static matrix_row_t *matrix;
}
inline
-#if (MATRIX_COLS <= 8)
-uint8_t matrix_get_row(uint8_t row)
-#else
-uint16_t matrix_get_row(uint8_t row)
-#endif
+matrix_row_t matrix_get_row(uint8_t row)
{
return matrix[row];
}
void matrix_print(void)
{
-#if (MATRIX_COLS <= 8)
print("\nr/c 01234567\n");
-#else
- print("\nr/c 0123456789ABCDEF\n");
-#endif
for (uint8_t row = 0; row < matrix_rows(); row++) {
- phex(row); print(": ");
-#if (MATRIX_COLS <= 8)
- pbin_reverse(matrix_get_row(row));
-#else
- pbin_reverse16(matrix_get_row(row));
-#endif
- print("\n");
- }
-}
-
-uint8_t matrix_key_count(void)
-{
- uint8_t count = 0;
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
-#if (MATRIX_COLS <= 8)
- count += bitpop(matrix[i]);
-#else
- count += bitpop16(matrix[i]);
-#endif
+ xprintf("%02X: %08b\n", row, bitrev(matrix_get_row(row)));
}
- return count;
}