]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/bigseries/keymaps/dudeofawesome/keymap.c
Merge branch 'master' of github.com:qmk/qmk_firmware into hf/shinydox
[qmk_firmware.git] / keyboards / bigseries / keymaps / dudeofawesome / keymap.c
1 /*
2 Copyright 2018 Cole Markham
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 #include QMK_KEYBOARD_H
19
20 enum TAP_DANCE {
21   TD_PLAY = 0,
22 };
23
24 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25   LAYOUT(TD(TD_PLAY)),
26 };
27
28 void tap_dance (qk_tap_dance_state_t *state, void *user_data) {
29   switch (state->count) {
30     case 0 ... 1:
31       register_code(KC_MEDIA_PLAY_PAUSE);
32       unregister_code(KC_MEDIA_PLAY_PAUSE);
33       break;
34     case 2:
35       register_code(KC_MEDIA_NEXT_TRACK);
36       unregister_code(KC_MEDIA_NEXT_TRACK);
37       break;
38     case 3:
39       rgblight_step();
40       break;
41     case 4: default:
42       rgblight_step_reverse();
43       break;
44   }
45 }
46
47 //Tap Dance Definitions
48 qk_tap_dance_action_t tap_dance_actions[] = {
49   [TD_PLAY] = ACTION_TAP_DANCE_FN(tap_dance),
50 };