aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Blanco <alejandro.b.e@gmail.com>2018-02-15 20:06:40 +0100
committerJack Humbert <jack.humb@gmail.com>2018-02-23 13:23:55 -0500
commit21a37a5245eb1431fc853c5fdc5d210abd4be771 (patch)
tree09a322adff9b59d96b4f107d9aa5c56aa19a2869
parent3cff95c8df80424aa79135c97a8c093395b2e163 (diff)
downloadqmk_firmware-21a37a5245eb1431fc853c5fdc5d210abd4be771.tar.gz
qmk_firmware-21a37a5245eb1431fc853c5fdc5d210abd4be771.zip
ErgoDox layout similar to Truly Ergonomic
-rw-r--r--keyboards/ergodox_infinity/keymaps/trulyergonomic/README.md3
-rw-r--r--keyboards/ergodox_infinity/keymaps/trulyergonomic/keymap.c177
2 files changed, 180 insertions, 0 deletions
diff --git a/keyboards/ergodox_infinity/keymaps/trulyergonomic/README.md b/keyboards/ergodox_infinity/keymaps/trulyergonomic/README.md
new file mode 100644
index 000000000..1e248742e
--- /dev/null
+++ b/keyboards/ergodox_infinity/keymaps/trulyergonomic/README.md
@@ -0,0 +1,3 @@
1# Truly Ergonomic like layout
2
3A basic ErgoDox layout that imitates the Truly Ergonomic keyboard layout.
diff --git a/keyboards/ergodox_infinity/keymaps/trulyergonomic/keymap.c b/keyboards/ergodox_infinity/keymaps/trulyergonomic/keymap.c
new file mode 100644
index 000000000..882f2b3c0
--- /dev/null
+++ b/keyboards/ergodox_infinity/keymaps/trulyergonomic/keymap.c
@@ -0,0 +1,177 @@
1#include QMK_KEYBOARD_H
2#include "debug.h"
3#include "action_layer.h"
4#include "version.h"
5
6#define BASE 0 // default layer
7#define EXTRA 1 // extra
8
9enum custom_keycodes {
10 PLACEHOLDER = SAFE_RANGE, // can always be here
11 EPRM,
12 VRSN,
13 RGB_SLD
14};
15
16const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
17/* Keymap 0: Basic layer
18 *
19 * ,--------------------------------------------------. ,--------------------------------------------------.
20 * | ESC | 1 | 2 | 3 | 4 | 5 | LGui | | LGui | 6 | 7 | 8 | 9 | 0 | - |
21 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
22 * | Tab | Q | W | E | R | T | Del | | Tab | Y | U | I | O | P | = |
23 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
24 * | LShift | A | S | D | F | G |------| |------| H | J | K | L | ; | RShift |
25 * |--------+------+------+------+------+------| Back | | Back |------+------+------+------+------+--------|
26 * | LCtrl | Z | X | C | V | B | space| | space| N | M | , | . | ' | RCtrl |
27 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
28 * | LAlt | Home | PgUp | PgDn | End | | Left | Up | Down | Rigth| RAlt |
29 * `----------------------------------' `----------------------------------'
30 * ,-------------. ,-------------.
31 * | ~ | | | | [ | ] |
32 * ,------|------|------| |------+------+------.
33 * | | | L1 | | Grv | | |
34 * | Space|Enter |------| |------| Enter|Space |
35 * | | | / | | \ | | |
36 * `--------------------' `--------------------'
37 */
38// If it accepts an argument (i.e, is a function), it doesn't need KC_.
39// Otherwise, it needs KC_*
40[BASE] = LAYOUT_ergodox( // layer 0 : default
41 // left hand
42 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI,
43 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DELT,
44 KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G,
45 KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC,
46 KC_LALT, KC_HOME, KC_PGUP, KC_PGDN, KC_END,
47 KC_TILD, KC_PIPE,
48 TG(EXTRA),
49 KC_SPC, KC_ENT, KC_SLSH,
50 // right hand
51 KC_LGUI, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
52 KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL,
53 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT,
54 KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, KC_RCTL,
55 KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_RALT,
56 KC_LBRC, KC_RBRC,
57 KC_GRV,
58 KC_BSLS, KC_ENT, KC_SPC
59 ),
60/* Keymap 1: Extra Layer
61 *
62 * ,---------------------------------------------------. ,--------------------------------------------------.
63 * | | F1 | F2 | F3 | F4 | F5 | | | PSCR | F6 | F7 | F8 | F9 | F10 | F11 |
64 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
65 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
66 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
67 * | Caps | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
68 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
69 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
70 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
71 * | | | | | | | 0 | , | . | = | |
72 * `-----------------------------------' `----------------------------------'
73 * ,-------------. ,-------------.
74 * |VolUp |VolDn | | Prev | Next |
75 * ,------|------|------| |------+------+------.
76 * | | | | | Stop |Bright|Bright|
77 * | Mute |Pause |------| |------|ness- |ness+ |
78 * | | | | | Play | | |
79 * `--------------------' `--------------------'
80 */
81// SYMBOLS
82[EXTRA] = LAYOUT_ergodox(
83 // left hand
84 KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
85 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
86 KC_CAPS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
87 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
88 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
89 KC_VOLU,KC_VOLD,
90 KC_TRNS,
91 KC_MUTE,KC_PAUS,KC_TRNS,
92 // right hand
93 KC_PSCR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
94 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
95 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
96 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
97 KC_0, KC_COMM, KC_DOT, KC_EQL, KC_TRNS,
98 KC_MPRV, KC_MNXT,
99 KC_STOP,
100 KC_MPLY, RGB_VAD, RGB_VAI
101),
102};
103
104const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
105{
106 // MACRODOWN only works in this function
107 switch(id) {
108 case 0:
109 if (record->event.pressed) {
110 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
111 }
112 break;
113 case 1:
114 if (record->event.pressed) { // For resetting EEPROM
115 eeconfig_init();
116 }
117 break;
118 }
119 return MACRO_NONE;
120};
121
122bool process_record_user(uint16_t keycode, keyrecord_t *record) {
123 switch (keycode) {
124 // dynamically generate these.
125 case EPRM:
126 if (record->event.pressed) {
127 eeconfig_init();
128 }
129 return false;
130 break;
131 case VRSN:
132 if (record->event.pressed) {
133 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
134 }
135 return false;
136 break;
137 case RGB_SLD:
138 if (record->event.pressed) {
139 #ifdef RGBLIGHT_ENABLE
140 rgblight_mode(1);
141 #endif
142 }
143 return false;
144 break;
145 }
146 return true;
147}
148
149// Runs just one time when the keyboard initializes.
150void matrix_init_user(void) {
151
152};
153
154
155// Runs constantly in the background, in a loop.
156void matrix_scan_user(void) {
157
158 uint8_t layer = biton32(layer_state);
159
160 ergodox_board_led_off();
161 ergodox_right_led_1_off();
162 ergodox_right_led_2_off();
163 ergodox_right_led_3_off();
164 switch (layer) {
165 // TODO: Make this relevant to the ErgoDox EZ.
166 case 1:
167 ergodox_right_led_1_on();
168 break;
169 case 2:
170 ergodox_right_led_2_on();
171 break;
172 default:
173 // none
174 break;
175 }
176
177};