summaryrefslogtreecommitdiff
path: root/keyboards/naked48/keymaps/scheiklp/keymap.c
blob: d8549e0e8be805e539cc46804e92718f3593d45e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Copyright 2021 Paul Maria Scheikl (@ScheiklP)
// SPDX-License-Identifier: GPL-2.0-or-later


#include QMK_KEYBOARD_H
#include "koy_keys_on_quertz_de_latin1.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.
enum layer_number {
  _1 = 0,
  _3,
  _4,
  _7,
};

enum custom_keycodes {
  RGB_RST = SAFE_RANGE
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

  [_1] = LAYOUT( /* KOY */
    KC_ESC,  KC_K,     KC_DOT,  KC_O,    KC_COMM,  N_Y,                      KC_V,     KC_G,    KC_C,    KC_L,    N_SS,    N_Z,
    MO(_3),  KC_H,     KC_A,    KC_E,    KC_I,     KC_U,                     KC_D,     KC_T,    KC_R,    KC_N,    KC_S,    KC_F,
    KC_LSFT, KC_X,     KC_Q,    N_AE,    N_UE,     N_OE,                     KC_B,     KC_P,    KC_W,    KC_M,    KC_J,    KC_RSFT,
             KC_LCTRL, MO(_4),  KC_HOME, KC_LALT,  KC_ENTER,  N_COPY, N_PASTE, KC_SPC, MO(_4),  KC_RCTL, KC_TRNS, MO(_7)
  ),

  [_3] = LAYOUT( /* Layer 3 */
    KC_ESC,  N_DOTS,   N_USC,   N_LSQBR, N_RSQBR, N_CIRC,                   N_EXKL,   N_LT,    N_GT,    N_EQ,    N_AMP,   KC_TRNS,
    KC_TRNS, N_BSLS,   N_SLSH,  N_LCUBR, N_RCUBR, N_ASTR,                   N_QUES,   N_LPARN, N_RPARN, N_MINS,  N_COLN,  N_AT,
    KC_LSFT, N_HASH,   N_DLR,   N_PIPE,  N_TILD,  N_GRAVE,                  N_PLUS,   N_PERC,  N_QUOT,  N_SING,  N_SEMI,  KC_RSFT,
             KC_LCTRL, KC_TRNS, KC_HOME, KC_LALT, KC_ENTER,  N_COPY, N_PASTE, KC_SPC, KC_TRNS, KC_RCTL, KC_TRNS, KC_TRNS
  ),

  [_4] = LAYOUT( /* Layer 4 */
    KC_ESC,  KC_PGUP, KC_BSPC, KC_UP,   KC_DEL,   KC_PGDN,                    KC_KP_SLASH,    KC_7,    KC_8,    KC_9,    KC_KP_MINUS, KC_TRNS,
    KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END,                     KC_KP_ASTERISK, KC_4,    KC_5,    KC_6,    KC_KP_PLUS,  KC_TRNS,
    KC_LSFT, KC_ESC,  KC_TAB,  KC_INS,  KC_SPC,   N_UNDO,                     KC_KP_ENTER,    KC_1,    KC_2,    KC_3,    KC_KP_DOT,   KC_RSFT,
             KC_LCTRL, KC_TRNS, KC_HOME, KC_LALT, KC_ENTER,  N_COPY, N_PASTE, KC_0,           KC_RCTL, KC_TRNS, KC_TRNS, KC_TRNS
  ),

  [_7] = LAYOUT( /* Layer 7 */
    KC_ESC,  KC_MS_WH_UP,  KC_MS_BTN2, KC_MS_UP,   KC_MS_BTN1,  KC_MS_WH_DOWN,                     KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
    KC_TRNS, KC_MS_ACCEL0, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS,                           KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    KC_LSFT, KC_MS_ACCEL1, KC_TRNS,    KC_TRNS,    KC_TRNS,     KC_TRNS,                           RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI,
             KC_LCTRL,     KC_TRNS,    KC_HOME,    KC_LALT,     KC_ENTER,  N_COPY, N_PASTE, KC_SPC, KC_TRNS, KC_RCTL, KC_TRNS, KC_TRNS
  )

};

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
    switch (keycode) {
#ifdef RGBLIGHT_ENABLE
        case RGB_RST:
            if (record->event.pressed) {
                eeconfig_update_rgblight_default();
                rgblight_enable();
            }
            break;
#endif
    }
    return true;
}