aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordbroqua <dbroqua@mousur.org>2016-10-14 21:53:37 +0200
committerdbroqua <dbroqua@mousur.org>2016-10-14 21:53:37 +0200
commit28ca1f5345f665e262e8f5af88ac166afcd35add (patch)
tree608b09db4b9a09012d558e8352768b690900d407
parent0320fbf6f4c3c6d079226bc49c7b4d3a3906f5d7 (diff)
parent2098b363eac81298ca51edc06970a767d991c78c (diff)
downloadqmk_firmware-28ca1f5345f665e262e8f5af88ac166afcd35add.tar.gz
qmk_firmware-28ca1f5345f665e262e8f5af88ac166afcd35add.zip
Merge branch 'master' of https://github.com/Dbroqua/qmk_firmware
-rw-r--r--keyboards/cluecard/keymaps/default/readme.md4
-rw-r--r--keyboards/cluecard/keymaps/rgb_effects/Makefile21
-rw-r--r--keyboards/cluecard/keymaps/rgb_effects/config.h12
-rw-r--r--keyboards/cluecard/keymaps/rgb_effects/keymap.c28
-rw-r--r--keyboards/cluecard/keymaps/rgb_effects/readme.md7
-rw-r--r--keyboards/ergodox/keymaps/algernon/NEWS.md145
-rw-r--r--keyboards/ergodox/keymaps/algernon/images/adore-layer.pngbin97225 -> 97089 bytes
-rw-r--r--keyboards/ergodox/keymaps/algernon/images/steno-layer.pngbin69557 -> 64086 bytes
-rw-r--r--keyboards/ergodox/keymaps/algernon/keymap.c41
-rw-r--r--keyboards/ergodox/keymaps/algernon/readme.md133
-rw-r--r--keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json27
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/hid-commands12
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py5
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/text-to-log.py24
-rw-r--r--keyboards/ergodox/keymaps/coderkun_neo2/keymap.c29
-rw-r--r--keyboards/ergodox/keymaps/dave/keymap.c12
-rw-r--r--keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c231
-rw-r--r--keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/osx_whiskey_tango_foxtrot_capslock.pngbin0 -> 185064 bytes
-rw-r--r--keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md38
-rw-r--r--keyboards/ergodox/keymaps/pvinis/Changelog.md7
-rw-r--r--keyboards/ergodox/keymaps/pvinis/Makefile9
-rw-r--r--keyboards/ergodox/keymaps/pvinis/Readme.md65
-rw-r--r--keyboards/ergodox/keymaps/pvinis/keymap.c430
-rw-r--r--keyboards/handwired/gamenum/Makefile3
-rw-r--r--keyboards/handwired/gamenum/README.md102
-rw-r--r--keyboards/handwired/gamenum/config.h162
-rw-r--r--keyboards/handwired/gamenum/gamenum.c14
-rw-r--r--keyboards/handwired/gamenum/gamenum.h21
-rw-r--r--keyboards/handwired/gamenum/keymaps/default/keymap.c68
-rw-r--r--keyboards/handwired/gamenum/rules.mk73
-rw-r--r--keyboards/planck/keymaps/callum/keymap.c90
-rw-r--r--keyboards/planck/keymaps/callum/readme.md6
-rw-r--r--keyboards/planck/keymaps/vifon/Makefile25
-rw-r--r--keyboards/planck/keymaps/vifon/config.h91
-rw-r--r--keyboards/planck/keymaps/vifon/keymap.c187
-rw-r--r--quantum/dynamic_macro.h9
-rw-r--r--quantum/keymap.h6
-rw-r--r--quantum/process_keycode/process_unicode.c1
-rw-r--r--quantum/rgblight.c61
-rw-r--r--quantum/rgblight.h6
-rw-r--r--readme.md9
41 files changed, 1921 insertions, 293 deletions
diff --git a/keyboards/cluecard/keymaps/default/readme.md b/keyboards/cluecard/keymaps/default/readme.md
index 9e3b97bea..fa4e8ccad 100644
--- a/keyboards/cluecard/keymaps/default/readme.md
+++ b/keyboards/cluecard/keymaps/default/readme.md
@@ -1 +1,5 @@
1# The default keymap for cluecard 1# The default keymap for cluecard
2
3Note that this keymap has audio enabled, so the RGB mode button does not go through the different effects.
4So the LEDs will still show a static light, that is configurable with the hue, staturation and brightness
5buttons. You can of course also turn them on and off with the on/off button.
diff --git a/keyboards/cluecard/keymaps/rgb_effects/Makefile b/keyboards/cluecard/keymaps/rgb_effects/Makefile
new file mode 100644
index 000000000..00670c0cf
--- /dev/null
+++ b/keyboards/cluecard/keymaps/rgb_effects/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = no # Mouse keys(+4700)
7EXTRAKEY_ENABLE = no # Audio control and System control(+450)
8CONSOLE_ENABLE = yes # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif
diff --git a/keyboards/cluecard/keymaps/rgb_effects/config.h b/keyboards/cluecard/keymaps/rgb_effects/config.h
new file mode 100644
index 000000000..e88847df4
--- /dev/null
+++ b/keyboards/cluecard/keymaps/rgb_effects/config.h
@@ -0,0 +1,12 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6// place overrides here
7#define RGBLIGHT_TIMER
8#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
9#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
10#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2
11
12#endif
diff --git a/keyboards/cluecard/keymaps/rgb_effects/keymap.c b/keyboards/cluecard/keymaps/rgb_effects/keymap.c
new file mode 100644
index 000000000..74c95ce8a
--- /dev/null
+++ b/keyboards/cluecard/keymaps/rgb_effects/keymap.c
@@ -0,0 +1,28 @@
1#include "cluecard.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4 [0] = KEYMAP(
5 RGB_TOG, RGB_SAI, RGB_VAI, \
6 RGB_HUD, RGB_HUI, \
7 RGB_MOD, RGB_SAD, RGB_VAD, \
8 BL_STEP, \
9 KC_NO, KC_NO, KC_NO \
10 )
11};
12
13const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {255, 170, 85};
14const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {255, 170, 85};
15
16void matrix_init_user(void) {
17}
18
19void matrix_scan_user(void) {
20
21}
22
23bool process_record_user(uint16_t keycode, keyrecord_t *record) {
24 return true;
25}
26
27void led_set_user(uint8_t usb_led) {
28}
diff --git a/keyboards/cluecard/keymaps/rgb_effects/readme.md b/keyboards/cluecard/keymaps/rgb_effects/readme.md
new file mode 100644
index 000000000..949cac394
--- /dev/null
+++ b/keyboards/cluecard/keymaps/rgb_effects/readme.md
@@ -0,0 +1,7 @@
1# RGB effect test keymap for cluecard
2
3This keymap is made for testing the RGB effects. Audio is disabled and the mode buttons goes through each
4effect. If you run HID-listen you will be able to see which effect is active. For a list of effects, check
5the `rgblight.c` file.
6
7The hue, saturation and brightness buttons will work depending on which effect is active.
diff --git a/keyboards/ergodox/keymaps/algernon/NEWS.md b/keyboards/ergodox/keymaps/algernon/NEWS.md
new file mode 100644
index 000000000..6b95c1ef4
--- /dev/null
+++ b/keyboards/ergodox/keymaps/algernon/NEWS.md
@@ -0,0 +1,145 @@
1## v1.8
2
3*2016-10-03*
4
5### ADORE
6
7* Major rearrangements were made, to reduce pinky use, and to balance out the hand usage.
8
9### Tools
10
11* The `hid-commands` tool will now display a notification when the **AppSel** layer is triggered.
12* The `log-to-heatmap.py` tool now treats the innermost keys on the bottom row as thumb keys, as far as statistics are concerned.
13
14### Miscellaneous
15
16* Fixed the [Steno](#steno-layer) toggle key.
17
18## v1.7
19
20*2016-09-18*
21
22### Overall changes
23
24* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers.
25* The number/function key behavior was changed: function keys are now on the **Media**.
26* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the [Base](#base-layer) and [ADORE](#adore-layer) layers.
27* The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped.
28* A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it.
29
30### ADORE
31
32* `Y` and `X` have been swapped again.
33
34### Media/Navigation layer
35
36* The function keys are now on this layer.
37* Mouse keys have been removed.
38* Media start/stop/prev/next have been removed.
39* `Print screen` has been removed.
40* There is only one screen lock key now.
41
42### Heatmap
43
44* Fixed a few issues in the finger-stats calculation.
45* The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool.
46* The heatmap tool will now colorize the stats by default.
47* The periodic stats are now printed in a more compact format.
48
49### Tools
50
51* Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes.
52* Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator.
53* A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side.
54
55## v1.6
56
57*2016-08-24*
58
59### Base layer changes
60
61* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`.
62* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`.
63* The `Apps` key has been replaced by `F12`.
64* The `-`/`_` is no longer a tap-dance key.
65
66### ADORE layer changes
67
68* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations.
69
70### Miscellaneous changes
71
72* `LEAD u` now starts the symbolic unicode input system, instead of the OS-one.
73* The mouse acceleration keys on the **Navigation/Media** layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off.
74* When the **ARROW** layer is on, the *red* and *blue* LEDs light up now.
75
76### Heatmap
77
78* The built-in keylogger has been greatly enhanced, it now outputs the pressed state, and the layer (Dvorak or ADORE). As such, the `ADORE_AUTOLOG` option has been removed, instead there is `AUTOLOG_ENABLE` now, which when enabled, makes the keylogger start when the keyboard boots. It defaults to off.
79* The heatmap generator received a lot of updates.
80
81## v1.5
82
83*2016-08-12*
84
85* The **1HAND** layer has been removed.
86* A `Delete` key is now available on the right thumb cluster.
87* The [ADORE](#adore-layer) layer received a major update, see the layout image above.
88* It is now possible to enable automatic logging for the [ADORE](#adore-layer) layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default.
89* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer).
90* On the **ARROW** layer, `Backspace` has been replaced by `Enter`.
91* There is some experimental support for entering Unicode symbols.
92
93## v1.4
94
95*2016-07-29*
96
97* When toggling the key logging on or off, the LEDs will do a little dance.
98* The keylogger is now optional, but enabled by default. Use `KEYLOGGER_ENABLE=no` on the `make` command line to disable it.
99* The `TAB`/`ARRW` key was turned into a tap-dance key, allowing one to toggle the **ARROW** layer on by double-tapping, and as such, avoid the need to hold the key.
100* The `-`/`_` key was turned into a tap-dance key too.
101* There is now a way to travel time with the keyboard, toggle the feature on by hitting `LEAD t`.
102
103## v1.3
104
105*2016-07-06*
106
107* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs.
108* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are.
109* The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now.
110* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot.
111
112## v1.2
113
114*2016-06-22*
115
116* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows).
117* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted.
118* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers.
119* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access.
120* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer.
121* `LEAD v` types the firmware version, and the keymap version.
122* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped.
123* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers.
124
125## v1.1
126
127*2016-06-14*
128
129* The keyboard starts in NKRO mode, bootmagic and other things are disabled.
130* A [Steno](#steno-layer) layer was added, to be used with Plover.
131* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress.
132* `LEAD y` types `\o/`.
133* Some keys on the [Base](#base-layer) layer have been moved around:
134 - `?` moved to the left pinky, left of `Q`.
135 - `=` shifted one row down, but `F11` stayed where it was.
136 - `-` on the left half was replaced by `Tab`.
137 - `Tab`'s original position is taken by a `Media Next`/`Media Prev` key.
138 - `:` now inputs `;` when shifted.
139* `ESC` cancels the **Hungarian** layer too, not just modifiers.
140
141## v1.0
142
143*2016-05-26*
144
145Initial version.
diff --git a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png
index b611fbc42..5f39010bb 100644
--- a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png
+++ b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/algernon/images/steno-layer.png b/keyboards/ergodox/keymaps/algernon/images/steno-layer.png
index fe3c03c93..9a2ba55ef 100644
--- a/keyboards/ergodox/keymaps/algernon/images/steno-layer.png
+++ b/keyboards/ergodox/keymaps/algernon/images/steno-layer.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c
index 248a0ed30..48d63fb0b 100644
--- a/keyboards/ergodox/keymaps/algernon/keymap.c
+++ b/keyboards/ergodox/keymaps/algernon/keymap.c
@@ -160,11 +160,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
160 * ,-----------------------------------------------------. ,-----------------------------------------------------. 160 * ,-----------------------------------------------------. ,-----------------------------------------------------.
161 * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | 161 * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
162 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| 162 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
163 * | `~ | X | W | G | L | M | ( | | ) | F | H | C | P | Y | \ | 163 * | \ | X | W | C | H | F | ( | | ) | M | G | L | P | / | `~ |
164 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| 164 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
165 * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = | 165 * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = |
166 * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------| 166 * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------|
167 * | | Z | Q | ' | , | . | | | pane | B | K | V | J | / | | 167 * | | Z | Q | ' | , | . | | | pane | B | K | V | Y | J | |
168 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' 168 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
169 * | | | | | : | | - | | | | | 169 * | | | | | : | | - | | | | |
170 * `-----------------------------------' `-----------------------------------' 170 * `-----------------------------------' `-----------------------------------'
@@ -179,7 +179,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
179[ADORE] = KEYMAP( 179[ADORE] = KEYMAP(
180// left hand 180// left hand
181 KC_MPLY ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11 181 KC_MPLY ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11
182,KC_GRV ,KC_X ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP) 182,KC_BSLS ,KC_X ,KC_W ,KC_C ,KC_H ,KC_F ,TD(CT_LBP)
183,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U 183,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U
184,KC_NO ,KC_Z ,KC_Q ,KC_QUOT ,KC_COMM ,KC_DOT ,TD(CT_TMUX) 184,KC_NO ,KC_Z ,KC_Q ,KC_QUOT ,KC_COMM ,KC_DOT ,TD(CT_TMUX)
185,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) 185,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN)
@@ -190,9 +190,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
190 190
191 // right hand 191 // right hand
192 ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) 192 ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
193 ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_Y ,KC_BSLS 193 ,TD(CT_RBP),KC_M ,KC_G ,KC_L ,KC_P ,KC_SLSH ,KC_GRV
194 ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL 194 ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL
195 ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO 195 ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_Y ,KC_J ,KC_NO
196 ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO 196 ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO
197 197
198 ,OSL(NMDIA),KC_DEL 198 ,OSL(NMDIA),KC_DEL
@@ -386,7 +386,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
386/* Keymap 6: Steno for Plover 386/* Keymap 6: Steno for Plover
387 * 387 *
388 * ,--------------------------------------------------. ,--------------------------------------------------. 388 * ,--------------------------------------------------. ,--------------------------------------------------.
389 * | | | | | | | BASE | | | | | | | | | 389 * | | | | | | | | | | | | | | | BASE |
390 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| 390 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
391 * | | # | # | # | # | # | # | | # | # | # | # | # | # | # | 391 * | | # | # | # | # | # | # | | # | # | # | # | # | # | # |
392 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 392 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
@@ -407,7 +407,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
407 407
408[PLVR] = KEYMAP( 408[PLVR] = KEYMAP(
409// left hand 409// left hand
410KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(A_PLVR), 410KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
411KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, 411KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM,
412KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, 412KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR,
413KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, 413KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR,
@@ -417,7 +417,7 @@ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
417 PV_A, PV_O, KC_NO, 417 PV_A, PV_O, KC_NO,
418 418
419 // right hand 419 // right hand
420 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 420 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(A_PLVR),
421 PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, 421 PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM,
422 PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, 422 PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD,
423 PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, 423 PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ,
@@ -617,6 +617,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
617 register_code (KC_LGUI); 617 register_code (KC_LGUI);
618 if (record->tap.count && !record->tap.interrupted) { 618 if (record->tap.count && !record->tap.interrupted) {
619 if (record->tap.count >= 2) { 619 if (record->tap.count >= 2) {
620 uprintf("CMD:appsel_start\n");
620 layer_on (APPSEL); 621 layer_on (APPSEL);
621 set_oneshot_layer (APPSEL, ONESHOT_START); 622 set_oneshot_layer (APPSEL, ONESHOT_START);
622 } 623 }
@@ -695,15 +696,15 @@ void matrix_init_user(void) {
695 696
696LEADER_EXTERNS(); 697LEADER_EXTERNS();
697 698
698static void ang_tap (uint8_t code, ...) { 699static void ang_tap (uint16_t code, ...) {
699 uint8_t kc = code; 700 uint16_t kc = code;
700 va_list ap; 701 va_list ap;
701 702
702 va_start(ap, code); 703 va_start(ap, code);
703 704
704 do { 705 do {
705 register_code(kc); 706 register_code16(kc);
706 unregister_code(kc); 707 unregister_code16(kc);
707 wait_ms(50); 708 wait_ms(50);
708 kc = va_arg(ap, int); 709 kc = va_arg(ap, int);
709 } while (kc != 0); 710 } while (kc != 0);
@@ -866,6 +867,17 @@ void matrix_scan_user(void) {
866 leading = false; 867 leading = false;
867 leader_end (); 868 leader_end ();
868 869
870 SEQ_ONE_KEY (KC_C) {
871 ang_tap (LSFT(KC_C), KC_S, KC_I, KC_L, KC_L, KC_RALT, KC_QUOT, KC_A, KC_M, KC_A, KC_S,
872 KC_S, KC_Z, KC_O, KC_N, KC_Y, KC_K, KC_RALT, KC_QUOT, KC_A, KC_M, 0);
873 }
874
875 SEQ_ONE_KEY (KC_G) {
876 ang_tap (LSFT(KC_G), KC_E, KC_J, KC_G, KC_RALT, KC_EQL, KC_O,
877 KC_RALT, KC_EQL, KC_O,
878 KC_RALT, KC_EQL, KC_O, 0);
879 }
880
869#if KEYLOGGER_ENABLE 881#if KEYLOGGER_ENABLE
870 SEQ_ONE_KEY (KC_D) { 882 SEQ_ONE_KEY (KC_D) {
871 ergodox_led_all_on(); 883 ergodox_led_all_on();
@@ -875,11 +887,6 @@ void matrix_scan_user(void) {
875 } 887 }
876#endif 888#endif
877 889
878 SEQ_ONE_KEY (KC_Q) {
879 register_code16 (LCTL(KC_1));
880 unregister_code16 (LCTL(KC_1));
881 }
882
883 SEQ_ONE_KEY (KC_T) { 890 SEQ_ONE_KEY (KC_T) {
884 time_travel = !time_travel; 891 time_travel = !time_travel;
885 } 892 }
diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md
index f15b67652..822ca3650 100644
--- a/keyboards/ergodox/keymaps/algernon/readme.md
+++ b/keyboards/ergodox/keymaps/algernon/readme.md
@@ -27,7 +27,7 @@ Some of the things in the layout only work when one uses [Spacemacs][spacemacs]
27 - [Unicode Symbol Input](#unicode-symbol-input) 27 - [Unicode Symbol Input](#unicode-symbol-input)
28* [Building](#building) 28* [Building](#building)
29 - [Using on Windows](#using-on-windows) 29 - [Using on Windows](#using-on-windows)
30* [Changelog](#changelog) 30* [Changelog](https://github.com/algernon/ergodox-layout/blob/master/NEWS.md#readme)
31* [License](#license) 31* [License](#license)
32 32
33# Layouts 33# Layouts
@@ -145,137 +145,6 @@ $ make keyboard=ergodox keymap=algernon
145 145
146The keymap default to forcing NKRO, which seems to upset Windows, and except the modifiers, none of them work. If you experience this problem, recompile the firmware with `FORCE_NKRO=no` added to the `make` command line. 146The keymap default to forcing NKRO, which seems to upset Windows, and except the modifiers, none of them work. If you experience this problem, recompile the firmware with `FORCE_NKRO=no` added to the `make` command line.
147 147
148# Changelog
149
150## v1.7
151
152*2016-09-18*
153
154### Overall changes
155
156* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers.
157* The number/function key behavior was changed: function keys are now on the **Media**.
158* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the [Base](#base-layer) and [ADORE](#adore-layer) layers.
159* The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped.
160* A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it.
161
162### ADORE
163
164* `Y` and `X` have been swapped again.
165
166### Media/Navigation layer
167
168* The function keys are now on this layer.
169* Mouse keys have been removed.
170* Media start/stop/prev/next have been removed.
171* `Print screen` has been removed.
172* There is only one screen lock key now.
173
174### Heatmap
175
176* Fixed a few issues in the finger-stats calculation.
177* The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool.
178* The heatmap tool will now colorize the stats by default.
179* The periodic stats are now printed in a more compact format.
180
181### Tools
182
183* Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes.
184* Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator.
185* A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side.
186
187## v1.6
188
189*2016-08-24*
190
191### Base layer changes
192
193* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`.
194* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`.
195* The `Apps` key has been replaced by `F12`.
196* The `-`/`_` is no longer a tap-dance key.
197
198### ADORE layer changes
199
200* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations.
201
202### Miscellaneous changes
203
204* `LEAD u` now starts the symbolic unicode input system, instead of the OS-one.
205* The mouse acceleration keys on the **Navigation/Media** layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off.
206* When the **ARROW** layer is on, the *red* and *blue* LEDs light up now.
207
208### Heatmap
209
210* The built-in keylogger has been greatly enhanced, it now outputs the pressed state, and the layer (Dvorak or ADORE). As such, the `ADORE_AUTOLOG` option has been removed, instead there is `AUTOLOG_ENABLE` now, which when enabled, makes the keylogger start when the keyboard boots. It defaults to off.
211* The heatmap generator received a lot of updates.
212
213## v1.5
214
215*2016-08-12*
216
217* The **1HAND** layer has been removed.
218* A `Delete` key is now available on the right thumb cluster.
219* The [ADORE](#adore-layer) layer received a major update, see the layout image above.
220* It is now possible to enable automatic logging for the [ADORE](#adore-layer) layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default.
221* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer).
222* On the **ARROW** layer, `Backspace` has been replaced by `Enter`.
223* There is some experimental support for entering Unicode symbols.
224
225## v1.4
226
227*2016-07-29*
228
229* When toggling the key logging on or off, the LEDs will do a little dance.
230* The keylogger is now optional, but enabled by default. Use `KEYLOGGER_ENABLE=no` on the `make` command line to disable it.
231* The `TAB`/`ARRW` key was turned into a tap-dance key, allowing one to toggle the **ARROW** layer on by double-tapping, and as such, avoid the need to hold the key.
232* The `-`/`_` key was turned into a tap-dance key too.
233* There is now a way to travel time with the keyboard, toggle the feature on by hitting `LEAD t`.
234
235## v1.3
236
237*2016-07-06*
238
239* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs.
240* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are.
241* The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now.
242* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot.
243
244## v1.2
245
246*2016-06-22*
247
248* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows).
249* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted.
250* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers.
251* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access.
252* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer.
253* `LEAD v` types the firmware version, and the keymap version.
254* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped.
255* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers.
256
257## v1.1
258
259*2016-06-14*
260
261* The keyboard starts in NKRO mode, bootmagic and other things are disabled.
262* A [Steno](#steno-layer) layer was added, to be used with Plover.
263* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress.
264* `LEAD y` types `\o/`.
265* Some keys on the [Base](#base-layer) layer have been moved around:
266 - `?` moved to the left pinky, left of `Q`.
267 - `=` shifted one row down, but `F11` stayed where it was.
268 - `-` on the left half was replaced by `Tab`.
269 - `Tab`'s original position is taken by a `Media Next`/`Media Prev` key.
270 - `:` now inputs `;` when shifted.
271* `ESC` cancels the **Hungarian** layer too, not just modifiers.
272
273## v1.0
274
275*2016-05-26*
276
277Initial version.
278
279# License 148# License
280 149
281The layout, being a derivative of the original TMK firmware which is under the GPL-2+, this layout is under the GPL as well, but GPL-3+, rather than the older version. 150The layout, being a derivative of the original TMK firmware which is under the GPL-2+, this layout is under the GPL as well, but GPL-3+, rather than the older version.
diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json
index 502d1e6ea..a34edcf87 100644
--- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json
+++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json
@@ -111,11 +111,11 @@
111 "x": 3.5, 111 "x": 3.5,
112 "a": 6 112 "a": 6
113 }, 113 },
114 "G", 114 "C",
115 { 115 {
116 "x": 10.5 116 "x": 10.5
117 }, 117 },
118 "C" 118 "L"
119 ], 119 ],
120 [ 120 [
121 { 121 {
@@ -128,11 +128,11 @@
128 "x": 1, 128 "x": 1,
129 "a": 6 129 "a": 6
130 }, 130 },
131 "L", 131 "H",
132 { 132 {
133 "x": 8.5 133 "x": 8.5
134 }, 134 },
135 "H", 135 "G",
136 { 136 {
137 "x": 1 137 "x": 1
138 }, 138 },
@@ -143,7 +143,7 @@
143 "y": -0.875, 143 "y": -0.875,
144 "x": 5.5 144 "x": 5.5
145 }, 145 },
146 "M", 146 "F",
147 { 147 {
148 "a": 4, 148 "a": 4,
149 "fa": [0, 0, 0], 149 "fa": [0, 0, 0],
@@ -158,7 +158,7 @@
158 { 158 {
159 "a": 6 159 "a": 6
160 }, 160 },
161 "F" 161 "M"
162 ], 162 ],
163 [ 163 [
164 { 164 {
@@ -167,7 +167,7 @@
167 "a": 4, 167 "a": 4,
168 "w": 1.5 168 "w": 1.5
169 }, 169 },
170 "\n\n~\n`", 170 "\n\n|\n\\",
171 { 171 {
172 "a": 6, 172 "a": 6,
173 "f": 3 173 "f": 3
@@ -175,14 +175,14 @@
175 "X", 175 "X",
176 { 176 {
177 "x": 14.5, 177 "x": 14.5,
178 "a": 6 178 "a": 4
179 }, 179 },
180 "Y", 180 "/\n?",
181 { 181 {
182 "a": 4, 182 "a": 4,
183 "w": 1.5 183 "w": 1.5
184 }, 184 },
185 "|\n\\" 185 "~\n`"
186 ], 186 ],
187 [ 187 [
188 { 188 {
@@ -312,7 +312,7 @@
312 { 312 {
313 "x": 1 313 "x": 1
314 }, 314 },
315 "J" 315 "Y"
316 ], 316 ],
317 [ 317 [
318 { 318 {
@@ -342,10 +342,9 @@
342 }, 342 },
343 "Z", 343 "Z",
344 { 344 {
345 "x": 14.5, 345 "x": 14.5
346 "a": 4
347 }, 346 },
348 "?\n/", 347 "J",
349 { 348 {
350 "f": 9, 349 "f": 9,
351 "g": true, 350 "g": true,
diff --git a/keyboards/ergodox/keymaps/algernon/tools/hid-commands b/keyboards/ergodox/keymaps/algernon/tools/hid-commands
index f3b83cf6d..2a6710be4 100755
--- a/keyboards/ergodox/keymaps/algernon/tools/hid-commands
+++ b/keyboards/ergodox/keymaps/algernon/tools/hid-commands
@@ -1,6 +1,8 @@
1#!/bin/bash 1#!/bin/bash
2set -e 2set -e
3 3
4LAST_APPSEL_START=0
5
4cmd_wm () { 6cmd_wm () {
5 WIN="$(xdotool getactivewindow)" 7 WIN="$(xdotool getactivewindow)"
6 wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz 8 wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz
@@ -34,6 +36,16 @@ cmd_appsel_chrome () {
34 _cmd_appsel chromium 36 _cmd_appsel chromium
35} 37}
36 38
39cmd_appsel_start () {
40 APPSEL_START=$(date +%s)
41 if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then
42 return
43 fi
44 LAST_APPSEL_START=$APPSEL_START
45 notify-send -t 1000 "Please select an application!" -c device -u low \
46 -i /usr/share/icons/Adwaita/24x24/devices/video-display.png
47}
48
37cmd_help () { 49cmd_help () {
38 cat <<EOF 50 cat <<EOF
39Use the source, Luke! 51Use the source, Luke!
diff --git a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py b/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py
index 09c737646..e927e0e39 100755
--- a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py
+++ b/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py
@@ -145,6 +145,11 @@ class Heatmap(object):
145 usage[0][4] = usage[0][4] + self.log[(c, r)] 145 usage[0][4] = usage[0][4] + self.log[(c, r)]
146 else: 146 else:
147 usage[1][0] = usage[1][0] + self.log[(c, r)] 147 usage[1][0] = usage[1][0] + self.log[(c, r)]
148 elif r == 4 and (c == 4 or c == 9): # bottom row thumb keys
149 if c <= 6: # left side
150 usage[0][4] = usage[0][4] + self.log[(c, r)]
151 else:
152 usage[1][0] = usage[1][0] + self.log[(c, r)]
148 else: 153 else:
149 fc = c 154 fc = c
150 hand = 0 155 hand = 0
diff --git a/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py b/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py
index e068c3cbf..f080c32cd 100755
--- a/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py
+++ b/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py
@@ -15,20 +15,20 @@ charmap = {
15 '6': [[11, 0]], '&': [[2, 5], [11, 0]], 15 '6': [[11, 0]], '&': [[2, 5], [11, 0]],
16 '8': [[12, 0]], 16 '8': [[12, 0]],
17 17
18 '`': [[0, 1]], '~': [[2, 5], [0, 1]], 18 '\\': [[0, 1]], '|': [[2, 5], [0, 1]],
19 'y': [[1, 1]], 'Y': [[2, 5], [1, 1]], 19 'x': [[1, 1]], 'X': [[2, 5], [1, 1]],
20 'w': [[2, 1]], 'W': [[2, 5], [2, 1]], 20 'w': [[2, 1]], 'W': [[2, 5], [2, 1]],
21 'g': [[3, 1]], 'G': [[2, 5], [3, 1]], 21 'c': [[3, 1]], 'C': [[2, 5], [3, 1]],
22 'l': [[4, 1]], 'L': [[2, 5], [4, 1]], 22 'h': [[4, 1]], 'H': [[2, 5], [4, 1]],
23 'm': [[5, 1]], 'M': [[2, 5], [5, 1]], 23 'f': [[5, 1]], 'F': [[2, 5], [5, 1]],
24 '[': [[6, 1]], '{': [[2, 5], [6, 1]], '(': [[6, 1], [6, 1]], 24 '[': [[6, 1]], '{': [[2, 5], [6, 1]], '(': [[6, 1], [6, 1]],
25 ']': [[7, 1]], '}': [[2, 5], [7, 1]], ')': [[7, 1], [7, 1]], 25 ']': [[7, 1]], '}': [[2, 5], [7, 1]], ')': [[7, 1], [7, 1]],
26 'f': [[8, 1]], 'F': [[2, 5], [8, 1]], 26 'm': [[8, 1]], 'M': [[2, 5], [8, 1]],
27 'h': [[9, 1]], 'H': [[2, 5], [9, 1]], 27 'g': [[9, 1]], 'G': [[2, 5], [9, 1]],
28 'c': [[10, 1]], 'C': [[2, 5], [10, 1]], 28 'l': [[10, 1]], 'L': [[2, 5], [10, 1]],
29 'p': [[11, 1]], 'P': [[2, 5], [11, 1]], 29 'p': [[11, 1]], 'P': [[2, 5], [11, 1]],
30 'x': [[12, 1]], 'X': [[2, 5], [12, 1]], 30 '/': [[12, 1]], '?': [[2, 5], [12, 1]],
31 '\\': [[13, 1]], '|': [[2, 5], [13, 1]], 31 '`': [[13, 1]], '~': [[2, 5], [13, 1]],
32 32
33 '\t': [[0, 2]], 33 '\t': [[0, 2]],
34 'a': [[1, 2]], 'A': [[2, 5], [1, 2]], 34 'a': [[1, 2]], 'A': [[2, 5], [1, 2]],
@@ -51,8 +51,8 @@ charmap = {
51 'b': [[8, 3]], 'B': [[2, 5], [8, 3]], 51 'b': [[8, 3]], 'B': [[2, 5], [8, 3]],
52 'k': [[9, 3]], 'K': [[2, 5], [9, 3]], 52 'k': [[9, 3]], 'K': [[2, 5], [9, 3]],
53 'v': [[10, 3]], 'V': [[2, 5], [10, 3]], 53 'v': [[10, 3]], 'V': [[2, 5], [10, 3]],
54 'j': [[11, 3]], 'J': [[2, 5], [11, 3]], 54 'y': [[11, 3]], 'Y': [[2, 5], [11, 3]],
55 '/': [[12, 3]], '?': [[2, 5], [12, 3]], 55 'j': [[12, 3]], 'J': [[2, 5], [12, 3]],
56 56
57 ':': [[4, 4]], ';': [[4, 4], [4, 4]], 57 ':': [[4, 4]], ';': [[4, 4], [4, 4]],
58 '-': [[9, 4]], '_': [[2, 5], [9, 4]], 58 '-': [[9, 4]], '_': [[2, 5], [9, 4]],
diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c
index 0eedecf3d..b62b14449 100644
--- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c
+++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c
@@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
141 * ├───────┼─────┼─────┼─────╆─────╅─────┤ │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤ 141 * ├───────┼─────┼─────┼─────╆─────╅─────┤ │ │ ├─────╆─────╅─────┼─────┼─────┼───────┤
142 * │ │ ├ │ ┼ │ ┤ │ ✓ │ ✕ ├─────┤ ├─────┤ │ F5 │ F6 │ F7 │ F8 │ │ 142 * │ │ ├ │ ┼ │ ┤ │ ✓ │ ✕ ├─────┤ ├─────┤ │ F5 │ F6 │ F7 │ F8 │ │
143 * ├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤ 143 * ├───────┼─────┼─────┼─────╄─────╃─────┤(TL2)│ │(TL3)├─────╄─────╃─────┼─────┼─────┼───────┤
144 * │ │ └ │ ┴ │ ┘ │ │ │ │ │ │ │ F1 │ F2 │ F3 │ F4 │ │ 144 * │ │ └ │ ┴ │ ┘ │ ↔ │ ⇔ │ │ │ │ │ F1 │ F2 │ F3 │ F4 │ │
145 * └─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘ 145 * └─┬─────┼─────┼─────┼─────┼─────┼─────┴─────┘ └─────┴─────┼─────┼─────┼─────┼─────┼─────┬─┘
146 * │ │ │(MO1)│ │(MO4)│ │(MO4)│ │(MO1)│ │ │ 146 * │ │ │(MO1)│ │(MO4)│ │(MO4)│ │(MO1)│ │ │
147 * └─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘ 147 * └─────┴─────┴─────┴─────┴─────┘ ┌─────┬─────┐ ┌─────┬─────┐ └─────┴─────┴─────┴─────┴─────┘
@@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
157 KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 157 KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
158 KC_TRNS, UC(0x250C),UC(0x252C),UC(0x2510),UC(0x2500),UC(0x2502),KC_TRNS, 158 KC_TRNS, UC(0x250C),UC(0x252C),UC(0x2510),UC(0x2500),UC(0x2502),KC_TRNS,
159 KC_TRNS, UC(0x251C),UC(0x253C),UC(0x2524),UC(0x2713),UC(0x2715), 159 KC_TRNS, UC(0x251C),UC(0x253C),UC(0x2524),UC(0x2713),UC(0x2715),
160 KC_TRNS, UC(0x2514),UC(0x2534),UC(0x2518),KC_TRNS,KC_TRNS,KC_TRNS, 160 KC_TRNS, UC(0x2514),UC(0x2534),UC(0x2518),UC(0x2194),UC(0x21D4),KC_TRNS,
161 KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 161 KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
162 KC_MS_L, KC_MS_U, 162 KC_MS_L, KC_MS_U,
163 KC_BTN1, 163 KC_BTN1,
@@ -290,3 +290,28 @@ void unicode_input_start (void) {
290 unregister_code(KC_LSFT); 290 unregister_code(KC_LSFT);
291 unregister_code(KC_LCTL); 291 unregister_code(KC_LCTL);
292}; 292};
293
294// Override method to use NEO_A instead of KC_A
295uint16_t hex_to_keycode(uint8_t hex)
296{
297 if (hex == 0x0) {
298 return KC_0;
299 } else if (hex < 0xA) {
300 return KC_1 + (hex - 0x1);
301 } else {
302 switch(hex) {
303 case 0xA:
304 return NEO_A;
305 case 0xB:
306 return NEO_B;
307 case 0xC:
308 return NEO_C;
309 case 0xD:
310 return NEO_D;
311 case 0xE:
312 return NEO_E;
313 case 0xF:
314 return NEO_F;
315 }
316 }
317}
diff --git a/keyboards/ergodox/keymaps/dave/keymap.c b/keyboards/ergodox/keymaps/dave/keymap.c
index 32c70097b..23c4e0490 100644
--- a/keyboards/ergodox/keymaps/dave/keymap.c
+++ b/keyboards/ergodox/keymaps/dave/keymap.c
@@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
38 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_H, 38 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_H,
39 CTL_T(KC_GRV),KC_NUBS,KC_NO, KC_NO, KC_LALT, 39 CTL_T(KC_GRV),KC_NUBS,KC_NO, KC_NO, KC_LALT,
40 KC_PSCREEN, KC_PSCREEN, 40 KC_PSCREEN, KC_PSCREEN,
41 TO(PROG, ON_PRESS), 41 TO(PROG),
42 KC_SPC, MO(NAVI), KC_LGUI, 42 KC_SPC, MO(NAVI), KC_LGUI,
43 // right hand 43 // right hand
44 KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, 44 KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC,
@@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
47 KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, 47 KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
48 KC_RALT,KC_LBRC,KC_RBRC,KC_NO, CTL_T(KC_QUOT), 48 KC_RALT,KC_LBRC,KC_RBRC,KC_NO, CTL_T(KC_QUOT),
49 MT(0x5, KC_NO), MT(0x5, KC_NO), 49 MT(0x5, KC_NO), MT(0x5, KC_NO),
50 TO(PROG, ON_PRESS), 50 TO(PROG),
51 KC_RGUI, MO(PROG), KC_SPC 51 KC_RGUI, MO(PROG), KC_SPC
52 ), 52 ),
53 53
@@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
81 KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, 81 KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS,
82 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 82 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
83 KC_TRNS, KC_TRNS, 83 KC_TRNS, KC_TRNS,
84 TO(NAVI, ON_PRESS), 84 TO(NAVI),
85 KC_TRNS, KC_TRNS, KC_TRNS, 85 KC_TRNS, KC_TRNS, KC_TRNS,
86 // right hand 86 // right hand
87 KC_TRNS, KC_TRNS, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, KC_EQUAL, 87 KC_TRNS, KC_TRNS, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, KC_EQUAL,
@@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
90 KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT, KC_TRNS, 90 KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT, KC_TRNS,
91 KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_TRNS, 91 KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_TRNS,
92 KC_TRNS, KC_TRNS, 92 KC_TRNS, KC_TRNS,
93 TO(NAVI, ON_PRESS), 93 TO(NAVI),
94 KC_TRNS, KC_TRNS, KC_TRNS 94 KC_TRNS, KC_TRNS, KC_TRNS
95), 95),
96 96
@@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
123 KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, 123 KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS,
124 KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, 124 KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
125 KC_TRNS, KC_TRNS, 125 KC_TRNS, KC_TRNS,
126 TO(BASE, ON_PRESS), 126 TO(BASE),
127 KC_TRNS, KC_TRNS, KC_TRNS, 127 KC_TRNS, KC_TRNS, KC_TRNS,
128 // right hand 128 // right hand
129 KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, 129 KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
@@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
132 KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, 132 KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS,
133 KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, 133 KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS,
134 KC_TRNS, KC_TRNS, 134 KC_TRNS, KC_TRNS,
135 TO(BASE, ON_PRESS), 135 TO(BASE),
136 KC_TRNS, KC_TRNS, KC_TRNS 136 KC_TRNS, KC_TRNS, KC_TRNS
137), 137),
138}; 138};
diff --git a/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c
new file mode 100644
index 000000000..98d2836ab
--- /dev/null
+++ b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/keymap.c
@@ -0,0 +1,231 @@
1/*
2 * This is built out of frustration with OSX / Sierra caps lock delay.
3 * Fake it till you make it!
4 */
5
6#include "ergodox.h"
7#include "debug.h"
8#include "action_layer.h"
9#include "timer.h"
10
11#define BASE 0 // default layer
12#define SYMB 1 // symbols
13#define MDIA 2 // media keys
14
15#define BLINK_BASE 150U // timer threshold for blinking on MDIA layer
16
17typedef enum onoff_t {OFF, ON} onoff;
18
19#define caps_led_on ergodox_right_led_2_on
20#define caps_led_off ergodox_right_led_2_off
21
22const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
23/* Keymap 0: Basic layer
24 *
25 * ,--------------------------------------------------. ,--------------------------------------------------.
26 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | | ` | 7 | 8 | 9 | 0 | - | = |
27 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
28 * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
29 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
30 * | CapsL | A | S | D | F | G |------| |------| H | J | K | L | ; | " |
31 * |--------+------+------+------+------+------| ~L1 | | ~L1 |------+------+------+------+------+--------|
32 * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
33 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
34 * | Ctrl | Opt | Cmd | Left | Right| | Down | Up | Ctrl | Cmd | Opt |
35 * `----------------------------------' `----------------------------------'
36 * ,-------------. ,-------------.
37 * | | L1 | | Alt | Ctrl ]
38 * ,------|------|------| |------+--------+------.
39 * | | | Home | | PgUp | | |
40 * |Backsp| Del |------| |------| Enter | Spc |
41 * | | | End | | PgDn | | |
42 * `--------------------' `----------------------'
43 */
44
45 [BASE] = KEYMAP( // layer 0 : default
46 // left hand
47 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
48 KC_TAB, M(KC_Q), M(KC_W), M(KC_E), M(KC_R), M(KC_T), KC_LBRC,
49 M(KC_CAPS), M(KC_A), M(KC_S), M(KC_D), M(KC_F), M(KC_G),
50 KC_LSFT, M(KC_Z), M(KC_X), M(KC_C), M(KC_V), M(KC_B), KC_FN0,
51 KC_LCTL, KC_LALT, KC_LGUI, KC_LEFT, KC_RGHT,
52 KC_TRNS, KC_FN1,
53 KC_HOME,
54 KC_BSPC, KC_DEL, KC_END,
55 // right hand
56 KC_GRV, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
57 KC_RBRC, M(KC_Y), M(KC_U), M(KC_I), M(KC_O), M(KC_P), KC_BSLS,
58 M(KC_H), M(KC_J), M(KC_K), M(KC_L), KC_SCLN, KC_QUOT,
59 KC_FN0, M(KC_N), M(KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
60 KC_DOWN, KC_UP, KC_RCTL, KC_RGUI, KC_RALT,
61 KC_RALT, KC_RCTL,
62 KC_PGUP,
63 KC_PGDN, KC_ENT, KC_SPC
64 ),
65/* Keymap 1: Symbol Layer
66 *
67 * ,--------------------------------------------------. ,--------------------------------------------------.
68 * | ` | F1 | F2 | F3 | F4 | F5 | F6 | | | F7 | F8 | F9 | F10 | F11 | F12 |
69 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
70 * | | | | | | | | | | | | | | | |
71 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
72 * | | | | | | |------| |------| | | | | | |
73 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
74 * | | | | | | | | | | | | | | | |
75 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
76 * | | | | | | | | | | | |
77 * `----------------------------------' `----------------------------------'
78 * ,-------------. ,-------------.
79 * | L0 | L2 | | | |
80 * ,------|------|------| |------+------+------.
81 * | | | | | | | |
82 * | | |------| |------| | |
83 * | | | | | | | |
84 * `--------------------' `--------------------'
85 */
86// SYMBOLS
87 [SYMB] = KEYMAP(
88 // left hand
89 KC_GRV ,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
90 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
91 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
92 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
93 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
94 KC_FN3, KC_FN2,
95 KC_TRNS,
96 KC_TRNS,KC_TRNS,KC_TRNS,
97 // right hand
98 KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
99 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
100 KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
101 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
102 KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
103 KC_TRNS, KC_TRNS,
104 KC_TRNS,
105 KC_TRNS, KC_TRNS, KC_TRNS
106 ),
107/* Keymap 2: Media and tenkey
108 *
109 * ,--------------------------------------------------. ,--------------------------------------------------.
110 * | BOOTL | | Mute | Vol- | Vol+ | F14 | F15 | | | | NumLk| / | * | - | |
111 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
112 * | | | | | | | | | | | 7 | 8 | 9 | + | |
113 * |--------+------+------+------+------+------| | | |------+-----+-------+------+------+--------|
114 * | | | | | | |------| |------| | 4 | 5 | 6 | + | |
115 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
116 * | | | | | | | | | | | 1 | 2 | 3 | Enter| |
117 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
118 * | | | | | | | 0 | 0 | . | Enter| |
119 * `----------------------------------' `----------------------------------'
120 * ,-------------. ,-------------.
121 * | L1 | | | | |
122 * ,------|------|------| |------+------+------.
123 * | | | | | | | |
124 * | | |------| |------| | |
125 * | | | | | | | |
126 * `--------------------' `--------------------'
127 */
128 // MEDIA AND TENKEY
129 [MDIA] = KEYMAP(
130 KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_F14, KC_F15,
131 KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
132 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
133 KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
134 KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO,
135 KC_FN4, KC_NO,
136 KC_TRNS,
137 KC_TRNS, KC_TRNS, KC_TRNS,
138 // right hand
139 KC_NO, KC_NO, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_NO,
140 KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_NO,
141 KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO,
142 KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_NO,
143 KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_NO,
144 KC_NO, KC_NO,
145 KC_TRNS,
146 KC_TRNS, KC_TRNS, KC_TRNS
147 ),
148};
149
150const uint16_t PROGMEM fn_actions[] = {
151 ACTION_LAYER_MOMENTARY(SYMB), // FN0 - Momentary Layer 1 (Symbols)
152 ACTION_LAYER_ON(SYMB,ON_RELEASE), // FN1 - Enable Layer 1 (Symbols)
153 ACTION_LAYER_ON(MDIA,ON_RELEASE), // FN2 - Enable Layer 2 (Media)
154 ACTION_LAYER_OFF(SYMB,ON_RELEASE), // FN3 - Disable Layer 1 (Symbols)
155 ACTION_LAYER_OFF(MDIA,ON_RELEASE), // FN4 - Disable Layer 2 (MMedia)
156 ACTION_LAYER_MOMENTARY(MDIA) // FN5 - Momentary Layer 2 (Mdia)
157};
158
159
160const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
161 static onoff caps_state = OFF;
162 switch(id) {
163 case KC_CAPS:
164 if (record->event.pressed) {
165 // Toggle caps state;
166 if (caps_state == OFF) {
167 // Turn it on then!
168 caps_led_on();
169 caps_state = ON;
170 } else {
171 caps_led_off();
172 caps_state = OFF;
173 }
174 }
175 break;
176 default:
177 if (record->event.pressed) {
178 bool shifted = false;
179 if (caps_state == ON && get_mods() == 0) {
180 register_code(KC_LSFT);
181 shifted = true;
182 }
183 register_code(id);
184 if(shifted) {
185 unregister_code(KC_LSFT);
186 }
187 } else {
188 unregister_code(id);
189 }
190 break;
191 }
192 return MACRO_NONE;
193};
194
195// Runs just one time when the keyboard initializes.
196void matrix_init_user(void) {
197
198}
199// Runs constantly in the background, in a loop.
200void matrix_scan_user(void) {
201 uint8_t layer = biton32(layer_state);
202
203 static onoff board_led_state = OFF;
204 static uint16_t dt = 0;
205 static uint8_t oldlayer = 0;
206
207 if(oldlayer != layer) {
208 // Layer was just toggled.
209 if(layer == BASE) {
210 ergodox_board_led_off();
211 board_led_state = OFF;
212 } else {
213 ergodox_board_led_on();
214 board_led_state = ON;
215 }
216 } else if (layer >= MDIA) {
217 // We need to do blinking.
218 if(timer_elapsed(dt) > BLINK_BASE) {
219 // toggle
220 dt = timer_read();
221 if(board_led_state == OFF) {
222 ergodox_board_led_on();
223 board_led_state = ON;
224 } else {
225 ergodox_board_led_off();
226 board_led_state = OFF;
227 }
228 }
229 }
230 oldlayer = layer;
231}
diff --git a/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/osx_whiskey_tango_foxtrot_capslock.png b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/osx_whiskey_tango_foxtrot_capslock.png
new file mode 100644
index 000000000..8d49e5e61
--- /dev/null
+++ b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/osx_whiskey_tango_foxtrot_capslock.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md
new file mode 100644
index 000000000..618db6ff4
--- /dev/null
+++ b/keyboards/ergodox/keymaps/osx_whiskey_tango_foxtrot_capslock/readme.md
@@ -0,0 +1,38 @@
1# The extra special ergodox build for MacOS Sierra caps lock users
2
3###Do you
4- Hate the OSX / MacOS caps lock delay?
5- Have an ergodox?
6
7###Then this might just be for you!
8
9[This](http://apple.stackexchange.com/questions/81234/how-to-remove-caps-lock-delay-on-apple-macbook-pro-aluminum-keyboard)
10and [this](http://sleepycow.org/2014/07/removing-the-caps-lock-delay-on-a-macbook/)
11are good workarounds for the caps lock delay, however none of these
12work on Sierra. This abomination of a keymap simulates capslock to the best
13of its abilities.
14This means that it keeps track of caps lock state internally rather than
15sending a caps lock keypress to the OS. It is smart enough to check for
16modifiers, such as Control being held down, and stop it with the hanky panky
17and just send on the key event unmolested even if FakeCaps is enabled. And
18since the macro isn't even registered on the non-alphas, it will not affect
19them regardless. Only in the event that FakeCaps is enabled and an alpha key
20is pressed will it sneak in a shift keydown before the alpha keydown and
21immediately afterward sneaks in a shift keyup. Generally this works well,
22however there is one known issue:
23
24- Holding down a key will only have the first character in caps. For instance,
25 with caps lock on, if you hold down the 'a' key, you get:
26
27 ```
28 Aaaaaaaaaaaaaaaaaa
29 ```
30
31I have only tested this on an original Ergodox with a Teensy 2.0.
32
33####Some other small tweaks
34 - Layer 0 board light is off
35 - Layer 1 board light is on solid
36 - Layer 2 board light blinks at speed controlled by BLINK_BASE
37
38![osx whiskey tango foxtrot](osx_whiskey_tango_foxtrot_capslock.png)
diff --git a/keyboards/ergodox/keymaps/pvinis/Changelog.md b/keyboards/ergodox/keymaps/pvinis/Changelog.md
new file mode 100644
index 000000000..e5816200b
--- /dev/null
+++ b/keyboards/ergodox/keymaps/pvinis/Changelog.md
@@ -0,0 +1,7 @@
1## v0.3
2
3*2016-10-11*
4
5### Starting point
6
7* The starting point of this keymap. A beginner layout, and a couple placeholders.
diff --git a/keyboards/ergodox/keymaps/pvinis/Makefile b/keyboards/ergodox/keymaps/pvinis/Makefile
new file mode 100644
index 000000000..7ceb51ce4
--- /dev/null
+++ b/keyboards/ergodox/keymaps/pvinis/Makefile
@@ -0,0 +1,9 @@
1CONSOLE_ENABLE = no # for debugging
2
3SLEEP_LED_ENABLE = no # no led blinking while sleeping
4NKRO_ENABLE = yes # disable for windows
5TAP_DANCE_ENABLE = yes # tap-tap-tap
6
7ifndef QUANTUM_DIR
8 include ../../../../Makefile
9endif
diff --git a/keyboards/ergodox/keymaps/pvinis/Readme.md b/keyboards/ergodox/keymaps/pvinis/Readme.md
new file mode 100644
index 000000000..2a4a0c8f3
--- /dev/null
+++ b/keyboards/ergodox/keymaps/pvinis/Readme.md
@@ -0,0 +1,65 @@
1pvinis' keymap
2==============
3
4This is a getting-used-to keymap for the [ErgoDox EZ][ez]. It's very much a work in progress.
5
6[ez]: https://ergodox-ez.com/
7
8## Table of Contents
9
10* [Todo](#todo)
11* [Layouts](#layouts)
12 - [Base layer](#base-layer)
13 - [Beginner layer](#beginner-layer)
14 - [QWERTY layer](#qwerty-layer)
15 - [CARPALX layer](#carpalx-layer)
16 - [System Control layer](#system-control-layer)
17 - [Template layers](#template-layers)
18* [Building](#building)
19
20# Todo
21
22- [ ] Generate images from keymap
23- [ ] Implement algernon's heatmap
24- [ ] Implement `KC_POP`
25
26# Layouts
27
28## Base layer
29
30This is the base layer that contains the common buttons of all keymaps. Right now, it has the top left button as a `flash` button when it's tapped 4 times, and the two thumb islands. The islands contain the `space` and `enter` keys on the right, the `backspace` and `shift` on the left, and all the 1x1 keys are just layer switches.
31Every time I connect the keyboard, I press the `BEGIN` layer switch, and then start typing.
32Recently, I added a few application "shortcuts", that basically call `ctrl`+`alt`+`cmd`+`<key>`, and `<key>` is `S` for Slack, `X` for Xcode, `M` for Messenger. Using [Hammerspoon][hammerspoon], I show/hide the application.
33
34[hammerspoon]: http://www.hammerspoon.org/
35
36## Beginner layer
37
38This is a basic keymap I use right now until I'm comfortable typing on the Ergodox. Currently uses a QWERTY layout, and the `([{}])` on the middle keys. Not a perfect layout, and its going to go away at some point, but for now thats my daily driver.
39
40## QWERTY layer
41
42This is basically the same as the `BEGIN` layer, but it might go away. I'm not using it, but I should have a QWERTY layout on the keyboard, in case someone else wants to try it out, or if I completely forget how keyboards work! At some point, this and the `BEGIN` layer will become one.
43
44## CARPALX layer
45
46This is here as a placeholder. I want to transition to [Carpalx QGMLWY][carpalx] or [White][white] at some point. They both look very interesting and more comfortable to type on, but after I'm confident with typing on the Ergodox.
47
48[carpalx]: http://mkweb.bcgsc.ca/carpalx/?full_optimization
49[white]: https://github.com/mw8/white_keyboard_layout
50
51## System Control layer
52
53This one is a layer that, in time, will have controls like mouse movement, volume up/down, mute, sleep, restart, shutdown, etc.
54
55## Template layers
56
57I have two commented out layers that are just templates, so I can easily create a new layer.
58
59# Building
60
61```
62$ git clone https://github.com/jackhumbert/qmk_firmware.git
63$ cd qmk_firmware/keyboards/ergodox/keymaps/pvinis
64$ make
65```
diff --git a/keyboards/ergodox/keymaps/pvinis/keymap.c b/keyboards/ergodox/keymaps/pvinis/keymap.c
new file mode 100644
index 000000000..df906201a
--- /dev/null
+++ b/keyboards/ergodox/keymaps/pvinis/keymap.c
@@ -0,0 +1,430 @@
1// pvinis' ergodox keymap
2
3#include "ergodox.h"
4#include "mousekey.h"
5
6// easier name for left ctrl-alt-gui
7#define ALLM(kc) LCAG(kc)
8
9// layers
10enum {
11 BASE = 0,
12 BEGIN,
13 QWERTY,
14 CARPALX,
15 SYSCTL,
16};
17
18// extra keys
19enum {
20 NONE = 0,
21
22 // mouse
23 MS_UL, // up left
24 MS_UR, // up right
25 MS_DL, // down left
26 MS_DR, // down right
27
28 // tap dance
29 TD_FLSH, // flash keyboard
30};
31
32// application selection
33// this is sending ctrl-alt-gui-<key>, and this is picked up by hammerspoon
34#define AP_SLCK ALLM(KC_S)
35#define AP_XCOD ALLM(KC_X)
36#define AP_MSGR ALLM(KC_M)
37
38// keymaps
39const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
40/* BASE
41 * the base of the keyboard.
42 *
43 * ,--------------------------------------------------. ,--------------------------------------------------.
44 * |4x FLASH| | | | | | | | | | | | | | |
45 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
46 * | | | | | | | | | | | | | | | |
47 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
48 * | | | | | | |------| |------| | | | | | |
49 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
50 * | | | | | | | | | | | | | | | |
51 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
52 * | | | | | | | | | | | |
53 * `----------------------------------' `----------------------------------'
54 * ,-------------. ,-------------.
55 * |BEGIN |QWERTY| |SYSCTL| |
56 * ,------|------|------| |------+--------+------.
57 * | | |CARPAL| |Slack | | |
58 * |Backsp|LShift|------| |------| Enter |Space |
59 * | | |SYSCTL| |Msngr | | |
60 * `--------------------' `----------------------'
61 */
62[BASE] = KEYMAP(
63 TD(TD_FLSH) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
64,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
65,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
66,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
67,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
68
69 ,TG(BEGIN) ,TG(QWERTY)
70 ,TG(CARPALX)
71 ,KC_BSPC ,KC_LSFT ,TG(SYSCTL)
72
73 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
74 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
75 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
76 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
77 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
78
79 ,TG(SYSCTL) ,KC_NO
80 ,AP_SLCK
81 ,AP_MSGR ,KC_ENT ,KC_SPC
82),
83
84/* BEGIN
85 * a beginner's keymap i currently use.
86 *
87 * ,--------------------------------------------------. ,--------------------------------------------------.
88 * | | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | = |
89 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
90 * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
91 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
92 * |Esc/Ctrl| A | S | D | F | G |------| |------| H | J | K | L | ; | Enter |
93 * |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------|
94 * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
95 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
96 * | | ` | Cmd | | Cmd | | | | | ' | |
97 * `----------------------------------' `----------------------------------'
98 * ,-------------. ,-------------.
99 * | | | | | |
100 * ,------|------|------| |------+--------+------.
101 * | | | | | | | |
102 * | | |------| |------| | |
103 * | | | | | | | |
104 * `--------------------' `----------------------'
105 */
106[BEGIN] = KEYMAP(
107 KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6
108,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC
109,CTL_T(KC_ESC) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G
110,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LPRN
111,KC_TRNS ,KC_GRV ,KC_LGUI ,KC_LEFT ,KC_RIGHT
112
113 ,KC_TRNS ,KC_TRNS
114 ,KC_TRNS
115 ,KC_TRNS ,KC_TRNS ,KC_TRNS
116
117 ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_EQL
118 ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS
119 ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT
120 ,KC_RPRN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT
121 ,KC_UP ,KC_DOWN ,KC_TRNS ,KC_QUOT ,KC_TRNS
122
123 ,KC_TRNS ,KC_TRNS
124 ,KC_TRNS
125 ,KC_TRNS ,KC_TRNS ,KC_TRNS
126),
127
128/* QWERTY
129 * the default qwerty keymap. not really used, but i'll keep it here for now.
130 *
131 * ,--------------------------------------------------. ,--------------------------------------------------.
132 * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
133 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
134 * | | Q | W | E | R | T | | | | Y | U | I | O | P | |
135 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
136 * | | A | S | D | F | G |------| |------| H | J | K | L | ; | |
137 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
138 * | | Z | X | C | V | B | | | | N | M | , | . | / | |
139 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
140 * | | | | | | | | | | | |
141 * `----------------------------------' `----------------------------------'
142 * ,-------------. ,-------------.
143 * | | | | | |
144 * ,------|------|------| |------+--------+------.
145 * | | | | | | | |
146 * | | |------| |------| | |
147 * | | | | | | | |
148 * `--------------------' `----------------------'
149 */
150[QWERTY] = KEYMAP(
151 KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS
152,KC_TRNS ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_TRNS
153,KC_TRNS ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G
154,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_TRNS
155,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
156
157 ,KC_TRNS ,KC_TRNS
158 ,KC_TRNS
159 ,KC_TRNS ,KC_TRNS ,KC_TRNS
160
161 ,KC_TRNS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS
162 ,KC_TRNS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_TRNS
163 ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_TRNS
164 ,KC_TRNS ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS
165 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
166
167 ,KC_TRNS ,KC_TRNS
168 ,KC_TRNS
169 ,KC_TRNS ,KC_TRNS ,KC_TRNS
170),
171
172/* CARPALX
173 * the keymap i would like to transition to.
174 *
175 * ,--------------------------------------------------. ,--------------------------------------------------.
176 * | | 1 | 2 | 3 | 4 | 5 | | | RIGHT| 6 | 7 | 8 | 9 | 0 | |
177 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
178 * | | Q | G | M | L | W | | | L1 | Y | F | U | B | ; | |
179 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
180 * | | D | S | T | N | R |------| |------| I | A | E | O | H | |
181 * |--------+------+------+------+------+------| | | Meh |------+------+------+------+------+--------|
182 * | | Z | X | C | V | J | | | | K | P | , | . | / | |
183 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
184 * | | | | | | | Up | | | | |
185 * `----------------------------------' `----------------------------------'
186 * ,-------------. ,-------------.
187 * | | | | | |
188 * ,------|------|------| |------+------+------.
189 * | | | | | | | |
190 * | | |------| |------| | |
191 * | | | | | | | |
192 * `--------------------' `--------------------'
193 */
194[CARPALX] = KEYMAP(
195 KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS
196,KC_TRNS ,KC_Q ,KC_G ,KC_M ,KC_L ,KC_W ,KC_TRNS
197,KC_TRNS ,KC_D ,KC_S ,KC_T ,KC_N ,KC_R
198,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_J ,KC_TRNS
199,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
200
201 ,KC_TRNS ,KC_TRNS
202 ,KC_TRNS
203 ,KC_TRNS ,KC_TRNS ,KC_TRNS
204
205 ,KC_TRNS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS
206 ,KC_TRNS ,KC_Y ,KC_F ,KC_U ,KC_B ,KC_SCLN ,KC_TRNS
207 ,KC_I ,KC_A ,KC_E ,KC_O ,KC_H ,KC_TRNS
208 ,KC_TRNS ,KC_K ,KC_P ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS
209 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
210
211 ,KC_TRNS ,KC_TRNS
212 ,KC_TRNS
213 ,KC_TRNS ,KC_TRNS ,KC_TRNS
214),
215
216
217/* SYSCTL
218 * a keymap to control my system.
219 *
220 * ,--------------------------------------------------. ,--------------------------------------------------.
221 * | | | | | | | | | | | | Mute |VolDn |VolUp | |
222 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
223 * | | | | | | | | | | |MsUpL | MsUp |MsUpR | | |
224 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
225 * | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | Lock |
226 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
227 * | | | | | | | | | | |MsDnL | MsDn | | | Sleep |
228 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
229 * | | | | | | | | | | | Power|
230 * `----------------------------------' `----------------------------------'
231 * ,-------------. ,-------------.
232 * | | | | |MidClk|
233 * ,------|------|------| |------+------+------.
234 * | | | | | |Left |Right |
235 * | | |------| |------| Click| Click|
236 * | | | | | | | |
237 * `--------------------' `--------------------'
238 */
239[SYSCTL] = KEYMAP(
240 KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
241,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
242,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
243,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
244,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
245
246 ,KC_NO ,KC_NO
247 ,KC_NO
248 ,KC_NO ,KC_NO ,KC_NO
249
250 /*,KC_POP*/,KC_NO ,KC_NO ,KC_NO ,KC_MUTE ,KC_VOLD ,KC_VOLU ,KC_NO
251 /*,KC_PTRN*/,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
252 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LCTL(LSFT(KC_PWR))
253 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_SLEP
254 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_PWR
255
256 ,KC_NO ,KC_NO
257 ,KC_NO
258 ,KC_NO ,KC_NO ,KC_NO
259),
260
261/* TEMPLATE
262 * keymap template with transparent and non-transparent keys
263 *
264 * ,--------------------------------------------------. ,--------------------------------------------------.
265 * | | | | | | | | | | | | | | | |
266 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
267 * | | | | | | | | | | | | | | | |
268 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
269 * | | | | | | |------| |------| | | | | | |
270 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
271 * | | | | | | | | | | | | | | | |
272 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
273 * | | | | | | | | | | | |
274 * `----------------------------------' `----------------------------------'
275 * ,-------------. ,-------------.
276 * | | | | | |
277 * ,------|------|------| |------+--------+------.
278 * | | | | | | | |
279 * | | |------| |------| | |
280 * | | | | | | | |
281 * `--------------------' `----------------------'
282 */
283/*
284[TEMPLATE] = KEYMAP(
285 KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
286,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
287,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
288,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
289,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
290
291 ,KC_TRNS ,KC_TRNS
292 ,KC_TRNS
293 ,KC_TRNS ,KC_TRNS ,KC_TRNS
294
295 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
296 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
297 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
298 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
299 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
300
301 ,KC_TRNS ,KC_TRNS
302 ,KC_TRNS
303 ,KC_TRNS ,KC_TRNS ,KC_TRNS
304),
305[TEMPLATE] = KEYMAP(
306 KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
307,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
308,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
309,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
310,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
311
312 ,KC_NO ,KC_NO
313 ,KC_NO
314 ,KC_NO ,KC_NO ,KC_NO
315
316 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
317 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
318 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
319 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
320 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
321
322 ,KC_NO ,KC_NO
323 ,KC_NO
324 ,KC_NO ,KC_NO ,KC_NO
325),
326*/
327};
328
329// keyboard initialization
330void matrix_init_user() {
331 ergodox_led_all_on();
332 for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) {
333 ergodox_led_all_set(i);
334 wait_ms(5);
335 }
336 wait_ms(1000);
337 for (int i = LED_BRIGHTNESS_LO; i > 0; i--) {
338 ergodox_led_all_set(i);
339 wait_ms(10);
340 }
341 ergodox_led_all_off();
342}
343
344// extra keys
345const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
346 switch (id) {
347
348 // mouse
349 case MS_UL:
350 if (record->event.pressed) {
351 mousekey_on(KC_MS_UP);
352 mousekey_on(KC_MS_LEFT);
353 } else {
354 mousekey_off(KC_MS_UP);
355 mousekey_off(KC_MS_LEFT);
356 }
357 break;
358 case MS_UR:
359 if (record->event.pressed) {
360 mousekey_on(KC_MS_UP);
361 mousekey_on(KC_MS_RIGHT);
362 } else {
363 mousekey_off(KC_MS_UP);
364 mousekey_off(KC_MS_RIGHT);
365 }
366 break;
367 case MS_DL:
368 if (record->event.pressed) {
369 mousekey_on(KC_MS_DOWN);
370 mousekey_on(KC_MS_LEFT);
371 } else {
372 mousekey_off(KC_MS_DOWN);
373 mousekey_off(KC_MS_LEFT);
374 }
375 break;
376 case MS_DR:
377 if (record->event.pressed) {
378 mousekey_on(KC_MS_DOWN);
379 mousekey_on(KC_MS_RIGHT);
380 } else {
381 mousekey_off(KC_MS_DOWN);
382 mousekey_off(KC_MS_RIGHT);
383 }
384 break;
385 }
386 return MACRO_NONE;
387}
388
389// tap dances
390
391// flash keyboard on 4x tap, with leds
392void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) {
393 switch (state->count) {
394 case 1:
395 ergodox_right_led_3_on();
396 break;
397 case 2:
398 ergodox_right_led_2_on();
399 break;
400 case 3:
401 ergodox_right_led_1_on();
402 break;
403 case 4:
404 ergodox_right_led_3_off();
405 wait_ms(50);
406 ergodox_right_led_2_off();
407 wait_ms(50);
408 ergodox_right_led_1_off();
409 break;
410 }
411}
412
413void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) {
414 if (state->count >= 4) {
415 reset_keyboard();
416 reset_tap_dance(state);
417 }
418}
419
420void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) {
421 ergodox_right_led_1_off();
422 wait_ms(50);
423 ergodox_right_led_2_off();
424 wait_ms(50);
425 ergodox_right_led_3_off();
426}
427
428qk_tap_dance_action_t tap_dance_actions[] = {
429 [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ),
430};
diff --git a/keyboards/handwired/gamenum/Makefile b/keyboards/handwired/gamenum/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/gamenum/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/handwired/gamenum/README.md b/keyboards/handwired/gamenum/README.md
new file mode 100644
index 000000000..5b53004ef
--- /dev/null
+++ b/keyboards/handwired/gamenum/README.md
@@ -0,0 +1,102 @@
1GameNum firmware
2======================
3## Board overview
4
5The GameNum was designed to facilitate the use of mechanical keys for gaming even when your packing space is limited.
6It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers.
7The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games.
8The RTS layer is meant to be used rotating the device 90 degrees counterclockwise.
9
10The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK.
11
12## Build considerations
13
14Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind.
15Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz.
16The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled.
17'+' of the LED goes to the respective pins and can be joined together on the '-' into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro.
18
19## schematic of the switches and diodes
20
21![schematic overview](http://i.imgur.com/fleitoA.jpg)
22
23Keep in mind that the minus of the diodes should point towards the pro micros inputs.
24
25##LED hookup
26
27![led overview](http://i.imgur.com/U6m865n.jpg)
28
29## Adding more layers
30
31Adding additional layers is pretty straight forward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`.
32Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers.
33
34Next thing to do is to add the actual layer for the keymap.
35
36```
37[DEF] = KEYMAP(
38 KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \
39 KC_7, KC_8, KC_9, KC_PLUS, \
40 KC_4, KC_5, KC_6, \
41 KC_1, KC_2, KC_3, \
42 KC_0, KC_DOT, KC_ENT \
43)
44```
45
46This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D:
47In the case of DEF this is key `KC_FN0`. Also keep in mind that the last layer that you add does not have a comma after its closing bracket but any other layer does!
48
49Which brings us nicely to the next part, the layer switching logic. Under the keymaps look for `PROGMEM fn_actions[]` this function handles the switching between layers, as you might have noticed every layer in the keymap has its own KC_FNx key. This is the key responsible for switching you from layer to layer.
50The number that is at the end of the keycode corresponds with the code in the function.
51`[0] = ACTION_LAYER_SET(HDN, ON_PRESS),` When `KC_FN0` is pressed the keyboard switches layer `HDN` on when the key is pressed down. Add an extra line for your layer here as well.
52
53Now for the LEDs, if you plan on adding extra LED's to the keyboard to indicate other layers you have to first define the pin that the LED will be using in `gamenum.c`.
54Look for this piece of code:
55
56```
57 DDRD |= (1<<4);
58 PORTD &= ~(1<<4);
59```
60
61Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<<y);` defines that pin as an output. `PORTx &= ~(1<<y);` sets the pin to LOW turning off the LED.
62
63Now go back to `keymap.c` and look for the `process_record_user` function. The function is basically a switch case that checks if you pushed one of the defined layer-switch buttons. When it sees that you pushed one of them it sets the pins of the LED's either low or high.
64
65```
66 case KC_FN1:
67 if (record->event.pressed) {
68 PORTC &= ~(1 << 6); // PC6 goes low
69 PORTD |= (1<<4); //PD4 goes high
70 }
71 break;
72```
73
74This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit.
75
76
77## Quantum MK Firmware
78
79For the full Quantum feature list, see [the parent readme.md](/doc/readme.md).
80
81## Building
82
83Download or clone the whole firmware and navigate to the keyboards/handwired/gamenum folder.
84Read the README.md for the qmk repository on how to set up your developer enviroment to build your firmware with.
85Building firmware on Windows can be a bit of a hassle. Linux is a lot easier to use if you have some experience with it. A raspberry pi will already be able to build the firmware for you.
86Once your dev env is set up, you'll be able to type `make` to generate your .hex - you can then use AVRDudess to program your .hex file.
87
88### Default
89
90To build with the default keymap, simply run `make`.
91
92### Other Keymaps
93
94To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
95
96```
97$ make keymap=[default|jack|<name>]
98```
99
100Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
101
102
diff --git a/keyboards/handwired/gamenum/config.h b/keyboards/handwired/gamenum/config.h
new file mode 100644
index 000000000..6af876ab7
--- /dev/null
+++ b/keyboards/handwired/gamenum/config.h
@@ -0,0 +1,162 @@
1/*
2Copyright 2012 Jun Wako <wakojun@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#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0x1234
25#define PRODUCT_ID 0x5678
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Seth-Senpai
28#define PRODUCT GameNum
29#define DESCRIPTION Numpad with gamelayers
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 4
34
35/*
36 * Keyboard Matrix Assignments
37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
45#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 }
46#define MATRIX_COL_PINS { D7, E6, B4, B5 }
47#define UNUSED_PINS
48
49/* COL2ROW or ROW2COL */
50#define DIODE_DIRECTION ROW2COL
51
52// #define BACKLIGHT_PIN C6
53// #define BACKLIGHT_BREATHING
54// #define BACKLIGHT_LEVELS 3
55
56
57/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
58#define DEBOUNCING_DELAY 5
59
60/* define if matrix has ghost (lacks anti-ghosting diodes) */
61//#define MATRIX_HAS_GHOST
62
63/* number of backlight levels */
64
65/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
66#define LOCKING_SUPPORT_ENABLE
67/* Locking resynchronize hack */
68#define LOCKING_RESYNC_ENABLE
69
70/*
71 * Force NKRO
72 *
73 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
74 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
75 * makefile for this to work.)
76 *
77 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
78 * until the next keyboard reset.
79 *
80 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
81 * fully operational during normal computer usage.
82 *
83 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
84 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
85 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
86 * power-up.
87 *
88 */
89//#define FORCE_NKRO
90
91/*
92 * Magic Key Options
93 *
94 * Magic keys are hotkey commands that allow control over firmware functions of
95 * the keyboard. They are best used in combination with the HID Listen program,
96 * found here: https://www.pjrc.com/teensy/hid_listen.html
97 *
98 * The options below allow the magic key functionality to be changed. This is
99 * useful if your keyboard/keypad is missing keys and you want magic key support.
100 *
101 */
102
103/* key combination for magic key command */
104#define IS_COMMAND() ( \
105 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
106)
107
108/* control how magic key switches layers */
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
110//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
111//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
112
113/* override magic key keymap */
114//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
115//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
116//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
117//#define MAGIC_KEY_HELP1 H
118//#define MAGIC_KEY_HELP2 SLASH
119//#define MAGIC_KEY_DEBUG D
120//#define MAGIC_KEY_DEBUG_MATRIX X
121//#define MAGIC_KEY_DEBUG_KBD K
122//#define MAGIC_KEY_DEBUG_MOUSE M
123//#define MAGIC_KEY_VERSION V
124//#define MAGIC_KEY_STATUS S
125//#define MAGIC_KEY_CONSOLE C
126//#define MAGIC_KEY_LAYER0_ALT1 ESC
127//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
128//#define MAGIC_KEY_LAYER0 0
129//#define MAGIC_KEY_LAYER1 1
130//#define MAGIC_KEY_LAYER2 2
131//#define MAGIC_KEY_LAYER3 3
132//#define MAGIC_KEY_LAYER4 4
133//#define MAGIC_KEY_LAYER5 5
134//#define MAGIC_KEY_LAYER6 6
135//#define MAGIC_KEY_LAYER7 7
136//#define MAGIC_KEY_LAYER8 8
137//#define MAGIC_KEY_LAYER9 9
138//#define MAGIC_KEY_BOOTLOADER PAUSE
139//#define MAGIC_KEY_LOCK CAPS
140//#define MAGIC_KEY_EEPROM E
141//#define MAGIC_KEY_NKRO N
142//#define MAGIC_KEY_SLEEP_LED Z
143
144/*
145 * Feature disable options
146 * These options are also useful to firmware size reduction.
147 */
148
149/* disable debug print */
150//#define NO_DEBUG
151
152/* disable print */
153//#define NO_PRINT
154
155/* disable action features */
156//#define NO_ACTION_LAYER
157//#define NO_ACTION_TAPPING
158//#define NO_ACTION_ONESHOT
159//#define NO_ACTION_MACRO
160//#define NO_ACTION_FUNCTION
161
162#endif
diff --git a/keyboards/handwired/gamenum/gamenum.c b/keyboards/handwired/gamenum/gamenum.c
new file mode 100644
index 000000000..8048194bb
--- /dev/null
+++ b/keyboards/handwired/gamenum/gamenum.c
@@ -0,0 +1,14 @@
1#include "gamenum.h"
2
3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6 DDRC |= (1<<6);
7 PORTC &= ~(1<<6);
8
9 DDRD |= (1<<4);
10 PORTD &= ~(1<<4);
11
12 matrix_init_user();
13
14}
diff --git a/keyboards/handwired/gamenum/gamenum.h b/keyboards/handwired/gamenum/gamenum.h
new file mode 100644
index 000000000..ea633b9bf
--- /dev/null
+++ b/keyboards/handwired/gamenum/gamenum.h
@@ -0,0 +1,21 @@
1#ifndef GAMENUM_H
2#define GAMENUM_H
3
4#include "quantum.h"
5
6#define KEYMAP( \
7 k00, k01, k02, k03, \
8 k10, k11, k12, k13, \
9 k20, k21, k22, \
10 k30, k31, k32, \
11 k41, k42, k43 \
12) \
13{ \
14 { k00, k01, k02, k03}, \
15 { k10, k11, k12, k13}, \
16 { k20, k21, k22, KC_NO}, \
17 { k30, k31, k32, KC_NO}, \
18 { KC_NO, k41, k42, k43} \
19}
20
21#endif
diff --git a/keyboards/handwired/gamenum/keymaps/default/keymap.c b/keyboards/handwired/gamenum/keymaps/default/keymap.c
new file mode 100644
index 000000000..6950b741a
--- /dev/null
+++ b/keyboards/handwired/gamenum/keymaps/default/keymap.c
@@ -0,0 +1,68 @@
1#include "gamenum.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5
6#define _______ KC_TRNS
7
8#define DEF 0
9#define HDN 1
10#define OSY 2
11
12const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
13[DEF] = KEYMAP(
14 KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \
15 KC_7, KC_8, KC_9, KC_PLUS, \
16 KC_4, KC_5, KC_6, \
17 KC_1, KC_2, KC_3, \
18 KC_0, KC_DOT, KC_ENT \
19),
20[HDN] = KEYMAP(
21 KC_FN1, KC_1, KC_2, KC_3, \
22 KC_Q, KC_W, KC_E, KC_R, \
23 KC_A, KC_S, KC_D, \
24 KC_Z, KC_X, KC_C, \
25 KC_LSFT, KC_LALT, KC_SPC \
26),
27[OSY] = KEYMAP(
28 KC_A, KC_Q, KC_1, KC_FN2, \
29 KC_S, KC_W, KC_2, KC_LALT, \
30 KC_D, KC_E, KC_3, \
31 KC_F, KC_R, KC_4, \
32 KC_SPC, KC_T, KC_TAB \
33)
34};
35
36
37const uint16_t PROGMEM fn_actions[] = {
38 [0] = ACTION_LAYER_SET(HDN, ON_PRESS),
39 [1] = ACTION_LAYER_SET(OSY, ON_PRESS),
40 [2] = ACTION_LAYER_SET(DEF, ON_PRESS),
41};
42
43const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
44 return MACRO_NONE;
45};
46
47
48bool process_record_user (uint16_t keycode, keyrecord_t *record) {
49 switch(keycode) {
50 case KC_FN0:
51 if (record->event.pressed) {
52 PORTC |= (1 << 6); // PC6 goes high
53 }
54 break;
55 case KC_FN1:
56 if (record->event.pressed) {
57 PORTC &= ~(1 << 6); // PC6 goes high
58 PORTD |= (1<<4);
59 }
60 break;
61 case KC_FN2:
62 if (record->event.pressed) {
63 PORTD &= ~(1 << 4); // PC6 goes high
64 }
65 break;
66 }
67 return true;
68} \ No newline at end of file
diff --git a/keyboards/handwired/gamenum/rules.mk b/keyboards/handwired/gamenum/rules.mk
new file mode 100644
index 000000000..afb9372e1
--- /dev/null
+++ b/keyboards/handwired/gamenum/rules.mk
@@ -0,0 +1,73 @@
1
2# MCU name
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Boot Section Size in *bytes*
43# Teensy halfKay 512
44# Teensy++ halfKay 1024
45# Atmel DFU loader 4096
46# LUFA bootloader 4096
47# USBaspLoader 2048
48OPT_DEFS += -DBOOTLOADER_SIZE=512
49
50
51# Build Options
52# change yes to no to disable
53#
54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
57CONSOLE_ENABLE ?= yes # Console for debug(+400)
58COMMAND_ENABLE ?= yes # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE ?= no # USB Nkey Rollover
63BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE ?= no # MIDI controls
65UNICODE_ENABLE ?= no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE ?= no # Audio output on port C6
68
69ifndef QUANTUM_DIR
70 include ../../Makefile
71endif
72
73
diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c
index 82ba83f4e..c89b485a4 100644
--- a/keyboards/planck/keymaps/callum/keymap.c
+++ b/keyboards/planck/keymaps/callum/keymap.c
@@ -21,14 +21,8 @@ enum planck_keycodes {
21 MOVE = SAFE_RANGE, 21 MOVE = SAFE_RANGE,
22 SYMB, 22 SYMB,
23 FUNC, 23 FUNC,
24 CMDLEFT,
25 CMDRGHT,
26 BELOW, 24 BELOW,
27 ABOVE, 25 ABOVE
28 DASH,
29 GBP,
30 VOLUP,
31 VOLDN
32}; 26};
33 27
34// Fillers to make layering more clear 28// Fillers to make layering more clear
@@ -59,15 +53,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
59 * ,-----------------------------------------------------------------------------------. 53 * ,-----------------------------------------------------------------------------------.
60 * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | 54 * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc |
61 * |------+------+------+------+------+------+------+------+------+------+------+------| 55 * |------+------+------+------+------+------+------+------+------+------+------+------|
62 * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | 56 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del |
63 * |------+------+------+------+------+------+------+------+------+------+------+------| 57 * |------+------+------+------+------+------+------+------+------+------+------+------|
64 * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | | 58 * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | |
65 * |------+------+------+------+------+------+------+------+------+------+------+------| 59 * |------+------+------+------+------+------+------+------+------+------+------+------|
66 * | | | | | | Below| | | | | | | 60 * | | | | | | Below| | | | | | |
67 * `-----------------------------------------------------------------------------------' 61 * `-----------------------------------------------------------------------------------'
68 */ 62 */
69[_MOVE] = { 63[_MOVE] = {
70 {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC }, 64 {KC_ESC, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, KC_ESC },
71 {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, 65 {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL },
72 {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, 66 {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______},
73 {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______} 67 {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______}
@@ -85,8 +79,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
85 * `-----------------------------------------------------------------------------------' 79 * `-----------------------------------------------------------------------------------'
86 */ 80 */
87[_SYMB] = { 81[_SYMB] = {
88 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DASH }, 82 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LALT(KC_MINS)},
89 {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, GBP }, 83 {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, LALT(KC_3)},
90 {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, 84 {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______},
91 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 85 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
92}, 86},
@@ -115,15 +109,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
115 * |------+------+------+------+------+------+------+------+------+------+------+------| 109 * |------+------+------+------+------+------+------+------+------+------+------+------|
116 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | 110 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- |
117 * |------+------+------+------+------+------+------+------+------+------+------+------| 111 * |------+------+------+------+------+------+------+------+------+------+------+------|
118 * | | F21 | F22 | F23 | F24 | | | | | | | | 112 * | | F21 | F22 | F23 | F24 | | | Lock | | | | |
119 * |------+------+------+------+------+------+------+------+------+------+------+------| 113 * |------+------+------+------+------+------+------+------+------+------+------+------|
120 * | | | | | Prev | Mute | Play | Next | | | | | 114 * | | | | | Prev | Mute | Play | Next | | | | |
121 * `-----------------------------------------------------------------------------------' 115 * `-----------------------------------------------------------------------------------'
122 */ 116 */
123[_FUNC] = { 117[_FUNC] = {
124 {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, VOLUP }, 118 {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(LALT(KC_VOLU))},
125 {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, VOLDN }, 119 {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, S(LALT(KC_VOLD))},
126 {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, 120 {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, S(LCTL(KC_POWER)), XXXXXXX, XXXXXXX, XXXXXXX, _______},
127 {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______} 121 {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______}
128} 122}
129 123
@@ -159,26 +153,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
159 } 153 }
160 return false; 154 return false;
161 break; 155 break;
162 case CMDLEFT:
163 if (record->event.pressed) {
164 register_code(KC_LGUI);
165 register_code(KC_LEFT);
166 } else {
167 unregister_code(KC_LEFT);
168 unregister_code(KC_LGUI);
169 }
170 return false;
171 break;
172 case CMDRGHT:
173 if (record->event.pressed) {
174 register_code(KC_LGUI);
175 register_code(KC_RGHT);
176 } else {
177 unregister_code(KC_RGHT);
178 unregister_code(KC_LGUI);
179 }
180 return false;
181 break;
182 case BELOW: 156 case BELOW:
183 if (record->event.pressed) { 157 if (record->event.pressed) {
184 register_code(KC_LGUI); 158 register_code(KC_LGUI);
@@ -203,50 +177,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
203 } 177 }
204 return false; 178 return false;
205 break; 179 break;
206 case DASH:
207 if (record->event.pressed) {
208 register_code(KC_LALT);
209 register_code(KC_MINS);
210 } else {
211 unregister_code(KC_MINS);
212 unregister_code(KC_LALT);
213 }
214 return false;
215 break;
216 case GBP:
217 if (record->event.pressed) {
218 register_code(KC_LALT);
219 register_code(KC_3);
220 } else {
221 unregister_code(KC_3);
222 unregister_code(KC_LALT);
223 }
224 return false;
225 break;
226 case VOLUP:
227 if (record->event.pressed) {
228 register_code(KC_LALT);
229 register_code(KC_LSFT);
230 register_code(KC_VOLU);
231 } else {
232 unregister_code(KC_VOLU);
233 unregister_code(KC_LSFT);
234 unregister_code(KC_LALT);
235 }
236 return false;
237 break;
238 case VOLDN:
239 if (record->event.pressed) {
240 register_code(KC_LALT);
241 register_code(KC_LSFT);
242 register_code(KC_VOLD);
243 } else {
244 unregister_code(KC_VOLD);
245 unregister_code(KC_LSFT);
246 unregister_code(KC_LALT);
247 }
248 return false;
249 break;
250 } 180 }
251 return true; 181 return true;
252} 182}
diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md
index b5997cd5a..0baeba46d 100644
--- a/keyboards/planck/keymaps/callum/readme.md
+++ b/keyboards/planck/keymaps/callum/readme.md
@@ -25,9 +25,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c
25 * ,-----------------------------------------------------------------------------------. 25 * ,-----------------------------------------------------------------------------------.
26 * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | 26 * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc |
27 * |------+------+------+------+------+------+------+------+------+------+------+------| 27 * |------+------+------+------+------+------+------+------+------+------+------+------|
28 * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | 28 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del |
29 * |------+------+------+------+------+------+------+------+------+------+------+------| 29 * |------+------+------+------+------+------+------+------+------+------+------+------|
30 * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | | 30 * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | |
31 * |------+------+------+------+------+------+------+------+------+------+------+------| 31 * |------+------+------+------+------+------+------+------+------+------+------+------|
32 * | | | | | | Below| | | | | | | 32 * | | | | | | Below| | | | | | |
33 * `-----------------------------------------------------------------------------------' 33 * `-----------------------------------------------------------------------------------'
@@ -63,7 +63,7 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c
63 * |------+------+------+------+------+------+------+------+------+------+------+------| 63 * |------+------+------+------+------+------+------+------+------+------+------+------|
64 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | 64 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- |
65 * |------+------+------+------+------+------+------+------+------+------+------+------| 65 * |------+------+------+------+------+------+------+------+------+------+------+------|
66 * | | F21 | F22 | F23 | F24 | | | | | | | | 66 * | | F21 | F22 | F23 | F24 | | | Lock | | | | |
67 * |------+------+------+------+------+------+------+------+------+------+------+------| 67 * |------+------+------+------+------+------+------+------+------+------+------+------|
68 * | | | | | Prev | Mute | Play | Next | | | | | 68 * | | | | | Prev | Mute | Play | Next | | | | |
69 * `-----------------------------------------------------------------------------------' 69 * `-----------------------------------------------------------------------------------'
diff --git a/keyboards/planck/keymaps/vifon/Makefile b/keyboards/planck/keymaps/vifon/Makefile
new file mode 100644
index 000000000..838cb4e88
--- /dev/null
+++ b/keyboards/planck/keymaps/vifon/Makefile
@@ -0,0 +1,25 @@
1
2
3# Build Options
4# change to "no" to disable the options, or define them in the Makefile in
5# the appropriate keymap folder that will get included automatically
6#
7BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
8MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
9EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
10CONSOLE_ENABLE = yes # Console for debug(+400)
11COMMAND_ENABLE = yes # Commands for debug and configuration
12NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
13BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
14MIDI_ENABLE = no # MIDI controls
15AUDIO_ENABLE = no # Audio output on port C6
16UNICODE_ENABLE = no # Unicode
17BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
18RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
19
20# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
21SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
22
23ifndef QUANTUM_DIR
24 include ../../../../Makefile
25endif
diff --git a/keyboards/planck/keymaps/vifon/config.h b/keyboards/planck/keymaps/vifon/config.h
new file mode 100644
index 000000000..9cb0634fb
--- /dev/null
+++ b/keyboards/planck/keymaps/vifon/config.h
@@ -0,0 +1,91 @@
1/*
2Copyright 2012 Jun Wako <wakojun@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#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define MANUFACTURER Ortholinear Keyboards
27#define PRODUCT The Planck Keyboard
28#define DESCRIPTION A compact ortholinear keyboard
29
30/* key matrix size */
31#define MATRIX_ROWS 4
32#define MATRIX_COLS 12
33
34/* Planck PCB default pin-out */
35#define MATRIX_ROW_PINS { D0, D5, B5, B6 }
36#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
37#define UNUSED_PINS
38
39#define BACKLIGHT_PIN B7
40
41/* COL2ROW or ROW2COL */
42#define DIODE_DIRECTION COL2ROW
43
44/* define if matrix has ghost */
45//#define MATRIX_HAS_GHOST
46
47/* number of backlight levels */
48#define BACKLIGHT_LEVELS 3
49
50/* Set 0 if debouncing isn't needed */
51#define DEBOUNCING_DELAY 5
52
53/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
54#define LOCKING_SUPPORT_ENABLE
55/* Locking resynchronize hack */
56#define LOCKING_RESYNC_ENABLE
57
58/* key combination for command */
59#define IS_COMMAND() ( \
60 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
61)
62
63/*
64 * Feature disable options
65 * These options are also useful to firmware size reduction.
66 */
67
68/* disable debug print */
69//#define NO_DEBUG
70
71/* disable print */
72//#define NO_PRINT
73
74/* disable action features */
75//#define NO_ACTION_LAYER
76//#define NO_ACTION_TAPPING
77//#define NO_ACTION_ONESHOT
78//#define NO_ACTION_MACRO
79//#define NO_ACTION_FUNCTION
80
81/* prevent the modifiers from being stuck, sacrificing some memory */
82#define PREVENT_STUCK_MODIFIERS
83
84#ifdef SUBPROJECT_rev3
85 #include "rev3/config.h"
86#endif
87#ifdef SUBPROJECT_rev4
88 #include "rev4/config.h"
89#endif
90
91#endif
diff --git a/keyboards/planck/keymaps/vifon/keymap.c b/keyboards/planck/keymaps/vifon/keymap.c
new file mode 100644
index 000000000..80c4a516c
--- /dev/null
+++ b/keyboards/planck/keymaps/vifon/keymap.c
@@ -0,0 +1,187 @@
1// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
2// this is the style you want to emulate.
3
4#include "planck.h"
5#ifdef BACKLIGHT_ENABLE
6# include "backlight.h"
7#endif
8#include "timer.h"
9#include <bootloader.h>
10
11// Each layer gets a name for readability, which is then used in the keymap matrix below.
12// The underscores don't mean anything - you can have a layer called STUFF or any other name.
13// Layer names don't all need to be of the same length, obviously, and you can also skip them
14// entirely and just use numbers.
15enum userlayer {
16 _QW = 0,
17 _CM,
18 _PP,
19 _PPG,
20 _NM,
21 _LW,
22 _RS,
23 _DL,
24 _DYN,
25};
26
27enum planck_keycodes {
28 KM_LW = SAFE_RANGE,
29 KM_RS,
30 KM_SHLK, /* ShiftLock */
31 KM_RST, /* Reset */
32 KM_NUM, /* Numeric layer */
33 KM_SLP, /* Sleep 250 ms */
34 KM_PPLR, /* Pure Pro layer */
35 DYNAMIC_MACRO_RANGE,
36};
37
38#include "dynamic_macro.h"
39
40#define _______ KC_TRNS
41#define XXXXXXX KC_NO
42
43const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
44[_QW] = { /* Qwerty */
45 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
46 {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
47 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_FN0 },
48 {KC_LCTL, MO(_DYN),KC_LGUI, KC_LALT, KM_LW, KC_SPC, KC_SPC, KM_RS, KC_RALT, KC_DOWN, KC_UP, KC_RCTL}
49},
50[_CM] = { /* Colemak */
51 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
52 {CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
53 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_FN0 },
54 {KC_LCTL, MO(_DYN),KC_LGUI, KC_LALT, KM_LW, KC_SPC, KC_SPC, KM_RS, KC_RALT, KC_DOWN, KC_UP, KC_RCTL}
55},
56[_PP] = { /* Pure Pro */
57 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
58 {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT },
59 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, KC_UP, KC_RCTL},
60 {KC_LCTL, MO(_DYN),KC_LGUI, KC_LALT, KM_LW, KC_SPC, KC_SPC, KM_RS, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT}
61},
62[_PPG] = { /* Pure Pro: Gaming */
63 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
64 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
65 {_______, _______, _______, _______, _______, _______, _______, _______, _______, DF(_RS), _______, _______},
66 {_______, _______, XXXXXXX, _______, KM_RS , _______, _______, KM_LW , _______, _______, _______, _______},
67},
68[_NM] = { /* Numeric */
69 {KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
70 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
71 {KC_LSFT, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, KC_FN0 },
72 {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______}
73},
74[_LW]= { /* LOWER */
75 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
76 {KC_ESC, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), KM_NUM, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
77 {_______, LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), KM_SLP, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_ENT },
78 {_______, BL_TOGG, _______, _______, _______, KC_BTN1, KC_BTN1, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
79},
80[_RS]= { /* RAISE */
81 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL },
82 {KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
83 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), KM_PPLR, KM_RST, KC_ENT },
84 {_______, BL_STEP, _______, _______, _______, KC_BTN2, KC_BTN2, _______, KC_MPLY, KC_VOLD, KC_VOLU, _______}
85},
86[_DL]= { /* DUAL */
87 {_______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, KC_APP, KC_INS, _______, KC_PSCR, _______},
88 {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ACL0, KC_ACL2},
89 {_______, _______, KC_BTN2, KC_BTN3, KC_BTN1, KC_WWW_BACK, KC_WWW_FORWARD, KC_MUTE, _______, _______, _______, _______},
90 {_______, _______, KC_LGUI, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______}
91},
92[_DYN]= { /* special */
93 {_______, DYN_REC_START1, DYN_MACRO_PLAY1, _______, _______, _______, _______, _______, KC_INS, _______, KC_PSCR, KC_PAUS},
94 {_______, DYN_REC_START2, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_SLCK, KC_NLCK},
95 {KM_SHLK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
96 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
97},
98};
99
100#undef _______
101
102const uint16_t PROGMEM fn_actions[] = {
103 ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT),
104};
105
106
107bool process_record_user(uint16_t keycode, keyrecord_t *record) {
108 static uint16_t key_timer;
109
110 if (!process_record_dynamic_macro(keycode, record)) {
111 return false;
112 }
113
114 switch (keycode) {
115 case KM_LW:
116 if (record->event.pressed) {
117 layer_on(_LW);
118 } else {
119 layer_off(_LW);
120 }
121 update_tri_layer(_LW, _RS, _DL);
122 return false;
123 break;
124 case KM_RS:
125 if (record->event.pressed) {
126 layer_on(_RS);
127 } else {
128 layer_off(_RS);
129 }
130 update_tri_layer(_LW, _RS, _DL);
131 return false;
132 break;
133 case KM_SHLK:
134 register_code(KC_LSFT);
135 break;
136 case KM_RST:
137 if (record->event.pressed) {
138 key_timer = timer_read();
139 } else {
140 if (timer_elapsed(key_timer) >= 500) {
141 clear_keyboard();
142 backlight_toggle();
143 _delay_ms(250);
144 backlight_toggle();
145 bootloader_jump();
146 }
147 }
148 break;
149 case KM_PPLR:
150 if (record->event.pressed) {
151 key_timer = timer_read();
152 } else {
153 if (timer_elapsed(key_timer) >= 250) {
154 default_layer_set((1UL << _PP) | (1UL << _PPG));
155 backlight_toggle();
156 _delay_ms(100);
157 backlight_toggle();
158 } else {
159 default_layer_set(1UL << _PP);
160 }
161 }
162 break;
163 case KM_NUM:
164 layer_on(_NM);
165 break;
166 case KM_SLP:
167 if (record->event.pressed) {
168 _delay_ms(250);
169 }
170 break;
171 }
172
173
174 if (record->event.pressed
175 && IS_LAYER_ON(_NM)
176 && keymap_key_to_keycode(_NM, record->event.key) == KC_TRNS) {
177
178 layer_off(_NM);
179 }
180
181 return true;
182}
183
184const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
185{
186 return MACRO_NONE;
187}
diff --git a/quantum/dynamic_macro.h b/quantum/dynamic_macro.h
index a3ad61bc7..e6dbc5b9c 100644
--- a/quantum/dynamic_macro.h
+++ b/quantum/dynamic_macro.h
@@ -8,8 +8,13 @@
8/* May be overridden with a custom value. Be aware that the effective 8/* May be overridden with a custom value. Be aware that the effective
9 * macro length is half of this value: each keypress is recorded twice 9 * macro length is half of this value: each keypress is recorded twice
10 * because of the down-event and up-event. This is not a bug, it's the 10 * because of the down-event and up-event. This is not a bug, it's the
11 * intended behavior. */ 11 * intended behavior.
12#define DYNAMIC_MACRO_SIZE 256 12 *
13 * Usually it should be fine to set the macro size to at least 256 but
14 * there have been reports of it being too much in some users' cases,
15 * so 128 is considered a safe default.
16 */
17#define DYNAMIC_MACRO_SIZE 128
13#endif 18#endif
14 19
15/* DYNAMIC_MACRO_RANGE must be set as the last element of user's 20/* DYNAMIC_MACRO_RANGE must be set as the last element of user's
diff --git a/quantum/keymap.h b/quantum/keymap.h
index 98ddfd0c5..85c090972 100644
--- a/quantum/keymap.h
+++ b/quantum/keymap.h
@@ -191,6 +191,7 @@ enum quantum_keycodes {
191#define HYPR(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI) 191#define HYPR(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI)
192#define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT) 192#define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT)
193#define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI) 193#define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI)
194#define ALTG(kc) (kc | QK_RCTL | QK_RALT)
194 195
195#define MOD_HYPR 0xf 196#define MOD_HYPR 0xf
196#define MOD_MEH 0x7 197#define MOD_MEH 0x7
@@ -295,7 +296,10 @@ enum quantum_keycodes {
295// ON_PRESS = 1 296// ON_PRESS = 1
296// ON_RELEASE = 2 297// ON_RELEASE = 2
297// Unless you have a good reason not to do so, prefer ON_PRESS (1) as your default. 298// Unless you have a good reason not to do so, prefer ON_PRESS (1) as your default.
298#define TO(layer, when) (layer | QK_TO | (when << 0x4)) 299// In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own
300// keycode modeled after the old version, kept below for this.
301/* #define TO(layer, when) (layer | QK_TO | (when << 0x4)) */
302#define TO(layer) (layer | QK_TO | (ON_PRESS << 0x4))
299 303
300// Momentary switch layer - 256 layer max 304// Momentary switch layer - 256 layer max
301#define MO(layer) (layer | QK_MOMENTARY) 305#define MO(layer) (layer | QK_MOMENTARY)
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c
index a5d7dca21..6a30afe29 100644
--- a/quantum/process_keycode/process_unicode.c
+++ b/quantum/process_keycode/process_unicode.c
@@ -2,6 +2,7 @@
2 2
3static uint8_t input_mode; 3static uint8_t input_mode;
4 4
5__attribute__((weak))
5uint16_t hex_to_keycode(uint8_t hex) 6uint16_t hex_to_keycode(uint8_t hex)
6{ 7{
7 if (hex == 0x0) { 8 if (hex == 0x0) {
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index f82e3ec55..d550c5866 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -6,24 +6,37 @@
6#include "rgblight.h" 6#include "rgblight.h"
7#include "debug.h" 7#include "debug.h"
8 8
9// Lightness curve using the CIE 1931 lightness formula
10//Generated by the python script provided in http://jared.geek.nz/2013/feb/linear-led-pwm
9const uint8_t DIM_CURVE[] PROGMEM = { 11const uint8_t DIM_CURVE[] PROGMEM = {
10 0, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 12 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
11 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 13 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
12 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 14 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
13 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 15 3, 4, 4, 4, 4, 4, 4, 5, 5, 5,
14 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 16 5, 5, 6, 6, 6, 6, 6, 7, 7, 7,
15 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 17 7, 8, 8, 8, 8, 9, 9, 9, 10, 10,
16 15, 15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 18 10, 10, 11, 11, 11, 12, 12, 12, 13, 13,
17 20, 20, 21, 21, 22, 22, 22, 23, 23, 24, 24, 25, 25, 25, 26, 26, 19 13, 14, 14, 15, 15, 15, 16, 16, 17, 17,
18 27, 27, 28, 28, 29, 29, 30, 30, 31, 32, 32, 33, 33, 34, 35, 35, 20 17, 18, 18, 19, 19, 20, 20, 21, 21, 22,
19 36, 36, 37, 38, 38, 39, 40, 40, 41, 42, 43, 43, 44, 45, 46, 47, 21 22, 23, 23, 24, 24, 25, 25, 26, 26, 27,
20 48, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 22 28, 28, 29, 29, 30, 31, 31, 32, 32, 33,
21 63, 64, 65, 66, 68, 69, 70, 71, 73, 74, 75, 76, 78, 79, 81, 82, 23 34, 34, 35, 36, 37, 37, 38, 39, 39, 40,
22 83, 85, 86, 88, 90, 91, 93, 94, 96, 98, 99, 101, 103, 105, 107, 109, 24 41, 42, 43, 43, 44, 45, 46, 47, 47, 48,
23 110, 112, 114, 116, 118, 121, 123, 125, 127, 129, 132, 134, 136, 139, 141, 144, 25 49, 50, 51, 52, 53, 54, 54, 55, 56, 57,
24 146, 149, 151, 154, 157, 159, 162, 165, 168, 171, 174, 177, 180, 183, 186, 190, 26 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
25 193, 196, 200, 203, 207, 211, 214, 218, 222, 226, 230, 234, 238, 242, 248, 255 27 68, 70, 71, 72, 73, 74, 75, 76, 77, 79,
26}; 28 80, 81, 82, 83, 85, 86, 87, 88, 90, 91,
29 92, 94, 95, 96, 98, 99, 100, 102, 103, 105,
30 106, 108, 109, 110, 112, 113, 115, 116, 118, 120,
31 121, 123, 124, 126, 128, 129, 131, 132, 134, 136,
32 138, 139, 141, 143, 145, 146, 148, 150, 152, 154,
33 155, 157, 159, 161, 163, 165, 167, 169, 171, 173,
34 175, 177, 179, 181, 183, 185, 187, 189, 191, 193,
35 196, 198, 200, 202, 204, 207, 209, 211, 214, 216,
36 218, 220, 223, 225, 228, 230, 232, 235, 237, 240,
37 242, 245, 247, 250, 252, 255,
38 };
39
27const uint8_t RGBLED_BREATHING_TABLE[] PROGMEM = { 40const uint8_t RGBLED_BREATHING_TABLE[] PROGMEM = {
28 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 9, 41 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 9,
29 10, 11, 12, 14, 15, 17, 18, 20, 21, 23, 25, 27, 29, 31, 33, 35, 42 10, 11, 12, 14, 15, 17, 18, 20, 21, 23, 25, 27, 29, 31, 33, 35,
@@ -42,10 +55,16 @@ const uint8_t RGBLED_BREATHING_TABLE[] PROGMEM = {
42 37, 35, 33, 31, 29, 27, 25, 23, 21, 20, 18, 17, 15, 14, 12, 11, 55 37, 35, 33, 31, 29, 27, 25, 23, 21, 20, 18, 17, 15, 14, 12, 11,
43 10, 9, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1, 1, 0, 0, 0 56 10, 9, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1, 1, 0, 0, 0
44}; 57};
58
59__attribute__ ((weak))
45const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; 60const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5};
61__attribute__ ((weak))
46const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30}; 62const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30};
63__attribute__ ((weak))
47const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20}; 64const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20};
65__attribute__ ((weak))
48const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; 66const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
67__attribute__ ((weak))
49const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20}; 68const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20};
50 69
51rgblight_config_t rgblight_config; 70rgblight_config_t rgblight_config;
@@ -55,13 +74,8 @@ uint8_t rgblight_inited = 0;
55 74
56 75
57void sethsv(uint16_t hue, uint8_t sat, uint8_t val, struct cRGB *led1) { 76void sethsv(uint16_t hue, uint8_t sat, uint8_t val, struct cRGB *led1) {
58 // Convert hue, saturation, and value (HSV/HSB) to RGB. DIM_CURVE is used only
59 // on value and saturation (inverted). This looks the most natural.
60 uint8_t r = 0, g = 0, b = 0, base, color; 77 uint8_t r = 0, g = 0, b = 0, base, color;
61 78
62 val = pgm_read_byte(&DIM_CURVE[val]);
63 sat = 255 - pgm_read_byte(&DIM_CURVE[255 - sat]);
64
65 if (sat == 0) { // Acromatic color (gray). Hue doesn't mind. 79 if (sat == 0) { // Acromatic color (gray). Hue doesn't mind.
66 r = val; 80 r = val;
67 g = val; 81 g = val;
@@ -103,6 +117,9 @@ void sethsv(uint16_t hue, uint8_t sat, uint8_t val, struct cRGB *led1) {
103 break; 117 break;
104 } 118 }
105 } 119 }
120 r = pgm_read_byte(&DIM_CURVE[r]);
121 g = pgm_read_byte(&DIM_CURVE[g]);
122 b = pgm_read_byte(&DIM_CURVE[b]);
106 123
107 setrgb(r, g, b, led1); 124 setrgb(r, g, b, led1);
108} 125}
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
index def26c428..17f04ffcf 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight.h
@@ -40,6 +40,12 @@
40#include "eeconfig.h" 40#include "eeconfig.h"
41#include "light_ws2812.h" 41#include "light_ws2812.h"
42 42
43extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM;
44extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM;
45extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM;
46extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM;
47extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM;
48
43typedef union { 49typedef union {
44 uint32_t raw; 50 uint32_t raw;
45 struct { 51 struct {
diff --git a/readme.md b/readme.md
index a7320202b..80f0a3ab2 100644
--- a/readme.md
+++ b/readme.md
@@ -140,6 +140,9 @@ If this is a bit complex for you, Docker might be the turn-key solution you need
140 140
141docker run -e keymap=gwen -e keyboard=ergodox --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware 141docker run -e keymap=gwen -e keyboard=ergodox --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
142 142
143# On windows docker seems to have issue with VOLUME tag in Dockerfile, and $('pwd') won't print a windows compliant path, use full path instead like this
144docker run -e keymap=default -e keyboard=ergobop --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
145
143``` 146```
144 147
145This will compile the targetted keyboard/keymap and leave it in your QMK directory for you to flash. 148This will compile the targetted keyboard/keymap and leave it in your QMK directory for you to flash.
@@ -376,6 +379,8 @@ Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` -
376 379
377`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack. 380`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack.
378 381
382`TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed).
383
379 384
380### Fun with modifier keys 385### Fun with modifier keys
381 386
@@ -823,7 +828,7 @@ And then, to assign this macro to a key on your keyboard layout, you just use `M
823 828
824## Dynamic macros: record and replay macros in runtime 829## Dynamic macros: record and replay macros in runtime
825 830
826In addition to the static macros described above, you may enable the dynamic macros which you may record while writing. They are forgotten as soon as the keyboard is unplugged. Only two such macros may be stored at the same time, with the total length of 128 keypresses. 831In addition to the static macros described above, you may enable the dynamic macros which you may record while writing. They are forgotten as soon as the keyboard is unplugged. Only two such macros may be stored at the same time, with the total length of 64 keypresses (by default).
827 832
828To enable them, first add a new element to the `planck_keycodes` enum -- `DYNAMIC_MACRO_RANGE`: 833To enable them, first add a new element to the `planck_keycodes` enum -- `DYNAMIC_MACRO_RANGE`:
829 834
@@ -864,7 +869,7 @@ Add the following code to the very beginning of your `process_record_user()` fun
864 869
865To start recording the macro, press either `DYN_REC_START1` or `DYN_REC_START2`. To finish the recording, press the `_DYN` layer button. The handler awaits specifically for the `MO(_DYN)` keycode as the "stop signal" so please don't use any fancy ways to access this layer, use the regular `MO()` modifier. To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`. 870To start recording the macro, press either `DYN_REC_START1` or `DYN_REC_START2`. To finish the recording, press the `_DYN` layer button. The handler awaits specifically for the `MO(_DYN)` keycode as the "stop signal" so please don't use any fancy ways to access this layer, use the regular `MO()` modifier. To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`.
866 871
867If the LED-s start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 256; please read the comments for it in the header). 872If the LED-s start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 128; please read the comments for it in the header).
868 873
869For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header. 874For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header.
870 875