summaryrefslogtreecommitdiff
path: root/keyboards/crkbd/keymaps/rpbaptist/rpbaptist.h
blob: 630ab5df49c11e1f0262590a5af1215f5885e79b (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
69
70
71
72
73
// Copyright 2023 Your Name (@rpbaptist)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once
#include QMK_KEYBOARD_H

#include "quantum.h"

#if defined(RGB_MATRIX_ENABLE)
#    include "rgb.h"
#endif

#if defined(OLED_ENABLE)
#    include "oled.h"
#endif

enum layer_names {
  _COLEMAKDH,
  _GAMING,
  _WASD,
  _GAMING_EXT,
  _NUMPAD,
  _SYM,
  _NAV,
  _UTIL
};

enum custom_keycodes {
    BSP_DEL = SAFE_RANGE,
#if defined(RGB_MATRIX_ENABLE)
    RGB_RST, // Reset RGB
    RGB_UND, // Toggle RGB underglow as layer indicator
    RGB_ATG, // Toggle active RGB mode
    RGB_PST, // Toggle simple passive RGB mode
    RGB_PCT, // Toggle colorful passive RGB mode
    RGB_IDL, // RGB Idling animations
#endif
    TYPING, // Switch to Colemak layer
    GAMING, // Switch to gaming Colemak layer
    WASD    // Switch to gaming with WASD positions
};

// Layer toggle and switch
#define T_NAV TT(_NAV)
#define S_NAV MO(_NAV)

#define T_SYM TT(_SYM)
#define S_SYM MO(_SYM)

// Layer keys with functionality on tap
#define NAV_0 LT(_NAV, KC_0)
#define TAB_NUM LT(_NUMPAD, KC_TAB)
#define LCK_NMP TG(_NUMPAD)
#define S_NUM MO(_NUMPAD)

#define EXTALT LT(_GAMING_EXT, KC_LALT)

// Tap/mod keys
#define RCTL_BR RCTL_T(KC_RBRC)
#define LCTL_BR LCTL_T(KC_LBRC)

#define SFT_SPC LSFT_T(KC_SPACE)
#define SFT_ENT RSFT_T(KC_ENTER)

// Global tab forward and backward
#define TAB_FWD LCTL(KC_TAB)
#define TAB_BCK LCTL(LSFT(KC_TAB))
#define TAB_CLS LCTL(KC_W)

#define WIN_CLS LALT(KC_F4)

// €
#define KC_EUR ALGR(KC_5)