aboutsummaryrefslogtreecommitdiff
path: root/qmk/keyboards/sofle_choc/keymaps/custom/keymap.c
blob: b02567e954f902fadd7fc9be8f85547c02d06a69 (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
/* Copyright 2023 Brian Low
 *
 * 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
#include "keymap_bepo.h"
#include "keycodes.h"


#define LY_SYMBOL TD(TD_LAYER_SYMB)


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
 * BÉPO
 * ,-----------------------------------------.                    ,-----------------------------------------.
 * |  `   |   1  |   2  |   3  |   4  |   5  |                    |   6  |   7  |   8  |   9  |   0  |  `%  |
 * |------+------+------+------+------+------|                    |------+------+------+------+------+------|
 * | ESC  |   B  |   É  |   P  |   O  |   È  |                    |   !  |   V  |   D  |   L  |   J  |  Z   |
 * |------+------+------+------+------+------|                    |------+------+------+------+------+------|
 * | Tab  |   A  |   U  |   I  |   E  |  ;È  |-------.    ,-------|  CÇ  |   T  |   S  |   R  |   N  |  M   |
 * |------+------+------+------+------+------|  Mute |    | Pause |------+------+------+------+------+------|
 * |LShift|   À  |   Y  |   X  |   :  |   K  |-------|    |-------|   ?  |   Q  |   G  |   H  |   F  |  W   |
 * `-----------------------------------------/       /     \      \-----------------------------------------'
 *            | LCTL | LGUI | LCMD | Layer| / Space /       \Enter \  | Layer| RCMD | RGUI | RCTL |
 *            |      |      |      |  dwn |/ LALT  /         \ RALT \ |   up |      |      |      |
 *            `-----------------------------------'           '------''---------------------------'
 */

[LAYER_BASE] = LAYOUT(
    KC_ESC,   KC_1,   KC_2,    KC_3,    KC_4,    KC_5,                       KC_6,     KC_7,     KC_8,    KC_9,    KC_0,    KEY_PRC,
    BP_DLR,   BP_B,   BP_EACU, BP_P,    BP_O,    KC_BSPC,                    BP_DCIR,  BP_V,     BP_D,    BP_L,    BP_J,    BP_Z,
    KC_TAB,   BP_A,   BP_U,    BP_I,    KEY_E,   KEY_EE,                     KEY_C,    KEY_T,    BP_S,    BP_R,    BP_N,    BP_M,
    KC_LSFT,  BP_AGRV,BP_Y,    BP_X,    BP_DOT,  KC_B,    KC_MUTE,   KC_MPLY,BP_QUOT,  BP_Q,     BP_G,    BP_H,    BP_F,    KEY_W,
                      KC_LCTL, KC_DELETE,KC_LGUI,LY_SYMBOL,AL_SPC,   AL_ENT, LY_SYMBOL,KEY_APP,     KEY_INS, KC_RCTL
),

// In the number layout, I keep the mod-tap modifiers applies to the middle letters :
//
#define KEY_5      MT(MOD_LCTL, KC_P5)
#define KEY_DOWN   MT(MOD_RCTL, KC_DOWN)

// This layer is used to access to the numeric keypad, functions keys, and also provide some keys used with KC_LGUI
[LAYER_SYMBOLS] = LAYOUT(
    KC_ESC,   KC_F1,  KC_F2,   KC_F3,   KC_F4,   KC_F5,                      KC_F6,    KC_F7,    KC_F8,   KC_F9,   KC_F10,  KC_F11,
    KC_NO,    KC_NO,  KC_P7,   KC_P8,   KC_P9,   KC_TRNS,                    KC_HOME,  KC_UP,    KC_END,  KC_TRNS, KC_NO,   S(BP_EQL),
    KC_TAB,   KC_NO,  KC_P4,   KEY_5,   KC_P6,   KC_NO,                      KC_LEFT,  KEY_DOWN, KC_RIGHT,BP_R,    BP_N,    KC_PGUP,
    KC_LSFT,  KC_NO,  KC_P1,   KC_P2,   KC_P3,   KC_NO,   KC_MUTE,   KC_MPLY,KC_PGUP,  KC_TRNS,  KC_PGDN, KC_TRNS, BP_F,    KC_PGDN,
                      KC_P0,   KC_PDOT, KC_TRNS, LY_SYMBOL,AL_SPC,   AL_ENT, LY_SYMBOL,KC_TRNS,  KC_RGUI, KC_TRNS
),
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
    [LAYER_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
    [LAYER_SYMBOLS] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
};
#endif