]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/honeycomb/keymaps/default/keymap.c
dd Honeycomb macropad (#5000)
[qmk_firmware.git] / keyboards / honeycomb / keymaps / default / keymap.c
1 #include QMK_KEYBOARD_H
2
3 // Each layer gets a name for readability, which is then used in the keymap matrix below.
4 // The underscores don't mean anything - you can have a layer called STUFF or any other name.
5 // Layer names don't all need to be of the same length, obviously, and you can also skip them
6 // entirely and just use numbers.
7 enum honeycomb_layers {
8         _BS,
9         _EN
10 };
11
12 // Macro definitions for readability
13 enum honeycomb_keycodes {
14         HW = SAFE_RANGE,
15         COPY,
16         PASTA
17 };
18
19 extern int8_t encoderValue;
20
21 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
22         [_BS] = LAYOUT( /* Base layout, put whatever defaults. */
23                 HW,      COPY,    PASTA,   KC_MUTE,
24                 KC_4,    KC_5,    KC_6,    KC_7,
25     KC_8,    KC_9,    KC_A,    KC_B,
26                 KC_C,    KC_D,    KC_E,    KC_F
27         ),
28
29         [_EN] = LAYOUT( /* Alternate layer */
30                 _______, _______, _______, _______,
31                 _______, _______, _______, _______,
32                 _______, _______, _______, _______,
33                 _______, _______, _______, _______
34         )
35 };
36
37 report_mouse_t currentReport = {};
38
39 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
40         //uint8_t layer = biton32(layer_state);  // get the current layer
41
42         // Basic example functions
43         switch (keycode) {
44                 case HW:
45                         if (record->event.pressed) {
46                                         SEND_STRING("Hello, world!");
47                                 } else {
48                                         SEND_STRING("Goodbye, cruel world!");
49                                 }
50                         break;
51                         case COPY:
52                                 if (record->event.pressed) {
53                                         tap_code16(LCTL(KC_C)); // Replace with tap_code16(LCMD(KC_C)) to enable for Mac
54                                 }
55                         break;
56                         case PASTA:
57                                 if (record->event.pressed) {
58                                         tap_code16(LCTL(KC_V)); // Replace with tap_code16(LCMD(KC_V)) to enable for Mac
59                                 }
60                         break;
61                 return false;
62         }
63         return true;
64 };
65
66 void matrix_scan_user(void) {
67         /* Leaving some LED stuff in here in comment form so you can see how to use it.
68     if (shiftLED || capsLED){
69                 red_led_on;
70     } else {
71                 red_led_off;
72     }
73     if (numLED){
74                 grn_led_on;
75     } else {
76                 grn_led_off;
77     }
78     if (mouseLED){
79                 blu_led_on;
80     } else {
81                 blu_led_off;
82         }*/
83         while (encoderValue < 0){
84                 tap_code(KC_VOLD);
85                 encoderValue++;
86         }
87         while (encoderValue > 0){
88                 tap_code(KC_VOLU);
89                 encoderValue--;
90         }
91 };