qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

keymap.c (2479B)


      1 /*
      2 Copyright 2023 deddia permana (@depermana12)
      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 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
     21     /*
     22      * ┌─────────┐                   ┌─────────┐
     23      * │  mute   │                   │  MO(1)  │
     24      * ├─────────┼─────────┬─────────┼─────────┤
     25      * │    1    │    2    │    3    │    4    │
     26      * ├─────────┼─────────┼─────────┼─────────┤
     27      * │    5    │    6    │    7    │    8    │
     28      * └─────────┴─────────┴─────────┴─────────┘
     29      */
     30     [0] = LAYOUT(
     31         KC_MUTE,          MO(1),
     32         KC_1, KC_2, KC_3, KC_4,
     33         KC_5, KC_6, KC_7, KC_8
     34         ),
     35     [1] = LAYOUT(
     36         QK_BOOT,                _______,
     37         KC_1,   KC_2,  KC_3,     KC_4,
     38         TO(0), TO(2), TO(3), RM_TOGG
     39         ),
     40     [2] = LAYOUT(
     41         _______,                   _______,
     42         _______, _______, _______, _______,
     43         _______, _______, _______, _______
     44         ),
     45     [3] = LAYOUT(
     46         _______,                   _______,
     47         _______, _______, _______, _______,
     48         _______, _______, _______, _______
     49         )
     50         };
     51 #if defined (ENCODER_MAP_ENABLE)
     52 const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
     53     [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU),   ENCODER_CCW_CW(RM_HUED, RM_HUEU) },
     54     [1] = { ENCODER_CCW_CW(KC_PGDN, KC_PGUP),   ENCODER_CCW_CW(RM_SATD, RM_SATU) },
     55     [2] = { ENCODER_CCW_CW(RM_VALD, RM_VALU),   ENCODER_CCW_CW(RM_SPDD, RM_SPDU) },
     56     [3] = { ENCODER_CCW_CW(RM_PREV, RM_NEXT),   ENCODER_CCW_CW(KC_RIGHT, KC_LEFT)},
     57 };
     58 #endif