aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-11-12 20:54:37 -0500
committerJack Humbert <jack.humb@gmail.com>2016-11-12 20:54:37 -0500
commit33e62c080c9161a0fc921c90ed299a67fc2e1799 (patch)
tree253ea910d8f2ba464ab28709f5f93d09b27c05fd
parenta889b899e2cf52b3b7807d8a7ad39f12e0761a10 (diff)
parent631b8999a737ec73610f8b569b1f775cadf08172 (diff)
downloadqmk_firmware-33e62c080c9161a0fc921c90ed299a67fc2e1799.tar.gz
qmk_firmware-33e62c080c9161a0fc921c90ed299a67fc2e1799.zip
merging
-rw-r--r--.gitignore2
-rw-r--r--Dockerfile3
-rw-r--r--Makefile31
-rw-r--r--build_keyboard.mk13
-rw-r--r--doc/keycode.txt2
-rw-r--r--keyboards/atreus/keymaps/alphadox/config.h80
-rw-r--r--keyboards/atreus/keymaps/alphadox/keymap.c45
-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/ergodox.c20
-rw-r--r--keyboards/ergodox/ez/ez.c23
-rw-r--r--keyboards/ergodox/keymaps/algernon/NEWS.md62
-rw-r--r--keyboards/ergodox/keymaps/algernon/images/adore-layer.pngbin97089 -> 97357 bytes
-rw-r--r--keyboards/ergodox/keymaps/algernon/images/base-layer.pngbin102142 -> 102318 bytes
-rw-r--r--keyboards/ergodox/keymaps/algernon/keymap.c192
-rw-r--r--keyboards/ergodox/keymaps/algernon/readme.md8
-rw-r--r--keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json2
-rw-r--r--keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json2
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/hid-commands14
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/layer-notify12
-rw-r--r--keyboards/ergodox/keymaps/alphadox/Makefile17
-rw-r--r--keyboards/ergodox/keymaps/alphadox/config.h12
-rw-r--r--keyboards/ergodox/keymaps/alphadox/keymap.c107
-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/dvorak_programmer/Makefile8
-rw-r--r--keyboards/ergodox/keymaps/dvorak_programmer/README.md15
-rw-r--r--keyboards/ergodox/keymaps/dvorak_programmer/keymap.c403
-rw-r--r--keyboards/ergodox/keymaps/erez_experimental/keymap.c6
-rw-r--r--keyboards/ergodox/keymaps/erez_experimental/readme.md4
-rw-r--r--keyboards/ergodox/keymaps/j3rn/keymap.c16
-rw-r--r--keyboards/ergodox/keymaps/jack/config.h6
-rw-r--r--keyboards/ergodox/keymaps/jack/keymap.c11
-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/phoenix/keymap.c184
-rw-r--r--keyboards/ergodox/keymaps/phoenix/readme.md10
-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/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c213
-rw-r--r--keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.pngbin0 -> 119825 bytes
-rw-r--r--keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap2.pngbin0 -> 292705 bytes
-rw-r--r--keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md10
-rw-r--r--keyboards/ergodox/keymaps/win10_writers-block/Makefile9
-rw-r--r--keyboards/ergodox/keymaps/win10_writers-block/config.h36
-rw-r--r--keyboards/ergodox/keymaps/win10_writers-block/images/base-layer.pngbin0 -> 125979 bytes
-rw-r--r--keyboards/ergodox/keymaps/win10_writers-block/images/media-layer.pngbin0 -> 102643 bytes
-rw-r--r--keyboards/ergodox/keymaps/win10_writers-block/images/rimworld-layer.pngbin0 -> 90359 bytes
-rw-r--r--keyboards/ergodox/keymaps/win10_writers-block/images/symbol-layer.pngbin0 -> 101477 bytes
-rw-r--r--keyboards/ergodox/keymaps/win10_writers-block/keymap.c324
-rw-r--r--keyboards/ergodox/keymaps/win10_writers-block/readme.md113
-rw-r--r--keyboards/handwired/gamenum/Makefile (renamed from keyboards/planck/rev3/Makefile)0
-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/hhkb/keymaps/dbroqua/keymap.c12
-rw-r--r--keyboards/jd40/Makefile73
-rw-r--r--keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c73
-rw-r--r--keyboards/kc60/keymaps/dbroqua_hhkb/readme.md9
-rw-r--r--keyboards/lets_split/readme.md13
-rw-r--r--keyboards/pegasushoof/Makefile3
-rw-r--r--keyboards/pegasushoof/README.md24
-rw-r--r--keyboards/pegasushoof/config.h46
-rw-r--r--keyboards/pegasushoof/keymaps/blowrak/Makefile22
-rw-r--r--keyboards/pegasushoof/keymaps/blowrak/keymap.c112
-rw-r--r--keyboards/pegasushoof/keymaps/default/Makefile22
-rw-r--r--keyboards/pegasushoof/keymaps/default/keymap.c60
-rw-r--r--keyboards/pegasushoof/matrix.c204
-rw-r--r--keyboards/pegasushoof/pegasushoof.c51
-rw-r--r--keyboards/pegasushoof/pegasushoof.h51
-rw-r--r--keyboards/pegasushoof/rules.mk67
-rw-r--r--keyboards/planck/keymaps/callum/keymap.c12
-rw-r--r--keyboards/planck/keymaps/callum/readme.md6
-rw-r--r--keyboards/planck/keymaps/priyadi/Makefile26
-rw-r--r--keyboards/planck/keymaps/priyadi/keymap.c447
-rw-r--r--keyboards/planck/keymaps/priyadi/readme.md11
-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--keyboards/preonic/keymaps/jacwib/config.h1
-rw-r--r--keyboards/preonic/keymaps/jacwib/keymap.c132
-rw-r--r--keyboards/preonic/keymaps/jacwib/readme.md12
-rw-r--r--quantum/dynamic_macro.h9
-rw-r--r--quantum/keymap.h13
-rw-r--r--quantum/keymap_extras/keymap_br_abnt2.h58
-rw-r--r--quantum/keymap_extras/keymap_dvp.h82
-rwxr-xr-xquantum/light_ws2812.c20
-rw-r--r--quantum/process_keycode/process_unicode.c51
-rw-r--r--quantum/process_keycode/process_unicode.h13
-rw-r--r--quantum/quantum.c2
-rw-r--r--quantum/rgblight.c61
-rw-r--r--quantum/rgblight.h6
-rw-r--r--quantum/variable_trace.c110
-rw-r--r--quantum/variable_trace.h34
-rw-r--r--readme.md46
104 files changed, 5332 insertions, 313 deletions
diff --git a/.gitignore b/.gitignore
index 153fea093..f66a961fd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,5 @@ CMakeLists.txt
30.browse.VC.db* 30.browse.VC.db*
31*.stackdump 31*.stackdump
32util/Win_Check_Output.txt 32util/Win_Check_Output.txt
33.vscode
34.stfolder
diff --git a/Dockerfile b/Dockerfile
index 578d009dc..744ded857 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,8 +21,9 @@ RUN apt-get clean
21RUN rm -rf /var/lib/apt/lists/* 21RUN rm -rf /var/lib/apt/lists/*
22 22
23ENV keyboard=ergodox 23ENV keyboard=ergodox
24ENV subproject=ez
24ENV keymap=default 25ENV keymap=default
25 26
26VOLUME /qmk 27VOLUME /qmk
27WORKDIR /qmk 28WORKDIR /qmk
28CMD make clean ; make keyboard=${keyboard} keymap=${keymap} \ No newline at end of file 29CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap}
diff --git a/Makefile b/Makefile
index 0aaf58578..66c0ff30f 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,9 @@ ABS_ROOT_MAKEFILE := $(abspath $(ROOT_MAKEFILE))
32ABS_STARTING_DIR := $(dir $(ABS_STARTING_MAKEFILE)) 32ABS_STARTING_DIR := $(dir $(ABS_STARTING_MAKEFILE))
33ABS_ROOT_DIR := $(dir $(ABS_ROOT_MAKEFILE)) 33ABS_ROOT_DIR := $(dir $(ABS_ROOT_MAKEFILE))
34STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR)) 34STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR))
35TEST_DIR := $(ROOT_DIR)/.build/test 35BUILD_DIR := $(ROOT_DIR)/.build
36TEST_DIR := $(BUILD_DIR)/test
37ERROR_FILE := $(BUILD_DIR)/error_occured
36 38
37MAKEFILE_INCLUDED=yes 39MAKEFILE_INCLUDED=yes
38 40
@@ -460,8 +462,21 @@ endef
460 462
461include $(ROOT_DIR)/message.mk 463include $(ROOT_DIR)/message.mk
462 464
463RUN_COMMAND = \ 465# The empty line is important here, as it will force a new shell to be created for each command
464$(COMMAND_$(SILENT_MODE)_$(COMMAND)) 466# Otherwise the command line will become too long with a lot of keyboards and keymaps
467define RUN_COMMAND
468+error_occured=0;\
469$(COMMAND_$(SILENT_MODE)_$(COMMAND))\
470if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi;
471
472
473endef
474define RUN_TEST
475+error_occured=0;\
476$($(TEST)_COMMAND))\
477if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi;
478
479endef
465 480
466# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps 481# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps
467SUBPROJECTS := $(notdir $(patsubst %/Makefile,%,$(wildcard ./*/Makefile))) 482SUBPROJECTS := $(notdir $(patsubst %/Makefile,%,$(wildcard ./*/Makefile)))
@@ -481,17 +496,17 @@ $(SUBPROJECTS): %: %-allkm
481 *) printf "$(MSG_SUBMODULE_DIRTY)";break;; \ 496 *) printf "$(MSG_SUBMODULE_DIRTY)";break;; \
482 esac \ 497 esac \
483 done 498 done
499 rm -f $(ERROR_FILE) > /dev/null 2>&1
484 $(eval $(call PARSE_RULE,$@)) 500 $(eval $(call PARSE_RULE,$@))
485 $(eval $(call SET_SILENT_MODE)) 501 $(eval $(call SET_SILENT_MODE))
486 # Run all the commands in the same shell, notice the + at the first line 502 # Run all the commands in the same shell, notice the + at the first line
487 # it has to be there to allow parallel execution of the submake 503 # it has to be there to allow parallel execution of the submake
488 # This always tries to compile everything, even if error occurs in the middle 504 # This always tries to compile everything, even if error occurs in the middle
489 # But we return the error code at the end, to trigger travis failures 505 # But we return the error code at the end, to trigger travis failures
490 +error_occured=0; \ 506 $(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND))
491 $(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) \ 507 if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
492 if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\ 508 $(foreach TEST,$(TESTS),$(RUN_TEST))
493 $(foreach TEST,$(TESTS),$($(TEST)_COMMAND)) \ 509 if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
494 if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\
495 510
496# All should compile everything 511# All should compile everything
497.PHONY: all 512.PHONY: all
diff --git a/build_keyboard.mk b/build_keyboard.mk
index cd9f44c7b..42f8f8ac7 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -153,6 +153,11 @@ ifeq ($(strip $(UCIS_ENABLE)), yes)
153 UNICODE_ENABLE = yes 153 UNICODE_ENABLE = yes
154endif 154endif
155 155
156ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
157 OPT_DEFS += -DUNICODEMAP_ENABLE
158 UNICODE_ENABLE = yes
159endif
160
156ifeq ($(strip $(UNICODE_ENABLE)), yes) 161ifeq ($(strip $(UNICODE_ENABLE)), yes)
157 OPT_DEFS += -DUNICODE_ENABLE 162 OPT_DEFS += -DUNICODE_ENABLE
158 SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c 163 SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
@@ -181,6 +186,14 @@ ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
181 VAPTH += $(SERIAL_PATH) 186 VAPTH += $(SERIAL_PATH)
182endif 187endif
183 188
189ifneq ($(strip $(VARIABLE_TRACE)),)
190 SRC += $(QUANTUM_DIR)/variable_trace.c
191 OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
192ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
193 OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
194endif
195endif
196
184# Optimize size but this may cause error "relocation truncated to fit" 197# Optimize size but this may cause error "relocation truncated to fit"
185#EXTRALDFLAGS = -Wl,--relax 198#EXTRALDFLAGS = -Wl,--relax
186 199
diff --git a/doc/keycode.txt b/doc/keycode.txt
index 5a42c50bf..687406fda 100644
--- a/doc/keycode.txt
+++ b/doc/keycode.txt
@@ -84,7 +84,7 @@ KC_PAUSE KC_PAUS 48 Keyboard Pause1
84KC_INSERT KC_INS 49 Keyboard Insert1 84KC_INSERT KC_INS 49 Keyboard Insert1
85KC_HOME 4A Keyboard Home1 85KC_HOME 4A Keyboard Home1
86KC_PGUP 4B Keyboard PageUp1 86KC_PGUP 4B Keyboard PageUp1
87KC_DELETE KC_DELETE 4C Keyboard Delete Forward 87KC_DELETE KC_DEL 4C Keyboard Delete Forward
88KC_END 4D Keyboard End1 88KC_END 4D Keyboard End1
89KC_PGDOWN KC_PGDN 4E Keyboard PageDown1 89KC_PGDOWN KC_PGDN 4E Keyboard PageDown1
90KC_RIGHT KC_RGHT 4F Keyboard RightArrow1 90KC_RIGHT KC_RGHT 4F Keyboard RightArrow1
diff --git a/keyboards/atreus/keymaps/alphadox/config.h b/keyboards/atreus/keymaps/alphadox/config.h
new file mode 100644
index 000000000..df56849b0
--- /dev/null
+++ b/keyboards/atreus/keymaps/alphadox/config.h
@@ -0,0 +1,80 @@
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
25#define VENDOR_ID 0xFEED
26#define PRODUCT_ID 0x6060
27#define DEVICE_VER 0x0001
28#define MANUFACTURER Arbitrary Definitions
29#define PRODUCT Planckeus
30#define DESCRIPTION q.m.k. keyboard firmware for Planckeus
31
32/* key matrix size */
33#define MATRIX_ROWS 4
34#define MATRIX_COLS 11
35
36#define MATRIX_ROW_PINS { D0, D1, D2, D3 }
37#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, F7, B0, B1, B2, B3, B7 }
38#define UNUSED_PINS
39
40/* COL2ROW or ROW2COL */
41#define DIODE_DIRECTION COL2ROW
42
43/* define if matrix has ghost */
44//#define MATRIX_HAS_GHOST
45
46/* number of backlight levels */
47//#define BACKLIGHT_LEVELS 3
48
49/* Set 0 if debouncing isn't needed */
50#define DEBOUNCING_DELAY 5
51
52/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
53#define LOCKING_SUPPORT_ENABLE
54/* Locking resynchronize hack */
55#define LOCKING_RESYNC_ENABLE
56
57/* key combination for command */
58#define IS_COMMAND() ( \
59 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
60)
61
62/*
63 * Feature disable options
64 * These options are also useful to firmware size reduction.
65 */
66
67/* disable debug print */
68//#define NO_DEBUG
69
70/* disable print */
71//#define NO_PRINT
72
73/* disable action features */
74//#define NO_ACTION_LAYER
75//#define NO_ACTION_TAPPING
76//#define NO_ACTION_ONESHOT
77//#define NO_ACTION_MACRO
78//#define NO_ACTION_FUNCTION
79
80#endif
diff --git a/keyboards/atreus/keymaps/alphadox/keymap.c b/keyboards/atreus/keymaps/alphadox/keymap.c
new file mode 100644
index 000000000..b8ec0e032
--- /dev/null
+++ b/keyboards/atreus/keymaps/alphadox/keymap.c
@@ -0,0 +1,45 @@
1#include "atreus.h"
2
3#define BASE 0
4#define SYMB 1
5#define ETC 2
6
7enum macro_id {
8 TEENSY,
9};
10
11const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
12
13[BASE] = KEYMAP(
14 KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN,
15 LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H,
16 SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH),
17 KC_GRV, KC_DEL, KC_LALT, GUI_T(KC_TAB), LT(SYMB,KC_BSPC), CTL_T(KC_ESC), SFT_T(KC_ENT), LT(SYMB,KC_SPC), GUI_T(KC_LEFT), KC_DOWN, KC_UP, LCAG_T(KC_RGHT)
18),
19
20[SYMB] = KEYMAP(
21 KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS,
22 KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS, KC_MINS, KC_4, KC_5, KC_6, KC_QUOT,
23 KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO,
24 KC_TILD, KC_AMPR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_NO, KC_DOT, KC_TRNS
25),
26
27[ETC] = KEYMAP(
28 RESET, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME,
29 LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END,
30 KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS,
31 KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO
32),
33};
34
35const uint16_t PROGMEM fn_actions[] = {
36
37};
38
39const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
40 switch(id) {
41 case TEENSY:
42 break;
43 }
44 return MACRO_NONE;
45};
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/ergodox.c b/keyboards/ergodox/ergodox.c
index c88c1ad89..648ec8ad2 100644
--- a/keyboards/ergodox/ergodox.c
+++ b/keyboards/ergodox/ergodox.c
@@ -2,23 +2,3 @@
2#include "debug.h" 2#include "debug.h"
3#include "action_layer.h" 3#include "action_layer.h"
4 4
5// swap-hands action needs a matrix to define the swap
6const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
7 /* Left hand, matrix positions */
8 {{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}},
9 {{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}},
10 {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}},
11 {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}},
12 {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
13 {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
14 {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
15 /* Right hand, matrix positions */
16 {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
17 {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
18 {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
19 {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
20 {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
21 {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
22 {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
23};
24
diff --git a/keyboards/ergodox/ez/ez.c b/keyboards/ergodox/ez/ez.c
index e7afc9859..ddb8ff0cf 100644
--- a/keyboards/ergodox/ez/ez.c
+++ b/keyboards/ergodox/ez/ez.c
@@ -82,4 +82,25 @@ out:
82 return mcp23018_status; 82 return mcp23018_status;
83} 83}
84 84
85 85#ifdef ONEHAND_ENABLE
86__attribute__ ((weak))
87// swap-hands action needs a matrix to define the swap
88const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
89 /* Left hand, matrix positions */
90 {{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}},
91 {{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}},
92 {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}},
93 {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}},
94 {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
95 {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
96 {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
97 /* Right hand, matrix positions */
98 {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
99 {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
100 {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
101 {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
102 {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
103 {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
104 {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
105};
106#endif
diff --git a/keyboards/ergodox/keymaps/algernon/NEWS.md b/keyboards/ergodox/keymaps/algernon/NEWS.md
index 6b95c1ef4..e11998998 100644
--- a/keyboards/ergodox/keymaps/algernon/NEWS.md
+++ b/keyboards/ergodox/keymaps/algernon/NEWS.md
@@ -1,3 +1,33 @@
1<!-- -*- mode: markdown; fill-column: 8192 -*- -->
2
3## v1.9
4
5*2016-10-16*
6
7### Overall changes
8
9* `F12` was replaced by an `Fx` key, that activate the **Media** layer as a one-shot layer, and also `Alt` as a one-shot modifier.
10
11### Base layer changes
12
13* The `Media Stop` key is now a tap-dance key, and resets the device for programming on the fourth tap.
14
15### Miscellaneous
16
17* `π` can now be entered with UCIS.
18* `🐁` can now be entered with UCIS.
19
20### Tools
21
22* The `tools/layer-notify` tool was removed, it was an example, which I don't use.
23
24#### `tools/hid-commands`
25
26* Now looks at the `DISABLE_APPSEL_START` environment value, and does not display an AppSel notification if it is non-empty.
27* Will attempt to re-program the keyboard when receiving a `reflash` command.
28* No longer tries to select Emacs 24 on `APPSEL_EMACS`, rather, it goes for any Emacs.
29* The `APPSEL_MUSIC` command now includes Kodi in the list too, as the last choice.
30
1## v1.8 31## v1.8
2 32
3*2016-10-03* 33*2016-10-03*
@@ -13,7 +43,7 @@
13 43
14### Miscellaneous 44### Miscellaneous
15 45
16* Fixed the [Steno](#steno-layer) toggle key. 46* Fixed the **Steno** toggle key.
17 47
18## v1.7 48## v1.7
19 49
@@ -21,9 +51,9 @@
21 51
22### Overall changes 52### Overall changes
23 53
24* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers. 54* The number row has been completely rearranged on both the **Base** and the **ADORE** layers.
25* The number/function key behavior was changed: function keys are now on the **Media**. 55* 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. 56* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the **Base** and **ADORE** 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. 57* 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. 58* 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 59
@@ -59,13 +89,13 @@
59### Base layer changes 89### Base layer changes
60 90
61* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`. 91* 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 `[{(`/`]})`. 92* The `:;` and `-_` keys are now available on the base layer, on their **ADORE** location, too, just below `[{(`/`]})`.
63* The `Apps` key has been replaced by `F12`. 93* The `Apps` key has been replaced by `F12`.
64* The `-`/`_` is no longer a tap-dance key. 94* The `-`/`_` is no longer a tap-dance key.
65 95
66### ADORE layer changes 96### ADORE layer changes
67 97
68* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations. 98* Adjustments were made to the **ADORE** layer, to separate some inconvenient combinations.
69 99
70### Miscellaneous changes 100### Miscellaneous changes
71 101
@@ -84,9 +114,9 @@
84 114
85* The **1HAND** layer has been removed. 115* The **1HAND** layer has been removed.
86* A `Delete` key is now available on the right thumb cluster. 116* 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. 117* The **ADORE** 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. 118* It is now possible to enable automatic logging for the **ADORE** 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). 119* The `~` key and the `Media Next/Prev` key have been swapped on the **Base** layer.
90* On the **ARROW** layer, `Backspace` has been replaced by `Enter`. 120* On the **ARROW** layer, `Backspace` has been replaced by `Enter`.
91* There is some experimental support for entering Unicode symbols. 121* There is some experimental support for entering Unicode symbols.
92 122
@@ -104,33 +134,33 @@
104 134
105*2016-07-06* 135*2016-07-06*
106 136
107* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs. 137* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a *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. 138* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the **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. 139* The **experimental** layer has been redone, and is now called **ADORE**, 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. 140* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot.
111 141
112## v1.2 142## v1.2
113 143
114*2016-06-22* 144*2016-06-22*
115 145
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). 146* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with certain operating systems.
117* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted. 147* 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. 148* The `=` and `\` keys were swapped, `=` moved to the home row, on both the **Base** 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. 149* 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. 150* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer.
121* `LEAD v` types the firmware version, and the keymap version. 151* `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. 152* 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. 153* The **Steno** layer gained a few more `#` and `*` keys, to make it easier on my fingers.
124 154
125## v1.1 155## v1.1
126 156
127*2016-06-14* 157*2016-06-14*
128 158
129* The keyboard starts in NKRO mode, bootmagic and other things are disabled. 159* 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. 160* A **Steno** 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. 161* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress.
132* `LEAD y` types `\o/`. 162* `LEAD y` types `\o/`.
133* Some keys on the [Base](#base-layer) layer have been moved around: 163* Some keys on the **Base** layer have been moved around:
134 - `?` moved to the left pinky, left of `Q`. 164 - `?` moved to the left pinky, left of `Q`.
135 - `=` shifted one row down, but `F11` stayed where it was. 165 - `=` shifted one row down, but `F11` stayed where it was.
136 - `-` on the left half was replaced by `Tab`. 166 - `-` on the left half was replaced by `Tab`.
diff --git a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png
index 5f39010bb..f6c64ca64 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/base-layer.png b/keyboards/ergodox/keymaps/algernon/images/base-layer.png
index 2a981a470..5bd0611f6 100644
--- a/keyboards/ergodox/keymaps/algernon/images/base-layer.png
+++ b/keyboards/ergodox/keymaps/algernon/images/base-layer.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c
index 48d63fb0b..bad240337 100644
--- a/keyboards/ergodox/keymaps/algernon/keymap.c
+++ b/keyboards/ergodox/keymaps/algernon/keymap.c
@@ -64,6 +64,9 @@ enum {
64 A_8, 64 A_8,
65 A_9, 65 A_9,
66 A_0, 66 A_0,
67
68 // Fx
69 Fx,
67}; 70};
68 71
69/* Fn keys */ 72/* Fn keys */
@@ -86,6 +89,7 @@ enum {
86 CT_RBP, 89 CT_RBP,
87 CT_TMUX, 90 CT_TMUX,
88 CT_TPS, 91 CT_TPS,
92 CT_SR,
89}; 93};
90 94
91/* States & timers */ 95/* States & timers */
@@ -103,6 +107,7 @@ bool log_enable = false;
103#endif 107#endif
104 108
105bool time_travel = false; 109bool time_travel = false;
110bool skip_leds = false;
106 111
107static uint8_t is_adore = 0; 112static uint8_t is_adore = 0;
108 113
@@ -113,13 +118,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
113/* Keymap 0: Base Layer 118/* Keymap 0: Base Layer
114 * 119 *
115 * ,-----------------------------------------------------. ,-----------------------------------------------------. 120 * ,-----------------------------------------------------. ,-----------------------------------------------------.
116 * | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | 121 * | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | Fx | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
117 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| 122 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
118 * | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ | 123 * | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ |
119 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| 124 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
120 * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow | 125 * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow |
121 * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------| 126 * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------|
122 * | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop | 127 * | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop/Reset|
123 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' 128 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
124 * | | | | | : | | - | | | | | 129 * | | | | | : | | - | | | | |
125 * `-----------------------------------' `-----------------------------------' 130 * `-----------------------------------' `-----------------------------------'
@@ -144,10 +149,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
144 ,KC_BSPC,F(F_SFT),KC_ESC 149 ,KC_BSPC,F(F_SFT),KC_ESC
145 150
146 // right hand 151 // right hand
147 ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) 152 ,M(Fx) ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
148 ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS 153 ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS
149 ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL 154 ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL
150 ,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP 155 ,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,TD(CT_SR)
151 ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO 156 ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO
152 157
153 ,OSL(NMDIA),KC_DEL 158 ,OSL(NMDIA),KC_DEL
@@ -158,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
158/* Keymap 1: Adore layer 163/* Keymap 1: Adore layer
159 * 164 *
160 * ,-----------------------------------------------------. ,-----------------------------------------------------. 165 * ,-----------------------------------------------------. ,-----------------------------------------------------.
161 * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | 166 * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | Fx | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
162 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| 167 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
163 * | \ | X | W | C | H | F | ( | | ) | M | G | L | P | / | `~ | 168 * | \ | X | W | C | H | F | ( | | ) | M | G | L | P | / | `~ |
164 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| 169 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
@@ -189,7 +194,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
189 ,KC_BSPC,F(F_SFT),KC_ESC 194 ,KC_BSPC,F(F_SFT),KC_ESC
190 195
191 // right hand 196 // right hand
192 ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) 197 ,M(Fx) ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
193 ,TD(CT_RBP),KC_M ,KC_G ,KC_L ,KC_P ,KC_SLSH ,KC_GRV 198 ,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 199 ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL
195 ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_Y ,KC_J ,KC_NO 200 ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_Y ,KC_J ,KC_NO
@@ -342,7 +347,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
342/* Keymap 5: Navigation & Media layer 347/* Keymap 5: Navigation & Media layer
343 * 348 *
344 * ,-----------------------------------------------------. ,-----------------------------------------------------. 349 * ,-----------------------------------------------------. ,-----------------------------------------------------.
345 * | | F9 | F7 | F5 | F3 | F1 | | |ScrLCK| F10 | F2 | F4 | F6 | F8 | | 350 * | | F9 | F7 | F5 | F3 | F1 |ScrLCK| | | F10 | F2 | F4 | F6 | F8 | |
346 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| 351 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
347 * | | | | | | | | | | | | | | | | 352 * | | | | | | | | | | | | | | | |
348 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| 353 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
@@ -362,7 +367,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
362 */ 367 */
363[NMDIA] = KEYMAP( 368[NMDIA] = KEYMAP(
364// left hand 369// left hand
365 KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,KC_NO 370 KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,LGUI(KC_L)
366,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 371,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
367,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 372,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
368,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 373,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
@@ -372,7 +377,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
372 ,KC_NO ,KC_NO ,KC_TRNS 377 ,KC_NO ,KC_NO ,KC_TRNS
373 378
374 // right hand 379 // right hand
375 ,LGUI(KC_L),KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO 380 ,KC_TRNS ,KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO
376 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 381 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
377 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 382 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
378 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 383 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
@@ -611,6 +616,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
611 toggle_steno(record->event.pressed); 616 toggle_steno(record->event.pressed);
612 break; 617 break;
613 618
619 /* Fx */
620 case Fx:
621 if (record->event.pressed) {
622 set_oneshot_mods (MOD_LALT);
623 layer_on (NMDIA);
624 set_oneshot_layer (NMDIA, ONESHOT_START);
625 } else {
626 clear_oneshot_layer_state (ONESHOT_PRESSED);
627 }
628 break;
629
614 /* GUI & AppSel */ 630 /* GUI & AppSel */
615 case A_GUI: 631 case A_GUI:
616 if (record->event.pressed) { 632 if (record->event.pressed) {
@@ -780,6 +796,56 @@ static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *u
780 unregister_code(kc); 796 unregister_code(kc);
781} 797}
782 798
799static void
800_td_sr_each (qk_tap_dance_state_t *state, void *user_data) {
801 skip_leds = true;
802
803 switch (state->count) {
804 case 1:
805 ergodox_right_led_3_on ();
806 break;
807 case 2:
808 ergodox_right_led_2_on ();
809 break;
810 case 3:
811 ergodox_right_led_1_on ();
812 break;
813 case 4:
814 ergodox_right_led_3_off ();
815 wait_ms (50);
816 ergodox_right_led_2_off ();
817 wait_ms (50);
818 ergodox_right_led_1_off ();
819 break;
820 }
821}
822
823static void
824_td_sr_finished (qk_tap_dance_state_t *state, void *user_data) {
825 if (state->count == 1) {
826 register_code (KC_MSTP);
827 }
828 if (state->count >= 4) {
829 uprintf("CMD:reflash\n");
830 wait_ms (1000);
831 reset_keyboard ();
832 reset_tap_dance (state);
833 }
834}
835
836static void
837_td_sr_reset (qk_tap_dance_state_t *state, void *user_data) {
838 ergodox_right_led_1_off ();
839 wait_ms (50);
840 ergodox_right_led_2_off ();
841 wait_ms (50);
842 ergodox_right_led_3_off ();
843
844 if (state->count == 1) {
845 unregister_code (KC_MSTP);
846 }
847}
848
783qk_tap_dance_action_t tap_dance_actions[] = { 849qk_tap_dance_action_t tap_dance_actions[] = {
784 [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN) 850 [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN)
785 ,[CT_TA] = { 851 ,[CT_TA] = {
@@ -790,77 +856,75 @@ qk_tap_dance_action_t tap_dance_actions[] = {
790 ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN) 856 ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN)
791 ,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished) 857 ,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished)
792 ,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select) 858 ,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select)
859 ,[CT_SR] = ACTION_TAP_DANCE_FN_ADVANCED (_td_sr_each, _td_sr_finished, _td_sr_reset)
793}; 860};
794 861
795// Runs constantly in the background, in a loop. 862// Runs constantly in the background, in a loop.
796void matrix_scan_user(void) { 863void matrix_scan_user(void) {
797 static uint32_t prev_layer_state;
798 uint8_t layer = biton32(layer_state); 864 uint8_t layer = biton32(layer_state);
799 bool is_arrow = false; 865 bool is_arrow = false;
800 static char *layer_lookup[] = {"Dvorak", "ADORE", "Arrows", "AppSel", "Hungarian", "Nav/Media", "Plover"};
801
802 if (layer_state != prev_layer_state) {
803 prev_layer_state = layer_state;
804 if (layer_lookup[layer])
805 uprintf("LAYER: %s\n", layer_lookup[layer]);
806 }
807
808 866
809 if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) 867 if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM)
810 unregister_code (KC_LGUI); 868 unregister_code (KC_LGUI);
811 869
812 if (layer == HUN) { 870 if (!skip_leds) {
813 ergodox_right_led_2_on(); 871 if (layer == HUN) {
814 ergodox_right_led_3_on(); 872 ergodox_right_led_2_on();
815 } else if (layer == NMDIA) { 873 ergodox_right_led_3_on();
816 ergodox_right_led_1_on(); 874 } else if (layer == NMDIA) {
817 ergodox_right_led_2_on(); 875 ergodox_right_led_1_on();
818 } else if (layer == PLVR) { 876 ergodox_right_led_2_on();
819 ergodox_right_led_1_on (); 877 } else if (layer == PLVR) {
820 ergodox_right_led_2_on (); 878 ergodox_right_led_1_on ();
821 ergodox_right_led_3_on (); 879 ergodox_right_led_2_on ();
822 } else if (layer == ADORE) { 880 ergodox_right_led_3_on ();
823 ergodox_right_led_1_on (); 881 } else if (layer == ADORE) {
824 ergodox_right_led_2_on (); 882 ergodox_right_led_1_on ();
825 ergodox_right_led_3_on (); 883 ergodox_right_led_2_on ();
826 884 ergodox_right_led_3_on ();
827 ergodox_right_led_2_set (LED_BRIGHTNESS_HI); 885
886 ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
887 }
828 } 888 }
829 889
830 if (layer_state & (1UL << ARRW)) { 890 if (layer_state & (1UL << ARRW)) {
831 ergodox_right_led_1_on (); 891 if (!skip_leds) {
832 ergodox_right_led_3_on (); 892 ergodox_right_led_1_on ();
893 ergodox_right_led_3_on ();
894 }
833 is_arrow = true; 895 is_arrow = true;
834 } 896 }
835 897
836 if (keyboard_report->mods & MOD_BIT(KC_LSFT) || 898 if (!skip_leds) {
837 ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { 899 if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
838 ergodox_right_led_1_set (LED_BRIGHTNESS_HI); 900 ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
839 ergodox_right_led_1_on (); 901 ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
840 } else { 902 ergodox_right_led_1_on ();
841 ergodox_right_led_1_set (LED_BRIGHTNESS_LO); 903 } else {
842 if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow) 904 ergodox_right_led_1_set (LED_BRIGHTNESS_LO);
843 ergodox_right_led_1_off (); 905 if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow)
844 } 906 ergodox_right_led_1_off ();
907 }
845 908
846 if (keyboard_report->mods & MOD_BIT(KC_LALT) || 909 if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
847 ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) { 910 ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) {
848 ergodox_right_led_2_set (LED_BRIGHTNESS_HI); 911 ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
849 ergodox_right_led_2_on (); 912 ergodox_right_led_2_on ();
850 } else { 913 } else {
851 ergodox_right_led_2_set (LED_BRIGHTNESS_LO); 914 ergodox_right_led_2_set (LED_BRIGHTNESS_LO);
852 if (layer != HUN && layer != NMDIA && layer != PLVR && layer != ADORE) 915 if (layer != HUN && layer != NMDIA && layer != PLVR && layer != ADORE)
853 ergodox_right_led_2_off (); 916 ergodox_right_led_2_off ();
854 } 917 }
855 918
856 if (keyboard_report->mods & MOD_BIT(KC_LCTRL) || 919 if (keyboard_report->mods & MOD_BIT(KC_LCTRL) ||
857 ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) { 920 ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) {
858 ergodox_right_led_3_set (LED_BRIGHTNESS_HI); 921 ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
859 ergodox_right_led_3_on (); 922 ergodox_right_led_3_on ();
860 } else { 923 } else {
861 ergodox_right_led_3_set (LED_BRIGHTNESS_LO); 924 ergodox_right_led_3_set (LED_BRIGHTNESS_LO);
862 if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow) 925 if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow)
863 ergodox_right_led_3_off (); 926 ergodox_right_led_3_off ();
927 }
864 } 928 }
865 929
866 LEADER_DICTIONARY() { 930 LEADER_DICTIONARY() {
@@ -974,7 +1038,9 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE
974 UCIS_SYM("snowman", 0x2603), 1038 UCIS_SYM("snowman", 0x2603),
975 UCIS_SYM("coffee", 0x2615), 1039 UCIS_SYM("coffee", 0x2615),
976 UCIS_SYM("heart", 0x2764), 1040 UCIS_SYM("heart", 0x2764),
977 UCIS_SYM("bolt", 0x26a1) 1041 UCIS_SYM("bolt", 0x26a1),
1042 UCIS_SYM("pi", 0x03c0),
1043 UCIS_SYM("mouse", 0x1f401)
978); 1044);
979 1045
980bool process_record_user (uint16_t keycode, keyrecord_t *record) { 1046bool process_record_user (uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md
index 822ca3650..015bd7cd3 100644
--- a/keyboards/ergodox/keymaps/algernon/readme.md
+++ b/keyboards/ergodox/keymaps/algernon/readme.md
@@ -43,6 +43,7 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest
43* The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout. 43* The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout.
44* The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode. 44* The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode.
45* The **Media** and **Hun** layer keys are one-shot, the **STENO** key is a toggle. 45* The **Media** and **Hun** layer keys are one-shot, the **STENO** key is a toggle.
46* The **Fx** key is one-shot, and activates the **Media** layer, along with a one-shot `Alt`.
46* When holding the `Tab`/**Arrow** key, the arrow layer activates while the key is held. Tapping the key produces the normal, `Tab` key. Double-tapping it toggles the **Arrow** layer on until a third tap. 47* When holding the `Tab`/**Arrow** key, the arrow layer activates while the key is held. Tapping the key produces the normal, `Tab` key. Double-tapping it toggles the **Arrow** layer on until a third tap.
47* Tapping the `:` key once yields `:`, tapping it twice yields `;`. 48* Tapping the `:` key once yields `:`, tapping it twice yields `;`.
48* Tapping the `[{(`/`)}]` keys once yields `[` (or `{` when shifted), tapping them twice yields `(`. 49* Tapping the `[{(`/`)}]` keys once yields `[` (or `{` when shifted), tapping them twice yields `(`.
@@ -93,12 +94,7 @@ Unless noted otherwise, the layers use a dim light for the LEDs, while modifiers
93 94
94Once in the Unicode Symbol Input mode, one is able to type in symbol names, press `Enter` or `Space`, and get the Unicode symbol itself back. When in the mode, a capital `U` is printed first. Once the sequence is finished, all of it is erased by sending enough `Backspace` taps, and the firmware starts the OS-specific unicode input sequence. Then, it looks up the symbol name, and enters the associated code. If it is not found, it will just replay the pressed keycodes. 95Once in the Unicode Symbol Input mode, one is able to type in symbol names, press `Enter` or `Space`, and get the Unicode symbol itself back. When in the mode, a capital `U` is printed first. Once the sequence is finished, all of it is erased by sending enough `Backspace` taps, and the firmware starts the OS-specific unicode input sequence. Then, it looks up the symbol name, and enters the associated code. If it is not found, it will just replay the pressed keycodes.
95 96
96The currently supported symbols are: 97For the list of supported symbols, please see the source.
97
98- `snowman`: ☃
99- `kiss`: 😙
100- `rofl`: 🤣
101- `poop`: 💩
102 98
103This is an experimental feature, and may or may not work reliably. 99This is an experimental feature, and may or may not work reliably.
104 100
diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json
index a34edcf87..e09efecc4 100644
--- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json
+++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json
@@ -65,7 +65,7 @@
65 "x": 4.5, 65 "x": 4.5,
66 "f": 3 66 "f": 3
67 }, 67 },
68 "F12", 68 "Fx",
69 { 69 {
70 "a": 4, 70 "a": 4,
71 "f": 3, 71 "f": 3,
diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json
index 5b4ca06c3..1e53281c5 100644
--- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json
+++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json
@@ -65,7 +65,7 @@
65 "x": 4.5, 65 "x": 4.5,
66 "f": 3 66 "f": 3
67 }, 67 },
68 "F12", 68 "Fx",
69 { 69 {
70 "a": 4, 70 "a": 4,
71 "f": 3, 71 "f": 3,
diff --git a/keyboards/ergodox/keymaps/algernon/tools/hid-commands b/keyboards/ergodox/keymaps/algernon/tools/hid-commands
index 2a6710be4..a29d38f41 100755
--- a/keyboards/ergodox/keymaps/algernon/tools/hid-commands
+++ b/keyboards/ergodox/keymaps/algernon/tools/hid-commands
@@ -16,7 +16,7 @@ _cmd_appsel () {
16} 16}
17 17
18cmd_appsel_music () { 18cmd_appsel_music () {
19 wmctrl -x -a rhythmbox || wmctrl -x -a spotify || true 19 wmctrl -x -a rhythmbox || wmctrl -x -a spotify || wmctrl -x -a kodi || true
20 xdotool key Escape 20 xdotool key Escape
21} 21}
22 22
@@ -25,7 +25,7 @@ cmd_appsel_slack () {
25} 25}
26 26
27cmd_appsel_emacs () { 27cmd_appsel_emacs () {
28 _cmd_appsel emacs24 28 _cmd_appsel emacs
29} 29}
30 30
31cmd_appsel_term () { 31cmd_appsel_term () {
@@ -37,6 +37,10 @@ cmd_appsel_chrome () {
37} 37}
38 38
39cmd_appsel_start () { 39cmd_appsel_start () {
40 if [ ! -z "${DISABLE_APPSEL_START}" ]; then
41 return
42 fi
43
40 APPSEL_START=$(date +%s) 44 APPSEL_START=$(date +%s)
41 if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then 45 if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then
42 return 46 return
@@ -46,6 +50,10 @@ cmd_appsel_start () {
46 -i /usr/share/icons/Adwaita/24x24/devices/video-display.png 50 -i /usr/share/icons/Adwaita/24x24/devices/video-display.png
47} 51}
48 52
53cmd_reflash () {
54 teensy_loader_cli -v -w ~/src/ext/qmk_firmware/algernon.hex --mcu atmega32u4 || true
55}
56
49cmd_help () { 57cmd_help () {
50 cat <<EOF 58 cat <<EOF
51Use the source, Luke! 59Use the source, Luke!
@@ -69,5 +77,3 @@ while read l; do
69 cmd_${cmd} 77 cmd_${cmd}
70 fi 78 fi
71done 79done
72
73
diff --git a/keyboards/ergodox/keymaps/algernon/tools/layer-notify b/keyboards/ergodox/keymaps/algernon/tools/layer-notify
deleted file mode 100755
index 627c2861e..000000000
--- a/keyboards/ergodox/keymaps/algernon/tools/layer-notify
+++ /dev/null
@@ -1,12 +0,0 @@
1#!/bin/sh
2HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}"
3
4sudo "${HL}" | grep --line-buffered LAYER: | \
5(while read line; do
6 case $line in
7 LAYER:*)
8 layer="$(echo $(echo $line | cut -d: -f2-))"
9 notify-send -i mark-location-symbolic "Switched to layer: $layer"
10 ;;
11 esac
12 done)
diff --git a/keyboards/ergodox/keymaps/alphadox/Makefile b/keyboards/ergodox/keymaps/alphadox/Makefile
new file mode 100644
index 000000000..633499d00
--- /dev/null
+++ b/keyboards/ergodox/keymaps/alphadox/Makefile
@@ -0,0 +1,17 @@
1BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
2MOUSEKEY_ENABLE = no # Mouse keys(+4700)
3EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
4CONSOLE_ENABLE = no # Console for debug(+400)
5COMMAND_ENABLE = no # Commands for debug and configuration
6NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ # nkro-doesnt-work
7BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
8MIDI_ENABLE = no # MIDI controls
9AUDIO_ENABLE = no # Audio output on port C6
10UNICODE_ENABLE = no # Unicode
11BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
12RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
13SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
14
15ifndef QUANTUM_DIR
16 include ../../../../Makefile
17endif
diff --git a/keyboards/ergodox/keymaps/alphadox/config.h b/keyboards/ergodox/keymaps/alphadox/config.h
new file mode 100644
index 000000000..deb218dc0
--- /dev/null
+++ b/keyboards/ergodox/keymaps/alphadox/config.h
@@ -0,0 +1,12 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6#define FORCE_NKRO
7#define PREVENT_STUCK_MODIFIERS
8
9#undef TAPPING_TERM
10#undef IGNORE_MOD_TAP_INTERRUPT
11
12#endif
diff --git a/keyboards/ergodox/keymaps/alphadox/keymap.c b/keyboards/ergodox/keymaps/alphadox/keymap.c
new file mode 100644
index 000000000..731e62c0c
--- /dev/null
+++ b/keyboards/ergodox/keymaps/alphadox/keymap.c
@@ -0,0 +1,107 @@
1#include "ergodox.h"
2#include "debug.h"
3#include "action_layer.h"
4
5#define BASE 0 // default layer
6#define SYMB 1 // symbols
7#define ETC 2 // etc
8
9enum macro_id {
10 TEENSY,
11};
12
13const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
14
15[BASE] = KEYMAP(
16 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
17 KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_PGUP,
18 CTL_T(KC_ESC), LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G,
19 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN,
20 KC_GRV, KC_DEL, KC_DEL, KC_LALT, GUI_T(KC_TAB),
21 KC_NO, KC_NO,
22 KC_NO,
23 LT(SYMB,KC_BSPC), CTL_T(KC_ESC), KC_NO,
24
25 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
26 KC_VOLU, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSLS,
27 KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT,
28 KC_VOLD, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
29 GUI_T(KC_TAB), KC_LEFT, KC_DOWN, KC_UP, LCAG_T(KC_RGHT),
30 KC_NO, KC_NO,
31 KC_NO,
32 KC_NO, SFT_T(KC_ENT), LT(SYMB,KC_SPC)
33),
34
35[SYMB] = KEYMAP(
36 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
37 KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS,
38 KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS,
39 KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_TRNS,
40 KC_TILD, KC_AMPR, KC_AMPR, KC_TRNS, KC_TRNS,
41 KC_TRNS, KC_TRNS,
42 KC_TRNS,
43 KC_TRNS, KC_TRNS, KC_TRNS,
44
45 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
46 KC_TRNS, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS, KC_NO,
47 KC_MINS, KC_4, KC_5, KC_6, KC_QUOT, KC_NO,
48 KC_TRNS, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO, KC_TRNS,
49 KC_0, KC_NO, KC_DOT, KC_TRNS, KC_TRNS,
50 KC_TRNS, KC_TRNS,
51 KC_TRNS,
52 KC_TRNS, KC_TRNS, KC_TRNS
53),
54
55[ETC] = KEYMAP(
56 RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
57 KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_TRNS,
58 KC_TRNS, LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN,
59 KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_TRNS,
60 KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS,
61 KC_TRNS, KC_TRNS,
62 KC_TRNS,
63 KC_TRNS, KC_TRNS, KC_TRNS,
64
65 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
66 KC_TRNS, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME, KC_NO,
67 KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END, KC_NO,
68 KC_TRNS, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS, KC_TRNS,
69 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
70 KC_TRNS, KC_TRNS,
71 KC_TRNS,
72 KC_TRNS, KC_TRNS, KC_TRNS
73),
74};
75
76const uint16_t PROGMEM fn_actions[] = {
77};
78
79const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
80 switch(id) {
81 case TEENSY:
82 break;
83 }
84 return MACRO_NONE;
85};
86
87void matrix_init_user(void) {
88};
89
90void matrix_scan_user(void) {
91 uint8_t layer = biton32(layer_state);
92
93 ergodox_board_led_off();
94 ergodox_right_led_1_off();
95 ergodox_right_led_2_off();
96 ergodox_right_led_3_off();
97 switch (layer) {
98 case 1:
99 ergodox_right_led_1_on();
100 break;
101 case 2:
102 ergodox_right_led_2_on();
103 break;
104 default:
105 break;
106 }
107};
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/dvorak_programmer/Makefile b/keyboards/ergodox/keymaps/dvorak_programmer/Makefile
new file mode 100644
index 000000000..1fd6cb9ff
--- /dev/null
+++ b/keyboards/ergodox/keymaps/dvorak_programmer/Makefile
@@ -0,0 +1,8 @@
1BOOTMAGIC_ENABLE=no
2COMMAND_ENABLE=no
3SLEEP_LED_ENABLE=no
4FORCE_NKRO ?= yes
5DEBUG_ENABLE = no
6CONSOLE_ENABLE = no
7TAP_DANCE_ENABLE = yes
8MOUSEKEY_ENABLE = no
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md
new file mode 100644
index 000000000..a4580fe06
--- /dev/null
+++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md
@@ -0,0 +1,15 @@
1Dvorak Programmer Layout
2========================
3
4This is a dvorak-only layout. The overall philosophy is that the left hand contains a number of layer-switching shortcuts, and the right hand key codes vary based on the layer selected.
5
6Layers
7------
8
9* BASE: this is where you type.
10* SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement.
11* KEY_NAV: arrow key movement with backward/forward word support, and copy/paste.
12* KEY_SEL: same as above, but every movement shift-selects.
13* NUMBER: keypad layer.
14* SYMBOL: all the symbols as well as brackets at the bottom.
15* SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps.
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c
new file mode 100644
index 000000000..5100115a6
--- /dev/null
+++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c
@@ -0,0 +1,403 @@
1
2#include "ergodox.h"
3#include "led.h"
4#include "debug.h"
5#include "action_layer.h"
6#include "action_code.h"
7
8#define BASE 0 // default layer
9#define SHELL_NAV 1
10#define KEY_NAV 3 // key navigation layer
11#define KEY_SEL 4 // key selection layer
12#define NUMBER 5 // number layer
13#define SYMBOL 6
14#define BRACKETS 7
15#define SHORTCUTS 8
16
17// macros
18#define MC_COPY_LINE 0
19#define MC_CUT_LINE 1
20#define MC_PASTE_LINE 2
21#define MC_NEW_SEARCH_TAB 3
22#define SCREEN_TAB_LEFT 4
23#define SCREEN_TAB_RIGHT 5
24#define SCREEN_NEW_TAB 6
25#define SWITCH_NDS 7
26#define SCREEN_COPY_MODE 8
27#define SCREEN_PASTE 9
28#define OPEN_CLOSE_PAREN 10
29#define OPEN_CLOSE_BRACKET 11
30#define OPEN_CLOSE_CURLY 12
31#define OPEN_CLOSE_SINGLE_QUOTE 13
32#define OPEN_CLOSE_DOUBLE_QUOTE 14
33#define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 15
34#define SEMICOLON_NEWLINE 16
35#define END_NEWLINE 17
36
37
38const uint16_t PROGMEM fn_actions[] = {
39 [1] = ACTION_LAYER_TAP_TOGGLE(KEY_NAV), // FN1 - keynav layer
40 [2] = ACTION_LAYER_TAP_TOGGLE(NUMBER), // FN2 - number layer
41 [3] = ACTION_MODS_ONESHOT(MOD_LSFT), // FN3 - shift modifier / oneshot
42 [4] = ACTION_MODS_ONESHOT(MOD_LCTL), // FN4 - ctrl modifier / oneshot
43 [5] = ACTION_MODS_ONESHOT(MOD_LALT), // FN5 - alt modifier / oneshot
44};
45
46//Tap Dance Declarations
47enum {
48 TD_SHIFT_CAPSLOCK = 0,
49 TD_BRK_LEFT = 1,
50 TD_BRK_RIGHT = 2
51};
52
53
54
55const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
56// base layer
57[BASE] = KEYMAP( // layer 0 : default
58 // left hand
59 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
60 LT(BRACKETS,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL),
61 MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
62 KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV),
63 OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER),
64 // thumb cluster
65 RCTL(KC_F), RCTL(KC_S),
66 RCTL(KC_DEL),
67 KC_BSPC,RCTL(KC_BSPC),KC_DEL,
68 // right hand
69 KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS,
70 KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
71 KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
72 KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK),
73 // lower keys - browser tab control
74 RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), RCTL(KC_K), RCTL(KC_W),
75 // thumb cluster
76 M(SEMICOLON_NEWLINE), M(END_NEWLINE),
77 KC_UP,
78 KC_DOWN,KC_ENT, KC_SPC
79 ),
80
81
82// shell navigation layer
83[SHELL_NAV] = KEYMAP(
84 // left hand
85 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
86 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
87 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
88 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
89 // bottom row
90 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
91 // thumb cluster
92 KC_TRNS,KC_TRNS,
93 LALT(KC_D),
94 KC_TRNS,RCTL(KC_W),KC_TRNS,
95 // right hand
96 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
97 RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, LALT(KC_D), RCTL(KC_R),
98 LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT),
99 RCTL(KC_C), RCTL(KC_U), M(SCREEN_COPY_MODE), M(SCREEN_PASTE), HYPR(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND),
100 // bottom row
101 M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS,
102 // thumb cluster
103 KC_TRNS, KC_TRNS,
104 KC_TRNS,
105 KC_TRNS, KC_TRNS, KC_TRNS
106),
107
108
109// key navigation layer
110[KEY_NAV] = KEYMAP(
111 // left hand
112 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
113 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
114 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
115 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
116 // bottom row
117 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
118 // thumb cluster
119 KC_TRNS,KC_TRNS,
120 KC_TRNS,
121 KC_TRNS,KC_TRNS,KC_TRNS,
122 // right hand
123 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
124 KC_TRNS, KC_PGDN, KC_HOME, KC_UP, KC_END, KC_PGUP, M(MC_COPY_LINE),
125 RCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, RCTL(KC_RIGHT), M(MC_CUT_LINE),
126 KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_TRNS, M(MC_PASTE_LINE),
127 // bottom row
128 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
129 // thumb cluster
130 KC_TRNS, KC_TRNS,
131 KC_TRNS,
132 KC_TRNS, KC_TRNS, KC_TRNS
133),
134
135// key selection layer
136[KEY_SEL] = KEYMAP(
137 // left hand
138 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
139 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
140 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
141 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
142 // bottom row
143 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
144 // thumb cluster
145 KC_TRNS,KC_TRNS,
146 KC_TRNS,
147 KC_TRNS,KC_TRNS,KC_TRNS,
148 // right hand
149 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
150 RSFT(KC_PGUP), RSFT(KC_PGDN), RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), M(MC_COPY_LINE),
151 RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), M(MC_CUT_LINE),
152 RSFT(KC_PGDN), KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_TRNS, M(MC_PASTE_LINE),
153 // bottom row
154 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
155 // thumb cluster
156 KC_TRNS, KC_TRNS,
157 KC_TRNS,
158 KC_TRNS, KC_TRNS, KC_TRNS
159),
160
161// number layer
162[NUMBER] = KEYMAP(
163 // left hand
164 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
165 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
166 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
167 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
168 // bottom row
169 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
170 // thumb cluster
171 KC_TRNS,KC_TRNS,
172 KC_TRNS,
173 KC_TRNS,KC_TRNS,KC_TRNS,
174 // right hand
175 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
176 KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
177 KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, KC_TRNS,
178 KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_COLN, KC_TRNS,
179 // bottom row
180 KC_0, KC_DOT, KC_COMMA, KC_TRNS, KC_TRNS,
181 // thumb cluster
182 KC_TRNS, KC_TRNS,
183 KC_TRNS,
184 KC_TRNS, KC_TRNS, KC_TRNS
185),
186
187
188[SYMBOL] = KEYMAP(
189 // left hand
190 KC_NO,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
191 KC_TRNS,KC_TRNS, M(OPEN_CLOSE_PAREN), KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS,
192 KC_TRNS,KC_TRNS, M(OPEN_CLOSE_BRACKET), KC_LBRC, KC_RBRC, M(OPEN_CLOSE_DOUBLE_QUOTE),
193 KC_TRNS,M(SEMICOLON_NEWLINE),M(OPEN_CLOSE_CURLY), KC_LCBR, KC_RCBR, M(OPEN_CLOSE_SINGLE_QUOTE),KC_TRNS,
194 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
195 KC_TRNS,KC_TRNS,
196 KC_TRNS,
197 KC_TRNS,KC_TRNS,KC_TRNS,
198 // right hand
199 KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_TRNS,
200 KC_TRNS, KC_PLUS, KC_AMPR, KC_ASTR, KC_GRAVE,KC_TILD, KC_TRNS,
201 KC_MINS, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_TRNS,
202 KC_TRNS, KC_EQUAL,KC_EXLM, KC_AT, KC_HASH, KC_TRNS, KC_TRNS,
203 KC_LBRC, KC_RBRC, TD(TD_BRK_LEFT), TD(TD_BRK_RIGHT), KC_TRNS,
204 KC_TRNS, KC_TRNS,
205 KC_TRNS,
206 KC_TRNS, KC_TRNS, KC_TRNS
207),
208
209[BRACKETS] = KEYMAP(
210 // left hand
211 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
212 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
213 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
214 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
215 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
216 KC_TRNS,KC_TRNS,
217 KC_TRNS,
218 KC_TRNS,KC_TRNS,KC_TRNS,
219 // right hand
220 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
221 KC_TRNS, KC_TRNS, M(OPEN_CLOSE_BRACKET),M(OPEN_CLOSE_PAREN),M(OPEN_CLOSE_CURLY),KC_TRNS,KC_TRNS,
222 KC_TRNS, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_TRNS,
223 KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS,
224 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
225 KC_TRNS, KC_TRNS,
226 KC_TRNS,
227 KC_TRNS, KC_TRNS, KC_TRNS
228),
229
230[SHORTCUTS] = KEYMAP(
231 // left hand
232 KC_NO, HYPR(KC_F1), HYPR(KC_F2), HYPR(KC_F3), HYPR(KC_F4), HYPR(KC_F5), HYPR(KC_F6),
233 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
234 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
235 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
236 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
237 KC_TRNS,KC_TRNS,
238 KC_TRNS,
239 KC_TRNS,KC_TRNS,KC_TRNS,
240 // right hand
241 HYPR(KC_F7), HYPR(KC_F8), HYPR(KC_F9), HYPR(KC_F10), HYPR(KC_F11), HYPR(KC_F12), M(SWITCH_NDS),
242 KC_TRNS, HYPR(KC_A), HYPR(KC_B), HYPR(KC_C), HYPR(KC_D), HYPR(KC_E), HYPR(KC_F),
243 HYPR(KC_G), HYPR(KC_H), HYPR(KC_I), HYPR(KC_J), HYPR(KC_K), HYPR(KC_L),
244 KC_TRNS, HYPR(KC_M), HYPR(KC_N), HYPR(KC_O), HYPR(KC_P), HYPR(KC_Q), HYPR(KC_R),
245 LALT(KC_LEFT),LALT(KC_RIGHT),KC_F5, LCTL(LGUI(KC_LEFT)), LCTL(LGUI(KC_RIGHT)),
246 KC_TRNS, KC_TRNS,
247 KC_TRNS,
248 KC_TRNS, KC_TRNS, KC_TRNS
249),
250
251
252};
253
254
255
256const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
257{
258 // MACRODOWN only works in this function
259 switch(id) {
260 case MC_COPY_LINE:
261 if (record->event.pressed) {
262 return MACRO( T(HOME), D(LSFT), T(END), U(LSFT), D(LCTL), T(C), U(LCTL), END);
263 }
264 break;
265 case MC_CUT_LINE:
266 if (record->event.pressed) {
267 return MACRO( T(HOME), D(LSFT), T(END), U(LSFT), D(LCTL), T(X), U(LCTL), END);
268 }
269 break;
270 case MC_PASTE_LINE:
271 if (record->event.pressed) {
272 return MACRO( T(END), T(ENTER), D(LCTL), T(V), U(LCTL), END);
273 }
274 break;
275 case MC_NEW_SEARCH_TAB:
276 if (record->event.pressed) {
277 return MACRO( D(LCTL), T(T), T(K), U(LCTL), END);
278 }
279 break;
280 case SCREEN_TAB_LEFT:
281 if (record->event.pressed) {
282 return MACRO( D(LCTL), T(A), U(LCTL), T(P), END);
283 }
284 break;
285 case SCREEN_TAB_RIGHT:
286 if (record->event.pressed) {
287 return MACRO( D(LCTL), T(A), U(LCTL), T(N), END);
288 }
289 break;
290 case SCREEN_NEW_TAB:
291 if (record->event.pressed) {
292 return MACRO( D(LCTL), T(A), U(LCTL), T(C), END);
293 }
294 break;
295 case SCREEN_COPY_MODE:
296 if (record->event.pressed) {
297 return MACRO( D(LCTL), T(A), U(LCTL), T(ESC), END);
298 }
299 break;
300 case SCREEN_PASTE:
301 if (record->event.pressed) {
302 return MACRO( D(LCTL), T(A), U(LCTL), T(RBRC), END);
303 }
304 break;
305 case SWITCH_NDS:
306 if (record->event.pressed) {
307 return MACRO( D(LSFT), T(F11), U(LSFT), W(500), D(LALT), T(TAB), U(LALT), END);
308 }
309 break;
310 case OPEN_CLOSE_PAREN:
311 if (record->event.pressed) {
312 return MACRO( D(LSFT), T(LPRN), T(RPRN), U(LSFT), T(LEFT), END);
313 }
314 break;
315 case OPEN_CLOSE_BRACKET:
316 if (record->event.pressed) {
317 return MACRO( T(LBRC), T(RBRC), T(LEFT), END);
318 }
319 break;
320 case OPEN_CLOSE_CURLY:
321 if (record->event.pressed) {
322 return MACRO( D(LSFT), T(LCBR), T(RCBR), U(LSFT), T(LEFT), END);
323 }
324 break;
325 case OPEN_CLOSE_SINGLE_QUOTE:
326 if (record->event.pressed) {
327 return MACRO( T(QUOT), T(QUOT), T(LEFT), END);
328 }
329 break;
330 case OPEN_CLOSE_DOUBLE_QUOTE:
331 if (record->event.pressed) {
332 return MACRO( D(LSFT), T(QUOT), T(QUOT), U(LSFT), T(LEFT), END);
333 }
334 break;
335 case SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND:
336 if (record->event.pressed) {
337 return MACRO( T(UP), T(HOME), D(LALT), T(D), U(LALT), END);
338 }
339 break;
340 case SEMICOLON_NEWLINE:
341 if (record->event.pressed) {
342 return MACRO( T(END), T(SCLN), T(ENTER), END);
343 }
344 break;
345 case END_NEWLINE:
346 if (record->event.pressed) {
347 return MACRO( T(END), T(ENTER), END);
348 }
349 break;
350
351 }
352 return MACRO_NONE;
353};
354
355// Runs just one time when the keyboard initializes.
356void matrix_init_user(void) {
357
358 return;
359};
360
361void led_set_user(uint8_t usb_led) {
362 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
363 ergodox_right_led_1_on();
364 } else {
365 ergodox_right_led_1_off();
366 }
367}
368
369qk_tap_dance_action_t tap_dance_actions[] = {
370 [TD_SHIFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPSLOCK),
371 [TD_BRK_LEFT] = ACTION_TAP_DANCE_DOUBLE (KC_LPRN, KC_LCBR),
372 [TD_BRK_RIGHT] = ACTION_TAP_DANCE_DOUBLE (KC_RPRN, KC_RCBR)
373
374};
375
376
377// Runs constantly in the background, in a loop.
378void matrix_scan_user(void) {
379
380 uint8_t layer = biton32(layer_state);
381
382 ergodox_board_led_off();
383 ergodox_right_led_2_off();
384 ergodox_right_led_3_off();
385 switch (layer) {
386 case NUMBER:
387 case SYMBOL:
388 ergodox_right_led_2_on();
389 break;
390 case KEY_NAV:
391 case KEY_SEL:
392 ergodox_right_led_3_on();
393 break;
394 case SHORTCUTS:
395 ergodox_right_led_2_on();
396 ergodox_right_led_3_on();
397 break;
398 default:
399 // none
400 break;
401 }
402 return;
403};
diff --git a/keyboards/ergodox/keymaps/erez_experimental/keymap.c b/keyboards/ergodox/keymaps/erez_experimental/keymap.c
index 47e40aa55..4804959d6 100644
--- a/keyboards/ergodox/keymaps/erez_experimental/keymap.c
+++ b/keyboards/ergodox/keymaps/erez_experimental/keymap.c
@@ -11,7 +11,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
11/* Keymap 0: Basic layer 11/* Keymap 0: Basic layer
12 * 12 *
13 * ,--------------------------------------------------. ,--------------------------------------------------. 13 * ,--------------------------------------------------. ,--------------------------------------------------.
14 * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | 14 * | = | 1 | 2 | 3 | 4 | 5 |Ctrl- | | Ctrl+| 6 | 7 | 8 | 9 | 0 | - |
15 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| 15 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
16 * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | 16 * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
17 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 17 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
@@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
33// Otherwise, it needs KC_* 33// Otherwise, it needs KC_*
34[BASE] = KEYMAP( // layer 0 : default 34[BASE] = KEYMAP( // layer 0 : default
35 // left hand 35 // left hand
36 KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, 36 KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, LCTL(KC_MINS),
37 KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), 37 KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
38 KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, 38 KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
39 KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_LBRC), 39 KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_LBRC),
@@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
42 KC_HOME, 42 KC_HOME,
43 KC_SPC,KC_LEAD,KC_END, 43 KC_SPC,KC_LEAD,KC_END,
44 // right hand 44 // right hand
45 KC_RGHT, KC_6,KC_7, KC_8, KC_9, KC_0, KC_MINS, 45 LCTL(KC_EQL), KC_6,KC_7, KC_8, KC_9, KC_0, KC_MINS,
46 TG(SYMB), KC_Y,KC_U, KC_I, KC_O, KC_P, KC_BSLS, 46 TG(SYMB), KC_Y,KC_U, KC_I, KC_O, KC_P, KC_BSLS,
47 KC_H,ALT_T(KC_J),KC_K, KC_L, LT(MDIA,KC_SCLN),GUI_T(KC_QUOT), 47 KC_H,ALT_T(KC_J),KC_K, KC_L, LT(MDIA,KC_SCLN),GUI_T(KC_QUOT),
48 MEH_T(KC_RBRC),KC_N,KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC, 48 MEH_T(KC_RBRC),KC_N,KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC,
diff --git a/keyboards/ergodox/keymaps/erez_experimental/readme.md b/keyboards/ergodox/keymaps/erez_experimental/readme.md
index 66acfa187..f0738d9a7 100644
--- a/keyboards/ergodox/keymaps/erez_experimental/readme.md
+++ b/keyboards/ergodox/keymaps/erez_experimental/readme.md
@@ -4,6 +4,10 @@ This is my personal layout which I use to test out ideas which may or may not ma
4 4
5Changelog: 5Changelog:
6 6
7## Nov 1, 2016:
8
9* Adds dedicated text zooming keys in inner corners
10
7## May 24, 2016: 11## May 24, 2016:
8 12
9* Implements Leader key example 13* Implements Leader key example
diff --git a/keyboards/ergodox/keymaps/j3rn/keymap.c b/keyboards/ergodox/keymaps/j3rn/keymap.c
index e6f6cf44e..2069f26ae 100644
--- a/keyboards/ergodox/keymaps/j3rn/keymap.c
+++ b/keyboards/ergodox/keymaps/j3rn/keymap.c
@@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
16 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 16 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
17 * |Ctrl/Esc| A | S | D | F | G |------| |------| H | J | K | L | ; | ' | 17 * |Ctrl/Esc| A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
18 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| 18 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
19 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | 19 * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
20 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 20 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
21 * | ~L1 | Alt |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | 21 * | ~L1 | Alt |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
22 * `----------------------------------' `----------------------------------' 22 * `----------------------------------' `----------------------------------'
@@ -35,22 +35,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, 35 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC,
36 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, 36 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS,
37 CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, 37 CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G,
38 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), 38 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
39 KC_FN1, KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, 39 MO(SYMB), KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
40 40
41 ALT_T(KC_APP), KC_HOME, 41 ALT_T(KC_APP), KC_HOME,
42 KC_END, 42 KC_END,
43 KC_SPC, KC_LGUI, KC_FN2, 43 KC_SPC,KC_LGUI,MO(MDIA),
44 // right hand 44 // right hand
45 KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, 45 KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
46 KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, 46 KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
47 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, 47 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
48 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, 48 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
49 KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, 49 KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, MO(SYMB),
50 50
51 KC_PGUP, CTL_T(KC_ESC), 51 KC_PGUP, CTL_T(KC_ESC),
52 KC_PGDN, 52 KC_PGDN,
53 KC_FN1, KC_TAB, KC_ENT 53 MO(SYMB),KC_TAB, KC_ENT
54 ), 54 ),
55/* Keymap 1: Symbol Layer 55/* Keymap 1: Symbol Layer
56 * 56 *
diff --git a/keyboards/ergodox/keymaps/jack/config.h b/keyboards/ergodox/keymaps/jack/config.h
index f0932084a..1781563b8 100644
--- a/keyboards/ergodox/keymaps/jack/config.h
+++ b/keyboards/ergodox/keymaps/jack/config.h
@@ -7,8 +7,8 @@
7#define RGB_DI_PIN D7 7#define RGB_DI_PIN D7
8// #define RGBLIGHT_TIMER 8// #define RGBLIGHT_TIMER
9#define RGBLED_NUM 15 // Number of LEDs 9#define RGBLED_NUM 15 // Number of LEDs
10#define RGBLIGHT_HUE_STEP 8 10#define RGBLIGHT_HUE_STEP 12
11#define RGBLIGHT_SAT_STEP 8 11#define RGBLIGHT_SAT_STEP 255
12#define RGBLIGHT_VAL_STEP 8 12#define RGBLIGHT_VAL_STEP 12
13 13
14#endif \ No newline at end of file 14#endif \ No newline at end of file
diff --git a/keyboards/ergodox/keymaps/jack/keymap.c b/keyboards/ergodox/keymaps/jack/keymap.c
index fabd27a61..8721b9644 100644
--- a/keyboards/ergodox/keymaps/jack/keymap.c
+++ b/keyboards/ergodox/keymaps/jack/keymap.c
@@ -19,9 +19,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 KC_HOME, 19 KC_HOME,
20 KC_SPC,KC_SPC,KC_END, 20 KC_SPC,KC_SPC,KC_END,
21 // right hand 21 // right hand
22 KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, 22 KC_NO, M(1), KC_7, KC_8, KC_9, KC_0, KC_NO,
23 KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, 23 KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_P, KC_BSPC,
24 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, 24 RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_SCLN, KC_QUOT,
25 KC_NO, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_ENT, 25 KC_NO, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_ENT,
26 MO(1), KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, 26 MO(1), KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,
27 RGB_TOG, RGB_HUI, 27 RGB_TOG, RGB_HUI,
@@ -84,6 +84,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
84 unregister_code(KC_RSFT); 84 unregister_code(KC_RSFT);
85 } 85 }
86 break; 86 break;
87 case 1:
88 if (record->event.pressed) { // For resetting EEPROM
89 eeconfig_init();
90 }
91 break;
87 } 92 }
88 return MACRO_NONE; 93 return MACRO_NONE;
89}; 94};
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/phoenix/keymap.c b/keyboards/ergodox/keymaps/phoenix/keymap.c
new file mode 100644
index 000000000..624817d47
--- /dev/null
+++ b/keyboards/ergodox/keymaps/phoenix/keymap.c
@@ -0,0 +1,184 @@
1#include "ergodox.h"
2#include "debug.h"
3#include "action_layer.h"
4
5#define BASE 0 // default layer
6#define SYMB 1 // symbols
7#define MDIA 2 // media keys
8
9const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
10/* Keymap 0: Basic layer
11 *
12 * ,--------------------------------------------------. ,--------------------------------------------------.
13 * | Esc | 1 | 2 | 3 | 4 | 5 | _ | | Del | 6 | 7 | 8 | 9 | 0 | - |
14 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
15 * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
16 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
17 * | = | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
18 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
19 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
20 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
21 * |Grv/L1| '" |AltShf| Left | Right| | Down | UP | [ | ] | ~L1 |
22 * `----------------------------------' `----------------------------------'
23 * ,-------------. ,-------------.
24 * | App | Home | | Alt |Ctrl/Esc|
25 * ,------|------|------| |------+--------+------.
26 * | | | End | | PgUp | | |
27 * | Space|Backsp|------| |------| Enter |Space |
28 * | |ace | LGui | | PgDn | | |
29 * `--------------------' `----------------------'
30 */
31// If it accepts an argument (i.e, is a function), it doesn't need KC_.
32// Otherwise, it needs KC_*
33[BASE] = KEYMAP( // layer 0 : default
34 // left hand
35 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_MINS),
36 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
37 KC_EQL, KC_A, KC_S, KC_D, KC_F, KC_G,
38 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
39 LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
40 ALT_T(KC_APP), KC_HOME,
41 KC_END,
42 KC_SPC,KC_BSPC,KC_LGUI,
43 // right hand
44 KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
45 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
46 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
47 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
48 KC_DOWN,KC_UP ,KC_LBRC,KC_RBRC, KC_FN1,
49 KC_LALT, CTL_T(KC_ESC),
50 KC_PGUP,
51 KC_PGDN,KC_ENT, KC_SPC
52 ),
53/* Keymap 1: Symbol Layer
54 *
55 * ,--------------------------------------------------. ,--------------------------------------------------.
56 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | |
57 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
58 * | | F11 | F12 | | | | | | | Up | 7 | 8 | 9 | * | |
59 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
60 * | | | | | | ` |------| |------| Down | 4 | 5 | 6 | + | |
61 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
62 * | | | | | | | | | | & | 1 | 2 | 3 | \ | |
63 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
64 * | | | | | | | 0 | 0 | . | = | |
65 * `----------------------------------' `----------------------------------'
66 * ,-------------. ,-------------.
67 * | | | | | |
68 * ,------|------|------| |------+------+------.
69 * | | | | | | | |
70 * | | |------| |------| | |
71 * | | | | | | | |
72 * `--------------------' `--------------------'
73 */
74// SYMBOLS
75[SYMB] = KEYMAP(
76 // left hand
77 KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
78 KC_TRNS,KC_F11, KC_F12, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
79 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
80 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
81 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
82 KC_TRNS,KC_TRNS,
83 KC_TRNS,
84 KC_TRNS,KC_TRNS,KC_TRNS,
85 // right hand
86 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
87 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
88 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
89 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
90 KC_0, KC_0, KC_DOT, KC_EQL, KC_TRNS,
91 KC_TRNS, KC_TRNS,
92 KC_TRNS,
93 KC_TRNS, KC_TRNS, KC_TRNS
94),
95/* Keymap 2: Media and mouse keys
96 *
97 * ,--------------------------------------------------. ,--------------------------------------------------.
98 * | | | | | | | | | | | | | | | |
99 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
100 * | | | | MsUp | | | | | | | | | | | |
101 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
102 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
103 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
104 * | | | | | | | | | | | | Prev | Next | | |
105 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
106 * | | | | Lclk | Rclk | |VolDn |VolUp | Mute | | |
107 * `----------------------------------' `----------------------------------'
108 * ,-------------. ,-------------.
109 * | | | | | |
110 * ,------|------|------| |------+------+------.
111 * | | | | | | |Brwser|
112 * | | |------| |------| |Back |
113 * | | | | | | | |
114 * `--------------------' `--------------------'
115 */
116// MEDIA AND MOUSE
117[MDIA] = KEYMAP(
118 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
119 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
120 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
121 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
122 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
123 KC_TRNS, KC_TRNS,
124 KC_TRNS,
125 KC_TRNS, KC_TRNS, KC_TRNS,
126 // right hand
127 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
128 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
129 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
130 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
131 KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS,
132 KC_TRNS, KC_TRNS,
133 KC_TRNS,
134 KC_TRNS, KC_TRNS, KC_WBAK
135),
136};
137
138const uint16_t PROGMEM fn_actions[] = {
139 [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
140};
141
142const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
143{
144 // MACRODOWN only works in this function
145 switch(id) {
146 case 0:
147 if (record->event.pressed) {
148 register_code(KC_RSFT);
149 } else {
150 unregister_code(KC_RSFT);
151 }
152 break;
153 }
154 return MACRO_NONE;
155};
156
157// Runs just one time when the keyboard initializes.
158void matrix_init_user(void) {
159
160};
161
162// Runs constantly in the background, in a loop.
163void matrix_scan_user(void) {
164
165 uint8_t layer = biton32(layer_state);
166
167 ergodox_board_led_off();
168 ergodox_right_led_1_off();
169 ergodox_right_led_2_off();
170 ergodox_right_led_3_off();
171 switch (layer) {
172 // TODO: Make this relevant to the ErgoDox EZ.
173 case 1:
174 ergodox_right_led_1_on();
175 break;
176 case 2:
177 ergodox_right_led_2_on();
178 break;
179 default:
180 // none
181 break;
182 }
183
184};
diff --git a/keyboards/ergodox/keymaps/phoenix/readme.md b/keyboards/ergodox/keymaps/phoenix/readme.md
new file mode 100644
index 000000000..b1053bfb7
--- /dev/null
+++ b/keyboards/ergodox/keymaps/phoenix/readme.md
@@ -0,0 +1,10 @@
1# ErgoDox EZ Phoenix Configuration
2
3I started working using the default layout. The changes that I made are largely things that I consistely do wrong.
4
5As a programmer I hit tab a lot for autocomplete so that muscle memory is very difficult to re-write. The stragest change might be all the keys that I cleared in the Code layer. This is mainly to facilitate quickly typing uuids, as sometimes it is quite tedious to copy/paste them from one window to the other.
6
7## Changelog
8
9* April 25, 2016 (V1.0):
10 * Initial submission.
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/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c
new file mode 100644
index 000000000..c9dc43c56
--- /dev/null
+++ b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.c
@@ -0,0 +1,213 @@
1#include "ergodox.h"
2#include "debug.h"
3#include "action_layer.h"
4#include "version.h"
5
6const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
7
8
9/* Keymap 0: Basic Dvorak layer
10 *
11 * ,--------------------------------------------------. ,--------------------------------------------------.
12 * | Hebrew | 1 | 2 | 3 | 4 | 5 |ALT+S | |B.tick| 6 | 7 | 8 | 9 | 0 | = |
13 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
14 * | TAB | ' | , | . | P | Y | LCK2 | | | F | G | C | R | L | / |
15 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
16 * | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | - |
17 * |--------+------+------+------+------+------| LCK1 | | |------+------+------+------+------+--------|
18 * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RSHIFT |
19 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
20 * |FN2 | COPY | CUT | PASTE| FN1 | | [ | ] | \ | UNDO | CTRL+A |
21 * `----------------------------------' `------------------------------------'
22 * ,-------------. ,-------------.
23* | DEL | | | END | HOME |
24 * ,------|------|------| |------+--------+------.
25 * | | | SUPER| | PgUp | | |
26 * | BACK | CTRL |------| |------| Enter |SPACE |
27 * | SPACE| | ALT | | PgDn | | |
28 * `--------------------' `----------------------'
29 */
30[0] = KEYMAP(
31 TG(1), KC_1, KC_2, KC_3, KC_4, KC_5, LALT(KC_LSHIFT),
32 KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, TG(3),
33 KC_ESCAPE, KC_A, KC_O, KC_E, KC_U, KC_I,
34 KC_LSHIFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, TG(2),
35 MO(3), LCTL(KC_C), LCTL(KC_X), LCTL(KC_V), MO(2),
36 KC_DELETE, KC_TRNS,
37 KC_LGUI,
38 KC_BSPACE,CTL_T(KC_NO),KC_LALT,
39
40 KC_TILD, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
41 KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH,
42 KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS,
43 KC_TRNS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSHIFT,
44 KC_LBRACKET, KC_RBRACKET, KC_BSLASH, KC_UNDO, LCTL(KC_A),
45 KC_END, KC_HOME,
46 KC_PGUP,
47 KC_PGDOWN, KC_ENTER, KC_SPACE
48),
49
50 /* Keymap 1: Hebrew layer
51 *
52 * ,--------------------------------------------------. ,--------------------------------------------------.
53 * | | | | | | | | | | | | | | | |
54 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
55 * | | | | | | | | | | | | | | | |
56 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
57 * | | | | | | |------| |------| | | | | | |
58 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
59 * | | | | | | | | | | | | | | | |
60 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
61 * | | | | | | | | | | | |
62 * `----------------------------------' `----------------------------------'
63 * ,-------------. ,-------------.
64 * | | | | | |
65 * ,------|------|------| |------+------+------.
66 * | | | | | | | |
67 * | | |------| |------| | |
68 * | | | | | | | |
69 * `--------------------' `--------------------'
70 */
71[1] = KEYMAP(
72 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
73 KC_TRNS, KC_W, KC_QUOTE, KC_SLASH, KC_R, KC_T, KC_TRNS,
74 KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G,
75 KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_TRNS,
76 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
77 KC_TRNS, KC_TRNS,
78 KC_TRNS,
79 KC_TRNS, KC_TRNS, KC_TRNS,
80
81 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
82 KC_TRNS, KC_Y, KC_U, KC_E, KC_O, KC_P, KC_TRNS,
83 KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_TRNS,
84 KC_TRNS, KC_N, KC_M, KC_COMMA, KC_DOT, KC_I, KC_TRNS,
85 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
86 KC_TRNS, KC_TRNS,
87 KC_TRNS,
88 KC_TRNS, KC_TRNS, KC_TRNS
89),
90
91/* Keymap 2: Arrows ,Mouse Navigation and F Layer
92 *
93 * ,--------------------------------------------------. ,--------------------------------------------------.
94 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | |
95 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
96 * | | | | MsUp | | | | | F11 | | | UP | | | |
97 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
98 * | | |MsLeft|MsDown|MsRght| |------| |------| | LEFT | DOWN | RIGHT| | |
99 * |--------+------+------+------+------+------| | | F12 |------+------+------+------+------+--------|
100 * | | | | | | | | | | | | | | | |
101 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
102 * | | | | | | | Lclk | Rclk | | | |
103 * `----------------------------------' `----------------------------------'
104 * ,-------------. ,-------------.
105 * | | | | | |
106 * ,------|------|------| |------+------+------.
107 * | | | | | | | |
108 * | | |------| |------| | |
109 * | | | | | | | |
110 * `--------------------' `--------------------'
111 */
112[2] = KEYMAP(
113 KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
114 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS,
115 KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS,
116 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
117 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
118 KC_TRNS, KC_TRNS,
119 KC_TRNS,
120 KC_TRNS, KC_TRNS, KC_TRNS,
121
122 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
123 KC_F11, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
124 KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS,
125 KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
126 KC_MS_BTN1, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_TRNS,
127 KC_TRNS, KC_TRNS,
128 KC_TRNS,
129 KC_TRNS, KC_TRNS, KC_TRNS
130),
131
132 /* Keymap 3: Numpad Layer
133 *
134 * ,--------------------------------------------------. ,--------------------------------------------------.
135 * | | | | | | | | | | | NMLK | P/ | P* | P- | |
136 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
137 * | | | | | | | | | | | 7 | 8 | 9 | P+ | |
138 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
139 * | | | | | | |------| |------| | 4 | 5 | 6 | P+ | |
140 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
141 * | | | | | | | | | | | 1 | 2 | 3 | ENTER| |
142 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
143 * | | | | | | | 0 | 0 | . | ENTER| |
144 * `----------------------------------' `----------------------------------'
145 * ,-------------. ,-------------.
146 * | | | | | |
147 * ,------|------|------| |------+------+------.
148 * | | | | | | | |
149 * | | |------| |------| | |
150 * | | | | | | | |
151 * `--------------------' `--------------------'
152 */
153[3] = KEYMAP(
154 // Left Hand
155 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
156 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,
158 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
159 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
160 KC_TRNS,KC_TRNS,
161 KC_TRNS,
162 KC_TRNS,KC_TRNS,KC_TRNS,
163 // Right Hand
164 KC_TRNS, KC_TRNS, KC_LOCKING_NUM, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS,
165 KC_TRNS, KC_TRNS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS,
166 KC_TRNS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_TRNS,
167 KC_TRNS, KC_TRNS, KC_KP_1, KC_KP_2, KC_KP_3, KC_ENTER, KC_TRNS,
168 KC_KP_0, KC_KP_0, KC_KP_DOT, KC_ENTER, KC_TRNS,
169 KC_TRNS, KC_TRNS,
170 KC_TRNS,
171 KC_TRNS, KC_TRNS, KC_TRNS
172),
173
174};
175
176const uint16_t PROGMEM fn_actions[] = {
177 [1] = ACTION_LAYER_TAP_TOGGLE(1)
178};
179
180const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
181{
182 switch(id) {
183 case 0:
184 if (record->event.pressed) {
185 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
186 }
187 break;
188 }
189 return MACRO_NONE;
190};
191
192void matrix_scan_user(void) {
193
194 uint8_t layer = biton32(layer_state);
195
196 ergodox_board_led_off();
197 ergodox_right_led_1_off();
198 ergodox_right_led_2_off();
199 ergodox_right_led_3_off();
200 switch (layer) {
201 case 1:
202 ergodox_right_led_1_on();
203 break;
204 case 2:
205 ergodox_right_led_2_on();
206 break;
207 case 3:
208 ergodox_right_led_3_on();
209 default:
210 break;
211 }
212
213};
diff --git a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.png b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.png
new file mode 100644
index 000000000..82c81dcae
--- /dev/null
+++ b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap2.png b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap2.png
new file mode 100644
index 000000000..ec8e7494d
--- /dev/null
+++ b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap2.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md
new file mode 100644
index 000000000..99b8182f5
--- /dev/null
+++ b/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/readme.md
@@ -0,0 +1,10 @@
1#Dvorak-Hebrew
2
3* This layout solves the problem of Dvorak Keyboard with OS QWERTY, which when you change to hebrew all the letters scrumble, the second layer is the Hebrew (top left button), which you can use on any computer, Plug and play.
4
5* The Hebrew layout itself solve another problem with the different locations of punctuation on Dvorak/Hebrew with few minor changes, it's based on Yuval Rabinovich's layout which you can find here : http://heboard.wordpress.com for regular QWERTY keyboards and for other operation systems.
6
7* these are only good when using a public computer or one you can't change settings on, because you need to change both keyboard layout and os layout each time you change language. A better solution is to use [hebrew-hw-dvorak](https://github.com/20lives/hebrew-hw-dvorak) as os layout.
8
9![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap.png)
10![layout image](https://github.com/20lives/qmk_firmware/blob/master/keyboards/ergodox/keymaps/twentylives_dvorak_with_hebrew/keymap2.png)
diff --git a/keyboards/ergodox/keymaps/win10_writers-block/Makefile b/keyboards/ergodox/keymaps/win10_writers-block/Makefile
new file mode 100644
index 000000000..fbab4b71c
--- /dev/null
+++ b/keyboards/ergodox/keymaps/win10_writers-block/Makefile
@@ -0,0 +1,9 @@
1# Having a file like this allows you to override Makefile definitions
2# for your own particular keymap
3
4TAP_DANCE_ENABLE=yes
5
6
7ifndef QUANTUM_DIR
8 include ../../../../Makefile
9endif
diff --git a/keyboards/ergodox/keymaps/win10_writers-block/config.h b/keyboards/ergodox/keymaps/win10_writers-block/config.h
new file mode 100644
index 000000000..43259db08
--- /dev/null
+++ b/keyboards/ergodox/keymaps/win10_writers-block/config.h
@@ -0,0 +1,36 @@
1#ifndef KEYBOARDS_ERGODOX_CONFIG_H_
2#define KEYBOARDS_ERGODOX_CONFIG_H_
3
4#define MOUSEKEY_DELAY 100
5#define MOUSEKEY_INTERVAL 20
6#define MOUSEKEY_MAX_SPEED 3
7#define MOUSEKEY_TIME_TO_MAX 10
8
9#define TAPPING_TOGGLE 1
10
11/* define if matrix has ghost */
12//#define MATRIX_HAS_GHOST
13
14#define TAPPING_TERM 300
15#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
16
17/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
18#define LOCKING_SUPPORT_ENABLE
19/* Locking resynchronize hack */
20#define LOCKING_RESYNC_ENABLE
21
22/* key combination for command */
23#define IS_COMMAND() ( \
24 keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
25 keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
26)
27
28#ifdef SUBPROJECT_ez
29 #include "ez/config.h"
30#endif
31#ifdef SUBPROJECT_infinity
32 #include "infinity/config.h"
33#endif
34
35
36#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */
diff --git a/keyboards/ergodox/keymaps/win10_writers-block/images/base-layer.png b/keyboards/ergodox/keymaps/win10_writers-block/images/base-layer.png
new file mode 100644
index 000000000..d1cb1987c
--- /dev/null
+++ b/keyboards/ergodox/keymaps/win10_writers-block/images/base-layer.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/win10_writers-block/images/media-layer.png b/keyboards/ergodox/keymaps/win10_writers-block/images/media-layer.png
new file mode 100644
index 000000000..c2019da4e
--- /dev/null
+++ b/keyboards/ergodox/keymaps/win10_writers-block/images/media-layer.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/win10_writers-block/images/rimworld-layer.png b/keyboards/ergodox/keymaps/win10_writers-block/images/rimworld-layer.png
new file mode 100644
index 000000000..f866d3d55
--- /dev/null
+++ b/keyboards/ergodox/keymaps/win10_writers-block/images/rimworld-layer.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/win10_writers-block/images/symbol-layer.png b/keyboards/ergodox/keymaps/win10_writers-block/images/symbol-layer.png
new file mode 100644
index 000000000..6f49aae79
--- /dev/null
+++ b/keyboards/ergodox/keymaps/win10_writers-block/images/symbol-layer.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/win10_writers-block/keymap.c b/keyboards/ergodox/keymaps/win10_writers-block/keymap.c
new file mode 100644
index 000000000..3106b3374
--- /dev/null
+++ b/keyboards/ergodox/keymaps/win10_writers-block/keymap.c
@@ -0,0 +1,324 @@
1#include "ergodox.h"
2#include "debug.h"
3#include "action_layer.h"
4#include "version.h"
5#include "wait.h"
6
7#define BASE 0 // default layer - helpful for writing in Office-style word processors.
8#define SYMB 1 // symbol layer - NumPad, etc. - same as Ergodox EZ default but no EEPROM or Version key
9#define RIMW 2 // rimworld layer - made for the game RimWorld, by Tynan Sylvester | feel free to remap for your favorite game!
10#define MDIA 3 // media layer - mouse and music - close to Ergodox EZ default media layer
11
12#define CO_PA M(0) // hold copy, tap paste
13
14#define W_CUT LCTL(KC_X) // C-x Cut
15#define W_COPY LCTL(KC_C) // C-c Copy
16#define W_PASTE LCTL(KC_V) // C-v Paste
17#define W_UNDO LCTL(KC_Z) // C-z Undo
18#define W_FIND LCTL(KC_F) // C-v Find
19#define W_CAD LCTL(LALT(KC_DEL)) // one-tap ctrl-alt-del
20
21
22
23//Tap Dance Declarations
24enum {
25 CAKEWARP,
26 CTRLALTMDIA,
27};
28
29void cake_count (qk_tap_dance_state_t *state, void *user_data) {
30 if (state->count == 2) {
31 layer_on (SYMB); //define double tap here
32 layer_off (MDIA);
33 }
34 else {
35 layer_off (SYMB); //define single tap or hold here
36 layer_off (MDIA);
37 }
38 if (state->count == 3) {
39 layer_on (RIMW); //define triple tap here
40 layer_off (MDIA);
41 }
42 else {
43 layer_off (RIMW); //define single tap or hold here
44 layer_off (MDIA);
45 reset_tap_dance (state);
46 }
47}
48
49void dance_cad_mdia_fin (qk_tap_dance_state_t *state, void *user_data) {
50 if (state->count == 1) {
51 register_code (KC_LCTL);
52 register_code (KC_LALT);
53 register_code (KC_DEL);
54 } else {
55 layer_on (MDIA);
56 }
57}
58
59void dance_cad_mdia_reset (qk_tap_dance_state_t *state, void *user_data) {
60 if (state->count == 1) {
61 unregister_code (KC_DEL);
62 unregister_code (KC_LALT);
63 unregister_code (KC_LCTL);
64 } else {
65 ;
66 }
67}
68
69//Tap Dance Definitions
70qk_tap_dance_action_t tap_dance_actions[] = {
71 // tap for Layer 0, tap twice to switch to symbol layer, and tap three times to switch to rimworld layer.
72 [CAKEWARP] = ACTION_TAP_DANCE_FN(cake_count)
73 // tap for ctrl-alt-del, tap twice for media layer
74 ,[CTRLALTMDIA] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cad_mdia_fin, dance_cad_mdia_reset)
75 // Other declarations would go here, separated by commas, if you have them
76};
77
78//In Layer declaration, add tap dance item in place of a key code
79
80const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
81/* Keymap 0: Basic layer - TD(one_tap, two_taps, three_taps...)
82 *
83 * ,--------------------------------------------------. ,--------------------------------------------------.
84 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 7 | 8 | 9 | 0 | - | = |
85 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
86 * | F12/L1 | Q | W | E | R | T | {/[ | |TD(L0 | Y | U | I | O | P | \ |
87 * |--------+------+------+------+------+------| | |L1 L2)|------+------+------+------+------+--------|
88 * |Caps/Win| A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
89 * |--------+------+------+------+------+------| }/] | TD(ctrl|------+------+------+------+------+--------|
90 * |LShift/(|Z/Ctrl| X | C | V | B | | |altdel| N | M | , | . | / |RShift/)|
91 * `--------+------+------+------+------+-------------' |L3) |------+------+------+------+------+--------'
92 * | Undo | Cut |CopyPa| Meh | LGui | '------| | Enter| Left | Up | Down | Right |
93 * `----------------------------------' `----------------------------------'
94 * ,-------------. ,-------------.
95 * | Esc | VolUp| | F4 | Mute |
96 * ,------|------|------| |------+--------+------.
97 * | | | VolDn| | F5 | | |
98 * |Backsp|Delete|------| |------| Tab / |Space |
99 * |ace | | Find | | Alt | CTRL | |
100 * `--------------------' `----------------------'
101 */
102// If it accepts an argument (i.e, is a function), it doesn't need KC_.
103// Otherwise, it needs KC_*
104[BASE] = KEYMAP( // layer 0 : default
105 // left hand
106 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
107LT(SYMB, KC_F12), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC,
108 GUI_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G,
109 KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_RBRC,
110 W_UNDO, W_CUT, CO_PA, MEH_T(KC_NO), KC_LGUI,
111 KC_ESC, KC_VOLU,
112 KC_VOLD,
113 KC_BSPC, KC_DELETE, W_FIND,
114 // right hand
115 KC_7, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
116 TD(CAKEWARP), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
117 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
118 TD(CTRLALTMDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
119 KC_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT,
120 KC_F4, KC_MUTE,
121 KC_F5,
122 KC_RALT, CTL_T(KC_TAB), KC_SPC
123 ),
124
125/* Keymap 1: Symbol Layer | No EEPROM Or Version keys
126 *
127 * ,--------------------------------------------------. ,--------------------------------------------------.
128 * | | F1 | F2 | F3 | F4 | F5 | xx | | xx | F6 | F7 | F8 | F9 | F10 | F11 |
129 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
130 * | | ! | @ | { | } | | | | |TD(L0 | Up | 7 | 8 | 9 | * | F12 |
131 * |--------+------+------+------+------+------| | |L1 L2)|------+------+------+------+------+--------|
132 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | - |
133 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
134 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
135 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
136 * | | | | | | | | . | 0 | = | |
137 * `----------------------------------' `----------------------------------'
138 * ,-------------. ,-------------.
139 * | | | | | |
140 * ,------|------|------| |------+------+------.
141 * | | | | | | | |
142 * | | |------| |------| | |
143 * | | | | | | | |
144 * `--------------------' `--------------------'
145 */
146// SYMBOLS
147[SYMB] = KEYMAP(
148 // left hand
149 KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO,
150 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
151 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
152 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
153 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
154 KC_TRNS,KC_TRNS,
155 KC_TRNS,
156 KC_TRNS,KC_TRNS,KC_TRNS,
157 // right hand
158 KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
159 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
160 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_MINS,
161 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
162 KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_NO,
163 KC_TRNS, KC_TRNS,
164 KC_TRNS,
165 KC_TRNS, KC_TRNS, KC_TRNS
166),
167
168/* Keymap 2: RimWorld Layer
169 *
170 * ,--------------------------------------------------. ,--------------------------------------------------.
171 * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 7 | 8 | 9 | 0 | - | = |
172 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
173 * | TAB | C | ,< | W | >. | R | | |TD(L0 | U | B | N | J | M | PGUP |
174 * |--------+------+------+------+------+------| F10 | |L1 L2)|------+------+------+------+------+--------|
175 * | I | F | A | S | D | 8 |------| |------| X | L | P | Y | H | ENTER |
176 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
177 * | K | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | PGDN |
178 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
179 * | | | | | | | F | | | | |
180 * `----------------------------------' `----------------------------------'
181 * ,-------------. ,-------------.
182 * | | | | | |
183 * ,------|------|------| |------+------+------.
184 * | | | | | | | |
185 * |SPACE | C |------| |------| E |SPACE |
186 * | | | Q | | | | |
187 * `--------------------' `--------------------'
188 */
189// RIMWORLD
190[RIMW] = KEYMAP(
191 // left hand
192 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
193 KC_TAB, KC_C, KC_COMM, KC_W, KC_DOT, KC_R, KC_F10,
194 KC_I, KC_F, KC_A, KC_S, KC_D, KC_8,
195 KC_K, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
196 KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
197 KC_TRNS,KC_TRNS,
198 KC_TRNS,
199 KC_C,KC_Q,KC_TRNS,
200 // right hand
201 KC_7, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
202 KC_TRNS, KC_U, KC_B, KC_N, KC_J, KC_M, KC_PGUP,
203 KC_X, KC_L, SFT_T(KC_P), KC_Y, KC_H, KC_ENT,
204 KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGDN,
205 KC_F, KC_LEFT, KC_UP, KC_DOWN,KC_RIGHT,
206 KC_TRNS, KC_TRNS,
207 KC_TRNS,
208 KC_TRNS, KC_E, KC_TRNS
209),
210/* Keymap 3: Media and mouse keys
211 *
212 * ,--------------------------------------------------. ,--------------------------------------------------.
213 * | | | | | | | | | | | | | | | |
214 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
215 * | | | | MsUp | | | | | | | | | | | |
216 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
217 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
218 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
219 * | | | | | | | | | | | | Prev | Next | | |
220 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
221 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
222 * `----------------------------------' `----------------------------------'
223 * ,-------------. ,-------------.
224 * | | | | | |
225 * ,------|------|------| |------+------+------.
226 * | | | | | | |Brwser|
227 * | Lclk | Rclk |------| |------| |Back |
228 * | | | | | | | |
229 * `--------------------' `--------------------'
230 */
231// MEDIA AND MOUSE
232[MDIA] = KEYMAP(
233 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
234 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
235 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
236 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
237 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
238 KC_TRNS, KC_TRNS,
239 KC_TRNS,
240 KC_BTN1, KC_BTN2, KC_TRNS,
241 // right hand
242 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
243 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
244 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
245 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
246 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
247 KC_TRNS, KC_TRNS,
248 KC_TRNS,
249 KC_TRNS, KC_TRNS, KC_WBAK
250),
251};
252
253static uint16_t key_timer;
254
255const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
256{
257 switch(id) {
258 case 0: {
259 if (record->event.pressed) {
260 key_timer = timer_read(); // if the key is being pressed, we start the timer.
261 }
262 else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
263 if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap.
264 return MACRO( D(LCTL), T(C), U(LCTL), END );
265 }
266 else {
267 return MACRO( D(LCTL), T(V), U(LCTL), END );
268 }
269 }
270 break;
271 }
272 }
273 return MACRO_NONE;
274};
275
276// Anything you want to do once when the keyboard initializes.
277// Tests LED function when the keyboard initializes.
278void matrix_init_user(void) {
279
280 wait_ms(500);
281 ergodox_board_led_on();
282 wait_ms(200);
283 ergodox_right_led_1_on();
284 wait_ms(200);
285 ergodox_right_led_2_on();
286 wait_ms(200);
287 ergodox_right_led_3_on();
288 wait_ms(200);
289 ergodox_board_led_off();
290 wait_ms(200);
291 ergodox_right_led_1_off();
292 wait_ms(200);
293 ergodox_right_led_2_off();
294 wait_ms(200);
295 ergodox_right_led_3_off();
296
297};
298
299
300// Runs constantly in the background, in a loop.
301void matrix_scan_user(void) {
302
303 uint8_t layer = biton32(layer_state);
304
305 ergodox_board_led_off();
306 ergodox_right_led_1_off();
307 ergodox_right_led_2_off();
308 ergodox_right_led_3_off();
309 switch (layer) {
310 case 1:
311 ergodox_right_led_1_on();
312 break;
313 case 2:
314 ergodox_right_led_2_on();
315 break;
316 case 3:
317 ergodox_right_led_3_on();
318 break;
319 default:
320 // none
321 break;
322 }
323
324};
diff --git a/keyboards/ergodox/keymaps/win10_writers-block/readme.md b/keyboards/ergodox/keymaps/win10_writers-block/readme.md
new file mode 100644
index 000000000..e51e3c48f
--- /dev/null
+++ b/keyboards/ergodox/keymaps/win10_writers-block/readme.md
@@ -0,0 +1,113 @@
1<!-- -*- mode: markdown; fill-column: 8192 -*- -->
2
3Win10 Writer's Block ErgoDox - v1.0
4
5=======================
6
7This is a QWERTY layout for QMK. It's designed to work well in MS Office-like environments. It's tested on Windows 7 and 10.
8
9Professional writers may find this layout useful -- copywriters, technical writers, novelists, etc.
10
11I use my ErgoDox with this keymap as a daily driver at my office.
12
13A gaming layer is unobtrusively built into this layout. I use that layer to play RimWorld.
14
15Feel free to modify the gaming layer to your personal taste.
16
17## Table of Contents
18
19* [Layouts](#layouts)
20 - [Base layer](#base-layer)
21 - [Symbol layer](#symbol-layer)
22 - [Gaming layer](#rimworld-layer)
23 - [Media layer](#media-layer)
24* [Tools](#tools)
25 - [Layer notification](#layer-notification)
26* [Building](#building)
27 - [Using on Windows](#using-on-windows)
28* [License](#license)
29* [Special Thanks](#special-thanks)
30
31# Layouts
32
33* TapDance will teleport you to the layer you want:
34* One Tap for the Base layer
35* Two Taps for the Symbol layer
36* Three Taps for the Rimworld/Gaming layer
37
38* Where the "Meh" key is located on the Ergodox EZ default layout, I've changed it to another tap dance key:
39* One Tap for CTRL-ALT-DEL
40* Two Taps for the Media/Mouse layer
41
42## Base layer
43
44[![Base layer](images/base-layer.png)](http://www.keyboard-layout-editor.com/#/gists/8fd9bbdd3a23bbb5a8779de3624a3be1)
45
46This is a QWERTY layout with some quirks.
47
48* Enter is located on a key that won't cause as much thumb fatigue.
49* Copy and Paste work from the same key. Just hold the key to copy and tap the key to paste!
50* Undo, Find and Cut are also one-touch keys.
51* F12 is where you would normally find TAB on standard layouts. Quickly save in Word, safely.
52* You'll find bracket keys below the "6" key.
53
54* The Meh Key is a single-button CTRL+ALT+SHIFT modifier.
55
56* Space Cadet Shift: Tap L Shift for "(" and R Shift for ")" -- holding either shift works like a normal shift.
57* Tap "Z" or Tab to use either normally. Hold them for CTRL.
58* Tap Caps Lock to use it normally. Hold it for Win key combinations (Win+D to minimize all programs, etc).
59
60## Symbol layer
61
62[![Symbol layer](images/symbol-layer.png)](http://www.keyboard-layout-editor.com/#/gists/04eb6458b8b17882e472f64d482f12b4)
63
64Your standard Ergodox EZ symbol + numpad layout, minus the Version and EEPROM keys.
65
66* From the base layer, hold the F12 Key to temporarily access this layer (use for quick access to numpad)
67* Release F12 to return to the base layer.
68
69## Rimworld layer
70
71[![Rimworld / Gaming Layer](images/rimworld-layer.png)](http://www.keyboard-layout-editor.com/#/gists/d53af8391e6e443ed0a98ccfbdb4eace)
72
73This layer was made to play RimWorld, a Sci-Fi Colony Survival Game by Tynan Sylvester and Ludeon Studios, available on Steam.
74
75* Have fun!
76
77## Media layer
78
79[![Media layer](images/media-layer.png)](http://www.keyboard-layout-editor.com/#/gists/3209d09ed4bd997e4f49f28c6ada2ab3)
80
81This is the standard Ergodox EZ media layout with more options for mouseclick buttons.
82
83* In this layer, your "space" key changes into a back button for your browser.
84
85## LED states
86
87Your LEDs will change to indicate your layer. You'll know you are in the base layer if all LEDs are off.
88
89# Building
90
91To build, you will need the [QMK][qmk] firmware checked out. from there, dive into `keyboards/ergodox/keymaps/win10_writers-block/`
92
93[qmk]: https://github.com/jackhumbert/qmk_firmware
94
95```
96$ make keyboard=ergodox keymap=win10_writers-block
97```
98
99## Using on Windows
100
101This layout is tested in Windows 7 Pro and Windows 10 Home environments.
102
103# License
104
105GPL 3+
106
107# Special Thanks
108
109* To algernon for his coding help. I'm a novice but I still made this work (and figured out tap dance) with his help.
110
111* To /r/MechanicalKeyboards for being an all-around great community.
112
113* To /u/profet23 for his amazing custom Ergodox boards. \ No newline at end of file
diff --git a/keyboards/planck/rev3/Makefile b/keyboards/handwired/gamenum/Makefile
index 191c6bb66..191c6bb66 100644
--- a/keyboards/planck/rev3/Makefile
+++ b/keyboards/handwired/gamenum/Makefile
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/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/keymaps/dbroqua/keymap.c
index 4e907acd8..2b6d3901a 100644
--- a/keyboards/hhkb/keymaps/dbroqua/keymap.c
+++ b/keyboards/hhkb/keymaps/dbroqua/keymap.c
@@ -35,19 +35,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35 * |-----------------------------------------------------------------------------------------+ 35 * |-----------------------------------------------------------------------------------------+
36 * | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | | 36 * | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | |
37 * |-----------------------------------------------------------------------------------------+ 37 * |-----------------------------------------------------------------------------------------+
38 * | | Vol-| Vol+| Mute| | | | | Home| PgUp| Left |Right| | 38 * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left |Right| |
39 * |-----------------------------------------------------------------------------------------+ 39 * |-----------------------------------------------------------------------------------------+
40 * | | Prev| Play| Next| | | | | End |PgDwn| Down| | | 40 * | | Prev| Play| Next| | | + | - | End |PgDwn| Down| | |
41 * +-----------------------------------------------------------------------------------------+ 41 * +-----------------------------------------------------------------------------------------+
42 * | | | | | | 42 * | | | | Stop | |
43 * `----------------------------------------------------------------´ 43 * `----------------------------------------------------------------´
44 */ 44 */
45 [FN] = KEYMAP( 45 [FN] = KEYMAP(
46 KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ 46 KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
47 KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, \ 47 KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, \
48 KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ 48 KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \
49 KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ 49 KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
50 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS 50 KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_TRNS
51 ), 51 ),
52 52
53 /* MOUSE Layer 53 /* MOUSE Layer
diff --git a/keyboards/jd40/Makefile b/keyboards/jd40/Makefile
index 242748111..57b2ef62e 100644
--- a/keyboards/jd40/Makefile
+++ b/keyboards/jd40/Makefile
@@ -1,74 +1,3 @@
1 1ifndef MAKEFILE_INCLUDED
2
3# MCU name
4#MCU = at90usb1287
5MCU = atmega32u4
6
7# Processor frequency.
8# This will define a symbol, F_CPU, in all source code files equal to the
9# processor frequency in Hz. You can then use this symbol in your source code to
10# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
11# automatically to create a 32-bit value in your source code.
12#
13# This will be an integer division of F_USB below, as it is sourced by
14# F_USB after it has run through any CPU prescalers. Note that this value
15# does not *change* the processor frequency - it should merely be updated to
16# reflect the processor speed set externally so that the code can use accurate
17# software delays.
18F_CPU = 16000000
19
20
21#
22# LUFA specific
23#
24# Target architecture (see library "Board Types" documentation).
25ARCH = AVR8
26
27# Input clock frequency.
28# This will define a symbol, F_USB, in all source code files equal to the
29# input clock frequency (before any prescaling is performed) in Hz. This value may
30# differ from F_CPU if prescaling is used on the latter, and is required as the
31# raw input clock is fed directly to the PLL sections of the AVR for high speed
32# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
33# at the end, this will be done automatically to create a 32-bit value in your
34# source code.
35#
36# If no clock division is performed on the input clock inside the AVR (via the
37# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
38F_USB = $(F_CPU)
39
40# Interrupt driven control endpoint task(+60)
41OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
42
43
44# Boot Section Size in *bytes*
45# Teensy halfKay 512
46# Teensy++ halfKay 1024
47# Atmel DFU loader 4096
48# LUFA bootloader 4096
49# USBaspLoader 2048
50OPT_DEFS += -DBOOTLOADER_SIZE=4096
51
52
53# Build Options
54# comment out to disable the options.
55#
56BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
57MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
58EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
59# CONSOLE_ENABLE ?= yes # Console for debug(+400)
60# COMMAND_ENABLE ?= yes # Commands for debug and configuration
61KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
62# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
63# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
64NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
65# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
66# MIDI_ENABLE ?= YES # MIDI controls
67# UNICODE_ENABLE ?= YES # Unicode
68# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
69RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow
70
71ifndef QUANTUM_DIR
72 include ../../Makefile 2 include ../../Makefile
73endif 3endif
74
diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c
new file mode 100644
index 000000000..5d7c7f38a
--- /dev/null
+++ b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c
@@ -0,0 +1,73 @@
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 "kc60.h"
5
6#define _QWERTY 0
7#define _FN 1
8
9// Fillers to make layering more clear
10#define ______ KC_TRNS
11#define XXXXXXX KC_NO
12
13// Func macro definitions.
14#define S_LED FUNC(0)
15#define S_LEDI FUNC(1)
16#define S_LEDD FUNC(2)
17
18// Enable these functions using FUNC(n) macro.
19const uint16_t PROGMEM fn_actions[] = {
20 [0] = ACTION_BACKLIGHT_TOGGLE(),
21 [1] = ACTION_BACKLIGHT_INCREASE(),
22 [2] = ACTION_BACKLIGHT_DECREASE()
23 };
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26/* Qwerty
27 * ,-----------------------------------------------------------------------------------------.
28 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
29 * |-----------------------------------------------------------------------------------------+
30 * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
31 * |-----------------------------------------------------------------------------------------+
32 * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
33 * |-----------------------------------------------------------------------------------------+
34 * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
35 * |-----------------------------------------------------------------------------------------+
36 * | LGUI | LAlt | Space | RAlt | RGUI |
37 * `-----------------------------------------------------------------'
38 */
39 [0] = KEYMAP( /* Basic QWERTY */
40 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, \
41 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
42 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
43 KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_FN), KC_RSFT, \
44 ______, KC_LGUI, KC_LALT, KC_SPC, KC_GRV, KC_RALT, KC_RGUI, ______, ______ \
45 ),
46
47/* Layer 1
48 * ,-----------------------------------------------------------------------------------------.
49 * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
50 * |-----------------------------------------------------------------------------------------+
51 * | | Led | Led-| Led+| | | | | Psc | Slck| Paus| Up | | |
52 * |-----------------------------------------------------------------------------------------+
53 * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
54 * |-----------------------------------------------------------------------------------------+
55 * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
56 * |-----------------------------------------------------------------------------------------+
57 * | | | | Stop | |
58 * `-----------------------------------------------------------------'
59 */
60 [_FN] = KEYMAP( /* Layer 1 */
61 ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, \
62 ______, S_LED, S_LEDI, S_LEDD, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
63 ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, ______, \
64 ______, ______, KC_MPRV, KC_MPLY, KC_MNXT,______,______,KC_PPLS,KC_PMNS,KC_END, KC_PGDN, KC_DOWN, ______,______, \
65 ______, ______, ______, ______, KC_DEL, KC_MSTP, ______, ______, ______ \
66 )
67};
68
69const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
70{
71 // MACRODOWN only works in this function
72 return MACRO_NONE;
73};
diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb/readme.md b/keyboards/kc60/keymaps/dbroqua_hhkb/readme.md
new file mode 100644
index 000000000..be99a3bc7
--- /dev/null
+++ b/keyboards/kc60/keymaps/dbroqua_hhkb/readme.md
@@ -0,0 +1,9 @@
1# Dbroqua HHKB like Layout
2
3Like the HHKB but with a KC60 PCB :D.
4
5# Programming Instructions:
6Enter into programming mode and run the following command.
7```
8$ sudo KEYMAP=dbroqua_hhkb make dfu
9``` \ No newline at end of file
diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md
index 73fdb0f78..6e296737a 100644
--- a/keyboards/lets_split/readme.md
+++ b/keyboards/lets_split/readme.md
@@ -100,3 +100,16 @@ half to a computer by USB the keyboard will use QWERTY and Colemak when the
100right half is connected. 100right half is connected.
101 101
102 102
103Notes on Using Pro Micro 3.3V
104-----------------------------
105
106Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects
107the frequency on the 3.3V board.
108
109Also, if the slave board is producing weird characters in certain columns,
110update the following line in `matrix.c` to the following:
111
112```
113// _delay_us(30); // without this wait read unstable value.
114_delay_us(300); // without this wait read unstable value.
115```
diff --git a/keyboards/pegasushoof/Makefile b/keyboards/pegasushoof/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/pegasushoof/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif
diff --git a/keyboards/pegasushoof/README.md b/keyboards/pegasushoof/README.md
new file mode 100644
index 000000000..074222c71
--- /dev/null
+++ b/keyboards/pegasushoof/README.md
@@ -0,0 +1,24 @@
1pegasushoof keyboard firmware
2=============================
3
4## Quantum MK Firmware
5
6For the full Quantum feature list, see [the parent README.md](/README.md).
7
8## Building
9
10Download or clone the whole firmware and navigate to the `keyboard/pegasushoof` folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your `.hex` file.
11
12Depending on which keymap you would like to use, you will have to compile slightly differently.
13
14### Default
15To build all keymaps, simply run `make`, the `.hex` files will end up in the top directory.
16
17### Specific Keymap
18Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>/keymap.c` in the `keymaps` folder, and see keymap document (you can find in top README.md) and existent keymap files.
19
20To build the firmware binary hex file with a keymap just enter the keymap directory and type `make`:
21```
22$ cd keymaps/default
23$ make
24```
diff --git a/keyboards/pegasushoof/config.h b/keyboards/pegasushoof/config.h
new file mode 100644
index 000000000..0dbec26e4
--- /dev/null
+++ b/keyboards/pegasushoof/config.h
@@ -0,0 +1,46 @@
1/*
2Copyright 2016 Daniel Svensson <dsvensson@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 0x6050
26#define DEVICE_VER 0x0104
27#define MANUFACTURER Filco
28#define PRODUCT Majestouch TKL \\w The Pegasus Hoof
29#define DESCRIPTION QMK firmware for Majestouch TKL
30
31/* key matrix size */
32#define MATRIX_ROWS 8
33#define MATRIX_COLS 18
34
35/* COL2ROW or ROW2COL */
36#define DIODE_DIRECTION COL2ROW
37
38/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
39#define DEBOUNCING_DELAY 5
40
41/* key combination for magic key command */
42#define IS_COMMAND() ( \
43 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
44)
45
46#endif
diff --git a/keyboards/pegasushoof/keymaps/blowrak/Makefile b/keyboards/pegasushoof/keymaps/blowrak/Makefile
new file mode 100644
index 000000000..fec0d2d97
--- /dev/null
+++ b/keyboards/pegasushoof/keymaps/blowrak/Makefile
@@ -0,0 +1,22 @@
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 ?= yes # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
8CONSOLE_ENABLE ?= yes # Console for debug(+400)
9COMMAND_ENABLE ?= yes # Commands for debug and configuration
10CUSTOM_MATRIX ?= yes # Custom matrix file for the Pegasus Hoof due to the 2x74HC42
11NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
12BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
13MIDI_ENABLE ?= no # MIDI controls
14AUDIO_ENABLE ?= no # Audio output on port C6
15UNICODE_ENABLE ?= no # Unicode
16BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
17RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
18
19
20ifndef QUANTUM_DIR
21 include ../../../../Makefile
22endif
diff --git a/keyboards/pegasushoof/keymaps/blowrak/keymap.c b/keyboards/pegasushoof/keymaps/blowrak/keymap.c
new file mode 100644
index 000000000..6faf4db6f
--- /dev/null
+++ b/keyboards/pegasushoof/keymaps/blowrak/keymap.c
@@ -0,0 +1,112 @@
1/*
2Copyright 2016 Daniel Svensson <dsvensson@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#include "pegasushoof.h"
19
20#define _______ KC_TRNS
21
22/* Swedish keys */
23#define SE_HALF KC_GRV
24#define SE_PLUS KC_MINS
25#define SE_ACUT KC_EQL
26#define SE_AO KC_LBRC
27#define SE_CIRC KC_RBRC
28#define SE_QUOT KC_BSLS
29#define SE_OE KC_SCLN
30#define SE_AE KC_QUOT
31#define SE_MINS KC_SLSH
32#define SE_LTGT KC_NUBS
33#define SE_LCBR RALT(KC_7)
34#define SE_LBRC RALT(KC_8)
35#define SE_RBRC RALT(KC_9)
36#define SE_RCBR RALT(KC_0)
37#define SE_PIPE RALT(SE_LTGT)
38#define SE_BSLS RALT(SE_PLUS)
39
40#define KM_BLOWRAK 0
41#define KM_QWERTY 1
42#define KM_MEDIA 2
43#define KM_HAXHAX 3
44
45const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
46 /* Layer 0: Blowrak ISO layer, a Swedish take on Dvorak */
47 [KM_BLOWRAK] = KEYMAP( \
48 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
49 SE_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,SE_ACUT,KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \
50 KC_TAB, SE_AO, SE_AE, SE_OE, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM,SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \
51 KC_LCTRL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_H, KC_D, KC_T, KC_N, KC_S, SE_MINS, KC_ENT, \
52 KC_LSFT, SE_LTGT,KC_DOT, KC_Q, KC_J, KC_K, KC_B, KC_X, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \
53 KC_FN0, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT),
54 /* Layer 1: Standard ISO layer */
55 [KM_QWERTY] = KEYMAP( \
56 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
57 SE_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,SE_ACUT,KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \
58 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AO, SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \
59 KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OE, SE_AE, KC_ENT, \
60 KC_LSFT, SE_LTGT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, SE_MINS, KC_RSFT, KC_UP, \
61 KC_FN0, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT),
62 /* Layer 2: Media layer */
63 [KM_MEDIA] = KEYMAP( \
64 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \
65 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_VOLU, \
66 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_MUTE,_______,KC_VOLD, \
67 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
68 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_MPLY, \
69 _______,_______,_______, _______, _______,_______,RESET ,_______, KC_MPRV,KC_MSTP,KC_MNXT),
70 /* Layer 3: Programming layer */
71 [KM_HAXHAX] = KEYMAP( \
72 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \
73 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \
74 _______,SE_LCBR,SE_PIPE,SE_RCBR,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \
75 _______,SE_LBRC,SE_BSLS,SE_RBRC,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
76 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \
77 _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______),
78};
79
80const uint16_t PROGMEM fn_actions[] = {
81 [0] = ACTION_LAYER_MOMENTARY(KM_MEDIA),
82 [1] = ACTION_LAYER_TOGGLE(KM_QWERTY)
83};
84
85void matrix_scan_user(void)
86{
87 uint8_t layer = biton32(layer_state);
88 switch (layer) {
89 case KM_BLOWRAK:
90 ph_caps_led_on();
91 ph_sclk_led_off();
92 break;
93 case KM_QWERTY:
94 ph_sclk_led_on();
95 ph_caps_led_off();
96 break;
97 }
98}
99
100/* Mixes in KM_HAXHAX via RALT modifier without shadowing the RALT key combinations. */
101bool process_record_user(uint16_t keycode, keyrecord_t *record) {
102 uint8_t modifiers = get_mods();
103 if (modifiers & MOD_BIT(KC_RALT) && record->event.pressed) {
104 uint16_t kc = keymap_key_to_keycode(KM_HAXHAX, record->event.key);
105 if (kc != KC_TRNS) {
106 register_code(kc);
107 unregister_code(kc);
108 return false;
109 }
110 }
111 return true;
112}
diff --git a/keyboards/pegasushoof/keymaps/default/Makefile b/keyboards/pegasushoof/keymaps/default/Makefile
new file mode 100644
index 000000000..fec0d2d97
--- /dev/null
+++ b/keyboards/pegasushoof/keymaps/default/Makefile
@@ -0,0 +1,22 @@
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 ?= yes # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
8CONSOLE_ENABLE ?= yes # Console for debug(+400)
9COMMAND_ENABLE ?= yes # Commands for debug and configuration
10CUSTOM_MATRIX ?= yes # Custom matrix file for the Pegasus Hoof due to the 2x74HC42
11NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
12BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
13MIDI_ENABLE ?= no # MIDI controls
14AUDIO_ENABLE ?= no # Audio output on port C6
15UNICODE_ENABLE ?= no # Unicode
16BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
17RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
18
19
20ifndef QUANTUM_DIR
21 include ../../../../Makefile
22endif
diff --git a/keyboards/pegasushoof/keymaps/default/keymap.c b/keyboards/pegasushoof/keymaps/default/keymap.c
new file mode 100644
index 000000000..aa006b23a
--- /dev/null
+++ b/keyboards/pegasushoof/keymaps/default/keymap.c
@@ -0,0 +1,60 @@
1/*
2Copyright 2016 Daniel Svensson <dsvensson@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#include "pegasushoof.h"
19
20#define _______ KC_TRNS
21
22#define KM_QWERTY 0
23#define KM_MEDIA 1
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26 /* Layer 0: Standard ISO layer */
27 [KM_QWERTY] = KEYMAP( \
28 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
29 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \
30 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
31 KC_CLCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
32 KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
33 KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN0, KC_LEFT,KC_DOWN,KC_RGHT),
34 /* Layer 1: Function layer */
35 [KM_MEDIA] = KEYMAP( \
36 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \
37 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_VOLU, \
38 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,KC_VOLD, \
39 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
40 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_MPLY, \
41 _______,_______,_______, _______, _______,_______,RESET ,_______, KC_MPRV,KC_MSTP,KC_MNXT)
42};
43
44const uint16_t PROGMEM fn_actions[] = {
45 [0] = ACTION_LAYER_MOMENTARY(KM_MEDIA)
46};
47
48void led_set_user(uint8_t usb_led) {
49 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
50 ph_caps_led_on();
51 } else {
52 ph_caps_led_off();
53 }
54
55 if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
56 ph_sclk_led_on();
57 } else {
58 ph_sclk_led_off();
59 }
60}
diff --git a/keyboards/pegasushoof/matrix.c b/keyboards/pegasushoof/matrix.c
new file mode 100644
index 000000000..d2a74b8d7
--- /dev/null
+++ b/keyboards/pegasushoof/matrix.c
@@ -0,0 +1,204 @@
1/*
2Copyright 2014 Ralf Schmitt <ralf@bunkertor.net>
3Copyright 2016 Daniel Svensson <dsvensson@gmail.com>
4
5This program is free software: you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation, either version 2 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#include <stdint.h>
20#include <stdbool.h>
21#include <avr/io.h>
22#include <util/delay.h>
23#include "wait.h"
24#include "print.h"
25#include "debug.h"
26#include "util.h"
27#include "matrix.h"
28
29static uint8_t debouncing = DEBOUNCING_DELAY;
30static matrix_row_t matrix[MATRIX_ROWS];
31static matrix_row_t matrix_debouncing[MATRIX_ROWS];
32
33static matrix_row_t read_cols(void);
34static void select_row(uint8_t col);
35
36inline uint8_t matrix_rows(void)
37{
38 return MATRIX_ROWS;
39}
40
41inline uint8_t matrix_cols(void)
42{
43 return MATRIX_COLS;
44}
45
46void matrix_init(void)
47{
48 /* Column output pins */
49 DDRD |= 0b01111011;
50 /* Row input pins */
51 DDRC &= ~0b10000000;
52 DDRB &= ~0b01111111;
53 PORTC |= 0b10000000;
54 PORTB |= 0b01111111;
55
56 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
57 matrix[i] = 0;
58 matrix_debouncing[i] = 0;
59 }
60
61 matrix_init_quantum();
62}
63
64uint8_t matrix_scan(void)
65{
66 for (uint8_t col = 0; col < MATRIX_COLS; col++) {
67 select_row(col);
68 wait_us(30);
69 matrix_row_t rows = read_cols();
70 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
71 bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
72 bool curr_bit = rows & (1<<row);
73 if (prev_bit != curr_bit) {
74 matrix_debouncing[row] ^= (matrix_row_t) 1 << col;
75 debouncing = DEBOUNCING_DELAY;
76 }
77 }
78 }
79
80 if (debouncing) {
81 if (--debouncing) {
82 wait_ms(1);
83 } else {
84 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
85 matrix[i] = matrix_debouncing[i];
86 }
87 }
88 }
89
90 matrix_scan_quantum();
91
92 return 1;
93}
94
95bool matrix_is_modified(void)
96{
97 if (debouncing)
98 return false;
99 return true;
100}
101
102inline
103bool matrix_is_on(uint8_t row, uint8_t col)
104{
105 return matrix[row] & 1 << col;
106}
107
108inline
109matrix_row_t matrix_get_row(uint8_t row)
110{
111 return matrix[row];
112}
113
114void matrix_print(void)
115{
116 print("\nr/c 0123456789ABCDEF\n");
117 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
118 phex(row); print(": ");
119 pbin_reverse16(matrix_get_row(row));
120 print("\n");
121 }
122}
123
124uint8_t matrix_key_count(void)
125{
126 uint8_t count = 0;
127 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
128 count += bitpop16(matrix[i]);
129 }
130 return count;
131}
132
133static matrix_row_t read_cols(void)
134{
135 return
136 (PINB & (1 << 5) ? 0 : 1 << 0) |
137 (PINC & (1 << 7) ? 0 : 1 << 1) |
138 (PINB & (1 << 4) ? 0 : 1 << 2) |
139 (PINB & (1 << 6) ? 0 : 1 << 3) |
140 (PINB & (1 << 1) ? 0 : 1 << 4) |
141 (PINB & (1 << 0) ? 0 : 1 << 5) |
142 (PINB & (1 << 3) ? 0 : 1 << 6) |
143 (PINB & (1 << 2) ? 0 : 1 << 7);
144}
145
146static void select_row(uint8_t col)
147{
148 switch (col) {
149 case 0:
150 PORTD = (PORTD & ~0b01111011) | 0b00110011;
151 break;
152 case 1:
153 PORTD = (PORTD & ~0b01111011) | 0b01110000;
154 break;
155 case 2:
156 PORTD = (PORTD & ~0b01111011) | 0b00010011;
157 break;
158 case 3:
159 PORTD = (PORTD & ~0b01111011) | 0b01101000;
160 break;
161 case 4:
162 PORTD = (PORTD & ~0b01111011) | 0b00001011;
163 break;
164 case 5:
165 PORTD = (PORTD & ~0b01111011) | 0b00111011;
166 break;
167 case 6:
168 PORTD = (PORTD & ~0b01111011) | 0b01111000;
169 break;
170 case 7:
171 PORTD = (PORTD & ~0b01111011) | 0b01100001;
172 break;
173 case 8:
174 PORTD = (PORTD & ~0b01111011) | 0b01101001;
175 break;
176 case 9:
177 PORTD = (PORTD & ~0b01111011) | 0b01110001;
178 break;
179 case 10:
180 PORTD = (PORTD & ~0b01111011) | 0b01101010;
181 break;
182 case 11:
183 PORTD = (PORTD & ~0b01111011) | 0b01100010;
184 break;
185 case 12:
186 PORTD = (PORTD & ~0b01111011) | 0b01111001;
187 break;
188 case 13:
189 PORTD = (PORTD & ~0b01111011) | 0b01100000;
190 break;
191 case 14:
192 PORTD = (PORTD & ~0b01111011) | 0b01000011;
193 break;
194 case 15:
195 PORTD = (PORTD & ~0b01111011) | 0b00011011;
196 break;
197 case 16:
198 PORTD = (PORTD & ~0b01111011) | 0b00100011;
199 break;
200 case 17:
201 PORTD = (PORTD & ~0b01111011) | 0b00101011;
202 break;
203 }
204}
diff --git a/keyboards/pegasushoof/pegasushoof.c b/keyboards/pegasushoof/pegasushoof.c
new file mode 100644
index 000000000..6bb249aef
--- /dev/null
+++ b/keyboards/pegasushoof/pegasushoof.c
@@ -0,0 +1,51 @@
1/*
2Copyright 2016 Daniel Svensson <dsvensson@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#include "pegasushoof.h"
19
20__attribute__ ((weak))
21void matrix_init_user(void) {
22};
23
24__attribute__ ((weak))
25void matrix_scan_user(void) {
26}
27
28__attribute__ ((weak))
29bool process_action_user(keyrecord_t *record) {
30 return true;
31}
32
33__attribute__ ((weak))
34void led_set_user(uint8_t usb_led) {
35}
36
37void matrix_init_kb(void) {
38 matrix_init_user();
39}
40
41void matrix_scan_kb(void) {
42 matrix_scan_user();
43}
44
45bool process_action_kb(keyrecord_t *record) {
46 return process_action_user(record);
47}
48
49void led_set_kb(uint8_t usb_led) {
50 led_set_user(usb_led);
51}
diff --git a/keyboards/pegasushoof/pegasushoof.h b/keyboards/pegasushoof/pegasushoof.h
new file mode 100644
index 000000000..d031e3ed2
--- /dev/null
+++ b/keyboards/pegasushoof/pegasushoof.h
@@ -0,0 +1,51 @@
1/*
2Copyright 2016 Daniel Svensson <dsvensson@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 PEGASUSHOOF_H
19#define PEGASUSHOOF_H
20
21#include "matrix.h"
22#include "quantum.h"
23
24#define ___ KC_NO
25
26#define KEYMAP( \
27 KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \
28 KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \
29 KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \
30 KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \
31 KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \
32 KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \
33 ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \
34 /* 0 */ { ___ , ___ , KC0 , ___ , ___ , KF0 , ___ , ___ , ___ , KJ0 , KK0 , ___ , KM0 , KN0 , KO0 , ___ , KQ0 , KR0 }, \
35 /* 1 */ { ___ , ___ , ___ , ___ , ___ , ___ , KG1 , KH1 , KI1 , KJ1 , KK1 , KL1 , KM1 , ___ , KO1 , KP1 , ___ , ___ }, \
36 /* 2 */ { ___ , KB2 , ___ , KD2 , ___ , KF2 , KG2 , KH2 , KI2 , KJ2 , KK2 , KL2 , KM2 , ___ , KO2 , ___ , ___ , ___ }, \
37 /* 3 */ { KA3 , KB3 , ___ , ___ , ___ , KF3 , KG3 , KH3 , KI3 , KJ3 , KK3 , KL3 , KM3 , ___ , KO3 , ___ , ___ , ___ }, \
38 /* 4 */ { ___ , ___ , KC4 , ___ , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , KM4 , ___ , KO4 , KP4 , KQ4 , KR4 }, \
39 /* 5 */ { ___ , ___ , KC5 , ___ , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , KK5 , KL5 , KM5 , KN5 , KO5 , KP5 , ___ , ___ }, \
40 /* 6 */ { ___ , ___ , KC6 , ___ , ___ , KF6 , KG6 , KH6 , KI6 , KJ6 , KK6 , KL6 , ___ , KN6 , KO6 , ___ , KQ6 , ___ }, \
41 /* 7 */ { ___ , ___ , ___ , ___ , ___ , KF7 , KG7 , KH7 , KI7 , KJ7 , KK7 , KL7 , KM7 , KN7 , ___ , KP7 , ___ , ___ }, \
42 }
43
44inline void ph_caps_led_on(void) { DDRC |= (1<<6); PORTC &= ~(1<<6); }
45inline void ph_caps_led_off(void) { DDRC &= ~(1<<6); PORTC &= ~(1<<6); }
46
47inline void ph_sclk_led_on(void) { DDRC |= (1<<5); PORTC &= ~(1<<5); }
48inline void ph_sclk_led_off(void) { DDRC &= ~(1<<5); PORTC &= ~(1<<5); }
49
50
51#endif
diff --git a/keyboards/pegasushoof/rules.mk b/keyboards/pegasushoof/rules.mk
new file mode 100644
index 000000000..b3eeebfdb
--- /dev/null
+++ b/keyboards/pegasushoof/rules.mk
@@ -0,0 +1,67 @@
1# MCU name
2MCU = atmega32u2
3
4# Processor frequency.
5# This will define a symbol, F_CPU, in all source code files equal to the
6# processor frequency in Hz. You can then use this symbol in your source code to
7# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
8# automatically to create a 32-bit value in your source code.
9#
10# This will be an integer division of F_USB below, as it is sourced by
11# F_USB after it has run through any CPU prescalers. Note that this value
12# does not *change* the processor frequency - it should merely be updated to
13# reflect the processor speed set externally so that the code can use accurate
14# software delays.
15F_CPU = 16000000
16
17#
18# LUFA specific
19#
20# Target architecture (see library "Board Types" documentation).
21ARCH = AVR8
22
23# Input clock frequency.
24# This will define a symbol, F_USB, in all source code files equal to the
25# input clock frequency (before any prescaling is performed) in Hz. This value may
26# differ from F_CPU if prescaling is used on the latter, and is required as the
27# raw input clock is fed directly to the PLL sections of the AVR for high speed
28# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
29# at the end, this will be done automatically to create a 32-bit value in your
30# source code.
31#
32# If no clock division is performed on the input clock inside the AVR (via the
33# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
34F_USB = $(F_CPU)
35
36# Interrupt driven control endpoint task(+60)
37OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
38
39
40# Boot Section Size in *bytes*
41# Teensy halfKay 512
42# Teensy++ halfKay 1024
43# Atmel DFU loader 4096
44# LUFA bootloader 4096
45# USBaspLoader 2048
46OPT_DEFS += -DBOOTLOADER_SIZE=4096
47
48
49# Build Options
50# change yes to no to disable
51#
52BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
53MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
54EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
55CONSOLE_ENABLE ?= yes # Console for debug(+400)
56COMMAND_ENABLE ?= yes # Commands for debug and configuration
57NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
58BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
59MIDI_ENABLE ?= no # MIDI controls
60AUDIO_ENABLE ?= no # Audio output on port C6
61UNICODE_ENABLE ?= no # Unicode
62BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
63RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
64
65
66CUSTOM_MATRIX ?= yes
67SRC = matrix.c
diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c
index 411523125..4d0151710 100644
--- a/keyboards/planck/keymaps/callum/keymap.c
+++ b/keyboards/planck/keymaps/callum/keymap.c
@@ -53,9 +53,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
53 * ,-----------------------------------------------------------------------------------. 53 * ,-----------------------------------------------------------------------------------.
54 * | 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 |
55 * |------+------+------+------+------+------+------+------+------+------+------+------| 55 * |------+------+------+------+------+------+------+------+------+------+------+------|
56 * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | 56 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del |
57 * |------+------+------+------+------+------+------+------+------+------+------+------| 57 * |------+------+------+------+------+------+------+------+------+------+------+------|
58 * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | | 58 * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | |
59 * |------+------+------+------+------+------+------+------+------+------+------+------| 59 * |------+------+------+------+------+------+------+------+------+------+------+------|
60 * | | | | | | Below| | | | | | | 60 * | | | | | | Below| | | | | | |
61 * `-----------------------------------------------------------------------------------' 61 * `-----------------------------------------------------------------------------------'
@@ -109,15 +109,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
109 * |------+------+------+------+------+------+------+------+------+------+------+------| 109 * |------+------+------+------+------+------+------+------+------+------+------+------|
110 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | 110 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- |
111 * |------+------+------+------+------+------+------+------+------+------+------+------| 111 * |------+------+------+------+------+------+------+------+------+------+------+------|
112 * | | F21 | F22 | F23 | F24 | | | | | | | | 112 * | | F21 | F22 | F23 | F24 | | | Power| | | | |
113 * |------+------+------+------+------+------+------+------+------+------+------+------| 113 * |------+------+------+------+------+------+------+------+------+------+------+------|
114 * | | | | | Prev | Mute | Play | Next | | | | | 114 * | | | | | Prev | Mute | Play | Next | | | | |
115 * `-----------------------------------------------------------------------------------' 115 * `-----------------------------------------------------------------------------------'
116 */ 116 */
117[_FUNC] = { 117[_FUNC] = {
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))}, 118 {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU},
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))}, 119 {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_VOLD},
120 {_______, 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, KC_POWER, XXXXXXX, XXXXXXX, XXXXXXX, _______},
121 {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______} 121 {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______}
122} 122}
123 123
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/priyadi/Makefile b/keyboards/planck/keymaps/priyadi/Makefile
new file mode 100644
index 000000000..aa211d2f0
--- /dev/null
+++ b/keyboards/planck/keymaps/priyadi/Makefile
@@ -0,0 +1,26 @@
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 = no # Virtual DIP switch configuration(+1000)
8MOUSEKEY_ENABLE = no # Mouse keys(+4700)
9EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
10CONSOLE_ENABLE = no # 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 = yes # Audio output on port C6
16UNICODE_ENABLE = no # Unicode
17UNICODEMAP_ENABLE = yes # Unicode map
18BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
19RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
20
21# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
22SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
23
24ifndef QUANTUM_DIR
25 include ../../../../Makefile
26endif
diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c
new file mode 100644
index 000000000..6e7f4e735
--- /dev/null
+++ b/keyboards/planck/keymaps/priyadi/keymap.c
@@ -0,0 +1,447 @@
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#include "action_layer.h"
6#ifdef AUDIO_ENABLE
7 #include "audio.h"
8 #include "musical_notes.h"
9#endif
10#include "eeconfig.h"
11#include "process_unicode.h"
12#include "quantum.h"
13
14extern keymap_config_t keymap_config;
15
16enum layers {
17 _QWERTY,
18 _COLEMAK,
19 _WORKMAN,
20 _PUNC,
21 _NUM,
22 _FUNC,
23 _EMOJI,
24 _GUI,
25};
26
27enum planck_keycodes {
28 // layouts
29 QWERTY = SAFE_RANGE,
30 COLEMAK,
31 WORKMAN,
32
33 // layer switchers
34 PUNC,
35 NUM,
36 FUNC,
37 EMOJI,
38 GUI,
39
40 // os switchers
41 LINUX,
42 WIN,
43 OSX,
44};
45
46// Fillers to make layering clearer
47
48#define _______ KC_TRNS
49#define XXXXXXX KC_NO
50
51// unicode map
52
53enum unicode_name {
54 GRIN, // grinning face 😊
55 TJOY, // tears of joy 😂
56 SMILE, // grining face with smiling eyes 😁
57 HEART, // heart ❤
58 EYERT, // smiling face with heart shaped eyes 😍
59 CRY, // crying face 😭
60 SMEYE, // smiling face with smiling eyes 😊
61 UNAMU, // unamused 😒
62 KISS, // kiss 😘
63 HART2, // two hearts 💕
64 WEARY, // weary 😩
65 OKHND, // ok hand sign 👌
66 PENSV, // pensive 😔
67 SMIRK, // smirk 😏
68 RECYC, // recycle ♻
69 WINK, // wink 😉
70 THMUP, // thumb up 👍
71 THMDN, // thumb down 👎
72 PRAY, // pray 🙏
73 PHEW, // relieved 😌
74 MUSIC, // musical notes
75 FLUSH, // flushed 😳
76 CELEB, // celebration 🙌
77 CRY2, // crying face 😢
78 COOL, // smile with sunglasses 😎
79 NOEVS, // see no evil
80 NOEVH, // hear no evil
81 NOEVK, // speak no evil
82 POO, // pile of poo
83 EYES, // eyes
84 VIC, // victory hand
85 BHART, // broken heart
86 SLEEP, // sleeping face
87 SMIL2, // smiling face with open mouth & sweat
88 HUNRD, // 100
89 CONFU, // confused
90 TONGU, // face with tongue & winking eye
91 DISAP, // disappointed
92 YUMMY, // face savoring delicious food
93 CLAP, // hand clapping
94 FEAR, // face screaming in fear
95 HORNS, // smiling face with horns
96 HALO, // smiling face with halo
97 BYE, // waving hand
98 SUN, // sun
99 MOON, // moon
100 SKULL, // skull
101};
102
103const uint32_t PROGMEM unicode_map[] = {
104 [GRIN] = 0x1F600,
105 [TJOY] = 0x1F602,
106 [SMILE] = 0x1F601,
107 [HEART] = 0x2764,
108 [EYERT] = 0x1f60d,
109 [CRY] = 0x1f62d,
110 [SMEYE] = 0x1F60A,
111 [UNAMU] = 0x1F612,
112 [KISS] = 0x1F618,
113 [HART2] = 0x1F495,
114 [WEARY] = 0x1F629,
115 [OKHND] = 0x1F44C,
116 [PENSV] = 0x1F614,
117 [SMIRK] = 0x1F60F,
118 [RECYC] = 0x267B,
119 [WINK] = 0x1F609,
120 [THMUP] = 0x1F44D,
121 [THMDN] = 0x1F44E,
122 [PRAY] = 0x1F64F,
123 [PHEW] = 0x1F60C,
124 [MUSIC] = 0x1F3B6,
125 [FLUSH] = 0x1F633,
126 [CELEB] = 0x1F64C,
127 [CRY2] = 0x1F622,
128 [COOL] = 0x1F60E,
129 [NOEVS] = 0x1F648,
130 [NOEVH] = 0x1F649,
131 [NOEVK] = 0x1F64A,
132 [POO] = 0x1F4A9,
133 [EYES] = 0x1F440,
134 [VIC] = 0x270C,
135 [BHART] = 0x1F494,
136 [SLEEP] = 0x1F634,
137 [SMIL2] = 0x1F605,
138 [HUNRD] = 0x1F4AF,
139 [CONFU] = 0x1F615,
140 [TONGU] = 0x1F61C,
141 [DISAP] = 0x1F61E,
142 [YUMMY] = 0x1F60B,
143 [CLAP] = 0x1F44F,
144 [FEAR] = 0x1F631,
145 [HORNS] = 0x1F608,
146 [HALO] = 0x1F607,
147 [BYE] = 0x1F44B,
148 [SUN] = 0x2600,
149 [MOON] = 0x1F314,
150 [SKULL] = 0x1F480,
151};
152
153
154// hybrid shift - =
155// #undef KC_LSFT
156// #define KC_LSFT MT(MOD_LSFT, KC_MINS)
157// #undef KC_RSFT
158// #define KC_RSFT MT(MOD_LSFT, KC_EQL)
159
160
161// hybrid right-gui & scroll lock (mapped to Compose in OS)
162#undef KC_RCTL
163#define KC_RCTL MT(MOD_LCTL, KC_SLCK)
164
165// keymaps
166
167const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
168
169/* Qwerty
170 * ,-----------------------------------------------------------------------------------.
171 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
172 * |------+------+------+------+------+-------------+------+------+------+------+------|
173 * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter |
174 * |------+------+------+------+------+------|------+------+------+------+------+------|
175 * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift |
176 * |------+------+------+------+------+------+------+------+------+------+------+------|
177 * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl |
178 * `-----------------------------------------------------------------------------------'
179 */
180[_QWERTY] = {
181 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
182 {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT },
183 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
184 {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL}
185},
186
187/* Colemak
188 * ,-----------------------------------------------------------------------------------.
189 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
190 * |------+------+------+------+------+-------------+------+------+------+------+------|
191 * | Esc | A | R | S | T | D | H | N | E | I | O |Enter |
192 * |------+------+------+------+------+------|------+------+------+------+------+------|
193 * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift |
194 * |------+------+------+------+------+------+------+------+------+------+------+------|
195 * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl |
196 * `-----------------------------------------------------------------------------------'
197 */
198[_COLEMAK] = {
199 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
200 {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT },
201 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
202 {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL}
203},
204
205/* Workman
206 * ,-----------------------------------------------------------------------------------.
207 * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp |
208 * |------+------+------+------+------+-------------+------+------+------+------+------|
209 * | Esc | A | S | H | T | G | Y | N | E | O | I |Enter |
210 * |------+------+------+------+------+------|------+------+------+------+------+------|
211 * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift |
212 * |------+------+------+------+------+------+------+------+------+------+------+------|
213 * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl |
214 * `-----------------------------------------------------------------------------------'
215 */
216[_WORKMAN] = {
217 {KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC},
218 {KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_ENT },
219 {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
220 {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL}
221},
222
223/* Punc
224 * ,-----------------------------------------------------------------------------------.
225 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` |
226 * |------+------+------+------+------+-------------+------+------+------+------+------|
227 * | | | \ | - | = | < | > | ( | ) | ' | | |
228 * |------+------+------+------+------+------|------+------+------+------+------+------|
229 * | | | | | _ | + | { | } | [ | ] | " | | |
230 * |------+------+------+------+------+------+------+------+------+------+------+------|
231 * | | | | | | | | | | | |
232 * `-----------------------------------------------------------------------------------'
233 */
234[_PUNC] = {
235 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV },
236 {XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_QUOT, XXXXXXX, XXXXXXX},
237 {XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_DQUO, XXXXXXX, XXXXXXX},
238 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
239},
240
241/* Num
242 * ,-----------------------------------------------------------------------------------.
243 * | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
244 * |------+------+------+------+------+-------------+------+------+------+------+------|
245 * | Esc | @ | A | B | C | ( | ) | 4 | 5 | 6 | : |Enter |
246 * |------+------+------+------+------+------|------+------+------+------+------+------|
247 * | & | # | D | E | F | [ | ] | 1 | 2 | 3 | / | * |
248 * |------+------+------+------+------+------+------+------+------+------+------+------|
249 * | | | | x | | | 0 | , | . | + | - |
250 * `-----------------------------------------------------------------------------------'
251 */
252[_NUM] = {
253 {KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
254 { KC_ESC, KC_AT, S(KC_A), S(KC_B), S(KC_C), KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_COLN, KC_ENT},
255 {KC_AMPR, KC_HASH, S(KC_D), S(KC_E), S(KC_F), KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_SLSH, KC_ASTR},
256 {_______, _______, _______, KC_X, _______, KC_SPC, KC_SPC, KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_MINS}
257},
258
259/* Func
260 * ,-----------------------------------------------------------------------------------.
261 * | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Del |
262 * |------+------+------+------+------+-------------+------+------+------+------+------|
263 * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | Ins |
264 * |------+------+------+------+------+------|------+------+------+------+------+------|
265 * | | F9 | F10 | F11 | F12 | | | | Home | End | | |
266 * |------+------+------+------+------+------+------+------+------+------+------+------|
267 * | | | | | | | | | | | |
268 * `-----------------------------------------------------------------------------------'
269 */
270[_FUNC] = {
271 {XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL},
272 {XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS},
273 {_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______},
274 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
275},
276
277/* Emoji
278 * ,-----------------------------------------------------------------------------------.
279 * | | | | | | | | | | | | |
280 * |------+------+------+------+------+-------------+------+------+------+------+------|
281 * | | | | | | | | | | | | |
282 * |------+------+------+------+------+------+------+------+------+------+------+------|
283 * | | | | | | | | | | | | |
284 * |------+------+------+------+------+------+------+------+------+------+------+------|
285 * | | | | | | | | | | | | |
286 * `-----------------------------------------------------------------------------------'
287 */
288[_EMOJI] = {
289 {X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW)},
290 {X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS)},
291 {X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH)},
292 { X(POO), X(EYES),X(HUNRD), _______,X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK)}
293},
294
295/* GUI
296 * ,-----------------------------------------------------------------------------------.
297 * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | |
298 * |------+------+------+------+------+-------------+------+------+------+------+------|
299 * |Linux | | Vol- | Mute | Vol+ | | | D- | | D+ | |Qwerty|
300 * |------+------+------+------+------+------+------+------+------+------+------+------|
301 * | Win | | Prev | Play | Next | | | | | | |Colmak|
302 * |------+------+------+------+------+------+------+------+------+------+------+------|
303 * | OSX | | | | | BL- | BL+ | | | | |Workmn|
304 * `-----------------------------------------------------------------------------------'
305 */
306[_GUI] = {
307 {_______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______},
308 { LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,_______, QWERTY},
309 { WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, COLEMAK},
310 { OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, _______, _______, WORKMAN}
311},
312
313};
314
315#ifdef AUDIO_ENABLE
316float tone_startup[][2] = SONG(STARTUP_SOUND);
317float tone_qwerty[][2] = SONG(QWERTY_SOUND);
318float tone_colemak[][2] = SONG(COLEMAK_SOUND);
319float tone_workman[][2] = SONG(DVORAK_SOUND);
320float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
321float tone_linux[][2] = SONG(CAPS_LOCK_ON_SOUND);
322float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND);
323float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND);
324float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2));
325#endif
326
327void persistant_default_layer_set(uint16_t default_layer) {
328 eeconfig_update_default_layer(default_layer);
329 default_layer_set(default_layer);
330}
331
332bool process_record_user(uint16_t keycode, keyrecord_t *record) {
333 // faux clicky
334 if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0);
335
336 switch (keycode) {
337 case QWERTY:
338 if (record->event.pressed) {
339 #ifdef AUDIO_ENABLE
340 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
341 #endif
342 persistant_default_layer_set(1UL<<_QWERTY);
343 }
344 return false;
345 break;
346 case COLEMAK:
347 if (record->event.pressed) {
348 #ifdef AUDIO_ENABLE
349 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
350 #endif
351 persistant_default_layer_set(1UL<<_COLEMAK);
352 }
353 return false;
354 break;
355 case WORKMAN:
356 if (record->event.pressed) {
357 #ifdef AUDIO_ENABLE
358 PLAY_NOTE_ARRAY(tone_workman, false, 0);
359 #endif
360 persistant_default_layer_set(1UL<<_WORKMAN);
361 }
362 return false;
363 break;
364 case PUNC:
365 if (record->event.pressed) {
366 layer_on(_PUNC);
367 update_tri_layer(_PUNC, _EMOJI, _GUI);
368 } else {
369 layer_off(_PUNC);
370 update_tri_layer(_PUNC, _EMOJI, _GUI);
371 }
372 return false;
373 break;
374 case EMOJI:
375 if (record->event.pressed) {
376 layer_on(_EMOJI);
377 update_tri_layer(_PUNC, _EMOJI, _GUI);
378 } else {
379 layer_off(_EMOJI);
380 update_tri_layer(_PUNC, _EMOJI, _GUI);
381 }
382 return false;
383 break;
384 case NUM:
385 if (record->event.pressed) {
386 layer_on(_NUM);
387 } else {
388 layer_off(_NUM);
389 }
390 return false;
391 break;
392 case FUNC:
393 if (record->event.pressed) {
394 layer_on(_FUNC);
395 } else {
396 layer_off(_FUNC);
397 }
398 return false;
399 break;
400 case LINUX:
401 set_unicode_input_mode(UC_LNX);
402 #ifdef AUDIO_ENABLE
403 PLAY_NOTE_ARRAY(tone_linux, false, 0);
404 #endif
405 return false;
406 break;
407 case WIN:
408 set_unicode_input_mode(UC_WINC);
409 #ifdef AUDIO_ENABLE
410 PLAY_NOTE_ARRAY(tone_windows, false, 0);
411 #endif
412 return false;
413 break;
414 case OSX:
415 set_unicode_input_mode(UC_OSX);
416 #ifdef AUDIO_ENABLE
417 PLAY_NOTE_ARRAY(tone_osx, false, 0);
418 #endif
419 return false;
420 break;
421 }
422 return true;
423}
424
425void matrix_init_user(void) {
426 #ifdef AUDIO_ENABLE
427 startup_user();
428 #endif
429 set_unicode_input_mode(UC_LNX);
430}
431
432#ifdef AUDIO_ENABLE
433
434void startup_user()
435{
436 _delay_ms(20); // gets rid of tick
437 PLAY_NOTE_ARRAY(tone_startup, false, 0);
438}
439
440void shutdown_user()
441{
442 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
443 _delay_ms(150);
444 stop_all_notes();
445}
446
447#endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/priyadi/readme.md b/keyboards/planck/keymaps/priyadi/readme.md
new file mode 100644
index 000000000..99bdd9d9b
--- /dev/null
+++ b/keyboards/planck/keymaps/priyadi/readme.md
@@ -0,0 +1,11 @@
1# Priyadi's Planck Layout
2
3Features:
4
5- Supports QWERTY, Colemak and Workman layouts.
6- Cursor and nav cluster on home row.
7- Hybrid number row and numpad, located on home row.
8- Number layer supports hexadecimal input.
9- Left and right side modifiers.
10- Emoji layer. An entire layer filled with common emojis.
11- Faux-clickey (poor man's replacement for Cherry blue switches) \ No newline at end of file
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/keyboards/preonic/keymaps/jacwib/config.h b/keyboards/preonic/keymaps/jacwib/config.h
index 23e9e0ed2..b98883120 100644
--- a/keyboards/preonic/keymaps/jacwib/config.h
+++ b/keyboards/preonic/keymaps/jacwib/config.h
@@ -4,5 +4,6 @@
4#include "../../config.h" 4#include "../../config.h"
5 5
6#define FORCE_NKRO 1 6#define FORCE_NKRO 1
7#define PREVENT_STUCK_MODIFIERS
7 8
8#endif 9#endif
diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c
index cf441bf30..72ccc86cd 100644
--- a/keyboards/preonic/keymaps/jacwib/keymap.c
+++ b/keyboards/preonic/keymaps/jacwib/keymap.c
@@ -13,13 +13,18 @@
13#define _QWERTY 0 13#define _QWERTY 0
14#define _LOWER 3 14#define _LOWER 3
15#define _RAISE 4 15#define _RAISE 4
16#define _MQWERTY 5
17#define _MLOWER 8
18#define _MRAISE 9
16#define _ADJUST 16 19#define _ADJUST 16
17 20
18enum preonic_keycodes { 21enum preonic_keycodes {
19 QWERTY = SAFE_RANGE, 22 QWERTY = SAFE_RANGE,
20 LOWER, 23 LOWER,
21 RAISE, 24 RAISE,
22 BACKLIT 25 MQWERTY,
26 MLOWER,
27 MRAISE
23}; 28};
24 29
25// Fillers to make layering more clear 30// Fillers to make layering more clear
@@ -38,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
38 * |------+------+------+------+------+------|------+------+------+------+------+------| 43 * |------+------+------+------+------+------|------+------+------+------+------+------|
39 * | Shift| < | Z | X | C | V | B | N | M | . | , | - | 44 * | Shift| < | Z | X | C | V | B | N | M | . | , | - |
40 * |------+------+------+------+------+------+------+------+------+------+------+------| 45 * |------+------+------+------+------+------+------+------+------+------+------+------|
41 * | Ctrl | GUI | Alt |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right | 46 * | Ctrl | Alt | GUI |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right |
42 * `-----------------------------------------------------------------------------------' 47 * `-----------------------------------------------------------------------------------'
43 */ 48 */
44[_QWERTY] = { 49[_QWERTY] = {
@@ -46,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
46 {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM }, 51 {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM },
47 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH}, 52 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH},
48 {KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS}, 53 {KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS},
49 {KC_LCTL, KC_LGUI, KC_LALT, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} 54 {KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
50}, 55},
51 56
52/* Lower 57/* Lower
@@ -59,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
59 * |------+------+------+------+------+------|------+------+------+------+------+------| 64 * |------+------+------+------+------+------|------+------+------+------+------+------|
60 * | | | | | | | | | |VolDwn| | | | 65 * | | | | | | | | | |VolDwn| | | |
61 * |------+------+------+------+------+------+------+------+------+------+------+------| 66 * |------+------+------+------+------+------+------+------+------+------+------+------|
62 * | | | | | | |Bspc | | | | | | 67 * | | | | | | |Bspc | | |PgDn |PgUp | |
63 * `-----------------------------------------------------------------------------------' 68 * `-----------------------------------------------------------------------------------'
64 */ 69 */
65[_LOWER] = { 70[_LOWER] = {
@@ -67,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
67 {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD}, 72 {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD},
68 {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)}, 73 {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)},
69 {_______, NO_PIPE, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______}, 74 {_______, NO_PIPE, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______},
70 {_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______} 75 {_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_PGDN, KC_PGUP, _______}
71}, 76},
72 77
73/* Raise 78/* Raise
@@ -76,11 +81,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
76 * |------+------+------+------+------+------+------+------+------+------+------+------| 81 * |------+------+------+------+------+------+------+------+------+------+------+------|
77 * | | | |Mouse^| | | | |ScrlUp| | | ^ | 82 * | | | |Mouse^| | | | |ScrlUp| | | ^ |
78 * |------+------+------+------+------+-------------+------+------+------+------+------| 83 * |------+------+------+------+------+-------------+------+------+------+------+------|
79 * | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | " | 84 * | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | ¨ |
80 * |------+------+------+------+------+------|------+------+------+------+------+------| 85 * |------+------+------+------+------+------|------+------+------+------+------+------|
81 * | | > | | | | | | |ScrlDown| : | ; | _ | 86 * | | > | | | | | | |ScrlDown| : | ; | _ |
82 * |------+------+------+------+------+------+------+------+------+------+------+------| 87 * |------+------+------+------+------+------+------+------+------+------+------+------|
83 * | | | | | |Bspc | | | | | | | 88 * | | | | | |Bspc | | | | PgDn | PgUp | |
84 * `-----------------------------------------------------------------------------------' 89 * `-----------------------------------------------------------------------------------'
85 */ 90 */
86[_RAISE] = { 91[_RAISE] = {
@@ -88,7 +93,70 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
88 {_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC}, 93 {_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC},
89 {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT}, 94 {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT},
90 {_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS}, 95 {_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS},
91 {_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______, _______} 96 {_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______}
97},
98
99/* Mac Qwerty
100 * ,-----------------------------------------------------------------------------------.
101 * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | Bksp |
102 * |------+------+------+------+------+------+------+------+------+------+------+------|
103 * | Esc | Q | W | E | R | T | Y | U | I | O | P | Å |
104 * |------+------+------+------+------+-------------+------+------+------+------+------|
105 * | Tab | A | S | D | F | G | H | J | K | L | Ö | Ä |
106 * |------+------+------+------+------+------|------+------+------+------+------+------|
107 * | Shift| < | Z | X | C | V | B | N | M | . | , | - |
108 * |------+------+------+------+------+------+------+------+------+------+------+------|
109 * | Ctrl | Alt | GUI |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right |
110 * `-----------------------------------------------------------------------------------'
111 */
112[_MQWERTY] = {
113 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_BSPC},
114 {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM },
115 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH},
116 {KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS},
117 {KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, MLOWER, KC_SPC, KC_ENT, MRAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
118},
119
120/* Mac Lower
121 * ,-----------------------------------------------------------------------------------.
122 * | | @ | £ | $ | | | { | [ | ] | } | \ | Del |
123 * |------+------+------+------+------+-------------+------+------+------+------+------|
124 * | | | | | | | | |VolUp | | | ~ |
125 * |------+------+------+------+------+-------------+------+------+------+------+------|
126 * | | | | | | | |LastS |PauseP|NextS | | * |
127 * |------+------+------+------+------+------|------+------+------+------+------+------|
128 * | | | | | | | | | |VolDwn| | | |
129 * |------+------+------+------+------+------+------+------+------+------+------+------|
130 * | | | | | | |Bspc | | |PgDn |PgUp | |
131 * `-----------------------------------------------------------------------------------'
132 */
133[_MLOWER] = {
134 {_______, NO_AT, NO_PND, NO_DLR, _______, _______, LSFT(LALT(KC_8)), NO_LBRC, NO_RBRC, LSFT(LALT(KC_9)), LSFT(LALT(KC_7)), KC_DEL},
135 {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD},
136 {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)},
137 {_______, NO_LBRC, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______},
138 {_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_PGDN, KC_PGUP, _______}
139},
140
141/* Mac Raise
142 * ,-----------------------------------------------------------------------------------.
143 * | ! | " | # | ¤ | % | & | / | ( | ) | = | ? | Ins |
144 * |------+------+------+------+------+------+------+------+------+------+------+------|
145 * | | | |Mouse^| | | | |ScrlUp| | | ^ |
146 * |------+------+------+------+------+-------------+------+------+------+------+------|
147 * | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | ¨ |
148 * |------+------+------+------+------+------|------+------+------+------+------+------|
149 * | | > | | | | | | |ScrlDown| : | ; | _ |
150 * |------+------+------+------+------+------+------+------+------+------+------+------|
151 * | | | | | |Bspc | | | | PgDn | PgUp | |
152 * `-----------------------------------------------------------------------------------'
153 */
154[_MRAISE] = {
155 {LSFT(KC_1),NO_QUO2,LSFT(KC_3), NO_BULT,LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL, NO_QUES, KC_INS},
156 {_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC},
157 {_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT},
158 {_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS},
159 {_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______}
92}, 160},
93 161
94/* Adjust (Lower + Raise) 162/* Adjust (Lower + Raise)
@@ -97,18 +165,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
97 * |------+------+------+------+------+------+------+------+------+------+------+------| 165 * |------+------+------+------+------+------+------+------+------+------+------+------|
98 * | | | | Reset| | | | | | | | | 166 * | | | | Reset| | | | | | | | |
99 * |------+------+------+------+------+-------------+------+------+------+------+------| 167 * |------+------+------+------+------+-------------+------+------+------+------+------|
100 * | | | | | | | | | | | |Rsft | 168 * | | | | | | | | | | | |Rshift|
101 * |------+------+------+------+------+------|------+------+------+------+------+------| 169 * |------+------+------+------+------+------|------+------+------+------+------+------|
102 * | |MusOn |MusOff| | | | | | | | | Reset| 170 * | |MusOn |MusOff| | | | |NrmMode|MacMode| | | Reset|
103 * |------+------+------+------+------+------+------+------+------+------+------+------| 171 * |------+------+------+------+------+------+------+------+------+------+------+------|
104 * | | | | | | | | | | | | 172 * | | | | | | | | | | | | |
105 * `-----------------------------------------------------------------------------------' 173 * `-----------------------------------------------------------------------------------'
106 */ 174 */
107[_ADJUST] = { 175[_ADJUST] = {
108 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, 176 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
109 {_______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______}, 177 {_______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______},
110 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT}, 178 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT},
111 {_______, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, _______, RESET }, 179 {_______, MU_ON, MU_OFF, _______, _______, _______, _______, TO(0), TO(5), _______, _______, RESET },
112 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 180 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
113} 181}
114 182
@@ -117,14 +185,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
117 185
118#ifdef AUDIO_ENABLE 186#ifdef AUDIO_ENABLE
119float tone_startup[][2] = { 187float tone_startup[][2] = {
120 {NOTE_B5, 20}, 188 {NOTE_D5, 8},
121 {NOTE_B6, 8}, 189 {NOTE_E6, 8},
122 {NOTE_DS6, 20}, 190 {NOTE_D6, 8},
123 {NOTE_B6, 8} 191 {NOTE_E5, 8}
124}; 192};
125 193
126float tone_qwerty[][2] = SONG(QWERTY_SOUND);
127
128float tone_goodbye[][2] = SONG(GOODBYE_SOUND); 194float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
129 195
130float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); 196float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
@@ -139,9 +205,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
139 switch (keycode) { 205 switch (keycode) {
140 case QWERTY: 206 case QWERTY:
141 if (record->event.pressed) { 207 if (record->event.pressed) {
142 #ifdef AUDIO_ENABLE
143 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
144 #endif
145 persistant_default_layer_set(1UL<<_QWERTY); 208 persistant_default_layer_set(1UL<<_QWERTY);
146 } 209 }
147 return false; 210 return false;
@@ -166,14 +229,29 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
166 } 229 }
167 return false; 230 return false;
168 break; 231 break;
169 case BACKLIT: 232 case MQWERTY:
233 if (record->event.pressed) {
234 persistant_default_layer_set(1UL<<_MQWERTY);
235 }
236 return false;
237 break;
238 case MLOWER:
239 if (record->event.pressed) {
240 layer_on(_MLOWER);
241 update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
242 } else {
243 layer_off(_MLOWER);
244 update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
245 }
246 return false;
247 break;
248 case MRAISE:
170 if (record->event.pressed) { 249 if (record->event.pressed) {
171 register_code(KC_RSFT); 250 layer_on(_MRAISE);
172 #ifdef BACKLIGHT_ENABLE 251 update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
173 backlight_step();
174 #endif
175 } else { 252 } else {
176 unregister_code(KC_RSFT); 253 layer_off(_MRAISE);
254 update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
177 } 255 }
178 return false; 256 return false;
179 break; 257 break;
diff --git a/keyboards/preonic/keymaps/jacwib/readme.md b/keyboards/preonic/keymaps/jacwib/readme.md
index 066031235..8658d6cdd 100644
--- a/keyboards/preonic/keymaps/jacwib/readme.md
+++ b/keyboards/preonic/keymaps/jacwib/readme.md
@@ -1,3 +1,15 @@
1# Jacwib's preonic keymap. 1# Jacwib's preonic keymap.
2 2
3Designed for use with a swedish language. 3Designed for use with a swedish language.
4
5Version 1.1:
6
7Added PgUp and PgDn keys.
8
9Also added "Mac mode". Unsure if it even works. Might however be able to test soon.
10
11Version 1.2:
12
13Changed around alt and super keys.
14
15Made "Mac mode" function, and tested it! (It works)
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 41aa11622..ae56d16c7 100644
--- a/quantum/keymap.h
+++ b/quantum/keymap.h
@@ -84,6 +84,10 @@ enum quantum_keycodes {
84 QK_MOD_TAP_MAX = 0x6FFF, 84 QK_MOD_TAP_MAX = 0x6FFF,
85 QK_TAP_DANCE = 0x7100, 85 QK_TAP_DANCE = 0x7100,
86 QK_TAP_DANCE_MAX = 0x71FF, 86 QK_TAP_DANCE_MAX = 0x71FF,
87#ifdef UNICODEMAP_ENABLE
88 QK_UNICODE_MAP = 0x7800,
89 QK_UNICODE_MAP_MAX = 0x7FFF,
90#endif
87#ifdef UNICODE_ENABLE 91#ifdef UNICODE_ENABLE
88 QK_UNICODE = 0x8000, 92 QK_UNICODE = 0x8000,
89 QK_UNICODE_MAX = 0xFFFF, 93 QK_UNICODE_MAX = 0xFFFF,
@@ -195,6 +199,7 @@ enum quantum_keycodes {
195#define HYPR(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI) 199#define HYPR(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI)
196#define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT) 200#define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT)
197#define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI) 201#define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI)
202#define ALTG(kc) (kc | QK_RCTL | QK_RALT)
198 203
199#define MOD_HYPR 0xf 204#define MOD_HYPR 0xf
200#define MOD_MEH 0x7 205#define MOD_MEH 0x7
@@ -299,7 +304,10 @@ enum quantum_keycodes {
299// ON_PRESS = 1 304// ON_PRESS = 1
300// ON_RELEASE = 2 305// ON_RELEASE = 2
301// Unless you have a good reason not to do so, prefer ON_PRESS (1) as your default. 306// Unless you have a good reason not to do so, prefer ON_PRESS (1) as your default.
302#define TO(layer, when) (layer | QK_TO | (when << 0x4)) 307// In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own
308// keycode modeled after the old version, kept below for this.
309/* #define TO(layer, when) (layer | QK_TO | (when << 0x4)) */
310#define TO(layer) (layer | QK_TO | (ON_PRESS << 0x4))
303 311
304// Momentary switch layer - 256 layer max 312// Momentary switch layer - 256 layer max
305#define MO(layer) (layer | QK_MOMENTARY) 313#define MO(layer) (layer | QK_MOMENTARY)
@@ -339,5 +347,8 @@ enum quantum_keycodes {
339 #define UC(n) UNICODE(n) 347 #define UC(n) UNICODE(n)
340#endif 348#endif
341 349
350#ifdef UNICODEMAP_ENABLE
351 #define X(n) (n | QK_UNICODE_MAP)
352#endif
342 353
343#endif 354#endif
diff --git a/quantum/keymap_extras/keymap_br_abnt2.h b/quantum/keymap_extras/keymap_br_abnt2.h
new file mode 100644
index 000000000..0df177721
--- /dev/null
+++ b/quantum/keymap_extras/keymap_br_abnt2.h
@@ -0,0 +1,58 @@
1#ifndef KEYMAP_BR_ABNT2_H
2#define KEYMAP_BR_ABNT2_H
3
4#include "keymap_common.h"
5
6/* Scan codes for the Brazilian ABNT2 keyboard layout */
7
8#define BR_CCDL KC_SCLN // Ç same scancode as ;: on US layout
9#define BR_SCLN KC_SLSH // ;: same scancode as /? on US layout
10#define BR_QUOT KC_GRV // '" same scancode as `~ on US layout
11#define BR_TILD KC_QUOT // ~^ dead keys, same scancode as '" on US layout
12#define BR_ACUT KC_LBRC // ´` dead keys, same scancode as [{ on US layout
13#define BR_LBRC KC_RBRC // [{ same scancode as ]} on US layout
14#define BR_RBRC KC_BSLS // ]} same scancode as \| on US layout
15#define BR_BSLS KC_NUBS // \| uses the non-US hash scancode (#~, sometimes §±)
16#define BR_SLSH KC_INT1 // /? uses the INTL1 scancode
17
18#define BR_COLN LSFT(BR_SCLN) // shifted :
19#define BR_DQT LSFT(BR_QUOT) // shifted "
20#define BR_CIRC LSFT(BR_TILD) // shifted ^ (dead key)
21#define BR_GRAV LSFT(BR_ACUT) // shifted ` (dead key)
22#define BR_LCBR LSFT(BR_LBRC) // shifted {
23#define BR_RCBR LSFT(BR_RBRC) // shifted }
24#define BR_PIPE LSFT(BR_BSLS) // shifted |
25#define BR_QUES LSFT(BR_SLSH) // shifted ?
26#define BR_TRMA LSFT(KC_6) // shifted ¨ (dead key - trema accent)
27
28// On the ABNT2 the keypad comma and the keypad dot scancodes are switched
29// (presumably because in Brazil comma is used as the decimal separator)
30#define BR_KPDT KC_KP_COMMA // keypad .
31#define BR_KPCM KC_KP_DOT // keypad ,
32
33#define BR_1UP LALT(KC_1) // 1 superscript ¹ alt+1
34#define BR_2UP LALT(KC_2) // 2 superscript ² alt+2
35#define BR_3UP LALT(KC_3) // 3 superscript ³ alt+3
36#define BR_PND LALT(KC_4) // Pound sign £ alt+4
37#define BR_CENT LALT(KC_5) // Cent sign ¢ alt+5
38#define BR_NOT LALT(KC_6) // Not sign ¬ alt+6
39#define BR_SECT LALT(KC_EQL) // Section sign § alt+=
40#define BR_FORD LALT(BR_LBRC) // Feminine Ordinal Sign ª alt+[
41#define BR_MORD LALT(BR_RBRC) // Masculine Ordinal Sign º alt+]
42#define BR_DGRE LALT(BR_SLSH) // Degree sign ° alt+/
43
44#define BR_EURO LALT(KC_E) // Euro sign € alt+e
45#define BR_NDTD LALT(BR_TILD) // Non-dead key tilde ~ alt+~
46#define BR_NDAC LALT(BR_ACUT) // Non-dead key acute accent ´ alt+´
47#define BR_NDGV LALT(BR_QUOT) // Non-dead key grave accent ` alt+'
48#define BR_NDCR LALT(BR_CIRC) // Non-dead key circumflex accent ^ alt+^ (alt+shift+~)
49#define BR_NDTR LALT(BR_TRMA) // Non-dead key trema accent ¨ alt+¨ (alt+shift+6)
50
51// For 101-key keyboard layouts, the ABNT2 layout allows
52// the slash and question mark to be typed using alt+q and alt+w.
53// The shortcuts are provided here for completeness' sake,
54// but it's recommended to use BR_SLSH and BR_QUES instead
55#define BR_ASLS LALT(KC_Q)
56#define BR_AQST LALT(KC_W)
57
58#endif
diff --git a/quantum/keymap_extras/keymap_dvp.h b/quantum/keymap_extras/keymap_dvp.h
new file mode 100644
index 000000000..83f49a52b
--- /dev/null
+++ b/quantum/keymap_extras/keymap_dvp.h
@@ -0,0 +1,82 @@
1#ifndef KEYMAP_DVP_H
2#define KEYMAP_DVP_H
3
4#include "keymap.h"
5
6// Normal characters
7#define DP_DLR KC_GRV
8#define DP_AMPR KC_1
9#define DP_LBRC KC_2
10#define DP_LCBR KC_3
11#define DP_RCBR KC_4
12#define DP_LPRN KC_5
13#define DP_EQL KC_6
14#define DP_ASTR KC_7
15#define DP_RPRN KC_8
16#define DP_PLUS KC_9
17#define DP_RBRC KC_0
18#define DP_EXLM KC_MINS
19#define DP_HASH KC_EQL
20
21#define DP_SCLN KC_Q
22#define DP_COMM KC_W
23#define DP_DOT KC_E
24#define DP_P KC_R
25#define DP_Y KC_T
26#define DP_F KC_Y
27#define DP_G KC_U
28#define DP_C KC_I
29#define DP_R KC_O
30#define DP_L KC_P
31#define DP_SLSH KC_LBRC
32#define DP_AT KC_RBRC
33#define DP_BSLS KC_BSLS
34
35#define DP_A KC_A
36#define DP_O KC_S
37#define DP_E KC_D
38#define DP_U KC_F
39#define DP_I KC_G
40#define DP_D KC_H
41#define DP_H KC_J
42#define DP_T KC_K
43#define DP_N KC_L
44#define DP_S KC_SCLN
45#define DP_MINS KC_QUOT
46
47#define DP_QUOT KC_Z
48#define DP_Q KC_X
49#define DP_J KC_C
50#define DP_K KC_V
51#define DP_X KC_B
52#define DP_B KC_N
53#define DP_M KC_M
54#define DP_W KC_COMM
55#define DP_V KC_DOT
56#define DP_Z KC_SLSH
57
58// Shifted characters
59#define DP_TILD LSFT(DP_DLR)
60#define DP_PERC LSFT(DP_AMPR)
61#define DP_7 LSFT(DP_LBRC)
62#define DP_5 LSFT(DP_LCBR)
63#define DP_3 LSFT(DP_RCBR)
64#define DP_1 LSFT(DP_LPRN)
65#define DP_9 LSFT(DP_EQL)
66#define DP_0 LSFT(DP_ASTR)
67#define DP_2 LSFT(DP_RPRN)
68#define DP_4 LSFT(DP_PLUS)
69#define DP_6 LSFT(DP_RBRC)
70#define DP_8 LSFT(DP_EXLM)
71#define DP_GRV LSFT(DP_HASH)
72
73#define DP_COLN LSFT(DP_SCLN)
74#define DP_LABK LSFT(DP_COMM)
75#define DP_RABK LSFT(DP_DOT)
76#define DP_QUES LSFT(DP_SLSH)
77#define DP_CIRC LSFT(DP_AT)
78#define DP_PIPE LSFT(DP_BSLS)
79#define DP_UNDS LSFT(DP_MINS)
80#define DP_DQUO LSFT(DP_QUOT)
81
82#endif
diff --git a/quantum/light_ws2812.c b/quantum/light_ws2812.c
index d38dac4c6..497543339 100755
--- a/quantum/light_ws2812.c
+++ b/quantum/light_ws2812.c
@@ -152,11 +152,6 @@ void inline ws2812_setleds_pin(struct cRGB *ledarray, uint16_t leds, uint8_t pin
152// Setleds for SK6812RGBW 152// Setleds for SK6812RGBW
153void inline ws2812_setleds_rgbw(struct cRGBW *ledarray, uint16_t leds) 153void inline ws2812_setleds_rgbw(struct cRGBW *ledarray, uint16_t leds)
154{ 154{
155 // ws2812_DDRREG |= _BV(ws2812_pin); // Enable DDR
156 // new universal format (DDR)
157 _SFR_IO8((RGB_DI_PIN >> 4) + 1) |= _BV(RGB_DI_PIN & 0xF);
158
159 ws2812_sendarray_mask((uint8_t*)ledarray,leds<<2,_BV(RGB_DI_PIN & 0xF));
160 155
161 #ifdef RGBW_BB_TWI 156 #ifdef RGBW_BB_TWI
162 cli(); 157 cli();
@@ -169,14 +164,23 @@ void inline ws2812_setleds_rgbw(struct cRGBW *ledarray, uint16_t leds)
169 uint8_t * data = (uint8_t*)ledarray; 164 uint8_t * data = (uint8_t*)ledarray;
170 while (datlen--) { 165 while (datlen--) {
171 curbyte=*data++; 166 curbyte=*data++;
172 I2C_Write(curbyte % 0x10); 167 I2C_Write(curbyte);
173 } 168 }
174 I2C_Stop(); 169 I2C_Stop();
175 sei(); 170 sei();
171 #else
172 _delay_us(80);
176 #endif 173 #endif
177 174
178 175
179 _delay_us(80); 176 // ws2812_DDRREG |= _BV(ws2812_pin); // Enable DDR
177 // new universal format (DDR)
178 _SFR_IO8((RGB_DI_PIN >> 4) + 1) |= _BV(RGB_DI_PIN & 0xF);
179
180 ws2812_sendarray_mask((uint8_t*)ledarray,leds<<2,_BV(RGB_DI_PIN & 0xF));
181
182
183
180} 184}
181 185
182void ws2812_sendarray(uint8_t *data,uint16_t datlen) 186void ws2812_sendarray(uint8_t *data,uint16_t datlen)
@@ -258,7 +262,7 @@ void inline ws2812_sendarray_mask(uint8_t *data,uint16_t datlen,uint8_t maskhi)
258 cli(); 262 cli();
259 263
260 while (datlen--) { 264 while (datlen--) {
261 curbyte=(*data++) % 0x10; 265 curbyte=(*data++);
262 266
263 asm volatile( 267 asm volatile(
264 " ldi %0,8 \n\t" 268 " ldi %0,8 \n\t"
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c
index 6a30afe29..cd3a610b4 100644
--- a/quantum/process_keycode/process_unicode.c
+++ b/quantum/process_keycode/process_unicode.c
@@ -42,6 +42,11 @@ void unicode_input_start (void) {
42 register_code(KC_PPLS); 42 register_code(KC_PPLS);
43 unregister_code(KC_PPLS); 43 unregister_code(KC_PPLS);
44 break; 44 break;
45 case UC_WINC:
46 register_code(KC_RALT);
47 unregister_code(KC_RALT);
48 register_code(KC_U);
49 unregister_code(KC_U);
45 } 50 }
46 wait_ms(UNICODE_TYPE_DELAY); 51 wait_ms(UNICODE_TYPE_DELAY);
47} 52}
@@ -78,6 +83,52 @@ bool process_unicode(uint16_t keycode, keyrecord_t *record) {
78 return true; 83 return true;
79} 84}
80 85
86#ifdef UNICODEMAP_ENABLE
87__attribute__((weak))
88const uint32_t PROGMEM unicode_map[] = {
89};
90
91void register_hex32(uint32_t hex) {
92 uint8_t onzerostart = 1;
93 for(int i = 7; i >= 0; i--) {
94 if (i <= 3) {
95 onzerostart = 0;
96 }
97 uint8_t digit = ((hex >> (i*4)) & 0xF);
98 if (digit == 0) {
99 if (onzerostart == 0) {
100 register_code(hex_to_keycode(digit));
101 unregister_code(hex_to_keycode(digit));
102 }
103 } else {
104 register_code(hex_to_keycode(digit));
105 unregister_code(hex_to_keycode(digit));
106 onzerostart = 0;
107 }
108 }
109}
110
111__attribute__((weak))
112void unicode_map_input_error() {}
113
114bool process_unicode_map(uint16_t keycode, keyrecord_t *record) {
115 if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) {
116 const uint32_t* map = unicode_map;
117 uint16_t index = keycode & 0x7FF;
118 uint32_t code = pgm_read_dword_far(&map[index]);
119 if ((code > 0xFFFF && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) {
120 // when character is out of range supported by the OS
121 unicode_map_input_error();
122 } else {
123 unicode_input_start();
124 register_hex32(code);
125 unicode_input_finish();
126 }
127 }
128 return true;
129}
130#endif
131
81#ifdef UCIS_ENABLE 132#ifdef UCIS_ENABLE
82qk_ucis_state_t qk_ucis_state; 133qk_ucis_state_t qk_ucis_state;
83 134
diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h
index 27f8072ee..065eeb5f6 100644
--- a/quantum/process_keycode/process_unicode.h
+++ b/quantum/process_keycode/process_unicode.h
@@ -3,10 +3,11 @@
3 3
4#include "quantum.h" 4#include "quantum.h"
5 5
6#define UC_OSX 0 6#define UC_OSX 0 // Mac OS X
7#define UC_LNX 1 7#define UC_LNX 1 // Linux
8#define UC_WIN 2 8#define UC_WIN 2 // Windows 'HexNumpad'
9#define UC_BSD 3 9#define UC_BSD 3 // BSD (not implemented)
10#define UC_WINC 4 // WinCompose https://github.com/samhocevar/wincompose
10 11
11#ifndef UNICODE_TYPE_DELAY 12#ifndef UNICODE_TYPE_DELAY
12#define UNICODE_TYPE_DELAY 10 13#define UNICODE_TYPE_DELAY 10
@@ -20,6 +21,10 @@ void register_hex(uint16_t hex);
20 21
21bool process_unicode(uint16_t keycode, keyrecord_t *record); 22bool process_unicode(uint16_t keycode, keyrecord_t *record);
22 23
24#ifdef UNICODEMAP_ENABLE
25bool process_unicode_map(uint16_t keycode, keyrecord_t *record);
26#endif
27
23#ifdef UCIS_ENABLE 28#ifdef UCIS_ENABLE
24#ifndef UCIS_MAX_SYMBOL_LENGTH 29#ifndef UCIS_MAX_SYMBOL_LENGTH
25#define UCIS_MAX_SYMBOL_LENGTH 32 30#define UCIS_MAX_SYMBOL_LENGTH 32
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 5fa5e66b3..b8a81a76b 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -131,6 +131,8 @@ bool process_record_quantum(keyrecord_t *record) {
131 #endif 131 #endif
132 #ifdef PRINTING_ENABLE 132 #ifdef PRINTING_ENABLE
133 process_printer(keycode, record) && 133 process_printer(keycode, record) &&
134 #ifdef UNICODEMAP_ENABLE
135 process_unicode_map(keycode, record) &&
134 #endif 136 #endif
135 true)) { 137 true)) {
136 return false; 138 return false;
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 801ca1d0d..221a16402 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;
@@ -59,13 +78,8 @@ uint8_t rgblight_inited = 0;
59 78
60 79
61void sethsv(uint16_t hue, uint8_t sat, uint8_t val, struct cRGB *led1) { 80void sethsv(uint16_t hue, uint8_t sat, uint8_t val, struct cRGB *led1) {
62 // Convert hue, saturation, and value (HSV/HSB) to RGB. DIM_CURVE is used only
63 // on value and saturation (inverted). This looks the most natural.
64 uint8_t r = 0, g = 0, b = 0, base, color; 81 uint8_t r = 0, g = 0, b = 0, base, color;
65 82
66 val = pgm_read_byte(&DIM_CURVE[val]);
67 sat = 255 - pgm_read_byte(&DIM_CURVE[255 - sat]);
68
69 if (sat == 0) { // Acromatic color (gray). Hue doesn't mind. 83 if (sat == 0) { // Acromatic color (gray). Hue doesn't mind.
70 r = val; 84 r = val;
71 g = val; 85 g = val;
@@ -107,6 +121,9 @@ void sethsv(uint16_t hue, uint8_t sat, uint8_t val, struct cRGB *led1) {
107 break; 121 break;
108 } 122 }
109 } 123 }
124 r = pgm_read_byte(&DIM_CURVE[r]);
125 g = pgm_read_byte(&DIM_CURVE[g]);
126 b = pgm_read_byte(&DIM_CURVE[b]);
110 127
111 setrgb(r, g, b, led1); 128 setrgb(r, g, b, led1);
112} 129}
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
index 2a712d8be..efc685f31 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight.h
@@ -41,6 +41,12 @@
41#include "eeconfig.h" 41#include "eeconfig.h"
42#include "light_ws2812.h" 42#include "light_ws2812.h"
43 43
44extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM;
45extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM;
46extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM;
47extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM;
48extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM;
49
44typedef union { 50typedef union {
45 uint32_t raw; 51 uint32_t raw;
46 struct { 52 struct {
diff --git a/quantum/variable_trace.c b/quantum/variable_trace.c
new file mode 100644
index 000000000..de580244c
--- /dev/null
+++ b/quantum/variable_trace.c
@@ -0,0 +1,110 @@
1#include "variable_trace.h"
2#include <stddef.h>
3#include <string.h>
4
5#ifdef NO_PRINT
6#error "You need undef NO_PRINT to use the variable trace feature"
7#endif
8
9#ifndef CONSOLE_ENABLE
10#error "The console needs to be enabled in the makefile to use the variable trace feature"
11#endif
12
13
14#define NUM_TRACED_VARIABLES 1
15#ifndef MAX_VARIABLE_TRACE_SIZE
16 #define MAX_VARIABLE_TRACE_SIZE 4
17#endif
18
19typedef struct {
20 const char* name;
21 void* addr;
22 unsigned size;
23 const char* func;
24 int line;
25 uint8_t last_value[MAX_VARIABLE_TRACE_SIZE];
26
27} traced_variable_t;
28
29static traced_variable_t traced_variables[NUM_TRACED_VARIABLES];
30
31void add_traced_variable(const char* name, void* addr, unsigned size, const char* func, int line) {
32 verify_traced_variables(func, line);
33 if (size > MAX_VARIABLE_TRACE_SIZE) {
34#if defined(__AVR__)
35 xprintf("Traced variable \"%S\" exceeds the maximum size %d\n", name, size);
36#else
37 xprintf("Traced variable \"%s\" exceeds the maximum size %d\n", name, size);
38#endif
39 size = MAX_VARIABLE_TRACE_SIZE;
40 }
41 int index = -1;
42 for (int i = 0; i < NUM_TRACED_VARIABLES; i++) {
43 if (index == -1 && traced_variables[i].addr == NULL){
44 index = i;
45 }
46 else if (strcmp_P(name, traced_variables[i].name)==0) {
47 index = i;
48 break;
49 }
50 }
51
52 if (index == -1) {
53 xprintf("You can only trace %d variables at the same time\n", NUM_TRACED_VARIABLES);
54 return;
55 }
56
57 traced_variable_t* t = &traced_variables[index];
58 t->name = name;
59 t->addr = addr;
60 t->size = size;
61 t->func = func;
62 t->line = line;
63 memcpy(&t->last_value[0], addr, size);
64
65}
66
67void remove_traced_variable(const char* name, const char* func, int line) {
68 verify_traced_variables(func, line);
69 for (int i = 0; i < NUM_TRACED_VARIABLES; i++) {
70 if (strcmp_P(name, traced_variables[i].name)==0) {
71 traced_variables[i].name = 0;
72 traced_variables[i].addr = NULL;
73 break;
74 }
75 }
76}
77
78void verify_traced_variables(const char* func, int line) {
79 for (int i = 0; i < NUM_TRACED_VARIABLES; i++) {
80 traced_variable_t* t = &traced_variables[i];
81 if (t->addr != NULL && t->name != NULL) {
82 if (memcmp(t->last_value, t->addr, t->size)!=0){
83#if defined(__AVR__)
84 xprintf("Traced variable \"%S\" has been modified\n", t->name);
85 xprintf("Between %S:%d\n", t->func, t->line);
86 xprintf("And %S:%d\n", func, line);
87
88#else
89 xprintf("Traced variable \"%s\" has been modified\n", t->name);
90 xprintf("Between %s:%d\n", t->func, t->line);
91 xprintf("And %s:%d\n", func, line);
92#endif
93 xprintf("Previous value ");
94 for (int j=0; j<t->size;j++) {
95 print_hex8(t->last_value[j]);
96 }
97 xprintf("\nNew value ");
98 uint8_t* addr = (uint8_t*)(t->addr);
99 for (int j=0; j<t->size;j++) {
100 print_hex8(addr[j]);
101 }
102 xprintf("\n");
103 memcpy(t->last_value, addr, t->size);
104 }
105 }
106
107 t->func = func;
108 t->line = line;
109 }
110}
diff --git a/quantum/variable_trace.h b/quantum/variable_trace.h
new file mode 100644
index 000000000..46bd82786
--- /dev/null
+++ b/quantum/variable_trace.h
@@ -0,0 +1,34 @@
1#ifndef VARIABLE_TRACE_H
2#define VARIABLE_TRACE_H
3
4// For more information about the variable tracing see the readme.
5
6#include "print.h"
7
8#ifdef NUM_TRACED_VARIABLES
9
10// Start tracing a variable at the memory address addr
11// The name can be anything and is used only for reporting
12// The size should usually be the same size as the variable you are interested in
13#define ADD_TRACED_VARIABLE(name, addr, size) \
14 add_traced_variable(PSTR(name), (void*)addr, size, PSTR(__FILE__), __LINE__)
15
16// Stop tracing the variable with the given name
17#define REMOVE_TRACED_VARIABLE(name) remove_traced_variable(PSTR(name), PSTR(__FILE__), __LINE__)
18
19// Call to get messages when the variable has been changed
20#define VERIFY_TRACED_VARIABLES() verify_traced_variables(PSTR(__FILE__), __LINE__)
21
22#else
23
24#define ADD_TRACED_VARIABLE(name, addr, size)
25#define REMOVE_TRACED_VARIABLE(name)
26#define VERIFY_TRACED_VARIABLES()
27
28#endif
29
30// Don't call directly, use the macros instead
31void add_traced_variable(const char* name, void* addr, unsigned size, const char* func, int line);
32void remove_traced_variable(const char* name, const char* func, int line);
33void verify_traced_variables(const char* func, int line);
34#endif
diff --git a/readme.md b/readme.md
index a7320202b..d5a259ccb 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.
@@ -320,6 +323,18 @@ This enables MIDI sending and receiving with your keyboard. To enter MIDI send m
320 323
321This allows you to send unicode symbols via `UC(<unicode>)` in your keymap. Only codes up to 0x7FFF are currently supported. 324This allows you to send unicode symbols via `UC(<unicode>)` in your keymap. Only codes up to 0x7FFF are currently supported.
322 325
326`UNICODEMAP_ENABLE`
327
328This allows sending unicode symbols using `X(<unicode>)` in your keymap. Codes
329up to 0xFFFFFFFF are supported, including emojis. You will need to maintain
330a separate mapping table in your keymap file.
331
332Known limitations:
333- Under Mac OS, only codes up to 0xFFFF are supported.
334- Under Linux ibus, only codes up to 0xFFFFF are supported (but anything important is still under this limit for now).
335
336Characters out of range supported by the OS will be ignored.
337
323`BLUETOOTH_ENABLE` 338`BLUETOOTH_ENABLE`
324 339
325This allows you to interface with a Bluefruit EZ-key to send keycodes wirelessly. It uses the D2 and D3 pins. 340This allows you to interface with a Bluefruit EZ-key to send keycodes wirelessly. It uses the D2 and D3 pins.
@@ -328,6 +343,10 @@ This allows you to interface with a Bluefruit EZ-key to send keycodes wirelessly
328 343
329This allows you output audio on the C6 pin (needs abstracting). See the [audio section](#driving-a-speaker---audio-support) for more information. 344This allows you output audio on the C6 pin (needs abstracting). See the [audio section](#driving-a-speaker---audio-support) for more information.
330 345
346`VARIABLE_TRACE`
347
348Use this to debug changes to variable values, see the [tracing variables](#tracing-variables) section for more information.
349
331### Customizing Makefile options on a per-keymap basis 350### Customizing Makefile options on a per-keymap basis
332 351
333If your keymap directory has a file called `Makefile` (note the filename), any Makefile options you set in that file will take precedence over other Makefile options for your particular keyboard. 352If your keymap directory has a file called `Makefile` (note the filename), any Makefile options you set in that file will take precedence over other Makefile options for your particular keyboard.
@@ -376,6 +395,8 @@ Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` -
376 395
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. 396`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 397
398`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).
399
379 400
380### Fun with modifier keys 401### Fun with modifier keys
381 402
@@ -823,7 +844,7 @@ And then, to assign this macro to a key on your keyboard layout, you just use `M
823 844
824## Dynamic macros: record and replay macros in runtime 845## Dynamic macros: record and replay macros in runtime
825 846
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. 847In 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 848
828To enable them, first add a new element to the `planck_keycodes` enum -- `DYNAMIC_MACRO_RANGE`: 849To enable them, first add a new element to the `planck_keycodes` enum -- `DYNAMIC_MACRO_RANGE`:
829 850
@@ -864,7 +885,7 @@ Add the following code to the very beginning of your `process_record_user()` fun
864 885
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`. 886To 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 887
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). 888If 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 889
869For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header. 890For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header.
870 891
@@ -889,7 +910,7 @@ In `quantum/keymap_extras/`, you'll see various language files - these work the
889 910
890## Unicode support 911## Unicode support
891 912
892You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile. 913You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout, see [this article](http://www.poynton.com/notes/misc/mac-unicode-hex-input.html) to learn more) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile.
893 914
894## Backlight Breathing 915## Backlight Breathing
895 916
@@ -1266,3 +1287,22 @@ If there are problems with the tests, you can find the executable in the `./buil
1266It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing. 1287It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing.
1267 1288
1268In that model you would emulate the input, and expect a certain output from the emulated keyboard. 1289In that model you would emulate the input, and expect a certain output from the emulated keyboard.
1290
1291# Tracing variables
1292
1293Sometimes you might wonder why a variable gets changed and where, and this can be quite tricky to track down without having a debugger. It's of course possible to manually add print statements to track it, but you can also enable the variable trace feature. This works for both for variables that are changed by the code, and when the variable is changed by some memory corruption.
1294
1295To take the feature into use add `VARIABLE_TRACE=x` to the end of you make command. `x` represents the number of variables you want to trace, which is usually 1.
1296
1297Then at a suitable place in the code, call `ADD_TRACED_VARIABLE`, to begin the tracing. For example to trace all the layer changes, you can do this
1298```c
1299void matrix_init_user(void) {
1300 ADD_TRACED_VARIABLE("layer", &layer_state, sizeof(layer_state));
1301}
1302```
1303
1304This will add a traced variable named "layer" (the name is just for your information), which tracks the memory location of `layer_state`. It tracks 4 bytes (the size of `layer_state`), so any modification to the variable will be reported. By default you can not specify a size bigger than 4, but you can change it by adding `MAX_VARIABLE_TRACE_SIZE=x` to the end of the make command line.
1305
1306In order to actually detect changes to the variables you should call `VERIFY_TRACED_VARIABLES` around the code that you think that modifies the variable. If a variable is modified it will tell you between which two `VERIFY_TRACED_VARIABLES` calls the modification happened. You can then add more calls to track it down further. I don't recommend spamming the codebase with calls. It's better to start with a few, and then keep adding them in a binary search fashion. You can also delete the ones you don't need, as each call need to store the file name and line number in the ROM, so you can run out of memory if you add too many calls.
1307
1308Also remember to delete all the tracing code ones you have found the bug, as you wouldn't want to create a pull request with tracing code. \ No newline at end of file