qmk_firmware

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

keymap.c (1957B)


      1 /* Copyright 2019 Garret G. (TheRoyalSweatshirt)
      2  *
      3  * This program is free software: you can redistribute it and/or modify
      4  * it under the terms of the GNU General Public License as published by
      5  * the Free Software Foundation, either version 2 of the License, or
      6  * (at your option) any later version.
      7  *
      8  * This program is distributed in the hope that it will be useful,
      9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     11  * GNU General Public License for more details.
     12  *
     13  * You should have received a copy of the GNU General Public License
     14  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     15  */
     16 
     17 #include QMK_KEYBOARD_H
     18 
     19 #define BASE 0
     20 #define FN 1
     21 #define XXX KC_NO
     22 #define KC_TR KC_TRANSPARENT
     23 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
     24 
     25   /* BASE
     26    * ,----------------------------------------.
     27    * |  DEL  |   UP  | ENTER |       |  RGB   |
     28    * |-------+-------+-------+-------+--------|
     29    * | LEFT  | DOWN  | RIGHT |       |   FN   |
     30    * `----------------------------------------'
     31    */
     32   	[BASE] = LAYOUT(
     33     KC_DEL,  KC_UP,   KC_ENT,           UG_NEXT,
     34     KC_LEFT, KC_DOWN, KC_RIGHT,         MO(1)
     35   ),
     36 
     37     /* FN
     38    * ,----------------------------------------.
     39    * |  HU+  |  Br+  |  Sat+ |       |        |
     40    * |-------+-------+-------+-------+--------|
     41    * |  HU-  |  Br-  |  Sat- |       |        |
     42    * `----------------------------------------'
     43    */
     44   	[FN] = LAYOUT(
     45     UG_HUEU, UG_VALU, UG_SATU,         KC_TR,
     46     UG_HUED, UG_VALD, UG_SATD,         KC_TR
     47   )
     48 };
     49 
     50     /*      Rotary Encoder Settings:                     */
     51     /*       - Current Value = Horizontal Scrolling      */
     52 
     53 bool encoder_update_user(uint8_t index, bool clockwise) {
     54     if (index == 0) {
     55         if (clockwise) {
     56             tap_code(MS_WHLL);
     57         } else {
     58             tap_code(MS_WHLR);
     59         }
     60     }
     61     return true;
     62 }