qmk_firmware

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

keymap.c (3587B)


      1 /* Copyright 2021 duckyb
      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 #include QMK_KEYBOARD_H
     17 
     18 // Defines names for use in layer keycodes and the keymap
     19 enum layer_names {
     20     _BASE,
     21     _ARROW,
     22     _FN
     23 };
     24 
     25 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
     26   /* Base Layer
     27    * ,-------------------------------------.
     28    * |     |  Esc  |  1|  2|  3|  4|  5|  6|
     29 	 * |		 |-------+---+---+---+---+---+---|
     30    * |     |  Tab  |  Q|  W|  E|  R|  T|  7|
     31 	 * |----||-------+---+---+---+---+---+---|
     32    * | F13|| Enter |  A|  S|  D|  F|  G|  8|
     33 	 * |----||-------+---+---+---+---+---+---|
     34    * | F14|| Shift |  Z|  X|  C|  V|  B|  9|
     35    * |----||-------------------------------|
     36    * | F15|| LCtrl | _FN |Alt|  Space  |  0|
     37    * `----'`-------------------------------'
     38    */
     39     [_BASE] = LAYOUT(
     40 		        KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, 
     41 		        KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, 
     42 		KC_F13, KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_8, 
     43 		KC_F14, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_9, 
     44 		KC_F15, KC_LCTL, OSL(_FN), KC_LALT, KC_SPC, LT(_ARROW, KC_0)
     45     ),
     46   /* Arrows Layer
     47    * ,--------------------------------------------------.
     48    * |     |       |    |    |     |    |       |       |
     49 	 * |		 |-------+----+----+-----+----+-------+-------|
     50    * |     |       |    |  UP|     |RGB?|  HUE+ |  HUE- |
     51 	 * |----||-------+----+----+-----+----+-------+-------|
     52    * |    ||       |LEFT|DOWN|RIGHT|    |BRIGHT+|BRIGHT-|
     53 	 * |----||-------+----+----+-----+----+-------+-------|
     54    * |    ||       |    |    |     |    | MODE+ | MODE- |
     55    * |----||--------------------------------------------|
     56    * | RST||       |       |     |         |            |
     57    * `----'`--------------------------------------------'
     58    */
     59     [_ARROW] = LAYOUT(
     60 		         _______, _______, _______, _______, _______, _______, _______,
     61 		         _______, _______, KC_UP, _______, UG_TOGG, UG_HUEU, UG_HUED, 
     62 		_______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, UG_VALU, UG_VALD, 
     63 		_______, _______, _______, _______, _______, _______, UG_NEXT, UG_PREV,
     64 		QK_BOOT, _______, _______, _______, _______, _______
     65     ),
     66   /* Function Layer
     67    * ,-------------------------------------.
     68    * |     |       | F1| F2| F3| F4| F5| F6|
     69 	 * |		 |-------+---+---+---+---+---+---|
     70    * |     |       |  P|  O|  I|  U|  Y| F7|
     71 	 * |----||-------+---+---+---+---+---+---|
     72    * |    ||  Bspc |  ;|  L|  K|  J|  H| F8|
     73 	 * |----||-------+---+---+---+---+---+---|
     74    * |    ||       |Gui|  M|  N|F12|F11| F9|
     75    * |----||-------------------------------|
     76    * |    ||       |     |   |         |F10|
     77    * `----'`-------------------------------'
     78    */
     79     [_FN] = LAYOUT(
     80 		         _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
     81 		         _______, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_F7, 
     82 		_______, KC_BSPC, KC_SCLN, KC_L, KC_K, KC_J, KC_H, KC_F8, 
     83 		_______, _______, KC_LGUI, KC_M, KC_N, KC_F12, KC_F11, KC_F9, 
     84 		_______, _______, _______, _______, _______, KC_F10
     85     )
     86 };