aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluc wastiaux <luc.wastiaux@airpost.net>2017-02-13 07:44:28 +0800
committerluc wastiaux <luc.wastiaux@airpost.net>2017-02-13 07:44:28 +0800
commit352d79e1fbbd7eea65793abb261dd544fec7bb1c (patch)
treee006ee8098826054d93939b2a59521f6c032e10d
parent5f8535b356e66975e20f1a573ab104db75f8b33c (diff)
parent4505db5d0e0c2423645cc9117f29b942d4841c5b (diff)
downloadqmk_firmware-352d79e1fbbd7eea65793abb261dd544fec7bb1c.tar.gz
qmk_firmware-352d79e1fbbd7eea65793abb261dd544fec7bb1c.zip
Merge remote-tracking branch 'upstream/master'
-rw-r--r--.travis.yml18
-rw-r--r--Dockerfile3
-rw-r--r--Makefile40
-rw-r--r--build_keyboard.mk5
-rw-r--r--doc/BUILD_GUIDE.md4
-rwxr-xr-xdoc/CYGWIN_GUIDE.md2
-rw-r--r--doc/HAND_WIRE.md6
-rw-r--r--doc/PCB_GUIDE.md6
-rw-r--r--keyboards/atreus/readme.md2
-rw-r--r--keyboards/atreus62/keymaps/mneme/README.md6
-rw-r--r--keyboards/atreus62/keymaps/mneme/config.h2
-rw-r--r--keyboards/atreus62/keymaps/mneme/img/base.pngbin458762 -> 457157 bytes
-rw-r--r--keyboards/atreus62/keymaps/mneme/img/fun.pngbin430634 -> 425368 bytes
-rw-r--r--keyboards/atreus62/keymaps/mneme/img/sym.pngbin433342 -> 433218 bytes
-rw-r--r--keyboards/atreus62/keymaps/mneme/keymap.c111
-rw-r--r--keyboards/ergodox/keymaps/ab/readme.md2
-rw-r--r--keyboards/ergodox/keymaps/albert/Makefile5
-rw-r--r--keyboards/ergodox/keymaps/albert/config.h12
-rw-r--r--keyboards/ergodox/keymaps/albert/keymap.c661
-rw-r--r--keyboards/ergodox/keymaps/albert/readme.md188
-rw-r--r--keyboards/ergodox/keymaps/algernon/readme.md4
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/Makefile1
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.pngbin79741 -> 79488 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.pngbin55349 -> 79904 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.pngbin50926 -> 62258 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.pngbin43551 -> 58886 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/keymap.c426
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/readme.md60
-rw-r--r--keyboards/ergodox/keymaps/german-kinergo/readme.md2
-rw-r--r--keyboards/ergodox/keymaps/mclennon_osx/README.md2
-rw-r--r--keyboards/ergodox/keymaps/ordinary/keymap.c1
-rw-r--r--keyboards/ergodox/keymaps/pvinis/Readme.md2
-rw-r--r--keyboards/ergodox/keymaps/robot_test_layout/keymap.c8
-rw-r--r--keyboards/ergodox/keymaps/software_neo2/keymap.c64
-rw-r--r--keyboards/ergodox/keymaps/supercoder/readme.md2
-rw-r--r--keyboards/ergodox/keymaps/win10_writers-block/readme.md2
-rw-r--r--keyboards/ergodox/readme.md2
-rw-r--r--keyboards/gonnerd/Makefile3
-rw-r--r--keyboards/gonnerd/config.h43
-rw-r--r--keyboards/gonnerd/gonnerd.c1
-rw-r--r--keyboards/gonnerd/gonnerd.h42
-rw-r--r--keyboards/gonnerd/keymaps/default/Makefile21
-rw-r--r--keyboards/gonnerd/keymaps/default/keymap.c16
-rw-r--r--keyboards/gonnerd/keymaps/mauin/Makefile21
-rw-r--r--keyboards/gonnerd/keymaps/mauin/keymap.c78
-rw-r--r--keyboards/gonnerd/keymaps/mauin/readme.md5
-rw-r--r--keyboards/gonnerd/readme.md34
-rw-r--r--keyboards/gonnerd/rules.mk66
-rw-r--r--keyboards/handwired/onekey/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/promethium/config.h89
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/config.h7
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/keymap.c875
-rw-r--r--keyboards/handwired/promethium/promethium.c36
-rw-r--r--keyboards/handwired/promethium/promethium.h9
-rw-r--r--keyboards/handwired/promethium/rgbsps.c51
-rw-r--r--keyboards/handwired/promethium/rgbsps.h3
-rw-r--r--keyboards/handwired/promethium/rules.mk3
-rwxr-xr-xkeyboards/handwired/reddot/Makefile3
-rwxr-xr-xkeyboards/handwired/reddot/config.h162
-rwxr-xr-xkeyboards/handwired/reddot/keymaps/default/keymap.c29
-rwxr-xr-xkeyboards/handwired/reddot/keymaps/default/readme.md1
-rwxr-xr-xkeyboards/handwired/reddot/readme.md24
-rwxr-xr-xkeyboards/handwired/reddot/reddot.c7
-rwxr-xr-xkeyboards/handwired/reddot/reddot.h20
-rwxr-xr-xkeyboards/handwired/reddot/rules.mk88
-rw-r--r--keyboards/hhkb/readme.md2
-rw-r--r--keyboards/infinity60/infinity60.c15
-rw-r--r--keyboards/infinity60/keymaps/default/keymap.c9
-rwxr-xr-xkeyboards/infinity60/keymaps/depariel/keymap.c9
-rw-r--r--keyboards/infinity60/keymaps/hasu/keymap.c10
-rw-r--r--keyboards/infinity60/matrix.c3
-rw-r--r--keyboards/kc60/kc60.c15
-rw-r--r--keyboards/kc60/rules.mk3
-rw-r--r--keyboards/kinesis/keymaps/milestogo/keymap.c205
-rw-r--r--keyboards/kinesis/rules.mk4
-rw-r--r--keyboards/lets_split/Makefile4
-rw-r--r--keyboards/lets_split/config.h3
-rw-r--r--keyboards/lets_split/eeprom-lefthand.eep2
-rw-r--r--keyboards/lets_split/eeprom-righthand.eep2
-rw-r--r--keyboards/lets_split/keymaps/i2c/config.h10
-rw-r--r--keyboards/lets_split/keymaps/serial/config.h9
-rw-r--r--keyboards/lets_split/lets_split.h3
-rw-r--r--keyboards/lets_split/readme.md86
-rw-r--r--keyboards/lets_split/rev2/rev2.h8
-rw-r--r--keyboards/lets_split/rev2fliphalf/Makefile3
-rw-r--r--keyboards/lets_split/rev2fliphalf/config.h91
-rw-r--r--keyboards/lets_split/rev2fliphalf/rev2fliphalf.c32
-rw-r--r--keyboards/lets_split/rev2fliphalf/rev2fliphalf.h28
-rw-r--r--keyboards/lets_split/rev2fliphalf/rules.mk5
-rw-r--r--keyboards/lets_split/rules.mk12
-rw-r--r--keyboards/lets_split/split_util.c3
-rw-r--r--keyboards/planck/keymaps/bone2planck/Makefile14
-rw-r--r--keyboards/planck/keymaps/bone2planck/config.h5
-rw-r--r--keyboards/planck/keymaps/bone2planck/keymap.c79
-rw-r--r--keyboards/planck/keymaps/bone2planck/readme.md98
-rw-r--r--keyboards/planck/keymaps/callum/keymap.c6
-rw-r--r--keyboards/planck/keymaps/callum/readme.md2
-rw-r--r--keyboards/planck/keymaps/default/keymap.c17
-rw-r--r--keyboards/planck/keymaps/espynn/Makefile63
-rw-r--r--keyboards/planck/keymaps/espynn/keyboard-layout.jpgbin0 -> 52908 bytes
-rw-r--r--keyboards/planck/keymaps/espynn/keymap.c151
-rw-r--r--keyboards/planck/keymaps/espynn/layout.json271
-rw-r--r--keyboards/planck/keymaps/espynn/readme.md18
-rw-r--r--keyboards/planck/keymaps/luke/Makefile25
-rw-r--r--keyboards/planck/keymaps/luke/keymap.c355
-rw-r--r--keyboards/planck/keymaps/luke/readme.md2
-rw-r--r--keyboards/planck/keymaps/smt/Makefile3
-rw-r--r--keyboards/planck/keymaps/smt/keymap.c229
-rw-r--r--keyboards/planck/keymaps/smt/readme.md103
-rw-r--r--keyboards/planck/keymaps/yale/Makefile25
-rw-r--r--keyboards/planck/keymaps/yale/config.h11
-rw-r--r--keyboards/planck/keymaps/yale/keymap.c108
-rw-r--r--keyboards/planck/keymaps/yale/yale_layout_picture.jpgbin0 -> 58141 bytes
-rw-r--r--keyboards/preonic/keymaps/default/keymap.c15
-rw-r--r--keyboards/preonic/keymaps/smt/Makefile3
-rw-r--r--keyboards/preonic/keymaps/smt/keymap.c247
-rw-r--r--keyboards/preonic/keymaps/smt/readme.md113
-rw-r--r--keyboards/readme.md1
-rw-r--r--keyboards/s60-x/readme.md2
-rw-r--r--keyboards/tv44/keymaps/smt/Makefile21
-rw-r--r--keyboards/tv44/keymaps/smt/config.h36
-rw-r--r--keyboards/tv44/keymaps/smt/keyboard-layout-minivan.pngbin0 -> 66567 bytes
-rw-r--r--keyboards/tv44/keymaps/smt/keymap.c232
-rw-r--r--keyboards/tv44/keymaps/smt/readme.md126
-rw-r--r--quantum/config_common.h6
-rw-r--r--quantum/keymap_common.c7
-rw-r--r--quantum/keymap_extras/keymap_br_abnt2.h16
-rwxr-xr-xquantum/light_ws2812.c6
-rw-r--r--quantum/matrix.c14
-rw-r--r--quantum/process_keycode/process_combo.c134
-rw-r--r--quantum/process_keycode/process_combo.h43
-rw-r--r--quantum/process_keycode/process_tap_dance.c7
-rw-r--r--quantum/process_keycode/process_tap_dance.h1
-rw-r--r--quantum/process_keycode/process_unicode.c13
-rw-r--r--quantum/quantum.c167
-rw-r--r--quantum/quantum.h5
-rw-r--r--quantum/quantum_keycodes.h43
-rw-r--r--quantum/rgblight.c35
-rw-r--r--quantum/rgblight.h11
-rw-r--r--quantum/template/config.h2
-rw-r--r--quantum/visualizer/visualizer.c58
-rw-r--r--quantum/visualizer/visualizer.h9
-rw-r--r--readme.md6
-rw-r--r--tmk_core/common/action.c16
-rw-r--r--tmk_core/common/action_code.h10
-rw-r--r--tmk_core/common/action_macro.h26
-rw-r--r--tmk_core/common/keyboard.c3
-rw-r--r--tmk_core/common/matrix.h2
-rw-r--r--tmk_core/common/report.h7
-rw-r--r--tmk_core/protocol/lufa.mk3
-rw-r--r--tmk_core/protocol/lufa/lufa.c116
-rw-r--r--tmk_core/protocol/lufa/outputselect.c56
-rw-r--r--tmk_core/protocol/lufa/outputselect.h (renamed from keyboards/kc60/led.c)42
-rw-r--r--tmk_core/protocol/ps2_mouse.h5
-rw-r--r--tmk_core/protocol/vusb/vusb.c4
-rw-r--r--util/travis_build.sh22
-rw-r--r--util/travis_compiled_push.sh64
157 files changed, 6390 insertions, 914 deletions
diff --git a/.travis.yml b/.travis.yml
index b206d1451..6c26e4112 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,12 +5,10 @@ language: c
5branches: 5branches:
6 except: 6 except:
7 - /^.*-automated-build$/ 7 - /^.*-automated-build$/
8 - /^[0-9]+\.[0-9]+\.[0-9]+/
8env: 9env:
9 global: 10 global:
10 - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= 11 - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
11 matrix:
12 - TARGET=all-keyboards AUTOGEN=true
13 - TARGET=test AUTOGEN=false
14before_install: 12before_install:
15 - wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz 13 - wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
16install: 14install:
@@ -19,7 +17,8 @@ install:
19before_script: 17before_script:
20 - avr-gcc --version 18 - avr-gcc --version
21script: 19script:
22- make $TARGET AUTOGEN=$AUTOGEN 20- make test AUTOGEN=false
21- bash util/travis_build.sh
23addons: 22addons:
24 apt: 23 apt:
25 packages: 24 packages:
@@ -30,6 +29,11 @@ addons:
30 - libnewlib-arm-none-eabi 29 - libnewlib-arm-none-eabi
31 - diffutils 30 - diffutils
32after_success: 31after_success:
33 if [ "$AUTOGEN" == "true" ]; then 32 bash util/travis_compiled_push.sh
34 bash util/travis_compiled_push.sh; 33notifications:
35 fi 34 webhooks:
35 urls:
36 - https://webhooks.gitter.im/e/cca31de3d44b9adb617b
37 on_success: change # options: [always|never|change] default: always
38 on_failure: always # options: [always|never|change] default: always
39 on_start: never # options: [always|never|change] default: always \ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index c42bbeb32..744ded857 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -25,4 +25,5 @@ ENV subproject=ez
25ENV keymap=default 25ENV keymap=default
26 26
27VOLUME /qmk 27VOLUME /qmk
28WORKDIR /qmk \ No newline at end of file 28WORKDIR /qmk
29CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap}
diff --git a/Makefile b/Makefile
index 9cc77c55c..9d9c9629d 100644
--- a/Makefile
+++ b/Makefile
@@ -16,10 +16,10 @@ ifdef SILENT
16endif 16endif
17 17
18# We need to make sure that silent is always turned off at the top level 18# We need to make sure that silent is always turned off at the top level
19# Otherwise the [OK], [ERROR] and [WARN] messags won't be displayed correctly 19# Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly
20override SILENT := false 20override SILENT := false
21 21
22ON_ERROR := error_occured=1 22ON_ERROR := error_occurred=1
23 23
24STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST)) 24STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST))
25ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST)) 25ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST))
@@ -34,13 +34,13 @@ ABS_ROOT_DIR := $(dir $(ABS_ROOT_MAKEFILE))
34STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR)) 34STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR))
35BUILD_DIR := $(ROOT_DIR)/.build 35BUILD_DIR := $(ROOT_DIR)/.build
36TEST_DIR := $(BUILD_DIR)/test 36TEST_DIR := $(BUILD_DIR)/test
37ERROR_FILE := $(BUILD_DIR)/error_occured 37ERROR_FILE := $(BUILD_DIR)/error_occurred
38 38
39MAKEFILE_INCLUDED=yes 39MAKEFILE_INCLUDED=yes
40 40
41# Helper function to process the newt element of a space separated path 41# Helper function to process the newt element of a space separated path
42# It works a bit like the traditional functional head tail 42# It works a bit like the traditional functional head tail
43# so the CURRENT_PATH_ELEMENT will beome the new head 43# so the CURRENT_PATH_ELEMENT will become the new head
44# and the PATH_ELEMENTS are the rest that are still unprocessed 44# and the PATH_ELEMENTS are the rest that are still unprocessed
45define NEXT_PATH_ELEMENT 45define NEXT_PATH_ELEMENT
46 $$(eval CURRENT_PATH_ELEMENT := $$(firstword $$(PATH_ELEMENTS))) 46 $$(eval CURRENT_PATH_ELEMENT := $$(firstword $$(PATH_ELEMENTS)))
@@ -84,7 +84,7 @@ endif
84# Only consider folders with makefiles, to prevent errors in case there are extra folders 84# Only consider folders with makefiles, to prevent errors in case there are extra folders
85KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile))) 85KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile)))
86 86
87#Compability with the old make variables, anything you specify directly on the command line 87#Compatibility with the old make variables, anything you specify directly on the command line
88# always overrides the detected folders 88# always overrides the detected folders
89ifdef keyboard 89ifdef keyboard
90 KEYBOARD := $(keyboard) 90 KEYBOARD := $(keyboard)
@@ -106,7 +106,7 @@ endif
106#$(info Keyboards: $(KEYBOARDS)) 106#$(info Keyboards: $(KEYBOARDS))
107 107
108 108
109# Set the default goal depening on where we are running make from 109# Set the default goal depending on where we are running make from
110# this handles the case where you run make without any arguments 110# this handles the case where you run make without any arguments
111.DEFAULT_GOAL := all 111.DEFAULT_GOAL := all
112ifneq ($(KEYMAP),) 112ifneq ($(KEYMAP),)
@@ -170,7 +170,7 @@ define TRY_TO_MATCH_RULE_FROM_LIST_HELPER3
170endef 170endef
171 171
172# A recursive helper function for finding the longest match 172# A recursive helper function for finding the longest match
173# $1 The list to be checed 173# $1 The list to be checked
174# It works by always removing the currently matched item from the list 174# It works by always removing the currently matched item from the list
175# and call itself recursively, until a match is found 175# and call itself recursively, until a match is found
176define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2 176define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2
@@ -180,7 +180,7 @@ define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2
180 $$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER3,$1)) 180 $$(eval $$(call TRY_TO_MATCH_RULE_FROM_LIST_HELPER3,$1))
181 # If a match is found in the current list, otherwise just return what we had before 181 # If a match is found in the current list, otherwise just return what we had before
182 ifeq ($$(RULE_FOUND),true) 182 ifeq ($$(RULE_FOUND),true)
183 # Save the best match so far and call itself recursivel 183 # Save the best match so far and call itself recursively
184 BEST_MATCH := $$(MATCHED_ITEM) 184 BEST_MATCH := $$(MATCHED_ITEM)
185 BEST_MATCH_RULE := $$(RULE) 185 BEST_MATCH_RULE := $$(RULE)
186 RULE_FOUND := false 186 RULE_FOUND := false
@@ -337,7 +337,7 @@ define PARSE_SUBPROJECT
337 $$(eval $$(call PARSE_ALL_KEYMAPS)) 337 $$(eval $$(call PARSE_ALL_KEYMAPS))
338 endif 338 endif
339 else 339 else
340 # As earlier mentione,d when allsb is specified, we call our self recursively 340 # As earlier mentioned when allsb is specified, we call our self recursively
341 # for all of the subprojects 341 # for all of the subprojects
342 $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$(SUBPROJECTS))) 342 $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$(SUBPROJECTS)))
343 endif 343 endif
@@ -403,11 +403,11 @@ define BUILD
403 printf "$$(MAKE_MSG)\n\n"; \ 403 printf "$$(MAKE_MSG)\n\n"; \
404 $$(MAKE_CMD) $$(MAKE_VARS) SILENT=false; \ 404 $$(MAKE_CMD) $$(MAKE_VARS) SILENT=false; \
405 if [ $$$$? -gt 0 ]; \ 405 if [ $$$$? -gt 0 ]; \
406 then error_occured=1; \ 406 then error_occurred=1; \
407 fi; 407 fi;
408endef 408endef
409 409
410# Just parse all the keymaps for a specifc keyboard 410# Just parse all the keymaps for a specific keyboard
411define PARSE_ALL_KEYMAPS 411define PARSE_ALL_KEYMAPS
412 $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYMAP,$$(KEYMAPS))) 412 $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYMAP,$$(KEYMAPS)))
413endef 413endef
@@ -428,7 +428,7 @@ define BUILD_TEST
428 printf "$$(TEST_MSG)\n"; \ 428 printf "$$(TEST_MSG)\n"; \
429 $$(TEST_EXECUTABLE); \ 429 $$(TEST_EXECUTABLE); \
430 if [ $$$$? -gt 0 ]; \ 430 if [ $$$$? -gt 0 ]; \
431 then error_occured=1; \ 431 then error_occurred=1; \
432 fi; \ 432 fi; \
433 printf "\n"; 433 printf "\n";
434 endif 434 endif
@@ -448,7 +448,7 @@ endef
448 448
449 449
450# Set the silent mode depending on if we are trying to compile multiple keyboards or not 450# Set the silent mode depending on if we are trying to compile multiple keyboards or not
451# By default it's on in that case, but it can be overriden by specifying silent=false 451# By default it's on in that case, but it can be overridden by specifying silent=false
452# from the command line 452# from the command line
453define SET_SILENT_MODE 453define SET_SILENT_MODE
454 ifdef SUB_IS_SILENT 454 ifdef SUB_IS_SILENT
@@ -465,16 +465,16 @@ include $(ROOT_DIR)/message.mk
465# The empty line is important here, as it will force a new shell to be created for each command 465# The empty line is important here, as it will force a new shell to be created for each command
466# Otherwise the command line will become too long with a lot of keyboards and keymaps 466# Otherwise the command line will become too long with a lot of keyboards and keymaps
467define RUN_COMMAND 467define RUN_COMMAND
468+error_occured=0;\ 468+error_occurred=0;\
469$(COMMAND_$(SILENT_MODE)_$(COMMAND))\ 469$(COMMAND_$(SILENT_MODE)_$(COMMAND))\
470if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; 470if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi;
471 471
472 472
473endef 473endef
474define RUN_TEST 474define RUN_TEST
475+error_occured=0;\ 475+error_occurred=0;\
476$($(TEST)_COMMAND)\ 476$($(TEST)_COMMAND)\
477if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; 477if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi;
478 478
479endef 479endef
480 480
@@ -487,7 +487,7 @@ $(SUBPROJECTS): %: %-allkm
487.PHONY: % 487.PHONY: %
488%: 488%:
489 # Check if we have the CMP tool installed 489 # Check if we have the CMP tool installed
490 cmp --version >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; 490 cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
491 # Check if the submodules are dirty, and display a warning if they are 491 # Check if the submodules are dirty, and display a warning if they are
492ifndef SKIP_GIT 492ifndef SKIP_GIT
493 git submodule status --recursive 2>/dev/null | \ 493 git submodule status --recursive 2>/dev/null | \
@@ -514,7 +514,7 @@ endif
514.PHONY: all 514.PHONY: all
515all: all-keyboards test-all 515all: all-keyboards test-all
516 516
517# Define some shortcuts, mostly for compability with the old syntax 517# Define some shortcuts, mostly for compatibility with the old syntax
518.PHONY: all-keyboards 518.PHONY: all-keyboards
519all-keyboards: allkb-allsp-allkm 519all-keyboards: allkb-allsp-allkm
520 520
@@ -537,4 +537,4 @@ BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
537$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) 537$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
538$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) 538$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
539 539
540include $(ROOT_DIR)/testlist.mk \ No newline at end of file 540include $(ROOT_DIR)/testlist.mk
diff --git a/build_keyboard.mk b/build_keyboard.mk
index b85557d4a..2c64e93a2 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -144,6 +144,11 @@ ifeq ($(strip $(MIDI_ENABLE)), yes)
144 SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c 144 SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
145endif 145endif
146 146
147ifeq ($(strip $(COMBO_ENABLE)), yes)
148 OPT_DEFS += -DCOMBO_ENABLE
149 SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
150endif
151
147ifeq ($(strip $(VIRTSER_ENABLE)), yes) 152ifeq ($(strip $(VIRTSER_ENABLE)), yes)
148 OPT_DEFS += -DVIRTSER_ENABLE 153 OPT_DEFS += -DVIRTSER_ENABLE
149endif 154endif
diff --git a/doc/BUILD_GUIDE.md b/doc/BUILD_GUIDE.md
index 70a4e10fa..175019183 100644
--- a/doc/BUILD_GUIDE.md
+++ b/doc/BUILD_GUIDE.md
@@ -6,7 +6,7 @@
61. If you have ever installed WinAVR, uninstall it. 61. If you have ever installed WinAVR, uninstall it.
72. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. 72. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
83. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. 83. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
94. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. 94. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
105. Double-click on the 1-setup-path-win batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. 105. Double-click on the 1-setup-path-win batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
116. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! 116. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
127. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell". 127. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell".
@@ -38,7 +38,7 @@ Debian/Ubuntu example:
38If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md). 38If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md).
39 39
40## Verify Your Installation 40## Verify Your Installation
411. If you haven't already, obtain this repository ([https://github.com/jackhumbert/qmk_firmware](https://github.com/jackhumbert/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. 411. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application.
422. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead. 422. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead.
433. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`. 433. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`.
444. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below. 444. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below.
diff --git a/doc/CYGWIN_GUIDE.md b/doc/CYGWIN_GUIDE.md
index 05e7a55f7..05d71961a 100755
--- a/doc/CYGWIN_GUIDE.md
+++ b/doc/CYGWIN_GUIDE.md
@@ -234,7 +234,7 @@ If you did everything else right. This part should be a snap! Grab the latest so
234###Build Planck and Load the Firmware 234###Build Planck and Load the Firmware
235``` 235```
236$ cd ~/src 236$ cd ~/src
237$ git clone https://github.com/jackhumbert/qmk_firmware.git 237$ git clone https://github.com/qmk/qmk_firmware.git
238$ cd qmk_firmware/keyboards/planck 238$ cd qmk_firmware/keyboards/planck
239$ make 239$ make
240``` 240```
diff --git a/doc/HAND_WIRE.md b/doc/HAND_WIRE.md
index 18cb7011f..17ef3116f 100644
--- a/doc/HAND_WIRE.md
+++ b/doc/HAND_WIRE.md
@@ -183,7 +183,7 @@ As you move along, be sure that the Teensy is staying in place - recutting and s
183 183
184From here, you should have a working keyboard with the correct firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch. 184From here, you should have a working keyboard with the correct firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
185 185
186To start out, download [the firmware](https://github.com/jackhumbert/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/). 186To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/).
187 187
188The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder: 188The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder:
189 189
@@ -276,7 +276,7 @@ This can be accomplished by using the following `keymaps` definition:
276 ), 276 ),
277 }; 277 };
278 278
279Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file. 279Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file.
280 280
281It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring. 281It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.
282 282
@@ -306,7 +306,7 @@ If you've done all of these things, keep in mind that sometimes you might have h
306 306
307Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out. 307Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
308 308
309There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/jackhumbert/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) 309There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/qmk/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
310 310
311## Trouble-shooting compiling 311## Trouble-shooting compiling
312 312
diff --git a/doc/PCB_GUIDE.md b/doc/PCB_GUIDE.md
index 3fad41dfb..16de71114 100644
--- a/doc/PCB_GUIDE.md
+++ b/doc/PCB_GUIDE.md
@@ -5,7 +5,7 @@
5### Windows 5### Windows
61. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. 61. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
72. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. 72. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
83. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. 83. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
94. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. 94. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
105. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! 105. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
11 11
@@ -32,7 +32,7 @@ Note that, since it will be directly accessing USB hardware, the
32`dfu-programmer` program needs to be run as root. 32`dfu-programmer` program needs to be run as root.
33 33
34## Verify Your Installation 34## Verify Your Installation
351. Clone the following repository: https://github.com/jackhumbert/qmk_firmware 351. Clone the following repository: https://github.com/qmk/qmk_firmware
362. Open a Terminal and `cd` into `qmk_firmware/keyboards/planck` 362. Open a Terminal and `cd` into `qmk_firmware/keyboards/planck`
373. Run `make`. This should output a lot of information about the build process. 373. Run `make`. This should output a lot of information about the build process.
38 38
@@ -80,7 +80,7 @@ when trying to 'make dfu' on Windows you need to copy the dfu-programmer.exe to
80 80
81### Keymap 81### Keymap
82 82
83Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/jackhumbert/qmk_firmware/blob/master/quantum/keymap_common.h). 83Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/qmk/qmk_firmware/blob/master/quantum/keymap_common.h).
84 84
85You can use modifiers with keycodes like this: 85You can use modifiers with keycodes like this:
86 86
diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md
index 8baa581f0..476d1bce3 100644
--- a/keyboards/atreus/readme.md
+++ b/keyboards/atreus/readme.md
@@ -88,7 +88,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac
88 88
89### Remember: These are just aliases 89### Remember: These are just aliases
90 90
91These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). 91These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action).
92 92
93Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. 93Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them.
94 94
diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md
index 04ab070be..7bb5da9fc 100644
--- a/keyboards/atreus62/keymaps/mneme/README.md
+++ b/keyboards/atreus62/keymaps/mneme/README.md
@@ -1,6 +1,6 @@
1<!-- -*- mode: markdown; fill-column: 8192 -*- --> 1<!-- -*- mode: markdown; fill-column: 8192 -*- -->
2 2
3Mnemes Swedish Bonaza 3Mnemes Swedish Bonanza
4======================= 4=======================
5 5
6My Layout in process, most of the code is shamelessly stolen from [algernons][algernon] excellent layout 6My Layout in process, most of the code is shamelessly stolen from [algernons][algernon] excellent layout
@@ -33,6 +33,8 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym
33 - `LEAD s l` : `λ`. 33 - `LEAD s l` : `λ`.
34 - `LEAD s s` : `¯\_(ツ)_/¯` 34 - `LEAD s s` : `¯\_(ツ)_/¯`
35 - `LEAD s f` : `凸(ツ)凸` 35 - `LEAD s f` : `凸(ツ)凸`
36 - `LEAD u l` : Set unicode input mode to linux.
37 - `LEAD s w` : Set unicode input mode to windows.
36 - `LEAD a *` : Application switching based on position in start menu. Very specific to my computer. 38 - `LEAD a *` : Application switching based on position in start menu. Very specific to my computer.
37 39
38 40
@@ -42,7 +44,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym
42 44
43Basic navigation on the right hand and modifiers close 45Basic navigation on the right hand and modifiers close
44by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. 46by for the left. The latter because I tend to use `ctrl+arrows` quite a lot.
45 47
46## Sym layer 48## Sym layer
47 49
48![Sym layer](img/sym.png) 50![Sym layer](img/sym.png)
diff --git a/keyboards/atreus62/keymaps/mneme/config.h b/keyboards/atreus62/keymaps/mneme/config.h
index 2c2a08c05..73eb0fa33 100644
--- a/keyboards/atreus62/keymaps/mneme/config.h
+++ b/keyboards/atreus62/keymaps/mneme/config.h
@@ -1,7 +1,7 @@
1#define ONESHOT_TIMEOUT 3000 1#define ONESHOT_TIMEOUT 3000
2#define TAPPING_TERM 200 2#define TAPPING_TERM 200
3#define PREVENT_STUCK_MODIFIERS 3#define PREVENT_STUCK_MODIFIERS
4 4#define FORCE_NKRO
5#define LEADER_TIMEOUT 1000 5#define LEADER_TIMEOUT 1000
6 6
7#include "../../config.h" 7#include "../../config.h"
diff --git a/keyboards/atreus62/keymaps/mneme/img/base.png b/keyboards/atreus62/keymaps/mneme/img/base.png
index 86907d544..3e77a5183 100644
--- a/keyboards/atreus62/keymaps/mneme/img/base.png
+++ b/keyboards/atreus62/keymaps/mneme/img/base.png
Binary files differ
diff --git a/keyboards/atreus62/keymaps/mneme/img/fun.png b/keyboards/atreus62/keymaps/mneme/img/fun.png
index ec5a478c6..961a19724 100644
--- a/keyboards/atreus62/keymaps/mneme/img/fun.png
+++ b/keyboards/atreus62/keymaps/mneme/img/fun.png
Binary files differ
diff --git a/keyboards/atreus62/keymaps/mneme/img/sym.png b/keyboards/atreus62/keymaps/mneme/img/sym.png
index 11b5bd4b0..5e2c80335 100644
--- a/keyboards/atreus62/keymaps/mneme/img/sym.png
+++ b/keyboards/atreus62/keymaps/mneme/img/sym.png
Binary files differ
diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c
index 7c1879982..2627e024f 100644
--- a/keyboards/atreus62/keymaps/mneme/keymap.c
+++ b/keyboards/atreus62/keymaps/mneme/keymap.c
@@ -7,43 +7,47 @@
7/* 7/*
8 *WINDOWS SWEDISH 8 *WINDOWS SWEDISH
9 */ 9 */
10#define KN_HALF KC_GRV // 1/2 10 /*
11#define KN_PLUS KC_MINS // + 11 *WINDOWS SWEDISH
12#define KN_ACUT KC_EQL // ´ 12 */
13#define KN_AO KC_LBRC // Å 13 #define KN_HALF KC_GRV // 1/2
14#define KN_UMLA KC_RBRC // ¨ 14 #define KN_PLUS KC_MINS // +
15#define KN_OE KC_SCLN // Ö 15 #define KN_ACUT KC_EQL // ´
16#define KN_AE KC_QUOT // Ä 16 #define KN_AO KC_LBRC // Å
17#define KN_QUOT KC_NUHS // ' 17 #define KN_UMLA KC_RBRC // ¨
18#define KN_LABK KC_NUBS // < 18 #define KN_OE KC_SCLN // Ö
19#define KN_MINS KC_SLSH // - 19 #define KN_AE KC_QUOT // Ä
20#define KN_EXLM LSFT(KC_1) // ! 20 #define KN_QUOT KC_NUHS // '
21#define KN_DQT LSFT(KC_2) // " 21 #define KN_LABK KC_NUBS // <
22#define KN_AT RALT(KC_2) // @ 22 #define KN_MINS KC_SLSH // -
23#define KN_HASH LSFT(KC_3) // # 23 #define KN_EXLM LSFT(KC_1) // !
24#define KN_DLR RALT(KC_4) // $ 24 #define KN_DQT LSFT(KC_2) // "
25#define KN_PERC LSFT(KC_5) // % 25 #define KN_AT RALT(KC_2) // @
26#define KN_AMPR LSFT(KC_6) // & 26 #define KN_HASH LSFT(KC_3) // #
27#define KN_SLSH LSFT(KC_7) // / 27 #define KN_EUR LSFT(KC_4) // €
28#define KN_LPRN LSFT(KC_8) // ( 28 #define KN_DLR RALT(KC_4) // $
29#define KN_RPRN LSFT(KC_9) // ) 29 #define KN_PERC LSFT(KC_5) // %
30#define KN_EQL LSFT(KC_0) // = 30 #define KN_AMPR LSFT(KC_6) // &
31#define KN_UNDS LSFT(KN_MINS) // _ 31 #define KN_SLSH LSFT(KC_7) // /
32#define KN_QUES LSFT(KN_PLUS) // ? 32 #define KN_LPRN LSFT(KC_8) // (
33#define KN_GRAV LSFT(KN_ACUT) // ` 33 #define KN_RPRN LSFT(KC_9) // )
34#define KN_LCBR RALT(KC_7) // { 34 #define KN_EQL LSFT(KC_0) // =
35#define KN_RCBR RALT(KC_0) // } 35 #define KN_UNDS LSFT(KN_MINS) // _
36#define KN_LBRC RALT(KC_8) // [ 36 #define KN_QUES LSFT(KN_PLUS) // ?
37#define KN_RBRC RALT(KC_9) // ] 37 #define KN_GRAV LSFT(KN_ACUT) // `
38#define KN_RABK LSFT(KN_LABK) // < 38 #define KN_LCBR RALT(KC_7) // {
39#define KN_COLN LSFT(KC_DOT) // : 39 #define KN_RCBR RALT(KC_0) // }
40#define KN_SCLN LSFT(KC_COMM) // : 40 #define KN_LBRC RALT(KC_8) // [
41#define KN_PIPE RALT(KN_LABK) // | 41 #define KN_RBRC RALT(KC_9) // ]
42#define KN_QUES LSFT(KN_PLUS) // ? 42 #define KN_RABK LSFT(KN_LABK) // <
43#define KN_CIRC LSFT(KN_UMLA) // ^ 43 #define KN_COLN LSFT(KC_DOT) // :
44#define KN_ASTR LSFT(KN_QUOT) // * 44 #define KN_SCLN LSFT(KC_COMM) // :
45#define KN_TILD RALT(KN_UMLA) // ~ 45 #define KN_PIPE RALT(KN_LABK) // |
46#define KN_BSLS RALT(KN_PLUS) // 46 #define KN_QUES LSFT(KN_PLUS) // ?
47 #define KN_CIRC LSFT(KN_UMLA) // ^
48 #define KN_ASTR LSFT(KN_QUOT) // *
49 #define KN_TILD RALT(KN_UMLA) // ~
50 #define KN_BSLS RALT(KN_PLUS) //
47 51
48#define OSM_LCTL OSM(MOD_LCTL) 52#define OSM_LCTL OSM(MOD_LCTL)
49#define OSM_LALT OSM(MOD_LALT) 53#define OSM_LALT OSM(MOD_LALT)
@@ -85,32 +89,26 @@ enum {
85 TD_EQ 89 TD_EQ
86}; 90};
87 91
88//Custom keycodes
89enum {
90 PLACEHOLDER = SAFE_RANGE
91};
92
93//State and timers 92//State and timers
94uint16_t kf_timers[12]; 93uint16_t kf_timers[12];
95 94
96 95
97
98const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 96const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
99 97
100 [BASE] = { 98 [BASE] = {
101 99
102 { M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) }, 100 { M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) },
103 { KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO }, 101 { KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO },
104 { OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE }, 102 { OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE },
105 { OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT }, 103 { OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT },
106 { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,KC_SPC ,LT(SYM,KC_BSPC) ,KC_HYP ,LT(SYM,KC_ENT) ,KC_SPC ,KC_LEAD ,KC_LALT ,KC_LCTRL ,MO(NAV) } 104 { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,MO(SYM) ,KC_BSPC ,KC_ENT ,KC_SPC ,MO(SYM) ,KC_LEAD ,KC_LALT ,KC_LCTRL ,KC_HYP }
107 105
108 }, 106 },
109 [NAV] = { 107 [NAV] = {
110 108
111 { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, 109 { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS },
112 { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS }, 110 { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_NO ,KC_HOME ,KC_PGDN ,KC_PGUP ,KC_END ,KC_TRNS ,KC_TRNS },
113 { KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_L ,KC_TRNS ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, 111 { KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_L ,KC_TRNS ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT ,KC_TRNS ,KC_TRNS },
114 { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, 112 { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,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 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } 113 { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU }
116 114
@@ -119,8 +117,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
119 117
120 { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,TD(TD_EQ) ,KC_NO ,TD(TD_FUN) ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, 118 { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,TD(TD_EQ) ,KC_NO ,TD(TD_FUN) ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS },
121 { KC_TRNS ,KN_LABK ,KN_RABK ,KN_LCBR ,KN_RCBR ,KN_PLUS ,KC_NO ,KN_AT ,KN_DQT ,KN_QUOT ,KN_GRAV ,KN_SLSH ,KC_TRNS }, 119 { KC_TRNS ,KN_LABK ,KN_RABK ,KN_LCBR ,KN_RCBR ,KN_PLUS ,KC_NO ,KN_AT ,KN_DQT ,KN_QUOT ,KN_GRAV ,KN_SLSH ,KC_TRNS },
122 { KC_TRNS ,KN_EXLM ,KN_EQL ,KN_LPRN ,KN_RPRN ,KN_MINS ,KC_NO ,KN_UNDS ,KN_SCLN ,KN_COLN ,KN_AMPR ,KN_PIPE ,KC_TRNS }, 120 { KC_TRNS ,KN_EXLM ,KN_EQL ,KN_LPRN ,KN_RPRN ,KN_MINS ,KC_NO ,KN_UNDS ,KN_CIRC ,KN_DLR ,KN_AMPR ,KN_PIPE ,KC_TRNS },
123 { KC_TRNS ,KN_DLR ,KN_PERC ,KN_LBRC ,KN_RBRC ,KN_ASTR ,KC_TRNS ,KN_HASH ,KC_COMM ,KC_DOT ,KN_QUES ,KN_BSLS ,KC_TRNS }, 121 { KC_TRNS ,KN_EUR ,KN_PERC ,KN_LBRC ,KN_RBRC ,KN_ASTR ,KC_TRNS ,KN_HASH ,KN_SCLN ,KN_COLN ,KN_QUES ,KN_BSLS ,KC_TRNS },
124 { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS } 122 { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }
125 123
126 } 124 }
@@ -302,6 +300,15 @@ void matrix_scan_user(void) {
302 register_code (KC_LGUI); TAP_ONCE (KC_7); unregister_code (KC_LGUI); 300 register_code (KC_LGUI); TAP_ONCE (KC_7); unregister_code (KC_LGUI);
303 } 301 }
304 302
303 SEQ_TWO_KEYS (KC_U, KC_L) {
304 set_unicode_input_mode(UC_LNX);
305 }
306
307
308 SEQ_TWO_KEYS (KC_U, KC_W) {
309 set_unicode_input_mode(UC_WINC);
310 }
311
305 312
306 SEQ_TWO_KEYS (KC_S, KC_S) { 313 SEQ_TWO_KEYS (KC_S, KC_S) {
307 // ¯\_(ツ)_/¯ 314 // ¯\_(ツ)_/¯
diff --git a/keyboards/ergodox/keymaps/ab/readme.md b/keyboards/ergodox/keymaps/ab/readme.md
index 6b1ac2be3..4ad80efe6 100644
--- a/keyboards/ergodox/keymaps/ab/readme.md
+++ b/keyboards/ergodox/keymaps/ab/readme.md
@@ -8,7 +8,7 @@ Beginner's keymap emulates standard QWERTY keyboard for beginners. Once you get
8* Easy on beginners. It has everything you need for your day to day usage. 8* Easy on beginners. It has everything you need for your day to day usage.
9 9
10#### Cons 10#### Cons
11* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/jackhumbert/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md) 11* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox/keymaps/default/readme.md)
12* While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys. 12* While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys.
13 13
14#### Notes 14#### Notes
diff --git a/keyboards/ergodox/keymaps/albert/Makefile b/keyboards/ergodox/keymaps/albert/Makefile
new file mode 100644
index 000000000..eb8544afe
--- /dev/null
+++ b/keyboards/ergodox/keymaps/albert/Makefile
@@ -0,0 +1,5 @@
1COMMAND_ENABLE = no # Commands for debug and configuration
2
3ifndef QUANTUM_DIR
4 include ../../../../Makefile
5endif
diff --git a/keyboards/ergodox/keymaps/albert/config.h b/keyboards/ergodox/keymaps/albert/config.h
new file mode 100644
index 000000000..e6d363117
--- /dev/null
+++ b/keyboards/ergodox/keymaps/albert/config.h
@@ -0,0 +1,12 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/* using UK layout for space-cadet-shift */
7#define LSPO_KEY KC_9
8#define RSPC_KEY KC_0
9
10#define LEADER_TIMEOUT 800 // leader key sequence timeout in millis
11
12#endif
diff --git a/keyboards/ergodox/keymaps/albert/keymap.c b/keyboards/ergodox/keymaps/albert/keymap.c
new file mode 100644
index 000000000..dfbb311bd
--- /dev/null
+++ b/keyboards/ergodox/keymaps/albert/keymap.c
@@ -0,0 +1,661 @@
1#include "ergodox.h"
2#include "debug.h"
3#include "action_layer.h"
4#include "version.h"
5
6#include <stdarg.h>
7
8/* use UK keymap */
9
10#define UK_HASH KC_NONUS_HASH
11#define UK_BSLS KC_NONUS_BSLASH
12#define UK_PIPE LSFT(UK_BSLS)
13
14#define BASE 0 // default layer
15#define SYMB 1 // symbols
16#define NUMB 2 // numbers and hex
17#define CRSR 3 // cursor keys
18#define MOUS 4 // mouse keys
19#define KEYW 5 // keyword macros
20#define EMAC 6 // emacs
21
22// my macros
23#define UM_ECET M(0) // { }
24#define UM_0x M(1)
25#define UM_PUB M(2)
26#define UM_PRO M(3)
27#define UM_PRV M(4)
28#define UM_CLS M(5)
29#define UM_STR M(6)
30#define UM_RET M(7)
31#define UM_INC M(8)
32#define UM_OBJ M(9)
33#define UM_GITLOG M(10)
34#define UM_GOODM M(11)
35#define UM_NAMESP M(12)
36#define UM_EMTR M(14) // emacs toggle read-only
37#define UM_EMWR M(15) // emacs write buffer (save)
38#define UM_EMUN M(16) // emacs undo
39#define UM_EMRE M(17) // emacs redo
40#define UM_EMPB M(18) // emacs previous buffer
41#define UM_EMNB M(19) // emacs next buffer
42#define UM_GOODN M(20)
43#define UM_ECETS M(22) // { };
44#define UM_TMPL M(23)
45#define UM_TYPN M(24)
46#define UM_CONT M(25)
47#define UM_BREAK M(26)
48#define UM_CONST M(27)
49#define UM_SMILY M(28)
50#define UM_SADF M(29)
51#define UM_SCARF M(30)
52#define UM_DECAF M(31)
53#define UM_OPER M(32)
54#define UM_NULP M(33)
55#define UM_EXTR M(34)
56#define UM_VIRT M(35)
57#define UM_EMFB M(36) // emacs font bigger
58#define UM_EMFS M(37) // emacs font smaller
59#define UM_VOLAT M(38)
60
61const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
62/* Keymap 0: Base layer
63 *
64 * ,--------------------------------------------------. ,--------------------------------------------------.
65 * | ESC | 1 | 2 | 3 | 4 | 5 | SfLt | | SfRt | 6 | 7 | 8 | 9 | 0 | BkSp |
66 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
67 * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Del |
68 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
69 * | Caps/L2| A | S | D | F | G |------| |------| H | J | K | L | ; |Enter/L2|
70 * |--------+------+------+------+------+------| L6 | | L6 |------+------+------+------+------+--------|
71 * | LSft/( | Z | X | C | V/L3 | B/L4 | | | | N/L4 | M/L3 | , | . | / | RSft/) |
72 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
73 * |Ctrl/[| Alt/]| # | Left |Right | | Up | Down | - | Alt/[|Ctrl/]|
74 * `----------------------------------' `----------------------------------'
75 * ,-------------. ,-------------.
76 * | L2 | lead | | lead | Ins |
77 * ,------|------|------| |------+------+------.
78 * | Space| BkSp | Home | | PgUp | Enter|Space |
79 * | / | / |------| |------| / | / |
80 * | Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl |
81 * `--------------------' `--------------------'
82 */
83[BASE] = KEYMAP( // layer 0 : default
84 // left hand
85 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_LEFT),
86 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB),
87 LT(NUMB, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G,
88 KC_LSPO, KC_Z, KC_X, KC_C, LT(CRSR, KC_V), LT(MOUS, KC_B), MO(EMAC),
89 CTL_T(KC_LBRC), ALT_T(KC_RBRC), UK_HASH, KC_LEFT, KC_RGHT,
90 TG(NUMB), KC_LEAD,
91 KC_HOME,
92 CTL_T(KC_SPC), ALT_T(KC_BSPC), LT(KEYW, KC_END),
93 // right hand
94 LSFT(KC_RGHT), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
95 MO(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DELT,
96 KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(NUMB, KC_ENT),
97 MO(EMAC), LT(MOUS, KC_N), LT(CRSR, KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
98 KC_UP, KC_DOWN, KC_MINS, ALT_T(KC_LBRC), CTL_T(KC_RBRC),
99 KC_LEAD, KC_INS,
100 KC_PGUP,
101 LT(KEYW, KC_PGDN), ALT_T(KC_ENT), CTL_T(KC_SPC)
102 ),
103/* Keymap 1: Symbol Layer with F keys
104 *
105 * ,--------------------------------------------------. ,--------------------------------------------------.
106 * | ## | F1 | F2 | F3 | F4 | F5 | ## | | ## | F6 | F7 | F8 | F9 | F10 | F11 |
107 * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
108 * | ## | ! | " | £ | $ | % | ## | | ## | - | + | = | @ | ~ | F12 |
109 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
110 * | ## | ^ | & | * | _ | # |------| |------| { | } | ; | ' | # | ## |
111 * |--------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------|
112 * | ## | \ | | | ` | - | / | | | | [ | ] | < | > | ? | ## |
113 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
114 * | ## | ## | ## | ## | ## | | ## | ## | ## | ## | ## |
115 * `----------------------------------' `----------------------------------'
116 * ,-------------. ,-------------.
117 * | ## | ## | | ## | ## |
118 * ,------|------|------| |------+------+------.
119 * | | | ## | | ## | | |
120 * | ## | ## |------| |------| ## | ## |
121 * | | | ## | | ## | | |
122 * `--------------------' `--------------------'
123 */
124[SYMB] = KEYMAP(
125 // left hand
126 KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
127 KC_TRNS, KC_EXLM, LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), KC_TRNS,
128 KC_TRNS, LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_MINS), UK_HASH,
129 KC_TRNS, UK_BSLS, UK_PIPE, KC_GRV, KC_MINS, KC_SLSH, KC_TRNS,
130 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
131 KC_TRNS, KC_TRNS,
132 KC_TRNS,
133 KC_TRNS, KC_TRNS, KC_TRNS,
134 // right hand
135 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
136 KC_TRNS, KC_MINS, KC_PLUS, KC_EQL, LSFT(KC_QUOT), LSFT(UK_HASH), KC_F12,
137 KC_LCBR, KC_RCBR, KC_SCLN, KC_QUOT, UK_HASH, KC_TRNS,
138 KC_TRNS, KC_LBRC, KC_RBRC, LSFT(KC_COMM), LSFT(KC_DOT), LSFT(KC_SLSH), KC_TRNS,
139 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
140 KC_TRNS, KC_TRNS,
141 KC_TRNS,
142 KC_TRNS, KC_TRNS, KC_TRNS
143 ),
144/* Keymap 2: Numerics and hex
145 *
146 * ,---------------------------------------------------. ,--------------------------------------------------.
147 * | ## | A | B | C | D | E | F | | A | B | C | D | E | F | ## |
148 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
149 * | ## | * | 7 | 8 | 9 | * | 0x | | 0x | * | 7 | 8 | 9 | * | ## |
150 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
151 * | ## | / | 4 | 5 | 6 | / |------| |------| / | 4 | 5 | 6 | / | ## |
152 * |---------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------|
153 * | ## | - | 1 | 2 | 3 | - | | | | - | 1 | 2 | 3 | - | ## |
154 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
155 * | = | + | 0 | , | . | | 0 | , | . | + | = |
156 * `-----------------------------------' `----------------------------------'
157 * ,-------------. ,-------------.
158 * | ## | ## | | ## | ## |
159 * ,------|------|------| |------+------+------.
160 * | | | ## | | ## | | |
161 * | ## | ## |------| |------| ## | ## |
162 * | | | ## | | ## | | |
163 * `--------------------' `--------------------'
164 */
165[NUMB] = KEYMAP(
166 // left hand
167 KC_TRNS, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
168 KC_TRNS, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, UM_0x,
169 KC_TRNS, KC_SLSH, KC_4, KC_5, KC_6, KC_SLSH,
170 KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_MINS, KC_TRNS,
171 KC_EQL, KC_PLUS, KC_0, KC_COMM, KC_DOT,
172 KC_TRNS, KC_TRNS,
173 KC_TRNS,
174 KC_TRNS, KC_TRNS, KC_TRNS,
175 // right hand
176 KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_TRNS,
177 UM_0x, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
178 KC_SLSH, KC_4, KC_5, KC_6, KC_SLSH, KC_TRNS,
179 KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_MINS, KC_TRNS,
180 KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_EQL,
181 KC_TRNS, KC_TRNS,
182 KC_TRNS,
183 KC_TRNS, KC_TRNS, KC_TRNS
184 ),
185/* Keymap 3: Cursor movement
186 *
187 * ,---------------------------------------------------. ,--------------------------------------------------.
188 * | | | | | | | | | | | | | | | |
189 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
190 * | | Home | | Up | | PgUp | | | | PgUp | | Up | | Home | |
191 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
192 * | | End | Left | Down | Right| PgDn |------| |------| PgDn | Left | Down | Right| End | |
193 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
194 * | ## | Up | | Down | ## | | | | | | ## | Down | | Up | ## |
195 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
196 * | Left | Down | Right| | | | | | Left | Down | Right|
197 * `-----------------------------------' `----------------------------------'
198 * ,-------------. ,-------------.
199 * | | | | | |
200 * ,------|------|------| |------+------+------.
201 * | | | | | | | |
202 * | ## | ## |------| |------| ## | ## |
203 * | | | | | | | |
204 * `--------------------' `--------------------'
205 */
206[CRSR] = KEYMAP(
207 // left hand
208 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
209 KC_NO, KC_HOME, KC_NO, KC_UP, KC_NO, KC_PGUP, KC_NO,
210 KC_NO, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
211 KC_TRNS, KC_UP, KC_NO, KC_DOWN, KC_TRNS, KC_NO, KC_NO,
212 KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO,
213 KC_NO, KC_NO,
214 KC_NO,
215 KC_TRNS, KC_TRNS, KC_NO,
216 // right hand
217 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
218 KC_NO, KC_PGUP, KC_NO, KC_UP, KC_NO, KC_HOME, KC_NO,
219 KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_NO,
220 KC_NO, KC_NO, KC_TRNS, KC_DOWN, KC_NO, KC_UP, KC_TRNS,
221 KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT,
222 KC_NO, KC_NO,
223 KC_NO,
224 KC_NO, KC_TRNS, KC_TRNS
225 ),
226/* Keymap 4: Media and mouse keys
227 *
228 * ,--------------------------------------------------. ,--------------------------------------------------.
229 * | | | | | | | | | | | | | | | |
230 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
231 * | | | Lclk | MsUp | Rclk | | | | | | Lclk | MsUp | Rclk | | |
232 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
233 * | | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | |
234 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
235 * | Lclk | MsUp | Rclk |MsDown| | ## | | | | ## | |MsDown| Lclk | MsUp | Rclk |
236 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
237 * |MsLeft|MsDown|MsRight | | | | |MsLeft|MsDown|MsRght|
238 * `----------------------------------' `----------------------------------'
239 * ,-------------. ,-------------.
240 * | | | | | |
241 * ,------|------|------| |------+------+------.
242 * | | | | | | | |
243 * | | |------| |------| | |
244 * | | | | | | | |
245 * `--------------------' `--------------------'
246 */
247[MOUS] = KEYMAP(
248 // left hand
249 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
250 KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO,
251 KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO,
252 KC_BTN1, KC_MS_U, KC_BTN2, KC_MS_D, KC_NO, KC_TRNS, KC_NO,
253 KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
254 KC_NO, KC_NO,
255 KC_NO,
256 KC_NO, KC_NO, KC_NO,
257 // right hand
258 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
259 KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO,
260 KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
261 KC_NO, KC_TRNS, KC_NO, KC_MS_D, KC_BTN1, KC_MS_U, KC_BTN2,
262 KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R,
263 KC_NO, KC_NO,
264 KC_NO,
265 KC_NO, KC_NO, KC_NO
266 ),
267/* Keymap 5: Keywords
268 *
269 * ,---------------------------------------------------. ,--------------------------------------------------.
270 * | | | | scarf| sadf | smily| | | | decaf| | | | | |
271 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
272 * | | const| volat| oper | ret | tmpl | | | | typen| cont | prv | pro | pub | |
273 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
274 * | | | str | obj | | gitl |------| |------| | | | nulp | | |
275 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
276 * | | | extr | cls | virt | break| | | |namesp| goodm| goodn| | | |
277 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
278 * | | | inc | | | | | | | | |
279 * `-----------------------------------' `----------------------------------'
280 * ,-------------. ,-------------.
281 * | | | | ecet | ecets|
282 * ,------|------|------| |------+------+------.
283 * | | | | | | | |
284 * | | |------| |------| | |
285 * | | | ## | | ## | | |
286 * `--------------------' `--------------------'
287 */
288[KEYW] = KEYMAP(
289 // left hand
290 KC_NO, KC_NO, KC_NO, UM_SCARF, UM_SADF, UM_SMILY, KC_NO,
291 KC_NO, UM_CONST, UM_VOLAT, UM_OPER, UM_RET, UM_TMPL, KC_NO,
292 KC_NO, KC_NO, UM_STR, UM_OBJ, KC_NO, UM_GITLOG,
293 KC_NO, KC_NO, UM_EXTR, UM_CLS, UM_VIRT, UM_BREAK, KC_NO,
294 KC_NO, KC_NO, UM_INC, KC_NO, KC_NO,
295 KC_NO, KC_NO,
296 KC_NO,
297 KC_NO, KC_NO, KC_TRNS,
298 // right hand
299 KC_NO, UM_DECAF, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
300 KC_NO, UM_TYPN, UM_CONT, UM_PRV, UM_PRO, UM_PUB, KC_NO,
301 KC_NO, KC_NO, KC_NO, UM_NULP, KC_NO, KC_NO,
302 KC_NO, UM_NAMESP, UM_GOODM, UM_GOODN, KC_NO, KC_NO, KC_NO,
303 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
304 UM_ECET, UM_ECETS,
305 KC_NO,
306 KC_TRNS, KC_NO, KC_NO
307 ),
308/* Keymap 6: emacs
309 *
310 * ,---------------------------------------------------. ,--------------------------------------------------.
311 * | | | | | | | empb | | emnb | emfs | emfb | | | | |
312 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
313 * | | emtr | | | | | | | | emun | emre | w-up | | | |
314 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
315 * | | | emwr | | | |------| |------| |w-left|w-down|w-rght| | |
316 * |---------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------|
317 * | | | | | | | | | | | |w-down| | | |
318 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
319 * | | | | | | | | | | | |
320 * `-----------------------------------' `----------------------------------'
321 * ,-------------. ,-------------.
322 * | | | | | |
323 * ,------|------|------| |------+------+------.
324 * | | | | | | | |
325 * | | |------| |------| | |
326 * | | | | | | | |
327 * `--------------------' `--------------------'
328 */
329[EMAC] = KEYMAP(
330 // left hand
331 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, UM_EMPB,
332 KC_NO, UM_EMTR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
333 KC_NO, KC_NO, UM_EMWR, KC_NO, KC_NO, KC_NO,
334 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
335 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
336 KC_NO, KC_NO,
337 KC_NO,
338 KC_NO, KC_NO, KC_NO,
339 // right hand
340 UM_EMNB, UM_EMFS, UM_EMFB, KC_NO, KC_NO, KC_NO, KC_NO,
341 KC_NO, UM_EMUN, UM_EMRE, LSFT(KC_UP), KC_NO, KC_NO, KC_NO,
342 KC_NO, LSFT(KC_LEFT), LSFT(KC_DOWN), LSFT(KC_RGHT), KC_NO, KC_NO,
343 KC_TRNS, KC_NO, KC_NO, LSFT(KC_DOWN), KC_NO, KC_NO, KC_NO,
344 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
345 KC_NO, KC_NO,
346 KC_NO,
347 KC_NO, KC_NO, KC_NO
348 ),
349};
350
351enum next_key_down_up {
352 NK_DOWN_UP,
353 NK_DOWN,
354 NK_UP // a bit of a hack, this works as long as NK_UP < KC_A
355};
356
357void send_keystrokes(uint8_t key, ...)
358{
359 va_list vl;
360 va_start(vl, key);
361 enum next_key_down_up nkdu = NK_DOWN_UP;
362 while (key != KC_NO) {
363 if (key < KC_A) {
364 nkdu = key;
365 } else {
366 switch (nkdu) {
367 case NK_DOWN_UP:
368 register_code(key);
369 case NK_UP:
370 unregister_code(key);
371 break;
372 case NK_DOWN:
373 register_code(key);
374 }
375 nkdu = NK_DOWN_UP;
376 }
377 key = va_arg(vl, int);
378 }
379 va_end(vl);
380}
381
382const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
383{
384 // MACRODOWN only works in this function
385 switch(id) {
386 case 0: // { }
387 if (record->event.pressed) {
388 return MACRO(T(ENT), D(LSFT), T(LBRC), U(LSFT), T(ENT),
389 D(LSFT), T(RBRC), U(LSFT), T(UP),
390 T(TAB), END);
391 }
392 break;
393 case 1:
394 if (record->event.pressed) {
395 return MACRO(T(0), T(X), END);
396 }
397 break;
398 case 2:
399 if (record->event.pressed) {
400 SEND_STRING("public");
401 }
402 break;
403 case 3:
404 if (record->event.pressed) {
405 SEND_STRING("protected");
406 }
407 break;
408 case 4:
409 if (record->event.pressed) {
410 SEND_STRING("private");
411 }
412 break;
413 case 5: // class
414 if (record->event.pressed) {
415 return MACRO(T(C), T(L), T(A), T(S), T(S), T(ENT),
416 D(LSFT), T(LBRC), U(LSFT), T(ENT),
417 T(P), T(U), T(B), T(L), T(I), T(C),
418 D(LSFT), T(SCLN), U(LSFT), T(ENT), T(ENT),
419 T(P), T(R), T(I), T(V), T(A), T(T), T(E),
420 D(LSFT), T(SCLN), U(LSFT), T(ENT),
421 D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(ENT),
422 T(UP), T(UP), T(UP), T(UP), T(UP), T(UP), T(UP),
423 T(END), T(SPC), END);
424 }
425 break;
426 case 6: // struct
427 if (record->event.pressed) {
428 return MACRO(T(S), T(T), T(R), T(U), T(C), T(T), T(ENT),
429 D(LSFT), T(LBRC), U(LSFT), T(ENT),
430 D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(ENT),
431 T(UP), T(UP), T(UP), T(UP),
432 T(END), T(SPC), END);
433 }
434 break;
435 case 7:
436 if (record->event.pressed) {
437 SEND_STRING("return");
438 }
439 break;
440 case 8: // #include
441 if (record->event.pressed) {
442 return MACRO(T(NONUS_HASH), T(I), T(N), T(C), T(L), T(U), T(D), T(E), END);
443 }
444 break;
445 case 9:
446 if (record->event.pressed) {
447 SEND_STRING("objdump -CT -x -d");
448 }
449 break;
450 case 10:
451 if (record->event.pressed) {
452 SEND_STRING("git log --oneline --graph --decorate=short");
453 }
454 break;
455 case 11:
456 if (record->event.pressed) {
457 SEND_STRING("good morning");
458 }
459 break;
460 case 12:
461 if (record->event.pressed) {
462 SEND_STRING("namespace");
463 }
464 break;
465 case 14: // emacs toggle read-only
466 if (record->event.pressed) {
467 return MACRO(D(LCTL), T(X), T(Q), U(LCTL), END);
468 }
469 break;
470 case 15: // emacs write buffer
471 if (record->event.pressed) {
472 return MACRO(D(LCTL), T(X), T(S), U(LCTL), END);
473 }
474 break;
475 case 16: // emacs undo
476 if (record->event.pressed) {
477 return MACRO(D(LCTL), D(LSFT), T(MINS), U(LSFT), U(LCTL), END);
478 }
479 break;
480 case 17: // emacs redo
481 if (record->event.pressed) {
482 return MACRO(D(LALT), D(LSFT), T(MINS), U(LSFT), U(LALT), END);
483 }
484 break;
485 case 18: // emacs previous buffer
486 if (record->event.pressed) {
487 return MACRO(D(LCTL), T(X), U(LCTL), T(LEFT), END);
488 }
489 break;
490 case 19: // emacs next buffer
491 if (record->event.pressed) {
492 return MACRO(D(LCTL), T(X), U(LCTL), T(RGHT), END);
493 }
494 break;
495 case 20:
496 if (record->event.pressed) {
497 SEND_STRING("good night");
498 }
499 break;
500 case 22: // { };
501 if (record->event.pressed) {
502 return MACRO(T(ENT), D(LSFT), T(LBRC), U(LSFT), T(ENT),
503 D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(UP),
504 T(TAB), END);
505 }
506 break;
507 case 23:
508 if (record->event.pressed) {
509 SEND_STRING("template");
510 }
511 break;
512 case 24:
513 if (record->event.pressed) {
514 SEND_STRING("typename");
515 }
516 break;
517 case 25:
518 if (record->event.pressed) {
519 SEND_STRING("continue");
520 return MACRO(T(SCLN), END);
521 }
522 break;
523 case 26:
524 if (record->event.pressed) {
525 SEND_STRING("break");
526 return MACRO(T(SCLN), END);
527 }
528 break;
529 case 27:
530 if (record->event.pressed) {
531 SEND_STRING("const");
532 }
533 break;
534 case 28:
535 if (record->event.pressed) {
536 SEND_STRING(":-)");
537 }
538 break;
539 case 29:
540 if (record->event.pressed) {
541 SEND_STRING(":-(");
542 }
543 break;
544 case 30: // dazed
545 if (record->event.pressed) {
546 send_keystrokes(NK_DOWN, KC_LSFT, KC_8, KC_MINS, KC_8, NK_UP, KC_LSFT, KC_NO);
547 }
548 break;
549 case 31: // decaf
550 if (record->event.pressed) {
551 send_keystrokes(NK_DOWN, KC_LSFT, KC_C, KC_9, KC_MINS, KC_0, NK_UP, KC_LSFT, KC_NO);
552 }
553 break;
554 case 32:
555 if (record->event.pressed) {
556 SEND_STRING("operator");
557 }
558 break;
559 case 33:
560 if (record->event.pressed) {
561 SEND_STRING("nullptr");
562 }
563 break;
564 case 34:
565 if (record->event.pressed) {
566 SEND_STRING("extern");
567 }
568 break;
569 case 35:
570 if (record->event.pressed) {
571 SEND_STRING("virtual");
572 }
573 break;
574 case 36: // emacs font smaller
575 if (record->event.pressed) {
576 return MACRO(D(LCTL), T(X), T(EQL), U(LCTL), END);
577 }
578 break;
579 case 37: // emacs font bigger
580 if (record->event.pressed) {
581 return MACRO(D(LCTL), T(X), T(MINS), U(LCTL), END);
582 }
583 break;
584 case 38:
585 if (record->event.pressed) {
586 SEND_STRING("volatile");
587 }
588 break;
589 }
590 return MACRO_NONE;
591}
592
593LEADER_EXTERNS();
594
595// Runs constantly in the background, in a loop.
596void matrix_scan_user(void) {
597
598 LEADER_DICTIONARY() {
599 leading = false;
600 leader_end();
601
602 SEQ_TWO_KEYS(KC_G, KC_A) {
603 SEND_STRING("git add .");
604 }
605 SEQ_TWO_KEYS(KC_G, KC_D) {
606 SEND_STRING("git diff");
607 }
608 SEQ_THREE_KEYS(KC_G, KC_D, KC_S) {
609 SEND_STRING("git diff --staged");
610 }
611 SEQ_TWO_KEYS(KC_G, KC_L) {
612 SEND_STRING("git log");
613 }
614 SEQ_THREE_KEYS(KC_G, KC_L, KC_O) {
615 SEND_STRING("git log --oneline");
616 }
617 SEQ_TWO_KEYS(KC_G, KC_F) {
618 SEND_STRING("git fetch");
619 }
620 SEQ_TWO_KEYS(KC_G, KC_O) {
621 SEND_STRING("git checkout");
622 }
623 SEQ_TWO_KEYS(KC_G, KC_P) {
624 SEND_STRING("git pull");
625 }
626 SEQ_TWO_KEYS(KC_G, KC_S) {
627 SEND_STRING("git status");
628 }
629 SEQ_TWO_KEYS(KC_G, KC_C) {
630 SEND_STRING("git commit -m ''");
631 send_keystrokes(KC_LEFT, KC_NO);
632 }
633 SEQ_THREE_KEYS(KC_G, KC_C, KC_A) {
634 SEND_STRING("git commit --amend");
635 }
636
637 SEQ_TWO_KEYS(KC_C, KC_C) {
638 SEND_STRING("const_cast<>");
639 send_keystrokes(KC_LEFT, KC_NO);
640 }
641 SEQ_TWO_KEYS(KC_C, KC_D) {
642 SEND_STRING("dynamic_cast<>");
643 send_keystrokes(KC_LEFT, KC_NO);
644 }
645 SEQ_TWO_KEYS(KC_C, KC_R) {
646 SEND_STRING("reinterpret_cast<>");
647 send_keystrokes(KC_LEFT, KC_NO);
648 }
649 SEQ_TWO_KEYS(KC_C, KC_S) {
650 SEND_STRING("static_cast<>");
651 send_keystrokes(KC_LEFT, KC_NO);
652 }
653
654 SEQ_ONE_KEY(KC_SLSH) {
655 send_keystrokes(KC_SLSH, NK_DOWN, KC_LSFT, KC_8, KC_8, NK_UP, KC_LSFT, KC_ENT,
656 NK_DOWN, KC_LSFT, KC_8, NK_UP, KC_LSFT, KC_ENT,
657 NK_DOWN, KC_LSFT, KC_8, NK_UP, KC_LSFT, KC_SLSH, KC_UP, KC_END, KC_SPC,
658 KC_NO);
659 }
660 }
661}
diff --git a/keyboards/ergodox/keymaps/albert/readme.md b/keyboards/ergodox/keymaps/albert/readme.md
new file mode 100644
index 000000000..e20e047ac
--- /dev/null
+++ b/keyboards/ergodox/keymaps/albert/readme.md
@@ -0,0 +1,188 @@
1# ErgoDox EZ Configuration for typing like a boss.
2
3This layout has 7 layers:
40. Base layers
51. Symbols and F-keys
62. Number pad (with hexadecimal)
73. Cursor keys
84. Mouse movement and clicks
95. Keyword macros
106. Emacs
11
12There are also some leader keys defined for frequently used commands (git etc).
13
14## The layers
15
16Double hashes (`##`) indicate transparent keys (`KC_TRNS`) and blanks indicate no key (`KC_NO`).
17
18### 0. Base layer
19
20```
21,--------------------------------------------------. ,--------------------------------------------------.
22| ESC | 1 | 2 | 3 | 4 | 5 | SfLt | | SfRt | 6 | 7 | 8 | 9 | 0 | BkSp |
23|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------|
24| Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Del |
25|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
26| Caps/L2| A | S | D | F | G |------| |------| H | J | K | L | ; |Enter/L2|
27|--------|------|------|------|------|------| L6 | | L6 |------|------|------|------|------|--------|
28| LSft/( | Z | X | C | V/L3 | B/L4 | | | | N/L4 | M/L3 | , | . | / | RSft/) |
29`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
30 |Ctrl/[| Alt/]| # | Left |Right | | Up | Down | - | Alt/[|Ctrl/]|
31 `----------------------------------' `----------------------------------'
32 ,-------------. ,-------------.
33 | L2 | lead | | lead | Ins |
34 ,------|------|------| |------|------|------.
35 | Space| BkSp | Home | | PgUp | Enter|Space |
36 | / | / |------| |------| / | / |
37 | Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl |
38 `--------------------' `--------------------'
39```
40
41Space Cadet shift is enabled. Ctrl and Alt doubles up as normal keys when tapped.
42SfLt and SfRt sends Shift + left and Shift + Right respectively - for use with emacs with `windmove-default-keybindings`.
43Caps and Enter may be held down to activate layer 2 (hexadecimal number pad).
44Please see `matrix_scan_user` function in `keymap.c` for list of commands available via `lead` key.
45
46### 1. Symbols and F-keys
47
48```
49,--------------------------------------------------. ,--------------------------------------------------.
50| ## | F1 | F2 | F3 | F4 | F5 | ## | | ## | F6 | F7 | F8 | F9 | F10 | F11 |
51|--------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
52| ## | ! | " | £ | $ | % | ## | | ## | - | + | = | @ | ~ | F12 |
53|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
54| ## | ^ | & | * | _ | # |------| |------| { | } | ; | ' | # | ## |
55|--------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------|
56| ## | \ | | | ` | - | / | | | | [ | ] | < | > | ? | ## |
57`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
58 | ## | ## | ## | ## | ## | | ## | ## | ## | ## | ## |
59 `----------------------------------' `----------------------------------'
60 ,-------------. ,-------------.
61 | ## | ## | | ## | ## |
62 ,------|------|------| |------|------|------.
63 | | | ## | | ## | | |
64 | ## | ## |------| |------| ## | ## |
65 | | | ## | | ## | | |
66 `--------------------' `--------------------'
67```
68
69### 2. Number pad (with hexadecimal)
70
71```
72,---------------------------------------------------. ,--------------------------------------------------.
73| ## | A | B | C | D | E | F | | A | B | C | D | E | F | ## |
74|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
75| ## | * | 7 | 8 | 9 | * | 0x | | 0x | * | 7 | 8 | 9 | * | ## |
76|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
77| ## | / | 4 | 5 | 6 | / |------| |------| / | 4 | 5 | 6 | / | ## |
78|---------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------|
79| ## | - | 1 | 2 | 3 | - | | | | - | 1 | 2 | 3 | - | ## |
80`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
81 | = | + | 0 | , | . | | 0 | , | . | + | = |
82 `-----------------------------------' `----------------------------------'
83 ,-------------. ,-------------.
84 | ## | ## | | ## | ## |
85 ,------|------|------| |------|------|------.
86 | | | ## | | ## | | |
87 | ## | ## |------| |------| ## | ## |
88 | | | ## | | ## | | |
89 `--------------------' `--------------------'
90```
91
92### 3. Cursor keys
93
94```
95,---------------------------------------------------. ,--------------------------------------------------.
96| | | | | | | | | | | | | | | |
97|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
98| | Home | | Up | | PgUp | | | | PgUp | | Up | | Home | |
99|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
100| | End | Left | Down | Right| PgDn |------| |------| PgDn | Left | Down | Right| End | |
101|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
102| ## | Up | | Down | ## | | | | | | ## | Down | | Up | ## |
103`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
104 | Left | Down | Right| | | | | | Left | Down | Right|
105 `-----------------------------------' `----------------------------------'
106 ,-------------. ,-------------.
107 | | | | | |
108 ,------|------|------| |------|------|------.
109 | | | | | | | |
110 | ## | ## |------| |------| ## | ## |
111 | | | | | | | |
112 `--------------------' `--------------------'
113```
114
115### 4. Mouse movement and clicks
116
117```
118,--------------------------------------------------. ,--------------------------------------------------.
119| | | | | | | | | | | | | | | |
120|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------|
121| | | Lclk | MsUp | Rclk | | | | | | Lclk | MsUp | Rclk | | |
122|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
123| | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | |
124|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
125| Lclk | MsUp | Rclk |MsDown| | ## | | | | ## | |MsDown| Lclk | MsUp | Rclk |
126`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
127 |MsLeft|MsDown|MsRight | | | | |MsLeft|MsDown|MsRght|
128 `----------------------------------' `----------------------------------'
129 ,-------------. ,-------------.
130 | | | | | |
131 ,------|------|------| |------|------|------.
132 | | | | | | | |
133 | | |------| |------| | |
134 | | | | | | | |
135 `--------------------' `--------------------'
136```
137
138### 5. Keyword macros
139
140```
141,---------------------------------------------------. ,--------------------------------------------------.
142| | | | scarf| sadf | smily| | | | decaf| | | | | |
143|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
144| | const| volat| oper | ret | tmpl | | | | typen| cont | prv | pro | pub | |
145|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
146| | | str | obj | | gitl |------| |------| | | | nulp | | |
147|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
148| | | extr | cls | virt | break| | | |namesp| goodm| goodn| | | |
149`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
150 | | | inc | | | | | | | | |
151 `-----------------------------------' `----------------------------------'
152 ,-------------. ,-------------.
153 | | | | ecet | ecets|
154 ,------|------|------| |------|------|------.
155 | | | | | | | |
156 | | |------| |------| | |
157 | | | ## | | ## | | |
158 `--------------------' `--------------------'
159```
160Please see `keymap.c` for the keywords/commands.
161Some are const, volatile, operator, return, template, typename, continue, private,
162protected, public, struct, class, extern, virtual, break, namespace.
163Also a git log command I use a lot (`git log --oneline --graph --decorate=short` (I know git can be configured but that is boring)).
164
165### 6. Emacs
166
167```
168,---------------------------------------------------. ,--------------------------------------------------.
169| | | | | | | empb | | emnb | emfs | emfb | | | | |
170|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------|
171| | emtr | | | | | | | | emun | emre | w-up | | | |
172|---------|------|------|------|------|------| | | |------|------|------|------|------|--------|
173| | | emwr | | | |------| |------| |w-left|w-down|w-rght| | |
174|---------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------|
175| | | | | | | | | | | |w-down| | | |
176`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
177 | | | | | | | | | | | |
178 `-----------------------------------' `----------------------------------'
179 ,-------------. ,-------------.
180 | | | | | |
181 ,------|------|------| |------|------|------.
182 | | | | | | | |
183 | | |------| |------| | |
184 | | | | | | | |
185 `--------------------' `--------------------'
186```
187Some emacs shortcuts like toggle read/write mode (emtr), write file (emwr), previous-buffer (empb),
188next-buffer (emnb), smaller font(emfs), larger font (emfb), undo (emun), redo (emre) and switching between windows in a frame.
diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md
index 015bd7cd3..3783eadf1 100644
--- a/keyboards/ergodox/keymaps/algernon/readme.md
+++ b/keyboards/ergodox/keymaps/algernon/readme.md
@@ -121,10 +121,10 @@ There is a very small tool in `tools/layer-notify`, that listens to the HID cons
121To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this: 121To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this:
122 122
123 [algernon:ez-layout]: https://github.com/algernon/ergodox-layout 123 [algernon:ez-layout]: https://github.com/algernon/ergodox-layout
124 [qmk]: https://github.com/jackhumbert/qmk_firmware 124 [qmk]: https://github.com/qmk/qmk_firmware
125 125
126``` 126```
127$ git clone https://github.com/jackhumbert/qmk_firmware.git 127$ git clone https://github.com/qmk/qmk_firmware.git
128$ cd qmk_firmware 128$ cd qmk_firmware
129$ git clone https://github.com/algernon/ergodox-layout.git \ 129$ git clone https://github.com/algernon/ergodox-layout.git \
130 keyboards/ergodox/keymaps/algernon-master 130 keyboards/ergodox/keymaps/algernon-master
diff --git a/keyboards/ergodox/keymaps/deadcyclo/Makefile b/keyboards/ergodox/keymaps/deadcyclo/Makefile
new file mode 100644
index 000000000..039f07c8e
--- /dev/null
+++ b/keyboards/ergodox/keymaps/deadcyclo/Makefile
@@ -0,0 +1 @@
UNICODE_ENABLE = yes
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png
index 4208c5189..2c03af581 100644
--- a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png
+++ b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png
index ccda70e39..5adb7ac77 100644
--- a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png
+++ b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png
index 481e63e32..a267ff23d 100644
--- a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png
+++ b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png
index 9ebba6734..c8c90cf5c 100644
--- a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png
+++ b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c
index d75c805bf..5774511cc 100644
--- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c
+++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c
@@ -8,15 +8,86 @@
8#define MDIA 2 // media keys 8#define MDIA 2 // media keys
9#define NAVG 3 // navigation 9#define NAVG 3 // navigation
10 10
11enum custom_keycodes { 11enum macros {
12 PLACEHOLDER = SAFE_RANGE, // can always be here 12 RUN
13};
14
15enum function_ids {
16 EMOJI,
17 EMOJI2,
13 EPRM, 18 EPRM,
14 VRSN, 19 VRSN,
15 RGB_SLD 20 RGB_SLD,
21 GO_GROUP
16}; 22};
17 23
18// TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?) 24/* opt can only be 0-15 */
25enum emojis {
26 SHRUG,
27 YAY,
28 HUG,
29 SMILE,
30 SMILE2,
31 HMM1,
32 HMM2,
33 BEAR1,
34 BEAR2,
35 FUU,
36 EGGY1,
37 EGGY2,
38 FACE1,
39 FACE2,
40 UHU,
41 SMRK1
42};
43
44enum emojis2 {
45 SMRK2,
46 LOVE
47};
48
49enum progmem_ids {
50 EMOJI_SHRUG,
51 EMOJI_YAY,
52 EMOJI_HUG,
53 EMOJI_SMILE,
54 EMOJI_SMILE2,
55 EMOJI_HMM1,
56 EMOJI_HMM2,
57 EMOJI_BEAR1,
58 EMOJI_BEAR2,
59 EMOJI_FUU,
60 EMOJI_EGGY1,
61 EMOJI_EGGY2,
62 EMOJI_FACE1,
63 EMOJI_FACE2,
64 EMOJI_UHU,
65 EMOJI_SMRK1,
66 EMOJI_SMRK2,
67 EMOJI_LOVE,
68 F_EPRM,
69 F_VRSN,
70 F_RGB_SLD,
71 I3_GO_GROUP_10,
72 I3_GO_GROUP_1,
73 I3_GO_GROUP_2,
74 I3_GO_GROUP_3,
75 I3_GO_GROUP_4,
76 I3_GO_GROUP_5,
77 I3_GO_GROUP_6,
78 I3_GO_GROUP_7,
79 I3_GO_GROUP_8,
80 I3_GO_GROUP_9,
81};
82
83// TODO: Finish the macros for i3 (Macros should potentially be own function instead to make things easier? some of them at least, f. ex. the ones that use 1-0 keys so we can have a single switch)
84
85// TODO: Do stuff with hyper and meh keys
86// TODO: Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?)
87// TODO: Make macros for gnu screen and i3wm
19// TODO: Need to change hotkeys for lastpass, and potentially make my own keys for them on one of my layers 88// TODO: Need to change hotkeys for lastpass, and potentially make my own keys for them on one of my layers
89// TODO: Look into using tap dance
90// TODO: Use leader key for stuff. See https://github.com/qmk/qmk_firmware/wiki
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 91const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21/* Keymap 0: Basic layer 92/* Keymap 0: Basic layer
22 * 93 *
@@ -29,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| 100 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
30 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | 101 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
31 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 102 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
32 * |Grv/L1| '" |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | ] | ~/L1 | 103 * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | LEAD | UNI | ~/L1 |
33 * `----------------------------------' `----------------------------------' 104 * `----------------------------------' `----------------------------------'
34 * ,-------------. ,-------------. 105 * ,-------------. ,-------------.
35 * | App | Home | | PgUp | Ins | 106 * | App | Home | | PgUp | Ins |
@@ -43,11 +114,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
43// Otherwise, it needs KC_* 114// Otherwise, it needs KC_*
44[BASE] = KEYMAP( // layer 0 : default 115[BASE] = KEYMAP( // layer 0 : default
45 // left hand 116 // left hand
46 LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, 117 LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
47 LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), 118 LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
48 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, 119 KC_LCTL, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G,
49 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), 120 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
50 LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_RALT,KC_LALT, 121 LT(SYMB,KC_GRV),LCTL(LSFT(KC_U)), LALT(KC_LSFT), KC_RALT,KC_LALT,
51 ALT_T(KC_APP), KC_HOME, 122 ALT_T(KC_APP), KC_HOME,
52 KC_END, 123 KC_END,
53 KC_SPC,KC_TAB,KC_LBRC, 124 KC_SPC,KC_TAB,KC_LBRC,
@@ -56,12 +127,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
56 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS), 127 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS),
57 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), 128 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT),
58 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, 129 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
59 KC_LALT, KC_RALT,KC_LBRC,KC_RBRC, LT(SYMB,KC_TILD), 130 KC_LALT, KC_RALT,KC_LEAD,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD),
60 KC_PGUP, KC_INS, 131 KC_PGUP, KC_INS,
61 KC_PGDN, 132 KC_PGDN,
62 KC_RBRC,KC_BSPC, KC_ENT 133 KC_RBRC,KC_BSPC, KC_ENT
63 ), 134 ),
64/* Keymap 1: Symbol Layer 135/* Keymap 1: Symbol Layer LCTL(LSFT(KC_U))
65 * 136 *
66 * ,--------------------------------------------------. ,--------------------------------------------------. 137 * ,--------------------------------------------------. ,--------------------------------------------------.
67 * | | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | 138 * | | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
@@ -75,11 +146,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
75 * | | | | | | | | . | 0 | = | | 146 * | | | | | | | | . | 0 | = | |
76 * `----------------------------------' `----------------------------------' 147 * `----------------------------------' `----------------------------------'
77 * ,-------------. ,-------------. 148 * ,-------------. ,-------------.
78 * | | | | | | 149 * |Toggle|Animat| | Hue+ | Hue- |
79 * ,------|------|------| |------+------+------. 150 * ,------|------|------| |------+------+------.
80 * | | | | | | | | 151 * |Bright|Bright|Solid | | | | |
81 * | | |------| |------| DEL | | 152 * |ness- |ness+ |------| |------| DEL | |
82 * | | | | | | | | 153 * | | | | | EPRM | | |
83 * `--------------------' `--------------------' 154 * `--------------------' `--------------------'
84 */ 155 */
85// SYMBOLS 156// SYMBOLS
@@ -90,27 +161,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
90 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, 161 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
91 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, 162 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
92 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 163 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
93 KC_TRNS,KC_TRNS, 164 RGB_TOG,RGB_MOD,
94 KC_TRNS, 165 F(F_RGB_SLD),
95 KC_TRNS,KC_TRNS,KC_TRNS, 166 RGB_VAD,RGB_VAI,KC_TRNS,
96 // right hand 167 // right hand
97 KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, 168 KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
98 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, 169 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
99 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, 170 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
100 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, 171 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
101 KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, 172 KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
102 KC_TRNS, KC_TRNS, 173 RGB_HUD, RGB_HUI,
103 KC_TRNS, 174 KC_TRNS,
104 KC_TRNS, KC_DEL, KC_TRNS 175 F(F_EPRM), KC_DEL, KC_TRNS
105), 176),
106/* Keymap 2: Media and mouse keys 177/* Keymap 2: Media, mouse and navigation
107 * 178 *
108 * ,--------------------------------------------------. ,--------------------------------------------------. 179 * ,--------------------------------------------------. ,--------------------------------------------------.
109 * | | | | | | | | | | | | | | | | 180 * | | gg(1)| | | | | | | | | | | | | |
110 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| 181 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
111 * | | | | MsUp | | | | | | | | | | | | 182 * | | | | MsUp | RUN | | | | | | | Up | | | |
112 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 183 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
113 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | 184 * | | |MsLeft|MsDown|MsRght| |------| |------| | Left | Down | Right| | Play |
114 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 185 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
115 * | | | | | | | | | | | | Prev | Next | | | 186 * | | | | | | | | | | | | Prev | Next | | |
116 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 187 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
@@ -124,10 +195,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
124 * | | | | | | | | 195 * | | | | | | | |
125 * `--------------------' `--------------------' 196 * `--------------------' `--------------------'
126 */ 197 */
127// MEDIA AND MOUSE 198// MEDIA , MOUSE and NAVIGATION
128[MDIA] = KEYMAP( 199[MDIA] = KEYMAP(
129 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 200 KC_TRNS, F(I3_GO_GROUP_1), F(I3_GO_GROUP_2), F(I3_GO_GROUP_3), F(I3_GO_GROUP_4), F(I3_GO_GROUP_5), F(I3_GO_GROUP_6),
130 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, 201KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS,
131 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, 202 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
132 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 203 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
133 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, 204 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
@@ -135,116 +206,280 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
135 KC_TRNS, 206 KC_TRNS,
136 KC_TRNS, KC_TRNS, KC_TRNS, 207 KC_TRNS, KC_TRNS, KC_TRNS,
137 // right hand 208 // right hand
138 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 209 F(I3_GO_GROUP_6), F(I3_GO_GROUP_7), F(I3_GO_GROUP_8), F(I3_GO_GROUP_9), F(I3_GO_GROUP_10), KC_TRNS, KC_TRNS,
139 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 210 KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
140 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, 211 KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_MPLY,
141 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, 212 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
142 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, 213 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
143 KC_TRNS, KC_TRNS, 214 KC_TRNS, KC_TRNS,
144 KC_TRNS, 215 KC_TRNS,
145 KC_TRNS, KC_TRNS, KC_WBAK 216 KC_TRNS, KC_TRNS, KC_WBAK
146), 217),
147 218
148/* Keymap 3: Navigation TODO: Printscreen, pg up down, home, end, others? Insert for example 219/* Keymap 3: Unicode
149 * 220 *
150 * ,--------------------------------------------------. ,--------------------------------------------------. 221 * ,--------------------------------------------------. ,--------------------------------------------------.
151 * | | VER | | | | | | | | | | | | | | 222 * | | ┌ | ┐ | └ | ┘ | │ | ─ | | ╔ | ╗ | ╚ | ╝ | ║ | ═ | |
152 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| 223 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
153 * | | | | up | | | | | | | | | | | | 224 * | | shrug| yay | hug | smile|smile2| | | | ■ | λ | → | ➙ | ▻ | █ |
154 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 225 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
155 * | | | left | down | right| |------| |------| | | | | | | 226 * | | hmm1 | hmm2 | bear1| bear2| fuu |------| |------| ☺ | ☻ | ☹ | ♡ | ♥ | ░ |
156 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 227 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
157 * | | | | | | | | | | | | | | | | 228 * | | eggy1| eggy2| face1| face2| uhu | | | | ❤ | ☐ | ☑ | ☒ | ✓ | ▄ |
158 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 229 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
159 * | | | | | | | | | | | | 230 * | | smrk1| smrk2| love | VER | | | | | | |
160 * `----------------------------------' `----------------------------------' 231 * `----------------------------------' `----------------------------------'
161 * ,-------------. ,-------------. 232 * ,-------------. ,-------------.
162 * | | | | | | 233 * | | | | | |
163 * ,------|------|------| |------+------+------. 234 * ,------|------|------| |------+------+------.
164 * | | | | | | | | 235 * | | | | | | | |
165 * | | |------| |------| | | 236 * | | |------| |------| | |
166 * | | | | | | | | 237 * | | | | | | | |
167 * `--------------------' `--------------------' 238 * `--------------------' `--------------------'
168 */ 239 */
169// NAVIGATION 240// Unicode
170[NAVG] = KEYMAP( 241[NAVG] = KEYMAP(
171 KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 242 KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500),
172 KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, 243 KC_TRNS, F(EMOJI_SHRUG), F(EMOJI_YAY), F(EMOJI_HUG), F(EMOJI_SMILE), F(EMOJI_SMILE2), KC_TRNS,
173 KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, 244 KC_TRNS, F(EMOJI_HMM1), F(EMOJI_HMM2), F(EMOJI_BEAR1), F(EMOJI_BEAR2), F(EMOJI_FUU),
174 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 245 KC_TRNS, F(EMOJI_EGGY1), F(EMOJI_EGGY2), F(EMOJI_FACE1), F(EMOJI_FACE2), F(EMOJI_UHU), KC_TRNS,
175 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 246 KC_TRNS, F(EMOJI_SMRK1), F(EMOJI_SMRK2), F(EMOJI_LOVE), F(F_VRSN),
176 KC_TRNS, KC_TRNS, 247 KC_TRNS, KC_TRNS,
177 KC_TRNS, 248 KC_TRNS,
178 KC_TRNS, KC_TRNS, KC_TRNS, 249 KC_TRNS, KC_TRNS, KC_TRNS,
179 // right hand 250 // right hand
180 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 251 UC(0x2554), UC(0x2557), UC(0x255a), UC(0x255d), UC(0x2551), UC(0x2550), KC_TRNS,
181 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 252 KC_TRNS, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), UC(0x2588),
182 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 253 UC(0x263a), UC(0x263b), UC(0x2639), UC(0x2661), UC(0x2665), UC(0x2591),
183 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, 254 KC_TRNS, UC(0x2764), UC(0x2610), UC(0x2611), UC(0x2612), UC(0x2713), UC(0x2584),
184 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 255 UC(0x2714), UC(0x2717), UC(0x2718), UC(0x25cf), UC(0x2580),
185 KC_TRNS, KC_TRNS, 256 UC(0x2592), UC(0x2593),
186 KC_TRNS, 257 KC_TRNS,
187 KC_TRNS, KC_TRNS, KC_TRNS 258 KC_TRNS, KC_TRNS, KC_TRNS
188), 259),
189}; 260};
190 261
191const uint16_t PROGMEM fn_actions[] = { 262const uint16_t PROGMEM fn_actions[] = {
192 [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) 263 [EMOJI_SHRUG] = ACTION_FUNCTION_OPT(EMOJI, SHRUG),
264 [EMOJI_YAY] = ACTION_FUNCTION_OPT(EMOJI, YAY),
265 [EMOJI_HUG] = ACTION_FUNCTION_OPT(EMOJI,HUG),
266 [EMOJI_SMILE] = ACTION_FUNCTION_OPT(EMOJI,SMILE),
267 [EMOJI_SMILE2] = ACTION_FUNCTION_OPT(EMOJI,SMILE2),
268 [EMOJI_HMM1] = ACTION_FUNCTION_OPT(EMOJI,HMM1),
269 [EMOJI_HMM2] = ACTION_FUNCTION_OPT(EMOJI,HMM2),
270 [EMOJI_BEAR1] = ACTION_FUNCTION_OPT(EMOJI,BEAR1),
271 [EMOJI_BEAR2] = ACTION_FUNCTION_OPT(EMOJI,BEAR2),
272 [EMOJI_FUU] = ACTION_FUNCTION_OPT(EMOJI,FUU),
273 [EMOJI_EGGY1] = ACTION_FUNCTION_OPT(EMOJI,EGGY1),
274 [EMOJI_EGGY2] = ACTION_FUNCTION_OPT(EMOJI,EGGY2),
275 [EMOJI_FACE1] = ACTION_FUNCTION_OPT(EMOJI,FACE1),
276 [EMOJI_FACE2] = ACTION_FUNCTION_OPT(EMOJI,FACE2),
277 [EMOJI_UHU] = ACTION_FUNCTION_OPT(EMOJI,UHU),
278 [EMOJI_SMRK1] = ACTION_FUNCTION_OPT(EMOJI,SMRK1),
279 [EMOJI_SMRK2] = ACTION_FUNCTION_OPT(EMOJI2,SMRK2),
280 [EMOJI_LOVE] = ACTION_FUNCTION_OPT(EMOJI2,LOVE),
281 [F_EPRM] = ACTION_FUNCTION(EPRM),
282 [F_VRSN] = ACTION_FUNCTION(VRSN),
283 [F_RGB_SLD] = ACTION_FUNCTION(RGB_SLD),
284 [I3_GO_GROUP_10]= ACTION_FUNCTION_OPT(GO_GROUP,0),
285 [I3_GO_GROUP_1] = ACTION_FUNCTION_OPT(GO_GROUP,1),
286 [I3_GO_GROUP_2] = ACTION_FUNCTION_OPT(GO_GROUP,2),
287 [I3_GO_GROUP_3] = ACTION_FUNCTION_OPT(GO_GROUP,3),
288 [I3_GO_GROUP_4] = ACTION_FUNCTION_OPT(GO_GROUP,4),
289 [I3_GO_GROUP_5] = ACTION_FUNCTION_OPT(GO_GROUP,5),
290 [I3_GO_GROUP_6] = ACTION_FUNCTION_OPT(GO_GROUP,6),
291 [I3_GO_GROUP_7] = ACTION_FUNCTION_OPT(GO_GROUP,7),
292 [I3_GO_GROUP_8] = ACTION_FUNCTION_OPT(GO_GROUP,8),
293 [I3_GO_GROUP_9] = ACTION_FUNCTION_OPT(GO_GROUP,9),
193}; 294};
194 295
195const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) 296#define TAP_ONCE(code) \
196{ 297 register_code (code); \
197 // MACRODOWN only works in this function 298 unregister_code (code)
198 switch(id) {
199 case 0:
200 if (record->event.pressed) {
201 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
202 }
203 break;
204 case 1:
205 if (record->event.pressed) { // For resetting EEPROM
206 eeconfig_init();
207 }
208 break;
209 }
210 return MACRO_NONE;
211};
212 299
213bool process_record_user(uint16_t keycode, keyrecord_t *record) { 300void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
214 switch (keycode) { 301 if (record->event.pressed) {
215 // dynamically generate these. 302 switch(id) {
216 case EPRM: 303 case EPRM:
217 if (record->event.pressed) { 304 eeconfig_init();
218 eeconfig_init();
219 }
220 return false;
221 break; 305 break;
222 case VRSN: 306 case VRSN:
223 if (record->event.pressed) { 307 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
224 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
225 }
226 return false;
227 break; 308 break;
228 case RGB_SLD: 309 case RGB_SLD:
229 if (record->event.pressed) { 310#ifdef RGBLIGHT_ENABLE
230 #ifdef RGBLIGHT_ENABLE 311 rgblight_mode(1);
231 rgblight_mode(1); 312#endif
232 #endif 313 break;
314 case GO_GROUP:
315 register_code(KC_LCTL); TAP_ONCE(KC_I); unregister_code(KC_LCTL);
316 TAP_ONCE(KC_G);
317 if (opt == 0) {
318 TAP_ONCE(39);
319 } else {
320 TAP_ONCE(29+opt);
321 }
322 break;
323 case EMOJI:
324 switch(opt) {
325 case SHRUG:
326 unicode_input_start(); register_hex(0xaf); unicode_input_finish();
327 TAP_ONCE (KC_BSLS);
328 register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT);
329 unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
330 register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT);
331 TAP_ONCE (KC_SLSH);
332 unicode_input_start (); register_hex(0xaf); unicode_input_finish();
333 break;
334 case YAY:
335 SEND_STRING ("\\o/");
336 break;
337 case HUG:
338 unicode_input_start(); register_hex(0x0f3c); unicode_input_finish();
339 TAP_ONCE (KC_SPC);
340 unicode_input_start(); register_hex(0x3064); unicode_input_finish();
341 TAP_ONCE (KC_SPC);
342 unicode_input_start(); register_hex(0x25d5); unicode_input_finish();
343 unicode_input_start(); register_hex(0x005f); unicode_input_finish();
344 unicode_input_start(); register_hex(0x25d5); unicode_input_finish();
345 TAP_ONCE (KC_SPC);
346 unicode_input_start(); register_hex(0x0f3d); unicode_input_finish();
347 unicode_input_start(); register_hex(0x3064); unicode_input_finish();
348 break;
349 case SMILE:
350 unicode_input_start(); register_hex(0x0298); unicode_input_finish();
351 unicode_input_start(); register_hex(0x203f); unicode_input_finish();
352 unicode_input_start(); register_hex(0x0298); unicode_input_finish();
353 break;
354 case SMILE2:
355 unicode_input_start(); register_hex(0x0028); unicode_input_finish();
356 unicode_input_start(); register_hex(0x0298); unicode_input_finish();
357 unicode_input_start(); register_hex(0x203f); unicode_input_finish();
358 unicode_input_start(); register_hex(0x0298); unicode_input_finish();
359 unicode_input_start(); register_hex(0x0029); unicode_input_finish();
360 break;
361 case HMM1:
362 unicode_input_start(); register_hex(0x0ca0); unicode_input_finish();
363 unicode_input_start(); register_hex(0x005f); unicode_input_finish();
364 unicode_input_start(); register_hex(0x0ca0); unicode_input_finish();
365 break;
366 case HMM2:
367 unicode_input_start(); register_hex(0x0028); unicode_input_finish();
368 unicode_input_start(); register_hex(0x0ca0); unicode_input_finish();
369 unicode_input_start(); register_hex(0x005f); unicode_input_finish();
370 unicode_input_start(); register_hex(0x0ca0); unicode_input_finish();
371 unicode_input_start(); register_hex(0x0029); unicode_input_finish();
372 break;
373 case BEAR1:
374 unicode_input_start(); register_hex(0x0295); unicode_input_finish();
375 unicode_input_start(); register_hex(0x2022); unicode_input_finish();
376 unicode_input_start(); register_hex(0x1d25); unicode_input_finish();
377 unicode_input_start(); register_hex(0x2022); unicode_input_finish();
378 unicode_input_start(); register_hex(0x0294); unicode_input_finish();
379 break;
380 case BEAR2:
381 unicode_input_start(); register_hex(0x0028); unicode_input_finish();
382 unicode_input_start(); register_hex(0x1d54); unicode_input_finish();
383 unicode_input_start(); register_hex(0x1d25); unicode_input_finish();
384 unicode_input_start(); register_hex(0x1d54); unicode_input_finish();
385 unicode_input_start(); register_hex(0x0029); unicode_input_finish();
386 break;
387 case FUU:
388 unicode_input_start(); register_hex(0x256d); unicode_input_finish();
389 unicode_input_start(); register_hex(0x2229); unicode_input_finish();
390 unicode_input_start(); register_hex(0x256e); unicode_input_finish();
391 unicode_input_start(); register_hex(0x0028); unicode_input_finish();
392 unicode_input_start(); register_hex(0x002d); unicode_input_finish();
393 unicode_input_start(); register_hex(0x005f); unicode_input_finish();
394 unicode_input_start(); register_hex(0x002d); unicode_input_finish();
395 unicode_input_start(); register_hex(0x0029); unicode_input_finish();
396 unicode_input_start(); register_hex(0x256d); unicode_input_finish();
397 unicode_input_start(); register_hex(0x2229); unicode_input_finish();
398 unicode_input_start(); register_hex(0x256e); unicode_input_finish();
399 break;
400 case EGGY1:
401 unicode_input_start(); register_hex(0x0028); unicode_input_finish();
402 unicode_input_start(); register_hex(0x256f); unicode_input_finish();
403 unicode_input_start(); register_hex(0x00b0); unicode_input_finish();
404 unicode_input_start(); register_hex(0x25a1); unicode_input_finish();
405 unicode_input_start(); register_hex(0x00b0); unicode_input_finish();
406 unicode_input_start(); register_hex(0xff09); unicode_input_finish();
407 unicode_input_start(); register_hex(0x256f); unicode_input_finish();
408 break;
409 case EGGY2:
410 unicode_input_start(); register_hex(0x30ce); unicode_input_finish();
411 unicode_input_start(); register_hex(0x0028); unicode_input_finish();
412 unicode_input_start(); register_hex(0x0020); unicode_input_finish();
413 unicode_input_start(); register_hex(0x309c); unicode_input_finish();
414 unicode_input_start(); register_hex(0x002d); unicode_input_finish();
415 unicode_input_start(); register_hex(0x309c); unicode_input_finish();
416 unicode_input_start(); register_hex(0x30ce); unicode_input_finish();
417 unicode_input_start(); register_hex(0x0029); unicode_input_finish();
418 break;
419 case FACE1:
420 unicode_input_start(); register_hex(0x0028); unicode_input_finish();
421 unicode_input_start(); register_hex(0x002d); unicode_input_finish();
422 unicode_input_start(); register_hex(0x005f); unicode_input_finish();
423 unicode_input_start(); register_hex(0x002d); unicode_input_finish();
424 unicode_input_start(); register_hex(0x0029); unicode_input_finish();
425 break;
426 case FACE2:
427 unicode_input_start(); register_hex(0x0028); unicode_input_finish();
428 unicode_input_start(); register_hex(0x2022); unicode_input_finish();
429 unicode_input_start(); register_hex(0x005f); unicode_input_finish();
430 unicode_input_start(); register_hex(0x2022); unicode_input_finish();
431 unicode_input_start(); register_hex(0x0029); unicode_input_finish();
432 break;
433 case UHU:
434 unicode_input_start(); register_hex(0x2299); unicode_input_finish();
435 unicode_input_start(); register_hex(0xfe4f); unicode_input_finish();
436 unicode_input_start(); register_hex(0x2299); unicode_input_finish();
437 break;
438 case SMRK1:
439 unicode_input_start(); register_hex(0x005e); unicode_input_finish();
440 unicode_input_start(); register_hex(0x032e); unicode_input_finish();
441 unicode_input_start(); register_hex(0x005e); unicode_input_finish();
442 break;
233 } 443 }
234 return false;
235 break; 444 break;
445 case EMOJI2:
446 switch(opt) {
447 case SMRK2:
448 unicode_input_start(); register_hex(0x0028); unicode_input_finish();
449 unicode_input_start(); register_hex(0x005e); unicode_input_finish();
450 unicode_input_start(); register_hex(0x032e); unicode_input_finish();
451 unicode_input_start(); register_hex(0x005e); unicode_input_finish();
452 unicode_input_start(); register_hex(0x0029); unicode_input_finish();
453 break;
454 case LOVE:
455 unicode_input_start(); register_hex(0x2665); unicode_input_finish();
456 unicode_input_start(); register_hex(0x203f); unicode_input_finish();
457 unicode_input_start(); register_hex(0x2665); unicode_input_finish();
458 break;
459 }
460 break;
461 }
236 } 462 }
237 return true;
238} 463}
239 464
465const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
466 if (record->event.pressed) {
467 switch(id) {
468 case RUN:
469 return MACRO( D(LCTL), T(I), U(LCTL), T(R), END );
470 break;
471 }
472 }
473 return MACRO_NONE;
474};
475
240// Runs just one time when the keyboard initializes. 476// Runs just one time when the keyboard initializes.
241void matrix_init_user(void) { 477void matrix_init_user(void) {
242 478 set_unicode_input_mode(UC_LNX);
243}; 479};
244 480
245// Runs constantly in the background, in a loop. 481// Runs constantly in the background, in a loop.
246void matrix_scan_user(void) { 482void matrix_scan_user(void) {
247
248 uint8_t layer = biton32(layer_state); 483 uint8_t layer = biton32(layer_state);
249 484
250 ergodox_board_led_off(); 485 ergodox_board_led_off();
@@ -254,12 +489,21 @@ void matrix_scan_user(void) {
254 switch (layer) { 489 switch (layer) {
255 case 1: 490 case 1:
256 ergodox_right_led_1_on(); 491 ergodox_right_led_1_on();
492 #ifdef RGBLIGHT_ENABLE
493 rgblight_setrgb(0xff,0x00,0x00);
494 #endif
257 break; 495 break;
258 case 2: 496 case 2:
259 ergodox_right_led_2_on(); 497 ergodox_right_led_2_on();
498 #ifdef RGBLIGHT_ENABLE
499 rgblight_setrgb(0x00,0xff,0x00);
500 #endif
260 break; 501 break;
261 case 3: 502 case 3:
262 ergodox_right_led_3_on(); 503 ergodox_right_led_3_on();
504 #ifdef RGBLIGHT_ENABLE
505 rgblight_setrgb(0x00,0x00,0xff);
506 #endif
263 break; 507 break;
264 case 4: 508 case 4:
265 ergodox_right_led_1_on(); // TODO: Make a fourth layer 509 ergodox_right_led_1_on(); // TODO: Make a fourth layer
diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md
index 809dd6eb5..fa41f0ec1 100644
--- a/keyboards/ergodox/keymaps/deadcyclo/readme.md
+++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md
@@ -1,9 +1,11 @@
1# ErgoDox EZ 1337 configuration 1# ErgoDox EZ 1337 configuration
2 2
3Custom layout based on the default layout. Intended for interational users of us intl-altgr layout. Note that 3Custom layout based on the default layout. Intended for interational
4some common keys might be missing, as this layout is intented to be used on *nix systems by users familiar 4users of us intl-altgr layout. Note that some common keys might be
5with their system. The layout is geared towards avoiding using the rat (mouse for those of you who are 5missing, as this layout is intented to be used on *nix systems by
6unfamiliar with tiling window managers) as much as possibly. 6users familiar with their system. The layout is geared towards
7avoiding using the rat (mouse for those of you who are unfamiliar with
8tiling window managers) as much as possibly.
7 9
8# Layouts 10# Layouts
9 11
@@ -13,24 +15,58 @@ All layer images created using [keyboard-layout-editor](http://www.keyboard-layo
13 15
14[![Base layer](images/deadcyclo-base-layout.png)](http://www.keyboard-layout-editor.com/#/gists/0321b18620180a3e46c498206eb65366) 16[![Base layer](images/deadcyclo-base-layout.png)](http://www.keyboard-layout-editor.com/#/gists/0321b18620180a3e46c498206eb65366)
15 17
16## Layer 1 - Symbols 18The base layer here is marked with the us international alt-gr layout,
19including characters bound to what on an iso keyboard would be alt-gr
20and on an ansi keyboard right alt.
17 21
18[![Layer 1 - Symbols](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) 22Regular (and irregular) modifier keys are marked with a yellowish
23gray. Layer moderators are marked with blue, red and green, which are
24the same colors each layer displays on the LEDs when active.
19 25
20## Layer 2 - Media and Mouse 26All of the layer switch keys, except for the two center keys marked L1
27TOG, are dual purpose. Hence for example the top left key produces ESC
28if tapped, and temporarilly toggles L3 when hold down. The two center
29L1 TOG keys toggle L1 on and off for more permanent layer toggling.
21 30
22[![Layer 2 - Media and Mouse](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731) 31The UNI keys enter the linux ibus unicode composer mode
32(ie. Ctrl+Shift+u). Use this to enter unicode characters. Hit the key,
33type in the unicode hex value, and hit enter.
23 34
24## Layer 3 - Navigation 35## Layer 1 - Symbols and RGB
25 36
26[![Layer 3 - Navigation](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) 37[![Layer 1 - Symbols and RGB](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73)
38
39The Symbols and RGB layer contains function keys, commonly used
40symbols, a numpad and if you have the new Ergodox Ez shine keys for
41controlling various RGB-led functions. In addition, it provides an up
42and a down key for easy scrolling. RGB controller keys are yellow.
43
44## Layer 2 - Media, Mouse and Navigation
45
46[![Layer 2 - Media, Mouse and Navigation](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731)
47
48The Media, Mouse and unicode layer contains special keys for moving
49the mouse and clicking on it with the keyboard. In addition it
50provides standard media control keys, and default arrow keys.
51
52## Layer 3 - Unicode
53
54[![Layer 3 - Unicode](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289)
55
56The unicode layer provides keys for directly typing unicode (utf-8)
27 57
28# Changelog 58# Changelog
29 59
30- 02.01.2017 Added delete key on second layer 60- 02.01.2017 Added delete key on second layer
31- 10.01.2017 Added layer images to readme 61- 10.01.2017 Added layer images to readme
62- 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand
63- 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2
64- 25.01.2017 Added lots of new emojis and some unicode keys
65- 27.01.2017 Added new unicode keys and shortcut for ibus unicode composer key (CTRL+SHIFT+U)
32 66
33# TODO 67# TODO
34 68
35- Add unicode support (direct input and indirect? see algernon layout for examples) 69- Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?)
36- Add descriptions below each layer image of any special functions/keys 70- Make macros for gnu screen and i3wm
71- Look into the app launch macros in algernon keymap
72
diff --git a/keyboards/ergodox/keymaps/german-kinergo/readme.md b/keyboards/ergodox/keymaps/german-kinergo/readme.md
index 557d85a8a..beb74cf75 100644
--- a/keyboards/ergodox/keymaps/german-kinergo/readme.md
+++ b/keyboards/ergodox/keymaps/german-kinergo/readme.md
@@ -2,7 +2,7 @@
2 2
3This layout is inspired by the "kinesis-qwerty-mod" from benblazak's 3This layout is inspired by the "kinesis-qwerty-mod" from benblazak's
4[ergodox-firmware](https://github.com/benblazak/ergodox-firmware), as well as by the "german" layout from the 4[ergodox-firmware](https://github.com/benblazak/ergodox-firmware), as well as by the "german" layout from the
5[qmk_firmware](https://github.com/jackhumbert/qmk_firmware). 5[qmk_firmware](https://github.com/qmk/qmk_firmware).
6The goal was to have a layout that is pretty close to an ordinary German 6The goal was to have a layout that is pretty close to an ordinary German
7keyboard, so I don't have to make adjustments on the operating system level 7keyboard, so I don't have to make adjustments on the operating system level
8and I keep some of the muscle memory to use a regular keyboard. 8and I keep some of the muscle memory to use a regular keyboard.
diff --git a/keyboards/ergodox/keymaps/mclennon_osx/README.md b/keyboards/ergodox/keymaps/mclennon_osx/README.md
index 60980d043..28cdb7c10 100644
--- a/keyboards/ergodox/keymaps/mclennon_osx/README.md
+++ b/keyboards/ergodox/keymaps/mclennon_osx/README.md
@@ -2,4 +2,4 @@
2 2
3This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock. 3This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock.
4 4
5If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/jackhumbert/qmk_firmware/). 5If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/qmk/qmk_firmware/).
diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c
index 302c41cc8..5c01d9678 100644
--- a/keyboards/ergodox/keymaps/ordinary/keymap.c
+++ b/keyboards/ergodox/keymaps/ordinary/keymap.c
@@ -1,5 +1,6 @@
1#include "ergodox.h" 1#include "ergodox.h"
2#include "led.h" 2#include "led.h"
3#include "mousekey.h"
3#include "debug.h" 4#include "debug.h"
4#include "action_layer.h" 5#include "action_layer.h"
5#include "action_util.h" 6#include "action_util.h"
diff --git a/keyboards/ergodox/keymaps/pvinis/Readme.md b/keyboards/ergodox/keymaps/pvinis/Readme.md
index 2a4a0c8f3..af2721054 100644
--- a/keyboards/ergodox/keymaps/pvinis/Readme.md
+++ b/keyboards/ergodox/keymaps/pvinis/Readme.md
@@ -59,7 +59,7 @@ I have two commented out layers that are just templates, so I can easily create
59# Building 59# Building
60 60
61``` 61```
62$ git clone https://github.com/jackhumbert/qmk_firmware.git 62$ git clone https://github.com/qmk/qmk_firmware.git
63$ cd qmk_firmware/keyboards/ergodox/keymaps/pvinis 63$ cd qmk_firmware/keyboards/ergodox/keymaps/pvinis
64$ make 64$ make
65``` 65```
diff --git a/keyboards/ergodox/keymaps/robot_test_layout/keymap.c b/keyboards/ergodox/keymaps/robot_test_layout/keymap.c
index 480be177f..e9e2597d7 100644
--- a/keyboards/ergodox/keymaps/robot_test_layout/keymap.c
+++ b/keyboards/ergodox/keymaps/robot_test_layout/keymap.c
@@ -68,7 +68,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
68 case RGB_FF0000: 68 case RGB_FF0000:
69 if (record->event.pressed) { 69 if (record->event.pressed) {
70 #ifdef RGBLIGHT_ENABLE 70 #ifdef RGBLIGHT_ENABLE
71 EZ_RGB(0xff0000); 71 EZ_RGB(0xff0000UL);
72 register_code(KC_1); unregister_code(KC_1); 72 register_code(KC_1); unregister_code(KC_1);
73 #endif 73 #endif
74 } 74 }
@@ -77,7 +77,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
77 case RGB_00FF00: 77 case RGB_00FF00:
78 if (record->event.pressed) { 78 if (record->event.pressed) {
79 #ifdef RGBLIGHT_ENABLE 79 #ifdef RGBLIGHT_ENABLE
80 EZ_RGB(0x00ff00); 80 EZ_RGB(0x00ff00UL);
81 register_code(KC_2); unregister_code(KC_2); 81 register_code(KC_2); unregister_code(KC_2);
82 #endif 82 #endif
83 } 83 }
@@ -86,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
86 case RGB_0000FF: 86 case RGB_0000FF:
87 if (record->event.pressed) { 87 if (record->event.pressed) {
88 #ifdef RGBLIGHT_ENABLE 88 #ifdef RGBLIGHT_ENABLE
89 EZ_RGB(0x0000ff); 89 EZ_RGB(0x0000ffUL);
90 register_code(KC_3); unregister_code(KC_3); 90 register_code(KC_3); unregister_code(KC_3);
91 #endif 91 #endif
92 } 92 }
@@ -95,7 +95,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
95 case RGB_FFFFFF: 95 case RGB_FFFFFF:
96 if (record->event.pressed) { 96 if (record->event.pressed) {
97 #ifdef RGBLIGHT_ENABLE 97 #ifdef RGBLIGHT_ENABLE
98 EZ_RGB(0xffffff); 98 EZ_RGB(0xffffffUL);
99 register_code(KC_4); unregister_code(KC_4); 99 register_code(KC_4); unregister_code(KC_4);
100 #endif 100 #endif
101 } 101 }
diff --git a/keyboards/ergodox/keymaps/software_neo2/keymap.c b/keyboards/ergodox/keymaps/software_neo2/keymap.c
index 41ace403d..571ca062c 100644
--- a/keyboards/ergodox/keymaps/software_neo2/keymap.c
+++ b/keyboards/ergodox/keymaps/software_neo2/keymap.c
@@ -1,7 +1,8 @@
1#include "ergodox.h" 1#include "ergodox.h"
2#include "debug.h" 2#include "debug.h"
3#include "led.h"
3#include "action_layer.h" 4#include "action_layer.h"
4#include "keymap_neo2.h" 5#include "keymap_extras/keymap_neo2.h"
5 6
6// Layer names 7// Layer names
7#define BASE 0 // default layer 8#define BASE 0 // default layer
@@ -11,45 +12,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
11/* Keymap 0: Basic layer 12/* Keymap 0: Basic layer
12 * 13 *
13 * ,--------------------------------------------------. ,--------------------------------------------------. 14 * ,--------------------------------------------------. ,--------------------------------------------------.
14 * | ^ | 1 | 2 | 3 | 4 | 5 | Play | | Next | 6 | 7 | 8 | 9 | 0 |BackSpce| 15 * | Del | 1 | 2 | 3 | 4 | 5 | Play | | Next | 6 | 7 | 8 | 9 | 0 | ß |
15 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| 16 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
16 * | Del | X | V | L | C | W | L1 | | L1 | K | H | G | F | Q | ß | 17 * | Tab | X | V | L | C | W | Esc | | Esc | K | H | G | F | Q | Y |
17 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 18 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
18 * | Caps | U | I | A | E | O |------| |------| S | N | R | T | D | Y | 19 * | NeoL1 | U | I | A | E | O |------| |------| S | N | R | T | D | NeoR1 |
19 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| 20 * |--------+------+------+------+------+------| L1 | | L1 |------+------+------+------+------+--------|
20 * | LShift |Ü/Ctrl| Ö/C-S| Ä/Alt| P | Z | | | | B | M | , | . | J | RShift | 21 * | LShift |Ü/Ctrl| Ö/Win| Ä/Alt| P | Z | | | | B | M | , | . | J | RShift |
21 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 22 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
22 * | L1 | Home | PgDn | PgUp | End | | Right| Down | Up | Left | Esc | 23 * |NeoL2 | Home | PgDn | PgUp | End | | Right| Down | Up | Left | NeoR2|
23 * `----------------------------------' `----------------------------------' 24 * `----------------------------------' `----------------------------------'
24 * ,-------------. ,-------------. 25 * ,-------------. ,---------------.
25 * | App | LGui | | Alt |Ctrl/Esc| 26 * | App | LGui | | Alt |Ctrl/Esc|
26 * ,------+------+------| |------+--------+------. 27 * ,------+------+------| |------+--------+------.
27 * | | |NeoL2 | |NeoL2 | | | 28 * | | | Enter| |Delete| | |
28 * | Tab |Backsp|------| |------| Space |Enter | 29 * | Space|Backsp|------| |------| Enter |Space |
29 * | |ace |NeoL1 | |NeoL1 | | | 30 * | |ace | Tab | | Esc | | |
30 * `--------------------' `----------------------' 31 * `--------------------' `----------------------'
31 */ 32 */
32// If it accepts an argument (i.e, is a function), it doesn't need KC_. 33// If it accepts an argument (i.e, is a function), it doesn't need KC_.
33// Otherwise, it needs KC_* 34// Otherwise, it needs KC_*
34[BASE] = KEYMAP( // layer 0 : default 35[BASE] = KEYMAP( // layer 0 : default
35 // left hand 36 // left hand
36 KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, 37 KC_DELT, NEO_1, NEO_2, NEO_3, NEO_4, NEO_5, KC_MPLY,
37 KC_DELT, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, TG(1), 38 KC_TAB, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_ESC,
38 KC_CAPS, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O, 39 NEO_L1_L, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O,
39 KC_LSFT, CTL_T(NEO_UE), C_S_T(NEO_OE), ALT_T(NEO_AE), NEO_P, NEO_Z, ALL_T(KC_NO), 40 KC_LSFT, CTL_T(NEO_UE), GUI_T(NEO_OE), ALT_T(NEO_AE), NEO_P, NEO_Z, TG(1),
40 DE_LESS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 41 NEO_L2_L, KC_HOME, KC_PGDN, KC_PGUP, KC_END,
41 ALT_T(KC_APP),KC_LGUI, 42 C_S_T(KC_ESC),KC_LGUI,
42 NEO_L2_L, 43 KC_ENT,
43 KC_TAB,KC_BSPC,NEO_L1_L, 44 KC_SPC,KC_BSPC,KC_TAB,
44 // right hand 45 // right hand
45 KC_MNXT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, 46 KC_MNXT, NEO_6, NEO_7, NEO_8, NEO_9, NEO_0, NEO_SS,
46 TG(1), NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_SS, 47 KC_ESC, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_Y,
47 NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_Y, 48 NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R,
48 MEH_T(KC_NO),NEO_B, NEO_M, KC_COMM, KC_DOT, NEO_J, KC_RSFT, 49 TG(1), NEO_B, NEO_M, NEO_COMM, NEO_DOT, NEO_J, KC_RSFT,
49 KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ESC, 50 KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, NEO_L2_R,
50 KC_LALT,CTL_T(KC_ESC), 51 KC_LALT,KC_RGUI,
51 NEO_L2_R, 52 KC_DELT,
52 NEO_L1_R,KC_SPC, KC_ENT 53 KC_ESC,KC_ENT, KC_SPC
53 ), 54 ),
54/* Keymap 1: Media and mouse keys 55/* Keymap 1: Media and mouse keys
55 * 56 *
@@ -127,13 +128,16 @@ void matrix_scan_user(void) {
127 ergodox_right_led_1_off(); 128 ergodox_right_led_1_off();
128 ergodox_right_led_2_off(); 129 ergodox_right_led_2_off();
129 ergodox_right_led_3_off(); 130 ergodox_right_led_3_off();
131 ergodox_board_led_off();
132
133 if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
134 ergodox_right_led_3_on();
135 }
136
130 switch (layer) { 137 switch (layer) {
131 case MDIA: 138 case MDIA:
132 ergodox_right_led_2_on(); 139 ergodox_right_led_2_on();
133 break; 140 break;
134 default:
135 ergodox_board_led_off();
136 break;
137 } 141 }
138 142
139}; 143};
diff --git a/keyboards/ergodox/keymaps/supercoder/readme.md b/keyboards/ergodox/keymaps/supercoder/readme.md
index 8ef96eddf..df39ac7a9 100644
--- a/keyboards/ergodox/keymaps/supercoder/readme.md
+++ b/keyboards/ergodox/keymaps/supercoder/readme.md
@@ -22,7 +22,7 @@ your own:
22 [hex]: https://raw.githubusercontent.com/algernon/ergodox-supercoder/master/supercoder.hex 22 [hex]: https://raw.githubusercontent.com/algernon/ergodox-supercoder/master/supercoder.hex
23 23
24``` 24```
25$ git clone https://github.com/jackhumbert/qmk_firmware.git 25$ git clone https://github.com/qmk/qmk_firmware.git
26$ cd qmk_firmware/keyboards/ergodox 26$ cd qmk_firmware/keyboards/ergodox
27$ git clone https://github.com/algernon/ergodox-supercoder.git keymaps/supercoder 27$ git clone https://github.com/algernon/ergodox-supercoder.git keymaps/supercoder
28$ make KEYMAP=supercoder 28$ make KEYMAP=supercoder
diff --git a/keyboards/ergodox/keymaps/win10_writers-block/readme.md b/keyboards/ergodox/keymaps/win10_writers-block/readme.md
index e51e3c48f..83f91bce2 100644
--- a/keyboards/ergodox/keymaps/win10_writers-block/readme.md
+++ b/keyboards/ergodox/keymaps/win10_writers-block/readme.md
@@ -90,7 +90,7 @@ Your LEDs will change to indicate your layer. You'll know you are in the base la
90 90
91To build, you will need the [QMK][qmk] firmware checked out. from there, dive into `keyboards/ergodox/keymaps/win10_writers-block/` 91To build, you will need the [QMK][qmk] firmware checked out. from there, dive into `keyboards/ergodox/keymaps/win10_writers-block/`
92 92
93[qmk]: https://github.com/jackhumbert/qmk_firmware 93[qmk]: https://github.com/qmk/qmk_firmware
94 94
95``` 95```
96$ make keyboard=ergodox keymap=win10_writers-block 96$ make keyboard=ergodox keymap=win10_writers-block
diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md
index ca3eeba59..45b3354c1 100644
--- a/keyboards/ergodox/readme.md
+++ b/keyboards/ergodox/readme.md
@@ -25,7 +25,7 @@ If none of the existing keymaps suit you, you can create your own custom
25keymap. This will require some experience with coding. Follow these steps 25keymap. This will require some experience with coding. Follow these steps
26to customize a keymap: 26to customize a keymap:
27 27
28 - Read the [qmk firmware README](https://github.com/jackhumbert/qmk_firmware) from top to bottom. Then come back here. :) 28 - Read the [qmk firmware README](https://github.com/qmk/qmk_firmware) from top to bottom. Then come back here. :)
29 29
30 - Clone the qmk_firmware repository 30 - Clone the qmk_firmware repository
31 31
diff --git a/keyboards/gonnerd/Makefile b/keyboards/gonnerd/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/gonnerd/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif
diff --git a/keyboards/gonnerd/config.h b/keyboards/gonnerd/config.h
new file mode 100644
index 000000000..cad8fe586
--- /dev/null
+++ b/keyboards/gonnerd/config.h
@@ -0,0 +1,43 @@
1#ifndef CONFIG_H
2#define CONFIG_H
3
4#include "config_common.h"
5
6/* USB Device descriptor parameter */
7#define VENDOR_ID 0xFEED
8#define PRODUCT_ID 0x6060
9#define DEVICE_VER 0x0001
10#define MANUFACTURER GON
11#define PRODUCT NerD
12#define DESCRIPTION QMK port for the GON Nerd PCB
13
14/* key matrix size */
15#define MATRIX_ROWS 10
16#define MATRIX_COLS 9
17
18/* backlight */
19#define BACKLIGHT_PIN B7
20#define BACKLIGHT_LEVELS 3
21
22/* matrix pins */
23#define MATRIX_ROW_PINS { B4, E2, F4, F7, F1, F6, C6, F5, D7, C7 }
24#define MATRIX_COL_PINS { E6, B0, B1, B2, B3, F0, D0, D5, D1 }
25#define UNUSED_PINS
26
27/* COL2ROW or ROW2COL */
28#define DIODE_DIRECTION COL2ROW
29
30/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
31#define DEBOUNCING_DELAY 5
32
33/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
34#define LOCKING_SUPPORT_ENABLE
35/* Locking resynchronize hack */
36#define LOCKING_RESYNC_ENABLE
37
38/* key combination for magic key command */
39#define IS_COMMAND() ( \
40 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
41)
42
43#endif
diff --git a/keyboards/gonnerd/gonnerd.c b/keyboards/gonnerd/gonnerd.c
new file mode 100644
index 000000000..f25d3a85f
--- /dev/null
+++ b/keyboards/gonnerd/gonnerd.c
@@ -0,0 +1 @@
#include "gonnerd.h"
diff --git a/keyboards/gonnerd/gonnerd.h b/keyboards/gonnerd/gonnerd.h
new file mode 100644
index 000000000..e5070328e
--- /dev/null
+++ b/keyboards/gonnerd/gonnerd.h
@@ -0,0 +1,42 @@
1#ifndef GONNERD_H
2#define GONNERD_H
3
4#include "quantum.h"
5
6#define KEYMAP_TKL( \
7 K08, K09, K18, K19, K28, K29, K38, K39, K48, K49, K58, K59, K68, K69, K88, K89, \
8 K00, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, K80, K81, K84, \
9 K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, K82, K83, K85, \
10 K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
11 K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, K86, \
12 K06, K05, K78, K70, K72, K73, K74, K75, K76, K77, K87 \
13) \
14{ \
15 { K00, K10, K20, K30, K40, K50, K60, K70, K80 }, \
16 { K01, K11, K21, K31, K41, K51, K61, K71, K81 }, \
17 { K02, K12, K22, K32, K42, K52, K62, K72, K82 }, \
18 { K03, K13, K23, K33, K43, K53, K63, K73, K83 }, \
19 { K04, K14, K24, K34, K44, K54, K64, K74, K84 }, \
20 { K05, K15, K25, K35, K45, K55, K65, K75, K85 }, \
21 { K06, K16, K26, K36, K46, K56, K66, K76, K86 }, \
22 { K07, K17, K27, K37, K47, K57, K67, K77, K87 }, \
23 { K08, K18, K28, K38, K48, K58, K68, K78, K88 }, \
24 { K09, K19, K29, K39, K49, K59, K69, K79, K89 } \
25}
26
27#define KEYMAP_60( \
28 K08, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, \
29 K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, \
30 K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
31 K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, \
32 K06, K05, K78, K70, K72, K73, K74, K75 \
33) KEYMAP_TKL( \
34 K08, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
35 KC_NO, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, KC_NO, KC_NO, KC_NO, \
36 K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, KC_NO, KC_NO, KC_NO, \
37 K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
38 K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, KC_NO, \
39 K06, K05, K78, K70, K72, K73, K74, K75, KC_NO, KC_NO, KC_NO \
40)
41
42#endif
diff --git a/keyboards/gonnerd/keymaps/default/Makefile b/keyboards/gonnerd/keymaps/default/Makefile
new file mode 100644
index 000000000..772d7aee3
--- /dev/null
+++ b/keyboards/gonnerd/keymaps/default/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 = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # 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 = no # 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif
diff --git a/keyboards/gonnerd/keymaps/default/keymap.c b/keyboards/gonnerd/keymaps/default/keymap.c
new file mode 100644
index 000000000..a37005939
--- /dev/null
+++ b/keyboards/gonnerd/keymaps/default/keymap.c
@@ -0,0 +1,16 @@
1#include "gonnerd.h"
2
3// Keymap layers
4
5const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
6 [0] = KEYMAP_60( /* Base */
7 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_BSPC,\
8 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,\
9 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, \
10 KC_LSFT,KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_NO, \
11 KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL),
12};
13
14const uint16_t PROGMEM fn_actions[] = {
15
16};
diff --git a/keyboards/gonnerd/keymaps/mauin/Makefile b/keyboards/gonnerd/keymaps/mauin/Makefile
new file mode 100644
index 000000000..772d7aee3
--- /dev/null
+++ b/keyboards/gonnerd/keymaps/mauin/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 = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # 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 = no # 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif
diff --git a/keyboards/gonnerd/keymaps/mauin/keymap.c b/keyboards/gonnerd/keymaps/mauin/keymap.c
new file mode 100644
index 000000000..1a1d515a9
--- /dev/null
+++ b/keyboards/gonnerd/keymaps/mauin/keymap.c
@@ -0,0 +1,78 @@
1#include "gonnerd.h"
2
3// Keymap layers
4#define BASE_LAYER 0
5#define FUNCTION_LAYER 1
6#define SYSTEM_LAYER 2
7
8// Key aliases
9#define __x__ KC_NO
10
11const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
12 /* Layer 0: Default Layer
13 * ,-----------------------------------------------------------.
14 * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| = | BSp |
15 * |-----------------------------------------------------------|
16 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
17 * |-----------------------------------------------------------|
18 * |Funct | A| S| D| F| G| H| J| K| L| ;| '|Enter |
19 * |-----------------------------------------------------------|
20 * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift |
21 * |-----------------------------------------------------------'
22 * | Ctl|Alt|Gui | Space |Gui |Alt| F2| Ctl |
23 * `-----------------------------------------------------------'
24 */
25 [BASE_LAYER] = KEYMAP_60(
26 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_BSPC, \
27 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, \
28 MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \
29 KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \
30 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(3), KC_RCTL \
31 ),
32
33 /* Layer 1: Function Layer
34 * ,-----------------------------------------------------------.
35 * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11| F12| Del |
36 * |-----------------------------------------------------------|
37 * | |Prv|Ply|Nxt| | |Pg^|Hme|Up |End| |Br-|Br+| |
38 * |-----------------------------------------------------------|
39 * |Hold |Mte|Vl-|Vl+| | |Pgv|Lft|Dwn|Rgt| | | |
40 * |-----------------------------------------------------------|
41 * | | | | | | | | | | | | |
42 * |-----------------------------------------------------------'
43 * | | | | | | | | |
44 * `-----------------------------------------------------------'
45 */
46 [FUNCTION_LAYER] = KEYMAP_60(
47 KC_GRV, 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_DEL, \
48 __x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \
49 KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \
50 KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
51 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \
52 ),
53
54 /* Layer 2: System Layer
55 * ,-----------------------------------------------------------.
56 * |Reset| | | | | | | | | | | | | |
57 * |-----------------------------------------------------------|
58 * | | | | | | | | | | | | | | |
59 * |-----------------------------------------------------------|
60 * | | | | | | | | | | | | | |
61 * |-----------------------------------------------------------|
62 * | | | | | | | | | | | | |
63 * |-----------------------------------------------------------'
64 * | | | | | | | | |
65 * `-----------------------------------------------------------'
66 */
67 [SYSTEM_LAYER] = KEYMAP_60(
68 RESET, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
69 __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
70 __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
71 __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
72 __x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \
73 ),
74};
75
76const uint16_t PROGMEM fn_actions[] = {
77
78};
diff --git a/keyboards/gonnerd/keymaps/mauin/readme.md b/keyboards/gonnerd/keymaps/mauin/readme.md
new file mode 100644
index 000000000..63be7c392
--- /dev/null
+++ b/keyboards/gonnerd/keymaps/mauin/readme.md
@@ -0,0 +1,5 @@
1# Mauin's keymap for the GON NerD
2
3This layout is based on a Pok3r style layout with a standard base layer.
4
5Function layers provide access to navigation and media keys.
diff --git a/keyboards/gonnerd/readme.md b/keyboards/gonnerd/readme.md
new file mode 100644
index 000000000..1224ff6b0
--- /dev/null
+++ b/keyboards/gonnerd/readme.md
@@ -0,0 +1,34 @@
1GON NerD keyboard firmware
2======================
3
4## Changing Bootloader
5
6It's not possible to simply flash this firmware on the GON NerD keyboard as the original bootloader does not support DFU connections.
7
8It is possible to change the bootloader of the GON NerD with an ISP programmer. A guide on how to change the bootloader on your GON NerD can be found here:
9[Converting NerD60 to TMK](https://deskthority.net/wiki/Converting_NerD60_to_TMK). After changing the bootloader you can flash your QMK keymap onto the keyboard.
10
11_After changing the bootloader on your GON NerD PCB you will not be able to go back to the original firmware and the official configuration software will
12not work anymore. You will lose your warranty and official support from GON!_
13
14## Building
15
16Download or clone the whole firmware and navigate to the keyboards/gonnerd 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.
17
18Depending on which keymap you would like to use, you will have to compile slightly differently.
19
20### Default
21
22To build with the default keymap, simply run `make default`.
23
24### Other Keymaps
25
26Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
27
28To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
29
30```
31$ make [default|jack|<name>]
32```
33
34Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/gonnerd/rules.mk b/keyboards/gonnerd/rules.mk
new file mode 100644
index 000000000..c9b584d54
--- /dev/null
+++ b/keyboards/gonnerd/rules.mk
@@ -0,0 +1,66 @@
1# MCU name
2MCU = atmega32u4
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 = 8000000
16
17
18#
19# LUFA specific
20#
21# Target architecture (see library "Board Types" documentation).
22ARCH = AVR8
23
24# Input clock frequency.
25# This will define a symbol, F_USB, in all source code files equal to the
26# input clock frequency (before any prescaling is performed) in Hz. This value may
27# differ from F_CPU if prescaling is used on the latter, and is required as the
28# raw input clock is fed directly to the PLL sections of the AVR for high speed
29# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
30# at the end, this will be done automatically to create a 32-bit value in your
31# source code.
32#
33# If no clock division is performed on the input clock inside the AVR (via the
34# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
35F_USB = $(F_CPU)
36
37# Interrupt driven control endpoint task(+60)
38OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
39
40
41# Boot Section Size in *bytes*
42# Teensy halfKay 512
43# Teensy++ halfKay 1024
44# Atmel DFU loader 4096
45# LUFA bootloader 4096
46# USBaspLoader 2048
47OPT_DEFS += -DBOOTLOADER_SIZE=4096
48
49
50# Build Options
51# change yes to no to disable
52#
53BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
54MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
55EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
56CONSOLE_ENABLE ?= no # Console for debug(+400)
57COMMAND_ENABLE ?= yes # Commands for debug and configuration
58 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
59SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
60 # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
61NKRO_ENABLE ?= no # USB Nkey Rollover
62BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default
63MIDI_ENABLE ?= no # MIDI controls
64UNICODE_ENABLE ?= no # Unicode
65BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
66AUDIO_ENABLE ?= no # Audio output on port C6
diff --git a/keyboards/handwired/onekey/keymaps/default/keymap.c b/keyboards/handwired/onekey/keymaps/default/keymap.c
index 756c4f51e..10c486718 100644
--- a/keyboards/handwired/onekey/keymaps/default/keymap.c
+++ b/keyboards/handwired/onekey/keymaps/default/keymap.c
@@ -1,5 +1,5 @@
1#include "onekey.h" 1#include "onekey.h"
2 2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4 { KC_A } 4 {{ KC_A }}
5}; 5};
diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h
index 23fbfd0b9..fd45c2bfe 100644
--- a/keyboards/handwired/promethium/config.h
+++ b/keyboards/handwired/promethium/config.h
@@ -43,38 +43,107 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
43#define MATRIX_ROW_PINS { D7, C6, D0, D1, F5, F4, F1, F0 } 43#define MATRIX_ROW_PINS { D7, C6, D0, D1, F5, F4, F1, F0 }
44#define UNUSED_PINS 44#define UNUSED_PINS
45 45
46/* COL2ROW or ROW2COL */ 46/*
47 * Keyboard Matrix Assignments
48 *
49 * Change this to how you wired your keyboard
50 * COLS: AVR pins used for columns, left to right
51 * ROWS: AVR pins used for rows, top to bottom
52 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
53 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
54 *
55*/
47#define DIODE_DIRECTION COL2ROW 56#define DIODE_DIRECTION COL2ROW
48 57
49/* define if matrix has ghost */ 58// #define BACKLIGHT_PIN B7
59// #define BACKLIGHT_BREATHING
60// #define BACKLIGHT_LEVELS 3
61
62/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
63#define DEBOUNCING_DELAY 5
64
65/* define if matrix has ghost (lacks anti-ghosting diodes) */
50//#define MATRIX_HAS_GHOST 66//#define MATRIX_HAS_GHOST
51 67
52/* number of backlight levels */ 68/* number of backlight levels */
53#define BACKLIGHT_LEVELS 3
54
55/* Set 0 if debouncing isn't needed */
56#define DEBOUNCING_DELAY 5
57 69
58/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ 70/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
59#define LOCKING_SUPPORT_ENABLE 71// #define LOCKING_SUPPORT_ENABLE
60/* Locking resynchronize hack */ 72/* Locking resynchronize hack */
61#define LOCKING_RESYNC_ENABLE 73// #define LOCKING_RESYNC_ENABLE
74
75/*
76 * Force NKRO
77 *
78 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
79 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
80 * makefile for this to work.)
81 *
82 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
83 * until the next keyboard reset.
84 *
85 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
86 * fully operational during normal computer usage.
87 *
88 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
89 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
90 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
91 * power-up.
92 *
93 */
94//#define FORCE_NKRO
62 95
63/* key combination for command */ 96/* key combination for command */
64#define IS_COMMAND() ( \ 97#define IS_COMMAND() ( \
65 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \ 98 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \
66) 99)
67 100
101/* control how magic key switches layers */
102//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
103//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
104//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
105
106/* override magic key keymap */
107//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
108//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
110//#define MAGIC_KEY_HELP1 H
111//#define MAGIC_KEY_HELP2 SLASH
112//#define MAGIC_KEY_DEBUG D
113//#define MAGIC_KEY_DEBUG_MATRIX X
114//#define MAGIC_KEY_DEBUG_KBD K
115//#define MAGIC_KEY_DEBUG_MOUSE M
116//#define MAGIC_KEY_VERSION V
117//#define MAGIC_KEY_STATUS S
118//#define MAGIC_KEY_CONSOLE C
119//#define MAGIC_KEY_LAYER0_ALT1 ESC
120//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
121//#define MAGIC_KEY_LAYER0 0
122//#define MAGIC_KEY_LAYER1 1
123//#define MAGIC_KEY_LAYER2 2
124//#define MAGIC_KEY_LAYER3 3
125//#define MAGIC_KEY_LAYER4 4
126//#define MAGIC_KEY_LAYER5 5
127//#define MAGIC_KEY_LAYER6 6
128//#define MAGIC_KEY_LAYER7 7
129//#define MAGIC_KEY_LAYER8 8
130//#define MAGIC_KEY_LAYER9 9
131//#define MAGIC_KEY_BOOTLOADER PAUSE
132//#define MAGIC_KEY_LOCK CAPS
133//#define MAGIC_KEY_EEPROM E
134//#define MAGIC_KEY_NKRO N
135//#define MAGIC_KEY_SLEEP_LED Z
136
68/* 137/*
69 * Feature disable options 138 * Feature disable options
70 * These options are also useful to firmware size reduction. 139 * These options are also useful to firmware size reduction.
71 */ 140 */
72 141
73/* disable debug print */ 142/* disable debug print */
74//#define NO_DEBUG 143// #define NO_DEBUG
75 144
76/* disable print */ 145/* disable print */
77//#define NO_PRINT 146// #define NO_PRINT
78 147
79/* disable action features */ 148/* disable action features */
80//#define NO_ACTION_LAYER 149//#define NO_ACTION_LAYER
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h
index 8b78c0dc4..53059ca7d 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/config.h
+++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h
@@ -14,4 +14,11 @@
14#define RGB_DI_PIN B5 14#define RGB_DI_PIN B5
15#define RGBSPS_NUM 57 15#define RGBSPS_NUM 57
16 16
17#define LAYOUT_DVORAK
18#define LAYOUT_COLEMAK
19#define LAYOUT_NORMAN
20#define LAYOUT_WORKMAN
21
22#define DOUBLESPACE_LAYER_ENABLE
23
17#endif 24#endif
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
index 7ae269563..1ad34612e 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
@@ -3,40 +3,75 @@
3 3
4#include "promethium.h" 4#include "promethium.h"
5#include "action_layer.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" 6#include "eeconfig.h"
11#include "process_unicode.h" 7#include "process_unicode.h"
12#include "quantum.h" 8#include "quantum.h"
13#include "rgbsps.h" 9#include "rgbsps.h"
14#include "ps2_mouse.h" 10#include "ps2_mouse.h"
15#include "ps2.h" 11#include "ps2.h"
12#include "outputselect.h"
13#include "led.h"
16#define COUNT(x) (sizeof (x) / sizeof (*(x))) 14#define COUNT(x) (sizeof (x) / sizeof (*(x)))
17 15
18// #define RGBLED_NUM 5 16// Fillers to make layering clearer
19// struct cRGB led[RGBLED_NUM]; 17#define _______ KC_TRNS
18#define XXXXXXX KC_NO
19#define G(x) LGUI(x)
20#define KC_WWWB KC_WWW_BACK
21#define KC_WWWF KC_WWW_FORWARD
22
23// hybrid right-alt & scroll lock (mapped to Compose in OS)
24#undef KC_RALT
25#define KC_RALT MT(MOD_RALT, KC_SLCK)
26
27bool capslock = false;
28#ifdef DOUBLESPACE_LAYER_ENABLE
29bool lspace_active = false;
30bool rspace_active = false;
31bool lspace_emitted = false;
32bool rspace_emitted = false;
33bool space_layer_entered = false;
34#endif
20 35
36// glow
37enum glow_modes {
38 GLOW_NONE,
39 GLOW_MIN,
40 GLOW_FULL
41};
42uint8_t glow_mode = GLOW_MIN;
21 43
22extern keymap_config_t keymap_config; 44extern keymap_config_t keymap_config;
23 45
24enum layers { 46enum layers {
25 _QWERTY, 47 _QWERTY,
48 _DVORAK,
26 _COLEMAK, 49 _COLEMAK,
27 _WORKMAN, 50 _WORKMAN,
51 _NORMAN,
52
28 _PUNC, 53 _PUNC,
29 _NUM, 54 _NUM,
30 _FUNC, 55 _FUNC,
56
57 _GREEKU,
58 _GREEKL,
59
31 _EMOJI, 60 _EMOJI,
32 _GUI, 61 _GUI,
62 _SYS,
33}; 63};
34 64
65// double-space layer
66#define _SPACE _GUI
67
35enum planck_keycodes { 68enum planck_keycodes {
36 // layouts 69 // layouts
37 QWERTY = SAFE_RANGE, 70 QWERTY = SAFE_RANGE,
71 DVORAK,
38 COLEMAK, 72 COLEMAK,
39 WORKMAN, 73 WORKMAN,
74 NORMAN,
40 75
41 // layer switchers 76 // layer switchers
42 PUNC, 77 PUNC,
@@ -44,17 +79,19 @@ enum planck_keycodes {
44 FUNC, 79 FUNC,
45 EMOJI, 80 EMOJI,
46 GUI, 81 GUI,
82 GREEK,
47 83
48 // os switchers 84 // os switchers
49 LINUX, 85 LINUX,
50 WIN, 86 WIN,
51 OSX, 87 OSX,
52};
53 88
54// Fillers to make layering clearer 89 // others
55 90 LSPACE,
56#define _______ KC_TRNS 91 RSPACE,
57#define XXXXXXX KC_NO 92 GLOW,
93 AUDIO
94};
58 95
59// unicode map 96// unicode map
60 97
@@ -106,6 +143,59 @@ enum unicode_name {
106 SUN, // sun 143 SUN, // sun
107 MOON, // moon 144 MOON, // moon
108 SKULL, // skull 145 SKULL, // skull
146
147 // greek letters
148 UALPH,
149 UBETA,
150 UGAMM,
151 UDELT,
152 UEPSI,
153 UZETA,
154 UETA,
155 UTHET,
156 UIOTA,
157 UKAPP,
158 ULAMB,
159 UMU,
160 UNU,
161 UXI,
162 UOMIC,
163 UPI,
164 URHO,
165 USIGM,
166 UTAU,
167 UUPSI,
168 UPHI,
169 UCHI,
170 UPSI,
171 UOMEG,
172
173 LALPH,
174 LBETA,
175 LGAMM,
176 LDELT,
177 LEPSI,
178 LZETA,
179 LETA,
180 LTHET,
181 LIOTA,
182 LKAPP,
183 LLAMB,
184 LMU,
185 LNU,
186 LXI,
187 LOMIC,
188 LPI,
189 LRHO,
190 LSIGM,
191 LTAU,
192 LUPSI,
193 LPHI,
194 LCHI,
195 LPSI,
196 LOMEG,
197
198 FSIGM,
109}; 199};
110 200
111const uint32_t PROGMEM unicode_map[] = { 201const uint32_t PROGMEM unicode_map[] = {
@@ -156,19 +246,58 @@ const uint32_t PROGMEM unicode_map[] = {
156 [SUN] = 0x2600, 246 [SUN] = 0x2600,
157 [MOON] = 0x1F314, 247 [MOON] = 0x1F314,
158 [SKULL] = 0x1F480, 248 [SKULL] = 0x1F480,
159};
160
161 249
162// hybrid shift - = 250 // greek letters
163// #undef KC_LSFT 251 [UALPH] = 0x0391,
164// #define KC_LSFT MT(MOD_LSFT, KC_MINS) 252 [UBETA] = 0x0392,
165// #undef KC_RSFT 253 [UGAMM] = 0x0393,
166// #define KC_RSFT MT(MOD_LSFT, KC_EQL) 254 [UDELT] = 0x0394,
167 255 [UEPSI] = 0x0395,
168 256 [UZETA] = 0x0396,
169// hybrid right-gui & scroll lock (mapped to Compose in OS) 257 [UETA] = 0x0397,
170#undef KC_RCTL 258 [UTHET] = 0x0398,
171#define KC_RCTL MT(MOD_LCTL, KC_SLCK) 259 [UIOTA] = 0x0399,
260 [UKAPP] = 0x039A,
261 [ULAMB] = 0x039B,
262 [UMU] = 0x039C,
263 [UNU] = 0x039D,
264 [UXI] = 0x039E,
265 [UOMIC] = 0x039F,
266 [UPI] = 0x03A0,
267 [URHO] = 0x03A1,
268 [USIGM] = 0x03A3,
269 [UTAU] = 0x03A4,
270 [UUPSI] = 0x03A5,
271 [UPHI] = 0x03A6,
272 [UCHI] = 0x03A7,
273 [UPSI] = 0x03A8,
274 [UOMEG] = 0x03A9,
275 [LALPH] = 0x03B1,
276 [LBETA] = 0x03B2,
277 [LGAMM] = 0x03B3,
278 [LDELT] = 0x03B4,
279 [LEPSI] = 0x03B5,
280 [LZETA] = 0x03B6,
281 [LETA] = 0x03B7,
282 [LTHET] = 0x03B8,
283 [LIOTA] = 0x03B9,
284 [LKAPP] = 0x03BA,
285 [LLAMB] = 0x03BB,
286 [LMU] = 0x03BC,
287 [LNU] = 0x03BD,
288 [LXI] = 0x03BE,
289 [LOMIC] = 0x03BF,
290 [LPI] = 0x03C0,
291 [LRHO] = 0x03C1,
292 [LSIGM] = 0x03C3,
293 [LTAU] = 0x03C4,
294 [LUPSI] = 0x03C5,
295 [LPHI] = 0x03C6,
296 [LCHI] = 0x03C7,
297 [LPSI] = 0x03C8,
298 [LOMEG] = 0x03C9,
299 [FSIGM] = 0x03C2,
300};
172 301
173// RGBSPS 302// RGBSPS
174 303
@@ -207,6 +336,17 @@ const uint8_t PROGMEM LED_ALNUM[] = {
207 LED_RSPC 336 LED_RSPC
208}; 337};
209 338
339const uint8_t PROGMEM LED_HOMING[] = {
340 LED_A,
341 LED_S,
342 LED_D,
343 LED_F,
344 LED_J,
345 LED_K,
346 LED_L,
347 LED_SCLN
348};
349
210const uint8_t PROGMEM LED_MODS[] = { 350const uint8_t PROGMEM LED_MODS[] = {
211 LED_TAB, 351 LED_TAB,
212 LED_ESC, 352 LED_ESC,
@@ -244,149 +384,105 @@ const uint8_t PROGMEM LED_TRACKPOINT[] = {
244 LED_TRACKPOINT3, 384 LED_TRACKPOINT3,
245}; 385};
246 386
247void led_reset(void) { 387void led_turnoff_keys(void) {
248 for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { 388 for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) {
249 rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 15, 6, 0); 389 rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0);
250 } 390 }
251
252 for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { 391 for(uint8_t i = 0; i < COUNT(LED_MODS); i++) {
253 rgbsps_set(pgm_read_byte(&LED_MODS[i]), 15, 0, 0); 392 rgbsps_set(pgm_read_byte(&LED_MODS[i]), 0, 0, 0);
254 } 393 }
255
256 for(uint8_t i = 0; i < COUNT(LED_FN); i++) { 394 for(uint8_t i = 0; i < COUNT(LED_FN); i++) {
257 rgbsps_set(pgm_read_byte(&LED_FN[i]), 15, 15, 15); 395 rgbsps_set(pgm_read_byte(&LED_FN[i]), 0, 0, 0);
258 } 396 }
259} 397}
260 398
261void led_layer_normal(void) { 399void led_reset(void) {
262 rgbsps_set(LED_IND_FUNC, 0, 0, 0); 400 switch (glow_mode) {
263 rgbsps_set(LED_IND_NUM, 0, 0, 0); 401 case GLOW_NONE:
264 rgbsps_set(LED_IND_EMOJI, 0, 0, 0); 402 led_turnoff_keys();
265 403 break;
266 led_reset(); 404 case GLOW_MIN:
267 405 led_turnoff_keys();
268 rgbsps_send(); 406 for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) {
269} 407 rgbsps_set(pgm_read_byte(&LED_HOMING[i]), 8, 8, 8);
270 408 }
271void led_layer_func(void) { 409 rgbsps_set(LED_F, 15, 0, 0);
272 rgbsps_set(LED_IND_FUNC, 0, 15, 0); 410 rgbsps_set(LED_J, 15, 0, 0);
273 rgbsps_set(LED_IND_NUM, 0, 0, 0); 411 break;
274 rgbsps_set(LED_IND_EMOJI, 0, 0, 0); 412 case GLOW_FULL:
275 413 for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) {
276 led_reset(); 414 rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 8, 8, 8);
277 415 }
278 for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { 416 for(uint8_t i = 0; i < COUNT(LED_MODS); i++) {
279 rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); 417 rgbsps_set(pgm_read_byte(&LED_MODS[i]), 0, 15, 0);
418 }
419 for(uint8_t i = 0; i < COUNT(LED_FN); i++) {
420 rgbsps_set(pgm_read_byte(&LED_FN[i]), 0, 0, 15);
421 }
422 for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) {
423 rgbsps_set(pgm_read_byte(&LED_HOMING[i]), 15, 0, 0);
424 }
425 rgbsps_set(LED_F, 15, 15, 0);
426 rgbsps_set(LED_J, 15, 15, 0);
427 break;
280 } 428 }
281
282 rgbsps_set(LED_I, 15, 0, 15);
283 rgbsps_set(LED_J, 15, 0, 15);
284 rgbsps_set(LED_K, 15, 0, 15);
285 rgbsps_set(LED_L, 15, 0, 15);
286
287 rgbsps_set(LED_U, 15, 0, 0);
288 rgbsps_set(LED_O, 15, 0, 0);
289 rgbsps_set(LED_COMM, 15, 0, 0);
290 rgbsps_set(LED_DOT, 15, 0, 0);
291 rgbsps_set(LED_SCLN, 15, 0, 0);
292 rgbsps_set(LED_P, 15, 0, 0);
293
294 rgbsps_set(LED_Q, 0, 15, 0);
295 rgbsps_set(LED_W, 0, 15, 0);
296 rgbsps_set(LED_E, 0, 15, 0);
297 rgbsps_set(LED_R, 0, 15, 0);
298 rgbsps_set(LED_A, 0, 15, 0);
299 rgbsps_set(LED_S, 0, 15, 0);
300 rgbsps_set(LED_D, 0, 15, 0);
301 rgbsps_set(LED_F, 0, 15, 0);
302 rgbsps_set(LED_Z, 0, 15, 0);
303 rgbsps_set(LED_X, 0, 15, 0);
304 rgbsps_set(LED_C, 0, 15, 0);
305 rgbsps_set(LED_V, 0, 15, 0);
306
307 rgbsps_send();
308} 429}
309 430
310void led_layer_punc(void) { 431void led_set_layer_indicator(void) {
311 rgbsps_set(LED_IND_FUNC, 0, 15, 0); 432 static uint8_t oldlayer = 255;
312 rgbsps_set(LED_IND_NUM, 0, 0, 15);
313 rgbsps_set(LED_IND_EMOJI, 0, 0, 0);
314
315 led_reset();
316
317 rgbsps_send();
318}
319 433
320void led_layer_num(void) {
321 rgbsps_set(LED_IND_FUNC, 0, 0, 0); 434 rgbsps_set(LED_IND_FUNC, 0, 0, 0);
322 rgbsps_set(LED_IND_NUM, 0, 0, 15); 435 // rgbsps_set(LED_IND_NUM, 0, 0, 0);
323 rgbsps_set(LED_IND_EMOJI, 0, 0, 0); 436 rgbsps_set(LED_IND_EMOJI, 0, 0, 0);
324 437
325 led_reset(); 438 led_reset();
326 439
327 for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { 440 uint8_t layer = biton32(layer_state);
328 rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); 441 if (oldlayer == layer) {
442 return;
329 } 443 }
330 444
331 rgbsps_set(LED_U, 0, 5, 15); 445 oldlayer = layer;
332 rgbsps_set(LED_I, 0, 5, 15);
333 rgbsps_set(LED_O, 0, 5, 15);
334 rgbsps_set(LED_J, 0, 5, 15);
335 rgbsps_set(LED_K, 0, 5, 15);
336 rgbsps_set(LED_L, 0, 5, 15);
337 rgbsps_set(LED_M, 0, 5, 15);
338 rgbsps_set(LED_COMM, 0, 5, 15);
339 rgbsps_set(LED_DOT, 0, 5, 15);
340 rgbsps_set(LED_FUNC, 0, 5, 15);
341
342 rgbsps_set(LED_EMOJI, 0, 10, 15);
343 rgbsps_set(LED_RALT, 0, 10, 15);
344
345 rgbsps_set(LED_Q, 0, 10, 15);
346 rgbsps_set(LED_W, 0, 10, 15);
347 rgbsps_set(LED_E, 0, 10, 15);
348 rgbsps_set(LED_R, 0, 10, 15);
349 rgbsps_set(LED_T, 0, 10, 15);
350 rgbsps_set(LED_Y, 0, 10, 15);
351 rgbsps_set(LED_P, 0, 10, 15);
352
353 rgbsps_set(LED_A, 0, 15, 15);
354 rgbsps_set(LED_S, 0, 15, 15);
355 rgbsps_set(LED_D, 0, 15, 15);
356 rgbsps_set(LED_F, 0, 15, 15);
357 rgbsps_set(LED_Z, 0, 15, 15);
358 rgbsps_set(LED_X, 0, 15, 15);
359 rgbsps_set(LED_C, 0, 15, 15);
360 rgbsps_set(LED_V, 0, 15, 15);
361
362 rgbsps_send();
363}
364 446
365void led_layer_emoji(void) { 447 if (layer <= _NORMAN) {
366 for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { 448 rgbsps_send();
367 rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 15, 15, 0); 449 return;
368 }
369 for(uint8_t i = 0; i < COUNT(LED_MODS); i++) {
370 rgbsps_set(pgm_read_byte(&LED_MODS[i]), 15, 15, 0);
371 } 450 }
372 for(uint8_t i = 0; i < COUNT(LED_FN); i++) { 451
373 rgbsps_set(pgm_read_byte(&LED_FN[i]), 15, 15, 0); 452 switch(layer) {
453 case _FUNC:
454 rgbsps_set(LED_IND_FUNC, 15, 0, 0);
455 break;
456 // case _NUM:
457 // rgbsps_set(LED_IND_NUM, 0, 0, 15);
458 // break;
459 case _EMOJI:
460 rgbsps_set(LED_IND_EMOJI, 15, 15, 0);
461 break;
462 default:
463 rgbsps_set(LED_IND_FUNC, 3, 3, 3);
464 rgbsps_set(LED_IND_NUM, 3, 3, 3);
465 rgbsps_set(LED_IND_EMOJI, 3, 3, 3);
374 } 466 }
375 467
376 rgbsps_set(LED_IND_FUNC, 0, 0, 0); 468 rgbsps_send();
377 rgbsps_set(LED_IND_NUM, 0, 0, 0); 469}
378 rgbsps_set(LED_IND_EMOJI, 15, 15, 0);
379 470
380 rgbsps_set(LED_PUNC, 15, 15, 15); 471void led_set_output_ble(void) {
381 rgbsps_set(LED_EMOJI, 15, 15, 15); 472 rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15);
473 rgbsps_set(LED_IND_USB, 0, 0, 0);
474 rgbsps_send();
475}
382 476
477void led_set_output_usb(void) {
478 rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 0);
479 rgbsps_set(LED_IND_USB, 15, 15, 15);
383 rgbsps_send(); 480 rgbsps_send();
384} 481}
385 482
386void led_layer_gui(void) { 483void led_set_output_none(void) {
387 rgbsps_set(LED_IND_FUNC, 15, 10, 15); 484 rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 0);
388 rgbsps_set(LED_IND_NUM, 15, 10, 15); 485 rgbsps_set(LED_IND_USB, 0, 0, 0);
389 rgbsps_set(LED_IND_EMOJI, 15, 10, 15);
390 rgbsps_send(); 486 rgbsps_send();
391} 487}
392 488
@@ -398,13 +494,6 @@ void led_init(void) {
398 rgbsps_set(LED_TRACKPOINT1, 15, 0, 0); 494 rgbsps_set(LED_TRACKPOINT1, 15, 0, 0);
399 rgbsps_set(LED_TRACKPOINT2, 0, 0, 15); 495 rgbsps_set(LED_TRACKPOINT2, 0, 0, 15);
400 rgbsps_set(LED_TRACKPOINT3, 15, 0, 0); 496 rgbsps_set(LED_TRACKPOINT3, 15, 0, 0);
401
402 // // hardcode indicator for now
403 rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15);
404 rgbsps_set(LED_IND_USB, 15, 15, 15);
405 rgbsps_set(LED_IND_BATTERY, 0, 15, 0);
406
407 led_layer_normal();
408} 497}
409 498
410 499
@@ -416,20 +505,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
416 * ,-----------------------------------------------------------------------------------. 505 * ,-----------------------------------------------------------------------------------.
417 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | 506 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
418 * |------+------+------+------+------+-------------+------+------+------+------+------| 507 * |------+------+------+------+------+-------------+------+------+------+------+------|
419 * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | 508 * | Esc | A | S | D | F | G | H | J | K | L | ' |Enter |
420 * |------+------+------+------+------+------|------+------+------+------+------+------| 509 * |------+------+------+------+------+------|------+------+------+------+------+------|
421 * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | 510 * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift |
422 * |------+------+------+------+------+------+------+------+------+------+------+------| 511 * |------+------+------+------+------+------+------+------+------+------+------+------|
423 * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | 512 * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl |
424 * `-----------------------------------------------------------------------------------' 513 * `-----------------------------------------------------------------------------------'
425 */ 514 */
426[_QWERTY] = KEYMAP( 515[_QWERTY] = KEYMAP(
427 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, 516 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
428 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT , 517 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT ,
429 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, 518 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
430 KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL 519 KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, LSPACE, RSPACE, FUNC, GREEK, KC_RGUI, KC_RALT, KC_RCTL
431), 520),
432 521
522/* Dvorak
523 * ,-----------------------------------------------------------------------------------.
524 * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp |
525 * |------+------+------+------+------+-------------+------+------+------+------+------|
526 * | Esc | A | O | E | U | I | D | H | T | N | S |Enter |
527 * |------+------+------+------+------+------|------+------+------+------+------+------|
528 * | Shift| / | Q | J | K | X | B | M | W | V | Z |Shift |
529 * |------+------+------+------+------+------+------+------+------+------+------+------|
530 * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl |
531 * `-----------------------------------------------------------------------------------'
532 */
533#ifdef LAYOUT_DVORAK
534[_DVORAK] = KEYMAP(
535 _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______,
536 _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______,
537 _______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______,
538 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
539),
540#endif
541
433/* Colemak 542/* Colemak
434 * ,-----------------------------------------------------------------------------------. 543 * ,-----------------------------------------------------------------------------------.
435 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | 544 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
@@ -438,15 +547,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
438 * |------+------+------+------+------+------|------+------+------+------+------+------| 547 * |------+------+------+------+------+------|------+------+------+------+------+------|
439 * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | 548 * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift |
440 * |------+------+------+------+------+------+------+------+------+------+------+------| 549 * |------+------+------+------+------+------+------+------+------+------+------+------|
441 * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | 550 * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl |
442 * `-----------------------------------------------------------------------------------' 551 * `-----------------------------------------------------------------------------------'
443 */ 552 */
553
554#ifdef LAYOUT_COLEMAK
444[_COLEMAK] = KEYMAP( 555[_COLEMAK] = KEYMAP(
445 _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______, 556 _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______,
446 _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, 557 _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______,
447 _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, 558 _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
448 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 559 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
449), 560),
561#endif
562
563/* Norman
564 * ,-----------------------------------------------------------------------------------.
565 * | Tab | Q | W | D | F | K | J | U | R | L | ; | Bksp |
566 * |------+------+------+------+------+-------------+------+------+------+------+------|
567 * | Esc | A | S | E | T | G | Y | N | I | O | H |Enter |
568 * |------+------+------+------+------+------|------+------+------+------+------+------|
569 * | Shift| Z | X | C | V | B | P | M | , | . | / |Shift |
570 * |------+------+------+------+------+------+------+------+------+------+------+------|
571 * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl |
572 * `-----------------------------------------------------------------------------------'
573 */
574
575#ifdef LAYOUT_NORMAN
576[_NORMAN] = KEYMAP(
577 _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______,
578 _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______,
579 _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
580 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
581),
582#endif
450 583
451/* Workman 584/* Workman
452 * ,-----------------------------------------------------------------------------------. 585 * ,-----------------------------------------------------------------------------------.
@@ -456,50 +589,53 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
456 * |------+------+------+------+------+------|------+------+------+------+------+------| 589 * |------+------+------+------+------+------|------+------+------+------+------+------|
457 * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift | 590 * | Shift| Z | X | M | C | V | K | K | , | . | / |Shift |
458 * |------+------+------+------+------+------+------+------+------+------+------+------| 591 * |------+------+------+------+------+------+------+------+------+------+------+------|
459 * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | 592 * | Ctrl | Alt | GUI | Punc | Num | Space | Func |Greek | GUI |AltGr | Ctrl |
460 * `-----------------------------------------------------------------------------------' 593 * `-----------------------------------------------------------------------------------'
461 */ 594 */
595
596#ifdef LAYOUT_WORKMAN
462[_WORKMAN] = KEYMAP( 597[_WORKMAN] = KEYMAP(
463 _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______, 598 _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______,
464 _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, 599 _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______,
465 _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, 600 _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______,
466 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 601 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
467), 602),
603#endif
468 604
469/* Punc 605/* Punc
470 * ,-----------------------------------------------------------------------------------. 606 * ,-----------------------------------------------------------------------------------.
471 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | 607 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` |
472 * |------+------+------+------+------+-------------+------+------+------+------+------| 608 * |------+------+------+------+------+-------------+------+------+------+------+------|
473 * | | | \ | - | = | < | > | ( | ) | ' | | | 609 * | | * | \ | - | = | / | | ( | ) | < | > | |
474 * |------+------+------+------+------+------|------+------+------+------+------+------| 610 * |------+------+------+------+------+------|------+------+------+------+------+------|
475 * | | | | | _ | + | { | } | [ | ] | " | | | 611 * | & | ^ | | | _ | + | ? | | [ | ] | { | } | : |
476 * |------+------+------+------+------+------+------+------+------+------+------+------| 612 * |------+------+------+------+------+------+------+------+------+------+------+------|
477 * | | | | | | | | | | | | 613 * | | | | | | | | | | | |
478 * `-----------------------------------------------------------------------------------' 614 * `-----------------------------------------------------------------------------------'
479 */ 615 */
480[_PUNC] = KEYMAP( 616[_PUNC] = KEYMAP(
481 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , 617 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV ,
482 XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_QUOT, XXXXXXX, XXXXXXX, 618 XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, XXXXXXX, KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, XXXXXXX,
483 XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_DQUO, XXXXXXX, XXXXXXX, 619 KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_COLN,
484 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 620 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
485), 621),
486 622
487/* Num 623/* Num
488 * ,-----------------------------------------------------------------------------------. 624 * ,-----------------------------------------------------------------------------------.
489 * | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | 625 * | ~ | ! | @ | # | $ | % | A | 7 | 8 | 9 | D | ` |
490 * |------+------+------+------+------+-------------+------+------+------+------+------| 626 * |------+------+------+------+------+-------------+------+------+------+------+------|
491 * | Esc | @ | A | B | C | ( | ) | 4 | 5 | 6 | : |Enter | 627 * | | * | \ | - | = | / | B | 4 | 5 | 6 | E | |
492 * |------+------+------+------+------+------|------+------+------+------+------+------| 628 * |------+------+------+------+------+------|------+------+------+------+------+------|
493 * | & | # | D | E | F | [ | ] | 1 | 2 | 3 | / | * | 629 * | & | ^ | | | _ | + | ? | C | 1 | 2 | 3 | F | : |
494 * |------+------+------+------+------+------+------+------+------+------+------+------| 630 * |------+------+------+------+------+------+------+------+------+------+------+------|
495 * | | | | x | | | 0 | , | . | + | - | 631 * | | | | | | | x | 0 | , | . | | |
496 * `-----------------------------------------------------------------------------------' 632 * `-----------------------------------------------------------------------------------'
497 */ 633 */
498[_NUM] = KEYMAP( 634[_NUM] = KEYMAP(
499 KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, 635 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), KC_GRV,
500 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, 636 XXXXXXX, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______,
501 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, 637 KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), KC_COLN,
502 _______, _______, _______, KC_X, _______, KC_SPC, KC_SPC, KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_MINS 638 _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_X, _______
503), 639),
504 640
505/* Func 641/* Func
@@ -520,6 +656,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
520 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 656 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
521), 657),
522 658
659/* Uppercase Greek
660 * ,-----------------------------------------------------------------------------------.
661 * | | | | | | | | | | | | |
662 * |------+------+------+------+------+-------------+------+------+------+------+------|
663 * | | | | | | | | | | | | |
664 * |------+------+------+------+------+------+------+------+------+------+------+------|
665 * | | | | | | | | | | | | |
666 * |------+------+------+------+------+------+------+------+------+------+------+------|
667 * | | | | | | | | | | | | |
668 * `-----------------------------------------------------------------------------------'
669 */
670[_GREEKU] = KEYMAP(
671 _______, _______, _______,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______,
672 _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), _______, _______,
673 _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______,
674 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
675),
676
677/* Lowercase Greek
678 * ,-----------------------------------------------------------------------------------.
679 * | | | | | | | | | | | | |
680 * |------+------+------+------+------+-------------+------+------+------+------+------|
681 * | | | | | | | | | | | | |
682 * |------+------+------+------+------+------+------+------+------+------+------+------|
683 * | | | | | | | | | | | | |
684 * |------+------+------+------+------+------+------+------+------+------+------+------|
685 * | | | | | | | | | | | | |
686 * `-----------------------------------------------------------------------------------'
687 */
688[_GREEKL] = KEYMAP(
689 _______, _______,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______,
690 _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), _______, _______,
691 _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______,
692 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
693),
694
523/* Emoji 695/* Emoji
524 * ,-----------------------------------------------------------------------------------. 696 * ,-----------------------------------------------------------------------------------.
525 * | | | | | | | | | | | | | 697 * | | | | | | | | | | | | |
@@ -535,40 +707,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
535 X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), 707 X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW),
536 X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), 708 X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS),
537 X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), 709 X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH),
538 X(POO), X(EYES),X(HUNRD), _______,X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK) 710 X(POO), X(EYES), _______,X(HUNRD), X(SKULL),X(HORNS), X(HALO), X(FEAR),X(YUMMY),_______,X(DISAP),X(NOEVK)
539), 711),
540 712
541/* GUI 713/* GUI
542 * ,-----------------------------------------------------------------------------------. 714 * ,-----------------------------------------------------------------------------------.
543 * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | 715 * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | |
544 * |------+------+------+------+------+-------------+------+------+------+------+------| 716 * |------+------+------+------+------+-------------+------+------+------+------+------|
545 * |Linux | | Vol- | Mute | Vol+ | | | D- | | D+ | |Qwerty| 717 * | | | Vol- | Mute | Vol+ | | | Prev | | Next | | |
546 * |------+------+------+------+------+------+------+------+------+------+------+------| 718 * |------+------+------+------+------+------+------+------+------+------+------+------|
547 * | Win | | Prev | Play | Next | | | | | | |Colmak| 719 * | | | Prev | Play | Next | | | | | | | |
548 * |------+------+------+------+------+------+------+------+------+------+------+------| 720 * |------+------+------+------+------+------+------+------+------+------+------+------|
549 * | OSX | | | | | BL- | BL+ | | | | |Workmn| 721 * | | | | | | | | | | | | |
550 * `-----------------------------------------------------------------------------------' 722 * `-----------------------------------------------------------------------------------'
551 */ 723 */
552[_GUI] = KEYMAP( 724[_GUI] = KEYMAP(
553 _______, 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), _______, 725 XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX,
554 LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,KC_PAUS, QWERTY, 726 XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX,
555 WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, COLEMAK, 727 XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
556 OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, RGB_VAI, RGB_VAD, WORKMAN 728 XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX
557), 729),
558 730
559}; 731/* Sys
732 * ,-----------------------------------------------------------------------------------.
733 * | |Qwerty| Win | |Reset | | | USB | | | | |
734 * |------+------+------+------+------+-------------+------+------+------+------+------|
735 * | |Audio | |Dvorak| | Glow | | |WorkMn|Linux | | |
736 * |------+------+------+------+------+------+------+------+------+------+------+------|
737 * | | | |Colmak| | BLE |Norman|MacOS | | | | |
738 * |------+------+------+------+------+------+------+------+------+------+------+------|
739 * | | | | | | | | | | | | |
740 * `-----------------------------------------------------------------------------------'
741 */
742[_SYS] = KEYMAP(
743 XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
744 XXXXXXX, AUDIO, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX,
745 XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
746 _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______
747),
560 748
561#ifdef AUDIO_ENABLE 749};
562float tone_startup[][2] = SONG(STARTUP_SOUND);
563float tone_qwerty[][2] = SONG(QWERTY_SOUND);
564float tone_colemak[][2] = SONG(COLEMAK_SOUND);
565float tone_workman[][2] = SONG(DVORAK_SOUND);
566float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
567float tone_linux[][2] = SONG(CAPS_LOCK_ON_SOUND);
568float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND);
569float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND);
570float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2));
571#endif
572 750
573void persistant_default_layer_set(uint16_t default_layer) { 751void persistant_default_layer_set(uint16_t default_layer) {
574 eeconfig_update_default_layer(default_layer); 752 eeconfig_update_default_layer(default_layer);
@@ -576,24 +754,140 @@ void persistant_default_layer_set(uint16_t default_layer) {
576} 754}
577 755
578bool process_record_user(uint16_t keycode, keyrecord_t *record) { 756bool process_record_user(uint16_t keycode, keyrecord_t *record) {
579 #ifdef AUDIO_ENABLE 757 bool lshift = keyboard_report->mods & MOD_BIT(KC_LSFT);
580 // faux clicky 758 bool rshift = keyboard_report->mods & MOD_BIT(KC_RSFT);
581 if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); 759
582 #endif 760#ifdef DOUBLESPACE_LAYER_ENABLE
761 // double-space: send space immediately if any other key depressed before space is released
762 if ((lspace_active ^ rspace_active)
763 && keycode != LSPACE
764 && keycode != RSPACE
765 && record->event.pressed)
766 {
767 if (lspace_active) {
768 if (!lspace_emitted) {
769 register_code(KC_SPC);
770 unregister_code(KC_SPC);
771 }
772 lspace_emitted = true;
773 }
774 if (rspace_active) {
775 if (!rspace_emitted) {
776 register_code(KC_SPC);
777 unregister_code(KC_SPC);
778 }
779 rspace_emitted = true;
780 }
781 }
782#endif
583 783
584 switch (keycode) { 784 switch (keycode) {
785
786#ifdef DOUBLESPACE_LAYER_ENABLE
787 // double-space enter space layer
788 case LSPACE:
789 if (record->event.pressed) {
790 lspace_active = true;
791 if (rspace_active) {
792 layer_on(_SPACE);
793 space_layer_entered = true;
794 }
795 } else {
796 lspace_active = false;
797 if (space_layer_entered) {
798 layer_off(_SPACE);
799 if (!rspace_active) {
800 space_layer_entered = false;
801 }
802 } else {
803 if (!lspace_emitted) {
804 register_code(KC_SPC);
805 unregister_code(KC_SPC);
806 }
807 lspace_emitted = false;
808 }
809 }
810 return false;
811 break;
812 case RSPACE:
813 if (record->event.pressed) {
814 rspace_active = true;
815 if (lspace_active) {
816 layer_on(_SPACE);
817 space_layer_entered = true;
818 }
819 } else {
820 rspace_active = false;
821 if (space_layer_entered) {
822 layer_off(_SPACE);
823 if (!lspace_active) {
824 space_layer_entered = false;
825 }
826 } else {
827 if (!rspace_emitted) {
828 register_code(KC_SPC);
829 unregister_code(KC_SPC);
830 }
831 rspace_emitted = false;
832 }
833 }
834 return false;
835 break;
836#endif
837
838 // handle greek layer shift
839 // handle both shift = capslock
840 case KC_LSFT:
841 case KC_RSFT:
842 ;
843 uint8_t layer = biton32(layer_state);
844 if (layer == _GREEKU || layer == _GREEKL) {
845 if (record->event.pressed) {
846 layer_on(_GREEKU);
847 layer_off(_GREEKL);
848 } else {
849 if (lshift ^ rshift) { // if only one shift was pressed
850 layer_on(_GREEKL);
851 layer_off(_GREEKU);
852 }
853 }
854 } else {
855 if (record->event.pressed) {
856 if (lshift ^ rshift) { // if only one shift was pressed
857 register_code(KC_CAPS);
858 unregister_code(KC_CAPS);
859 }
860 }
861 }
862 return true;
863 break;
864
865 // press both ctrls to activate SYS layer
866 case KC_LCTL:
867 case KC_RCTL:
868 ;
869 bool lctrl = keyboard_report->mods & MOD_BIT(KC_LCTL);
870 bool rctrl = keyboard_report->mods & MOD_BIT(KC_RCTL);
871 if (record->event.pressed) {
872 if (lctrl ^ rctrl) { // if only one ctrl was pressed
873 layer_on(_SYS);
874 }
875 } else {
876 layer_off(_SYS);
877 }
878 return true;
879 break;
880
585 // QWERTZ style comma and dot: semicolon and colon when shifted 881 // QWERTZ style comma and dot: semicolon and colon when shifted
586 case KC_COMM: 882 case KC_COMM:
587 if (record->event.pressed) { 883 if (record->event.pressed) {
588 bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); 884 if (lshift || rshift) {
589 bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); 885 if (lshift) unregister_code(KC_LSFT);
590 if (lshifted || rshifted) { 886 if (rshift) unregister_code(KC_RSFT);
591 if (lshifted) unregister_code(KC_LSFT);
592 if (rshifted) unregister_code(KC_RSFT);
593 register_code(KC_SCLN); 887 register_code(KC_SCLN);
594 unregister_code(KC_SCLN); 888 unregister_code(KC_SCLN);
595 if (lshifted) register_code(KC_LSFT); 889 if (lshift) register_code(KC_LSFT);
596 if (rshifted) register_code(KC_RSFT); 890 if (rshift) register_code(KC_RSFT);
597 } else { 891 } else {
598 register_code(KC_COMM); 892 register_code(KC_COMM);
599 unregister_code(KC_COMM); 893 unregister_code(KC_COMM);
@@ -617,90 +911,88 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
617 // layout switchers 911 // layout switchers
618 case QWERTY: 912 case QWERTY:
619 if (record->event.pressed) { 913 if (record->event.pressed) {
620 #ifdef AUDIO_ENABLE
621 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
622 #endif
623 persistant_default_layer_set(1UL<<_QWERTY); 914 persistant_default_layer_set(1UL<<_QWERTY);
624 } 915 }
625 return false; 916 return false;
626 break; 917 break;
918#ifdef LAYOUT_DVORAK
919 case DVORAK:
920 if (record->event.pressed) {
921 persistant_default_layer_set(1UL<<_DVORAK);
922 }
923 return false;
924 break;
925#endif
926#ifdef LAYOUT_COLEMAK
627 case COLEMAK: 927 case COLEMAK:
628 if (record->event.pressed) { 928 if (record->event.pressed) {
629 #ifdef AUDIO_ENABLE
630 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
631 #endif
632 persistant_default_layer_set(1UL<<_COLEMAK); 929 persistant_default_layer_set(1UL<<_COLEMAK);
633 } 930 }
634 return false; 931 return false;
635 break; 932 break;
933#endif
934#ifdef LAYOUT_WORKMAN
636 case WORKMAN: 935 case WORKMAN:
637 if (record->event.pressed) { 936 if (record->event.pressed) {
638 #ifdef AUDIO_ENABLE
639 PLAY_NOTE_ARRAY(tone_workman, false, 0);
640 #endif
641 persistant_default_layer_set(1UL<<_WORKMAN); 937 persistant_default_layer_set(1UL<<_WORKMAN);
642 } 938 }
643 return false; 939 return false;
644 break; 940 break;
941#endif
942#ifdef LAYOUT_NORMAN
943 case NORMAN:
944 if (record->event.pressed) {
945 persistant_default_layer_set(1UL<<_NORMAN);
946 }
947 return false;
948 break;
949#endif
645 950
646 // layer switcher 951 // layer switcher
647 case PUNC: 952 case PUNC:
648 if (record->event.pressed) { 953 if (record->event.pressed) {
649 layer_on(_PUNC); 954 layer_on(_PUNC);
650 update_tri_layer(_PUNC, _EMOJI, _GUI); 955 update_tri_layer(_PUNC, _GREEKL, _EMOJI);
651 if (IS_LAYER_ON(_GUI)) {
652 led_layer_gui();
653 } else {
654 led_layer_punc();;
655 }
656 } else { 956 } else {
657 layer_off(_PUNC); 957 layer_off(_PUNC);
658 update_tri_layer(_PUNC, _EMOJI, _GUI); 958 update_tri_layer(_PUNC, _GREEKL, _EMOJI);
659 if (IS_LAYER_ON(_EMOJI)) {
660 led_layer_emoji();
661 } else {
662 led_layer_normal();;
663 }
664 } 959 }
665 return false; 960 return false;
666 break; 961 break;
667 case EMOJI: 962
963 case GREEK:
668 if (record->event.pressed) { 964 if (record->event.pressed) {
669 layer_on(_EMOJI); 965 if (lshift || rshift) {
670 update_tri_layer(_PUNC, _EMOJI, _GUI); 966 layer_on(_GREEKU);
671 if (IS_LAYER_ON(_GUI)) { 967 layer_off(_GREEKL);
672 led_layer_gui();
673 } else { 968 } else {
674 led_layer_emoji();; 969 layer_on(_GREEKL);
970 layer_off(_GREEKU);
971 update_tri_layer(_PUNC, _GREEKL, _EMOJI);
675 } 972 }
676 } else { 973 } else {
677 layer_off(_EMOJI); 974 layer_off(_GREEKU);
678 update_tri_layer(_PUNC, _EMOJI, _GUI); 975 layer_off(_GREEKL);
679 if (IS_LAYER_ON(_PUNC)) { 976 update_tri_layer(_PUNC, _GREEKL, _EMOJI);
680 led_layer_punc();
681 } else {
682 led_layer_normal();;
683 }
684 } 977 }
685 return false; 978 return false;
686 break; 979 break;
980
687 case NUM: 981 case NUM:
688 if (record->event.pressed) { 982 if (record->event.pressed) {
983 turn_off_capslock();
689 layer_on(_NUM); 984 layer_on(_NUM);
690 led_layer_num();
691 } else { 985 } else {
692 layer_off(_NUM); 986 layer_off(_NUM);
693 led_layer_normal();
694 } 987 }
695 return false; 988 return false;
696 break; 989 break;
990
697 case FUNC: 991 case FUNC:
698 if (record->event.pressed) { 992 if (record->event.pressed) {
699 layer_on(_FUNC); 993 layer_on(_FUNC);
700 led_layer_func();
701 } else { 994 } else {
702 layer_off(_FUNC); 995 layer_off(_FUNC);
703 led_layer_normal();
704 } 996 }
705 return false; 997 return false;
706 break; 998 break;
@@ -708,86 +1000,115 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
708 // OS switchers 1000 // OS switchers
709 case LINUX: 1001 case LINUX:
710 set_unicode_input_mode(UC_LNX); 1002 set_unicode_input_mode(UC_LNX);
711 #ifdef AUDIO_ENABLE
712 PLAY_NOTE_ARRAY(tone_linux, false, 0);
713 #endif
714 return false; 1003 return false;
715 break; 1004 break;
716 case WIN: 1005 case WIN:
717 set_unicode_input_mode(UC_WINC); 1006 set_unicode_input_mode(UC_WINC);
718 #ifdef AUDIO_ENABLE
719 PLAY_NOTE_ARRAY(tone_windows, false, 0);
720 #endif
721 return false; 1007 return false;
722 break; 1008 break;
723 case OSX: 1009 case OSX:
724 set_unicode_input_mode(UC_OSX); 1010 set_unicode_input_mode(UC_OSX);
725 #ifdef AUDIO_ENABLE 1011 return false;
726 PLAY_NOTE_ARRAY(tone_osx, false, 0); 1012 break;
727 #endif 1013
1014 // glow mode changer
1015 case GLOW:
1016 if (record->event.pressed) {
1017 glow_mode++;
1018 if (glow_mode > GLOW_FULL) {
1019 glow_mode = GLOW_NONE;
1020 }
1021 led_reset();
1022 rgbsps_send();
1023 }
1024 return false;
1025 break;
1026
1027 // faux clicky toggle, TBD
1028 case AUDIO:
728 return false; 1029 return false;
729 break; 1030 break;
730 } 1031 }
731 return true; 1032 return true;
732} 1033}
733 1034
734void matrix_init_user(void) { 1035void set_output_user(uint8_t output) {
735 #ifdef AUDIO_ENABLE 1036 switch(output) {
736 startup_user(); 1037 case OUTPUT_USB:
737 #endif 1038 led_set_output_usb();
738 set_unicode_input_mode(UC_LNX); 1039 break;
739 led_init(); 1040 case OUTPUT_ADAFRUIT_BLE:
1041 led_set_output_ble();
1042 break;
1043 default:
1044 led_set_output_none();
1045 }
740} 1046}
741 1047
742// void init_rgblight(void) { 1048void matrix_init_user(void) {
743// for (uint8_t i = 0; i < RGBLED_NUM; i++) { 1049 _delay_ms(500); // give time for usb to initialize
744// led[i].r = 255;
745// led[i].g = 85;
746// led[i].b = 0;
747// }
748// ws2812_setleds(led, RGBLED_NUM);
749// }
750 1050
1051 set_unicode_input_mode(UC_LNX);
1052 led_init();
751 1053
752#ifdef AUDIO_ENABLE 1054 // auto detect output on init
1055 uint8_t output = auto_detect_output();
1056 if (output == OUTPUT_USB) {
1057 set_output(OUTPUT_USB);
1058 } else {
1059 set_output(OUTPUT_ADAFRUIT_BLE);
1060 }
1061}
753 1062
754void startup_user() 1063void matrix_scan_user(void) {
755{ 1064 led_set_layer_indicator();
756 _delay_ms(20); // gets rid of tick
757 PLAY_NOTE_ARRAY(tone_startup, false, 0);
758} 1065}
759 1066
760void shutdown_user() 1067void battery_poll(uint8_t level) {
761{ 1068 rgbsps_sethsv(LED_IND_BATTERY, level * 120/255, 255, 15);
762 PLAY_NOTE_ARRAY(tone_goodbye, false, 0); 1069 rgbsps_send();
763 _delay_ms(150);
764 stop_all_notes();
765} 1070}
766 1071
767#endif 1072void led_set_user(uint8_t usb_led) {
1073 bool new_capslock = usb_led & (1<<USB_LED_CAPS_LOCK);
1074 if (new_capslock ^ capslock) { // capslock state is different
1075 if (capslock = new_capslock) {
1076 rgbsps_set(LED_IND_NUM, 15, 0, 0);
1077 } else {
1078 rgbsps_set(LED_IND_NUM, 0, 0, 0);
1079 }
1080 rgbsps_send();
1081 }
1082}
768 1083
1084void turn_off_capslock() {
1085 if (capslock) {
1086 register_code(KC_CAPS);
1087 unregister_code(KC_CAPS);
1088 }
1089}
769 1090
770void ps2_mouse_init_user() { 1091void ps2_mouse_init_user() {
771 uint8_t rcv; 1092 uint8_t rcv;
772 1093
773 // set TrackPoint sensitivity 1094 // set TrackPoint sensitivity
774 PS2_MOUSE_SEND(0xE2, "set trackpoint sensitivity: 0xE2"); 1095 PS2_MOUSE_SEND(0xE2, "tpsens: 0xE2");
775 PS2_MOUSE_SEND(0x81, "set trackpoint sensitivity: 0x81"); 1096 PS2_MOUSE_SEND(0x81, "tpsens: 0x81");
776 PS2_MOUSE_SEND(0x4A, "set trackpoint sensitivity: 0x4A"); 1097 PS2_MOUSE_SEND(0x4A, "tpsens: 0x4A");
777 PS2_MOUSE_SEND(0x49, "set trackpoint sensitivity: 0x59"); 1098 PS2_MOUSE_SEND(0x49, "tpsens: 0x59");
778 1099
779 // set TrackPoint Negative Inertia factor 1100 // set TrackPoint Negative Inertia factor
780 PS2_MOUSE_SEND(0xE2, "set negative inertia factor: 0xE2"); 1101 PS2_MOUSE_SEND(0xE2, "tpnegin: 0xE2");
781 PS2_MOUSE_SEND(0x81, "set negative inertia factor: 0x81"); 1102 PS2_MOUSE_SEND(0x81, "tpnegin: 0x81");
782 PS2_MOUSE_SEND(0x4D, "set negative inertia factor: 0x4D"); 1103 PS2_MOUSE_SEND(0x4D, "tpnegin: 0x4D");
783 PS2_MOUSE_SEND(0x06, "set negative inertia factor: 0x06"); 1104 PS2_MOUSE_SEND(0x06, "tpnegin: 0x06");
784 1105
785 // set TrackPoint speed 1106 // set TrackPoint speed
786 // (transfer function upper plateau speed) 1107 // (transfer function upper plateau speed)
787 PS2_MOUSE_SEND(0xE2, "set trackpoint speed: 0xE2"); 1108 PS2_MOUSE_SEND(0xE2, "tpsp: 0xE2");
788 PS2_MOUSE_SEND(0x81, "set trackpoint speed: 0x81"); 1109 PS2_MOUSE_SEND(0x81, "tpsp: 0x81");
789 PS2_MOUSE_SEND(0x60, "set trackpoint speed: 0x60"); 1110 PS2_MOUSE_SEND(0x60, "tpsp: 0x60");
790 PS2_MOUSE_SEND(0x61, "set trackpoint speed: 0x61"); 1111 PS2_MOUSE_SEND(0x61, "tpsp: 0x61");
791 1112
792 // inquire pts status 1113 // inquire pts status
793 rcv = ps2_host_send(0xE2); 1114 rcv = ps2_host_send(0xE2);
diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c
index a0035cce1..62e2281fa 100644
--- a/keyboards/handwired/promethium/promethium.c
+++ b/keyboards/handwired/promethium/promethium.c
@@ -1,6 +1,38 @@
1#include "promethium.h" 1#include "promethium.h"
2#include "analog.h"
3#include "timer.h"
4#include "matrix.h"
2 5
3void matrix_init_kb(void) { 6// cubic fit {3.3, 0}, {3.5, 2.9}, {3.6, 5}, {3.7, 8.6}, {3.8, 36}, {3.9, 62}, {4.0, 73}, {4.05, 83}, {4.1, 89}, {4.15, 94}, {4.2, 100}
7
8uint8_t battery_level(void) {
9 float voltage = analogRead(BATTERY_PIN) * 2 * 3.3 / 1024;
10 if (voltage < MIN_VOLTAGE) return 0;
11 if (voltage > MAX_VOLTAGE) return 255;
12 return (voltage - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE) * 255;
13}
14
15__attribute__ ((weak))
16void battery_poll(uint8_t level) {
17}
4 18
19void matrix_init_kb(void) {
5 matrix_init_user(); 20 matrix_init_user();
6} \ No newline at end of file 21}
22
23void matrix_scan_kb(void) {
24 static uint16_t counter = BATTERY_POLL;
25 counter++;
26
27 if (counter > BATTERY_POLL) {
28 counter = 0;
29 battery_poll(battery_level());
30 }
31
32 matrix_scan_user();
33}
34
35void led_set_kb(uint8_t usb_led) {
36 led_set_user(usb_led);
37}
38
diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h
index 662eeab99..da37e5c56 100644
--- a/keyboards/handwired/promethium/promethium.h
+++ b/keyboards/handwired/promethium/promethium.h
@@ -4,6 +4,11 @@
4#include "quantum.h" 4#include "quantum.h"
5 5
6#define PS2_INIT_DELAY 2000 6#define PS2_INIT_DELAY 2000
7#define UNICODE_TYPE_DELAY 0
8#define BATTERY_PIN 9
9#define BATTERY_POLL 30000
10#define MAX_VOLTAGE 4.2
11#define MIN_VOLTAGE 3.2
7 12
8#define KEYMAP( \ 13#define KEYMAP( \
9 k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ 14 k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
@@ -22,6 +27,8 @@
22 {k47, k48, k49, k4a, k4b, k4c} \ 27 {k47, k48, k49, k4a, k4b, k4c} \
23} 28}
24 29
30
31
25enum led_sequence { 32enum led_sequence {
26 LED_IND_BLUETOOTH, 33 LED_IND_BLUETOOTH,
27 LED_IND_USB, 34 LED_IND_USB,
@@ -98,4 +105,4 @@ enum led_sequence {
98 105
99#endif 106#endif
100 107
101 108void battery_poll(uint8_t level); \ No newline at end of file
diff --git a/keyboards/handwired/promethium/rgbsps.c b/keyboards/handwired/promethium/rgbsps.c
index ea922ec3f..f30badd35 100644
--- a/keyboards/handwired/promethium/rgbsps.c
+++ b/keyboards/handwired/promethium/rgbsps.c
@@ -21,4 +21,53 @@ void rgbsps_turnoff(void) {
21 21
22void rgbsps_send(void) { 22void rgbsps_send(void) {
23 ws2812_setleds(led, RGBSPS_NUM); 23 ws2812_setleds(led, RGBSPS_NUM);
24} \ No newline at end of file 24}
25
26void rgbsps_sethsv(uint8_t index, uint16_t hue, uint8_t sat, uint8_t val) {
27 uint8_t r = 0, g = 0, b = 0, base, color;
28
29 if (sat == 0) { // Acromatic color (gray). Hue doesn't mind.
30 r = val;
31 g = val;
32 b = val;
33 } else {
34 base = ((255 - sat) * val) >> 8;
35 color = (val - base) * (hue % 60) / 60;
36
37 switch (hue / 60) {
38 case 0:
39 r = val;
40 g = base + color;
41 b = base;
42 break;
43 case 1:
44 r = val - color;
45 g = val;
46 b = base;
47 break;
48 case 2:
49 r = base;
50 g = val;
51 b = base + color;
52 break;
53 case 3:
54 r = base;
55 g = val - color;
56 b = val;
57 break;
58 case 4:
59 r = base + color;
60 g = base;
61 b = val;
62 break;
63 case 5:
64 r = val;
65 g = base;
66 b = val - color;
67 break;
68 }
69 }
70
71 rgbsps_set(index, r, g, b);
72}
73
diff --git a/keyboards/handwired/promethium/rgbsps.h b/keyboards/handwired/promethium/rgbsps.h
index 6da197f75..72612a7a8 100644
--- a/keyboards/handwired/promethium/rgbsps.h
+++ b/keyboards/handwired/promethium/rgbsps.h
@@ -1,4 +1,5 @@
1void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b); 1void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b);
2void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b); 2void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b);
3void rgbsps_turnoff(void); 3void rgbsps_turnoff(void);
4void rgbsps_send(void); \ No newline at end of file 4void rgbsps_send(void);
5void rgbsps_sethsv(uint8_t index, uint16_t hue, uint8_t sat, uint8_t val); \ No newline at end of file
diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk
index 465ef3359..e75cf4dde 100644
--- a/keyboards/handwired/promethium/rules.mk
+++ b/keyboards/handwired/promethium/rules.mk
@@ -72,4 +72,5 @@ API_SYSEX_ENABLE ?= no
72SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 72SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
73 73
74SRC += $(QUANTUM_DIR)/light_ws2812.c 74SRC += $(QUANTUM_DIR)/light_ws2812.c
75SRC += rgbsps.c \ No newline at end of file 75SRC += rgbsps.c
76SRC += $(QUANTUM_DIR)/analog.c \ No newline at end of file
diff --git a/keyboards/handwired/reddot/Makefile b/keyboards/handwired/reddot/Makefile
new file mode 100755
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/reddot/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/handwired/reddot/config.h b/keyboards/handwired/reddot/config.h
new file mode 100755
index 000000000..15f114297
--- /dev/null
+++ b/keyboards/handwired/reddot/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 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER upils
28#define PRODUCT reddot
29#define DESCRIPTION A custom keyboard
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 19
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 { B0, B1, B2, B3, E6 }
46#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, C6, C7, D5, D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 }
47#define UNUSED_PINS
48
49
50/* COL2ROW or ROW2COL */
51#define DIODE_DIRECTION COL2ROW
52
53// #define BACKLIGHT_PIN B7
54// #define BACKLIGHT_BREATHING
55// #define BACKLIGHT_LEVELS 3
56
57
58/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
59#define DEBOUNCING_DELAY 5
60
61/* define if matrix has ghost (lacks anti-ghosting diodes) */
62//#define MATRIX_HAS_GHOST
63
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/reddot/keymaps/default/keymap.c b/keyboards/handwired/reddot/keymaps/default/keymap.c
new file mode 100755
index 000000000..44ee2ce51
--- /dev/null
+++ b/keyboards/handwired/reddot/keymaps/default/keymap.c
@@ -0,0 +1,29 @@
1#include "reddot.h"
2#include "../../../../../quantum/keymap_extras/keymap_french.h"
3
4const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
5
6[0] = KEYMAP(
7 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\
8 KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INSERT, KC_HOME, KC_PGUP,\
9 KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_PLUS,\
10 KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_KP_1, KC_UP, KC_KP_3,\
11 FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER),
12
13 [1] = KEYMAP(
14 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\
15 KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9,\
16 KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_KP_PLUS,\
17 KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3,\
18 FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER),
19};
20
21
22const uint16_t PROGMEM fn_actions[] = {
23 ACTION_LAYER_TOGGLE(1),
24};
25
26const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
27 return MACRO_NONE;
28};
29
diff --git a/keyboards/handwired/reddot/keymaps/default/readme.md b/keyboards/handwired/reddot/keymaps/default/readme.md
new file mode 100755
index 000000000..f04833c3e
--- /dev/null
+++ b/keyboards/handwired/reddot/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for handwired/reddot
diff --git a/keyboards/handwired/reddot/readme.md b/keyboards/handwired/reddot/readme.md
new file mode 100755
index 000000000..11bcba54a
--- /dev/null
+++ b/keyboards/handwired/reddot/readme.md
@@ -0,0 +1,24 @@
1## RedDot Specific Info ##
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/reddot 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 with the default keymap, simply run `make`.
16
17### Other Keymaps
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>.c` 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 do `make` with `KEYMAP` option like:
21```
22$ make KEYMAP=[default|jack|<name>]
23```
24Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/handwired/reddot/reddot.c b/keyboards/handwired/reddot/reddot.c
new file mode 100755
index 000000000..4e1efc06c
--- /dev/null
+++ b/keyboards/handwired/reddot/reddot.c
@@ -0,0 +1,7 @@
1#include "reddot.h"
2
3void matrix_init_kb(void) {
4
5 matrix_init_user();
6}
7
diff --git a/keyboards/handwired/reddot/reddot.h b/keyboards/handwired/reddot/reddot.h
new file mode 100755
index 000000000..f0c4be557
--- /dev/null
+++ b/keyboards/handwired/reddot/reddot.h
@@ -0,0 +1,20 @@
1#ifndef REDDOT_H
2#define REDDOT_H
3
4#include "quantum.h"
5
6#define KEYMAP( \
7 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13, \
8 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, \
9 k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53, \
10 k60, k61, k62, k63, k64, k65, k66, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, \
11 k80, k81, k82, k83, k84, k85, k86, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93\
12) { \
13 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13 }, \
14 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, KC_NO }, \
15 { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53 }, \
16 { k60, k61, k62, k63, k64, k65, k66, KC_NO, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, KC_NO }, \
17 { k80, k81, k82, k83, k84, k85, k86, KC_NO, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93 } \
18}
19
20#endif
diff --git a/keyboards/handwired/reddot/rules.mk b/keyboards/handwired/reddot/rules.mk
new file mode 100755
index 000000000..9a4409fe6
--- /dev/null
+++ b/keyboards/handwired/reddot/rules.mk
@@ -0,0 +1,88 @@
1
2#MCU = at90usb1287
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# for avr upload
19USB ?= /dev/cu.usbmodem1421
20#
21# LUFA specific
22#
23# Target architecture (see library "Board Types" documentation).
24ARCH = AVR8
25
26# Input clock frequency.
27# This will define a symbol, F_USB, in all source code files equal to the
28# input clock frequency (before any prescaling is performed) in Hz. This value may
29# differ from F_CPU if prescaling is used on the latter, and is required as the
30# raw input clock is fed directly to the PLL sections of the AVR for high speed
31# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
32# at the end, this will be done automatically to create a 32-bit value in your
33# source code.
34#
35# If no clock division is performed on the input clock inside the AVR (via the
36# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
37F_USB = $(F_CPU)
38
39
40ifdef TEENSY2
41 OPT_DEFS += -DATREUS_TEENSY2
42 ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
43else
44 OPT_DEFS += -DATREUS_ASTAR
45 OPT_DEFS += -DCATERINA_BOOTLOADER
46 ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
47 avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
48endif
49# Interrupt driven control endpoint task(+60)
50OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
51
52
53# MCU name
54
55# Boot Section Size in *bytes*
56# Teensy halfKay 512
57# Teensy++ halfKay 1024
58# Atmel DFU loader 4096
59# LUFA bootloader 4096
60# USBaspLoader 2048
61OPT_DEFS += -DBOOTLOADER_SIZE=4096
62
63
64# Build Options
65# change yes to no to disable
66#
67BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
68MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
69EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
70CONSOLE_ENABLE ?= no # Console for debug(+400)
71COMMAND_ENABLE ?= no # Commands for debug and configuration
72# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
73SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
74# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
75NKRO_ENABLE ?= no # USB Nkey Rollover
76BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
77MIDI_ENABLE ?= no # MIDI controls
78UNICODE_ENABLE ?= no # Unicode
79BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
80AUDIO_ENABLE ?= no # Audio output on port C6
81
82ifndef QUANTUM_DIR
83 include ../../../Makefile
84endif
85
86upload: build
87 $(ATREUS_UPLOAD_COMMAND)
88
diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/readme.md
index 367c0a08f..ee7d11121 100644
--- a/keyboards/hhkb/readme.md
+++ b/keyboards/hhkb/readme.md
@@ -82,7 +82,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac
82 82
83### Remember: These are just aliases 83### Remember: These are just aliases
84 84
85These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). 85These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action).
86 86
87Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. 87Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them.
88 88
diff --git a/keyboards/infinity60/infinity60.c b/keyboards/infinity60/infinity60.c
index e471250fe..fdeed5124 100644
--- a/keyboards/infinity60/infinity60.c
+++ b/keyboards/infinity60/infinity60.c
@@ -15,3 +15,18 @@ You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17#include "infinity60.h" 17#include "infinity60.h"
18
19void matrix_init_kb(void) {
20 // put your keyboard start-up code here
21 // runs once when the firmware starts up
22
23 matrix_init_user();
24}
25
26void matrix_scan_kb(void) {
27 // put your looping keyboard code here
28 // runs every cycle (a lot)
29
30 matrix_scan_user();
31}
32
diff --git a/keyboards/infinity60/keymaps/default/keymap.c b/keyboards/infinity60/keymaps/default/keymap.c
index 443412857..8347c94b4 100644
--- a/keyboards/infinity60/keymaps/default/keymap.c
+++ b/keyboards/infinity60/keymaps/default/keymap.c
@@ -46,3 +46,12 @@ const uint16_t fn_actions[] = {
46 46
47}; 47};
48 48
49// Runs just one time when the keyboard initializes.
50void matrix_init_user(void) {
51
52};
53
54// Runs constantly in the background, in a loop.
55void matrix_scan_user(void) {
56
57};
diff --git a/keyboards/infinity60/keymaps/depariel/keymap.c b/keyboards/infinity60/keymaps/depariel/keymap.c
index 7412b9b9d..57f9487f2 100755
--- a/keyboards/infinity60/keymaps/depariel/keymap.c
+++ b/keyboards/infinity60/keymaps/depariel/keymap.c
@@ -80,3 +80,12 @@ const uint16_t PROGMEM fn_actions[] = {
80 80
81}; 81};
82 82
83// Runs just one time when the keyboard initializes.
84void matrix_init_user(void) {
85
86};
87
88// Runs constantly in the background, in a loop.
89void matrix_scan_user(void) {
90
91};
diff --git a/keyboards/infinity60/keymaps/hasu/keymap.c b/keyboards/infinity60/keymaps/hasu/keymap.c
index d3728869a..9982078c1 100644
--- a/keyboards/infinity60/keymaps/hasu/keymap.c
+++ b/keyboards/infinity60/keymaps/hasu/keymap.c
@@ -111,3 +111,13 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
111const uint16_t fn_actions[] = { 111const uint16_t fn_actions[] = {
112 112
113}; 113};
114
115// Runs just one time when the keyboard initializes.
116void matrix_init_user(void) {
117
118};
119
120// Runs constantly in the background, in a loop.
121void matrix_scan_user(void) {
122
123};
diff --git a/keyboards/infinity60/matrix.c b/keyboards/infinity60/matrix.c
index d2f185288..b6ccf86c3 100644
--- a/keyboards/infinity60/matrix.c
+++ b/keyboards/infinity60/matrix.c
@@ -62,6 +62,8 @@ void matrix_init(void)
62#endif 62#endif
63 memset(matrix, 0, MATRIX_ROWS); 63 memset(matrix, 0, MATRIX_ROWS);
64 memset(matrix_debouncing, 0, MATRIX_ROWS); 64 memset(matrix_debouncing, 0, MATRIX_ROWS);
65
66 matrix_init_quantum();
65} 67}
66 68
67uint8_t matrix_scan(void) 69uint8_t matrix_scan(void)
@@ -146,6 +148,7 @@ uint8_t matrix_scan(void)
146 } 148 }
147 debouncing = false; 149 debouncing = false;
148 } 150 }
151 matrix_scan_quantum();
149 return 1; 152 return 1;
150} 153}
151 154
diff --git a/keyboards/kc60/kc60.c b/keyboards/kc60/kc60.c
index 746ac634a..09b924b28 100644
--- a/keyboards/kc60/kc60.c
+++ b/keyboards/kc60/kc60.c
@@ -1 +1,16 @@
1#include "kc60.h" 1#include "kc60.h"
2
3void led_set_kb(uint8_t usb_led)
4{
5 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
6 // output low
7 DDRB |= (1<<2);
8 PORTB &= ~(1<<2);
9 } else {
10 // Hi-Z
11 DDRB &= ~(1<<2);
12 PORTB &= ~(1<<2);
13 }
14
15 led_set_user(usb_led);
16} \ No newline at end of file
diff --git a/keyboards/kc60/rules.mk b/keyboards/kc60/rules.mk
index a935ed19e..06bd5dc92 100644
--- a/keyboards/kc60/rules.mk
+++ b/keyboards/kc60/rules.mk
@@ -1,6 +1,3 @@
1# project specific files
2SRC = led.c
3
4# MCU name 1# MCU name
5#MCU = at90usb1287 2#MCU = at90usb1287
6MCU = atmega32u4 3MCU = atmega32u4
diff --git a/keyboards/kinesis/keymaps/milestogo/keymap.c b/keyboards/kinesis/keymaps/milestogo/keymap.c
index c2635eefe..bf1f9c591 100644
--- a/keyboards/kinesis/keymaps/milestogo/keymap.c
+++ b/keyboards/kinesis/keymaps/milestogo/keymap.c
@@ -6,8 +6,11 @@
6#define _SYMB 1// Symbol layer 6#define _SYMB 1// Symbol layer
7#define _MOUSE 2// 7#define _MOUSE 2//
8#define _TRANS 3// 8#define _TRANS 3//
9#define _SYMB2 4// old symbol level, more ergodox like
9 10
10 11// Fillers to make layering more clear
12#define _______ KC_TRNS
13#define XXXXXXX KC_NO
11 14
12/* Macros */ 15/* Macros */
13enum { 16enum {
@@ -20,44 +23,44 @@ enum {
20}; 23};
21 24
22 25
23// Why so many gui keys, why not just map all the OS X stuff to buttons? Good question. 26// Train out of using uncomfortable esc and GUI keys.
24/**************************************************************************************************** 27/****************************************************************************************************
25* 28*
26* Keymap: Default Layer in Qwerty 29* Keymap: Default Layer in Qwerty
27* 30*
28* ,-------------------------------------------------------------------------------------------------------------------. 31* ,-------------------------------------------------------------------------------------------------------------------.
29* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F8 | F9 | F10 | F12 | FN0 | FN1 | FN2 | | bOOT | 32* | no | F1 | F2 | F3 | F4 | F5 | F6 | F8 | F9 | F10 | F12 | FN0 | FN1 | FN2 | | bOOT |
30* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| 33* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------|
31* | =+ | 1! | 2@ | 3# | 4$ | 5% | | 6^ | 7& | 8* | 9( | 0) | -_ | 34* | `~ | 1! | 2@ | 3# | 4$ | 5% | | 6^ | 7& | 8* | 9( | 0) | -_ |
32* |--------+------+------+------+------+------| +------+------+------+------+------+--------| 35* |--------+------+------+------+------+------| +------+------+------+------+------+--------|
33* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \| | 36* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \| |
34* |--------+------+------+------+------+------| |------+------+------+------+------+--------| 37* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
35* |MouseFN0| A | S | D | F | G | | H | J | K | L | ;: | '" | 38* |MouseFN0| A | S | D | F | G | | H | J | K | L | ;: | '" |
36* |--------+------+------+------+------+------| |------+------+------+------+------+--------| 39* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
37* | Shift | Z | X | C | V | B | | N | M | ,. | .> | /? | Shift | 40* | Shift | Z | X | C | V | B | | N | M | ,< | .> | /? | Shift |
38* `--------+------+------+------+------+------- `------+------+------+------+------+--------' 41* `--------+------+------+------+------+------- `------+------+------+------+------+--------'
39* | ~` | ESC |GUI/L |L1/RT | | L1/UP|GUI/DN| [{ | ]} | 42* | ~` | ESC |GUI/L |L1/RT | | L1/UP|GUI/DN| [{ | ]} |
40* `---------------------------' `---------------------------' 43* `---------------------------' `---------------------------'
41* ,-------------. ,-------------. 44* ,-------------. ,-------------.
42* | CTRL | GUI | | ALT | GUI | 45* | CTRL | ALT | | ALT | GUI |
43* ,------|------|------| |------+------+------. 46* ,------|------|------| |------+------+------.
44* | | | Home | | PgUp | | | 47* | | | Del | | PgUp | | |
45* | BkSp | Del |------| |------|Return| Space| 48* | BkSp | BkSp |------| |------|Return| Space|
46* | | | End | | PgDn | | | 49* | | | FN0 | | PgDn | | |
47* `--------------------' `--------------------' 50* `--------------------' `--------------------'
48*/ 51*/
49 52
50const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 53const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
51[_QWERTY] = KEYMAP( 54[_QWERTY] = KEYMAP(
52 KC_ESC, KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8, 55 XXXXXXX, KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8,
53 KC_EQL, KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , 56 KC_GRAVE, KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,
54 KC_TAB, KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , 57 KC_TAB, KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,
55 KC_FN0 ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , 58 KC_FN0 ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,
56 KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , 59 KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,
57 KC_GRAVE, KC_ESC, KC_FN4, KC_FN5, 60 KC_GRAVE, KC_ESC, KC_FN4, KC_FN5,
58 KC_LCTL,KC_LGUI, 61 KC_LCTL,KC_LALT,
59 KC_HOME, 62 KC_DEL,
60 KC_BSPC,KC_DEL ,KC_FN0 , 63 KC_BSPC, KC_DEL ,KC_FN0 ,
61 KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_FN0 ,KC_FN1 ,KC_FN2, KC_NO, RESET, 64 KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_FN0 ,KC_FN1 ,KC_FN2, KC_NO, RESET,
62 KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, 65 KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS,
63 KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, 66 KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS,
@@ -68,52 +71,102 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
68 KC_PGUP, 71 KC_PGUP,
69 KC_PGDN,KC_ENTER ,KC_SPC 72 KC_PGDN,KC_ENTER ,KC_SPC
70 ), 73 ),
74
75
76/* _SYMB level, more planck like. Much work to make sequences into multi-finger rolls. eg ([1,0]), !=0
77* Also sorted by frequency / strength of finger.
78*
79* ,-------------------------------------------------------------------------------------------------------------------.
80* | | | | | | | | | | | | | | | | |
81* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------|
82* | | | | | | | | | | | | | |
83* |--------+------+------+------+------+------| +------+------+------+------+------+--------|
84* | | ^ | { | } | @ | % | | & | [ | ( | ) | _ | \ |
85* |--------+------+------+------+------+------| +------+------+------+------+------+--------|
86* | | ! | # | 0 | = | ~ | | * | + | 1 | - | ] | ` |
87* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
88* | | 6 | 7 | 8 | 9 | pipe | | $ | 2 | 3 | 4 | 5 | |
89* `--------+------+------+------+------+------- `------+------+------+------+------+--------'
90* | | : |GUI/L |L1/RT | | L1/UP|GUI/DN| \ | |
91* `---------------------------' `---------------------------'
92* ,-------------. ,-------------.
93* | CTRL | | | ALT | GUI |
94* ,------|------|------| |------+------+------.
95* | | | | | | | |
96* | Cut | Paste|------| |------| | |
97* | | |Reset | | | | |
98* `--------------------' `--------------------'
99*/
100
71 101
72/* _SYMBol level 102
103[_SYMB] = KEYMAP(
104 _______, _______, _______, _______, _______, _______, _______, _______, _______,
105 _______, _______, _______, _______, _______, _______,
106 _______, KC_CIRC, KC_LCBR, KC_RCBR, KC_AT, KC_PERC,
107 _______, KC_EXLM, KC_HASH, KC_0, KC_EQL, KC_TILD,
108 _______, KC_6, KC_7, KC_8, KC_9, KC_PIPE,
109 _______, KC_COLON, KC_FN4, KC_FN5,
110 _______, _______,
111 _______,
112 _______, _______, RESET,
113 _______, _______, _______, _______, _______, _______, _______, KC_FN0, KC_2,
114 _______, _______, _______, _______, _______, _______,
115 KC_AMPR, KC_LBRC, KC_LPRN, KC_RPRN, KC_UNDS, _______,
116 KC_ASTR, KC_PLUS, KC_1, KC_MINS, KC_RBRC, KC_GRV,
117 KC_DLR, KC_2, KC_3, KC_4, KC_5, XXXXXXX,
118 KC_FN6, KC_FN7, KC_BSLS, XXXXXXX,
119 _______, _______,
120 _______,
121 _______, _______, _______
122 ),
123
124
125/* _SYMB2ol level, more ergodox like
73* 126*
74* ,-------------------------------------------------------------------------------------------------------------------. 127* ,-------------------------------------------------------------------------------------------------------------------.
75* | | | | | | | | | | | | | | | | bOOT | 128* | | | | | | | | | | | | | | | | |
76* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| 129* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------|
77* | | | * | # | | | | | | | | | | 130* | | | * | # | | | | | | | | | |
78* |--------+------+------+------+------+------| +------+------+------+------+------+--------| 131* |--------+------+------+------+------+------| +------+------+------+------+------+--------|
79* | | / | [ | ] | | | | | | | | | | 132* | | / | < | > | | | | | | + | * | | |
80* |--------+------+------+------+------+------| |------+------+------+------+------+--------| 133* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
81* | | | { | } | | | | | | | | | | 134* | | | { | } | | | | | | = | - | | |
82* |--------+------+------+------+------+------| |------+------+------+------+------+--------| 135* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
83* | | = | ( | ) | | | | | | | | | | 136* | | = | ( | ) | | | | | | | | | | |
84* `--------+------+------+------+------+------- `------+------+------+------+------+--------' 137* `--------+------+------+------+------+------- `------+------+------+------+------+--------'
85* | | |GUI/L |L1/RT | | L1/UP|GUI/DN| { | } | 138* | | |GUI/L |L1/RT | | L1/UP|GUI/DN| { | } |
86* `---------------------------' `---------------------------' 139* `---------------------------' `---------------------------'
87* ,-------------. ,-------------. 140* ,-------------. ,-------------.
88* | CTRL | GUI | | ALT | GUI | 141* | CTRL | | | ALT | GUI |
89* ,------|------|------| |------+------+------. 142* ,------|------|------| |------+------+------.
90* | | | Home | | PgUp | | | 143* | | | | | | | |
91* | BkSp | Del |------| |------|Mouse1|Mouse2| 144* | BkSp | Del |------| |------|Mouse1|Mouse2|
92* | | | End | | PgDn |LClick|Rclick| 145* | | |Reset | | |LClick|Rclick|
93* `--------------------' `--------------------' 146* `--------------------' `--------------------'
94*/ 147*/
95 148
96 149
97 150
98[_SYMB] = KEYMAP( 151[_SYMB2] = KEYMAP(
99 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 152 _______, _______, _______, _______, _______, _______, _______, _______, _______,
100 KC_TRNS, KC_TRNS, KC_ASTR, KC_HASH, KC_TRNS, KC_TRNS, 153 _______, _______, KC_ASTR, KC_HASH, _______, _______,
101 KC_TRNS, KC_SLSH, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, 154 _______, KC_SLSH, RSFT(KC_COMM), RSFT(KC_DOT), _______, _______,
102 KC_TRNS, KC_TRNS, RSFT(KC_LBRC), RSFT(KC_RBRC), KC_TRNS, KC_TRNS, 155 _______, _______, RSFT(KC_LBRC), RSFT(KC_RBRC), _______, _______,
103 KC_TRNS, KC_EQL, RSFT(KC_9), RSFT(KC_0), KC_TRNS, KC_TRNS, 156 _______, KC_EQL, RSFT(KC_9), RSFT(KC_0), _______, _______,
104 KC_TRNS, KC_TRNS, KC_FN4, KC_FN5, 157 _______, _______, KC_FN4, KC_FN5,
105 KC_TRNS, KC_TRNS, 158 _______, _______,
106 KC_TRNS, 159 _______,
107 KC_TRNS, KC_TRNS, KC_TRNS, 160 _______, _______, RESET,
108 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_FN0, KC_2, 161 _______, _______, _______, _______, _______, _______, _______, KC_FN0, KC_2,
109 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 162 _______, _______, _______, KC_ASTR, _______, _______,
110 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 163 _______, _______, KC_PLUS, KC_MINS, _______, _______,
111 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 164 _______, _______, KC_EQL, KC_PIPE, _______, _______,
112 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 165 _______, _______, _______, _______, _______, _______,
113 KC_FN6, KC_FN7, KC_TRNS, KC_TRNS, 166 KC_FN6, KC_FN7, _______, _______,
114 KC_TRNS, KC_TRNS, 167 _______, _______,
115 KC_TRNS, 168 _______,
116 KC_TRNS, KC_TRNS, KC_TRNS 169 _______, _______, _______
117 ), 170 ),
118/* Keymap: Movement and function layer 171/* Keymap: Movement and function layer
119* 172*
@@ -122,11 +175,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
122* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------| 175* |--------+------+------+------+------+------+---------------------------+------+------+------+------+------+--------|
123* | =+ | ! | @ | # | $ | % | | ^ | & | * | ( | ) |MS Fast | 176* | =+ | ! | @ | # | $ | % | | ^ | & | * | ( | ) |MS Fast |
124* |--------+------+------+------+------+------| +------+------+------+------+------+--------| 177* |--------+------+------+------+------+------| +------+------+------+------+------+--------|
125* | Tab | | | Up | |PgUp | | MwU |MS_UL | MS_U |MS_UR | | Ms Norm| 178* | Tab | | | | |PgUp | | MwU |MS_UL | MS_U |MS_UR | | Ms Norm|
126* |--------+------+------+------+------+------| |------+------+------+------+------+--------| 179* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
127* |MouseFN1| C^A | Left | Down |Right | C^E | | | MS_L |Mouse1| MS_R | |MS Slow | 180* |MouseFN1|GUI_V |GUI X |GUI C |GUI_V | | | | MS_L |Mouse1| MS_R | |MS Slow |
128* |--------+------+------+------+------+------| |------+------+------+------+------+--------| 181* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
129* | | GuiZ | GUI X| GUI C| GUI_V|PgDown| | MWD | MDown|MS Dwn|MS_DR | ? | | 182* | | | | | |PgDown| | MWD | MDown|MS Dwn|MS_DR | ? | |
130* `--------+------+------+------+------+------- `------+------+------+------+------+--------' 183* `--------+------+------+------+------+------- `------+------+------+------+------+--------'
131* | `~ | ESC | | | | | | { | } | 184* | `~ | ESC | | | | | | { | } |
132* `---------------------------' `---------------------------' 185* `---------------------------' `---------------------------'
@@ -141,24 +194,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
141 194
142 195
143[_MOUSE] = KEYMAP( 196[_MOUSE] = KEYMAP(
144 KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 197 KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______,
145 KC_TRNS, KC_EXLM ,KC_AT, KC_HASH, KC_DLR ,KC_PERC , 198 _______, KC_EXLM ,KC_AT, KC_HASH, KC_DLR ,KC_PERC ,
146 KC_TRNS, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGUP, 199 _______, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGUP,
147 KC_FN1, LCTL(KC_A),KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), 200 KC_FN1, LGUI(KC_Z),LGUI(KC_X),LGUI(KC_C),LGUI(KC_V), KC_NO,
148 KC_TRNS, LGUI(KC_Z),LGUI(KC_X),LGUI(KC_C),LGUI(KC_V),KC_PGDN, 201 _______, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGDN,
149 KC_TRNS, KC_TRNS, KC_NO, KC_NO, 202 _______, _______, KC_NO, KC_NO,
150 KC_TRNS, KC_TRNS, 203 _______, _______,
151 KC_TRNS, 204 _______,
152 KC_TRNS, KC_TRNS, KC_TRNS, 205 _______, _______, _______,
153 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_FN0,RESET, 206 _______, _______, _______, _______, _______, _______, _______, KC_FN0,RESET,
154 KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_ACL2, 207 KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_ACL2,
155 KC_WH_U, M(A_MUL), KC_MS_U, M(A_MUR), KC_NO, KC_ACL1, 208 KC_WH_U, M(A_MUL), KC_MS_U, M(A_MUR), KC_NO, KC_ACL1,
156 KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_ACL0, 209 KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_ACL0,
157 KC_WH_D, M(A_MDL), KC_MS_D, M(A_MDR), RSFT(KC_LBRC), RSFT(KC_RBRC), 210 KC_WH_D, M(A_MDL), KC_MS_D, M(A_MDR), RSFT(KC_LBRC), RSFT(KC_RBRC),
158 KC_LCBR, KC_RCBR, KC_NO, KC_NO, 211 KC_LCBR, KC_RCBR, KC_NO, KC_NO,
159 KC_TRNS, KC_TRNS, 212 _______, _______,
160 KC_TRNS, 213 _______,
161 KC_TRNS, KC_BTN1, KC_BTN2 214 _______, KC_BTN1, KC_BTN2
162 ), 215 ),
163 216
164 217
@@ -190,24 +243,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
190 243
191 244
192[_TRANS] = KEYMAP( 245[_TRANS] = KEYMAP(
193 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 246 _______, _______, _______, _______, _______, _______, _______, _______, _______,
194 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 247 _______, _______, _______, _______, _______, _______,
195 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 248 _______, _______, _______, _______, _______, _______,
196 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 249 _______, _______, _______, _______, _______, _______,
197 KC_TRNS, KC_TRNS, KC_FN10, KC_FN11, KC_TRNS, KC_TRNS, 250 _______, _______, _______, _______, _______, _______,
198 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 251 _______, _______, _______, _______,
199 KC_TRNS, KC_TRNS, 252 _______, _______,
200 KC_TRNS, 253 _______,
201 KC_TRNS, KC_TRNS, KC_TRNS, 254 _______, _______, _______,
202 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_FN0, KC_2, 255 _______, _______, _______, _______, _______, _______, _______, KC_FN0, KC_2,
203 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 256 _______, _______, _______, _______, _______, _______,
204 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 257 _______, _______, _______, _______, _______, _______,
205 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 258 _______, _______, _______, _______, _______, _______,
206 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 259 _______, _______, _______, _______, _______, _______,
207 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 260 _______, _______, _______, _______,
208 KC_TRNS, KC_TRNS, 261 _______, _______,
209 KC_TRNS, 262 _______,
210 KC_TRNS, KC_TRNS, KC_TRNS 263 _______, _______, _______
211 ), 264 ),
212 265
213 266
diff --git a/keyboards/kinesis/rules.mk b/keyboards/kinesis/rules.mk
index a4a2b7d15..956a64bdd 100644
--- a/keyboards/kinesis/rules.mk
+++ b/keyboards/kinesis/rules.mk
@@ -46,11 +46,11 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
46 46
47# Boot Section Size in *bytes* 47# Boot Section Size in *bytes*
48# Teensy halfKay 512 48# Teensy halfKay 512
49# Teensy++ halfKay 1024 49# Teensy++ halfKay 2048
50# Atmel DFU loader 4096 50# Atmel DFU loader 4096
51# LUFA bootloader 4096 51# LUFA bootloader 4096
52# USBaspLoader 2048 52# USBaspLoader 2048
53OPT_DEFS += -DBOOTLOADER_SIZE=1024 53OPT_DEFS += -DBOOTLOADER_SIZE=2048
54 54
55 55
56# Build Options 56# Build Options
diff --git a/keyboards/lets_split/Makefile b/keyboards/lets_split/Makefile
index 4e2a6f00f..f5c87d4d6 100644
--- a/keyboards/lets_split/Makefile
+++ b/keyboards/lets_split/Makefile
@@ -1,3 +1,5 @@
1SUBPROJECT_DEFAULT = rev2
2
1ifndef MAKEFILE_INCLUDED 3ifndef MAKEFILE_INCLUDED
2 include ../../Makefile 4 include ../../Makefile
3endif \ No newline at end of file 5endif
diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h
index 7df0c5752..008fb0978 100644
--- a/keyboards/lets_split/config.h
+++ b/keyboards/lets_split/config.h
@@ -26,4 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
26#ifdef SUBPROJECT_rev2 26#ifdef SUBPROJECT_rev2
27 #include "rev2/config.h" 27 #include "rev2/config.h"
28#endif 28#endif
29#ifdef SUBPROJECT_rev2fliphalf
30 #include "../../rev2fliphalf/config.h"
31#endif
29#endif 32#endif
diff --git a/keyboards/lets_split/eeprom-lefthand.eep b/keyboards/lets_split/eeprom-lefthand.eep
index a92200b12..b9666a74c 100644
--- a/keyboards/lets_split/eeprom-lefthand.eep
+++ b/keyboards/lets_split/eeprom-lefthand.eep
@@ -1,2 +1,2 @@
1:080000000000000000000001F7 1:0B0000000000000000000000000001F4
2:00000001FF 2:00000001FF
diff --git a/keyboards/lets_split/eeprom-righthand.eep b/keyboards/lets_split/eeprom-righthand.eep
index 91a683170..94cc5be7f 100644
--- a/keyboards/lets_split/eeprom-righthand.eep
+++ b/keyboards/lets_split/eeprom-righthand.eep
@@ -1,2 +1,2 @@
1:080000000000000000000000F8 1:0B0000000000000000000000000000F5
2:00000001FF 2:00000001FF
diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h
index efe8bb0f2..013542731 100644
--- a/keyboards/lets_split/keymaps/i2c/config.h
+++ b/keyboards/lets_split/keymaps/i2c/config.h
@@ -16,12 +16,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17#define USE_I2C 17#define USE_I2C
18 18
19#define I2C_MASTER_LEFT 19#define MASTER_LEFT
20// #define I2C_MASTER_RIGHT 20// #define _MASTER_RIGHT
21// #define EE_HANDS
21 22
22#ifdef SUBPROJECT_rev1 23#ifdef SUBPROJECT_rev1
23 #include "../../rev1/config.h" 24 #include "../../rev1/config.h"
24#endif 25#endif
25#ifdef SUBPROJECT_rev2 26#ifdef SUBPROJECT_rev2
26 #include "../../rev2/config.h" 27 #include "../../rev2/config.h"
27#endif \ No newline at end of file 28#endif
29#ifdef SUBPROJECT_rev2fliphalf
30 #include "../../rev2fliphalf/config.h"
31#endif
diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h
index cd766cc4f..ba271d1ac 100644
--- a/keyboards/lets_split/keymaps/serial/config.h
+++ b/keyboards/lets_split/keymaps/serial/config.h
@@ -18,7 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18 18
19#define USE_SERIAL 19#define USE_SERIAL
20 20
21#define EE_HANDS 21#define MASTER_LEFT
22// #define _MASTER_RIGHT
23// #define EE_HANDS
22 24
23 25
24#ifdef SUBPROJECT_rev1 26#ifdef SUBPROJECT_rev1
@@ -26,4 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
26#endif 28#endif
27#ifdef SUBPROJECT_rev2 29#ifdef SUBPROJECT_rev2
28 #include "../../rev2/config.h" 30 #include "../../rev2/config.h"
29#endif \ No newline at end of file 31#endif
32#ifdef SUBPROJECT_rev2fliphalf
33 #include "../../rev2fliphalf/config.h"
34#endif
diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h
index 2cdfb061f..0de308c7a 100644
--- a/keyboards/lets_split/lets_split.h
+++ b/keyboards/lets_split/lets_split.h
@@ -7,6 +7,9 @@
7#ifdef SUBPROJECT_rev2 7#ifdef SUBPROJECT_rev2
8 #include "rev2.h" 8 #include "rev2.h"
9#endif 9#endif
10#ifdef SUBPROJECT_rev2fliphalf
11 #include "rev2fliphalf.h"
12#endif
10 13
11#include "quantum.h" 14#include "quantum.h"
12 15
diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md
index 6e296737a..ecce3f415 100644
--- a/keyboards/lets_split/readme.md
+++ b/keyboards/lets_split/readme.md
@@ -6,9 +6,45 @@ This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/
6Split keyboard firmware for Arduino Pro Micro or other ATmega32u4 6Split keyboard firmware for Arduino Pro Micro or other ATmega32u4
7based boards. 7based boards.
8 8
9
10## First Time Setup
11
12Download or clone the whole firmware and navigate to the keyboards/lets_split directory. Once your dev env is setup, you'll be able to generate the default .hex using:
13
14```
15$ make rev2
16```
17
18You will see a lot of output and if everything worked correctly you will see the built hex files:
19
20```
21lets_split_rev2_serial.hex
22lets_split_rev2_i2c.hex
23```
24
25If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so:
26
27
28```
29$ make rev2-YOUR_KEYMAP_NAME
30```
31
32If everything worked correctly you will see a file:
33
34```
35lets_split_rev2_YOUR_KEYMAP_NAME.hex
36```
37
38For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md.
39
40### Let's split 1.0
41If you have a first generation Let's Split you will need to use the revision 1 code. To do so, use `rev1` in all your commands instead.
42
9Features 43Features
10-------- 44--------
11 45
46For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md).
47
12Some features supported by the firmware: 48Some features supported by the firmware:
13 49
14* Either half can connect to the computer via USB, or both halves can be used 50* Either half can connect to the computer via USB, or both halves can be used
@@ -62,7 +98,7 @@ unnecessary in simple use cases.
62Notes on Software Configuration 98Notes on Software Configuration
63------------------------------- 99-------------------------------
64 100
65Configuring the firmware is similar to any other TMK project. One thing 101Configuring the firmware is similar to any other QMK project. One thing
66to note is that `MATIX_ROWS` in `config.h` is the total number of rows between 102to note is that `MATIX_ROWS` in `config.h` is the total number of rows between
67the two halves, i.e. if your split keyboard has 4 rows in each half, then 103the two halves, i.e. if your split keyboard has 4 rows in each half, then
68`MATRIX_ROWS=8`. 104`MATRIX_ROWS=8`.
@@ -70,33 +106,59 @@ the two halves, i.e. if your split keyboard has 4 rows in each half, then
70Also the current implementation assumes a maximum of 8 columns, but it would 106Also the current implementation assumes a maximum of 8 columns, but it would
71not be very difficult to adapt it to support more if required. 107not be very difficult to adapt it to support more if required.
72 108
73
74Flashing 109Flashing
110-------
111From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing.
112Example: `make rev2-serial-avrdude`
113
114
115Choosing which board to plug the USB cable into (choosing Master)
75-------- 116--------
117Because the two boards are identical, the firmware has logic to differentiate the left and right board.
118
119It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable.
120
121The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side.
122
123The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra.
124
125### Setting the left hand as master
126If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set.
76 127
128### Setting the right hand as master
129If you always plug the usb cable into the right board, add an extra flag to your `config.h`
130```
131 #define MASTER_RIGHT
132```
133
134### Setting EE_hands to use either hands as master
77If you define `EE_HANDS` in your `config.h`, you will need to set the 135If you define `EE_HANDS` in your `config.h`, you will need to set the
78EEPROM for the left and right halves. The EEPROM is used to store whether the 136EEPROM for the left and right halves.
137
138The EEPROM is used to store whether the
79half is left handed or right handed. This makes it so that the same firmware 139half is left handed or right handed. This makes it so that the same firmware
80file will run on both hands instead of having to flash left and right handed 140file will run on both hands instead of having to flash left and right handed
81versions of the firmware to each half. To flash the EEPROM file for the left 141versions of the firmware to each half. To flash the EEPROM file for the left
82half run: 142half run:
83``` 143```
84make eeprom-left 144avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep
145// or the equivalent in dfu-programmer
146
85``` 147```
86and similarly for right half 148and similarly for right half
87``` 149```
88make eeprom-right 150avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep
151// or the equivalent in dfu-programmer
89``` 152```
90 153
91After you have flashed the EEPROM for the first time, you then need to program 154NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`)
92the flash memory: 155
93``` 156After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash.
94make program 157
95```
96Note that you need to program both halves, but you have the option of using 158Note that you need to program both halves, but you have the option of using
97different keymaps for each half. You could program the left half with a QWERTY 159different keymaps for each half. You could program the left half with a QWERTY
98layout and the right half with a Colemak layout. Then if you connect the left 160layout and the right half with a Colemak layout using bootmagic's default layout option.
99half to a computer by USB the keyboard will use QWERTY and Colemak when the 161Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the
100right half is connected. 162right half is connected.
101 163
102 164
diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h
index 7c397912f..990976de2 100644
--- a/keyboards/lets_split/rev2/rev2.h
+++ b/keyboards/lets_split/rev2/rev2.h
@@ -9,10 +9,10 @@
9//void promicro_bootloader_jmp(bool program); 9//void promicro_bootloader_jmp(bool program);
10 10
11#define KEYMAP( \ 11#define KEYMAP( \
12 k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ 12 k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \
13 k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ 13 k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \
14 k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ 14 k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \
15 k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ 15 k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \
16 ) \ 16 ) \
17 { \ 17 { \
18 { k00, k01, k02, k03, k04, k05 }, \ 18 { k00, k01, k02, k03, k04, k05 }, \
diff --git a/keyboards/lets_split/rev2fliphalf/Makefile b/keyboards/lets_split/rev2fliphalf/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/lets_split/rev2fliphalf/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/lets_split/rev2fliphalf/config.h b/keyboards/lets_split/rev2fliphalf/config.h
new file mode 100644
index 000000000..1c45cf136
--- /dev/null
+++ b/keyboards/lets_split/rev2fliphalf/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 0x3060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Wootpatoot
28#define PRODUCT Lets Split v2
29#define DESCRIPTION A split keyboard for the cheap makers
30
31/* key matrix size */
32// Rows are doubled-up
33#define MATRIX_ROWS 8
34#define MATRIX_COLS 6
35
36// wiring of each half
37#define MATRIX_ROW_PINS { D7, E6, B4, B5 }
38//#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
39#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order
40
41//#define CATERINA_BOOTLOADER
42
43/* COL2ROW or ROW2COL */
44#define DIODE_DIRECTION COL2ROW
45
46/* define if matrix has ghost */
47//#define MATRIX_HAS_GHOST
48
49/* number of backlight levels */
50// #define BACKLIGHT_LEVELS 3
51
52/* Set 0 if debouncing isn't needed */
53#define DEBOUNCING_DELAY 5
54
55/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
56#define LOCKING_SUPPORT_ENABLE
57/* Locking resynchronize hack */
58#define LOCKING_RESYNC_ENABLE
59
60/* key combination for command */
61#define IS_COMMAND() ( \
62 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
63)
64
65/* ws2812 RGB LED */
66#define RGB_DI_PIN D3
67#define RGBLIGHT_TIMER
68#define RGBLED_NUM 12 // Number of LEDs
69#define ws2812_PORTREG PORTD
70#define ws2812_DDRREG DDRD
71
72/*
73 * Feature disable options
74 * These options are also useful to firmware size reduction.
75 */
76
77/* disable debug print */
78// #define NO_DEBUG
79
80/* disable print */
81// #define NO_PRINT
82
83/* disable action features */
84//#define NO_ACTION_LAYER
85//#define NO_ACTION_TAPPING
86//#define NO_ACTION_ONESHOT
87//#define NO_ACTION_MACRO
88//#define NO_ACTION_FUNCTION
89
90
91#endif \ No newline at end of file
diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c
new file mode 100644
index 000000000..c505d3a6e
--- /dev/null
+++ b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c
@@ -0,0 +1,32 @@
1#include "lets_split.h"
2
3#ifdef AUDIO_ENABLE
4 float tone_startup[][2] = SONG(STARTUP_SOUND);
5 float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
6#endif
7
8void matrix_init_kb(void) {
9
10 #ifdef AUDIO_ENABLE
11 _delay_ms(20); // gets rid of tick
12 PLAY_NOTE_ARRAY(tone_startup, false, 0);
13 #endif
14
15 // // green led on
16 // DDRD |= (1<<5);
17 // PORTD &= ~(1<<5);
18
19 // // orange led on
20 // DDRB |= (1<<0);
21 // PORTB &= ~(1<<0);
22
23 matrix_init_user();
24};
25
26void shutdown_user(void) {
27 #ifdef AUDIO_ENABLE
28 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
29 _delay_ms(150);
30 stop_all_notes();
31 #endif
32}
diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h
new file mode 100644
index 000000000..7dc8e5ba8
--- /dev/null
+++ b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h
@@ -0,0 +1,28 @@
1#ifndef REV2FLIPHALF_H
2#define REV2FLIPHALF_H
3
4#include "../lets_split.h"
5
6//void promicro_bootloader_jmp(bool program);
7#include "quantum.h"
8
9//void promicro_bootloader_jmp(bool program);
10
11#define KEYMAP( \
12 k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
13 k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \
14 k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
15 k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \
16 ) \
17 { \
18 { k00, k01, k02, k03, k04, k05 }, \
19 { k10, k11, k12, k13, k14, k15 }, \
20 { k20, k21, k22, k23, k24, k25 }, \
21 { k30, k31, k32, k33, k34, k35 }, \
22 { k40, k41, k42, k43, k44, k45 }, \
23 { k50, k51, k52, k53, k54, k55 }, \
24 { k60, k61, k62, k63, k64, k65 }, \
25 { k70, k71, k72, k73, k74, k75 } \
26 }
27
28#endif \ No newline at end of file
diff --git a/keyboards/lets_split/rev2fliphalf/rules.mk b/keyboards/lets_split/rev2fliphalf/rules.mk
new file mode 100644
index 000000000..80a942d06
--- /dev/null
+++ b/keyboards/lets_split/rev2fliphalf/rules.mk
@@ -0,0 +1,5 @@
1BACKLIGHT_ENABLE = no
2
3ifndef QUANTUM_DIR
4 include ../../../Makefile
5endif
diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk
index 1aee5313c..0efa78550 100644
--- a/keyboards/lets_split/rules.mk
+++ b/keyboards/lets_split/rules.mk
@@ -73,3 +73,15 @@ USE_I2C ?= yes
73SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 73SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
74 74
75CUSTOM_MATRIX = yes 75CUSTOM_MATRIX = yes
76
77avrdude: build
78 ls /dev/tty* > /tmp/1; \
79 echo "Reset your Pro Micro now"; \
80 while [[ -z $$USB ]]; do \
81 sleep 1; \
82 ls /dev/tty* > /tmp/2; \
83 USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
84 done; \
85 avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
86
87.PHONY: avrdude
diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c
index 461921798..226dc1881 100644
--- a/keyboards/lets_split/split_util.c
+++ b/keyboards/lets_split/split_util.c
@@ -21,7 +21,8 @@ static void setup_handedness(void) {
21 #ifdef EE_HANDS 21 #ifdef EE_HANDS
22 isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); 22 isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
23 #else 23 #else
24 #ifdef I2C_MASTER_RIGHT 24 // I2C_MASTER_RIGHT is deprecated use MASTER_RIGHT instead since this works for both serial and i2c
25 #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
25 isLeftHand = !has_usb(); 26 isLeftHand = !has_usb();
26 #else 27 #else
27 isLeftHand = has_usb(); 28 isLeftHand = has_usb();
diff --git a/keyboards/planck/keymaps/bone2planck/Makefile b/keyboards/planck/keymaps/bone2planck/Makefile
index cf2c31f0f..39635192e 100644
--- a/keyboards/planck/keymaps/bone2planck/Makefile
+++ b/keyboards/planck/keymaps/bone2planck/Makefile
@@ -1,20 +1,16 @@
1# Please remove if no longer applicable
2$(warning THIS FILE MAY BE TOO LARGE FOR YOUR KEYBOARD)
3$(warning Please disable some options in the Makefile to resolve)
4
5# Build Options 1# Build Options
6# change to "no" to disable the options, or define them in the Makefile in 2# change to "no" to disable the options, or define them in the Makefile in
7# the appropriate keymap folder that will get included automatically 3# the appropriate keymap folder that will get included automatically
8# 4#
9BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) 5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
10MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 6MOUSEKEY_ENABLE = no # Mouse keys(+4700)
11EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
12CONSOLE_ENABLE = no # Console for debug(+400) 8CONSOLE_ENABLE = no # Console for debug(+400)
13COMMAND_ENABLE = yes # Commands for debug and configuration 9COMMAND_ENABLE = no # Commands for debug and configuration
14NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
15BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality 11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
16MIDI_ENABLE = no # MIDI controls 12MIDI_ENABLE = no # MIDI controls
17AUDIO_ENABLE = yes # Audio output on port C6 13AUDIO_ENABLE = no # Audio output on port C6
18UNICODE_ENABLE = no # Unicode 14UNICODE_ENABLE = no # Unicode
19BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
20RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. 16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
diff --git a/keyboards/planck/keymaps/bone2planck/config.h b/keyboards/planck/keymaps/bone2planck/config.h
index 60aff6db0..3e9e692d3 100644
--- a/keyboards/planck/keymaps/bone2planck/config.h
+++ b/keyboards/planck/keymaps/bone2planck/config.h
@@ -1,7 +1,8 @@
1#ifndef CONFIG_USER_H 1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H 2#define CONFIG_USER_H
3#endif
4 3
5#include "../../config.h" 4#include "../../config.h"
6 5
7#define PREVENT_STUCK_MODIFIERS \ No newline at end of file 6#define PREVENT_STUCK_MODIFIERS
7
8#endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c
index 69d164b8c..5f77acf91 100644
--- a/keyboards/planck/keymaps/bone2planck/keymap.c
+++ b/keyboards/planck/keymaps/bone2planck/keymap.c
@@ -7,11 +7,12 @@
7// for intellisense, has to be commented for building 7// for intellisense, has to be commented for building
8/* 8/*
9#include "..\..\..\..\quantum\keymap_extras\keymap_german.h" 9#include "..\..\..\..\quantum\keymap_extras\keymap_german.h"
10#include "..\..\..\..\quantum\keymap_common.h"
11#include "..\..\..\..\tmk_core\common\keycode.h" 10#include "..\..\..\..\tmk_core\common\keycode.h"
12*/ 11*/
13 12
13
14#define _______ KC_TRNS 14#define _______ KC_TRNS
15#define XXXXXXX KC_NO
15 16
16/* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. 17/* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout.
17It has "üäöß" as it is optimized for a mix of German & English. 18It has "üäöß" as it is optimized for a mix of German & English.
@@ -23,11 +24,11 @@ Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone
23 24
24const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 26
26/* Bone2 27/* Bone2 (adapted)
27* ,-----------------------------------------------------------------------------------. 28* ,-----------------------------------------------------------------------------------.
28* | Q | J | D | U | A | X | P | H | L | M | W | | 29* | ß | J | D | U | A | X | P | H | L | M | W | Q |
29* |------+------+------+------+------+-------------+------+------+------+------+------| 30* |------+------+------+------+------+-------------+------+------+------+------+------|
30* |M1/Tab| C | T | I | E | O | B | N | R | S | G |M1/Ent| //hold for M1, tap for Tab/Enter 31* | M1 | C | T | I | E | O | B | N | R | S | G |M1/Ent| //hold for M1, tap for Enter
31* |------+------+------+------+------+------|------+------+------+------+------+------| 32* |------+------+------+------+------+------|------+------+------+------+------+------|
32* | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | 33* | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift |
33* |------+------+------+------+------+------+------+------+------+------+------+------| 34* |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -35,20 +36,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35* `-----------------------------------------------------------------------------------' 36* `-----------------------------------------------------------------------------------'
36*/ 37*/
37[0] = { 38[0] = {
38 { DE_Q, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_SS }, 39 { DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q },
39 { LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, 40 //{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
41 { MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
40 { KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT }, 42 { KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT },
41 { KC_LCTL, KC_RGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL } 43 { KC_LCTL, KC_RGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL }
42}, 44},
43 45
44/* M1 Special Characters 46/* M1 Special Characters
45very ergonomic placement for coding 47* very ergonomic placement for coding
46* ,-----------------------------------------------------------------------------------. 48* ,-----------------------------------------------------------------------------------.
47* | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ | 49* | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ |
48* |------+------+------+------+------+-------------+------+------+------+------+------| 50* |------+------+------+------+------+-------------+------+------+------+------+------|
49* |M1/Tab| \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| //hold for M1, tap for Tab/Enter 51* | M1 | \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| //hold for M1, tap for Enter
50* |------+------+------+------+------+------|------+------+------+------+------+------| 52* |------+------+------+------+------+------|------+------+------+------+------+------|
51* | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | 53* | Shift| # | ~ | | | $ | € | + | % | " | ' | ; |Shift |
52* |------+------+------+------+------+------+------+------+------+------+------+------| 54* |------+------+------+------+------+------+------+------+------+------+------+------|
53* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | 55* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl |
54* `-----------------------------------------------------------------------------------' 56* `-----------------------------------------------------------------------------------'
@@ -56,56 +58,55 @@ very ergonomic placement for coding
56[1] = { 58[1] = {
57 { DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT }, 59 { DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT },
58 { _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ }, 60 { _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ },
59 { _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ }, 61 { _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ },
60 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } 62 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
61}, 63},
62 64
63/* Navigation & Number Blocks 65/* M2 Navigation & Number Blocks
64very easy to get used to & intuituve placement 66* very easy to get used to & intuituve placement
65* ,-----------------------------------------------------------------------------------. 67* ,-----------------------------------------------------------------------------------.
66* | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | 68* | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins |
67* |------+------+------+------+------+-------------+------+------+------+------+------| 69* |------+------+------+------+------+-------------+------+------+------+------+------|
68* | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter| 70* | Tab | Home | Lft | Down | Right| End | | 4 | 5 | 6 | . | Enter|
69* |------+------+------+------+------+------|------+------+------+------+------+------| 71* |------+------+------+------+------+------|------+------+------+------+------+------|
70* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift | 72* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | , |Shift |
71* |------+------+------+------+------+------+------+------+------+------+------+------| 73* |------+------+------+------+------+------+------+------+------+------+------+------|
72* | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | 74* | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl |
73* `-----------------------------------------------------------------------------------' 75* `-----------------------------------------------------------------------------------'
74*/ 76*/
75[2] = { 77[2] = {
76 { KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_INS }, 78 { XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS },
77 { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_ENT }, 79 { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT },
78 { _______, KC_NO, KC_TAB, KC_NO, KC_ENT, KC_NO, DE_0, DE_1, DE_2, DE_3, DE_SCLN, _______ }, 80 { _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ },
79 { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ } 81 { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ }
80}, 82},
81 83
82/* Flipped Navigation & Number Blocks for one handed use 84/* M3 Switched Navigation & Number Blocks for one handed use
83accessed by sliding from M2 to M3 with thumb 85* accessed by sliding from M2 to M3 with thumb
84* ,-----------------------------------------------------------------------------------. 86* ,-----------------------------------------------------------------------------------.
85* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | 87* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | |
86* |------+------+------+------+------+-------------+------+------+------+------+------| 88* |------+------+------+------+------+-------------+------+------+------+------+------|
87* | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter| 89* | Tab | | 4 | 5 | 6 | . | Home | Left | Down | Right| End | Enter|
88* |------+------+------+------+------+------|------+------+------+------+------+------| 90* |------+------+------+------+------+------|------+------+------+------+------+------|
89* | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | 91* | Shift| 0 | 1 | 2 | 3 | , | | Tab | | Enter| |Shift |
90* |------+------+------+------+------+------+------+------+------+------+------+------| 92* |------+------+------+------+------+------+------+------+------+------+------+------|
91* | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | 93* | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl |
92* `-----------------------------------------------------------------------------------' 94* `-----------------------------------------------------------------------------------'
93*/ 95*/
94 96
95[3] = { 97[3] = {
96 { KC_INS, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO }, 98 { KC_INS, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX },
97 { _______, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ }, 99 { _______, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ },
98 { _______, DE_0, DE_1, DE_2, DE_3, DE_SCLN, KC_NO, KC_TAB, KC_INS, KC_ENT, KC_NO, _______ }, 100 { _______, DE_0, DE_1, DE_2, DE_3, DE_COMM, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, _______ },
99 { _______, _______, _______, _______, KC_NO, _______, _______, KC_NO, _______, _______, _______, _______ } 101 { _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______, _______ }
100}, 102},
101 103
102 104
103/* Function & Media Keys 105/* M4 Function & Media Keys
104slide from m4 to m5 to access flipped version
105* ,-----------------------------------------------------------------------------------. 106* ,-----------------------------------------------------------------------------------.
106* | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | | 107* | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | |
107* |------+------+------+------+------+-------------+------+------+------+------+------| 108* |------+------+------+------+------+-------------+------+------+------+------+------|
108* | | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | | 109* | Tab | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | Enter|
109* |------+------+------+------+------+------|------+------+------+------+------+------| 110* |------+------+------+------+------+------|------+------+------+------+------+------|
110* | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | 111* | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift |
111* |------+------+------+------+------+------+------+------+------+------+------+------| 112* |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -113,18 +114,19 @@ slide from m4 to m5 to access flipped version
113* `-----------------------------------------------------------------------------------' 114* `-----------------------------------------------------------------------------------'
114*/ 115*/
115[4] = { 116[4] = {
116 { KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F12, KC_NO }, 117 { XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX },
117 { KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO }, 118 { KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT },
118 { _______, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, 119 { _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ },
119 { _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ } 120 { _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ }
120}, 121},
121 122
122 123
123/* flipped Function & Media Keys 124/* M5 Switched Function & Media Keys|
125* accessed by sliding from M4 to M5 with thumb
124* ,-----------------------------------------------------------------------------------. 126* ,-----------------------------------------------------------------------------------.
125* | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | 127* | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | |
126* |------+------+------+------+------+-------------+------+------+------+------+------| 128* |------+------+------+------+------+-------------+------+------+------+------+------|
127* | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | | 129* | Tab | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | Enter|
128* |------+------+------+------+------+------|------+------+------+------+------+------| 130* |------+------+------+------+------+------|------+------+------+------+------+------|
129* | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | 131* | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift |
130* |------+------+------+------+------+------+------+------+------+------+------+------| 132* |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -132,13 +134,14 @@ slide from m4 to m5 to access flipped version
132* `-----------------------------------------------------------------------------------' 134* `-----------------------------------------------------------------------------------'
133*/ 135*/
134[5] = { 136[5] = {
135 { KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F12, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO }, 137 { XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX },
136 { KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO }, 138 { _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ },
137 { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, _______ }, 139 { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ },
138 { _______, _______, _______, KC_NO, _______, _______, _______, _______, KC_NO, _______, _______, _______ } 140 { _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ }
139} 141}
140}; 142};
141 143
144
142const uint16_t PROGMEM fn_actions[] = { 145const uint16_t PROGMEM fn_actions[] = {
143 146
144}; 147};
diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md
index 3c425efdd..be22eabdb 100644
--- a/keyboards/planck/keymaps/bone2planck/readme.md
+++ b/keyboards/planck/keymaps/bone2planck/readme.md
@@ -1,8 +1,96 @@
1check keymap.c to the layers 1Bone2Planck
2=====================================
2 3
3This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. 4This layout tries to emulate the Bone2 variant of Neo2, and is intended to be used with a German QWERTZ softwarelayout.
4It has "üäöß" as it is optimized for a mix of German & English. 5It has "üäöß" as it is optimized for a mix of German & English.
5My favourite features are the placement of the special characters often used for programming right on the home row 6The special character layer and the navigation & number block layer are inspired by the Neo2 layers,
6and the number & navigation block combo, so you never have to move your hands from their home position. 7designed to keep the fingers near the home row.
7 8
8Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone \ No newline at end of file 9Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone
10
11To build, run "make" from within the \bone2planck folder.
12
13## Bone2 (adapted) Base Layer
14```
15 ,-----------------------------------------------------------------------------------.
16 | ß | J | D | U | A | X | P | H | L | M | W | Q |
17 |------+------+------+------+------+-------------+------+------+------+------+------|
18 | M1 | C | T | I | E | O | B | N | R | S | G |M1/Ent| hold: M1, tap: Enter
19 |------+------+------+------+------+------|------+------+------+------+------+------|
20 | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift |
21 |------+------+------+------+------+------+------+------+------+------+------+------|
22 | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl |
23 `-----------------------------------------------------------------------------------'
24```
25
26## M1 Special Characters
27 very ergonomic placement for coding
28```
29 ,-----------------------------------------------------------------------------------.
30 | ° | @ | _ | [ | ] | ^ | ! | < | > | = | & | ´ |
31 |------+------+------+------+------+-------------+------+------+------+------+------|
32 | M1 | \ | / | { | } | * | ? | ( | ) | - | : |M1/Ent| hold: M1, tap: Enter
33 |------+------+------+------+------+------|------+------+------+------+------+------|
34 | Shift| # | ~ | | | $ | € | + | % | " | ' | ; |Shift |
35 |------+------+------+------+------+------+------+------+------+------+------+------|
36 | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl |
37 `-----------------------------------------------------------------------------------'
38```
39
40## M2 Navigation & Number Blocks
41 very easy to get used to & intuituve placement
42```
43 ,-----------------------------------------------------------------------------------.
44 | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins |
45 |------+------+------+------+------+-------------+------+------+------+------+------|
46 | Tab | Home | Lft | Down | Right| End | | 4 | 5 | 6 | . | Enter|
47 |------+------+------+------+------+------|------+------+------+------+------+------|
48 | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | , |Shift |
49 |------+------+------+------+------+------+------+------+------+------+------+------|
50 | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl |
51 `-----------------------------------------------------------------------------------'
52```
53
54## M4 Function & Media Keys
55```
56 ,-----------------------------------------------------------------------------------.
57 | | | Print|Scroll|Pause | | | F7 | F8 | F9 | F12 | |
58 |------+------+------+------+------+-------------+------+------+------+------+------|
59 | Tab | | Mute | Vol- | Vol+ | | ³ | F4 | F5 | F6 | F11 | Enter|
60 |------+------+------+------+------+------|------+------+------+------+------+------|
61 | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift |
62 |------+------+------+------+------+------+------+------+------+------+------+------|
63 | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl |
64 `-----------------------------------------------------------------------------------'
65```
66
67
68##Switched layers for one handed access:
69
70### M3 Switched Navigation & Number Blocks
71 accessed by sliding from M2 to M3 with thumb
72```
73 ,-----------------------------------------------------------------------------------.
74 | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | |
75 |------+------+------+------+------+-------------+------+------+------+------+------|
76 | Tab | | 4 | 5 | 6 | . | Home | Left | Down | Right| End | Enter|
77 |------+------+------+------+------+------|------+------+------+------+------+------|
78 | Shift| 0 | 1 | 2 | 3 | , | | Tab | | Enter| |Shift |
79 |------+------+------+------+------+------+------+------+------+------+------+------|
80 | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl |
81 `-----------------------------------------------------------------------------------'
82```
83
84### M5 Switched Function & Media Keys
85 accessed by sliding from M4 to M5 with thumb
86```
87 ,-----------------------------------------------------------------------------------.
88 | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | |
89 |------+------+------+------+------+-------------+------+------+------+------+------|
90 | Tab | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | Enter|
91 |------+------+------+------+------+------|------+------+------+------+------+------|
92 | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift |
93 |------+------+------+------+------+------+------+------+------+------+------+------|
94 | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl |
95 `-----------------------------------------------------------------------------------'
96``` \ No newline at end of file
diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c
index a1254d975..2acd988ea 100644
--- a/keyboards/planck/keymaps/callum/keymap.c
+++ b/keyboards/planck/keymaps/callum/keymap.c
@@ -12,8 +12,6 @@ extern keymap_config_t keymap_config;
12#define _SYMB 2 12#define _SYMB 2
13#define _MOUSE 3 13#define _MOUSE 3
14#define _FUNC 4 14#define _FUNC 4
15#define CMDLEFT LGUI(KC_LEFT)
16#define CMDRGHT LGUI(KC_RGHT)
17#define ENDASH LALT(KC_MINS) 15#define ENDASH LALT(KC_MINS)
18#define POUND LALT(KC_3) 16#define POUND LALT(KC_3)
19 17
@@ -50,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
50 48
51/* MOVE 49/* MOVE
52 * ,-----------------------------------------------------------------------------------. 50 * ,-----------------------------------------------------------------------------------.
53 * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | 51 * | Esc | | Home | Up | End | | | Home | Up | End | | Esc |
54 * |------+------+------+------+------+------+------+------+------+------+------+------| 52 * |------+------+------+------+------+------+------+------+------+------+------+------|
55 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | 53 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del |
56 * |------+------+------+------+------+------+------+------+------+------+------+------| 54 * |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -60,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
60 * `-----------------------------------------------------------------------------------' 58 * `-----------------------------------------------------------------------------------'
61 */ 59 */
62[_MOVE] = { 60[_MOVE] = {
63 {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC }, 61 {KC_ESC, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC },
64 {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, 62 {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL },
65 {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, 63 {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______},
66 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 64 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md
index f970cd974..71e200b9d 100644
--- a/keyboards/planck/keymaps/callum/readme.md
+++ b/keyboards/planck/keymaps/callum/readme.md
@@ -23,7 +23,7 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c
23 23
24/* MOVE 24/* MOVE
25 * ,-----------------------------------------------------------------------------------. 25 * ,-----------------------------------------------------------------------------------.
26 * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | 26 * | Esc | | Home | Up | End | | | Home | Up | End | | Esc |
27 * |------+------+------+------+------+------+------+------+------+------+------+------| 27 * |------+------+------+------+------+------+------+------+------+------+------+------|
28 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | 28 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del |
29 * |------+------+------+------+------+------+------+------+------+------+------+------| 29 * |------+------+------+------+------+------+------+------+------+------+------+------|
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c
index ddbe4d7b2..1b1b998b2 100644
--- a/keyboards/planck/keymaps/default/keymap.c
+++ b/keyboards/planck/keymaps/default/keymap.c
@@ -14,13 +14,16 @@ extern keymap_config_t keymap_config;
14// The underscores don't mean anything - you can have a layer called STUFF or any other name. 14// The underscores don't mean anything - you can have a layer called STUFF or any other name.
15// Layer names don't all need to be of the same length, obviously, and you can also skip them 15// Layer names don't all need to be of the same length, obviously, and you can also skip them
16// entirely and just use numbers. 16// entirely and just use numbers.
17#define _QWERTY 0 17
18#define _COLEMAK 1 18enum planck_layers {
19#define _DVORAK 2 19 _QWERTY,
20#define _LOWER 3 20 _COLEMAK,
21#define _RAISE 4 21 _DVORAK,
22#define _PLOVER 5 22 _LOWER,
23#define _ADJUST 16 23 _RAISE,
24 _PLOVER,
25 _ADJUST
26};
24 27
25enum planck_keycodes { 28enum planck_keycodes {
26 QWERTY = SAFE_RANGE, 29 QWERTY = SAFE_RANGE,
diff --git a/keyboards/planck/keymaps/espynn/Makefile b/keyboards/planck/keymaps/espynn/Makefile
new file mode 100644
index 000000000..44a030ba3
--- /dev/null
+++ b/keyboards/planck/keymaps/espynn/Makefile
@@ -0,0 +1,63 @@
1#----------------------------------------------------------------------------
2# On command line:
3#
4# make all = Make software.
5#
6# make clean = Clean out built project files.
7#
8# make coff = Convert ELF to AVR COFF.
9#
10# make extcoff = Convert ELF to AVR Extended COFF.
11#
12# make program = Download the hex file to the device.
13# Please customize your programmer settings(PROGRAM_CMD)
14#
15# make teensy = Download the hex file to the device, using teensy_loader_cli.
16# (must have teensy_loader_cli installed).
17#
18# make dfu = Download the hex file to the device, using dfu-programmer (must
19# have dfu-programmer installed).
20#
21# make flip = Download the hex file to the device, using Atmel FLIP (must
22# have Atmel FLIP installed).
23#
24# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
25# (must have dfu-programmer installed).
26#
27# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
28# (must have Atmel FLIP installed).
29#
30# make debug = Start either simulavr or avarice as specified for debugging,
31# with avr-gdb or avr-insight as the front end for debugging.
32#
33# make filename.s = Just compile filename.c into the assembler code only.
34#
35# make filename.i = Create a preprocessed source file for use in submitting
36# bug reports to the GCC project.
37#
38# To rebuild project do "make clean" then "make all".
39#----------------------------------------------------------------------------
40
41# Build Options
42# change to "no" to disable the options, or define them in the makefile.mk in
43# the appropriate keymap folder that will get included automatically
44#
45BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
46MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
47EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
48CONSOLE_ENABLE = no # Console for debug(+400)
49COMMAND_ENABLE = yes # Commands for debug and configuration
50NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
51BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
52MIDI_ENABLE = no # MIDI controls
53AUDIO_ENABLE = no # Audio output on port C6
54UNICODE_ENABLE = no # Unicode
55BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
56RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
57
58# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
59SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
60
61ifndef QUANTUM_DIR
62 include ../../../../Makefile
63endif
diff --git a/keyboards/planck/keymaps/espynn/keyboard-layout.jpg b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg
new file mode 100644
index 000000000..55e5396bf
--- /dev/null
+++ b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg
Binary files differ
diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c
new file mode 100644
index 000000000..4a3fe32b8
--- /dev/null
+++ b/keyboards/planck/keymaps/espynn/keymap.c
@@ -0,0 +1,151 @@
1#include "planck.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4#ifdef BACKLIGHT_ENABLE
5 #include "backlight.h"
6#endif
7#define PREVENT_STUCK_MODIFIERS
8extern keymap_config_t keymap_config;
9
10// Symbolic names for macro IDs.
11#define _QWERTY 0 // QUERTY layer
12#define _LOWER 1 // Lower layer
13#define _RAISE 2 // Raise layer
14#define _CUSTOM 3 // Custom layer (LOWER + RAISE)
15#define _BL 4 // Backlight
16#define _CUS0 5 // Mobile#
17#define _CUS1 6 // signature
18#define _CUS2 7 // macro 2
19#define _CUS3 8 // macro 3
20#define _CUS4 9 // macro 4
21#define _CUS5 10 // email
22#define _COPY 11 // copy
23#define _PASTE 12 // paste
24#define _CUT 13 // cut
25
26// Macro shortcuts.
27#define QWERTY M(_LOWER)
28#define LOWER M(_LOWER)
29#define RAISE M(_RAISE)
30#define CUSTOM M(_CUSTOM)
31#define BL M(_BL)
32#define CUS0 M(_CUS0)
33#define CUS1 M(_CUS1)
34#define CUS2 M(_CUS2)
35#define CUS3 M(_CUS3)
36#define CUS4 M(_CUS4)
37#define CUS5 M(_CUS5)
38#define COPY M(_COPY)
39#define PASTE M(_PASTE)
40#define CUT M(_CUT)
41
42// Func macro definitions.
43#define LWR_PGDN FUNC(0) // Tap for PgDn, hold for LOWER
44#define RSE_PGUP FUNC(1) // Tap for PgUp, hold for RAISE
45#define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK)
46#define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift
47#define ZM_NRM FUNC(4) // Zoom normal
48#define ZM_IN FUNC(5) // Zoom out
49#define ZM_OUT FUNC(6) // Zoom in
50
51// Enable these functions using FUNC(n) macro.
52const uint16_t PROGMEM fn_actions[] = {
53 [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_PGDN),
54 [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_PGUP),
55 [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS),
56 [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT),
57 [4] = ACTION_MODS_KEY(MOD_LCTL, KC_0),
58 [5] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS),
59 [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PLUS),
60 [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS),
61 };
62
63// This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l
64const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
65[_QWERTY] = { /* QWERTY */
66 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
67 {KC_DEL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT},
68 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT},
69 {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
70},
71[_LOWER] = { /* LOWER */
72 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL},
73 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
74 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
75 {KC_TRNS, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
76},
77[_RAISE] = { /* RAISE */
78 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
79 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS},
80 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS},
81 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
82},
83[_CUSTOM] = { /* CUSTOM */
84 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
85 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0, CUS3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
86 {KC_TRNS, KC_TRNS, CUT, COPY, PASTE, CUS1, CUS5, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
87 {BL, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
88}
89};
90
91// Set a layer persistantly.
92void persistant_default_layer_set(uint16_t default_layer) {
93 eeconfig_update_default_layer(default_layer);
94 default_layer_set(default_layer);
95}
96
97// Macro actions for each corresponding ID.
98const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
99{
100 switch(id) {
101 case _RAISE: // Raised layer.
102 if (record->event.pressed) {
103 layer_on(_RAISE);
104 update_tri_layer(_LOWER, _RAISE, _CUSTOM);
105 } else {
106 layer_off(_RAISE);
107 update_tri_layer(_LOWER, _RAISE, _CUSTOM);
108 }
109 break;
110 case _LOWER: // Lowered layer.
111 if (record->event.pressed) {
112 layer_on(_LOWER);
113 update_tri_layer(_LOWER, _RAISE, _CUSTOM);
114 } else {
115 layer_off(_LOWER);
116 update_tri_layer(_LOWER, _RAISE, _CUSTOM);
117 }
118 break;
119 case _BL: // Backlight
120 if (record->event.pressed) {
121 register_code(KC_RSFT);
122#ifdef BACKLIGHT_ENABLE
123 backlight_step();
124#endif
125 } else {
126 unregister_code(KC_RSFT);
127 }
128 break;
129 case _CUS0: // enter your mobile# here
130 return MACRODOWN(T(9), T(9), T(9), T(MINS),T(9), T(9), T(9), T(MINS),T(9), T(9), T(9), T(9),END);
131 case _CUS1: // signature line for email
132 return MACRODOWN(T(ENT), T(ENT), T(MINS), T(J), T(W), END);
133 case _CUS2: // Custom macro 2
134 return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_L), UP(KC_LSFT), END );
135 case _CUS3: // custom macro 3
136 return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_F), UP(KC_LSFT), END );
137 case _CUS4: // custom macro 4
138 return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_I), UP(KC_LSFT), END );
139 case _CUS5: // Enter your email here
140 return MACRODOWN( TYPE(KC_F),
141 DOWN(KC_LSFT), TYPE(KC_2), UP(KC_LSFT),
142 TYPE(KC_G), TYPE(KC_M), TYPE(KC_A), TYPE(KC_I), TYPE(KC_L), TYPE(KC_DOT), TYPE(KC_C), TYPE(KC_O), TYPE(KC_M), END );
143 case _CUT: //cut macro
144 return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_X), UP(KC_LCTL), END );
145 case _COPY: // copy macro
146 return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_C), UP(KC_LCTL), END );
147 case _PASTE: // paste macro
148 return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_V), UP(KC_LCTL), END );
149 };
150 return MACRO_NONE;
151} \ No newline at end of file
diff --git a/keyboards/planck/keymaps/espynn/layout.json b/keyboards/planck/keymaps/espynn/layout.json
new file mode 100644
index 000000000..38ccc3452
--- /dev/null
+++ b/keyboards/planck/keymaps/espynn/layout.json
@@ -0,0 +1,271 @@
1[
2 {
3 "backcolor": "#858585",
4 "name": "Planck 40%",
5 "author": "James Folkert",
6 "background": {
7 "name": "Aluminium brushed",
8 "style": "background-image: url('/bg/metal/aluminum_texture1642.jpg');"
9 },
10 "switchMount": "cherry",
11 "switchBrand": "cherry",
12 "switchType": "MX1A-A1xx",
13 "pcb": true,
14 "plate": true
15 },
16 [
17 {
18 "fa": [
19 2,
20 2,
21 0,
22 2
23 ]
24 },
25 "F1\n1\n\n!\n\n\n\n\n\n<i class='kb kb-Tab-2'></i>",
26 "F2\n2\n\n@\n\n\n\n\n\nQ",
27 "F3\n3\n\n#\n\n\n\n\n\nW",
28 "F4\n4\n\n$\n\n\n\n\n\nE",
29 "F5\n5\n\n%\n\n\n\n\n\nR",
30 "F6\n6\n\n^\n\n\n\n\n\nT",
31 "F7\n6\n\n&\n\n\n\n\n\nY",
32 "F8\n8\n\n*\nMacro4\n\n\n\n\nU",
33 "F9\n9\n\n(\n\n\n\n\n\nI",
34 {
35 "fa": [
36 0,
37 0,
38 0,
39 2
40 ]
41 },
42 "F10\n0\n\n)\n\n\n\n\n\nO",
43 {
44 "fa": [
45 2,
46 2,
47 0,
48 2
49 ]
50 },
51 "F11\n-\n\n_\n\n\n\n\n\nP",
52 "F12\n=\n\n+\n\n\n\n\n\n<i class='kb kb-Unicode-BackSpace-DeleteLeft-Big'></i>"
53 ],
54 [
55 {
56 "a": 7,
57 "f": 3
58 },
59 "<i class='mss mss-Unicode-DeleteRight-Big-2'></i>",
60 {
61 "f": 3
62 },
63 "A",
64 {
65 "f": 3
66 },
67 "S",
68 {
69 "f": 3
70 },
71 "D",
72 {
73 "t": "#ff0000",
74 "a": 4,
75 "f": 3
76 },
77 "\n(\n\n\n\n\n\n\n\nF",
78 {
79 "t": "#000000",
80 "f": 3
81 },
82 "\n)\n\n\n\n\n\n\n\nG",
83 {
84 "f": 3
85 },
86 "\n{\n\n\nMacro0\n\n\n\n\nH",
87 {
88 "t": "#ff0000",
89 "f": 3
90 },
91 "\n}\n\n\nMacro3\n\n\n\n\nJ",
92 {
93 "t": "#000000",
94 "f": 3
95 },
96 "{\n\n\n\n\n\n\n\n\nK",
97 {
98 "f": 3
99 },
100 "{\n\n\n\n\n\n\n\n\nL",
101 {
102 "fa": [
103 2,
104 2,
105 2,
106 2,
107 0,
108 0,
109 0,
110 2
111 ]
112 },
113 "\\\n\n|\n\n\n\n\n:\n\n;",
114 {
115 "a": 7,
116 "fa": [
117 9
118 ]
119 },
120 "<i class='mss mss-Unicode-Enter-3'></i>"
121 ],
122 [
123 {
124 "f": 3
125 },
126 "Shift",
127 {
128 "f": 3
129 },
130 "Z",
131 {
132 "f": 3
133 },
134 "X\n\n\n\nCut",
135 {
136 "f": 3
137 },
138 "C\n\n\n\nCopy",
139 {
140 "a": 4,
141 "fa": [
142 2,
143 2,
144 2,
145 2
146 ]
147 },
148 "\\\n[\n|\n{\nPaste\n\n\n\n\nV",
149 "|\n]\n\n}\nMacro1\n\n\n\n\nB",
150 "`\n'\n~\n\"\nMacro5\n\n\n\n\nN",
151 "~\n\"\n\n\nMacro2\n\n\n\n\nM",
152 {
153 "fa": [
154 2,
155 2,
156 2,
157 2,
158 0,
159 0,
160 0,
161 1
162 ]
163 },
164 "[\n\n{\n\n\n\n\n<\n\n,",
165 "[\n\n{\n\n\n\n\n\n\n.",
166 {
167 "a": 6
168 },
169 "\n\n?\n\n\n\n\n\n/",
170 {
171 "a": 4,
172 "fa": [
173 2,
174 2,
175 2,
176 0,
177 0,
178 0,
179 0,
180 1,
181 9,
182 0
183 ]
184 },
185 "\n\n\n<i class='kb kb-Arrows-Bottom-4'></i>Shift\n\n\n\n\n<i class='mss mss-Unicode-Enter-3'></i>\n\n<i class='kb kb-Arrows-Bottom-4'></i>Shift"
186 ],
187 [
188 {
189 "a": 7,
190 "f": 3
191 },
192 "Ctrl\n\n\n\nBLight",
193 {
194 "a": 4,
195 "fa": [
196 2,
197 1,
198 2,
199 0,
200 0,
201 0,
202 0,
203 1,
204 9,
205 9
206 ]
207 },
208 "\nZNorm\n\n\nRESET\n\n\n\n\n<i class='mss mss-Unicode-Escape-3'></i>",
209 {
210 "fa": [
211 2,
212 1,
213 2,
214 0,
215 0,
216 0,
217 0,
218 1,
219 9,
220 6
221 ]
222 },
223 "\nZIn\n\n\n\n\n\n\n\n<i class='kb kb-logo-windows-8'></i>",
224 {
225 "fa": [
226 2,
227 1,
228 2,
229 0,
230 0,
231 0,
232 0,
233 1,
234 9,
235 9
236 ]
237 },
238 "\nZOut\n\n\n\n\n\n\n\n<i class='kb kb-Unicode-Alternate-1'></i>",
239 {
240 "a": 7,
241 "fa": [
242 9
243 ]
244 },
245 "&dArr;",
246 {
247 "a": 4,
248 "fa": [
249 9,
250 5,
251 5
252 ],
253 "w": 2
254 },
255 "\n<i class='kb kb-Unicode-Page-Down-3'></i>\n<i class='kb kb-Unicode-Page-Up-3'></i>",
256 {
257 "a": 7
258 },
259 "&uArr;",
260 {
261 "a": 4,
262 "fa": [
263 2
264 ]
265 },
266 "<i class='kb kb-Multimedia-FastForward-End'></i>\n\n\n\n\n\n\n\n\n&larr;",
267 "<i class='kb kb-Multimedia-Volume-Down-1'></i>\n\n\n\n\n\n\n\n\n&darr;",
268 "<i class='kb kb-Multimedia-Volume-Up-1'></i>\n\n\n\n\n\n\n\n\n&uarr;",
269 "<i class='kb kb-Multimedia-Play-Pause'></i>\n\n\n\n\n\n\n\n\n&rarr;"
270 ]
271] \ No newline at end of file
diff --git a/keyboards/planck/keymaps/espynn/readme.md b/keyboards/planck/keymaps/espynn/readme.md
new file mode 100644
index 000000000..8882f4601
--- /dev/null
+++ b/keyboards/planck/keymaps/espynn/readme.md
@@ -0,0 +1,18 @@
1# Espynn's keymap for Planck Ortholinear 40% Mechanical Keyboard
2Created by James Folkert: https://twitter.com/trekloFsemaJ
3Added several custom functions to the keymap from the "ab" map. Special thanks to "mollat" for demonstration of macros in their keymap.c
4
5
6![Layout](keyboard-layout.png "Practical Keymap")
7
8
9* Online keyboard layout editor: http://www.keyboard-layout-editor.com/
10* [JSON of raw layout] (layout.json "JSON of raw layout")
11
12# Notes
13* Simultaneous RAISE+LOWER enters CUSTOM layer. Several custom keymaps are here
14* I disregarded the advice of Jack and used macros for passwords. I accept my fate. These have been abstracted to macros 2, 3, and 4
15* add your mobile and email to the keymap before make
16* RAISE and LOWER also acts as PgUp and PgDn when tapped.
17* [CapsLock] also acts as [Ctrl] key when you press and hold. It is convenient for GNU Emacs users. (not sure if this works)
18* Bracket/ paran/ brace keys are placed in the center of the keyboard for programmer's convenience. \ No newline at end of file
diff --git a/keyboards/planck/keymaps/luke/Makefile b/keyboards/planck/keymaps/luke/Makefile
new file mode 100644
index 000000000..847686873
--- /dev/null
+++ b/keyboards/planck/keymaps/luke/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 = no # Virtual DIP switch configuration(+1000)
8MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
9EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
10CONSOLE_ENABLE = no # Console for debug(+400)
11COMMAND_ENABLE = no # 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 = yes # 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/luke/keymap.c b/keyboards/planck/keymaps/luke/keymap.c
new file mode 100644
index 000000000..26dcb451b
--- /dev/null
+++ b/keyboards/planck/keymaps/luke/keymap.c
@@ -0,0 +1,355 @@
1/*
2 * A keyboard layout for the gridded planck.
3 *
4 * Copyright (C) 2017 Luke Silva
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 *
20 * ,-----------------------------------------------------------------------------------.
21 * | | | | | | | | | | | | |
22 * |------+------+------+------+------+------+------+------+------+------+------+------|
23 * | | | | | | | | | | | | |
24 * |------+------+------+------+------+------+------+------+------+------+------+------|
25 * | | | | | | | | | | | | |
26 * |------+------+------+------+------+------+------+------+------+------+------+------|
27 * | | | | | | | | | | | | |
28 * `-----------------------------------------------------------------------------------'
29 *
30 * This layout uses colemak by default, and is designed for programming, with easy access to symbols
31 * through either double purpose modifiers or colemak style rolling for commonly used symbol clusters
32 * Eg: compare colemak 'this' to '(){\n}' on the symbol layer.
33 *
34 * The layout also supports a range of multilingual characters, covering those
35 * needed for French, German, Swedish and likely some other European Languages.
36 * In the future full support for Colemak's multilingual deadkeys may be introduced.
37 *
38 * The multilingual characters are inputted through QMK's unicode engine, using
39 * the Linux input method by default, however this can be changed at runtime.
40 *
41 */
42
43
44#include "planck.h"
45
46#define _______ KC_TRNS
47#define XXXXXXX KC_NO
48
49
50// Layers
51#define _COLEMAK 0
52#define _QWERTY 1
53#define _SYM 2
54#define _NUM 3
55#define _GR 4
56#define _GR_S 5
57#define _ADJ 6
58#define _NAV 7
59#define _PLOVER 8
60
61// Macro ID numbers
62#define M_ALT_HASH 1
63#define M_GR_DASH 2
64#define M_SYM_LPRN 3
65#define M_NAV_UNDS 4
66#define M_NUM_RPRN 5
67#define M_CTRL_DLR 6
68#define M_LCBR_ENT 7
69#define M_PLOVER 8
70#define M_EXT_PLV 9
71#define M_WINDOWS 10
72#define M_LINUX 11
73#define M_OSX 12
74#define M_FUNCTION 13
75#define M_THEN 14
76#define M_CATCH 15
77
78// Macro keys
79#define ALT_HASH MACROTAP(M_ALT_HASH) // tap for #, hold for Alt
80#define GR_DASH MACROTAP(M_GR_DASH) // tap for -, hold for GR layer a-class-name
81#define SYM_LPRN MACROTAP(M_SYM_LPRN) // tap for (, hold for symbols layer if()
82#define NAV_UNDS MACROTAP(M_NAV_UNDS) // tap for _, hold for navigation layer snake_case_variable
83#define NUM_RPRN MACROTAP(M_NUM_RPRN) // tap for ), hold for numbers layer else if()
84#define CTRL_DLR MACROTAP(M_CTRL_DLR) // tap for $, hold for ctrl $php_is_really_weird
85#define LCBR_ENT M(M_LCBR_ENT) // {\n easier code formatting
86#define PLOVER M(M_PLOVER) // PHROPB (plover) or ERFVIK(qwerty) starts plover
87#define EXT_PLV M(M_EXT_PLV) // PHRO*F (plover) or ERFVYU(qwerty) stops plover
88#define WINDOWS M(M_WINDOWS) // Sets Unicode handler to windows
89#define LINUX M(M_LINUX) // Sets Unicode handler to linux
90#define OSX M(M_OSX) // Sets Unicode handler to OSX
91#define FUNCTION M(M_FUNCTION)
92#define THEN M(M_THEN)
93#define CATCH M(M_CATCH)
94
95
96// Renames of QMK keys... (would have otherwise been a macro)
97#define QWERTY DF(_QWERTY)
98#define COLEMAK DF(_COLEMAK)
99
100
101
102
103
104const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
105
106/* Colemak
107 * ,-----------------------------------------------------------------------------------.
108 * | Tab | Q | W | F | P | G | J | L | U | Y | ;: | Bksp |
109 * |------+------+------+------+------+------+------+------+------+------+------+------|
110 * | Bksp | A | R | S | T | D | H | N | E | I | O | '" |
111 * |------+------+------+------+------+------+------+------+------+------+------+------`---.
112 * |Shift=| Z | X | C | V | B | K | M | ,< | .> | /? |Shift/Ent |
113 * |------+------+------+------+------+------+------+------+------+------+------+----------|
114 * |CtCaps|GUIF4 | Alt# | Gr- | Sym( | Nav_ |Space | Num) |Ctrl$ | F11 | F12 |Nav toggle|
115 * `---------------------------------------------------------------------------------------'
116 */
117
118[_COLEMAK] = {
119 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
120 {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
121 {SFT_T(KC_EQL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) },
122 {CTL_T(KC_CAPS), KC_LGUI, ALT_HASH, GR_DASH, SYM_LPRN, NAV_UNDS, KC_SPC, NUM_RPRN, CTRL_DLR, KC_F11, KC_F12, TG(_NAV)}
123},
124
125
126
127/* QWERTY
128 * ,-----------------------------------------------------------------------------------.
129 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
130 * |------+------+------+------+------+------+------+------+------+------+------+------|
131 * | Bksp | A | S | D | F | G | H | J | K | L | ;: | '" |
132 * |------+------+------+------+------+------+------+------+------+------+------+------`---.
133 * |Shift=| Z | X | C | V | B | N | M | ,< | .> | /? |Shift/Ent |
134 * |------+------+------+------+------+------+------+------+------+------+------+----------|
135 * |CtCaps|GUIF4 | Alt# | Gr- | Sym( | Nav_ |Space | Num) |Ctrl$ | F11 | F12 |Nav toggle|
136 * `---------------------------------------------------------------------------------------'
137 */
138
139[_QWERTY] = {
140 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
141 {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
142 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) },
143 {CTL_T(KC_CAPS), KC_LGUI, KC_LALT, GR_DASH, SYM_LPRN,KC_SPC, KC_SPC, NUM_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
144},
145
146
147/* Symbols
148 * ,-----------------------------------------------------------------------------------.
149 * | Tab | ` | @ | / | * | ^ | % | : | + | - | Del | Bksp |
150 * |------+------+------+------+------+------+------+------+------+------+------+------|
151 * | | [ | ; | } | ( | " | ' | ) | {\n | ! | ] | \ |
152 * |------+------+------+------+------+------+------+------+------+------+------+------|
153 * |Shift | . | { | < | > | ~ | X2 | = | & | | | ? |Enter |
154 * |------+------+------+------+------+------+------+------+------+------+------+------|
155 * | | | | | Sym | _ |Space | NUM | X2 | | | |
156 * `-----------------------------------------------------------------------------------'
157 */
158
159[_SYM] = {
160 {KC_TAB, KC_GRV, KC_AT, KC_SLSH, KC_ASTR, KC_CIRC, KC_PERC, KC_COLN, KC_PLUS, KC_MINS, KC_DEL, KC_BSPC},
161 {FUNCTION,KC_LBRC, KC_SCLN, KC_RCBR, KC_LPRN, KC_DQT, KC_QUOT, KC_RPRN, LCBR_ENT,KC_EXLM, KC_RBRC, KC_BSLS},
162 {KC_LSFT, KC_DOT, KC_LCBR, KC_LABK, KC_RABK, KC_TILD, _______, KC_EQL, KC_AMPR, KC_PIPE, KC_QUES, KC_ENT },
163 {THEN, CATCH, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______}
164},
165
166
167/* Numbers
168 * ,-----------------------------------------------------------------------------------.
169 * | Tab | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
170 * |------+------+------+------+------+------+------+------+------+------+------+------|
171 * | Bksp | x | D | E | F | + | - | 4 | 5 | 6 | 0 |Enter |
172 * |------+------+------+------+------+------+------+------+------+------+------+------|
173 * |Shift | ( | A | B | C | * | / | 1 | 2 | 3 | ) |Enter |
174 * |------+------+------+------+------+------+------+------+------+------+------+------|
175 * | | | | GR | SYM | _ |Space | NUM | 0 | . | f | |
176 * `-----------------------------------------------------------------------------------'
177 */
178
179[_NUM] = {
180 {KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
181 {KC_BSPC, KC_X, S(KC_D), S(KC_E), S(KC_F), KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, KC_0, KC_ENT },
182 {KC_LSFT, KC_LPRN, S(KC_A), S(KC_B), S(KC_C), KC_ASTR, KC_SLSH, KC_1, KC_2, KC_3, KC_RPRN, KC_ENT },
183 {_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_F, _______}
184},
185
186
187/* Gr layer / international keys
188 * ,-----------------------------------------------------------------------------------.
189 * | | ä | å | | ¢£ | €¥ | | ë | ê | ü | ù | |
190 * |------+------+------+------+------+------+------+------+------+------+------+------|
191 * | | â | à | ß | | | | è | é | ï | ö | |
192 * |------+------+------+------+------+------+------+------+------+------+------+------|
193 * | | æ | ô | ç | œ | | | û | « | » | î | |
194 * |------+------+------+------+------+------+------+------+------+------+------+------|
195 * | | | | | | | | | | | | |
196 * `-----------------------------------------------------------------------------------'
197 */
198
199[_GR] = {
200 {_______, UC(0xE4),UC(0xE5), _______,UC(0xA2), UC(0x20AC),_______,UC(0xEB),UC(0xEA),UC(0xFC),UC(0xF9), _______},
201 {_______, UC(0xE2),UC(0xE0),UC(0xDF), _______, _______, _______,UC(0xE8),UC(0xE9),UC(0xEF),UC(0xF6), _______},
202 {MO(_GR_S),UC(0xE6),UC(0xF4),UC(0xE7),UC(0x153),_______, _______,UC(0xFB),UC(0xAB),UC(0xBB),UC(0xEE), MO(_GR_S)},
203 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
204},
205
206// Shifted layer of the above
207[_GR_S] = {
208 {_______, UC(0xC4),UC(0xC5), _______, UC(0xA3), UC(0xA5),_______, UC(0xCB),UC(0xCA),UC(0xDC),UC(0xD9),_______},
209 {_______, UC(0xC2),UC(0xC0), UC(0xDF),_______, _______, _______, UC(0xC8),UC(0xC9),UC(0xCF),UC(0xD6),_______},
210 {MO(_GR_S),UC(0xC6),UC(0xD4), UC(0xC7),UC(0x152),_______, _______, UC(0xDB),UC(0xAB),UC(0xBB),UC(0xCE),MO(_GR_S)},
211 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
212},
213
214
215/* Adjust Layer (Gr + Num)
216 * ,-----------------------------------------------------------------------------------.
217 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
218 * |------+-------------+------+------+------+------+------+------+------+------+------|
219 * | | |Prntscr| ESC |VOLUP | PLAY | PREV |QWERTY|COLEMAK|PLOVER| | |
220 * |------+-------------+------+------+------+------+------+------+------+------+------|
221 * | | |BACKLIT| INS |VOLDWN| MUTE | NEXT | WIND |LINUX | OSX | | |
222 * |------+-------------+------+------+------+------+------+------+------+------+------|
223 * | | | | | | | | | | | | |
224 * `-----------------------------------------------------------------------------------'
225 */
226
227[_ADJ] = {
228 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
229 {XXXXXXX, XXXXXXX, KC_PSCR, KC_ESC, KC_VOLU, KC_MPLY, KC_MPRV, QWERTY, COLEMAK, PLOVER, XXXXXXX, XXXXXXX},
230 {XXXXXXX, XXXXXXX, BL_STEP, KC_INS, KC_VOLD, KC_MUTE, KC_MNXT, WINDOWS, LINUX, OSX, XXXXXXX, XXXXXXX},
231 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
232},
233
234
235/* Navigation
236 * ,-----------------------------------------------------------------------------------.
237 * | | | BTN3 | BTN2 | BTN1 | | ACL0 | HOME | PGDN | PGUP | END | Bksp |
238 * |------+------+------+------+------+------+------+------+------+------+------+------|
239 * | |MSLEFT| MSDN | MSUP |MSRGHT| | ACL1 | LEFT | DOWN | UP | RGHT |Enter |
240 * |------+------+------+------+------+------+------+------+------+------+------+------|
241 * | |WHLEFT| WHDN | WHUP |WHRGHT| | ACL2 |C-LEFT|C-PGDN|C-PGUP|C-RGHT|Enter |
242 * |------+------+------+------+------+------+------+------+------+------+------+------|
243 * | | | | | | _ |Space | ACL0 | ACL1 | ACL2 | |TGLNAV|
244 * `-----------------------------------------------------------------------------------'
245 */
246
247[_NAV] = {
248 {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, KC_ACL0, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC},
249 {XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_ENT },
250 {XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, KC_ACL2, LCTL(KC_LEFT), LCTL(KC_PGDN), LCTL(KC_PGUP), LCTL(KC_RIGHT), KC_ENT },
251 {_______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______}
252},
253
254/* Plover Layer
255 * ,-----------------------------------------------------------------------------------.
256 * | | S | T | P | H | * | * | F | P | L | T | D |
257 * |------+------+------+------+------+------+------+------+------+------+------+------|
258 * |TogOut| S | K | W | R | * | * | R | B | G | S | Z |
259 * |------+------+------+------+------+------+------+------+------+------+------+------|
260 * | # | # | # | # | # | # | # | # | # | # | # | # |
261 * |------+------+------+------+------+------+------+------+------+------+------+------|
262 * | Exit | | | # | A | O | E | U | | | | |
263 * `-----------------------------------------------------------------------------------'
264 */
265
266[_PLOVER] = {
267 {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
268 {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
269 {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
270 {EXT_PLV, XXXXXXX, XXXXXXX, KC_1, KC_C, KC_V, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
271}
272
273
274};
275
276const uint16_t PROGMEM fn_actions[] = {
277};
278
279
280void matrix_init_user(){
281 set_unicode_input_mode(UC_LNX);
282}
283
284
285const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
286{
287 switch(id) {
288 case M_ALT_HASH:
289 return MACRO_TAP_SHFT_KEY_HOLD_MOD(record, 3, LALT);
290 case M_GR_DASH:
291 {
292 const macro_t* macro = MACRO_TAP_HOLD_LAYER(record, MACRO(T(MINS)), _GR);
293 update_tri_layer(_NUM, _GR, _ADJ);
294 return macro;
295 }
296 case M_SYM_LPRN:
297 return MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, 9, _SYM);
298 case M_NAV_UNDS:
299 return MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, MINS, _NAV);
300 case M_NUM_RPRN:
301 {
302 const macro_t* macro = MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, 0, _NUM);
303 update_tri_layer(_NUM, _GR, _ADJ);
304 return macro;
305 }
306 case M_CTRL_DLR:
307 return MACRO_TAP_SHFT_KEY_HOLD_MOD(record, 4, LCTL);
308 case M_LCBR_ENT:
309 return MACRODOWN(I(10), D(LSFT), T(LBRC), U(LSFT), T(ENT), END);
310 case M_PLOVER:
311 if (record->event.pressed) {
312 layer_and(0);
313 layer_on(_PLOVER);
314 default_layer_set(_PLOVER);
315
316 // Starts plover
317 return MACRO(I(10), D(E), D(R), D(F), D(V), D(I), D(K), U(E), U(R), U(F), U(V), U(I), U(K), END);
318 }
319 break;
320 case M_EXT_PLV:
321 if (!record->event.pressed) {
322 layer_off(_PLOVER);
323 default_layer_set(_COLEMAK);
324
325 //Pauses plover
326 return MACRO(I(10), D(E), D(R), D(F), D(V), D(Y), D(U), U(E), U(R), U(F), U(V), U(Y), U(U), END);
327 }
328 break;
329 case M_WINDOWS:
330 set_unicode_input_mode(UC_WIN);
331 break;
332 case M_LINUX:
333 set_unicode_input_mode(UC_LNX);
334 break;
335 case M_OSX:
336 set_unicode_input_mode(UC_OSX);
337 break;
338 case M_FUNCTION:
339 if (record->event.pressed) {
340 SEND_STRING("function");
341 }
342 break;
343 case M_THEN:
344 if (record->event.pressed) {
345 SEND_STRING("then");
346 }
347 break;
348 case M_CATCH:
349 if (record->event.pressed) {
350 SEND_STRING("catch");
351 }
352 break;
353 }
354 return MACRO_NONE;
355};
diff --git a/keyboards/planck/keymaps/luke/readme.md b/keyboards/planck/keymaps/luke/readme.md
new file mode 100644
index 000000000..3a4824b5b
--- /dev/null
+++ b/keyboards/planck/keymaps/luke/readme.md
@@ -0,0 +1,2 @@
1# A more basic Planck Layout for copying
2
diff --git a/keyboards/planck/keymaps/smt/Makefile b/keyboards/planck/keymaps/smt/Makefile
new file mode 100644
index 000000000..457a3d01d
--- /dev/null
+++ b/keyboards/planck/keymaps/smt/Makefile
@@ -0,0 +1,3 @@
1ifndef QUANTUM_DIR
2 include ../../../../Makefile
3endif
diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c
new file mode 100644
index 000000000..51e5a40bf
--- /dev/null
+++ b/keyboards/planck/keymaps/smt/keymap.c
@@ -0,0 +1,229 @@
1#include "planck.h"
2#include "action_layer.h"
3#ifdef AUDIO_ENABLE
4 #include "audio.h"
5#endif
6#include "eeconfig.h"
7
8extern keymap_config_t keymap_config;
9
10// Each layer gets a name for readability, which is then used in the keymap matrix below.
11// The underscores don't mean anything - you can have a layer called STUFF or any other name.
12// Layer names don't all need to be of the same length, obviously, and you can also skip them
13// entirely and just use numbers.
14#define _DVORAK 0
15#define _QWERTY 1
16#define _LOWER 2
17#define _RAISE 3
18#define _ADJUST 16
19
20enum planck_keycodes {
21 DVORAK = SAFE_RANGE,
22 QWERTY,
23 LOWER,
24 RAISE,
25 BACKLIT
26};
27
28// Fillers to make layering more clear
29#define _______ KC_TRNS
30#define XXXXXXX KC_NO
31
32const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
33
34/* Dvorak
35 * ,-----------------------------------------------------------------------------------.
36 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
37 * |------+------+------+------+------+-------------+------+------+------+------+------|
38 * | Esc | A | O | E | U | I | D | H | T | N | S | - |
39 * |------+------+------+------+------+------|------+------+------+------+------+------|
40 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
41 * |------+------+------+------+------+------+------+------+------+------+------+------|
42 * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
43 * `-----------------------------------------------------------------------------------'
44 */
45[_DVORAK] = {
46 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
47 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS},
48 {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)},
49 {ALL_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
50},
51
52/* Qwerty
53 * ,-----------------------------------------------------------------------------------.
54 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
55 * |------+------+------+------+------+-------------+------+------+------+------+------|
56 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
57 * |------+------+------+------+------+------|------+------+------+------+------+------|
58 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
59 * |------+------+------+------+------+------+------+------+------+------+------+------|
60 * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
61 * `-----------------------------------------------------------------------------------'
62 */
63[_QWERTY] = {
64 {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
65 {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
66 {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______},
67 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
68},
69
70/* Lower
71 * ,-----------------------------------------------------------------------------------.
72 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
73 * |------+------+------+------+------+-------------+------+------+------+------+------|
74 * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp|
75 * |------+------+------+------+------+------|------+------+------+------+------+------|
76 * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn|
77 * |------+------+------+------+------+------+------+------+------+------+------+------|
78 * | | | | | | | | Next | Vol- | Vol+ | Play |
79 * `-----------------------------------------------------------------------------------'
80 */
81[_LOWER] = {
82 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
83 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP},
84 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN},
85 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
86},
87
88/* Raise
89 * ,-----------------------------------------------------------------------------------.
90 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
91 * |------+------+------+------+------+-------------+------+------+------+------+------|
92 * | | | | | | | _ | ? | + | { | } | | |
93 * |------+------+------+------+------+------|------+------+------+------+------+------|
94 * | | | | | | | - | / | = | [ | ] | \ |
95 * |------+------+------+------+------+------+------+------+------+------+------+------|
96 * | | | | | | | | Next | Vol- | Vol+ | Play |
97 * `-----------------------------------------------------------------------------------'
98 */
99[_RAISE] = {
100 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
101 {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
102 {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
103 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
104},
105
106/* Adjust (Lower + Raise)
107 * ,-----------------------------------------------------------------------------------.
108 * | | Reset| | | | | | | | | | Del |
109 * |------+------+------+------+------+-------------+------+------+------+------+------|
110 * | | | |Aud on|Audoff|AGnorm|AGswap|Dvorak|Qwerty| | | |
111 * |------+------+------+------+------+------|------+------+------+------+------+------|
112 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
113 * |------+------+------+------+------+------+------+------+------+------+------+------|
114 * | | | | | | | | | | | |
115 * `-----------------------------------------------------------------------------------'
116 */
117[_ADJUST] = {
118 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
119 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, DVORAK, QWERTY, _______, _______, _______},
120 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
121 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
122}
123
124
125};
126
127#ifdef AUDIO_ENABLE
128
129float tone_startup[][2] = SONG(STARTUP_SOUND);
130float tone_qwerty[][2] = SONG(QWERTY_SOUND);
131float tone_dvorak[][2] = SONG(DVORAK_SOUND);
132float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
133
134float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
135#endif
136
137
138void persistant_default_layer_set(uint16_t default_layer) {
139 eeconfig_update_default_layer(default_layer);
140 default_layer_set(default_layer);
141}
142
143bool process_record_user(uint16_t keycode, keyrecord_t *record) {
144 switch (keycode) {
145 case DVORAK:
146 if (record->event.pressed) {
147 #ifdef AUDIO_ENABLE
148 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
149 #endif
150 persistant_default_layer_set(1UL<<_DVORAK);
151 }
152 return false;
153 break;
154 case QWERTY:
155 if (record->event.pressed) {
156 #ifdef AUDIO_ENABLE
157 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
158 #endif
159 persistant_default_layer_set(1UL<<_QWERTY);
160 }
161 return false;
162 break;
163 case LOWER:
164 if (record->event.pressed) {
165 layer_on(_LOWER);
166 update_tri_layer(_LOWER, _RAISE, _ADJUST);
167 } else {
168 layer_off(_LOWER);
169 update_tri_layer(_LOWER, _RAISE, _ADJUST);
170 }
171 return false;
172 break;
173 case RAISE:
174 if (record->event.pressed) {
175 layer_on(_RAISE);
176 update_tri_layer(_LOWER, _RAISE, _ADJUST);
177 } else {
178 layer_off(_RAISE);
179 update_tri_layer(_LOWER, _RAISE, _ADJUST);
180 }
181 return false;
182 break;
183 case BACKLIT:
184 if (record->event.pressed) {
185 register_code(KC_RSFT);
186 #ifdef BACKLIGHT_ENABLE
187 backlight_step();
188 #endif
189 } else {
190 unregister_code(KC_RSFT);
191 }
192 return false;
193 break;
194 }
195 return true;
196}
197
198void matrix_init_user(void) {
199 #ifdef AUDIO_ENABLE
200 startup_user();
201 #endif
202}
203
204#ifdef AUDIO_ENABLE
205
206void startup_user()
207{
208 _delay_ms(20); // gets rid of tick
209 PLAY_NOTE_ARRAY(tone_startup, false, 0);
210}
211
212void shutdown_user()
213{
214 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
215 _delay_ms(150);
216 stop_all_notes();
217}
218
219void music_on_user(void)
220{
221 music_scale_user();
222}
223
224void music_scale_user(void)
225{
226 PLAY_NOTE_ARRAY(music_scale, false, 0);
227}
228
229#endif
diff --git a/keyboards/planck/keymaps/smt/readme.md b/keyboards/planck/keymaps/smt/readme.md
new file mode 100644
index 000000000..0e955a574
--- /dev/null
+++ b/keyboards/planck/keymaps/smt/readme.md
@@ -0,0 +1,103 @@
1# smt's Planck keymap
2
3This keymap is primarily based on the default Planck keymap.
4
5Notable differences from the default are:
6
71. **Dvorak by default**
8
9 I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever.
10
112. **Right Shift**
12
13 I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory.
14
15 Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome!
16
173. Escape
18
19 I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency...
20
214. Backtick
22
23 I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer.
24
25 So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me.
26
27## Dvorak (default)
28
29```
30,-----------------------------------------------------------------------------------.
31| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
32|------+------+------+------+------+-------------+------+------+------+------+------|
33| Esc | A | O | E | U | I | D | H | T | N | S | - |
34|------+------+------+------+------+------|------+------+------+------+------+------|
35| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
36|------+------+------+------+------+------+------+------+------+------+------+------|
37| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
38`-----------------------------------------------------------------------------------'
39```
40
41## Qwerty (same as default)
42
43```
44,-----------------------------------------------------------------------------------.
45| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
46|------+------+------+------+------+-------------+------+------+------+------+------|
47| Esc | A | S | D | F | G | H | J | K | L | ; | " |
48|------+------+------+------+------+------|------+------+------+------+------+------|
49| Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
50|------+------+------+------+------+------+------+------+------+------+------+------|
51| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
52`-----------------------------------------------------------------------------------'
53```
54
55## Lower
56
57This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility.
58
59```
60,-----------------------------------------------------------------------------------.
61| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
62|------+------+------+------+------+-------------+------+------+------+------+------|
63| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp|
64|------+------+------+------+------+------|------+------+------+------+------+------|
65| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn|
66|------+------+------+------+------+------+------+------+------+------+------+------|
67| | | | | | | | Next | Vol- | Vol+ | Play |
68`-----------------------------------------------------------------------------------'
69```
70
71## Raise
72
73As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot.
74
75I haven't completely filled this layer, which leaves room for future mappings and macros.
76
77```
78,-----------------------------------------------------------------------------------.
79| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
80|------+------+------+------+------+-------------+------+------+------+------+------|
81| | | | | | | _ | ? | + | { | } | | |
82|------+------+------+------+------+------|------+------+------+------+------+------|
83| | | | | | | - | / | = | [ | ] | \ |
84|------+------+------+------+------+------+------+------+------+------+------+------|
85| | | | | | | | Next | Vol- | Vol+ | Play |
86`-----------------------------------------------------------------------------------'
87```
88
89## Adjust (Lower + Raise)
90
91Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings.
92
93```
94,-----------------------------------------------------------------------------------.
95| | Reset| | | | | | | | | | Del |
96|------+------+------+------+------+-------------+------+------+------+------+------|
97| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | |
98|------+------+------+------+------+------|------+------+------+------+------+------|
99| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
100|------+------+------+------+------+------+------+------+------+------+------+------|
101| | | | | | | | | | | |
102`-----------------------------------------------------------------------------------'
103```
diff --git a/keyboards/planck/keymaps/yale/Makefile b/keyboards/planck/keymaps/yale/Makefile
new file mode 100644
index 000000000..581e08cd0
--- /dev/null
+++ b/keyboards/planck/keymaps/yale/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 = no # Virtual DIP switch configuration(+1000)
8MOUSEKEY_ENABLE = yes # 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
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 \ No newline at end of file
diff --git a/keyboards/planck/keymaps/yale/config.h b/keyboards/planck/keymaps/yale/config.h
new file mode 100644
index 000000000..8a916bbd0
--- /dev/null
+++ b/keyboards/planck/keymaps/yale/config.h
@@ -0,0 +1,11 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6#define PREVENT_STUCK_MODIFIERS
7
8#endif
9
10
11
diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c
new file mode 100644
index 000000000..f2280778a
--- /dev/null
+++ b/keyboards/planck/keymaps/yale/keymap.c
@@ -0,0 +1,108 @@
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
5#include "planck.h"
6#ifdef BACKLIGHT_ENABLE
7 #include "backlight.h"
8#endif
9
10// Each layer gets a name for readability, which is then used in the keymap matrix below.
11// The underscores don't mean anything - you can have a layer called STUFF or any other name.
12// Layer names don't all need to be of the same length, obviously, and you can also skip them
13// entirely and just use numbers.
14#define _QWERTY 0
15#define _NUM 5
16#define _FUNC 6
17#define _NAV 7
18
19// Fillers to make layering more clear
20#define _______ KC_TRNS
21#define XXXXXXX KC_NO
22
23const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
24
25/* _QWERTY
26 * ,-----------------------------------------------------------------------------------.
27 * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
28 * |------+------+------+------+------+-------------+------+------+------+------+------|
29 * |Ctrl/Tab| A | S | D | F | G | H | J | K | L | ; | " |
30 * |------+------+------+------+------+------|------+------+------+------+------+------|
31 * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift |
32 * |------+------+------+------+------+------+------+------+------+------+------+------|
33 * | Ctrl | Alt | GUI | GUI | Num | Space | FN | GUI | Alt | Ctrl | Enter|
34 * `-----------------------------------------------------------------------------------'
35 */
36[_QWERTY] = {
37 {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
38 {CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
39 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
40 {KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NUM), KC_SPC, KC_SPC, MO(_FUNC), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT}
41},
42
43/* _NUM
44 * ,-----------------------------------------------------------------------------------.
45 * | ___ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ |
46 * |------+------+------+------+------+-------------+------+------+------+------+------|
47 * | Ctrl | ` | [ | { | ( | / | \ | ) | } | ] | - | = |
48 * |------+------+------+------+------+------|------+------+------+------+------+------|
49 * | ____ | ! | @ | # | $ | % | ^ | & | * | _ | + | ____ |
50 * |------+------+------+------+------+------+------+------+------+------+------+------|
51 * | ____ | ___ | ___ | ___ | XXXX | ______ | ____ | ____ | ____ | __ | ____ |
52 * `-----------------------------------------------------------------------------------'
53 */
54[_NUM] = {
55 {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
56 {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL},
57 {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______},
58 {_______, _______, _______, _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______}
59},
60
61/* _FUNC
62 * ,-----------------------------------------------------------------------------------.
63 * | ____ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ |
64 * |------+------+------+------+------+-------------+------+------+------+------+------|
65 * | ____ |Shift | Ctrl | Alt | GUI | ____ | Left | Down | Up |Right | Del | ____ |
66 * |------+------+------+------+------+------|------+------+------+------+------+------|
67 * | ____ |Light | ____ | Vol- | Prev | Play | Mute | Next | Vol+ | ____ | ____ | ____ |
68 * |------+------+------+------+------+------+------+------+------+------+------+------|
69 * | ____ | ____ | ____ | ____ | ____ | _____ | XXXX | ____ | ____ | ____ | ____ |
70 * `-----------------------------------------------------------------------------------'
71 */
72[_FUNC] = {
73 {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
74 {_______, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______},
75 {_______, M(0), _______, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, _______, _______, _______},
76 {_______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______, _______, _______, _______}
77},
78
79[_NAV] = {
80 {KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX},
81 {KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX},
82 {KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
83 {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
84},
85
86};
87
88const uint16_t PROGMEM fn_actions[] = {
89
90};
91
92const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
93{
94 // MACRODOWN only works in this function
95 switch(id) {
96 case 0:
97 if (record->event.pressed) {
98 register_code(KC_RSFT);
99 #ifdef BACKLIGHT_ENABLE
100 backlight_step();
101 #endif
102 } else {
103 unregister_code(KC_RSFT);
104 }
105 break;
106 }
107 return MACRO_NONE;
108};
diff --git a/keyboards/planck/keymaps/yale/yale_layout_picture.jpg b/keyboards/planck/keymaps/yale/yale_layout_picture.jpg
new file mode 100644
index 000000000..ab9c6b4eb
--- /dev/null
+++ b/keyboards/planck/keymaps/yale/yale_layout_picture.jpg
Binary files differ
diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c
index 78b4997a8..3313af945 100644
--- a/keyboards/preonic/keymaps/default/keymap.c
+++ b/keyboards/preonic/keymaps/default/keymap.c
@@ -9,12 +9,15 @@
9// The underscores don't mean anything - you can have a layer called STUFF or any other name. 9// The underscores don't mean anything - you can have a layer called STUFF or any other name.
10// Layer names don't all need to be of the same length, obviously, and you can also skip them 10// Layer names don't all need to be of the same length, obviously, and you can also skip them
11// entirely and just use numbers. 11// entirely and just use numbers.
12#define _QWERTY 0 12
13#define _COLEMAK 1 13enum preonic_layers {
14#define _DVORAK 2 14 _QWERTY,
15#define _LOWER 3 15 _COLEMAK,
16#define _RAISE 4 16 _DVORAK,
17#define _ADJUST 16 17 _LOWER,
18 _RAISE,
19 _ADJUST
20};
18 21
19enum preonic_keycodes { 22enum preonic_keycodes {
20 QWERTY = SAFE_RANGE, 23 QWERTY = SAFE_RANGE,
diff --git a/keyboards/preonic/keymaps/smt/Makefile b/keyboards/preonic/keymaps/smt/Makefile
new file mode 100644
index 000000000..3d4659ceb
--- /dev/null
+++ b/keyboards/preonic/keymaps/smt/Makefile
@@ -0,0 +1,3 @@
1ifndef QUANTUM_DIR
2 include ../../../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c
new file mode 100644
index 000000000..ba05d9ad5
--- /dev/null
+++ b/keyboards/preonic/keymaps/smt/keymap.c
@@ -0,0 +1,247 @@
1#include "preonic.h"
2#include "action_layer.h"
3#ifdef AUDIO_ENABLE
4 #include "audio.h"
5#endif
6#include "eeconfig.h"
7
8// Each layer gets a name for readability, which is then used in the keymap matrix below.
9// The underscores don't mean anything - you can have a layer called STUFF or any other name.
10// Layer names don't all need to be of the same length, obviously, and you can also skip them
11// entirely and just use numbers.
12#define _DVORAK 0
13#define _QWERTY 1
14#define _LOWER 2
15#define _RAISE 3
16#define _ADJUST 16
17
18enum preonic_keycodes {
19 DVORAK = SAFE_RANGE,
20 QWERTY,
21 LOWER,
22 RAISE,
23 BACKLIT
24};
25
26// Fillers to make layering more clear
27#define _______ KC_TRNS
28#define XXXXXXX KC_NO
29
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31
32/* Dvorak
33 * ,-----------------------------------------------------------------------------------.
34 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
35 * |------+------+------+------+------+------+------+------+------+------+------+------|
36 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
37 * |------+------+------+------+------+-------------+------+------+------+------+------|
38 * | Esc | A | O | E | U | I | D | H | T | N | S | - |
39 * |------+------+------+------+------+------|------+------+------+------+------+------|
40 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
41 * |------+------+------+------+------+------+------+------+------+------+------+------|
42 * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
43 * `-----------------------------------------------------------------------------------'
44 */
45[_DVORAK] = {
46 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
47 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
48 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS},
49 {SFT_T(KC_ESC), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)},
50 {ALL_T(KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
51},
52
53/* Qwerty
54 * ,-----------------------------------------------------------------------------------.
55 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
56 * |------+------+------+------+------+------+------+------+------+------+------+------|
57 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
58 * |------+------+------+------+------+-------------+------+------+------+------+------|
59 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
60 * |------+------+------+------+------+------|------+------+------+------+------+------|
61 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
62 * |------+------+------+------+------+------+------+------+------+------+------+------|
63 * | ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
64 * `-----------------------------------------------------------------------------------'
65 */
66[_QWERTY] = {
67 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
68 {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______},
69 {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
70 {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______},
71 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
72},
73
74/* Lower
75 * ,-----------------------------------------------------------------------------------.
76 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
77 * |------+------+------+------+------+------+------+------+------+------+------+------|
78 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
79 * |------+------+------+------+------+-------------+------+------+------+------+------|
80 * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp|
81 * |------+------+------+------+------+------|------+------+------+------+------+------|
82 * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn|
83 * |------+------+------+------+------+------+------+------+------+------+------+------|
84 * | | | | | | | | Next | Vol- | Vol+ | Play |
85 * `-----------------------------------------------------------------------------------'
86 */
87[_LOWER] = {
88 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
89 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
90 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP},
91 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN},
92 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
93},
94
95/* Raise
96 * ,-----------------------------------------------------------------------------------.
97 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
98 * |------+------+------+------+------+-------------+------+------+------+------+------|
99 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
100 * |------+------+------+------+------+-------------+------+------+------+------+------|
101 * | | | | | | | _ | ? | + | { | } | | |
102 * |------+------+------+------+------+------|------+------+------+------+------+------|
103 * | | | | | | | - | / | = | [ | ] | \ |
104 * |------+------+------+------+------+------+------+------+------+------+------+------|
105 * | | | | | | | | Next | Vol- | Vol+ | Play |
106 * `-----------------------------------------------------------------------------------'
107 */
108[_RAISE] = {
109 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
110 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
111 {_______, _______, _______, _______, _______, _______, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
112 {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
113 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
114},
115
116/* Adjust (Lower + Raise)
117 * ,-----------------------------------------------------------------------------------.
118 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
119 * |------+------+------+------+------+------+------+------+------+------+------+------|
120 * | | Reset| | | | | | | | | | Del |
121 * |------+------+------+------+------+-------------+------+------+------+------+------|
122 * | | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | |
123 * |------+------+------+------+------+------|------+------+------+------+------+------|
124 * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
125 * |------+------+------+------+------+------+------+------+------+------+------+------|
126 * | | | | | | | | | | | |
127 * `-----------------------------------------------------------------------------------'
128 */
129[_ADJUST] = {
130 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
131 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
132 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, DVORAK, QWERTY, _______, _______, _______},
133 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
134 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
135}
136
137
138};
139
140#ifdef AUDIO_ENABLE
141float tone_startup[][2] = {
142 {NOTE_B5, 20},
143 {NOTE_B6, 8},
144 {NOTE_DS6, 20},
145 {NOTE_B6, 8}
146};
147
148float tone_dvorak[][2] = SONG(DVORAK_SOUND);
149float tone_qwerty[][2] = SONG(QWERTY_SOUND);
150
151float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
152
153float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
154#endif
155
156void persistant_default_layer_set(uint16_t default_layer) {
157 eeconfig_update_default_layer(default_layer);
158 default_layer_set(default_layer);
159}
160
161bool process_record_user(uint16_t keycode, keyrecord_t *record) {
162 switch (keycode) {
163 case DVORAK:
164 if (record->event.pressed) {
165 #ifdef AUDIO_ENABLE
166 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
167 #endif
168 persistant_default_layer_set(1UL<<_DVORAK);
169 }
170 return false;
171 break;
172 case QWERTY:
173 if (record->event.pressed) {
174 #ifdef AUDIO_ENABLE
175 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
176 #endif
177 persistant_default_layer_set(1UL<<_QWERTY);
178 }
179 return false;
180 break;
181 case LOWER:
182 if (record->event.pressed) {
183 layer_on(_LOWER);
184 update_tri_layer(_LOWER, _RAISE, _ADJUST);
185 } else {
186 layer_off(_LOWER);
187 update_tri_layer(_LOWER, _RAISE, _ADJUST);
188 }
189 return false;
190 break;
191 case RAISE:
192 if (record->event.pressed) {
193 layer_on(_RAISE);
194 update_tri_layer(_LOWER, _RAISE, _ADJUST);
195 } else {
196 layer_off(_RAISE);
197 update_tri_layer(_LOWER, _RAISE, _ADJUST);
198 }
199 return false;
200 break;
201 case BACKLIT:
202 if (record->event.pressed) {
203 register_code(KC_RSFT);
204 #ifdef BACKLIGHT_ENABLE
205 backlight_step();
206 #endif
207 } else {
208 unregister_code(KC_RSFT);
209 }
210 return false;
211 break;
212 }
213 return true;
214};
215
216void matrix_init_user(void) {
217 #ifdef AUDIO_ENABLE
218 startup_user();
219 #endif
220}
221
222#ifdef AUDIO_ENABLE
223
224void startup_user()
225{
226 _delay_ms(20); // gets rid of tick
227 PLAY_NOTE_ARRAY(tone_startup, false, 0);
228}
229
230void shutdown_user()
231{
232 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
233 _delay_ms(150);
234 stop_all_notes();
235}
236
237void music_on_user(void)
238{
239 music_scale_user();
240}
241
242void music_scale_user(void)
243{
244 PLAY_NOTE_ARRAY(music_scale, false, 0);
245}
246
247#endif
diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md
new file mode 100644
index 000000000..016da7b01
--- /dev/null
+++ b/keyboards/preonic/keymaps/smt/readme.md
@@ -0,0 +1,113 @@
1# smt's Preonic keymap
2
3This keymap is primarily based on the default Preonic keymap, which in turn is derived from Planck's default.
4
5Notable differences from the default are:
6
71. **Dvorak by default**
8
9 I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever.
10
112. **Right Shift**
12
13 I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory.
14
15 Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome!
16
173. Escape
18
19 I am experimenting with using Left Shift as a mod-tap key for Escape, similar to how I use the Enter key. It's set up like this on my Minivan, so in the interest of consistency...
20
214. Backtick
22
23 I don't currently have LEDs on any of my keyboards, and even if I did, I don't think I would want their controls on a base layer.
24
25 So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for me.
26
27## Dvorak (default)
28
29```
30,-----------------------------------------------------------------------------------.
31| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
32|------+------+------+------+------+------+------+------+------+------+------+------|
33| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
34|------+------+------+------+------+-------------+------+------+------+------+------|
35| Esc | A | O | E | U | I | D | H | T | N | S | - |
36|------+------+------+------+------+------|------+------+------+------+------+------|
37| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
38|------+------+------+------+------+------+------+------+------+------+------+------|
39| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
40`-----------------------------------------------------------------------------------'
41```
42
43## Qwerty (same as default)
44
45```
46,-----------------------------------------------------------------------------------.
47| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
48|------+------+------+------+------+------+------+------+------+------+------+------|
49| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
50|------+------+------+------+------+-------------+------+------+------+------+------|
51| Esc | A | S | D | F | G | H | J | K | L | ; | " |
52|------+------+------+------+------+------|------+------+------+------+------+------|
53| Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
54|------+------+------+------+------+------+------+------+------+------+------+------|
55| ` | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
56`-----------------------------------------------------------------------------------'
57```
58
59## Lower
60
61This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility.
62
63```
64,-----------------------------------------------------------------------------------.
65| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
66|------+------+------+------+------+------+------+------+------+------+------+------|
67| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
68|------+------+------+------+------+-------------+------+------+------+------+------|
69| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp|
70|------+------+------+------+------+------|------+------+------+------+------+------|
71| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn|
72|------+------+------+------+------+------+------+------+------+------+------+------|
73| | | | | | | | Next | Vol- | Vol+ | Play |
74`-----------------------------------------------------------------------------------'
75```
76
77## Raise
78
79As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot.
80
81I haven't completely filled this layer, which leaves room for future mappings and macros.
82
83```
84,-----------------------------------------------------------------------------------.
85| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
86|------+------+------+------+------+-------------+------+------+------+------+------|
87| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
88|------+------+------+------+------+-------------+------+------+------+------+------|
89| | | | | | | _ | ? | + | { | } | | |
90|------+------+------+------+------+------|------+------+------+------+------+------|
91| | | | | | | - | / | = | [ | ] | \ |
92|------+------+------+------+------+------+------+------+------+------+------+------|
93| | | | | | | | Next | Vol- | Vol+ | Play |
94`-----------------------------------------------------------------------------------'
95```
96
97## Adjust (Lower + Raise)
98
99Utility layer. This is where I'd switch to Qwerty, or ~~fool around with~~ adjust the audio/music settings.
100
101```
102,-----------------------------------------------------------------------------------.
103| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
104|------+------+------+------+------+------+------+------+------+------+------+------|
105| | Reset| | | | | | | | | | Del |
106|------+------+------+------+------+-------------+------+------+------+------+------|
107| | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | |
108|------+------+------+------+------+------|------+------+------+------+------+------|
109| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
110|------+------+------+------+------+------+------+------+------+------+------+------|
111| | | | | | | | | | | |
112`-----------------------------------------------------------------------------------'
113```
diff --git a/keyboards/readme.md b/keyboards/readme.md
index d2f41ad7e..5b7b28207 100644
--- a/keyboards/readme.md
+++ b/keyboards/readme.md
@@ -39,6 +39,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not
39* [Bantam44](/keyboards/bantam44) &mdash; It is a 44-key 40% staggered keyboard. 39* [Bantam44](/keyboards/bantam44) &mdash; It is a 44-key 40% staggered keyboard.
40* [Ergodox Infinity](/keyboards/ergodox) - Ergonomic Split Keyboard by Input Club. 40* [Ergodox Infinity](/keyboards/ergodox) - Ergonomic Split Keyboard by Input Club.
41* [GH60](/keyboards/gh60) &mdash; A 60% Geekhack community-driven project. 41* [GH60](/keyboards/gh60) &mdash; A 60% Geekhack community-driven project.
42* [GON NerD](/keyboards/gonnerd) &mdash; Korean custom 60% PCB
42* [Happy Hacking Keyboard](/keyboards/hhkb) &mdash; The Happy Hacking keyboard can be hacked with a custom controller to run QMK. 43* [Happy Hacking Keyboard](/keyboards/hhkb) &mdash; The Happy Hacking keyboard can be hacked with a custom controller to run QMK.
43* [Infinity 60%](/keyboards/infinity60) - &mdash; Compact community keyboard by Input Club. 44* [Infinity 60%](/keyboards/infinity60) - &mdash; Compact community keyboard by Input Club.
44* [JD45](/keyboards/jd45) &mdash; Another Geekhack community project, designed by jdcarpe. 45* [JD45](/keyboards/jd45) &mdash; Another Geekhack community project, designed by jdcarpe.
diff --git a/keyboards/s60-x/readme.md b/keyboards/s60-x/readme.md
index 94ce82922..408ad13ac 100644
--- a/keyboards/s60-x/readme.md
+++ b/keyboards/s60-x/readme.md
@@ -13,7 +13,7 @@ You only need to flash them onto your keyboard, which is explained below, there'
13## Flashing your keyboard 13## Flashing your keyboard
14The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.atmel.com/tools/FLIP.aspx) (Windows) and [dfu-programmer](http://dfu-programmer.sourceforge.net/) (Linux/Windows). 14The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.atmel.com/tools/FLIP.aspx) (Windows) and [dfu-programmer](http://dfu-programmer.sourceforge.net/) (Linux/Windows).
15 15
16[QMK Firmware Flasher](https://github.com/jackhumbert/qmk_firmware_flasher/releases) may work, as the S60-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. 16[QMK Firmware Flasher](https://github.com/qmk/qmk_firmware_flasher/releases) may work, as the S60-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk.
17 17
18[Easy AVR USB Keyboard Firmware](https://deskthority.net/wiki/Easy_AVR_USB_Keyboard_Firmware) also supports S60-X, but it is completely unrelated to TMK firmware. Use at your own risk. 18[Easy AVR USB Keyboard Firmware](https://deskthority.net/wiki/Easy_AVR_USB_Keyboard_Firmware) also supports S60-X, but it is completely unrelated to TMK firmware. Use at your own risk.
19 19
diff --git a/keyboards/tv44/keymaps/smt/Makefile b/keyboards/tv44/keymaps/smt/Makefile
new file mode 100644
index 000000000..f4671a9d1
--- /dev/null
+++ b/keyboards/tv44/keymaps/smt/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 = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # 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 = no # 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif \ No newline at end of file
diff --git a/keyboards/tv44/keymaps/smt/config.h b/keyboards/tv44/keymaps/smt/config.h
new file mode 100644
index 000000000..f8f0a5078
--- /dev/null
+++ b/keyboards/tv44/keymaps/smt/config.h
@@ -0,0 +1,36 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/**
7 *TV44 keymap definition macro
8 */
9#define KEYMAP_TV44( \
10 K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
11 K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \
12 K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, \
13 K37, K38, K39, K40, K41, K42, K43, K44 \
14) { \
15 { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, }, \
16 { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, }, \
17 { K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, }, \
18 { K37, K38, K39, K40, KC_NO, KC_NO, KC_NO, K41, K42, K43, KC_NO, K44 } \
19}
20
21/**
22 *TV45 keymap definition macro (arrows layout)
23 */
24#define KEYMAP_TV45( \
25 K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
26 K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \
27 K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, \
28 K37, K38, K39, K40, K41, K42, K43, K44, K45 \
29) { \
30 { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, }, \
31 { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, }, \
32 { K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, }, \
33 { K37, K38, K39, K40, KC_NO, KC_NO, KC_NO, K41, K42, K43, K44, K45 } \
34}
35
36#endif
diff --git a/keyboards/tv44/keymaps/smt/keyboard-layout-minivan.png b/keyboards/tv44/keymaps/smt/keyboard-layout-minivan.png
new file mode 100644
index 000000000..2dca67fb6
--- /dev/null
+++ b/keyboards/tv44/keymaps/smt/keyboard-layout-minivan.png
Binary files differ
diff --git a/keyboards/tv44/keymaps/smt/keymap.c b/keyboards/tv44/keymaps/smt/keymap.c
new file mode 100644
index 000000000..de5ce03e2
--- /dev/null
+++ b/keyboards/tv44/keymaps/smt/keymap.c
@@ -0,0 +1,232 @@
1#include "tv44.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _QWERTY 0
12#define _COLEMAK 1
13#define _DVORAK 2
14#define _LOWER 3
15#define _RAISE 4
16#define _ADJUST 16
17
18// Keycodes
19enum planck_keycodes {
20 QWERTY = SAFE_RANGE,
21 COLEMAK,
22 DVORAK,
23 LOWER,
24 RAISE,
25 BACKLIT
26};
27
28// Fillers to make layering more clear
29#define _______ KC_TRNS
30#define XXXXXXX KC_NO
31
32// Custom macros
33#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
34#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
35#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper
36#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt
37
38const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
39
40/* Qwerty
41 *
42 * ,---------+------+------+------+------+------+------+------+------+------+------+---------.
43 * |Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | Bksp |
44 * |---------`------`------`------`------`------`------`------`------`------`------`---------|
45 * | Ctrl/Esc | A | S | D | F | G | H | J | K | L | ; | ' |
46 * |----------`------`------`------`------`------`------`------`------`------`------`--------|
47 * | Shift | Z | X | C | V | B | N | M | , | . | / |Sft/Ent|
48 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
49 * | Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
50 * `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
51 */
52[_QWERTY] = KEYMAP_TV45(
53/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
54 HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,
55/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
56 CTL_ESC , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT ,
57/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
58 KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT ,
59/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
60 ALT_GRV , KC_LGUI , LOWER , KC_SPC , KC_SPC , RAISE , KC_RGUI, KC_RALT, KC_RCTL ),
61/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
62
63/* Colemak
64 * ,---------+------+------+------+------+------+------+------+------+------+------+---------.
65 * |Hyper/Tab| Q | W | F | P | G | J | L | U | Y | ; | Bksp |
66 * |---------`------`------`------`------`------`------`------`------`------`------`---------|
67 * | Ctrl/Esc | A | R | S | T | D | H | N | E | I | O | ' |
68 * |----------`------`------`------`------`------`------`------`------`------`------`--------|
69 * | Shift | Z | X | C | V | B | K | M | , | . | / |Sft/Ent|
70 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
71 * | Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
72 * `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
73 */
74[_COLEMAK] = KEYMAP_TV45(
75/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
76 HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC ,
77/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
78 CTL_ESC , KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT ,
79/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
80 KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT ,
81/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
82 ALT_GRV , KC_LGUI , LOWER , KC_SPC , KC_SPC , RAISE , KC_RGUI, KC_RALT, KC_RCTL ),
83/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
84
85/* Dvorak
86 * ,---------+------+------+------+------+------+------+------+------+------+------+---------.
87 * |Hyper/Tab| ' | , | . | P | Y | F | G | C | R | L | Bksp |
88 * |---------`------`------`------`------`------`------`------`------`------`------`---------|
89 * | Ctrl/Esc | A | O | E | U | I | D | H | T | N | S | - |
90 * |----------`------`------`------`------`------`------`------`------`------`------`--------|
91 * | Shift | ; | Q | J | K | X | B | M | W | V | Z |Sft/Ent|
92 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
93 * | Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
94 * `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
95 */
96[_DVORAK] = KEYMAP_TV45(
97/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
98 HPR_TAB,KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC ,
99/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
100 CTL_ESC , KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS ,
101/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
102 KC_LSFT , KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT ,
103/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
104 ALT_GRV , KC_LGUI , LOWER , KC_SPC , KC_SPC , RAISE , KC_RGUI, KC_RALT, KC_RCTL ),
105/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
106
107/* Lower
108 * ,---------+------+------+------+------+------+------+------+------+------+------+---------.
109 * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
110 * |---------`------`------`------`------`------`------`------`------`------`------`---------|
111 * | $ | 4 | 5 | 6 | . | + | * | 4 | 5 | 6 | . | PageUp |
112 * |----------`------`------`------`------`------`------`------`------`------`------`--------|
113 * | = | 7 | 8 | 9 | 0 | - | / | 1 | 2 | 3 | Up |PageDn |
114 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
115 * | Brite | | | Home | End | | Left | Down | Right |
116 * `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
117 */
118[_LOWER] = KEYMAP_TV45(
119/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
120 KC_0 , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL ,
121/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
122 KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_ASTR, KC_4, KC_5, KC_6, KC_DOT, KC_PGUP ,
123/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
124 KC_EQL , KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_SLSH, KC_1, KC_2, KC_3, KC_UP, KC_PGDN ,
125/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
126 BACKLIT , _______ , _______ , KC_HOME , KC_END , _______ , KC_LEFT, KC_DOWN, KC_RGHT ),
127/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
128
129/* Raise
130 * ,---------+------+------+------+------+------+------+------+------+------+------+---------.
131 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
132 * |---------`------`------`------`------`------`------`------`------`------`------`---------|
133 * | F1 | F2 | F3 | F4 | F5 | F6 | _ | ? | + | { | } | |
134 * |----------`------`------`------`------`------`------`------`------`------`------`--------|
135 * | F7 | F8 | F9 | F10 | F11 | F12 | - | / | = | [ | ] | |
136 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
137 * | Brite | | | Play | Next | | Mute | Vol- | Vol+ |
138 * `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
139 */
140[_RAISE] = KEYMAP_TV45(
141/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
142 KC_TILD,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL ,
143/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
144 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE ,
145/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
146 KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS ,
147/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
148 BACKLIT , _______ , _______ , KC_MPLY , KC_MNXT , _______ , KC_MUTE, KC_VOLD, KC_VOLU ),
149/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
150
151/* Adjust (Lower + Raise)
152 * ,---------+------+------+------+------+------+------+------+------+------+------+---------.
153 * | | Reset| | | | | | | | | | Del |
154 * |---------`------`------`------`------`------`------`------`------`------`------`---------|
155 * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
156 * |----------`------`------`------`------`------`------`------`------`------`------`--------|
157 * | | | | | | | | | | | | |
158 * |-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
159 * | | | | | | | | | |
160 * `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
161 */
162[_ADJUST] = KEYMAP_TV45(
163/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
164 _______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
165/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
166 _______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______ ,
167/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
168 _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
169/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
170 _______ , _______ , _______ , _______ , _______ , _______ , _______, _______, _______ ),
171/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
172};
173
174void persistant_default_layer_set(uint16_t default_layer) {
175 eeconfig_update_default_layer(default_layer);
176 default_layer_set(default_layer);
177}
178
179bool process_record_user(uint16_t keycode, keyrecord_t *record) {
180 switch (keycode) {
181 case QWERTY:
182 if (record->event.pressed) {
183 persistant_default_layer_set(1UL<<_QWERTY);
184 }
185 return false;
186 break;
187 case COLEMAK:
188 if (record->event.pressed) {
189 persistant_default_layer_set(1UL<<_COLEMAK);
190 }
191 return false;
192 break;
193 case DVORAK:
194 if (record->event.pressed) {
195 persistant_default_layer_set(1UL<<_DVORAK);
196 }
197 return false;
198 break;
199 case LOWER:
200 if (record->event.pressed) {
201 layer_on(_LOWER);
202 update_tri_layer(_LOWER, _RAISE, _ADJUST);
203 } else {
204 layer_off(_LOWER);
205 update_tri_layer(_LOWER, _RAISE, _ADJUST);
206 }
207 return false;
208 break;
209 case RAISE:
210 if (record->event.pressed) {
211 layer_on(_RAISE);
212 update_tri_layer(_LOWER, _RAISE, _ADJUST);
213 } else {
214 layer_off(_RAISE);
215 update_tri_layer(_LOWER, _RAISE, _ADJUST);
216 }
217 return false;
218 break;
219 case BACKLIT:
220 if (record->event.pressed) {
221 register_code(KC_RSFT);
222 #ifdef BACKLIGHT_ENABLE
223 backlight_step();
224 #endif
225 } else {
226 unregister_code(KC_RSFT);
227 }
228 return false;
229 break;
230 }
231 return true;
232}
diff --git a/keyboards/tv44/keymaps/smt/readme.md b/keyboards/tv44/keymaps/smt/readme.md
new file mode 100644
index 000000000..647eb8976
--- /dev/null
+++ b/keyboards/tv44/keymaps/smt/readme.md
@@ -0,0 +1,126 @@
1# smt's TV44 keymap
2
3This keymap is based on a combination of my Planck keymap and [jeebak's TV44 layout](https://github.com/qmk/qmk_firmware/tree/master/keyboards/tv44/keymaps/jeebak). I removed the macros and TouchCursor/MouseCursor layers, because I'm just not ready for that level of mind-mapping.
4
5I had been using something close to the default Minivan layout, but after spending a bit of time with the Planck and Preonic, I decided it would be better for me to try to standardize to some degree, where possible.
6
7Also, it's worth noting that my Minivan is one with the "arrows" layout, which has a 45th key, so I had to define a new KEYMAP_TV45 macro in config.h. In spite of this, the 45-key Minivan is still technically considered a "TV44" as far as I know.
8
9![smt's TV44 keymap](keyboard-layout-minivan.png)
10
11## Notable features (most of which can be found in my or jeebak's respective keymap file):
12
131. **Shift/Enter**
14
15 I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory.
16
17 Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome!
18
192. **Hyper/Tab**
20
21 This key modifies with "Hyper" (see [Brett Terpstra's post](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) on this) when held, and outputs the code for Tab when tapped. On the Mac, I use KeyboardMaestro to remap my hyper-keys to do a lot of crazy things.
22
233. **Ctrl/Escape**
24
25 I set up another mod-tap, this time for the Escape key that would act as a Control modifier when held.
26
274. **Alt/Backtick**
28
29 I don't currently have LEDs on most of my keyboards, and I certainly don't want LED controls on the base layer of a 40%.
30
31 So, why use backtick in the lower left corner? I use it as my tmux prefix key, so I need to type it more frequently than most people. Putting it on the base layer works well for my use case, and it's consistent with where I place it in my Planck and Preonic keymaps.
32
33 I also like Alt in that position, so it works well as yet another mod-tap key.
34
35
36## Layers
37
38### Qwerty
39
40```
41,---------+------+------+------+------+------+------+------+------+------+------+---------.
42|Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | Bksp |
43|---------`------`------`------`------`------`------`------`------`------`------`---------|
44| Ctrl/Esc | A | S | D | F | G | H | J | K | L | ; | ' |
45|----------`------`------`------`------`------`------`------`------`------`------`--------|
46| Shift | Z | X | C | V | B | N | M | , | . | / |Sft/Ent|
47|-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
48| Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
49 `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
50```
51
52### Colemak
53
54```
55,---------+------+------+------+------+------+------+------+------+------+------+---------.
56|Hyper/Tab| Q | W | F | P | G | J | L | U | Y | ; | Bksp |
57|---------`------`------`------`------`------`------`------`------`------`------`---------|
58| Ctrl/Esc | A | R | S | T | D | H | N | E | I | O | ' |
59|----------`------`------`------`------`------`------`------`------`------`------`--------|
60| Shift | Z | X | C | V | B | K | M | , | . | / |Sft/Ent|
61|-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
62| Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
63 `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
64```
65
66### Dvorak
67
68```
69,---------+------+------+------+------+------+------+------+------+------+------+---------.
70|Hyper/Tab| ' | , | . | P | Y | F | G | C | R | L | Bksp |
71|---------`------`------`------`------`------`------`------`------`------`------`---------|
72| Ctrl/Esc | A | O | E | U | I | D | H | T | N | S | - |
73|----------`------`------`------`------`------`------`------`------`------`------`--------|
74| Shift | ; | Q | J | K | X | B | M | W | V | Z |Sft/Ent|
75|-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
76| Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
77 `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
78```
79
80### Lower
81
82This is where I put the number row, two numpad clusters, common arithmetic operators, and cursorkeys: Arrow cluster, Home/End, Page Up/Page Down. `0` and `$` are also placed on the left side for convenient access to beginning-of-line and end-of-line Vim commands. BRITE has been moved here from the base layer.
83
84```
85,---------+------+------+------+------+------+------+------+------+------+------+---------.
86| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
87|---------`------`------`------`------`------`------`------`------`------`------`---------|
88| $ | 4 | 5 | 6 | . | + | * | 4 | 5 | 6 | . | PageUp |
89|----------`------`------`------`------`------`------`------`------`------`------`--------|
90| = | 7 | 8 | 9 | 0 | - | / | 1 | 2 | 3 | Up |PageDn |
91|-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
92| Brite | | | Home | End | | Left | Down | Right |
93 `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
94```
95
96### Raise
97
98As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets helps me keep them straight. I've dropped basic media controls onto this layer as well.
99
100```
101,---------+------+------+------+------+------+------+------+------+------+------+---------.
102| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
103|---------`------`------`------`------`------`------`------`------`------`------`---------|
104| F1 | F2 | F3 | F4 | F5 | F6 | _ | ? | + | { | } | | |
105|----------`------`------`------`------`------`------`------`------`------`------`--------|
106| F7 | F8 | F9 | F10 | F11 | F12 | - | / | = | [ | ] | \ |
107|-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
108| Brite | | | Play | Next | | Mute | Vol- | Vol+ |
109 `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
110```
111
112### Adjust (Lower + Raise)
113
114Utility layer. There isn't much here; it's mainly for swapping the default keymap between Qwerty and Dvorak, or putting the keyboard into flash mode via the Reset key.
115
116```
117,---------+------+------+------+------+------+------+------+------+------+------+---------.
118| | Reset| | | | | | | | | | Del |
119|---------`------`------`------`------`------`------`------`------`------`------`---------|
120| | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
121|----------`------`------`------`------`------`------`------`------`------`------`--------|
122| | | | | | | | | | | | |
123|-----------`------`------`------`------`-----'-------`------`------`------`------`-------|
124| | | | | | | | | |
125 `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
126```
diff --git a/quantum/config_common.h b/quantum/config_common.h
index 4bdb2065d..28f68b9c7 100644
--- a/quantum/config_common.h
+++ b/quantum/config_common.h
@@ -2,8 +2,10 @@
2#define CONFIG_DEFINITIONS_H 2#define CONFIG_DEFINITIONS_H
3 3
4/* diode directions */ 4/* diode directions */
5#define COL2ROW 0 5#define COL2ROW 0
6#define ROW2COL 1 6#define ROW2COL 1
7#define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */
8
7/* I/O pins */ 9/* I/O pins */
8#ifndef F0 10#ifndef F0
9 #define B0 0x30 11 #define B0 0x30
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c
index eced3d2bb..54b872d49 100644
--- a/quantum/keymap_common.c
+++ b/quantum/keymap_common.c
@@ -80,7 +80,10 @@ action_t action_for_key(uint8_t layer, keypos_t key)
80 action.code = keymap_function_id_to_action( (int)keycode & 0xFFF ); 80 action.code = keymap_function_id_to_action( (int)keycode & 0xFFF );
81 break; 81 break;
82 case QK_MACRO ... QK_MACRO_MAX: 82 case QK_MACRO ... QK_MACRO_MAX:
83 action.code = ACTION_MACRO(keycode & 0xFF); 83 if (keycode & 0x800) // tap macros have upper bit set
84 action.code = ACTION_MACRO_TAP(keycode & 0xFF);
85 else
86 action.code = ACTION_MACRO(keycode & 0xFF);
84 break; 87 break;
85 case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: 88 case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
86 action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); 89 action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
@@ -117,7 +120,7 @@ action_t action_for_key(uint8_t layer, keypos_t key)
117 action.code = ACTION_MODS_ONESHOT(mod); 120 action.code = ACTION_MODS_ONESHOT(mod);
118 break; 121 break;
119 case QK_MOD_TAP ... QK_MOD_TAP_MAX: 122 case QK_MOD_TAP ... QK_MOD_TAP_MAX:
120 action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); 123 action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0x1F, keycode & 0xFF);
121 break; 124 break;
122 #ifdef BACKLIGHT_ENABLE 125 #ifdef BACKLIGHT_ENABLE
123 case BL_0 ... BL_15: 126 case BL_0 ... BL_15:
diff --git a/quantum/keymap_extras/keymap_br_abnt2.h b/quantum/keymap_extras/keymap_br_abnt2.h
index 0df177721..b001139dd 100644
--- a/quantum/keymap_extras/keymap_br_abnt2.h
+++ b/quantum/keymap_extras/keymap_br_abnt2.h
@@ -1,3 +1,19 @@
1/* Copyright 2017 Potiguar Faga
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
1#ifndef KEYMAP_BR_ABNT2_H 17#ifndef KEYMAP_BR_ABNT2_H
2#define KEYMAP_BR_ABNT2_H 18#define KEYMAP_BR_ABNT2_H
3 19
diff --git a/quantum/light_ws2812.c b/quantum/light_ws2812.c
index a883b1388..55bdd9cd8 100755
--- a/quantum/light_ws2812.c
+++ b/quantum/light_ws2812.c
@@ -70,7 +70,7 @@ void I2C_WriteBit(unsigned char c)
70 70
71// Inits bitbanging port, must be called before using the functions below 71// Inits bitbanging port, must be called before using the functions below
72// 72//
73void I2C_Init() 73void I2C_Init(void)
74{ 74{
75 I2C_PORT &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK)); 75 I2C_PORT &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK));
76 76
@@ -82,7 +82,7 @@ void I2C_Init()
82 82
83// Send a START Condition 83// Send a START Condition
84// 84//
85void I2C_Start() 85void I2C_Start(void)
86{ 86{
87 // set both to high at the same time 87 // set both to high at the same time
88 I2C_DDR &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK)); 88 I2C_DDR &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK));
@@ -97,7 +97,7 @@ void I2C_Start()
97 97
98// Send a STOP Condition 98// Send a STOP Condition
99// 99//
100void I2C_Stop() 100void I2C_Stop(void)
101{ 101{
102 I2C_CLOCK_HI(); 102 I2C_CLOCK_HI();
103 _delay_us(I2C_DELAY); 103 _delay_us(I2C_DELAY);
diff --git a/quantum/matrix.c b/quantum/matrix.c
index 07eb87bc3..ac523482a 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -60,13 +60,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
60 extern const matrix_row_t matrix_mask[]; 60 extern const matrix_row_t matrix_mask[];
61#endif 61#endif
62 62
63#if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW)
63static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; 64static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
64static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; 65static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
66#endif
65 67
66/* matrix state(1:on, 0:off) */ 68/* matrix state(1:on, 0:off) */
67static matrix_row_t matrix[MATRIX_ROWS]; 69static matrix_row_t matrix[MATRIX_ROWS];
68 70
69static matrix_row_t matrix_raw[MATRIX_ROWS];
70static matrix_row_t matrix_debouncing[MATRIX_ROWS]; 71static matrix_row_t matrix_debouncing[MATRIX_ROWS];
71 72
72 73
@@ -76,7 +77,7 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
76 static void unselect_rows(void); 77 static void unselect_rows(void);
77 static void select_row(uint8_t row); 78 static void select_row(uint8_t row);
78 static void unselect_row(uint8_t row); 79 static void unselect_row(uint8_t row);
79#else // ROW2COL 80#elif (DIODE_DIRECTION == ROW2COL)
80 static void init_rows(void); 81 static void init_rows(void);
81 static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); 82 static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
82 static void unselect_cols(void); 83 static void unselect_cols(void);
@@ -133,7 +134,7 @@ uint8_t matrix_cols(void) {
133// /* PORTxn */ 134// /* PORTxn */
134// _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF); 135// _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF);
135// } 136// }
136// #else 137// #elif (DIODE_DIRECTION == ROW2COL)
137// for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { 138// for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) {
138// /* DDRxn */ 139// /* DDRxn */
139// _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF); 140// _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF);
@@ -158,7 +159,7 @@ void matrix_init(void) {
158#if (DIODE_DIRECTION == COL2ROW) 159#if (DIODE_DIRECTION == COL2ROW)
159 unselect_rows(); 160 unselect_rows();
160 init_cols(); 161 init_cols();
161#else // ROW2COL 162#elif (DIODE_DIRECTION == ROW2COL)
162 unselect_cols(); 163 unselect_cols();
163 init_rows(); 164 init_rows();
164#endif 165#endif
@@ -166,7 +167,6 @@ void matrix_init(void) {
166 // initialize matrix state: all keys off 167 // initialize matrix state: all keys off
167 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 168 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
168 matrix[i] = 0; 169 matrix[i] = 0;
169 matrix_raw[i] = 0;
170 matrix_debouncing[i] = 0; 170 matrix_debouncing[i] = 0;
171 } 171 }
172 172
@@ -194,7 +194,7 @@ uint8_t matrix_scan(void)
194 194
195 } 195 }
196 196
197#else // ROW2COL 197#elif (DIODE_DIRECTION == ROW2COL)
198 198
199 // Set col, read rows 199 // Set col, read rows
200 for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { 200 for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
@@ -336,7 +336,7 @@ static void unselect_rows(void)
336 } 336 }
337} 337}
338 338
339#else // ROW2COL 339#elif (DIODE_DIRECTION == ROW2COL)
340 340
341static void init_rows(void) 341static void init_rows(void)
342{ 342{
diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c
new file mode 100644
index 000000000..e2189ad98
--- /dev/null
+++ b/quantum/process_keycode/process_combo.c
@@ -0,0 +1,134 @@
1#include "process_combo.h"
2#include "print.h"
3
4
5#define COMBO_TIMER_ELAPSED -1
6
7
8__attribute__ ((weak))
9combo_t key_combos[] = {
10
11};
12
13__attribute__ ((weak))
14void process_combo_event(uint8_t combo_index, bool pressed) {
15
16}
17
18static uint8_t current_combo_index = 0;
19
20static inline void send_combo(uint16_t action, bool pressed)
21{
22 if (action) {
23 if (pressed) {
24 register_code16(action);
25 } else {
26 unregister_code16(action);
27 }
28 } else {
29 process_combo_event(current_combo_index, pressed);
30 }
31}
32
33#define ALL_COMBO_KEYS_ARE_DOWN (((1<<count)-1) == combo->state)
34#define NO_COMBO_KEYS_ARE_DOWN (0 == combo->state)
35#define KEY_STATE_DOWN(key) do{ combo->state |= (1<<key); } while(0)
36#define KEY_STATE_UP(key) do{ combo->state &= ~(1<<key); } while(0)
37static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record)
38{
39 uint8_t count = 0;
40 uint8_t index = -1;
41 /* Find index of keycode and number of combo keys */
42 for (const uint16_t *keys = combo->keys; ;++count) {
43 uint16_t key = pgm_read_word(&keys[count]);
44 if (keycode == key) index = count;
45 if (COMBO_END == key) break;
46 }
47
48 /* Return if not a combo key */
49 if (-1 == (int8_t)index) return false;
50
51 /* The combos timer is used to signal whether the combo is active */
52 bool is_combo_active = COMBO_TIMER_ELAPSED == combo->timer ? false : true;
53
54 if (record->event.pressed) {
55 KEY_STATE_DOWN(index);
56
57 if (is_combo_active) {
58 if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was pressed */
59 send_combo(combo->keycode, true);
60 combo->timer = COMBO_TIMER_ELAPSED;
61 } else { /* Combo key was pressed */
62 combo->timer = timer_read();
63#ifdef COMBO_ALLOW_ACTION_KEYS
64 combo->prev_record = *record;
65#else
66 combo->prev_key = keycode;
67#endif
68 }
69 }
70 } else {
71 if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was released */
72 send_combo(combo->keycode, false);
73 }
74
75 if (is_combo_active) { /* Combo key was tapped */
76#ifdef COMBO_ALLOW_ACTION_KEYS
77 record->event.pressed = true;
78 process_action(record, store_or_get_action(record->event.pressed, record->event.key));
79 record->event.pressed = false;
80 process_action(record, store_or_get_action(record->event.pressed, record->event.key));
81#else
82 register_code16(keycode);
83 send_keyboard_report();
84 unregister_code16(keycode);
85#endif
86 combo->timer = 0;
87 }
88
89 KEY_STATE_UP(index);
90 }
91
92 if (NO_COMBO_KEYS_ARE_DOWN) {
93 combo->timer = 0;
94 }
95
96 return is_combo_active;
97}
98
99bool process_combo(uint16_t keycode, keyrecord_t *record)
100{
101 bool is_combo_key = false;
102
103 for (current_combo_index = 0; current_combo_index < COMBO_COUNT; ++current_combo_index) {
104 combo_t *combo = &key_combos[current_combo_index];
105 is_combo_key |= process_single_combo(combo, keycode, record);
106 }
107
108 return !is_combo_key;
109}
110
111void matrix_scan_combo(void)
112{
113 for (int i = 0; i < COMBO_COUNT; ++i) {
114 combo_t *combo = &key_combos[i];
115 if (combo->timer &&
116 combo->timer != COMBO_TIMER_ELAPSED &&
117 timer_elapsed(combo->timer) > COMBO_TERM) {
118
119 /* This disables the combo, meaning key events for this
120 * combo will be handled by the next processors in the chain
121 */
122 combo->timer = COMBO_TIMER_ELAPSED;
123
124#ifdef COMBO_ALLOW_ACTION_KEYS
125 process_action(&combo->prev_record,
126 store_or_get_action(combo->prev_record.event.pressed,
127 combo->prev_record.event.key));
128#else
129 unregister_code16(combo->prev_key);
130 register_code16(combo->prev_key);
131#endif
132 }
133 }
134}
diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h
new file mode 100644
index 000000000..847f2b737
--- /dev/null
+++ b/quantum/process_keycode/process_combo.h
@@ -0,0 +1,43 @@
1#ifndef PROCESS_COMBO_H
2#define PROCESS_COMBO_H
3
4#include <stdint.h>
5#include "progmem.h"
6#include "quantum.h"
7
8typedef struct
9{
10 const uint16_t *keys;
11 uint16_t keycode;
12#ifdef EXTRA_EXTRA_LONG_COMBOS
13 uint32_t state;
14#elif EXTRA_LONG_COMBOS
15 uint16_t state;
16#else
17 uint8_t state;
18#endif
19 uint16_t timer;
20#ifdef COMBO_ALLOW_ACTION_KEYS
21 keyrecord_t prev_record;
22#else
23 uint16_t prev_key;
24#endif
25} combo_t;
26
27
28#define COMBO(ck, ca) {.keys = &(ck)[0], .keycode = (ca)}
29#define COMBO_ACTION(ck) {.keys = &(ck)[0]}
30
31#define COMBO_END 0
32#ifndef COMBO_COUNT
33#define COMBO_COUNT 0
34#endif
35#ifndef COMBO_TERM
36#define COMBO_TERM TAPPING_TERM
37#endif
38
39bool process_combo(uint16_t keycode, keyrecord_t *record);
40void matrix_scan_combo(void);
41void process_combo_event(uint8_t combo_index, bool pressed);
42
43#endif
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index 6ae362c4c..403dca538 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -43,12 +43,16 @@ static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_acti
43 if (action->state.finished) 43 if (action->state.finished)
44 return; 44 return;
45 action->state.finished = true; 45 action->state.finished = true;
46 add_mods(action->state.oneshot_mods);
47 send_keyboard_report();
46 _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); 48 _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished);
47} 49}
48 50
49static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *action) 51static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *action)
50{ 52{
51 _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset); 53 _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset);
54 del_mods(action->state.oneshot_mods);
55 send_keyboard_report();
52} 56}
53 57
54bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { 58bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
@@ -70,6 +74,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
70 action->state.keycode = keycode; 74 action->state.keycode = keycode;
71 action->state.count++; 75 action->state.count++;
72 action->state.timer = timer_read(); 76 action->state.timer = timer_read();
77 action->state.oneshot_mods = get_oneshot_mods();
73 process_tap_dance_action_on_each_tap (action); 78 process_tap_dance_action_on_each_tap (action);
74 79
75 if (last_td && last_td != keycode) { 80 if (last_td && last_td != keycode) {
@@ -109,7 +114,7 @@ void matrix_scan_tap_dance () {
109 if (highest_td == -1) 114 if (highest_td == -1)
110 return; 115 return;
111 116
112 for (int i = 0; i <= highest_td; i++) { 117for (int i = 0; i <= highest_td; i++) {
113 qk_tap_dance_action_t *action = &tap_dance_actions[i]; 118 qk_tap_dance_action_t *action = &tap_dance_actions[i];
114 119
115 if (action->state.count && timer_elapsed (action->state.timer) > TAPPING_TERM) { 120 if (action->state.count && timer_elapsed (action->state.timer) > TAPPING_TERM) {
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h
index f753cbba6..726752ecc 100644
--- a/quantum/process_keycode/process_tap_dance.h
+++ b/quantum/process_keycode/process_tap_dance.h
@@ -9,6 +9,7 @@
9typedef struct 9typedef struct
10{ 10{
11 uint8_t count; 11 uint8_t count;
12 uint8_t oneshot_mods;
12 uint16_t keycode; 13 uint16_t keycode;
13 uint16_t timer; 14 uint16_t timer;
14 bool interrupted; 15 bool interrupted;
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c
index a30e93ae3..9d01a592d 100644
--- a/quantum/process_keycode/process_unicode.c
+++ b/quantum/process_keycode/process_unicode.c
@@ -139,9 +139,18 @@ void unicode_map_input_error() {}
139bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { 139bool process_unicode_map(uint16_t keycode, keyrecord_t *record) {
140 if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { 140 if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) {
141 const uint32_t* map = unicode_map; 141 const uint32_t* map = unicode_map;
142 uint16_t index = keycode & 0x7FF; 142 uint16_t index = keycode - QK_UNICODE_MAP;
143 uint32_t code = pgm_read_dword_far(&map[index]); 143 uint32_t code = pgm_read_dword_far(&map[index]);
144 if ((code > 0xFFFF && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { 144 if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) {
145 // Convert to UTF-16 surrogate pair
146 code -= 0x10000;
147 uint32_t lo = code & 0x3ff;
148 uint32_t hi = (code & 0xffc00) >> 10;
149 unicode_input_start();
150 register_hex32(hi + 0xd800);
151 register_hex32(lo + 0xdc00);
152 unicode_input_finish();
153 } else if ((code > 0x10ffff && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) {
145 // when character is out of range supported by the OS 154 // when character is out of range supported by the OS
146 unicode_map_input_error(); 155 unicode_map_input_error();
147 } else { 156 } else {
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 63ffe2074..45ea8cb73 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -1,4 +1,7 @@
1#include "quantum.h" 1#include "quantum.h"
2#ifdef PROTOCOL_LUFA
3#include "outputselect.h"
4#endif
2 5
3#ifndef TAPPING_TERM 6#ifndef TAPPING_TERM
4#define TAPPING_TERM 200 7#define TAPPING_TERM 200
@@ -33,14 +36,42 @@ static void do_code16 (uint16_t code, void (*f) (uint8_t)) {
33 f(KC_RGUI); 36 f(KC_RGUI);
34} 37}
35 38
39static inline void qk_register_weak_mods(uint8_t kc) {
40 add_weak_mods(MOD_BIT(kc));
41 send_keyboard_report();
42}
43
44static inline void qk_unregister_weak_mods(uint8_t kc) {
45 del_weak_mods(MOD_BIT(kc));
46 send_keyboard_report();
47}
48
49static inline void qk_register_mods(uint8_t kc) {
50 add_weak_mods(MOD_BIT(kc));
51 send_keyboard_report();
52}
53
54static inline void qk_unregister_mods(uint8_t kc) {
55 del_weak_mods(MOD_BIT(kc));
56 send_keyboard_report();
57}
58
36void register_code16 (uint16_t code) { 59void register_code16 (uint16_t code) {
37 do_code16 (code, register_code); 60 if (IS_MOD(code) || code == KC_NO) {
61 do_code16 (code, qk_register_mods);
62 } else {
63 do_code16 (code, qk_register_weak_mods);
64 }
38 register_code (code); 65 register_code (code);
39} 66}
40 67
41void unregister_code16 (uint16_t code) { 68void unregister_code16 (uint16_t code) {
42 unregister_code (code); 69 unregister_code (code);
43 do_code16 (code, unregister_code); 70 if (IS_MOD(code) || code == KC_NO) {
71 do_code16 (code, qk_unregister_mods);
72 } else {
73 do_code16 (code, qk_unregister_weak_mods);
74 }
44} 75}
45 76
46__attribute__ ((weak)) 77__attribute__ ((weak))
@@ -130,6 +161,9 @@ bool process_record_quantum(keyrecord_t *record) {
130 #ifndef DISABLE_CHORDING 161 #ifndef DISABLE_CHORDING
131 process_chording(keycode, record) && 162 process_chording(keycode, record) &&
132 #endif 163 #endif
164 #ifdef COMBO_ENABLE
165 process_combo(keycode, record) &&
166 #endif
133 #ifdef UNICODE_ENABLE 167 #ifdef UNICODE_ENABLE
134 process_unicode(keycode, record) && 168 process_unicode(keycode, record) &&
135 #endif 169 #endif
@@ -212,6 +246,36 @@ bool process_record_quantum(keyrecord_t *record) {
212 return false; 246 return false;
213 break; 247 break;
214 #endif 248 #endif
249 #ifdef PROTOCOL_LUFA
250 case OUT_AUTO:
251 if (record->event.pressed) {
252 set_output(OUTPUT_AUTO);
253 }
254 return false;
255 break;
256 case OUT_USB:
257 if (record->event.pressed) {
258 set_output(OUTPUT_USB);
259 }
260 return false;
261 break;
262 #ifdef BLUETOOTH_ENABLE
263 case OUT_BT:
264 if (record->event.pressed) {
265 set_output(OUTPUT_BLUETOOTH);
266 }
267 return false;
268 break;
269 #endif
270 #ifdef ADAFRUIT_BLE_ENABLE
271 case OUT_BLE:
272 if (record->event.pressed) {
273 set_output(OUTPUT_ADAFRUIT_BLE);
274 }
275 return false;
276 break;
277 #endif
278 #endif
215 case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: 279 case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO:
216 if (record->event.pressed) { 280 if (record->event.pressed) {
217 // MAGIC actions (BOOTMAGIC without the boot) 281 // MAGIC actions (BOOTMAGIC without the boot)
@@ -508,6 +572,11 @@ void matrix_scan_quantum() {
508 #ifdef TAP_DANCE_ENABLE 572 #ifdef TAP_DANCE_ENABLE
509 matrix_scan_tap_dance(); 573 matrix_scan_tap_dance();
510 #endif 574 #endif
575
576 #ifdef COMBO_ENABLE
577 matrix_scan_combo();
578 #endif
579
511 matrix_scan_kb(); 580 matrix_scan_kb();
512} 581}
513 582
@@ -525,34 +594,45 @@ static const uint8_t backlight_pin = BACKLIGHT_PIN;
525# define COM1x1 COM1A1 594# define COM1x1 COM1A1
526# define OCR1x OCR1A 595# define OCR1x OCR1A
527#else 596#else
528# error "Backlight pin not supported - use B5, B6, or B7" 597# define NO_BACKLIGHT_CLOCK
598#endif
599
600#ifndef BACKLIGHT_ON_STATE
601#define BACKLIGHT_ON_STATE 0
529#endif 602#endif
530 603
531__attribute__ ((weak)) 604__attribute__ ((weak))
532void backlight_init_ports(void) 605void backlight_init_ports(void)
533{ 606{
534 607
535 // Setup backlight pin as output and output low. 608 // Setup backlight pin as output and output to on state.
536 // DDRx |= n 609 // DDRx |= n
537 _SFR_IO8((backlight_pin >> 4) + 1) |= _BV(backlight_pin & 0xF); 610 _SFR_IO8((backlight_pin >> 4) + 1) |= _BV(backlight_pin & 0xF);
538 // PORTx &= ~n 611 #if BACKLIGHT_ON_STATE == 0
539 _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); 612 // PORTx &= ~n
613 _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
614 #else
615 // PORTx |= n
616 _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF);
617 #endif
540 618
541 // Use full 16-bit resolution. 619 #ifndef NO_BACKLIGHT_CLOCK
542 ICR1 = 0xFFFF; 620 // Use full 16-bit resolution.
621 ICR1 = 0xFFFF;
543 622
544 // I could write a wall of text here to explain... but TL;DW 623 // I could write a wall of text here to explain... but TL;DW
545 // Go read the ATmega32u4 datasheet. 624 // Go read the ATmega32u4 datasheet.
546 // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on 625 // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
547 626
548 // Pin PB7 = OCR1C (Timer 1, Channel C) 627 // Pin PB7 = OCR1C (Timer 1, Channel C)
549 // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0 628 // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
550 // (i.e. start high, go low when counter matches.) 629 // (i.e. start high, go low when counter matches.)
551 // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0 630 // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
552 // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1 631 // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
553 632
554 TCCR1A = _BV(COM1x1) | _BV(WGM11); // = 0b00001010; 633 TCCR1A = _BV(COM1x1) | _BV(WGM11); // = 0b00001010;
555 TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; 634 TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
635 #endif
556 636
557 backlight_init(); 637 backlight_init();
558 #ifdef BACKLIGHT_BREATHING 638 #ifdef BACKLIGHT_BREATHING
@@ -564,24 +644,43 @@ __attribute__ ((weak))
564void backlight_set(uint8_t level) 644void backlight_set(uint8_t level)
565{ 645{
566 // Prevent backlight blink on lowest level 646 // Prevent backlight blink on lowest level
567 // PORTx &= ~n 647 #if BACKLIGHT_ON_STATE == 0
568 _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); 648 // PORTx &= ~n
649 _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
650 #else
651 // PORTx |= n
652 _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF);
653 #endif
569 654
570 if ( level == 0 ) { 655 if ( level == 0 ) {
571 // Turn off PWM control on backlight pin, revert to output low. 656 #ifndef NO_BACKLIGHT_CLOCK
572 TCCR1A &= ~(_BV(COM1x1)); 657 // Turn off PWM control on backlight pin, revert to output low.
573 OCR1x = 0x0; 658 TCCR1A &= ~(_BV(COM1x1));
574 } else if ( level == BACKLIGHT_LEVELS ) { 659 OCR1x = 0x0;
575 // Turn on PWM control of backlight pin 660 #else
576 TCCR1A |= _BV(COM1x1); 661 #if BACKLIGHT_ON_STATE == 0
577 // Set the brightness 662 // PORTx |= n
578 OCR1x = 0xFFFF; 663 _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF);
579 } else { 664 #else
580 // Turn on PWM control of backlight pin 665 // PORTx &= ~n
581 TCCR1A |= _BV(COM1x1); 666 _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF);
582 // Set the brightness 667 #endif
583 OCR1x = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2)); 668 #endif
584 } 669 }
670 #ifndef NO_BACKLIGHT_CLOCK
671 else if ( level == BACKLIGHT_LEVELS ) {
672 // Turn on PWM control of backlight pin
673 TCCR1A |= _BV(COM1x1);
674 // Set the brightness
675 OCR1x = 0xFFFF;
676 }
677 else {
678 // Turn on PWM control of backlight pin
679 TCCR1A |= _BV(COM1x1);
680 // Set the brightness
681 OCR1x = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
682 }
683 #endif
585 684
586 #ifdef BACKLIGHT_BREATHING 685 #ifdef BACKLIGHT_BREATHING
587 breathing_intensity_default(); 686 breathing_intensity_default();
diff --git a/quantum/quantum.h b/quantum/quantum.h
index e6adf974a..18f072189 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -15,7 +15,6 @@
15#ifdef RGBLIGHT_ENABLE 15#ifdef RGBLIGHT_ENABLE
16 #include "rgblight.h" 16 #include "rgblight.h"
17#endif 17#endif
18
19#include "action_layer.h" 18#include "action_layer.h"
20#include "eeconfig.h" 19#include "eeconfig.h"
21#include <stddef.h> 20#include <stddef.h>
@@ -63,6 +62,10 @@ extern uint32_t default_layer_state;
63 #include "process_printer.h" 62 #include "process_printer.h"
64#endif 63#endif
65 64
65#ifdef COMBO_ENABLE
66 #include "process_combo.h"
67#endif
68
66#define SEND_STRING(str) send_string(PSTR(str)) 69#define SEND_STRING(str) send_string(PSTR(str))
67void send_string(const char *str); 70void send_string(const char *str);
68 71
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 4853655f9..ab2e79026 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -39,14 +39,14 @@ enum quantum_keycodes {
39 QK_CHORDING = 0x5600, 39 QK_CHORDING = 0x5600,
40 QK_CHORDING_MAX = 0x56FF, 40 QK_CHORDING_MAX = 0x56FF,
41#endif 41#endif
42 QK_MOD_TAP = 0x6000, 42 QK_TAP_DANCE = 0x5700,
43 QK_MOD_TAP_MAX = 0x6FFF, 43 QK_TAP_DANCE_MAX = 0x57FF,
44 QK_TAP_DANCE = 0x7100,
45 QK_TAP_DANCE_MAX = 0x71FF,
46#ifdef UNICODEMAP_ENABLE 44#ifdef UNICODEMAP_ENABLE
47 QK_UNICODE_MAP = 0x7800, 45 QK_UNICODE_MAP = 0x5800,
48 QK_UNICODE_MAP_MAX = 0x7FFF, 46 QK_UNICODE_MAP_MAX = 0x5BFF,
49#endif 47#endif
48 QK_MOD_TAP = 0x6000,
49 QK_MOD_TAP_MAX = 0x7FFF,
50#ifdef UNICODE_ENABLE 50#ifdef UNICODE_ENABLE
51 QK_UNICODE = 0x8000, 51 QK_UNICODE = 0x8000,
52 QK_UNICODE_MAX = 0xFFFF, 52 QK_UNICODE_MAX = 0xFFFF,
@@ -54,7 +54,7 @@ enum quantum_keycodes {
54 54
55 // Loose keycodes - to be used directly 55 // Loose keycodes - to be used directly
56 56
57 RESET = 0x7000, 57 RESET = 0x5C00,
58 DEBUG, 58 DEBUG,
59 MAGIC_SWAP_CONTROL_CAPSLOCK, 59 MAGIC_SWAP_CONTROL_CAPSLOCK,
60 MAGIC_CAPSLOCK_TO_CONTROL, 60 MAGIC_CAPSLOCK_TO_CONTROL,
@@ -141,6 +141,16 @@ enum quantum_keycodes {
141 PRINT_ON, 141 PRINT_ON,
142 PRINT_OFF, 142 PRINT_OFF,
143 143
144 // output selection
145 OUT_AUTO,
146 OUT_USB,
147#ifdef BLUETOOTH_ENABLE
148 OUT_BT,
149#endif
150#ifdef ADAFRUIT_BLE_ENABLE
151 OUT_BLE,
152#endif
153
144 // always leave at the end 154 // always leave at the end
145 SAFE_RANGE 155 SAFE_RANGE
146}; 156};
@@ -246,8 +256,10 @@ enum quantum_keycodes {
246 256
247#define M(kc) (kc | QK_MACRO) 257#define M(kc) (kc | QK_MACRO)
248 258
259#define MACROTAP(kc) (kc | QK_MACRO | FUNC_TAP<<8)
249#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) 260#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)
250 261
262
251// L-ayer, T-ap - 256 keycode max, 16 layer max 263// L-ayer, T-ap - 256 keycode max, 16 layer max
252#define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8)) 264#define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8))
253 265
@@ -286,14 +298,29 @@ enum quantum_keycodes {
286#define OSM(mod) (mod | QK_ONE_SHOT_MOD) 298#define OSM(mod) (mod | QK_ONE_SHOT_MOD)
287 299
288// M-od, T-ap - 256 keycode max 300// M-od, T-ap - 256 keycode max
289#define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0xF) << 8)) 301#define MT(mod, kc) (kc | QK_MOD_TAP | ((mod & 0x1F) << 8))
302
290#define CTL_T(kc) MT(MOD_LCTL, kc) 303#define CTL_T(kc) MT(MOD_LCTL, kc)
304#define LCTL_T(kc) MT(MOD_LCTL, kc)
305#define RCTL_T(kc) MT(MOD_RCTL, kc)
306
291#define SFT_T(kc) MT(MOD_LSFT, kc) 307#define SFT_T(kc) MT(MOD_LSFT, kc)
308#define LSFT_T(kc) MT(MOD_LSFT, kc)
309#define RSFT_T(kc) MT(MOD_RSFT, kc)
310
292#define ALT_T(kc) MT(MOD_LALT, kc) 311#define ALT_T(kc) MT(MOD_LALT, kc)
312#define LALT_T(kc) MT(MOD_LALT, kc)
313#define RALT_T(kc) MT(MOD_RALT, kc)
314#define ALGR_T(kc) MT(MOD_RALT, kc) // dual-function AltGR
315
293#define GUI_T(kc) MT(MOD_LGUI, kc) 316#define GUI_T(kc) MT(MOD_LGUI, kc)
317#define LGUI_T(kc) MT(MOD_LGUI, kc)
318#define RGUI_T(kc) MT(MOD_RGUI, kc)
319
294#define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal 320#define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal
295#define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl 321#define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl
296#define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui 322#define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui
323#define RCAG_T(kc) MT((MOD_RCTL | MOD_RALT | MOD_RGUI), kc) // Right control alt and gui
297#define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ 324#define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
298#define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc) 325#define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc)
299#define SWIN_T(kc) SCMD_T(kc) 326#define SWIN_T(kc) SCMD_T(kc)
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 52a09817a..dd1b91c63 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -66,6 +66,8 @@ __attribute__ ((weak))
66const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; 66const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
67__attribute__ ((weak)) 67__attribute__ ((weak))
68const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20}; 68const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20};
69__attribute__ ((weak))
70const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90};
69 71
70rgblight_config_t rgblight_config; 72rgblight_config_t rgblight_config;
71rgblight_config_t inmem_config; 73rgblight_config_t inmem_config;
@@ -219,6 +221,14 @@ void rgblight_step(void) {
219 } 221 }
220 rgblight_mode(mode); 222 rgblight_mode(mode);
221} 223}
224void rgblight_step_reverse(void) {
225 uint8_t mode = 0;
226 mode = rgblight_config.mode - 1;
227 if (mode < 1) {
228 mode = RGBLIGHT_MODES;
229 }
230 rgblight_mode(mode);
231}
222 232
223void rgblight_mode(uint8_t mode) { 233void rgblight_mode(uint8_t mode) {
224 if (!rgblight_config.enable) { 234 if (!rgblight_config.enable) {
@@ -237,7 +247,7 @@ void rgblight_mode(uint8_t mode) {
237 #ifdef RGBLIGHT_ANIMATIONS 247 #ifdef RGBLIGHT_ANIMATIONS
238 rgblight_timer_disable(); 248 rgblight_timer_disable();
239 #endif 249 #endif
240 } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 23) { 250 } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 24) {
241 // MODE 2-5, breathing 251 // MODE 2-5, breathing
242 // MODE 6-8, rainbow mood 252 // MODE 6-8, rainbow mood
243 // MODE 9-14, rainbow swirl 253 // MODE 9-14, rainbow swirl
@@ -247,6 +257,12 @@ void rgblight_mode(uint8_t mode) {
247 #ifdef RGBLIGHT_ANIMATIONS 257 #ifdef RGBLIGHT_ANIMATIONS
248 rgblight_timer_enable(); 258 rgblight_timer_enable();
249 #endif 259 #endif
260 } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) {
261 // MODE 25-34, static gradient
262
263 #ifdef RGBLIGHT_ANIMATIONS
264 rgblight_timer_disable();
265 #endif
250 } 266 }
251 rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); 267 rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
252} 268}
@@ -350,6 +366,17 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) {
350 } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 14) { 366 } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 14) {
351 // rainbow mood and rainbow swirl, ignore the change of hue 367 // rainbow mood and rainbow swirl, ignore the change of hue
352 hue = rgblight_config.hue; 368 hue = rgblight_config.hue;
369 } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) {
370 // static gradient
371 uint16_t _hue;
372 int8_t direction = ((rgblight_config.mode - 25) % 2) ? -1 : 1;
373 uint16_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[(rgblight_config.mode - 25) / 2]);
374 for (uint8_t i = 0; i < RGBLED_NUM; i++) {
375 _hue = (range / RGBLED_NUM * i * direction + hue + 360) % 360;
376 dprintf("rgblight rainbow set hsv: %u,%u,%d,%u\n", i, _hue, direction, range);
377 sethsv(_hue, sat, val, (LED_TYPE *)&led[i]);
378 }
379 rgblight_set();
353 } 380 }
354 } 381 }
355 rgblight_config.hue = hue; 382 rgblight_config.hue = hue;
@@ -450,7 +477,7 @@ void rgblight_task(void) {
450 } else if (rgblight_config.mode >= 21 && rgblight_config.mode <= 23) { 477 } else if (rgblight_config.mode >= 21 && rgblight_config.mode <= 23) {
451 // mode = 21 to 23, knight mode 478 // mode = 21 to 23, knight mode
452 rgblight_effect_knight(rgblight_config.mode - 21); 479 rgblight_effect_knight(rgblight_config.mode - 21);
453 } else { 480 } else if (rgblight_config.mode == 24) {
454 // mode = 24, christmas mode 481 // mode = 24, christmas mode
455 rgblight_effect_christmas(); 482 rgblight_effect_christmas();
456 } 483 }
@@ -604,13 +631,13 @@ void rgblight_effect_christmas(void) {
604 static uint16_t last_timer = 0; 631 static uint16_t last_timer = 0;
605 uint16_t hue; 632 uint16_t hue;
606 uint8_t i; 633 uint8_t i;
607 if (timer_elapsed(last_timer) < 1000) { 634 if (timer_elapsed(last_timer) < RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL) {
608 return; 635 return;
609 } 636 }
610 last_timer = timer_read(); 637 last_timer = timer_read();
611 current_offset = (current_offset + 1) % 2; 638 current_offset = (current_offset + 1) % 2;
612 for (i = 0; i < RGBLED_NUM; i++) { 639 for (i = 0; i < RGBLED_NUM; i++) {
613 hue = 0 + ((RGBLED_NUM * (i + current_offset)) % 2) * 80; 640 hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + current_offset) % 2) * 120;
614 sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); 641 sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]);
615 } 642 }
616 rgblight_set(); 643 rgblight_set();
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
index 726b8de72..2b3e791bf 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight.h
@@ -2,7 +2,7 @@
2#define RGBLIGHT_H 2#define RGBLIGHT_H
3 3
4#ifdef RGBLIGHT_ANIMATIONS 4#ifdef RGBLIGHT_ANIMATIONS
5 #define RGBLIGHT_MODES 24 5 #define RGBLIGHT_MODES 34
6#else 6#else
7 #define RGBLIGHT_MODES 1 7 #define RGBLIGHT_MODES 1
8#endif 8#endif
@@ -22,6 +22,14 @@
22#define RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH 4 22#define RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH 4
23#endif 23#endif
24 24
25#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL
26#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000
27#endif
28
29#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP
30#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2
31#endif
32
25#ifndef RGBLIGHT_HUE_STEP 33#ifndef RGBLIGHT_HUE_STEP
26#define RGBLIGHT_HUE_STEP 10 34#define RGBLIGHT_HUE_STEP 10
27#endif 35#endif
@@ -65,6 +73,7 @@ void rgblight_decrease(void);
65void rgblight_toggle(void); 73void rgblight_toggle(void);
66void rgblight_enable(void); 74void rgblight_enable(void);
67void rgblight_step(void); 75void rgblight_step(void);
76void rgblight_step_reverse(void);
68void rgblight_mode(uint8_t mode); 77void rgblight_mode(uint8_t mode);
69void rgblight_set(void); 78void rgblight_set(void);
70void rgblight_update_dword(uint32_t dword); 79void rgblight_update_dword(uint32_t dword);
diff --git a/quantum/template/config.h b/quantum/template/config.h
index b02f0c7eb..c61c4a618 100644
--- a/quantum/template/config.h
+++ b/quantum/template/config.h
@@ -46,7 +46,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
46#define MATRIX_COL_PINS { F1, F0, B0 } 46#define MATRIX_COL_PINS { F1, F0, B0 }
47#define UNUSED_PINS 47#define UNUSED_PINS
48 48
49/* COL2ROW or ROW2COL */ 49/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
50#define DIODE_DIRECTION COL2ROW 50#define DIODE_DIRECTION COL2ROW
51 51
52// #define BACKLIGHT_PIN B7 52// #define BACKLIGHT_PIN B7
diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c
index 54f6faaa4..5826d909e 100644
--- a/quantum/visualizer/visualizer.c
+++ b/quantum/visualizer/visualizer.c
@@ -53,10 +53,13 @@ SOFTWARE.
53#define "Visualizer thread priority not defined" 53#define "Visualizer thread priority not defined"
54#endif 54#endif
55 55
56// mods status
57#include "action_util.h"
56 58
57static visualizer_keyboard_status_t current_status = { 59static visualizer_keyboard_status_t current_status = {
58 .layer = 0xFFFFFFFF, 60 .layer = 0xFFFFFFFF,
59 .default_layer = 0xFFFFFFFF, 61 .default_layer = 0xFFFFFFFF,
62 .mods = 0xFF,
60 .leds = 0xFFFFFFFF, 63 .leds = 0xFFFFFFFF,
61 .suspended = false, 64 .suspended = false,
62}; 65};
@@ -64,6 +67,7 @@ static visualizer_keyboard_status_t current_status = {
64static bool same_status(visualizer_keyboard_status_t* status1, visualizer_keyboard_status_t* status2) { 67static bool same_status(visualizer_keyboard_status_t* status1, visualizer_keyboard_status_t* status2) {
65 return status1->layer == status2->layer && 68 return status1->layer == status2->layer &&
66 status1->default_layer == status2->default_layer && 69 status1->default_layer == status2->default_layer &&
70 status1->mods == status2->mods &&
67 status1->leds == status2->leds && 71 status1->leds == status2->leds &&
68 status1->suspended == status2->suspended; 72 status1->suspended == status2->suspended;
69} 73}
@@ -307,6 +311,45 @@ bool keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_s
307 gdispFlush(); 311 gdispFlush();
308 return false; 312 return false;
309} 313}
314
315static void format_mods_bitmap_string(uint8_t mods, char* buffer) {
316 *buffer = ' ';
317 ++buffer;
318
319 for (int i = 0; i<8; i++)
320 {
321 uint32_t mask = (1u << i);
322 if (mods & mask) {
323 *buffer = '1';
324 } else {
325 *buffer = '0';
326 }
327 ++buffer;
328
329 if (i==3) {
330 *buffer = ' ';
331 ++buffer;
332 }
333 }
334 *buffer = 0;
335}
336
337bool keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualizer_state_t* state) {
338 (void)animation;
339
340 const char* title = "Modifier states";
341 const char* mods_header = " CSAG CSAG ";
342 char status_buffer[12];
343
344 gdispClear(White);
345 gdispDrawString(0, 0, title, state->font_fixed5x8, Black);
346 gdispDrawString(0, 10, mods_header, state->font_fixed5x8, Black);
347 format_mods_bitmap_string(state->status.mods, status_buffer);
348 gdispDrawString(0, 20, status_buffer, state->font_fixed5x8, Black);
349
350 gdispFlush();
351 return false;
352}
310#endif // LCD_ENABLE 353#endif // LCD_ENABLE
311 354
312bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state) { 355bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state) {
@@ -350,6 +393,7 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) {
350 visualizer_keyboard_status_t initial_status = { 393 visualizer_keyboard_status_t initial_status = {
351 .default_layer = 0xFFFFFFFF, 394 .default_layer = 0xFFFFFFFF,
352 .layer = 0xFFFFFFFF, 395 .layer = 0xFFFFFFFF,
396 .mods = 0xFF,
353 .leds = 0xFFFFFFFF, 397 .leds = 0xFFFFFFFF,
354 .suspended = false, 398 .suspended = false,
355 }; 399 };
@@ -499,7 +543,18 @@ void update_status(bool changed) {
499#endif 543#endif
500} 544}
501 545
502void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds) { 546uint8_t visualizer_get_mods() {
547 uint8_t mods = get_mods();
548
549#ifndef NO_ACTION_ONESHOT
550 if (!has_oneshot_mods_timed_out()) {
551 mods |= get_oneshot_mods();
552 }
553#endif
554 return mods;
555}
556
557void visualizer_update(uint32_t default_state, uint32_t state, uint8_t mods, uint32_t leds) {
503 // Note that there's a small race condition here, the thread could read 558 // Note that there's a small race condition here, the thread could read
504 // a state where one of these are set but not the other. But this should 559 // a state where one of these are set but not the other. But this should
505 // not really matter as it will be fixed during the next loop step. 560 // not really matter as it will be fixed during the next loop step.
@@ -523,6 +578,7 @@ void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds) {
523 visualizer_keyboard_status_t new_status = { 578 visualizer_keyboard_status_t new_status = {
524 .layer = state, 579 .layer = state,
525 .default_layer = default_state, 580 .default_layer = default_state,
581 .mods = mods,
526 .leds = leds, 582 .leds = leds,
527 .suspended = current_status.suspended, 583 .suspended = current_status.suspended,
528 }; 584 };
diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h
index 53e250725..315af5022 100644
--- a/quantum/visualizer/visualizer.h
+++ b/quantum/visualizer/visualizer.h
@@ -34,10 +34,14 @@ SOFTWARE.
34#include "lcd_backlight.h" 34#include "lcd_backlight.h"
35#endif 35#endif
36 36
37// use this function to merget both real_mods and oneshot_mods in a uint16_t
38uint8_t visualizer_get_mods(void);
39
37// This need to be called once at the start 40// This need to be called once at the start
38void visualizer_init(void); 41void visualizer_init(void);
39// This should be called at every matrix scan 42// This should be called at every matrix scan
40void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds); 43void visualizer_update(uint32_t default_state, uint32_t state, uint8_t mods, uint32_t leds);
44
41// This should be called when the keyboard goes to suspend state 45// This should be called when the keyboard goes to suspend state
42void visualizer_suspend(void); 46void visualizer_suspend(void);
43// This should be called when the keyboard wakes up from suspend state 47// This should be called when the keyboard wakes up from suspend state
@@ -61,6 +65,7 @@ struct keyframe_animation_t;
61typedef struct { 65typedef struct {
62 uint32_t layer; 66 uint32_t layer;
63 uint32_t default_layer; 67 uint32_t default_layer;
68 uint8_t mods;
64 uint32_t leds; // See led.h for available statuses 69 uint32_t leds; // See led.h for available statuses
65 bool suspended; 70 bool suspended;
66} visualizer_keyboard_status_t; 71} visualizer_keyboard_status_t;
@@ -129,6 +134,8 @@ bool keyframe_set_backlight_color(keyframe_animation_t* animation, visualizer_st
129bool keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state); 134bool keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state);
130// Displays a bitmap (0/1) of all the currently active layers 135// Displays a bitmap (0/1) of all the currently active layers
131bool keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_state_t* state); 136bool keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_state_t* state);
137// Displays a bitmap (0/1) of all the currently active mods
138bool keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualizer_state_t* state);
132 139
133bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state); 140bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state);
134bool keyframe_enable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state); 141bool keyframe_enable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state);
diff --git a/readme.md b/readme.md
index d33c3ad01..71f756667 100644
--- a/readme.md
+++ b/readme.md
@@ -1,6 +1,6 @@
1# Quantum Mechanical Keyboard Firmware 1# Quantum Mechanical Keyboard Firmware
2 2
3[![Build Status](https://travis-ci.org/jackhumbert/qmk_firmware.svg?branch=master)](https://travis-ci.org/jackhumbert/qmk_firmware) 3[![Build Status](https://travis-ci.org/jackhumbert/qmk_firmware.svg?branch=master)](https://travis-ci.org/jackhumbert/qmk_firmware) [![Gitter](https://badges.gitter.im/qmk/qmk_firmware.svg)](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
4 4
5This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). 5This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/).
6 6
@@ -23,7 +23,7 @@ The project also includes community support for [lots of other keyboards](/keybo
23 23
24QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). This repo used to be a fork of [TMK](https://github.com/tmk/tmk_keyboard), and we are incredibly grateful for his founding contributions to the firmware. We've had to break the fork due to purely technical reasons - it simply became too different over time, and we've had to start refactoring some of the basic bits and pieces. We are huge fans of TMK and Hasu :) 24QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). This repo used to be a fork of [TMK](https://github.com/tmk/tmk_keyboard), and we are incredibly grateful for his founding contributions to the firmware. We've had to break the fork due to purely technical reasons - it simply became too different over time, and we've had to start refactoring some of the basic bits and pieces. We are huge fans of TMK and Hasu :)
25 25
26This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/jackhumbert/qmk_firmware/issues/new). 26This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/qmk/qmk_firmware/issues/new).
27 27
28The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), and the Clueboard by [Zach White](https://github.com/skullydazed). 28The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), and the Clueboard by [Zach White](https://github.com/skullydazed).
29 29
@@ -31,7 +31,7 @@ The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/j
31 31
32This is not a tiny project. While this is the main readme, there are many other files you might want to consult. Here are some points of interest: 32This is not a tiny project. While this is the main readme, there are many other files you might want to consult. Here are some points of interest:
33 33
34* [**The Wiki**](https://github.com/jackhumbert/qmk_firmware/wiki) - the entirety of the readme has been moved here 34* [**The Wiki**](https://github.com/qmk/qmk_firmware/wiki) - the entirety of the readme has been moved here
35* The readme for your own keyboard: This is found under `keyboards/<your keyboards's name>/`. So for the ErgoDox EZ, it's [here](keyboards/ergodox/ez/); for the Planck, it's [here](keyboards/planck/) and so on. 35* The readme for your own keyboard: This is found under `keyboards/<your keyboards's name>/`. So for the ErgoDox EZ, it's [here](keyboards/ergodox/ez/); for the Planck, it's [here](keyboards/planck/) and so on.
36* The list of possible keycodes you can use in your keymap is actually spread out in a few different places: 36* The list of possible keycodes you can use in your keymap is actually spread out in a few different places:
37 * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes. 37 * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes.
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index d485b46c7..f03670a7f 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -49,6 +49,13 @@ void action_exec(keyevent_t event)
49 49
50 keyrecord_t record = { .event = event }; 50 keyrecord_t record = { .event = event };
51 51
52#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
53 if (has_oneshot_layer_timed_out()) {
54 dprintf("Oneshot layer: timeout\n");
55 clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
56 }
57#endif
58
52#ifndef NO_ACTION_TAPPING 59#ifndef NO_ACTION_TAPPING
53 action_tapping_process(record); 60 action_tapping_process(record);
54#else 61#else
@@ -100,7 +107,7 @@ bool process_record_quantum(keyrecord_t *record) {
100 return true; 107 return true;
101} 108}
102 109
103void process_record(keyrecord_t *record) 110void process_record(keyrecord_t *record)
104{ 111{
105 if (IS_NOEVENT(record->event)) { return; } 112 if (IS_NOEVENT(record->event)) { return; }
106 113
@@ -126,13 +133,6 @@ void process_action(keyrecord_t *record, action_t action)
126 uint8_t tap_count = record->tap.count; 133 uint8_t tap_count = record->tap.count;
127#endif 134#endif
128 135
129#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
130 if (has_oneshot_layer_timed_out()) {
131 dprintf("Oneshot layer: timeout\n");
132 clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
133 }
134#endif
135
136 if (event.pressed) { 136 if (event.pressed) {
137 // clear the potential weak mods left by previously pressed keys 137 // clear the potential weak mods left by previously pressed keys
138 clear_weak_mods(); 138 clear_weak_mods();
diff --git a/tmk_core/common/action_code.h b/tmk_core/common/action_code.h
index 33da35f35..b15aaa0eb 100644
--- a/tmk_core/common/action_code.h
+++ b/tmk_core/common/action_code.h
@@ -47,10 +47,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
47 * 0100|10| usage(10) (reserved) 47 * 0100|10| usage(10) (reserved)
48 * 0100|11| usage(10) (reserved) 48 * 0100|11| usage(10) (reserved)
49 * 49 *
50 * ACT_MOUSEKEY(0110): TODO: Not needed? 50 *
51 * ACT_MOUSEKEY(0101): TODO: Merge these two actions to conserve space?
51 * 0101|xxxx| keycode Mouse key 52 * 0101|xxxx| keycode Mouse key
52 * 53 *
53 * 011x|xxxx xxxx xxxx (reseved) 54 * ACT_SWAP_HANDS(0110):
55 * 0110|xxxx| keycode Swap hands (keycode on tap, or options)
56 *
57 *
58 * 0111|xxxx xxxx xxxx (reserved)
54 * 59 *
55 * 60 *
56 * Layer Actions(10xx) 61 * Layer Actions(10xx)
@@ -67,7 +72,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
67 * ee: on event(01:press, 10:release, 11:both) 72 * ee: on event(01:press, 10:release, 11:both)
68 * 73 *
69 * 1001|xxxx|xxxx xxxx (reserved) 74 * 1001|xxxx|xxxx xxxx (reserved)
70 * 1001|oopp|BBBB BBBB 8-bit Bitwise Operation???
71 * 75 *
72 * ACT_LAYER_TAP(101x): 76 * ACT_LAYER_TAP(101x):
73 * 101E|LLLL| keycode On/Off with tap key (0x00-DF)[TAP] 77 * 101E|LLLL| keycode On/Off with tap key (0x00-DF)[TAP]
diff --git a/tmk_core/common/action_macro.h b/tmk_core/common/action_macro.h
index aedc32ec6..f373f5068 100644
--- a/tmk_core/common/action_macro.h
+++ b/tmk_core/common/action_macro.h
@@ -20,11 +20,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20#include "progmem.h" 20#include "progmem.h"
21 21
22 22
23#define MACRO_NONE 0 23
24typedef uint8_t macro_t;
25
26#define MACRO_NONE (macro_t*)0
24#define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; }) 27#define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; })
25#define MACRO_GET(p) pgm_read_byte(p) 28#define MACRO_GET(p) pgm_read_byte(p)
26 29
27typedef uint8_t macro_t; 30// Sends press when the macro key is pressed, release when release, or tap_macro when the key has been tapped
31#define MACRO_TAP_HOLD(record, press, release, tap_macro) ( ((record)->event.pressed) ? \
32 ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? (press) : MACRO_NONE ) : \
33 ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (tap_macro) : (release) ) )
34
35// Holds down the modifier mod when the macro key is held, or sends macro instead when tapped
36#define MACRO_TAP_HOLD_MOD(record, macro, mod) MACRO_TAP_HOLD(record, (MACRO(D(mod), END)), MACRO(U(mod), END), macro)
37
38// Holds down the modifier mod when the macro key is held, or pressed a shifted key when tapped (eg: shift+3 for #)
39#define MACRO_TAP_SHFT_KEY_HOLD_MOD(record, key, mod) MACRO_TAP_HOLD_MOD(record, (MACRO(I(10), D(LSFT), T(key), U(LSFT), END)), mod)
40
41
42// Momentary switch layer when held, sends macro if tapped
43#define MACRO_TAP_HOLD_LAYER(record, macro, layer) ( ((record)->event.pressed) ? \
44 ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? ({layer_on((layer)); MACRO_NONE; }) : MACRO_NONE ) : \
45 ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (macro) : ({layer_off((layer)); MACRO_NONE; }) ) )
46
47// Momentary switch layer when held, presses a shifted key when tapped (eg: shift+3 for #)
48#define MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, key, layer) MACRO_TAP_HOLD_LAYER(record, MACRO(I(10), D(LSFT), T(key), U(LSFT), END), layer)
49
28 50
29 51
30#ifndef NO_ACTION_MACRO 52#ifndef NO_ACTION_MACRO
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 371d93f3e..3aa82231b 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -14,6 +14,7 @@ GNU General Public License for more details.
14You should have received a copy of the GNU General Public License 14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17
17#include <stdint.h> 18#include <stdint.h>
18#include "keyboard.h" 19#include "keyboard.h"
19#include "matrix.h" 20#include "matrix.h"
@@ -188,7 +189,7 @@ MATRIX_LOOP_END:
188#endif 189#endif
189 190
190#ifdef VISUALIZER_ENABLE 191#ifdef VISUALIZER_ENABLE
191 visualizer_update(default_layer_state, layer_state, host_keyboard_leds()); 192 visualizer_update(default_layer_state, layer_state, visualizer_get_mods(), host_keyboard_leds());
192#endif 193#endif
193 194
194 // update LED 195 // update LED
diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h
index cee3593ee..2543f5abc 100644
--- a/tmk_core/common/matrix.h
+++ b/tmk_core/common/matrix.h
@@ -50,7 +50,7 @@ void matrix_init(void);
50uint8_t matrix_scan(void); 50uint8_t matrix_scan(void);
51/* whether modified from previous scan. used after matrix_scan. */ 51/* whether modified from previous scan. used after matrix_scan. */
52bool matrix_is_modified(void) __attribute__ ((deprecated)); 52bool matrix_is_modified(void) __attribute__ ((deprecated));
53/* whether a swtich is on */ 53/* whether a switch is on */
54bool matrix_is_on(uint8_t row, uint8_t col); 54bool matrix_is_on(uint8_t row, uint8_t col);
55/* matrix state on row */ 55/* matrix state on row */
56matrix_row_t matrix_get_row(uint8_t row); 56matrix_row_t matrix_get_row(uint8_t row);
diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h
index 0c799eca3..8fb28b6ce 100644
--- a/tmk_core/common/report.h
+++ b/tmk_core/common/report.h
@@ -134,13 +134,6 @@ typedef union {
134 } nkro; 134 } nkro;
135#endif 135#endif
136} __attribute__ ((packed)) report_keyboard_t; 136} __attribute__ ((packed)) report_keyboard_t;
137/*
138typedef struct {
139 uint8_t mods;
140 uint8_t reserved;
141 uint8_t keys[REPORT_KEYS];
142} __attribute__ ((packed)) report_keyboard_t;
143*/
144 137
145typedef struct { 138typedef struct {
146 uint8_t buttons; 139 uint8_t buttons;
diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk
index 151d26cbc..de0cc795f 100644
--- a/tmk_core/protocol/lufa.mk
+++ b/tmk_core/protocol/lufa.mk
@@ -8,13 +8,14 @@ LUFA_PATH ?= $(LUFA_DIR)/LUFA-git
8ifneq (, $(wildcard $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk)) 8ifneq (, $(wildcard $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk))
9 # New build system from 20120730 9 # New build system from 20120730
10 LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA 10 LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA
11 include $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk 11 include $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk
12else 12else
13 include $(TMK_PATH)/$(LUFA_PATH)/LUFA/makefile 13 include $(TMK_PATH)/$(LUFA_PATH)/LUFA/makefile
14endif 14endif
15 15
16LUFA_SRC = lufa.c \ 16LUFA_SRC = lufa.c \
17 descriptor.c \ 17 descriptor.c \
18 outputselect.c \
18 $(LUFA_SRC_USB) 19 $(LUFA_SRC_USB)
19 20
20ifeq ($(strip $(MIDI_ENABLE)), yes) 21ifeq ($(strip $(MIDI_ENABLE)), yes)
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c
index 6dd5959dc..ba49284c9 100644
--- a/tmk_core/protocol/lufa/lufa.c
+++ b/tmk_core/protocol/lufa/lufa.c
@@ -53,6 +53,7 @@
53#include "lufa.h" 53#include "lufa.h"
54#include "quantum.h" 54#include "quantum.h"
55#include <util/atomic.h> 55#include <util/atomic.h>
56#include "outputselect.h"
56 57
57#ifdef NKRO_ENABLE 58#ifdef NKRO_ENABLE
58 #include "keycode_config.h" 59 #include "keycode_config.h"
@@ -589,59 +590,33 @@ void EVENT_USB_Device_ControlRequest(void)
589 590
590/******************************************************************************* 591/*******************************************************************************
591 * Host driver 592 * Host driver
592p
593 ******************************************************************************/ 593 ******************************************************************************/
594static uint8_t keyboard_leds(void) 594static uint8_t keyboard_leds(void)
595{ 595{
596 return keyboard_led_stats; 596 return keyboard_led_stats;
597} 597}
598 598
599#define SendToUSB 1
600#define SendToBT 2
601#define SendToBLE 4
602
603static inline uint8_t where_to_send(void) {
604#ifdef ADAFRUIT_BLE_ENABLE
605#if 0
606 if (adafruit_ble_is_connected()) {
607 // For testing, send to BLE as a priority
608 return SendToBLE;
609 }
610#endif
611
612 // This is the real policy
613 if (USB_DeviceState != DEVICE_STATE_Configured) {
614 if (adafruit_ble_is_connected()) {
615 return SendToBLE;
616 }
617 }
618#endif
619 return ((USB_DeviceState == DEVICE_STATE_Configured) ? SendToUSB : 0)
620#ifdef BLUETOOTH_ENABLE
621 || SendToBT
622#endif
623 ;
624}
625
626static void send_keyboard(report_keyboard_t *report) 599static void send_keyboard(report_keyboard_t *report)
627{ 600{
601 uint8_t timeout = 255;
602 uint8_t where = where_to_send();
603
628#ifdef BLUETOOTH_ENABLE 604#ifdef BLUETOOTH_ENABLE
629 bluefruit_serial_send(0xFD); 605 if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
630 for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { 606 bluefruit_serial_send(0xFD);
631 bluefruit_serial_send(report->raw[i]); 607 for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) {
608 bluefruit_serial_send(report->raw[i]);
609 }
632 } 610 }
633#endif 611#endif
634 612
635 uint8_t timeout = 255;
636 uint8_t where = where_to_send();
637
638#ifdef ADAFRUIT_BLE_ENABLE 613#ifdef ADAFRUIT_BLE_ENABLE
639 if (where & SendToBLE) { 614 if (where == OUTPUT_ADAFRUIT_BLE) {
640 adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); 615 adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys));
641 } 616 }
642#endif 617#endif
643 618
644 if (!(where & SendToUSB)) { 619 if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) {
645 return; 620 return;
646 } 621 }
647 622
@@ -681,30 +656,31 @@ static void send_keyboard(report_keyboard_t *report)
681static void send_mouse(report_mouse_t *report) 656static void send_mouse(report_mouse_t *report)
682{ 657{
683#ifdef MOUSE_ENABLE 658#ifdef MOUSE_ENABLE
659 uint8_t timeout = 255;
660 uint8_t where = where_to_send();
684 661
685#ifdef BLUETOOTH_ENABLE 662#ifdef BLUETOOTH_ENABLE
686 bluefruit_serial_send(0xFD); 663 if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
687 bluefruit_serial_send(0x00); 664 bluefruit_serial_send(0xFD);
688 bluefruit_serial_send(0x03); 665 bluefruit_serial_send(0x00);
689 bluefruit_serial_send(report->buttons); 666 bluefruit_serial_send(0x03);
690 bluefruit_serial_send(report->x); 667 bluefruit_serial_send(report->buttons);
691 bluefruit_serial_send(report->y); 668 bluefruit_serial_send(report->x);
692 bluefruit_serial_send(report->v); // should try sending the wheel v here 669 bluefruit_serial_send(report->y);
693 bluefruit_serial_send(report->h); // should try sending the wheel h here 670 bluefruit_serial_send(report->v); // should try sending the wheel v here
694 bluefruit_serial_send(0x00); 671 bluefruit_serial_send(report->h); // should try sending the wheel h here
672 bluefruit_serial_send(0x00);
673 }
695#endif 674#endif
696 675
697 uint8_t timeout = 255;
698
699 uint8_t where = where_to_send();
700
701#ifdef ADAFRUIT_BLE_ENABLE 676#ifdef ADAFRUIT_BLE_ENABLE
702 if (where & SendToBLE) { 677 if (where == OUTPUT_ADAFRUIT_BLE) {
703 // FIXME: mouse buttons 678 // FIXME: mouse buttons
704 adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h); 679 adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h);
705 } 680 }
706#endif 681#endif
707 if (!(where & SendToUSB)) { 682
683 if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) {
708 return; 684 return;
709 } 685 }
710 686
@@ -746,32 +722,34 @@ static void send_system(uint16_t data)
746 722
747static void send_consumer(uint16_t data) 723static void send_consumer(uint16_t data)
748{ 724{
725 uint8_t timeout = 255;
726 uint8_t where = where_to_send();
749 727
750#ifdef BLUETOOTH_ENABLE 728#ifdef BLUETOOTH_ENABLE
751 static uint16_t last_data = 0; 729 if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
752 if (data == last_data) return; 730 static uint16_t last_data = 0;
753 last_data = data; 731 if (data == last_data) return;
754 uint16_t bitmap = CONSUMER2BLUEFRUIT(data); 732 last_data = data;
755 bluefruit_serial_send(0xFD); 733 uint16_t bitmap = CONSUMER2BLUEFRUIT(data);
756 bluefruit_serial_send(0x00); 734 bluefruit_serial_send(0xFD);
757 bluefruit_serial_send(0x02); 735 bluefruit_serial_send(0x00);
758 bluefruit_serial_send((bitmap>>8)&0xFF); 736 bluefruit_serial_send(0x02);
759 bluefruit_serial_send(bitmap&0xFF); 737 bluefruit_serial_send((bitmap>>8)&0xFF);
760 bluefruit_serial_send(0x00); 738 bluefruit_serial_send(bitmap&0xFF);
761 bluefruit_serial_send(0x00); 739 bluefruit_serial_send(0x00);
762 bluefruit_serial_send(0x00); 740 bluefruit_serial_send(0x00);
763 bluefruit_serial_send(0x00); 741 bluefruit_serial_send(0x00);
742 bluefruit_serial_send(0x00);
743 }
764#endif 744#endif
765 745
766 uint8_t timeout = 255;
767 uint8_t where = where_to_send();
768
769#ifdef ADAFRUIT_BLE_ENABLE 746#ifdef ADAFRUIT_BLE_ENABLE
770 if (where & SendToBLE) { 747 if (where == OUTPUT_ADAFRUIT_BLE) {
771 adafruit_ble_send_consumer_key(data, 0); 748 adafruit_ble_send_consumer_key(data, 0);
772 } 749 }
773#endif 750#endif
774 if (!(where & SendToUSB)) { 751
752 if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) {
775 return; 753 return;
776 } 754 }
777 755
diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c
new file mode 100644
index 000000000..5d2457bff
--- /dev/null
+++ b/tmk_core/protocol/lufa/outputselect.c
@@ -0,0 +1,56 @@
1/*
2Copyright 2017 Priyadi Iman Nurcahyo
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7This program is distributed in the hope that it will be useful,
8but WITHOUT ANY WARRANTY; without even the implied warranty of
9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10GNU General Public License for more details.
11You should have received a copy of the GNU General Public License
12along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/
14
15#include "lufa.h"
16#include "outputselect.h"
17#ifdef ADAFRUIT_BLE_ENABLE
18 #include "adafruit_ble.h"
19#endif
20
21uint8_t desired_output = OUTPUT_DEFAULT;
22
23void set_output(uint8_t output) {
24 set_output_user(output);
25 desired_output = output;
26}
27
28__attribute__((weak))
29void set_output_user(uint8_t output) {
30}
31
32uint8_t auto_detect_output(void) {
33 if (USB_DeviceState == DEVICE_STATE_Configured) {
34 return OUTPUT_USB;
35 }
36
37#ifdef ADAFRUIT_BLE_ENABLE
38 if (adafruit_ble_is_connected()) {
39 return OUTPUT_ADAFRUIT_BLE;
40 }
41#endif
42
43#ifdef BLUETOOTH_ENABLE
44 return OUTPUT_BLUETOOTH; // should check if BT is connected here
45#endif
46
47 return OUTPUT_NONE;
48}
49
50uint8_t where_to_send(void) {
51 if (desired_output == OUTPUT_AUTO) {
52 return auto_detect_output();
53 }
54 return desired_output;
55}
56
diff --git a/keyboards/kc60/led.c b/tmk_core/protocol/lufa/outputselect.h
index 50659d724..79b4dd35d 100644
--- a/keyboards/kc60/led.c
+++ b/tmk_core/protocol/lufa/outputselect.h
@@ -1,5 +1,5 @@
1/* 1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com> 2Copyright 2017 Priyadi Iman Nurcahyo
3This program is free software: you can redistribute it and/or modify 3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by 4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or 5the Free Software Foundation, either version 2 of the License, or
@@ -12,20 +12,30 @@ You should have received a copy of the GNU General Public License
12along with this program. If not, see <http://www.gnu.org/licenses/>. 12along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/ 13*/
14 14
15#include <avr/io.h> 15enum outputs {
16#include "stdint.h" 16 OUTPUT_AUTO,
17#include "led.h"
18 17
18 OUTPUT_NONE,
19 OUTPUT_USB,
20 OUTPUT_BLUETOOTH,
21 OUTPUT_ADAFRUIT_BLE,
19 22
20void led_set(uint8_t usb_led) 23 // backward compatibility
21{ 24 OUTPUT_USB_AND_BT
22 if (usb_led & (1<<USB_LED_CAPS_LOCK)) { 25};
23 // output low 26
24 DDRB |= (1<<2); 27/**
25 PORTB &= ~(1<<2); 28 * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default
26 } else { 29 */
27 // Hi-Z 30#ifndef OUTPUT_DEFAULT
28 DDRB &= ~(1<<2); 31 #ifdef BLUETOOTH_ENABLE
29 PORTB &= ~(1<<2); 32 #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT
30 } 33 #else
31} \ No newline at end of file 34 #define OUTPUT_DEFAULT OUTPUT_AUTO
35 #endif
36#endif
37
38void set_output(uint8_t output);
39void set_output_user(uint8_t output);
40uint8_t auto_detect_output(void);
41uint8_t where_to_send(void); \ No newline at end of file
diff --git a/tmk_core/protocol/ps2_mouse.h b/tmk_core/protocol/ps2_mouse.h
index 3c93a4634..eeeffe4d8 100644
--- a/tmk_core/protocol/ps2_mouse.h
+++ b/tmk_core/protocol/ps2_mouse.h
@@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
23 23
24#define PS2_MOUSE_SEND(command, message) \ 24#define PS2_MOUSE_SEND(command, message) \
25do { \ 25do { \
26 uint8_t rcv = ps2_host_send(command); \ 26 __attribute__ ((unused)) uint8_t rcv = ps2_host_send(command); \
27 if (debug_mouse) { \ 27 if (debug_mouse) { \
28 print((message)); \ 28 print((message)); \
29 xprintf(" command: %X, result: %X, error: %X \n", command, rcv, ps2_error); \ 29 xprintf(" command: %X, result: %X, error: %X \n", command, rcv, ps2_error); \
@@ -55,13 +55,14 @@ do { \
55 55
56#define PS2_MOUSE_RECEIVE(message) \ 56#define PS2_MOUSE_RECEIVE(message) \
57do { \ 57do { \
58 uint8_t rcv = ps2_host_recv_response(); \ 58 __attribute__ ((unused)) uint8_t rcv = ps2_host_recv_response(); \
59 if (debug_mouse) { \ 59 if (debug_mouse) { \
60 print((message)); \ 60 print((message)); \
61 xprintf(" result: %X, error: %X \n", rcv, ps2_error); \ 61 xprintf(" result: %X, error: %X \n", rcv, ps2_error); \
62 } \ 62 } \
63} while(0) 63} while(0)
64 64
65__attribute__ ((unused))
65static enum ps2_mouse_mode_e { 66static enum ps2_mouse_mode_e {
66 PS2_MOUSE_STREAM_MODE, 67 PS2_MOUSE_STREAM_MODE,
67 PS2_MOUSE_REMOTE_MODE, 68 PS2_MOUSE_REMOTE_MODE,
diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c
index a8c13b928..022ac6f6b 100644
--- a/tmk_core/protocol/vusb/vusb.c
+++ b/tmk_core/protocol/vusb/vusb.c
@@ -280,7 +280,7 @@ const PROGMEM uchar keyboard_hid_report[] = {
280 0x95, 0x06, // Report Count (6), 280 0x95, 0x06, // Report Count (6),
281 0x75, 0x08, // Report Size (8), 281 0x75, 0x08, // Report Size (8),
282 0x15, 0x00, // Logical Minimum (0), 282 0x15, 0x00, // Logical Minimum (0),
283 0x25, 0xFF, 0x00, // Logical Maximum(255), 283 0x26, 0xFF, 0x00, // Logical Maximum(255),
284 0x05, 0x07, // Usage Page (Key Codes), 284 0x05, 0x07, // Usage Page (Key Codes),
285 0x19, 0x00, // Usage Minimum (0), 285 0x19, 0x00, // Usage Minimum (0),
286 0x29, 0xFF, // Usage Maximum (255), 286 0x29, 0xFF, // Usage Maximum (255),
@@ -350,7 +350,7 @@ const PROGMEM uchar mouse_hid_report[] = {
350 0xa1, 0x01, // COLLECTION (Application) 350 0xa1, 0x01, // COLLECTION (Application)
351 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2) 351 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2)
352 0x15, 0x01, // LOGICAL_MINIMUM (0x1) 352 0x15, 0x01, // LOGICAL_MINIMUM (0x1)
353 0x25, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7) 353 0x26, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7)
354 0x19, 0x01, // USAGE_MINIMUM (0x1) 354 0x19, 0x01, // USAGE_MINIMUM (0x1)
355 0x29, 0xb7, // USAGE_MAXIMUM (0xb7) 355 0x29, 0xb7, // USAGE_MAXIMUM (0xb7)
356 0x75, 0x10, // REPORT_SIZE (16) 356 0x75, 0x10, // REPORT_SIZE (16)
diff --git a/util/travis_build.sh b/util/travis_build.sh
new file mode 100644
index 000000000..6bafd1941
--- /dev/null
+++ b/util/travis_build.sh
@@ -0,0 +1,22 @@
1#!/bin/bash
2
3TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}"
4TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}"
5
6if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
7 exit_code=0
8 NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l)
9 if [[ $NEFM -gt 0 ]] ; then
10 echo "Making all keymaps for all keyboards"
11 make all-keyboards AUTOGEN="true"
12 : $((exit_code = $exit_code + $?))
13 else
14 MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_]+)(?=\/)' | sort -u)
15 for KB in $MKB ; do
16 echo "Making all keymaps for $KB"
17 make "$KB" AUTOGEN=true
18 : $((exit_code = $exit_code + $?))
19 done
20 fi
21 exit $exit_code
22fi
diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh
index f432976d0..de2481ce5 100644
--- a/util/travis_compiled_push.sh
+++ b/util/travis_compiled_push.sh
@@ -7,21 +7,49 @@ rev=$(git rev-parse --short HEAD)
7git config --global user.name "Travis CI" 7git config --global user.name "Travis CI"
8git config --global user.email "jack.humb+travis.ci@gmail.com" 8git config --global user.email "jack.humb+travis.ci@gmail.com"
9 9
10make ergodox-ez AUTOGEN=true 10if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
11 11
12find . -name ".build" | xargs rm -rf 12increment_version ()
13cd .. 13{
14git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git 14 declare -a part=( ${1//\./ } )
15cd qmk.fm 15 part[2]=$((part[2] + 1))
16git submodule update --init --recursive 16 new="${part[*]}"
17rm -rf keyboard 17 echo -e "${new// /.}"
18rm -rf keyboards 18}
19cp -r ../qmk_firmware/keyboards . 19
20mkdir keyboards/ergodox_ez/ 20NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l)
21cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html 21if [[ $NEFM -gt 0 ]] ; then
22cp ../qmk_firmware/readme.md qmk_readme.md 22 echo "Essential files modified."
23./generate.sh 23 git fetch --tags
24 24 lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1)
25git add -A 25 newtag=$(increment_version $lasttag)
26git commit -m "generated from qmk_firmware/$TRAVIS_BRANCH@${rev}" 26 git tag $newtag
27git push 27 git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware
28else
29 echo "No essential files modified."
30fi
31
32if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
33
34 make ergodox-ez AUTOGEN=true
35
36 find . -name ".build" | xargs rm -rf
37 cd ..
38 git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git
39 cd qmk.fm
40 git submodule update --init --recursive
41 #rm -rf keyboard
42 #rm -rf keyboards
43 yes | cp -rf ../qmk_firmware/keyboards .
44 #mkdir keyboards/ergodox_ez/
45 cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html
46 cp ../qmk_firmware/readme.md qmk_readme.md
47 ./generate.sh
48
49 git add -A
50 git commit -m "generated from qmk/qmk_firmware@${rev}"
51 git push
52
53fi
54
55fi \ No newline at end of file