diff options
author | tmk <nobody@nowhere> | 2013-07-23 07:54:14 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-07-23 07:56:28 +0900 |
commit | 5b425731c5b662d107ba0f970a7ae7c7fe97d01b (patch) | |
tree | 25c8f53490930e4e70638211cec159f86e4018d5 /keyboard/hhkb | |
parent | 25aec56c082936a463d609357a04332c97c9940b (diff) | |
parent | 6aaa6e0ef9aa1e464b67723fd4cdd0d63b2c861d (diff) | |
download | qmk_firmware-5b425731c5b662d107ba0f970a7ae7c7fe97d01b.tar.gz qmk_firmware-5b425731c5b662d107ba0f970a7ae7c7fe97d01b.zip |
Merge branch 'macro_mediakey'(Fix issue #42)
Diffstat (limited to 'keyboard/hhkb')
-rw-r--r-- | keyboard/hhkb/keymap.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/keyboard/hhkb/keymap.c b/keyboard/hhkb/keymap.c index 265fb87290..faa62dd7e1 100644 --- a/keyboard/hhkb/keymap.c +++ b/keyboard/hhkb/keymap.c @@ -67,7 +67,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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,NO), + LGUI,LALT, FN6, RALT,RGUI), /* Layer 1: HHKB mode (HHKB Fn) * ,-----------------------------------------------------------. @@ -179,6 +179,7 @@ enum macro_id { LSHIFT_PAREN, RSHIFT_PAREN, HELLO, + VOLUP, }; @@ -203,6 +204,7 @@ static const uint16_t PROGMEM fn_actions[] = { // [13] = ACTION_MACRO_TAP(LSHIFT_PAREN), // Macro: LShift with tap '(' // [14] = ACTION_MACRO_TAP(RSHIFT_PAREN), // Macro: RShift with tap ')' // [15] = ACTION_MACRO(HELLO), // Macro: say hello +// [9] = ACTION_MACRO(VOLUP), // Macro: media key }; @@ -218,23 +220,27 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case LSHIFT_PAREN: if (tap.count > 0 && !tap.interrupted) { return (event.pressed ? - MACRO( MD(LSHIFT), D(9), U(9), MU(LSHIFT), END ) : MACRO_NONE); + MACRO( D(LSHIFT), D(9), U(9), U(LSHIFT), END ) : MACRO_NONE); } else { return (event.pressed ? - MACRO( MD(LSHIFT), END ) : MACRO( MU(LSHIFT), END ) ); + MACRO( D(LSHIFT), END ) : MACRO( U(LSHIFT), END ) ); } case RSHIFT_PAREN: if (tap.count > 0 && !tap.interrupted) { return (event.pressed ? - MACRO( MD(RSHIFT), D(0), U(0), MU(RSHIFT), END ) : MACRO_NONE); + MACRO( D(RSHIFT), D(0), U(0), U(RSHIFT), END ) : MACRO_NONE); } else { return (event.pressed ? - MACRO( MD(RSHIFT), END ) : MACRO( MU(RSHIFT), END ) ); + MACRO( D(RSHIFT), END ) : MACRO( U(RSHIFT), END ) ); } case HELLO: return (event.pressed ? MACRO( I(0), T(H), T(E), T(L), T(L), W(255), T(O), END ) : MACRO_NONE ); + case VOLUP: + return (event.pressed ? + MACRO( D(VOLU), U(VOLU), END ) : + MACRO_NONE ); } return MACRO_NONE; } |