diff options
author | tmk <nobody@nowhere> | 2013-02-25 15:48:34 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-02-25 16:14:44 +0900 |
commit | 6778324de2f8cbdf4eeada7b2be05937dc833e9b (patch) | |
tree | ae877150ec20baa72995163427838ff4067fb1ff /converter/pc98_usb/keymap.c | |
parent | 23c32d304bcc5146a575e547bba80ee8d86a2856 (diff) |
Fix keymap MACRO of pc98 adn hhkb
Diffstat (limited to 'converter/pc98_usb/keymap.c')
-rw-r--r-- | converter/pc98_usb/keymap.c | 64 |
1 files changed, 58 insertions, 6 deletions
diff --git a/converter/pc98_usb/keymap.c b/converter/pc98_usb/keymap.c index 6bc549b05c..f793539dfd 100644 --- a/converter/pc98_usb/keymap.c +++ b/converter/pc98_usb/keymap.c @@ -64,10 +64,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_##K5A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \ { KC_##K68, KC_##K69, KC_##K6A, KC_##K6B, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_##K70, KC_NO, KC_NO, KC_##K73, KC_##K74, KC_NO, KC_NO, KC_NO }, \ + { KC_##K70, KC_##K71, KC_NO, KC_##K73, KC_##K74, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ } @@ -91,11 +91,11 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { `-----------------------------------------------' */ KEYMAP( - CANCEL,COPY, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, - ESC, 1, 2, 3, 4, 5, NO, NO, 6, 7, 8, 9, 0, BSPC, + CANCEL,COPY, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, FN6, + ESC, 1, 2, 3, 4, 5, FN4, FN5, 6, 7, 8, 9, 0, BSPC, TAB, Q, W, E, R, T, UP, Y, U, I, O, P, ENT, LCTL, A, S, D, F, G, MINS, EQL, H, J, K, L, FN2, - LSFT, Z, X, C, V, B, INS, DOWN, DEL, N, M,COMM, DOT, FN1, + LSFT, Z, X, C, V, B, GRV, BSLS, QUOT, N, M,COMM, DOT, FN1, LGUI, LALT, LCTL, LSFT, SPC, SPC, RALT ), KEYMAP( @@ -115,18 +115,70 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LGUI, LALT, LCTL, LSFT, SPC, SPC, RALT ), }; - static const uint8_t PROGMEM overlays[][MATRIX_ROWS][MATRIX_COLS] = {}; +/* + * Macro definition + */ +enum macro_id { + LBRACKET, + RBRACKET, + DUMMY, +}; + +const prog_macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + keyevent_t event = record->event; + //uint8_t tap_count = record->tap_count; + + switch (id) { + case LBRACKET: + return (event.pressed ? + MACRO( T(LBRC), END ) : + MACRO( T(LBRC), END ) ); + case RBRACKET: + return (event.pressed ? + MACRO( T(RBRC), END ) : + MACRO( T(RBRC), END ) ); + } + return MACRO_NONE; +} + +/* + * Action function + */ +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) +{ +/* + keyevent_t event = record->event; + uint8_t tap_count = record->tap_count; + switch (id) { + case 0xFF: + action_macro_play(get_macro(opt, event.pressed)); + break; + } +*/ +} + + +/* + * Fn actions + */ static const uint16_t PROGMEM fn_actions[] = { ACTION_KEYMAP_TAP_TOGGLE(0), // FN0 ACTION_KEYMAP_TAP_KEY(1, KC_SLASH), // FN1 ACTION_KEYMAP_TAP_KEY(2, KC_SCLN), // FN2 ACTION_KEYMAP(2), // FN3 + ACTION_MACRO(LBRACKET), // FN4 + ACTION_MACRO(RBRACKET), // FN5 + ACTION_MACRO(DUMMY), // FN6 }; + + + /* * No need to edit. */ |