aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/ergotravel/keymaps/yanfali/config.h38
-rw-r--r--keyboards/ergotravel/keymaps/yanfali/keymap.c108
-rw-r--r--keyboards/ergotravel/keymaps/yanfali/rules.mk1
3 files changed, 147 insertions, 0 deletions
diff --git a/keyboards/ergotravel/keymaps/yanfali/config.h b/keyboards/ergotravel/keymaps/yanfali/config.h
new file mode 100644
index 000000000..eeca26ce1
--- /dev/null
+++ b/keyboards/ergotravel/keymaps/yanfali/config.h
@@ -0,0 +1,38 @@
1/*
2Copyright 2017 Pierre Constantineau <jpconstantineau@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20/* Use I2C or Serial, not both */
21
22#define USE_SERIAL
23// #define USE_I2C
24
25/* Select hand configuration */
26
27#define MASTER_LEFT
28// #define MASTER_RIGHT
29// #define EE_HANDS
30
31#undef RGBLED_NUM
32#define RGBLIGHT_ANIMATIONS
33#define RGBLED_NUM 12
34#define RGBLIGHT_HUE_STEP 8
35#define RGBLIGHT_SAT_STEP 8
36#define RGBLIGHT_VAL_STEP 8
37
38
diff --git a/keyboards/ergotravel/keymaps/yanfali/keymap.c b/keyboards/ergotravel/keymaps/yanfali/keymap.c
new file mode 100644
index 000000000..399dc9998
--- /dev/null
+++ b/keyboards/ergotravel/keymaps/yanfali/keymap.c
@@ -0,0 +1,108 @@
1#include QMK_KEYBOARD_H
2
3extern keymap_config_t keymap_config;
4
5#define _QWERTY 0
6#define _LOWER 1
7#define _RAISE 2
8#define _ADJUST 16
9
10enum custom_keycodes {
11 QWERTY = SAFE_RANGE,
12 LOWER,
13 RAISE,
14 ADJUST,
15};
16
17const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
18
19 [_QWERTY] = LAYOUT(
20 //,---------------------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------.
21 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINUS,
22 //|---------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
23 MT(MOD_LCTL, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LCBR, KC_RCBR, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
24 //|---------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
25 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
26 //|---------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
27 ADJUST, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
28 //`---------------------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------'
29 ),
30
31 [_LOWER] = LAYOUT(
32 //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------.
33 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
34 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
35 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_Y, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
36 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
37 KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
38 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
39 _______, _______, _______, _______, _______, _______, _______, RAISE, _______, _______, _______, _______
40 //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------'
41 ),
42
43
44 [_RAISE] = LAYOUT(
45 //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------.
46 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
47 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
48 _______, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, KC_Y, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
49 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
50 _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
51 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
52 _______, _______, _______, _______, _______, _______, _______, RAISE, _______, _______, _______, _______
53 //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------'
54 ),
55
56 [_ADJUST] = LAYOUT(
57 //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------.
58 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET,
59 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
60 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
61 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
62 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
63 //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
64 _______, _______, _______, _______, _______, _______, _______, RAISE, _______, _______, _______, _______
65 //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------'
66 )
67
68};
69
70
71
72
73
74
75
76bool process_record_user(uint16_t keycode, keyrecord_t *record) {
77 switch (keycode) {
78 case LOWER:
79 if (record->event.pressed) {
80 layer_on(_LOWER);
81 update_tri_layer(_LOWER, _RAISE, _ADJUST);
82 } else {
83 layer_off(_LOWER);
84 update_tri_layer(_LOWER, _RAISE, _ADJUST);
85 }
86 return false;
87 break;
88 case RAISE:
89 if (record->event.pressed) {
90 layer_on(_RAISE);
91 update_tri_layer(_LOWER, _RAISE, _ADJUST);
92 } else {
93 layer_off(_RAISE);
94 update_tri_layer(_LOWER, _RAISE, _ADJUST);
95 }
96 return false;
97 break;
98 case ADJUST:
99 if (record->event.pressed) {
100 layer_on(_ADJUST);
101 } else {
102 layer_off(_ADJUST);
103 }
104 return false;
105 break;
106 }
107 return true;
108}
diff --git a/keyboards/ergotravel/keymaps/yanfali/rules.mk b/keyboards/ergotravel/keymaps/yanfali/rules.mk
new file mode 100644
index 000000000..0613ea866
--- /dev/null
+++ b/keyboards/ergotravel/keymaps/yanfali/rules.mk
@@ -0,0 +1 @@
BOOTLOADER = qmk-dfu