aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkeyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c166
-rw-r--r--keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md74
2 files changed, 240 insertions, 0 deletions
diff --git a/keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c b/keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c
new file mode 100755
index 000000000..a2bc15c99
--- /dev/null
+++ b/keyboards/ergodox/keymaps/dvorak_emacs_software/keymap.c
@@ -0,0 +1,166 @@
1#include "ergodox.h"
2#include "keymap_dvorak.h"
3#include "debug.h"
4#include "action_layer.h"
5
6/******************************************************************************************
7 * DVORAK LAYOUT (see http://djelibeibi.unex.es/dvorak/)
8 * Layer 1: auxiliary keys
9 * Layer 2: full qwerty layout
10 *****************************************************************************************/
11
12// LAYERS
13#define BASE 0 // dvorak layout (default)
14#define AUX 1 // auxiliary keys
15
16// MACROS
17/* #define OBRACE 0 // key { or shift */
18/* #define CBRACE 1 // key } or shift */
19/* #define OBRACK 2 // key [ or left alt */
20/* #define CBRACK 3 // key ] or left alt */
21/* #define CAPS 4 // caps lock */
22
23// LEDS
24#define USB_LED_NUM_LOCK 0
25#define USB_LED_CAPS_LOCK 1
26#define USB_LED_SCROLL_LOCK 2
27#define USB_LED_COMPOSE 3
28#define USB_LED_KANA 4
29
30// TIMERS
31#define KEY_TAP_FAST 85
32#define KEY_TAP_SLOW 95
33
34const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35/* Keymap 0: Base layer
36 * Keys with double values (like Esc/Ctrl) correspond to the 'tapped' key and the 'held' key, respectively
37 *
38 * ,--------------------------------------------------. ,--------------------------------------------------.
39 * | | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = / + |
40 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
41 * | ~ |" / ' |, / < |. / > | P | Y | [ | | ] | F | G | C | H | L | / / ? |
42 * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------|
43 * | Tab | A | O | E |U/LSft| I/L1 |------| |------| D/L1|R/RSft| T | N | S | - / _ |
44 * |--------+------+------+------+------+------| LGUI | | LGUI |------+------+------+------+------+--------|
45 * | {/LSft |; / : | Q | J | K | X | | | | B | M | W | V | Z | }/RSft |
46 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
47 * | | | | | ~L1 | | ~L1 | | | \ / || |
48 * `----------------------------------' `----------------------------------'
49 * ,-------------. ,-------------.
50 * | HOME | END | | LEFT | RIGHT|
51 * ,------|------|------| |------+--------+------.
52 * | BSPC | DEL | PGUP | | UP | SPACE |RETURN|
53 * | / | / |------| |------| / | / |
54 * | LCTL | LALT |PGDWN | | DOWN | LALT | LCTL |
55 * `--------------------' `----------------------'
56 *
57 */
58[BASE] = KEYMAP(
59 // left hand
60 KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
61 KC_TILD, DV_QUOT, DV_COMM,DV_DOT, DV_P, DV_Y, DV_LBRC,
62 KC_TAB, DV_A, DV_O, DV_E, SFT_T(DV_U), LT(AUX, DV_I),
63 SFT_T(DV_LBRC), DV_SCLN, DV_Q, DV_J, DV_K, DV_X, KC_LGUI,
64 KC_NO, KC_NO, KC_NO, KC_NO, MO(AUX),
65 KC_HOME, KC_END,
66 KC_PGUP,
67 CTL_T(KC_BSPC), ALT_T(KC_DEL), KC_PGDN,
68 // right hand
69 KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, DV_EQL,
70 DV_RBRC, DV_F, DV_G, DV_C, DV_R, DV_L, DV_SLSH,
71 LT(AUX, DV_D), SFT_T(DV_H), DV_T, DV_N, DV_S, DV_MINS,
72 KC_LGUI, DV_B, DV_M, DV_W, DV_V, DV_Z, SFT_T(DV_RBRC),
73 MO(AUX), KC_NO, KC_NO, KC_BSLS, KC_NO,
74 KC_LEFT, KC_RIGHT,
75 KC_UP,
76 KC_DOWN, ALT_T(KC_ENT), CTL_T(KC_SPC)
77 ),
78/* Keymap 1: Aux layer
79 *
80 * ,--------------------------------------------------. ,--------------------------------------------------.
81 * | VolUp | | | | | | SLEEP | PWR | | | | | | |
82 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
83 * | VolDn | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | * | |
84 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
85 * | | F5 | F6 | F7 | F8 | TRANS|------| |------|TRANS | 4 | 5 | 6 | + | |
86 * |--------+------+------+------+------+------| | |PSCR |------+-----aan+------+------+------+--------|
87 * | TRANS | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | / | TRANS |
88 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
89 * |CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS| | TRANS| . | 0 | = | |
90 * `----------------------------------' `----------------------------------'
91 * ,-------------. ,-------------.
92 * | TRANS| TRANS| | TRANS| TRANS|
93 * ,------|------|------| |------+------+------.
94 * | | | TRANS| | TRANS| | |
95 * |TRANS |TRANS |------| |------| TRANS| TRANS|
96 * | | | TRANS| | TRANS| | |
97 * `--------------------' `--------------------'
98 */
99[AUX] = KEYMAP(
100 // left hand
101 KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLEP,
102 KC_VOLD, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_NO,
103 KC_NO , KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS,
104 KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
105 LCTL(DV_S), LCTL(DV_Z), LCTL(DV_X), LCTL(DV_C), KC_TRNS,
106 KC_TRNS , KC_TRNS,
107 KC_TRNS,
108 KC_TRNS, KC_TRNS, KC_TRNS,
109 // right hand
110 KC_PWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
111 KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_PAST, KC_NO,
112 KC_TRNS, KC_4, KC_5, KC_6, KC_PPLS, KC_NO,
113 KC_PSCR, KC_NO, KC_1, KC_2, KC_3, KC_PSLS, KC_TRNS,
114 KC_TRNS,KC_DOT, KC_0, KC_PEQL, KC_NO,
115 KC_TRNS , KC_TRNS,
116 KC_TRNS,
117 KC_TRNS, KC_TRNS, KC_TRNS
118),
119};
120
121const uint16_t PROGMEM fn_actions[] = {
122 [1] = ACTION_LAYER_TAP_TOGGLE(AUX) // FN1 - Momentary Layer 1 (Aux)
123};
124
125
126const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
127{
128 // MACRODOWN only works in this function
129 switch(id) {
130 case 0:
131 if (record->event.pressed) {
132 register_code(KC_RSFT);
133 } else {
134 unregister_code(KC_RSFT);
135 }
136 break;
137 }
138 return MACRO_NONE;
139};
140
141// Runs just one time when the keyboard initializes.
142void matrix_init_user(void) {
143
144};
145
146// Runs constantly in the background, in a loop.
147void matrix_scan_user(void) {
148
149 uint8_t layer = biton32(layer_state);
150
151 ergodox_board_led_off();
152 ergodox_right_led_1_off();
153 ergodox_right_led_2_off();
154 ergodox_right_led_3_off();
155 switch (layer) {
156 case 1:
157 ergodox_right_led_1_on();
158 break;
159 case 2:
160 ergodox_right_led_2_on();
161 break;
162 default:
163 // none
164 break;
165 }
166}
diff --git a/keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md b/keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md
new file mode 100644
index 000000000..0e1e94ffe
--- /dev/null
+++ b/keyboards/ergodox/keymaps/dvorak_emacs_software/readme.md
@@ -0,0 +1,74 @@
1# Ergodox Dvorak Layout with emacs binding in mind - software version
2
3This configuration is the same as the dvorak_emacs layout, but using a sofware dvorak configuration
4instead of a firmware configuration. This layout is for those who run their computer in dvorak mode.
5
6 * Control & Alt key on the thumbs (activated if pressed with another key).
7 * In the same way, "U" and "R" are the shift modifier if pressed with another key.
8 * "I" and "D" set the layer 1 for the auxiliary keys if pressed with another key.
9 * Software layout set to english.
10
11## Keymap Layers
12 - L0: dvorak with some customizations (see layout below)
13 - L1: auxiliary keys (includes function keys, numpad...)
14
15
16### Keymap 0: Base layer
17Keys with double values (like U/LSft) correspond to the 'tapped' key and the 'held' key, respectively
18
19<pre><code>
20
21,--------------------------------------------------. ,--------------------------------------------------.
22| | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
23|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------|
24| ~ | ' | , | . | P | Y | [ | | ] | F | G | C | H | L | / |
25|--------|------|------|------|------|------| { | | } |------|------|------|------|------|--------|
26| Tab | A | O | E |U/LSft| I/L1 |------| |------| D/L1|R/RSft| T | N | S | - |
27|--------|------|------|------|------|------| LGUI | | LGUI |------|------|------|------|------|--------|
28| {/LSft | ; | Q | J | K | X | | | | B | M | W | V | Z | }/RSft |
29`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
30 | | | | | ~L1 | | ~L1 | | | \ | |
31 `----------------------------------' `----------------------------------'
32 ,-------------. ,-------------.
33 | HOME | END | | LEFT | RIGHT|
34 ,------|------|------| |------|--------|------.
35 | BSPC | DEL | PGUP | | UP | SPACE |RETURN|
36 | / | / |------| |------| / | / |
37 | LCTL | LALT |PGDWN | | DOWN | LALT | LCTL |
38 `--------------------' `----------------------'
39
40</pre></code>
41
42### Keymap 1: Aux layer
43
44<pre><code>
45
46,--------------------------------------------------. ,--------------------------------------------------.
47| VolUp | | | | | | SLEEP | PWR | | | | | | |
48|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------|
49| VolDn | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | * | |
50|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
51| | F5 | F6 | F7 | F8 | TRANS|------| |------|TRANS | 4 | 5 | 6 | + | |
52|--------|------|------|------|------|------| | |PSCR |------|------|------|------|------|--------|
53| TRANS | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | / | TRANS |
54`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
55 |CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS| | TRANS| . | 0 | = | |
56 `----------------------------------' `----------------------------------'
57 ,-------------. ,-------------.
58 | TRANS| TRANS| | TRANS| TRANS|
59 ,------|------|------| |------|------|------.
60 | | | TRANS| | TRANS| | |
61 |TRANS |TRANS |------| |------| TRANS| TRANS|
62 | | | TRANS| | TRANS| | |
63 `--------------------' `--------------------'
64
65</pre></code>
66
67
68
69## Generation of .hex file
70> In the "qmk_firmware/keyboards/ergodox" directory.
71
72> Execute "make dvorak_emacs". Then the hex file "ergodox_ez_dvorak_emacs.hex" is in the root directory : "qmk_firmware".
73
74> Flash with `teensy_loader` binary