vial-qmk/keyboards/doio/kb16/rev2/keymaps/vial/keymap.c
ClownFish b620d059f7
add Vial for doio kb16 rev2 (#875)
* add vial for kb16

* relocate vial keymap to rev 2 directory
2025-04-10 23:38:24 -06:00

132 lines
6 KiB
C

/* Copyright 2022 DOIO
* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
// OLED animation
#include "lib/layer_status/layer_status.h"
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
┌───┬───┬───┬───┐ ┌───┐ ┌───┐
│ 1 │ 2 │ 3 │ 4 │ │Ply│ │TO1│
├───┼───┼───┼───┤ └───┘ └───┘
│ 5 │ 6 │ 7 │ 8 │
├───┼───┼───┼───┤
│ 9 │ 0 │ ↑ │Ent│ ┌───┐
├───┼───┼───┼───┤ │Mut│
│Fn2│ ← │ ↓ │ → │ └───┘
└───┴───┴───┴───┘
┌───┬───┬───┬───┐ ┌───┐ ┌───┐
│ ! │ @ │ # │ $ │ │ │ │ │
├───┼───┼───┼───┤ └───┘ └───┘
│ % │ ^ │ & │ * │
├───┼───┼───┼───┤
│ ( │ ) │ │ │ ┌───┐
├───┼───┼───┼───┤ │ │
│ │ │ │ │ └───┘
└───┴───┴───┴───┘
*/
/* Row: 0 1 2 3 4 */
[0] = LAYOUT(
KC_1, KC_2, KC_3, KC_4, KC_MPLY,
KC_5, KC_6, KC_7, KC_8, TO(1),
KC_9, KC_0, KC_UP, KC_ENT, KC_MUTE,
MO(3), KC_LEFT, KC_DOWN, KC_RIGHT
),
/*
┌───┬───┬───┬───┐ ┌───┐ ┌───┐
│ │ │ │ │ │ │ │ │
├───┼───┼───┼───┤ └───┘ └───┘
│ │ │ │ │
├───┼───┼───┼───┤
│ │ │ │ │ ┌───┐
├───┼───┼───┼───┤ │ │
│ │ │ │ │ └───┘
└───┴───┴───┴───┘
*/
/* Row: 0 1 2 3 4 */
[1] = LAYOUT(
_______, _______, _______, _______, _______,
_______, _______, _______, _______, TO(2),
_______, _______, _______, _______, _______,
_______, _______, _______, _______
),
/*
┌───┬───┬───┬───┐ ┌───┐ ┌───┐
│ │ │ │ │ │ │ │ │
├───┼───┼───┼───┤ └───┘ └───┘
│ │ │ │ │
├───┼───┼───┼───┤
│ │ │ │ │ ┌───┐
├───┼───┼───┼───┤ │ │
│ │ │ │ │ └───┘
└───┴───┴───┴───┘
*/
/* Row: 0 1 2 3 4 */
[2] = LAYOUT(
_______, _______, _______, _______, _______,
_______, _______, _______, _______, TO(3),
_______, _______, _______, _______, _______,
_______, _______, _______, _______
),
/*
┌───┬───┬───┬───┐ ┌───┐ ┌───┐
│Spd│Spi│ │ │ │ │ │TO0│
├───┼───┼───┼───┤ └───┘ └───┘
│Sad│Sai│ │ │
├───┼───┼───┼───┤
│Prv│Nxt│Hui│ │ ┌───┐
├───┼───┼───┼───┤ │ │
│Tog│Vad│Hud│Vai│ └───┘
└───┴───┴───┴───┘
*/
/* Row: 0 1 2 3 4 */
[3] = LAYOUT(
RM_SPDD, RM_SPDU, _______, QK_BOOT, _______,
RM_SATD, RM_SATU, _______, _______, TO(0),
RM_PREV, RM_NEXT, RM_HUEU, _______, _______,
RM_TOGG, RM_VALD, RM_HUED, RM_VALU
),
};
#ifdef OLED_ENABLE
bool oled_task_user(void) {
render_layer_status();
return true;
}
#endif
#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
};
#endif