aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormilestogo <milestogo@users.noreply.github.com>2017-02-04 20:08:07 -0800
committermilestogo <milestogo@users.noreply.github.com>2017-02-04 20:08:07 -0800
commitb0dfb037dc0b8b20fd87b3c88449a2ce20ff80e1 (patch)
treedf9fb78b55c4a9b8262e35ac7bd26ec0ebdb64db
parente8ba4838d30ef3af6d8e69ebc1d00a1910806ac2 (diff)
parentf0633f2540be3ba86797522a2075a9f5ba2ad5c6 (diff)
downloadqmk_firmware-b0dfb037dc0b8b20fd87b3c88449a2ce20ff80e1.tar.gz
qmk_firmware-b0dfb037dc0b8b20fd87b3c88449a2ce20ff80e1.zip
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
-rw-r--r--.travis.yml10
-rw-r--r--Dockerfile3
-rw-r--r--Makefile40
-rw-r--r--build_keyboard.mk4
-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.md4
-rw-r--r--keyboards/atreus62/keymaps/mneme/Makefile5
-rw-r--r--keyboards/atreus62/keymaps/mneme/README.md56
-rw-r--r--keyboards/atreus62/keymaps/mneme/config.h7
-rw-r--r--keyboards/atreus62/keymaps/mneme/img/base.pngbin0 -> 458762 bytes
-rw-r--r--keyboards/atreus62/keymaps/mneme/img/fun.pngbin0 -> 430634 bytes
-rw-r--r--keyboards/atreus62/keymaps/mneme/img/sym.pngbin0 -> 433342 bytes
-rw-r--r--keyboards/atreus62/keymaps/mneme/keymap.c337
-rw-r--r--keyboards/atreus62/keymaps/mneme/unicode114
-rw-r--r--keyboards/ergodox/ez/config.h2
-rw-r--r--keyboards/ergodox/ez/ez.c8
-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/bryan/keymap.c226
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/Makefile1
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.pngbin0 -> 79488 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.pngbin0 -> 79904 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.pngbin0 -> 62258 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.pngbin0 -> 58886 bytes
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/keymap.c426
-rw-r--r--keyboards/ergodox/keymaps/deadcyclo/readme.md70
-rw-r--r--keyboards/ergodox/keymaps/dvorak_programmer/README.md7
-rw-r--r--keyboards/ergodox/keymaps/dvorak_programmer/keymap.c54
-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/pvinis/Readme.md2
-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/swissgerman/keyboard-layout.json419
-rw-r--r--keyboards/ergodox/keymaps/swissgerman/keyboard-layout.pngbin0 -> 75633 bytes
-rw-r--r--keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json436
-rw-r--r--keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.pngbin0 -> 58099 bytes
-rw-r--r--keyboards/ergodox/keymaps/swissgerman/keymap.c287
-rw-r--r--keyboards/ergodox/keymaps/swissgerman/readme.md15
-rw-r--r--keyboards/ergodox/keymaps/win10_writers-block/readme.md2
-rw-r--r--keyboards/ergodox/readme.md2
-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/lets_split/config.h43
-rw-r--r--keyboards/lets_split/keymaps/default/keymap.c188
-rw-r--r--keyboards/lets_split/keymaps/i2c/config.h85
-rw-r--r--keyboards/lets_split/keymaps/serial/config.h87
-rw-r--r--keyboards/lets_split/rev1/config.h14
-rw-r--r--keyboards/lets_split/rev2/config.h13
-rw-r--r--keyboards/lets_split/rev2/rev2.h8
-rw-r--r--keyboards/planck/keymaps/callum/keymap.c51
-rw-r--r--keyboards/planck/keymaps/callum/readme.md12
-rw-r--r--keyboards/planck/keymaps/cbbrowne/Makefile4
-rw-r--r--keyboards/planck/keymaps/cbbrowne/keymap.c8
-rw-r--r--keyboards/planck/keymaps/default/keymap.c17
-rw-r--r--keyboards/planck/keymaps/mitch/Makefile5
-rw-r--r--keyboards/planck/keymaps/mitch/config.h2
-rw-r--r--keyboards/planck/keymaps/mitch/keymap.c70
-rw-r--r--keyboards/planck/keymaps/mitch/readme.md26
-rw-r--r--keyboards/planck/keymaps/vifon/Makefile5
-rw-r--r--keyboards/planck/keymaps/vifon/config.h5
-rw-r--r--keyboards/planck/keymaps/vifon/keymap.c4
-rw-r--r--keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c49
-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.md85
-rw-r--r--keyboards/ps2avrGB/Makefile3
-rw-r--r--keyboards/ps2avrGB/README.md61
-rw-r--r--keyboards/ps2avrGB/config.h38
-rw-r--r--keyboards/ps2avrGB/keymaps/default/keymap.c32
-rw-r--r--keyboards/ps2avrGB/matrix.c104
-rwxr-xr-xkeyboards/ps2avrGB/program74
-rw-r--r--keyboards/ps2avrGB/ps2avrGB.c0
-rw-r--r--keyboards/ps2avrGB/ps2avrGB.h43
-rw-r--r--keyboards/ps2avrGB/rules.mk43
-rw-r--r--keyboards/ps2avrGB/usbconfig.h396
-rw-r--r--keyboards/readme.md3
-rw-r--r--keyboards/s60-x/readme.md2
-rw-r--r--keyboards/tv44/keymaps/default/keymap.c2
-rw-r--r--keyboards/whitefox/Makefile3
-rw-r--r--keyboards/whitefox/bootloader_defs.h1
-rw-r--r--keyboards/whitefox/chconf.h524
-rw-r--r--keyboards/whitefox/config.h78
-rw-r--r--keyboards/whitefox/halconf.h353
-rw-r--r--keyboards/whitefox/keymaps/default/keymap.c51
-rw-r--r--keyboards/whitefox/keymaps/matt3o/keymap.c92
-rw-r--r--keyboards/whitefox/led.c24
-rw-r--r--keyboards/whitefox/matrix.c132
-rw-r--r--keyboards/whitefox/mcuconf.h54
-rw-r--r--keyboards/whitefox/readme.md7
-rw-r--r--keyboards/whitefox/rules.mk68
-rw-r--r--keyboards/whitefox/whitefox.c17
-rw-r--r--keyboards/whitefox/whitefox.h54
-rw-r--r--quantum/keymap_extras/keymap_br_abnt2.h16
-rw-r--r--quantum/process_keycode/process_music.c1
-rw-r--r--quantum/process_keycode/process_tap_dance.c7
-rw-r--r--quantum/process_keycode/process_tap_dance.h1
-rw-r--r--quantum/quantum_keycodes.h4
-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.mk8
-rw-r--r--tmk_core/common/avr/bootloader.c12
-rw-r--r--tmk_core/common/avr/timer.c33
-rw-r--r--tmk_core/common/command.c3
-rw-r--r--tmk_core/common/keyboard.c2
-rw-r--r--tmk_core/protocol/vusb.mk3
-rw-r--r--tmk_core/protocol/vusb/main.c6
-rw-r--r--tmk_core/protocol/vusb/vusb.c22
121 files changed, 6291 insertions, 750 deletions
diff --git a/.travis.yml b/.travis.yml
index e74744a96..b206d1451 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,6 @@ os: linux
2dist: trusty 2dist: trusty
3sudo: required 3sudo: required
4language: c 4language: c
5compiler: avr-gcc
6branches: 5branches:
7 except: 6 except:
8 - /^.*-automated-build$/ 7 - /^.*-automated-build$/
@@ -12,13 +11,18 @@ env:
12 matrix: 11 matrix:
13 - TARGET=all-keyboards AUTOGEN=true 12 - TARGET=all-keyboards AUTOGEN=true
14 - TARGET=test AUTOGEN=false 13 - TARGET=test AUTOGEN=false
14before_install:
15 - wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
16install:
17 - tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
18 - export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
19before_script:
20 - avr-gcc --version
15script: 21script:
16- make $TARGET AUTOGEN=$AUTOGEN 22- make $TARGET AUTOGEN=$AUTOGEN
17addons: 23addons:
18 apt: 24 apt:
19 packages: 25 packages:
20 - avr-libc
21 - gcc-avr
22 - dfu-programmer 26 - dfu-programmer
23 - pandoc 27 - pandoc
24 - gcc-arm-none-eabi 28 - gcc-arm-none-eabi
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 ce505de12..b85557d4a 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -221,7 +221,11 @@ OPT_DEFS += $(TMK_COMMON_DEFS)
221EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS) 221EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
222 222
223ifeq ($(PLATFORM),AVR) 223ifeq ($(PLATFORM),AVR)
224ifeq ($(strip $(PROTOCOL)), VUSB)
225 include $(TMK_PATH)/protocol/vusb.mk
226else
224 include $(TMK_PATH)/protocol/lufa.mk 227 include $(TMK_PATH)/protocol/lufa.mk
228endif
225 include $(TMK_PATH)/avr.mk 229 include $(TMK_PATH)/avr.mk
226endif 230endif
227 231
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 a4077668e..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
@@ -169,7 +169,7 @@ This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboar
169 169
170## Building 170## Building
171 171
172Download or clone the whole firmware and navigate to the keyboards/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. 172Download or clone the whole firmware and navigate to the keyboards/atreus folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button.
173 173
174Depending on which keymap you would like to use, you will have to compile slightly differently. 174Depending on which keymap you would like to use, you will have to compile slightly differently.
175 175
diff --git a/keyboards/atreus62/keymaps/mneme/Makefile b/keyboards/atreus62/keymaps/mneme/Makefile
new file mode 100644
index 000000000..046aec273
--- /dev/null
+++ b/keyboards/atreus62/keymaps/mneme/Makefile
@@ -0,0 +1,5 @@
1TAP_DANCE_ENABLE = yes
2NKRO_ENABLE = true
3MOUSEKEY_ENABLE = no
4EXTRAKEY_ENABLE = yes
5CONSOLE_ENABLE = no
diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md
new file mode 100644
index 000000000..04ab070be
--- /dev/null
+++ b/keyboards/atreus62/keymaps/mneme/README.md
@@ -0,0 +1,56 @@
1<!-- -*- mode: markdown; fill-column: 8192 -*- -->
2
3Mnemes Swedish Bonaza
4=======================
5
6My Layout in process, most of the code is shamelessly stolen from [algernons][algernon] excellent layout
7
8 [algernon]: https://github.com/algernon/ergodox-layout
9
10It's for Windows (current work forces me to) and Swedish (matter of birth) so ymmw.
11
12## Table of Contents
13
14* [Layouts](#layouts)
15 - [Base layer](#base-layer)
16 - [Nav layer](#nav-layer)
17 - [Sym layer](#sym-layer)
18 - [LED states](#led-states)
19
20# Layouts
21
22## Base layer
23
24![Base layer](img/base.png)
25
26
27* The number row doubles as a function row. Short presses produces numbers, long presses produces Fxx
28* The `Shift`, `Alt`, and `Control` modifiers are one-shot.
29* `Backspace` and `Enter` doubles as switches to the `sym` layer when held
30* The `ESC` key also doubles as a one-shot cancel key.
31* The **Lead** key is followed by a sequence of keys.
32 - `LEAD l` : `lgui+l`.
33 - `LEAD s l` : `λ`.
34 - `LEAD s s` : `¯\_(ツ)_/¯`
35 - `LEAD s f` : `凸(ツ)凸`
36 - `LEAD a *` : Application switching based on position in start menu. Very specific to my computer.
37
38
39## Nav layer
40
41![Nav layer](img/fun.png)
42
43Basic navigation on the right hand and modifiers close
44by for the left. The latter because I tend to use `ctrl+arrows` quite a lot.
45
46## Sym layer
47
48![Sym layer](img/sym.png)
49
50* Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could.
51
52- `eq` : Tapdance, produces `===` and `!==`
53- `fun`: Tapdance, produces `=>` and `() => {\n`
54
55# License
56 GPL-3+
diff --git a/keyboards/atreus62/keymaps/mneme/config.h b/keyboards/atreus62/keymaps/mneme/config.h
new file mode 100644
index 000000000..2c2a08c05
--- /dev/null
+++ b/keyboards/atreus62/keymaps/mneme/config.h
@@ -0,0 +1,7 @@
1#define ONESHOT_TIMEOUT 3000
2#define TAPPING_TERM 200
3#define PREVENT_STUCK_MODIFIERS
4
5#define LEADER_TIMEOUT 1000
6
7#include "../../config.h"
diff --git a/keyboards/atreus62/keymaps/mneme/img/base.png b/keyboards/atreus62/keymaps/mneme/img/base.png
new file mode 100644
index 000000000..86907d544
--- /dev/null
+++ 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
new file mode 100644
index 000000000..ec5a478c6
--- /dev/null
+++ 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
new file mode 100644
index 000000000..11b5bd4b0
--- /dev/null
+++ 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
new file mode 100644
index 000000000..7c1879982
--- /dev/null
+++ b/keyboards/atreus62/keymaps/mneme/keymap.c
@@ -0,0 +1,337 @@
1#include <stdarg.h>
2#include "atreus62.h"
3#include "led.h"
4#include "action_layer.h"
5#include "action_util.h"
6
7/*
8 *WINDOWS SWEDISH
9 */
10#define KN_HALF KC_GRV // 1/2
11#define KN_PLUS KC_MINS // +
12#define KN_ACUT KC_EQL // ´
13#define KN_AO KC_LBRC // Ã…
14#define KN_UMLA KC_RBRC // ¨
15#define KN_OE KC_SCLN // Ö
16#define KN_AE KC_QUOT // Ä
17#define KN_QUOT KC_NUHS // '
18#define KN_LABK KC_NUBS // <
19#define KN_MINS KC_SLSH // -
20#define KN_EXLM LSFT(KC_1) // !
21#define KN_DQT LSFT(KC_2) // "
22#define KN_AT RALT(KC_2) // @
23#define KN_HASH LSFT(KC_3) // #
24#define KN_DLR RALT(KC_4) // $
25#define KN_PERC LSFT(KC_5) // %
26#define KN_AMPR LSFT(KC_6) // &
27#define KN_SLSH LSFT(KC_7) // /
28#define KN_LPRN LSFT(KC_8) // (
29#define KN_RPRN LSFT(KC_9) // )
30#define KN_EQL LSFT(KC_0) // =
31#define KN_UNDS LSFT(KN_MINS) // _
32#define KN_QUES LSFT(KN_PLUS) // ?
33#define KN_GRAV LSFT(KN_ACUT) // `
34#define KN_LCBR RALT(KC_7) // {
35#define KN_RCBR RALT(KC_0) // }
36#define KN_LBRC RALT(KC_8) // [
37#define KN_RBRC RALT(KC_9) // ]
38#define KN_RABK LSFT(KN_LABK) // <
39#define KN_COLN LSFT(KC_DOT) // :
40#define KN_SCLN LSFT(KC_COMM) // :
41#define KN_PIPE RALT(KN_LABK) // |
42#define KN_QUES LSFT(KN_PLUS) // ?
43#define KN_CIRC LSFT(KN_UMLA) // ^
44#define KN_ASTR LSFT(KN_QUOT) // *
45#define KN_TILD RALT(KN_UMLA) // ~
46#define KN_BSLS RALT(KN_PLUS) //
47
48#define OSM_LCTL OSM(MOD_LCTL)
49#define OSM_LALT OSM(MOD_LALT)
50#define OSM_LSFT OSM(MOD_LSFT)
51
52#define KC_HYP LSFT(LALT(LCTL(KC_LGUI)))
53
54#define KC_COPY LCTL(KC_C)
55#define KC_PASTE LCTL(KC_V)
56#define KC_UNDO LCTL(KC_Z)
57#define KC_REDO LCTL(LSFT(KC_Z))
58
59// Layers
60enum {
61 BASE = 0,
62 NAV,
63 SYM
64};
65
66//Macros
67enum {
68 KF_1 = 0, // 1, F1
69 KF_2, // ...
70 KF_3,
71 KF_4,
72 KF_5,
73 KF_6,
74 KF_7,
75 KF_8,
76 KF_9,
77 KF_10,
78 KF_11,
79 KF_12
80};
81
82// Tapdance
83enum {
84 TD_FUN = 0,
85 TD_EQ
86};
87
88//Custom keycodes
89enum {
90 PLACEHOLDER = SAFE_RANGE
91};
92
93//State and timers
94uint16_t kf_timers[12];
95
96
97
98const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
99
100 [BASE] = {
101
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) },
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 },
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 },
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 },
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) }
107
108 },
109 [NAV] = {
110
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 },
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 },
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 },
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 },
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 }
116
117 },
118 [SYM] = {
119
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 },
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 },
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 },
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 },
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 }
125
126 }
127};
128
129#define TAP_ONCE(code) \
130 register_code (code); \
131 unregister_code (code)
132
133static void m_tapn (uint8_t code, ...) {
134 uint8_t kc = code;
135 va_list ap;
136
137 va_start(ap, code);
138 do {
139 register_code(kc);
140 unregister_code(kc);
141 wait_ms(50);
142 kc = va_arg(ap, int);
143 } while (kc != 0);
144 va_end(ap);
145}
146
147static void m_handle_kf (keyrecord_t *record, uint8_t id) {
148 uint8_t code = id - KF_1;
149
150 if (record->event.pressed) {
151 kf_timers[code] = timer_read ();
152 } else {
153 uint8_t kc_base;
154 uint8_t long_press = (kf_timers[code] && timer_elapsed (kf_timers[code]) > TAPPING_TERM);
155
156 kf_timers[code] = 0;
157
158 switch(id){
159 case KF_1 ... KF_10:
160 if (long_press) {
161 // Long press
162 kc_base = KC_F1;
163 } else {
164 kc_base = KC_1;
165 }
166 code += kc_base;
167 break;
168 case KF_11:
169 code = long_press ? KC_F11 : KC_ESC;
170 break;
171 case KF_12:
172 code = long_press ? KC_F12 : KN_PLUS;
173 break;
174 }
175 register_code (code);
176 unregister_code (code);
177 }
178}
179
180const uint16_t PROGMEM fn_actions[] = {
181};
182
183const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
184{
185 switch (id) {
186 case KF_1 ... KF_12:
187 m_handle_kf(record, id);
188 break;
189 }
190 return MACRO_NONE;
191};
192
193// Custom keycodes
194bool process_record_user(uint16_t keycode, keyrecord_t *record) {
195 bool queue = true;
196
197 //Cancle one-shot mods.
198 switch (keycode) {
199 case KC_ESC:
200 if (record->event.pressed && get_oneshot_mods() && !has_oneshot_mods_timed_out()) {
201 clear_oneshot_mods();
202 queue = false;
203 }
204 break;
205 }
206 return queue;
207}
208
209// TAP DANCE SETTINGS
210void dance_eq (qk_tap_dance_state_t *state, void *user_data) {
211 switch (state->count) {
212 case 1: // ===
213 register_code(KC_LSHIFT);
214 m_tapn(KC_0, KC_0, KC_0, 0);
215 unregister_code(KC_LSHIFT);
216 break;
217 case 2:
218 register_code(KC_LSHIFT);
219 m_tapn(KC_1, KC_0, KC_0, 0);
220 unregister_code(KC_LSHIFT);
221 break;
222 default:
223 reset_tap_dance(state);
224 }
225}
226
227void dance_fun (qk_tap_dance_state_t *state, void *user_data) {
228 switch (state->count) {
229 case 1: // =>
230 register_code(KC_LSHIFT);
231 m_tapn(KC_0, KN_LABK, 0);
232 unregister_code(KC_LSHIFT);
233 break;
234 case 2: // () => {}
235 register_code(KC_LSHIFT);
236 m_tapn(KC_8, KC_9, KC_SPC, KC_0, KN_LABK, KC_SPC, 0);
237 unregister_code(KC_LSHIFT);
238 register_code(KC_RALT);
239 m_tapn(KC_7, 0);
240 unregister_code(KC_RALT);
241 TAP_ONCE(KC_ENT);
242 break;
243 default:
244 reset_tap_dance(state);
245 }
246}
247
248qk_tap_dance_action_t tap_dance_actions[] = {
249 [TD_FUN] = ACTION_TAP_DANCE_FN (dance_fun)
250 ,[TD_EQ] = ACTION_TAP_DANCE_FN (dance_eq)
251};
252
253// Runs just one time when the keyboard initializes.
254void matrix_init_user(void) {
255 set_unicode_input_mode(UC_WINC);
256};
257
258LEADER_EXTERNS();
259// Runs constantly in the background, in a loop.
260void matrix_scan_user(void) {
261 LEADER_DICTIONARY() {
262 leading = false;
263 leader_end();
264 SEQ_ONE_KEY(KC_L){
265 register_code(KC_RGUI);
266 TAP_ONCE(KC_L);
267 unregister_code(KC_RGUI);
268 };
269
270
271 SEQ_TWO_KEYS (KC_A, KC_W) {
272 //Web - chrome
273 register_code (KC_LGUI); TAP_ONCE (KC_1); unregister_code (KC_LGUI);
274 }
275 SEQ_TWO_KEYS (KC_A, KC_P) {
276 //sPotify
277 register_code (KC_LGUI); TAP_ONCE (KC_2); unregister_code (KC_LGUI);
278
279 }
280 SEQ_TWO_KEYS (KC_A, KC_T) {
281 //Total Commander
282 register_code (KC_LGUI); TAP_ONCE (KC_3); unregister_code (KC_LGUI);
283
284 }
285 SEQ_TWO_KEYS (KC_A, KC_A) {
286 //Atom
287 register_code (KC_LGUI); TAP_ONCE (KC_4); unregister_code (KC_LGUI);
288
289 }
290 SEQ_TWO_KEYS (KC_A, KC_E) {
291 //Emacs
292 register_code (KC_LGUI); TAP_ONCE (KC_5); unregister_code (KC_LGUI);
293
294 }
295 SEQ_TWO_KEYS (KC_A, KC_C) {
296 //Cmdr
297 register_code (KC_LGUI); TAP_ONCE (KC_6); unregister_code (KC_LGUI);
298
299 }
300 SEQ_TWO_KEYS (KC_A, KC_S) {
301 //Slack
302 register_code (KC_LGUI); TAP_ONCE (KC_7); unregister_code (KC_LGUI);
303 }
304
305
306 SEQ_TWO_KEYS (KC_S, KC_S) {
307 // ¯\_(ツ)_/¯
308 unicode_input_start(); register_hex(0xaf); unicode_input_finish();
309 register_code (KC_LALT);
310 register_code (KC_LCTL);
311 TAP_ONCE (KN_PLUS);
312 unregister_code (KC_LCTL);
313 unregister_code (KC_LALT);
314
315 register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT);
316 unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
317 register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT);
318 unicode_input_start (); register_hex(0xaf); unicode_input_finish();
319 }
320
321 SEQ_TWO_KEYS (KC_S, KC_F) {
322 // 凸(ツ)凸
323 unicode_input_start(); register_hex(0x51F8); unicode_input_finish();
324 register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT);
325 unicode_input_start (); register_hex(0x30c4); unicode_input_finish();
326 register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT);
327 unicode_input_start (); register_hex(0x51F8); unicode_input_finish();
328 }
329
330 SEQ_TWO_KEYS (KC_S, KC_L) {
331 // λ
332 unicode_input_start();
333 register_hex(0x03bb);
334 unicode_input_finish();
335 }
336 };
337};
diff --git a/keyboards/atreus62/keymaps/mneme/unicode b/keyboards/atreus62/keymaps/mneme/unicode
new file mode 100644
index 000000000..b3f62b6d3
--- /dev/null
+++ b/keyboards/atreus62/keymaps/mneme/unicode
@@ -0,0 +1,114 @@
1Todo
2☠2610 Todo
3☑ 2611 Done
4☒ 2612 Failed
5
6Operator
7× 00D7 Multiplication
8÷ 00F7 Division
9≤ 2264 LessEqual
10≥ 2265 MoreEqual
11± 00B1 Plusminus
12
13Math
14∠220F Product
15∑ 2211 Sum
16≈ 2248 Almost
17≡ 2261 Equivalent
18∞ 221E Infinity
19‰ 2030 Mille
20
21Set
22⊂ 2282 Subset
23⊃ 2283 sUperset
24∩ 2229 Intersextion
25∪ 222A Union
26∈ 2208 Element
27∉ 2209 Notelement
28∠220D Contains
29∌ 220C doesNotcontain
30
31Logic
32¬ 00AC Not
33∧ 2227 And
34∨ 2228 Or
35∃ 2203 Exists
36∄ 2204 Notexists
37
38Greek
39µ 00B5 Micro
40λ 03BB Lamda
41Ω 2126 Omega
42α 03B1 Alpha
43β 03B2 Beta
44γ 03B3 Gamma
45Ï€ 03C0 Pi
46δ 03B4 Delta
47
48Other
49☠2601 Cloud
50☼ 263C Sun
51☂ 2602 Rain
52☠ 2620 Skull
53♺ 267A Recycle
54ðŸ‘1F44D thumbsUp
55👎1F44E thumbsDown
56💩 1F4A9 Poo
57
58
59//Todo
60SEQ_THREE_KEYS(KC_U, KC_G, KC_T){m_unicode(0x2610);}; // Todo
61SEQ_THREE_KEYS(KC_U, KC_G, KC_D){m_unicode(0x2611);}; // Done
62SEQ_THREE_KEYS(KC_U, KC_G, KC_F){m_unicode(0x2612);}; // Failed
63
64//Operator
65SEQ_THREE_KEYS(KC_U, KC_O, KC_M){m_unicode(0x00D7);}; // Multiplication
66SEQ_THREE_KEYS(KC_U, KC_O, KC_D){m_unicode(0x00F7);}; // Division
67SEQ_THREE_KEYS(KC_U, KC_O, KC_L){m_unicode(0x2264);}; // LessEqual
68SEQ_THREE_KEYS(KC_U, KC_O, KC_M){m_unicode(0x2265);}; // MoreEqual
69SEQ_THREE_KEYS(KC_U, KC_O, KC_P){m_unicode(0x00B1);}; // Plusminus
70
71//Math
72SEQ_THREE_KEYS(KC_U, KC_M, KC_P){m_unicode(0x220F);}; // Product
73SEQ_THREE_KEYS(KC_U, KC_M, KC_S){m_unicode(0x2211);}; // Sum
74SEQ_THREE_KEYS(KC_U, KC_M, KC_A){m_unicode(0x2248);}; // Almost
75SEQ_THREE_KEYS(KC_U, KC_M, KC_E){m_unicode(0x2261);}; // Equivalent
76SEQ_THREE_KEYS(KC_U, KC_M, KC_I){m_unicode(0x221E);}; // Infinity
77SEQ_THREE_KEYS(KC_U, KC_M, KC_M){m_unicode(0x2030);}; // Mille
78
79//Set
80SEQ_THREE_KEYS(KC_U, KC_S, KC_S){m_unicode(0x2282);}; Subset
81SEQ_THREE_KEYS(KC_U, KC_S, KC_P){m_unicode(0x2283);}; suPerset
82SEQ_THREE_KEYS(KC_U, KC_S, KC_I){m_unicode(0x2229);}; Intersection
83SEQ_THREE_KEYS(KC_U, KC_S, KC_U){m_unicode(0x222A);}; Union
84SEQ_THREE_KEYS(KC_U, KC_S, KC_E){m_unicode(0x2208);}; Element
85SEQ_THREE_KEYS(KC_U, KC_S, KC_N){m_unicode(0x2209);}; Notelement
86SEQ_THREE_KEYS(KC_U, KC_S, KC_C){m_unicode(0x220D);}; Contains
87SEQ_THREE_KEYS(KC_U, KC_S, KC_D){m_unicode(0x220C);}; doesNotcontain
88
89//Logic
90SEQ_THREE_KEYS(KC_U, KC_L, KC_N){m_unicode(0x00AC);}; // Not
91SEQ_THREE_KEYS(KC_U, KC_L, KC_A){m_unicode(0x2227);}; // And
92SEQ_THREE_KEYS(KC_U, KC_L, KC_O){m_unicode(0x2228);}; // Or
93SEQ_THREE_KEYS(KC_U, KC_L, KC_E){m_unicode(0x2203);}; // Exists
94SEQ_THREE_KEYS(KC_U, KC_L, KC_N){m_unicode(0x2204);}; // Notexists
95
96//Greek
97SEQ_THREE_KEYS(KC_U, KC_G, KC_M){m_unicode(0x00B5);}; // Micro
98SEQ_THREE_KEYS(KC_U, KC_G, KC_L){m_unicode(0x03BB);}; // Lamda
99SEQ_THREE_KEYS(KC_U, KC_G, KC_O){m_unicode(0x2126);}; // Omega
100SEQ_THREE_KEYS(KC_U, KC_G, KC_A){m_unicode(0x03B1);}; // Alpha
101SEQ_THREE_KEYS(KC_U, KC_G, KC_B){m_unicode(0x03B2);}; // Beta
102SEQ_THREE_KEYS(KC_U, KC_G, KC_G){m_unicode(0x03B3);}; // Gamma
103SEQ_THREE_KEYS(KC_U, KC_G, KC_P){m_unicode(0x03C0);}; // Pi
104SEQ_THREE_KEYS(KC_U, KC_G, KC_D){m_unicode(0x03B4);}; // Delta
105
106//Zother
107SEQ_THREE_KEYS(KC_U, KC_Z, KC_C){m_unicode(0x2601);}; // Cloud
108SEQ_THREE_KEYS(KC_U, KC_Z, KC_S){m_unicode(0x263C);}; // Sun
109SEQ_THREE_KEYS(KC_U, KC_Z, KC_R){m_unicode(0x2602);}; // Rain
110SEQ_THREE_KEYS(KC_U, KC_Z, KC_K){m_unicode(0x2620);}; // sKull
111SEQ_THREE_KEYS(KC_U, KC_Z, KC_R){m_unicode(0x267A);}; // rEcycle
112SEQ_THREE_KEYS(KC_U, KC_Z, KC_U){m_unicode(0x1F44D);}; // thumbsUp
113SEQ_THREE_KEYS(KC_U, KC_Z, KC_D){m_unicode(0x1F44E);}; // thumbsDown
114SEQ_THREE_KEYS(KC_U, KC_Z, KC_P){m_unicode(0x1F4A9);}; // Poo
diff --git a/keyboards/ergodox/ez/config.h b/keyboards/ergodox/ez/config.h
index 6a8c66d7d..e4f95c302 100644
--- a/keyboards/ergodox/ez/config.h
+++ b/keyboards/ergodox/ez/config.h
@@ -49,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
49#define RGBLIGHT_SAT_STEP 255 49#define RGBLIGHT_SAT_STEP 255
50#define RGBLIGHT_VAL_STEP 12 50#define RGBLIGHT_VAL_STEP 12
51 51
52#define RGB_MIDI 52// #define RGB_MIDI
53#define RGBW_BB_TWI 53#define RGBW_BB_TWI
54 54
55#define RGBW 1 55#define RGBW 1
diff --git a/keyboards/ergodox/ez/ez.c b/keyboards/ergodox/ez/ez.c
index 039e4c6bb..3e19f2302 100644
--- a/keyboards/ergodox/ez/ez.c
+++ b/keyboards/ergodox/ez/ez.c
@@ -52,9 +52,9 @@ uint8_t init_mcp23018(void) {
52 52
53 // I2C subsystem 53 // I2C subsystem
54 54
55 uint8_t sreg_prev; 55 // uint8_t sreg_prev;
56 sreg_prev=SREG; 56 // sreg_prev=SREG;
57 cli(); 57 // cli();
58 if (i2c_initialized == 0) { 58 if (i2c_initialized == 0) {
59 i2c_init(); // on pins D(1,0) 59 i2c_init(); // on pins D(1,0)
60 i2c_initialized++; 60 i2c_initialized++;
@@ -83,7 +83,7 @@ uint8_t init_mcp23018(void) {
83out: 83out:
84 i2c_stop(); 84 i2c_stop();
85 85
86 SREG=sreg_prev; 86 // SREG=sreg_prev;
87 87
88 return mcp23018_status; 88 return mcp23018_status;
89} 89}
diff --git a/keyboards/ergodox/keymaps/ab/readme.md b/keyboards/ergodox/keymaps/ab/readme.md
index 6b1ac2be3..62e08e162 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_ez/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/bryan/keymap.c b/keyboards/ergodox/keymaps/bryan/keymap.c
new file mode 100644
index 000000000..572cea8cd
--- /dev/null
+++ b/keyboards/ergodox/keymaps/bryan/keymap.c
@@ -0,0 +1,226 @@
1#include "ergodox.h"
2#include "debug.h"
3#include "action_layer.h"
4#include "version.h"
5
6#define BASE 0 // default layer
7#define SYMB 1 // symbols
8#define MDIA 2 // media keys
9
10enum custom_keycodes {
11 PLACEHOLDER = SAFE_RANGE, // can always be here
12 EPRM,
13 VRSN,
14 RGB_SLD
15};
16
17const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
18/* Keymap 0: Basic layer
19 *
20 * ,--------------------------------------------------------. ,--------------------------------------------------------.
21 * | = | 1 | 2 | 3 | 4 | 5 | Cmd,Shft,[ | | Cmd,Shft,] | 6 | 7 | 8 | 9 | 0 | - |
22 * |--------+------+------+------+------+-------------------| |------------+------+------+------+------+------+--------|
23 * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
24 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
25 * |BkSp/Cmd| A | S | D | F | G |------------| |------------| H | J | K | L |; / L2|' / Cmd |
26 * |--------+------+------+------+------+------| Hyper | | Meh |------+------+------+------+------+--------|
27 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
28 * `--------+------+------+------+------+-------------------' `-------------+------+------+------+------+--------'
29 * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
30 * `----------------------------------' `----------------------------------'
31 * ,-------------. ,-------------.
32 * |Ctrl/Esc|PgUp| | App | LGui |
33 * ,------|------|------| |------+--------+------.
34 * | | | PgDn | | Home | | |
35 * | Space|Backsp|------| |------| Tab |Enter |
36 * | |ace | Esc | | Alt | | |
37 * `--------------------' `----------------------'
38 */
39// If it accepts an argument (i.e, is a function), it doesn't need KC_.
40// Otherwise, it needs KC_*
41[BASE] = KEYMAP( // layer 0 : default
42 // left hand
43 KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, M(2),
44 KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
45 GUI_T(KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G,
46 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
47 LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
48 CTL_T(KC_ESC),KC_PGUP,
49 KC_PGDN,
50 KC_SPC,KC_BSPC, KC_ESC,
51 // right hand
52 M(3), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
53 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
54 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
55 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
56 KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
57
58 ALT_T(KC_APP), KC_LGUI,
59 KC_HOME,
60 KC_LALT,KC_TAB, KC_ENT
61 ),
62/* Keymap 1: Symbol Layer
63 *
64 * ,--------------------------------------------------. ,--------------------------------------------------.
65 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
66 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
67 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
68 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
69 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
70 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
71 * | | % | ^ | [ | ] | ~ | | | | <- | 1 | 2 | 3 | \ | |
72 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
73 * | | | | | | | | . | 0 | = | |
74 * `----------------------------------' `----------------------------------'
75 * ,-------------. ,-------------.
76 * | | | | | |
77 * ,------|------|------| |------+------+------.
78 * | | | | | | | |
79 * | | |------| |------| | |
80 * | | | | | | | |
81 * `--------------------' `--------------------'
82 */
83// SYMBOLS
84[SYMB] = KEYMAP(
85 // left hand
86 KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
87 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
88 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
89 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
90 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
91 KC_TRNS,KC_TRNS,
92 KC_TRNS,
93 KC_TRNS,KC_TRNS,KC_TRNS,
94 // right hand
95 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
96 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
97 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
98 KC_TRNS, M(1), KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
99 KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
100 KC_TRNS, KC_TRNS,
101 KC_TRNS,
102 KC_TRNS, KC_TRNS, KC_TRNS
103),
104// KC_COMM, KC_MINS
105
106/* Keymap 2: Media and mouse keys
107 *
108 * ,--------------------------------------------------. ,--------------------------------------------------.
109 * | | | | | | | | | | | | | | | |
110 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
111 * | | | | MsUp | | | | | | | | | | | |
112 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
113 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
114 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
115 * | | | | | | | | | | | | Prev | Next | | |
116 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
117 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
118 * `----------------------------------' `----------------------------------'
119 * ,-------------. ,-------------.
120 * | | | | | |
121 * ,------|------|------| |------+------+------.
122 * | | | | | | |Brwser|
123 * | | |------| |------| |Back |
124 * | | | | | | | |
125 * `--------------------' `--------------------'
126 */
127// MEDIA AND MOUSE
128[MDIA] = KEYMAP(
129 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
130 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
131 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,
133 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
134 KC_TRNS, KC_TRNS,
135 KC_TRNS,
136 KC_TRNS, KC_TRNS, KC_TRNS,
137 // right hand
138 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
139 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
140 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
141 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,
143 KC_TRNS, KC_TRNS,
144 KC_TRNS,
145 KC_TRNS, KC_TRNS, KC_WBAK
146),
147};
148
149const uint16_t PROGMEM fn_actions[] = {
150 [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
151};
152
153const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
154{
155 // MACRODOWN only works in this function
156 switch(id) {
157 case 0:
158 if (record->event.pressed) {
159 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
160 }
161 break;
162 case 1:
163 if (record->event.pressed) { // For resetting EEPROM
164 eeconfig_init();
165 }
166 break;
167 }
168 return MACRO_NONE;
169};
170
171bool process_record_user(uint16_t keycode, keyrecord_t *record) {
172 switch (keycode) {
173 // dynamically generate these.
174 case EPRM:
175 if (record->event.pressed) {
176 eeconfig_init();
177 }
178 return false;
179 break;
180 case VRSN:
181 if (record->event.pressed) {
182 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
183 }
184 return false;
185 break;
186 case RGB_SLD:
187 if (record->event.pressed) {
188 #ifdef RGBLIGHT_ENABLE
189 rgblight_mode(1);
190 #endif
191 }
192 return false;
193 break;
194 }
195 return true;
196}
197
198// Runs just one time when the keyboard initializes.
199void matrix_init_user(void) {
200
201};
202
203
204// Runs constantly in the background, in a loop.
205void matrix_scan_user(void) {
206
207 uint8_t layer = biton32(layer_state);
208
209 ergodox_board_led_off();
210 ergodox_right_led_1_off();
211 ergodox_right_led_2_off();
212 ergodox_right_led_3_off();
213 switch (layer) {
214 // TODO: Make this relevant to the ErgoDox EZ.
215 case 1:
216 ergodox_right_led_1_on();
217 break;
218 case 2:
219 ergodox_right_led_2_on();
220 break;
221 default:
222 // none
223 break;
224 }
225
226};
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
new file mode 100644
index 000000000..2c03af581
--- /dev/null
+++ 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
new file mode 100644
index 000000000..5adb7ac77
--- /dev/null
+++ 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
new file mode 100644
index 000000000..a267ff23d
--- /dev/null
+++ 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
new file mode 100644
index 000000000..c8c90cf5c
--- /dev/null
+++ 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 915507440..fa41f0ec1 100644
--- a/keyboards/ergodox/keymaps/deadcyclo/readme.md
+++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md
@@ -1,10 +1,72 @@
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.
9
10# Layouts
11
12All layer images created using [keyboard-layout-editor](http://www.keyboard-layout-editor.com/)
13
14## Base layer
15
16[![Base layer](images/deadcyclo-base-layout.png)](http://www.keyboard-layout-editor.com/#/gists/0321b18620180a3e46c498206eb65366)
17
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.
21
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.
25
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.
30
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.
34
35## Layer 1 - Symbols and RGB
36
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)
7 57
8# Changelog 58# Changelog
9 59
10- 02.01.2017 Added delete key on second layer 60- 02.01.2017 Added delete key on second layer
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)
66
67# TODO
68
69- Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?)
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/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md
index 3e4a2545b..54da74f7f 100644
--- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md
+++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md
@@ -7,18 +7,23 @@ Layers
7------ 7------
8 8
9* BASE: this is where you type. 9* BASE: this is where you type.
10* SHELL_LAYER: this is a permanent layer which I use when I don't need the F keys and gives me bash shortcuts on the top row.
10* SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement. 11* SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement.
11* KEY_NAV: arrow key movement with backward/forward word support, and copy/paste. 12* KEY_NAV: arrow key movement with backward/forward word support, and copy/paste.
12* KEY_SEL: same as above, but every movement shift-selects. 13* KEY_SEL: same as above, but every movement shift-selects.
13* NUMBER: keypad layer. 14* NUMBER: keypad layer.
14* SYMBOL: all the symbols. 15* SYMBOL: all the symbols.
15* BRACKET: special brackets-only layer for programming 16* BRACKET: special brackets-only layer for programming. Activated by pressing left capslock (OSL)
16* SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps. 17* SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps.
17* MOUSE: use mouse keys 18* MOUSE: use mouse keys
18 19
19Updates 20Updates
20------- 21-------
21 22
232017/01/22:
24* Made brackets toggle an OSL on the left capslock
25* Added SHELL_LAYER
26
222016/12/10: 272016/12/10:
23* toggle for brackets layer is now on left thumb cluster. 28* toggle for brackets layer is now on left thumb cluster.
24 29
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c
index f3d02f688..7ed0c7f12 100644
--- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c
+++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c
@@ -6,7 +6,8 @@
6#include "action_code.h" 6#include "action_code.h"
7 7
8#define BASE 0 // default layer 8#define BASE 0 // default layer
9#define SHELL_NAV 1 9#define SHELL_LAYER 1
10#define SHELL_NAV 2
10#define KEY_NAV 3 // key navigation layer 11#define KEY_NAV 3 // key navigation layer
11#define KEY_SEL 4 // key selection layer 12#define KEY_SEL 4 // key selection layer
12#define NUMBER 5 // number layer 13#define NUMBER 5 // number layer
@@ -58,12 +59,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
58[BASE] = KEYMAP( // layer 0 : default 59[BASE] = KEYMAP( // layer 0 : default
59 // left hand 60 // left hand
60 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, 61 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
61 LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), 62 LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL),
62 MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, 63 OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I,
63 KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), 64 OSM(MOD_LSFT), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV),
64 OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), 65 OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER),
65 // thumb cluster 66 // thumb cluster
66 MO(BRACKETS), RCTL(KC_S), 67 MO(MOUSE), RCTL(KC_S),
67 RCTL(KC_DEL), 68 RCTL(KC_DEL),
68 KC_BSPC,RCTL(KC_BSPC),KC_DEL, 69 KC_BSPC,RCTL(KC_BSPC),KC_DEL,
69 // right hand 70 // right hand
@@ -80,6 +81,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
80 ), 81 ),
81 82
82 83
84
85// permanent shell layer - meant to be used while in a terminal. only the top keys are overriden
86[SHELL_LAYER] = KEYMAP(
87 // left hand
88 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT),RCTL(KC_R),RCTL(KC_C),
89 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
90 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
91 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
92 // bottom row
93 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
94 // thumb cluster
95 KC_TRNS,KC_TRNS,
96 KC_TRNS,
97 KC_TRNS,KC_TRNS,KC_TRNS,
98 // right hand
99 RCTL(KC_W), LALT(KC_B),LALT(KC_F), KC_LEFT, KC_RIGHT, LALT(KC_D), KC_TRNS,
100 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
101 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
102 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
103 // bottom row
104 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
105 // thumb cluster
106 KC_TRNS, KC_TRNS,
107 KC_TRNS,
108 KC_TRNS, KC_TRNS, KC_TRNS
109),
110
83// shell navigation layer 111// shell navigation layer
84[SHELL_NAV] = KEYMAP( 112[SHELL_NAV] = KEYMAP(
85 // left hand 113 // left hand
@@ -209,12 +237,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
209 237
210[BRACKETS] = KEYMAP( 238[BRACKETS] = KEYMAP(
211 // left hand 239 // left hand
212 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 240 KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,
213 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 241 KC_TRNS,KC_TRNS,M(OPEN_CLOSE_CURLY), M(OPEN_CLOSE_PAREN),M(OPEN_CLOSE_BRACKET), KC_TRNS,KC_TRNS,
214 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 242 KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_TRNS,
215 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 243 KC_TRNS,KC_TRNS,KC_TRNS, KC_LCBR, KC_RCBR, KC_TRNS,KC_TRNS,
216 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 244 KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,
217 KC_TRNS,KC_TRNS, 245 KC_TRNS,KC_TRNS,
218 KC_TRNS, 246 KC_TRNS,
219 KC_TRNS,KC_TRNS,KC_TRNS, 247 KC_TRNS,KC_TRNS,KC_TRNS,
220 // right hand 248 // right hand
@@ -246,7 +274,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
246 MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X), 274 MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X),
247 MEH(KC_6), MEH(KC_7), 275 MEH(KC_6), MEH(KC_7),
248 MEH(KC_8), 276 MEH(KC_8),
249 MEH(KC_9), MEH(KC_Y), MEH(KC_Z) 277 MEH(KC_9), TO(BASE), TO(SHELL_LAYER)
250), 278),
251 279
252 280
@@ -406,6 +434,8 @@ void matrix_scan_user(void) {
406 switch (layer) { 434 switch (layer) {
407 case NUMBER: 435 case NUMBER:
408 case SYMBOL: 436 case SYMBOL:
437 case BRACKETS:
438 //case SHELL_LAYER:
409 ergodox_right_led_2_on(); 439 ergodox_right_led_2_on();
410 break; 440 break;
411 case KEY_NAV: 441 case KEY_NAV:
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/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/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/swissgerman/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json
new file mode 100644
index 000000000..6958952b4
--- /dev/null
+++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json
@@ -0,0 +1,419 @@
1[
2 {
3 "backcolor": "#ffffff",
4 "name": "Ergodox Swiss German Layout - Base Layer",
5 "author": "Andreas Schmidt (https://github.com/remigius42)"
6 },
7 [
8 {
9 "x": 3.5
10 },
11 "#\n3",
12 {
13 "x": 10.5
14 },
15 "*\n8"
16 ],
17 [
18 {
19 "y": -0.875,
20 "x": 2.5
21 },
22 "@\n2",
23 {
24 "x": 1
25 },
26 "$\n4",
27 {
28 "x": 8.5
29 },
30 "&\n7",
31 {
32 "x": 1
33 },
34 "(\n9"
35 ],
36 [
37 {
38 "y": -0.875,
39 "x": 5.5
40 },
41 "%\n5",
42 {
43 "a": 7
44 },
45 "<i class='fa fa-arrow-left'></i>",
46 {
47 "x": 4.5
48 },
49 "<i class='fa fa-arrow-right'></i>",
50 {
51 "a": 4
52 },
53 "^\n6"
54 ],
55 [
56 {
57 "y": -0.875,
58 "w": 1.5
59 },
60 "°\n§",
61 "!\n1",
62 {
63 "x": 14.5
64 },
65 ")\n0",
66 {
67 "w": 1.5
68 },
69 "?\n'\n\n'"
70 ],
71 [
72 {
73 "y": -0.375,
74 "x": 3.5
75 },
76 "E",
77 {
78 "x": 10.5
79 },
80 "I"
81 ],
82 [
83 {
84 "y": -0.875,
85 "x": 2.5
86 },
87 "W",
88 {
89 "x": 1
90 },
91 "R",
92 {
93 "x": 8.5
94 },
95 "U",
96 {
97 "x": 1
98 },
99 "O"
100 ],
101 [
102 {
103 "y": -0.875,
104 "x": 5.5
105 },
106 "T",
107 {
108 "c": "#b56b6b",
109 "a": 6,
110 "h": 1.5
111 },
112 "Toggle Code Layer",
113 {
114 "x": 4.5,
115 "h": 1.5
116 },
117 "Toggle Code Layer",
118 {
119 "c": "#cccccc",
120 "a": 4
121 },
122 "Y"
123 ],
124 [
125 {
126 "y": -0.875,
127 "a": 6,
128 "w": 1.5
129 },
130 "Delete",
131 {
132 "a": 4
133 },
134 "Q",
135 {
136 "x": 14.5
137 },
138 "P",
139 {
140 "w": 1.5
141 },
142 "è\nü\n\n["
143 ],
144 [
145 {
146 "y": -0.375,
147 "x": 3.5
148 },
149 "D",
150 {
151 "x": 10.5
152 },
153 "K"
154 ],
155 [
156 {
157 "y": -0.875,
158 "x": 2.5
159 },
160 "S",
161 {
162 "x": 1
163 },
164 "F",
165 {
166 "x": 8.5
167 },
168 "J",
169 {
170 "x": 1
171 },
172 "L"
173 ],
174 [
175 {
176 "y": -0.875,
177 "x": 5.5
178 },
179 "G",
180 {
181 "x": 6.5
182 },
183 "H"
184 ],
185 [
186 {
187 "y": -0.875,
188 "a": 6,
189 "w": 1.5
190 },
191 "Backspace",
192 {
193 "c": "#79c777",
194 "a": 4
195 },
196 "A\n\nLyr3",
197 {
198 "x": 14.5
199 },
200 "é\nö\nLyr3",
201 {
202 "c": "#748adb",
203 "w": 1.5
204 },
205 "à\nä\nCmd\n{"
206 ],
207 [
208 {
209 "y": -0.625,
210 "x": 6.5,
211 "c": "#cccccc",
212 "a": 6,
213 "h": 1.5
214 },
215 "Hyper",
216 {
217 "x": 4.5,
218 "h": 1.5
219 },
220 "Meh"
221 ],
222 [
223 {
224 "y": -0.75,
225 "x": 3.5,
226 "a": 4
227 },
228 "C",
229 {
230 "x": 10.5
231 },
232 ";\n,"
233 ],
234 [
235 {
236 "y": -0.875,
237 "x": 2.5,
238 "c": "#748adb"
239 },
240 "X\n\nAlt",
241 {
242 "x": 1,
243 "c": "#cccccc"
244 },
245 "V",
246 {
247 "x": 8.5
248 },
249 "M",
250 {
251 "x": 1,
252 "c": "#748adb"
253 },
254 ":\n.\nAlt"
255 ],
256 [
257 {
258 "y": -0.875,
259 "x": 5.5,
260 "c": "#cccccc"
261 },
262 "B",
263 {
264 "x": 6.5
265 },
266 "N"
267 ],
268 [
269 {
270 "y": -0.875,
271 "a": 6,
272 "w": 1.5
273 },
274 "Shift",
275 {
276 "c": "#748adb",
277 "a": 4
278 },
279 "Z\n\nCtrl",
280 {
281 "x": 14.5
282 },
283 "_\n-\nCtrl",
284 {
285 "c": "#cccccc",
286 "a": 6,
287 "w": 1.5
288 },
289 "Shift"
290 ],
291 [
292 {
293 "y": -0.375,
294 "x": 3.5,
295 "a": 7
296 },
297 "<i class='fa fa-arrow-left'></i>",
298 {
299 "x": 10.5
300 },
301 "<i class='fa fa-arrow-down'></i>"
302 ],
303 [
304 {
305 "y": -0.875,
306 "x": 2.5,
307 "a": 4
308 },
309 "£\n$\n\n}",
310 {
311 "x": 1,
312 "a": 7
313 },
314 "<i class='fa fa-arrow-right'></i>",
315 {
316 "x": 10.5,
317 "a": 6
318 },
319 "AltGr"
320 ],
321 [
322 {
323 "y": -0.9950000000000001,
324 "x": 14,
325 "a": 7
326 },
327 "<i class='fa fa-arrow-up'></i>"
328 ],
329 [
330 {
331 "y": -0.7549999999999999,
332 "x": 0.5,
333 "c": "#b56b6b",
334 "a": 4
335 },
336 ">\n<\nCode Layer\n\\",
337 {
338 "c": "#cccccc"
339 },
340 "`\n^\n\n~",
341 {
342 "x": 14.5
343 },
344 "!\n¨\n\n]",
345 {
346 "c": "#b56b6b"
347 },
348 "\n\nCode Layer"
349 ],
350 [
351 {
352 "r": 30,
353 "rx": 6.5,
354 "ry": 4.25,
355 "y": -1,
356 "x": 1,
357 "c": "#748adb"
358 },
359 "Apps\nAlt",
360 {
361 "c": "#cccccc",
362 "a": 6
363 },
364 "Win / Cmd"
365 ],
366 [
367 {
368 "h": 2
369 },
370 "Space",
371 {
372 "h": 2
373 },
374 "Back Space",
375 "Home"
376 ],
377 [
378 {
379 "x": 2
380 },
381 "End"
382 ],
383 [
384 {
385 "r": -30,
386 "rx": 13,
387 "y": -1,
388 "x": -3
389 },
390 "Alt",
391 {
392 "c": "#748adb",
393 "a": 4
394 },
395 "Esc\nCtrl"
396 ],
397 [
398 {
399 "x": -3,
400 "c": "#cccccc",
401 "a": 6
402 },
403 "Pg Up",
404 {
405 "h": 2
406 },
407 "Tab",
408 {
409 "h": 2
410 },
411 "Enter"
412 ],
413 [
414 {
415 "x": -3
416 },
417 "Pg Dn"
418 ]
419]
diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png
new file mode 100644
index 000000000..aff6af851
--- /dev/null
+++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json
new file mode 100644
index 000000000..38a728514
--- /dev/null
+++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json
@@ -0,0 +1,436 @@
1[
2 {
3 "backcolor": "#ffffff",
4 "name": "Ergodox Swiss German Layout - Symbol & Media Layer",
5 "author": "Andreas Schmidt (https://github.com/remigius42)"
6 },
7 [
8 {
9 "x": 3.5,
10 "t": "#b81c1c"
11 },
12 "F3",
13 {
14 "x": 10.5
15 },
16 "F8"
17 ],
18 [
19 {
20 "y": -0.875,
21 "x": 2.5
22 },
23 "F2",
24 {
25 "x": 1
26 },
27 "F4",
28 {
29 "x": 8.5
30 },
31 "F7",
32 {
33 "x": 1
34 },
35 "F9"
36 ],
37 [
38 {
39 "y": -0.875,
40 "x": 5.5
41 },
42 "F5",
43 {
44 "t": "#000000",
45 "a": 7
46 },
47 "",
48 {
49 "x": 4.5
50 },
51 "",
52 {
53 "t": "#b81c1c",
54 "a": 4
55 },
56 "F6"
57 ],
58 [
59 {
60 "y": -0.875,
61 "t": "#000000\n\n\n#529151",
62 "w": 1.5
63 },
64 "\n\n\nFlash",
65 {
66 "t": "#b81c1c"
67 },
68 "F1",
69 {
70 "x": 14.5
71 },
72 "F10",
73 {
74 "t": "#b81c1c\n\n\n#529151",
75 "w": 1.5
76 },
77 "F11\n\n\nFlash"
78 ],
79 [
80 {
81 "y": -0.375,
82 "x": 3.5
83 },
84 "{\n\n\n<i class='fa fa-arrow-circle-up'></i>",
85 {
86 "x": 10.5,
87 "t": "#b81c1c"
88 },
89 "8"
90 ],
91 [
92 {
93 "y": -0.875,
94 "x": 2.5
95 },
96 "@",
97 {
98 "x": 1
99 },
100 "}",
101 {
102 "x": 8.5,
103 "t": "#b81c1c\n\n\n#529151"
104 },
105 "7\n\n\nHTML ul",
106 {
107 "x": 1
108 },
109 "9\n\n\nHTML ol"
110 ],
111 [
112 {
113 "y": -0.875,
114 "x": 5.5,
115 "t": "#b81c1c"
116 },
117 "|",
118 {
119 "t": "#000000",
120 "a": 7,
121 "h": 1.5
122 },
123 "",
124 {
125 "x": 4.5,
126 "h": 1.5
127 },
128 "",
129 {
130 "t": "#b81c1c",
131 "a": 4
132 },
133 "<i class='fa fa-arrow-up'></i>"
134 ],
135 [
136 {
137 "y": -0.875,
138 "t": "#000000",
139 "a": 7,
140 "w": 1.5
141 },
142 "",
143 {
144 "t": "#b81c1c",
145 "a": 4
146 },
147 "!",
148 {
149 "x": 14.5
150 },
151 "*",
152 {
153 "w": 1.5
154 },
155 "F12"
156 ],
157 [
158 {
159 "y": -0.375,
160 "x": 3.5,
161 "t": "#b81c1c\n\n\n#529151"
162 },
163 "(\n\n\n<i class='fa fa-arrow-circle-down'></i>",
164 {
165 "x": 10.5
166 },
167 "5\n\n\nHTML li"
168 ],
169 [
170 {
171 "y": -0.875,
172 "x": 2.5
173 },
174 "$\n\n\n<i class='fa fa-arrow-circle-left'></i>",
175 {
176 "x": 1
177 },
178 ")\n\n\n<i class='fa fa-arrow-circle-right'></i>",
179 {
180 "x": 8.5,
181 "t": "#b81c1c"
182 },
183 "4",
184 {
185 "x": 1
186 },
187 "6"
188 ],
189 [
190 {
191 "y": -0.875,
192 "x": 5.5
193 },
194 "`",
195 {
196 "x": 6.5
197 },
198 "<i class='fa fa-arrow-down'></i>"
199 ],
200 [
201 {
202 "y": -0.875,
203 "t": "#000000",
204 "a": 7,
205 "w": 1.5
206 },
207 "",
208 {
209 "t": "#b81c1c",
210 "a": 4
211 },
212 "#",
213 {
214 "x": 14.5
215 },
216 "+",
217 {
218 "t": "#000000\n\n\n#529151",
219 "w": 1.5
220 },
221 "\n\n\n<i class='fa fa-play'></i><i class='fa fa-pause'></i>"
222 ],
223 [
224 {
225 "y": -0.625,
226 "x": 6.5,
227 "t": "#000000",
228 "a": 7,
229 "h": 1.5
230 },
231 "",
232 {
233 "x": 4.5,
234 "h": 1.5
235 },
236 ""
237 ],
238 [
239 {
240 "y": -0.75,
241 "x": 3.5,
242 "t": "#b81c1c\n\n\n#529151",
243 "a": 4
244 },
245 "[\n\n\nHTML code",
246 {
247 "x": 10.5
248 },
249 "2\n\n\n<i class='fa fa-fast-backward'></i>"
250 ],
251 [
252 {
253 "y": -0.875,
254 "x": 2.5,
255 "t": "#b81c1c"
256 },
257 "^",
258 {
259 "x": 1,
260 "t": "#b81c1c\n\n\n#529151"
261 },
262 "]\n\n\nHTML br",
263 {
264 "x": 8.5,
265 "t": "#b81c1c"
266 },
267 "1",
268 {
269 "x": 1,
270 "t": "#b81c1c\n\n\n#529151"
271 },
272 "3\n\n\n<i class='fa fa-fast-forward'></i>"
273 ],
274 [
275 {
276 "y": -0.875,
277 "x": 5.5,
278 "t": "#b81c1c"
279 },
280 "~",
281 {
282 "x": 6.5
283 },
284 "&"
285 ],
286 [
287 {
288 "y": -0.875,
289 "t": "#000000",
290 "a": 7,
291 "w": 1.5
292 },
293 "",
294 {
295 "t": "#b81c1c",
296 "a": 4
297 },
298 "%",
299 {
300 "x": 14.5
301 },
302 "\\",
303 {
304 "t": "#000000",
305 "a": 7,
306 "w": 1.5
307 },
308 ""
309 ],
310 [
311 {
312 "y": -0.375,
313 "x": 3.5,
314 "t": "#000000\n\n\n#529151",
315 "a": 4
316 },
317 "\n\n\nleft click",
318 {
319 "x": 10.5,
320 "t": "#b81c1c\n\n\n#529151"
321 },
322 ".\n\n\n<i class='fa fa-volume-down'></i>"
323 ],
324 [
325 {
326 "y": -0.875,
327 "x": 2.5,
328 "t": "#000000",
329 "a": 7
330 },
331 "",
332 {
333 "x": 1,
334 "t": "#000000\n\n\n#529151",
335 "a": 4
336 },
337 "\n\n\nright click",
338 {
339 "x": 8.5,
340 "t": "#b81c1c\n\n\n#529151"
341 },
342 "?\n\n\n<i class='fa fa-volume-up'></i>",
343 {
344 "x": 1,
345 "t": "#b81c1c"
346 },
347 "0"
348 ],
349 [
350 {
351 "y": -0.75,
352 "x": 0.5,
353 "t": "#000000",
354 "a": 7
355 },
356 "",
357 {
358 "t": "#b81c1c",
359 "a": 4
360 },
361 "EPRM RST",
362 {
363 "x": 14.5,
364 "t": "#000000",
365 "a": 7
366 },
367 "",
368 ""
369 ],
370 [
371 {
372 "r": 30,
373 "rx": 6.5,
374 "ry": 4.25,
375 "y": -1,
376 "x": 1
377 },
378 "",
379 ""
380 ],
381 [
382 {
383 "t": "#000000\n\n\n#529151",
384 "a": 4,
385 "h": 2
386 },
387 "\n\n\nEnter",
388 {
389 "t": "#000000",
390 "a": 7,
391 "h": 2
392 },
393 "",
394 ""
395 ],
396 [
397 {
398 "x": 2
399 },
400 ""
401 ],
402 [
403 {
404 "r": -30,
405 "rx": 13,
406 "y": -1,
407 "x": -3
408 },
409 "",
410 ""
411 ],
412 [
413 {
414 "x": -3
415 },
416 "",
417 {
418 "h": 2
419 },
420 "",
421 {
422 "t": "#000000\n\n\n#529151",
423 "a": 4,
424 "h": 2
425 },
426 "\n\n\nWeb back"
427 ],
428 [
429 {
430 "x": -3,
431 "t": "#000000",
432 "a": 7
433 },
434 ""
435 ]
436]
diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png
new file mode 100644
index 000000000..54c4a7587
--- /dev/null
+++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c
new file mode 100644
index 000000000..2291fb651
--- /dev/null
+++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c
@@ -0,0 +1,287 @@
1#include "ergodox.h"
2#include "debug.h"
3#include "action_layer.h"
4#include "version.h"
5#include "string.h"
6
7#ifdef SUBPROJECT_infinity
8#include "visualizer/lcd_backlight.h"
9#endif
10
11
12#define BASE 0 // default layer
13#define SYMB 1 // symbols
14#define MDIA 2 // media keys
15
16#define EPRM M(1) // Macro 1: Reset EEPROM
17#define HTML_LI M(10)
18#define HTML_UL M(11)
19#define HTML_OL M(12)
20#define HTML_CODE M(13)
21#define HTML_BR M(14)
22
23#define SEND_TAG(TAG) do {\
24 send_key(KC_NONUS_BSLASH); \
25 SEND_STRING(TAG); \
26 send_larger_than(); \
27 send_key(KC_NONUS_BSLASH); \
28 SEND_STRING("&"); \
29 SEND_STRING(TAG); \
30 send_larger_than(); \
31 go_back_based_on_tag(TAG); \
32 } while (0)
33
34#define SEND_SHORT_TAG(TAG) do {\
35 send_key(KC_NONUS_BSLASH); \
36 SEND_STRING(TAG); \
37 SEND_STRING("&"); \
38 send_larger_than(); \
39 } while (0)
40
41void send_key(uint16_t keycode);
42void go_back_based_on_tag(char* tag);
43void send_larger_than(void);
44
45
46const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
47/* Keymap 0: Basic layer
48 *
49 * ,--------------------------------------------------. ,--------------------------------------------------.
50 * | § | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | ' |
51 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
52 * | Del | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | ü |
53 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
54 * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L |ö / L2|ä / Cmd |
55 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
56 * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift |
57 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
58 * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | ¨ | ~L1 |
59 * `----------------------------------' `----------------------------------'
60 * ,-------------. ,-------------.
61 * | App | LGui | | Alt |Ctrl/Esc|
62 * ,------|------|------| |------+--------+------.
63 * | | | Home | | PgUp | | |
64 * | Space|Backsp|------| |------| Tab |Enter |
65 * | |ace | End | | PgDn | | |
66 * `--------------------' `----------------------'
67 */
68// If it accepts an argument (i.e, is a function), it doesn't need KC_.
69// Otherwise, it needs KC_*
70[BASE] = KEYMAP( // layer 0 : default
71 // left hand
72 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
73 KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
74 KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G,
75 KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO),
76 LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, KC_LEFT,KC_RGHT,
77 ALT_T(KC_APP), KC_LGUI,
78 KC_HOME,
79 KC_SPC,KC_BSPC,KC_END,
80 // right hand
81 KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
82 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
83 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
84 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT,
85 KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1,
86 KC_LALT,CTL_T(KC_ESC),
87 KC_PGUP,
88 KC_PGDN,KC_TAB, KC_ENT
89 ),
90/* Keymap 1: Symbol Layer
91 *
92 * ,--------------------------------------------------. ,--------------------------------------------------.
93 * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
94 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
95 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
96 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
97 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
98 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
99 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
100 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
101 * | | EPRM | | | | | ? | . | 0 | = | |
102 * `----------------------------------' `----------------------------------'
103 * ,-------------. ,-------------.
104 * | | | | | |
105 * ,------|------|------| |------+------+------.
106 * | | | | | | | |
107 * | | |------| |------| | |
108 * | | | | | | | |
109 * `--------------------' `--------------------'
110 */
111// SYMBOLS
112[SYMB] = KEYMAP(
113 // left hand
114 M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
115 KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS,
116 KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL),
117 KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS,
118 KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/,
119 KC_TRNS,KC_TRNS,
120 KC_TRNS,
121 KC_TRNS,KC_TRNS,KC_TRNS,
122 // right hand
123 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
124 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12,
125 KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS,
126 KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS,
127 ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS,
128 KC_TRNS, KC_TRNS,
129 KC_TRNS,
130 KC_TRNS, KC_TRNS, KC_TRNS
131),
132/* Keymap 2: Media and mouse keys
133 *
134 * ,--------------------------------------------------. ,--------------------------------------------------.
135 * | RESET | | | | | | | | | | | | | | RESET |
136 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
137 * | | | | MsUp | | | | | | |H_UL | |H_OL | | |
138 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
139 * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play |
140 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
141 * | | |H_CODE| |H_BR | | | | | | | Prev | Next | | |
142 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
143 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
144 * `----------------------------------' `----------------------------------'
145 * ,-------------. ,-------------.
146 * | | | | | |
147 * ,------|------|------| |------+------+------.
148 * |Enter | | | | | |Brwser|
149 * | | |------| |------| |Back |
150 * | | | | | | | |
151 * `--------------------' `--------------------'
152 */
153// MEDIA AND MOUSE
154[MDIA] = KEYMAP(
155 RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
156 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
157 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
158 KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, HTML_BR, KC_TRNS,
159 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
160 KC_TRNS, KC_TRNS,
161 KC_TRNS,
162 KC_ENT, KC_TRNS, KC_TRNS,
163 // right hand
164 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
165 KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS,
166 KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, KC_TRNS, KC_MPLY,
167 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
168 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
169 KC_TRNS, KC_TRNS,
170 KC_TRNS,
171 KC_TRNS, KC_TRNS, KC_WBAK
172),
173};
174
175const uint16_t PROGMEM fn_actions[] = {
176 [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
177};
178
179const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
180{
181 // MACRODOWN only works in this function
182 switch(id) {
183 case 0:
184 if (record->event.pressed) {
185 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
186 }
187 break;
188 case 1:
189 if (record->event.pressed) { // For resetting EEPROM
190 eeconfig_init();
191 }
192 break;
193 case 10:
194 if (record->event.pressed) {
195 SEND_TAG("li");
196 }
197 break;
198 case 11:
199 if (record->event.pressed) {
200 SEND_TAG("ul");
201 }
202 break;
203 case 12:
204 if (record->event.pressed) {
205 SEND_TAG("ol");
206 }
207 break;
208 case 13:
209 if (record->event.pressed) {
210 SEND_TAG("code");
211 }
212 break;
213 case 14:
214 if (record->event.pressed) {
215 SEND_SHORT_TAG("br");
216 }
217 }
218 return MACRO_NONE;
219};
220
221// Runs just one time when the keyboard initializes.
222void matrix_init_user(void) {
223
224};
225
226// Runs constantly in the background, in a loop.
227void matrix_scan_user(void) {
228
229 uint8_t layer = biton32(layer_state);
230
231 switch (layer) {
232 // TODO: Make this relevant to the ErgoDox EZ.
233 case 0:
234 ergodox_board_led_off();
235 ergodox_right_led_1_off();
236 ergodox_right_led_2_off();
237 ergodox_right_led_3_off();
238
239 #ifdef SUBPROJECT_infinity
240 lcd_backlight_hal_color(0, 0, 0);
241 #endif
242 break;
243 case 1:
244 ergodox_right_led_1_on();
245
246 ergodox_board_led_off();
247 ergodox_right_led_2_off();
248 ergodox_right_led_3_off();
249 #ifdef SUBPROJECT_infinity
250 lcd_backlight_hal_color(5000, 0, 0);
251 #endif
252 break;
253 case 2:
254 ergodox_right_led_2_on();
255
256 ergodox_board_led_off();
257 ergodox_right_led_1_off();
258 ergodox_right_led_3_off();
259 #ifdef SUBPROJECT_infinity
260 lcd_backlight_hal_color(0, 5000, 0);
261 #endif
262 break;
263 default:
264 // none
265 break;
266 }
267
268};
269
270void send_key(uint16_t keycode) {
271 register_code(keycode);
272 unregister_code(keycode);
273}
274
275void go_back_based_on_tag(char* tag) {
276 const int BRACKETS_AND_SLASH_LENGTH = 3;
277
278 for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) {
279 send_key(KC_LEFT);
280 }
281}
282
283void send_larger_than() {
284 register_code(KC_LSFT);
285 send_key(KC_NONUS_BSLASH);
286 unregister_code(KC_LSFT);
287}
diff --git a/keyboards/ergodox/keymaps/swissgerman/readme.md b/keyboards/ergodox/keymaps/swissgerman/readme.md
new file mode 100644
index 000000000..b1061c1dd
--- /dev/null
+++ b/keyboards/ergodox/keymaps/swissgerman/readme.md
@@ -0,0 +1,15 @@
1# ErgoDox Swiss German Configuration
2
3Swiss German keyboard layout based on the Ergodox EZ default layout.
4
5Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com).
6
7Diagram sources: [default layer](keyboard-layout.json), [layer 1 & 2](keyboard-layout_1_2.json)
8
9![Layout Layer 0](keyboard-layout.png)
10![Layout Layer 1&2](keyboard-layout_1_2.png)
11
12## Changelog
13* Jan 21, 2017:
14 * Initial version based on default layout.
15
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/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/lets_split/config.h b/keyboards/lets_split/config.h
index 4db45ab0b..7df0c5752 100644
--- a/keyboards/lets_split/config.h
+++ b/keyboards/lets_split/config.h
@@ -20,49 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20 20
21#include "config_common.h" 21#include "config_common.h"
22 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
29#define DESCRIPTION A split keyboard for the cheap makers
30
31/* COL2ROW or ROW2COL */
32#define DIODE_DIRECTION COL2ROW
33
34/* define if matrix has ghost */
35//#define MATRIX_HAS_GHOST
36
37/* number of backlight levels */
38// #define BACKLIGHT_LEVELS 3
39
40/* Set 0 if debouncing isn't needed */
41#define DEBOUNCING_DELAY 5
42
43/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
44#define LOCKING_SUPPORT_ENABLE
45/* Locking resynchronize hack */
46#define LOCKING_RESYNC_ENABLE
47
48/* key combination for command */
49#define IS_COMMAND() ( \
50 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
51)
52
53/* disable debug print */
54//#define NO_DEBUG
55
56/* disable print */
57//#define NO_PRINT
58
59/* disable action features */
60//#define NO_ACTION_LAYER
61//#define NO_ACTION_TAPPING
62//#define NO_ACTION_ONESHOT
63//#define NO_ACTION_MACRO
64//#define NO_ACTION_FUNCTION
65
66#ifdef SUBPROJECT_rev1 23#ifdef SUBPROJECT_rev1
67 #include "rev1/config.h" 24 #include "rev1/config.h"
68#endif 25#endif
diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c
deleted file mode 100644
index 6f1f71f5f..000000000
--- a/keyboards/lets_split/keymaps/default/keymap.c
+++ /dev/null
@@ -1,188 +0,0 @@
1#include "lets_split.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
18enum custom_keycodes {
19 QWERTY = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE,
24 ADJUST,
25};
26
27// Fillers to make layering more clear
28#define _______ KC_TRNS
29#define XXXXXXX KC_NO
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33/* Qwerty
34 * ,-----------------------------------------------------------------------------------.
35 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
36 * |------+------+------+------+------+-------------+------+------+------+------+------|
37 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
38 * |------+------+------+------+------+------|------+------+------+------+------+------|
39 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
40 * |------+------+------+------+------+------+------+------+------+------+------+------|
41 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
42 * `-----------------------------------------------------------------------------------'
43 */
44[_QWERTY] = KEYMAP( \
45 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
46 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
47 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
48 KC_LCTL, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, MT(MOD_LSFT, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
49),
50
51/* Colemak
52 * ,-----------------------------------------------------------------------------------.
53 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
54 * |------+------+------+------+------+-------------+------+------+------+------+------|
55 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
56 * |------+------+------+------+------+------|------+------+------+------+------+------|
57 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
58 * |------+------+------+------+------+------+------+------+------+------+------+------|
59 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
60 * `-----------------------------------------------------------------------------------'
61 */
62[_COLEMAK] = KEYMAP( \
63 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
64 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
65 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
66 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
67),
68
69/* Dvorak
70 * ,-----------------------------------------------------------------------------------.
71 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
72 * |------+------+------+------+------+-------------+------+------+------+------+------|
73 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
74 * |------+------+------+------+------+------|------+------+------+------+------+------|
75 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
76 * |------+------+------+------+------+------+------+------+------+------+------+------|
77 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
78 * `-----------------------------------------------------------------------------------'
79 */
80[_DVORAK] = KEYMAP( \
81 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
82 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
83 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
84 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
85),
86[3] = KEYMAP( \
87 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
88 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
89 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
90 _______, _______, _______, _______, _______, KC_BSPC, MT(MOD_LSFT, KC_BSPC), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
91),
92[4] = KEYMAP( \
93 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
94 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
95 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
96 _______, _______, _______, _______, _______, KC_ENT, MT(MOD_LSFT, KC_ENT), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
97),
98
99/* Adjust (Lower + Raise)
100 * ,-----------------------------------------------------------------------------------.
101 * | | Reset| | | | | | | | | | Del |
102 * |------+------+------+------+------+-------------+------+------+------+------+------|
103 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
104 * |------+------+------+------+------+------|------+------+------+------+------+------|
105 * | | | | | | | | | | | | |
106 * |------+------+------+------+------+------+------+------+------+------+------+------|
107 * | | | | | | | | | | | |
108 * `-----------------------------------------------------------------------------------'
109 */
110[_ADJUST] = KEYMAP( \
111 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
112 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
113 _______, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, _______, _______, _______, \
114 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
115)
116};
117
118#ifdef AUDIO_ENABLE
119float tone_qwerty[][2] = SONG(QWERTY_SOUND);
120float tone_dvorak[][2] = SONG(DVORAK_SOUND);
121float tone_colemak[][2] = SONG(COLEMAK_SOUND);
122#endif
123
124void persistant_default_layer_set(uint16_t default_layer) {
125 eeconfig_update_default_layer(default_layer);
126 default_layer_set(default_layer);
127}
128
129bool process_record_user(uint16_t keycode, keyrecord_t *record) {
130 switch (keycode) {
131 case QWERTY:
132 if (record->event.pressed) {
133 #ifdef AUDIO_ENABLE
134 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
135 #endif
136 persistant_default_layer_set(1UL<<_QWERTY);
137 }
138 return false;
139 break;
140 case COLEMAK:
141 if (record->event.pressed) {
142 #ifdef AUDIO_ENABLE
143 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
144 #endif
145 persistant_default_layer_set(1UL<<_COLEMAK);
146 }
147 return false;
148 break;
149 case DVORAK:
150 if (record->event.pressed) {
151 #ifdef AUDIO_ENABLE
152 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
153 #endif
154 persistant_default_layer_set(1UL<<_DVORAK);
155 }
156 return false;
157 break;
158 case LOWER:
159 if (record->event.pressed) {
160 layer_on(_LOWER);
161 update_tri_layer(_LOWER, _RAISE, _ADJUST);
162 } else {
163 layer_off(_LOWER);
164 update_tri_layer(_LOWER, _RAISE, _ADJUST);
165 }
166 return false;
167 break;
168 case RAISE:
169 if (record->event.pressed) {
170 layer_on(_RAISE);
171 update_tri_layer(_LOWER, _RAISE, _ADJUST);
172 } else {
173 layer_off(_RAISE);
174 update_tri_layer(_LOWER, _RAISE, _ADJUST);
175 }
176 return false;
177 break;
178 case ADJUST:
179 if (record->event.pressed) {
180 layer_on(_ADJUST);
181 } else {
182 layer_off(_ADJUST);
183 }
184 return false;
185 break;
186 }
187 return true;
188} \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h
index 72e5ae66b..efe8bb0f2 100644
--- a/keyboards/lets_split/keymaps/i2c/config.h
+++ b/keyboards/lets_split/keymaps/i2c/config.h
@@ -14,89 +14,14 @@ 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
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
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 { B5, B4, E6, D7 }
38#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
39
40#define CATERINA_BOOTLOADER
41
42#define USE_I2C 17#define USE_I2C
43 18
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48
49// #define EE_HANDS
50
51#define I2C_MASTER_LEFT 19#define I2C_MASTER_LEFT
52// #define I2C_MASTER_RIGHT 20// #define I2C_MASTER_RIGHT
53 21
54/* COL2ROW or ROW2COL */ 22#ifdef SUBPROJECT_rev1
55#define DIODE_DIRECTION COL2ROW 23 #include "../../rev1/config.h"
56
57/* define if matrix has ghost */
58//#define MATRIX_HAS_GHOST
59
60/* number of backlight levels */
61// #define BACKLIGHT_LEVELS 3
62
63/* Set 0 if debouncing isn't needed */
64#define DEBOUNCING_DELAY 5
65
66/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
67#define LOCKING_SUPPORT_ENABLE
68/* Locking resynchronize hack */
69#define LOCKING_RESYNC_ENABLE
70
71/* key combination for command */
72#define IS_COMMAND() ( \
73 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
74)
75
76/* ws2812 RGB LED */
77#define RGB_DI_PIN D4
78#define RGBLIGHT_ANIMATIONS
79#define RGBLED_NUM 8 // Number of LEDs
80#define RGBLIGHT_HUE_STEP 10
81#define RGBLIGHT_SAT_STEP 17
82#define RGBLIGHT_VAL_STEP 17
83
84/*
85 * Feature disable options
86 * These options are also useful to firmware size reduction.
87 */
88
89/* disable debug print */
90// #define NO_DEBUG
91
92/* disable print */
93// #define NO_PRINT
94
95/* disable action features */
96//#define NO_ACTION_LAYER
97//#define NO_ACTION_TAPPING
98//#define NO_ACTION_ONESHOT
99//#define NO_ACTION_MACRO
100//#define NO_ACTION_FUNCTION
101
102#endif 24#endif
25#ifdef SUBPROJECT_rev2
26 #include "../../rev2/config.h"
27#endif \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h
index b0ad522fc..cd766cc4f 100644
--- a/keyboards/lets_split/keymaps/serial/config.h
+++ b/keyboards/lets_split/keymaps/serial/config.h
@@ -15,88 +15,15 @@ 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 17
18#ifndef CONFIG_H
19#define CONFIG_H
20 18
21#include "config_common.h" 19#define USE_SERIAL
22 20
23/* USB Device descriptor parameter */ 21#define EE_HANDS
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x3060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Wootpatoot
28#define PRODUCT Lets Split
29#define DESCRIPTION A split keyboard for the cheap makers
30 22
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 { B5, B4, E6, D7 }
38#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
39
40#define CATERINA_BOOTLOADER
41
42// #define USE_I2C
43
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48
49// #define EE_HANDS
50
51#define I2C_MASTER_LEFT
52// #define I2C_MASTER_RIGHT
53
54/* COL2ROW or ROW2COL */
55#define DIODE_DIRECTION COL2ROW
56
57/* define if matrix has ghost */
58//#define MATRIX_HAS_GHOST
59
60/* number of backlight levels */
61// #define BACKLIGHT_LEVELS 3
62
63/* Set 0 if debouncing isn't needed */
64#define DEBOUNCING_DELAY 5
65
66/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
67#define LOCKING_SUPPORT_ENABLE
68/* Locking resynchronize hack */
69#define LOCKING_RESYNC_ENABLE
70
71/* key combination for command */
72#define IS_COMMAND() ( \
73 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
74)
75
76/* ws2812 RGB LED */
77#define RGB_DI_PIN D4
78#define RGBLIGHT_ANIMATIONS
79#define RGBLED_NUM 8 // Number of LEDs
80#define RGBLIGHT_HUE_STEP 10
81#define RGBLIGHT_SAT_STEP 17
82#define RGBLIGHT_VAL_STEP 17
83
84/*
85 * Feature disable options
86 * These options are also useful to firmware size reduction.
87 */
88
89/* disable debug print */
90// #define NO_DEBUG
91
92/* disable print */
93// #define NO_PRINT
94
95/* disable action features */
96//#define NO_ACTION_LAYER
97//#define NO_ACTION_TAPPING
98//#define NO_ACTION_ONESHOT
99//#define NO_ACTION_MACRO
100//#define NO_ACTION_FUNCTION
101 23
24#ifdef SUBPROJECT_rev1
25 #include "../../rev1/config.h"
102#endif 26#endif
27#ifdef SUBPROJECT_rev2
28 #include "../../rev2/config.h"
29#endif \ No newline at end of file
diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h
index 825e5ec24..2f5bde953 100644
--- a/keyboards/lets_split/rev1/config.h
+++ b/keyboards/lets_split/rev1/config.h
@@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
25#define PRODUCT_ID 0x3060 25#define PRODUCT_ID 0x3060
26#define DEVICE_VER 0x0001 26#define DEVICE_VER 0x0001
27#define MANUFACTURER Wootpatoot 27#define MANUFACTURER Wootpatoot
28#define PRODUCT Lets Split
29#define PRODUCT Lets Split v1 28#define PRODUCT Lets Split v1
30#define DESCRIPTION A split keyboard for the cheap makers 29#define DESCRIPTION A split keyboard for the cheap makers
31 30
@@ -37,19 +36,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
37// wiring of each half 36// wiring of each half
38#define MATRIX_ROW_PINS { B5, B4, E6, D7 } 37#define MATRIX_ROW_PINS { B5, B4, E6, D7 }
39#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } 38#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
39// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
40 40
41#define CATERINA_BOOTLOADER
42
43// #define USE_I2C
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48 41
49// #define EE_HANDS 42#define CATERINA_BOOTLOADER
50
51#define I2C_MASTER_LEFT
52// #define I2C_MASTER_RIGHT
53 43
54/* COL2ROW or ROW2COL */ 44/* COL2ROW or ROW2COL */
55#define DIODE_DIRECTION COL2ROW 45#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h
index e9689d773..b34d7c004 100644
--- a/keyboards/lets_split/rev2/config.h
+++ b/keyboards/lets_split/rev2/config.h
@@ -36,21 +36,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
36// wiring of each half 36// wiring of each half
37#define MATRIX_ROW_PINS { D7, E6, B4, B5 } 37#define MATRIX_ROW_PINS { D7, E6, B4, B5 }
38#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } 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
39 40
40#define CATERINA_BOOTLOADER 41#define CATERINA_BOOTLOADER
41 42
42// #define USE_I2C
43
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48
49// #define EE_HANDS
50
51#define I2C_MASTER_LEFT
52// #define I2C_MASTER_RIGHT
53
54/* COL2ROW or ROW2COL */ 43/* COL2ROW or ROW2COL */
55#define DIODE_DIRECTION COL2ROW 44#define DIODE_DIRECTION COL2ROW
56 45
diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h
index 990976de2..7c397912f 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, k45, k44, k43, k42, k41, k40, \ 12 k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
13 k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ 13 k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \
14 k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ 14 k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
15 k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ 15 k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \
16 ) \ 16 ) \
17 { \ 17 { \
18 { k00, k01, k02, k03, k04, k05 }, \ 18 { k00, k01, k02, k03, k04, k05 }, \
diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c
index 4d0151710..a1254d975 100644
--- a/keyboards/planck/keymaps/callum/keymap.c
+++ b/keyboards/planck/keymaps/callum/keymap.c
@@ -7,22 +7,21 @@
7 7
8extern keymap_config_t keymap_config; 8extern keymap_config_t keymap_config;
9 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 _BASE 0 10#define _BASE 0
15#define _MOVE 1 11#define _MOVE 1
16#define _SYMB 2 12#define _SYMB 2
17#define _MOUSE 3 13#define _MOUSE 3
18#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)
18#define POUND LALT(KC_3)
19
19 20
20enum planck_keycodes { 21enum planck_keycodes {
21 MOVE = SAFE_RANGE, 22 MOVE = SAFE_RANGE,
22 SYMB, 23 SYMB,
23 FUNC, 24 FUNC
24 BELOW,
25 ABOVE
26}; 25};
27 26
28// Fillers to make layering more clear 27// Fillers to make layering more clear
@@ -55,16 +54,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
55 * |------+------+------+------+------+------+------+------+------+------+------+------| 54 * |------+------+------+------+------+------+------+------+------+------+------+------|
56 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | 55 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del |
57 * |------+------+------+------+------+------+------+------+------+------+------+------| 56 * |------+------+------+------+------+------+------+------+------+------+------+------|
58 * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | 57 * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | |
59 * |------+------+------+------+------+------+------+------+------+------+------+------| 58 * |------+------+------+------+------+------+------+------+------+------+------+------|
60 * | | | | | | Below| | | | | | | 59 * | | | | | | | | | | | | |
61 * `-----------------------------------------------------------------------------------' 60 * `-----------------------------------------------------------------------------------'
62 */ 61 */
63[_MOVE] = { 62[_MOVE] = {
64 {KC_ESC, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, KC_ESC }, 63 {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC },
65 {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, 64 {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL },
66 {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, 65 {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______},
67 {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______} 66 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
68}, 67},
69 68
70/* SYMB 69/* SYMB
@@ -79,8 +78,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
79 * `-----------------------------------------------------------------------------------' 78 * `-----------------------------------------------------------------------------------'
80 */ 79 */
81[_SYMB] = { 80[_SYMB] = {
82 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LALT(KC_MINS)}, 81 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, ENDASH },
83 {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, LALT(KC_3)}, 82 {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, POUND },
84 {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, 83 {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______},
85 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 84 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
86}, 85},
@@ -153,30 +152,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
153 } 152 }
154 return false; 153 return false;
155 break; 154 break;
156 case BELOW:
157 if (record->event.pressed) {
158 register_code(KC_LGUI);
159 register_code(KC_RGHT);
160 unregister_code(KC_RGHT);
161 unregister_code(KC_LGUI);
162 register_code(KC_ENT);
163 unregister_code(KC_ENT);
164 }
165 return false;
166 break;
167 case ABOVE:
168 if (record->event.pressed) {
169 register_code(KC_LGUI);
170 register_code(KC_LEFT);
171 unregister_code(KC_LEFT);
172 unregister_code(KC_LGUI);
173 register_code(KC_ENT);
174 unregister_code(KC_ENT);
175 register_code(KC_UP);
176 unregister_code(KC_UP);
177 }
178 return false;
179 break;
180 } 155 }
181 return true; 156 return true;
182} 157}
diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md
index 0baeba46d..f970cd974 100644
--- a/keyboards/planck/keymaps/callum/readme.md
+++ b/keyboards/planck/keymaps/callum/readme.md
@@ -2,11 +2,11 @@
2 2
3This is a layout for the grid planck, built with a few ideals in mind: 3This is a layout for the grid planck, built with a few ideals in mind:
4 4
5- Minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. 5- Consistent and minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key.
6- The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. 6- The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible.
7- There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. 7- There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make.
8 8
9We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. 9We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. The `MOUSE` layer is activated by holding the Move and Symb keys simultaniously.
10 10
11``` 11```
12/* BASE 12/* BASE
@@ -27,9 +27,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c
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 * |------+------+------+------+------+------+------+------+------+------+------+------|
30 * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | 30 * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | |
31 * |------+------+------+------+------+------+------+------+------+------+------+------| 31 * |------+------+------+------+------+------+------+------+------+------+------+------|
32 * | | | | | | Below| | | | | | | 32 * | | | | | | | | | | | | |
33 * `-----------------------------------------------------------------------------------' 33 * `-----------------------------------------------------------------------------------'
34 */ 34 */
35 35
@@ -63,9 +63,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c
63 * |------+------+------+------+------+------+------+------+------+------+------+------| 63 * |------+------+------+------+------+------+------+------+------+------+------+------|
64 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | 64 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- |
65 * |------+------+------+------+------+------+------+------+------+------+------+------| 65 * |------+------+------+------+------+------+------+------+------+------+------+------|
66 * | | F21 | F22 | F23 | F24 | | | Lock | | | | | 66 * | | F21 | F22 | F23 | F24 | | | Power| | | | |
67 * |------+------+------+------+------+------+------+------+------+------+------+------| 67 * |------+------+------+------+------+------+------+------+------+------+------+------|
68 * | | | | | Prev | Mute | Play | Next | | | | | 68 * | | | | | Prev | Mute | Play | Next | | | | |
69 * `-----------------------------------------------------------------------------------' 69 * `-----------------------------------------------------------------------------------'
70 */ 70 */
71``` 71 ```
diff --git a/keyboards/planck/keymaps/cbbrowne/Makefile b/keyboards/planck/keymaps/cbbrowne/Makefile
index b1c70ace7..19e5c2a84 100644
--- a/keyboards/planck/keymaps/cbbrowne/Makefile
+++ b/keyboards/planck/keymaps/cbbrowne/Makefile
@@ -12,11 +12,11 @@ COMMAND_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 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 13BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
14MIDI_ENABLE = no # MIDI controls 14MIDI_ENABLE = no # MIDI controls
15AUDIO_ENABLE = yes # Audio output on port C6 15AUDIO_ENABLE = no # Audio output on port C6
16UNICODE_ENABLE = no # Unicode 16UNICODE_ENABLE = no # Unicode
17BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 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. 18RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
19API_SYSEX_ENABLE = yes # Enable SYSEX API (+5390) 19API_SYSEX_ENABLE = no # Enable SYSEX API (+5390)
20 20
21# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 21# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
22SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 22SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c
index 2be4dab4b..0448a8d11 100644
--- a/keyboards/planck/keymaps/cbbrowne/keymap.c
+++ b/keyboards/planck/keymaps/cbbrowne/keymap.c
@@ -110,15 +110,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
110}, 110},
111[_RAISE] = { /* RAISE */ 111[_RAISE] = { /* RAISE */
112 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, 112 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
113 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, 113 {_______, KC_4, KC_5, KC_6, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
114 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______}, 114 {_______, KC_7, KC_8, KC_9, _______, _______, _______, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______},
115 {_______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_PGUP} 115 {_______, KC_0, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP}
116}, 116},
117[_LOWER] = { /* LOWER */ 117[_LOWER] = { /* LOWER */
118 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, 118 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
119 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, 119 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
120 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, ALTSLASH, _______}, 120 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, ALTSLASH, _______},
121 {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_PGUP} 121 {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP}
122 }, 122 },
123[_KEYPAD] = { /* Key Pad */ 123[_KEYPAD] = { /* Key Pad */
124 {KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, 124 {KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC},
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/mitch/Makefile b/keyboards/planck/keymaps/mitch/Makefile
new file mode 100644
index 000000000..7955003d4
--- /dev/null
+++ b/keyboards/planck/keymaps/mitch/Makefile
@@ -0,0 +1,5 @@
1SUBPROJECT = rev3
2
3ifndef QUANTUM_DIR
4 include ../../../../Makefile
5endif
diff --git a/keyboards/planck/keymaps/mitch/config.h b/keyboards/planck/keymaps/mitch/config.h
new file mode 100644
index 000000000..73bc50bc2
--- /dev/null
+++ b/keyboards/planck/keymaps/mitch/config.h
@@ -0,0 +1,2 @@
1#include "../../config.h"
2#define PREVENT_STUCK_MODIFIERS
diff --git a/keyboards/planck/keymaps/mitch/keymap.c b/keyboards/planck/keymaps/mitch/keymap.c
new file mode 100644
index 000000000..79b5204f0
--- /dev/null
+++ b/keyboards/planck/keymaps/mitch/keymap.c
@@ -0,0 +1,70 @@
1#include "keymap.h"
2#include "quantum.h"
3
4#define QWERTY 0
5#define LOWER 1
6#define RAISE 2
7
8// Alias to make layering more clear
9#define _______ KC_TRNS
10
11// In MacOS, switch between windows within an application
12#define GUI_GRV LGUI(KC_GRV)
13
14const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
15
16/* Qwerty
17 * ,-----------------------------------------------------------------------------------.
18 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
19 * |------+------+------+------+------+-------------+------+------+------+------+------|
20 * | Ctl | A | S | D | F | G | H | J | K | L | ; | " |
21 * |------+------+------+------+------+------|------+------+------+------+------+------|
22 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
23 * |------+------+------+------+------+------+------+------+------+------+------+------|
24 * | Esc | Del | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
25 * `-----------------------------------------------------------------------------------'
26 */
27[QWERTY] = {
28 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
29 {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
30 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT) },
31 {KC_ESC, KC_DEL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
32},
33
34/* Lower
35 * ,-----------------------------------------------------------------------------------.
36 * | GUIGR| | | | | | | & | * | ( | ) | Del |
37 * |------+------+------+------+------+-------------+------+------+------+------+------|
38 * | Caps | | Mute | Vol- | Vol+ | | Bksp | $ | % | ^ | | | | |
39 * |------+------+------+------+------+------|------+------+------+------+------+------|
40 * | | | | | | | | ! | @ | # | \ |Enter |
41 * |------+------+------+------+------+------+------+------+------+------+------+------|
42 * | | | | | | Enter | | | PgUp | PgUn | |
43 * `-----------------------------------------------------------------------------------'
44 */
45[LOWER] = {
46 {GUI_GRV, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
47 {KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_BSPC, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_PIPE},
48 {_______, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_BSLS, KC_ENT},
49 {_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______}
50},
51
52/* Raise
53 * ,-----------------------------------------------------------------------------------.
54 * | ` | ` | ~ | ( | ) | | | 7 | 8 | 9 | 0 | |
55 * |------+------+------+------+------+-------------+------+------+------+------+------|
56 * | | [ | ] | { | } | | | 4 | 5 | 6 | | \ |
57 * |------+------+------+------+------+------|------+------+------+------+------+------|
58 * | | - | _ | = | + | | | 1 | 2 | 3 | |Enter |
59 * |------+------+------+------+------+------+------+------+------+------+------+------|
60 * | | | | | | Enter | | | | | |
61 * `-----------------------------------------------------------------------------------'
62 */
63
64[RAISE] = {
65 {KC_GRV, KC_GRV, KC_TILD, KC_LPRN, KC_RPRN, _______, _______, KC_7, KC_8, KC_9, KC_0, _______},
66 {_______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, _______, KC_BSLS},
67 {_______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, _______, _______, KC_1, KC_2, KC_3, _______, KC_ENT},
68 {_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______}
69}
70};
diff --git a/keyboards/planck/keymaps/mitch/readme.md b/keyboards/planck/keymaps/mitch/readme.md
new file mode 100644
index 000000000..3869304f4
--- /dev/null
+++ b/keyboards/planck/keymaps/mitch/readme.md
@@ -0,0 +1,26 @@
1## Flashing Keyboard
2
31. Install `dfu` tools:
4
5 brew tap osx-cross/avr
6 brew install avr-libc
7 brew install dfu-programmer
8
92. Move to this directory.
103. Hit the reset button on the keyboard.
114. run `make dfu`.
12
13## The Keymap
14
15This keymap is designed for a rev3 Planck Keyboard.
16
17The default layer is QWERTY. The raise layer has a ten key on the right
18and common programming punctuation on the left. The lower layer provides the
19rest of the symbols, mostly mapped with the ten key numbers.
20
21The normal right shift key uses the `MT` macro to trigger Enter on tap and right
22shift when held.
23
24This keymap sets the `PREVENT_STUCK_MODIFIERS` flag to avoid the occasional WTF
25moments when using a modifier keys and accidentally releasing them after moving
26to a new layer.
diff --git a/keyboards/planck/keymaps/vifon/Makefile b/keyboards/planck/keymaps/vifon/Makefile
index 53660a2e7..15a7b736f 100644
--- a/keyboards/planck/keymaps/vifon/Makefile
+++ b/keyboards/planck/keymaps/vifon/Makefile
@@ -1,6 +1,3 @@
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 1
5 2
6# Build Options 3# Build Options
@@ -10,7 +7,7 @@ $(warning Please disable some options in the Makefile to resolve)
10BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) 7BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
11MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 8MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
12EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 9EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
13CONSOLE_ENABLE = yes # Console for debug(+400) 10CONSOLE_ENABLE = no # Console for debug(+400)
14COMMAND_ENABLE = yes # Commands for debug and configuration 11COMMAND_ENABLE = yes # Commands for debug and configuration
15NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 12NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
16BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality 13BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
diff --git a/keyboards/planck/keymaps/vifon/config.h b/keyboards/planck/keymaps/vifon/config.h
index 9cb0634fb..a08b37cbe 100644
--- a/keyboards/planck/keymaps/vifon/config.h
+++ b/keyboards/planck/keymaps/vifon/config.h
@@ -81,6 +81,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
81/* prevent the modifiers from being stuck, sacrificing some memory */ 81/* prevent the modifiers from being stuck, sacrificing some memory */
82#define PREVENT_STUCK_MODIFIERS 82#define PREVENT_STUCK_MODIFIERS
83 83
84/* A larger buffer for the dynamic macros as this keymap is not taking
85 * up that much memory.
86 */
87#define DYNAMIC_MACRO_SIZE 256
88
84#ifdef SUBPROJECT_rev3 89#ifdef SUBPROJECT_rev3
85 #include "rev3/config.h" 90 #include "rev3/config.h"
86#endif 91#endif
diff --git a/keyboards/planck/keymaps/vifon/keymap.c b/keyboards/planck/keymaps/vifon/keymap.c
index 80c4a516c..ee0c0ac36 100644
--- a/keyboards/planck/keymaps/vifon/keymap.c
+++ b/keyboards/planck/keymaps/vifon/keymap.c
@@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
62[_PPG] = { /* Pure Pro: Gaming */ 62[_PPG] = { /* Pure Pro: Gaming */
63 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, 63 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
64 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, 64 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
65 {_______, _______, _______, _______, _______, _______, _______, _______, _______, DF(_RS), _______, _______}, 65 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
66 {_______, _______, XXXXXXX, _______, KM_RS , _______, _______, KM_LW , _______, _______, _______, _______}, 66 {_______, _______, XXXXXXX, _______, KM_RS , _______, _______, KM_LW , _______, _______, _______, _______},
67}, 67},
68[_NM] = { /* Numeric */ 68[_NM] = { /* Numeric */
@@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
90 {_______, _______, KC_LGUI, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______} 90 {_______, _______, KC_LGUI, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______}
91}, 91},
92[_DYN]= { /* special */ 92[_DYN]= { /* special */
93 {_______, DYN_REC_START1, DYN_MACRO_PLAY1, _______, _______, _______, _______, _______, KC_INS, _______, KC_PSCR, KC_PAUS}, 93 {_______, DYN_REC_START1, DYN_MACRO_PLAY1, _______, _______, _______, _______, KC_APP, KC_INS, _______, KC_PSCR, KC_PAUS},
94 {_______, DYN_REC_START2, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_SLCK, KC_NLCK}, 94 {_______, DYN_REC_START2, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_SLCK, KC_NLCK},
95 {KM_SHLK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, 95 {KM_SHLK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
96 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 96 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c
deleted file mode 100644
index e5a86b402..000000000
--- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c
+++ /dev/null
@@ -1,49 +0,0 @@
1#include "keymap.h"
2
3const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4[0] = KEYMAP(
5 TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC,
6 LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT,
7 LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN3,
8 ESC, DEL, LALT, LGUI, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT),
9[1] = KEYMAP(
10 GRV, GRV, FN22, FN19, FN10, TRNS, TRNS, 7, 8, 9, 0, BSPC,
11 TRNS, LBRC, RBRC, FN23, FN24, TRNS, TRNS, 4, 5, 6, TRNS, BSLS,
12 TRNS, MINS, FN20, EQL, FN21, TRNS, TRNS, 1, 2, 3, TRNS, ENT,
13 TRNS, TRNS, TRNS, TRNS, TRNS, SPC, FN1, TRNS, PGDN, PGUP, TRNS),
14[2] = KEYMAP(
15 FN26, FN10, FN11, FN12, FN13, FN14, FN15, FN17, FN18, FN19, FN10, DEL,
16 TRNS, TRNS, MUTE, VOLD, VOLU, TRNS, BSPC, FN14, FN15, FN16, TRNS, FN25,
17 TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN11, FN12, FN13, TRNS, ENT,
18 TRNS, TRNS, TRNS, TRNS, FN2, ENT, TRNS, TRNS, PGDN, PGUP, TRNS),
19};
20
21const uint16_t PROGMEM fn_actions[] = {
22 [1] = ACTION_LAYER_MOMENTARY(1), // Switch layer raise
23 [2] = ACTION_LAYER_MOMENTARY(2), // Switch layer lower
24
25 [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // Right shift serves as Enter on tap
26
27 // Numeric shift modifiers
28 [10] = ACTION_MODS_KEY(MOD_LSFT, KC_0),
29 [11] = ACTION_MODS_KEY(MOD_LSFT, KC_1),
30 [12] = ACTION_MODS_KEY(MOD_LSFT, KC_2),
31 [13] = ACTION_MODS_KEY(MOD_LSFT, KC_3),
32 [14] = ACTION_MODS_KEY(MOD_LSFT, KC_4),
33 [15] = ACTION_MODS_KEY(MOD_LSFT, KC_5),
34 [16] = ACTION_MODS_KEY(MOD_LSFT, KC_6),
35 [17] = ACTION_MODS_KEY(MOD_LSFT, KC_7),
36 [18] = ACTION_MODS_KEY(MOD_LSFT, KC_8),
37 [19] = ACTION_MODS_KEY(MOD_LSFT, KC_9),
38
39 // Other shift modifiers
40 [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // _
41 [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // +
42 [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // ~
43 [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), // {
44 [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // }
45 [25] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // |
46
47 // Switch windows in app
48 [26] = ACTION_MODS_KEY(MOD_LGUI, KC_GRV),
49};
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..5465d543a
--- /dev/null
+++ b/keyboards/preonic/keymaps/smt/keymap.c
@@ -0,0 +1,247 @@
1#include "preonic.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4#ifdef AUDIO_ENABLE
5 #include "audio.h"
6#endif
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 | / |
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 * | Brite| 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_SLSH},
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 {KC_LSFT, 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 {BACKLIT, 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 | Del |
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 * | Brite| 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, KC_DEL},
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_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
112 {_______, _______, _______, _______, _______, _______, _______, KC_MINS, 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..2dcc1927f
--- /dev/null
+++ b/keyboards/preonic/keymaps/smt/readme.md
@@ -0,0 +1,85 @@
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/qmk/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
17## Dvorak (default)
18
19```
20,-----------------------------------------------------------------------------------.
21| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
22|------+------+------+------+------+------+------+------+------+------+------+------|
23| Tab | " | , | . | P | Y | F | G | C | R | L | / |
24|------+------+------+------+------+-------------+------+------+------+------+------|
25| Esc | A | O | E | U | I | D | H | T | N | S | - |
26|------+------+------+------+------+------|------+------+------+------+------+------|
27| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
28|------+------+------+------+------+------+------+------+------+------+------+------|
29| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
30`-----------------------------------------------------------------------------------'
31```
32
33## Qwerty (same as default)
34
35```
36,-----------------------------------------------------------------------------------.
37| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
38|------+------+------+------+------+------+------+------+------+------+------+------|
39| Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
40|------+------+------+------+------+-------------+------+------+------+------+------|
41| Esc | A | S | D | F | G | H | J | K | L | ; | " |
42|------+------+------+------+------+------|------+------+------+------+------+------|
43| Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
44|------+------+------+------+------+------+------+------+------+------+------+------|
45| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
46`-----------------------------------------------------------------------------------'
47```
48
49## Lower
50
51This 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.
52
53```
54,-----------------------------------------------------------------------------------.
55| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
56|------+------+------+------+------+------+------+------+------+------+------+------|
57| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
58|------+------+------+------+------+-------------+------+------+------+------+------|
59| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp|
60|------+------+------+------+------+------|------+------+------+------+------+------|
61| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn|
62|------+------+------+------+------+------+------+------+------+------+------+------|
63| | | | | | | | Next | Vol- | Vol+ | Play |
64`-----------------------------------------------------------------------------------'
65```
66
67## Raise
68
69As 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.
70
71I haven't completely filled this layer, which leaves room for future mappings and macros.
72
73```
74,-----------------------------------------------------------------------------------.
75| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
76|------+------+------+------+------+-------------+------+------+------+------+------|
77| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
78|------+------+------+------+------+-------------+------+------+------+------+------|
79| | | | | | | | _ | + | { | } | | |
80|------+------+------+------+------+------|------+------+------+------+------+------|
81| | | | | | | | - | = | [ | ] | \ |
82|------+------+------+------+------+------+------+------+------+------+------+------|
83| | | | | | | | Next | Vol- | Vol+ | Play |
84`-----------------------------------------------------------------------------------'
85```
diff --git a/keyboards/ps2avrGB/Makefile b/keyboards/ps2avrGB/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/ps2avrGB/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif
diff --git a/keyboards/ps2avrGB/README.md b/keyboards/ps2avrGB/README.md
new file mode 100644
index 000000000..f8360aec0
--- /dev/null
+++ b/keyboards/ps2avrGB/README.md
@@ -0,0 +1,61 @@
1ps2avrGB keyboard firmware
2==========================
3
4This is a port of the QMK firmware for boards that are based on the
5ps2avrGB firmware, like the [ps2avrGB
6keyboard](https://www.keyclack.com/product/gb-ps2avrgb/) or the ones sold
7by [Winkeyless](http://winkeyless.kr/product/ps2avrgb-parts/).
8
9Note that this is a complete replacement for the firmware, so you won't be
10using Bootmapper Client to change any keyboard settings, since not all the
11USB report options are supported.
12
13## Supported Boards
14
15Only the [B.mini X2](http://winkeyless.kr/product/b-mini-x2-pcb/) has been
16tested so far (since it's the only one I own). But other boards that use
17the ps2avrGB firmware should work as well.
18
19## Installing
20
21First, install the requirements. These commands are for OSX, but all you
22need is the AVR toolchain and `bootloadHID` for flashing:
23
24```
25$ brew cask install crosspack-avr
26$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
27```
28
29In order to use the `./program` script, which can reboot the board into
30the bootloader, you'll need Python 2 with PyUSB installed:
31
32```
33$ pip install pyusb
34```
35
36Then, with the keyboard plugged in, simply run this command from the
37`qmk_firmware` directory:
38
39```
40$ make ps2avrGB-program
41```
42
43If you prefer, you can just build it and flash the firmware directly with
44`bootloadHID` if you boot the board while holding down `L_Ctrl` to keep it
45in the bootloader:
46
47```
48$ make ps2avrGB
49$ bootloadHID -r ps2avrGB_default.hex
50```
51
52## Troubleshooting
53
54From my experience, it's really hard to brick these boards. But these
55tricks have been useful when it got stuck in a weird scenario.
56
571. Try plugging the board in while pressing `L_Ctrl`. This will force it
58 to boot only the bootloader without loading the firmware. Once this is
59 done, just reflash the board with the original firmware.
602. Sometimes USB hubs can act weird, so try connecting the board directly
61 to your computer or plugging/unplugging the USB hub.
diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h
new file mode 100644
index 000000000..b5c696f3f
--- /dev/null
+++ b/keyboards/ps2avrGB/config.h
@@ -0,0 +1,38 @@
1/*
2Copyright 2017 Luiz Ribeiro <luizribeiro@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#define VENDOR_ID 0x20A0
22#define PRODUCT_ID 0x422D
23// TODO: share these strings with usbconfig.h
24// Edit usbconfig.h to change these.
25#define MANUFACTURER winkeyless.kr
26#define PRODUCT ps2avrGB
27
28/* matrix size */
29#define MATRIX_ROWS 8
30#define MATRIX_COLS 15
31
32#define NO_UART 1
33#define BOOTLOADHID_BOOTLOADER 1
34
35/* key combination for command */
36#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
37
38#endif
diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c
new file mode 100644
index 000000000..5c66cde59
--- /dev/null
+++ b/keyboards/ps2avrGB/keymaps/default/keymap.c
@@ -0,0 +1,32 @@
1/*
2Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include "ps2avrGB.h"
19
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21 KEYMAP( \
22 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,HOME,END, \
23 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, DEL, \
24 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, INS, \
25 CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, PGUP,\
26 LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\
27 LCTL,LALT,LGUI, SPC, RGUI,RALT,RCTL,LEFT,DOWN,RGHT \
28 ),
29};
30
31const uint16_t PROGMEM fn_actions[] = {
32};
diff --git a/keyboards/ps2avrGB/matrix.c b/keyboards/ps2avrGB/matrix.c
new file mode 100644
index 000000000..beaa54c40
--- /dev/null
+++ b/keyboards/ps2avrGB/matrix.c
@@ -0,0 +1,104 @@
1/*
2Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include <avr/io.h>
19#include <util/delay.h>
20
21#include "matrix.h"
22
23#ifndef DEBOUNCE
24# define DEBOUNCE 5
25#endif
26
27static uint8_t debouncing = DEBOUNCE;
28
29static matrix_row_t matrix[MATRIX_ROWS];
30static matrix_row_t matrix_debouncing[MATRIX_ROWS];
31
32void matrix_init(void) {
33 // all outputs for rows high
34 DDRB = 0xFF;
35 PORTB = 0xFF;
36 // all inputs for columns
37 DDRA = 0x00;
38 DDRC &= ~(0x111111<<2);
39 DDRD &= ~(1<<PIND7);
40 // all columns are pulled-up
41 PORTA = 0xFF;
42 PORTC |= (0b111111<<2);
43 PORTD |= (1<<PIND7);
44
45 // initialize matrix state: all keys off
46 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
47 matrix[row] = 0x00;
48 matrix_debouncing[row] = 0x00;
49 }
50}
51
52void matrix_set_row_status(uint8_t row) {
53 DDRB = (1 << row);
54 PORTB = ~(1 << row);
55}
56
57uint8_t bit_reverse(uint8_t x) {
58 x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
59 x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
60 x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
61 return x;
62}
63
64uint8_t matrix_scan(void) {
65 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
66 matrix_set_row_status(row);
67 _delay_us(5);
68
69 matrix_row_t cols = (
70 // cols 0..7, PORTA 0 -> 7
71 (~PINA) & 0xFF
72 ) | (
73 // cols 8..13, PORTC 7 -> 0
74 bit_reverse((~PINC) & 0xFF) << 8
75 ) | (
76 // col 14, PORTD 7
77 ((~PIND) & (1 << PIND7)) << 7
78 );
79
80 if (matrix_debouncing[row] != cols) {
81 matrix_debouncing[row] = cols;
82 debouncing = DEBOUNCE;
83 }
84 }
85
86 if (debouncing) {
87 if (--debouncing) {
88 _delay_ms(1);
89 } else {
90 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
91 matrix[i] = matrix_debouncing[i];
92 }
93 }
94 }
95
96 return 1;
97}
98
99inline matrix_row_t matrix_get_row(uint8_t row) {
100 return matrix[row];
101}
102
103void matrix_print(void) {
104}
diff --git a/keyboards/ps2avrGB/program b/keyboards/ps2avrGB/program
new file mode 100755
index 000000000..a88d9cd9b
--- /dev/null
+++ b/keyboards/ps2avrGB/program
@@ -0,0 +1,74 @@
1#!/usr/bin/env python
2# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
3#
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation, either version 2 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17from __future__ import print_function
18
19import os
20import sys
21import time
22import usb
23
24if len(sys.argv) < 2:
25 print('Usage: %s <firmware.hex>' % sys.argv[0])
26 sys.exit(1)
27
28print('Searching for ps2avrGB... ', end='')
29
30dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D)
31if dev is None:
32 raise ValueError('Device not found')
33
34print('Found', end='\n\n')
35
36print('Device Information:')
37print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
38print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
39print('Manufacturer: %s' % (dev.iManufacturer))
40print('Serial: %s' % (dev.iSerialNumber))
41print('Product: %s' % (dev.iProduct), end='\n\n')
42
43print('Transferring control to bootloader... ', end='')
44
45dev.set_configuration()
46
47request_type = usb.util.build_request_type(
48 usb.util.CTRL_OUT,
49 usb.util.CTRL_TYPE_CLASS,
50 usb.util.CTRL_RECIPIENT_DEVICE)
51
52USBRQ_HID_SET_REPORT = 0x09
53HID_REPORT_OPTION = 0x0301
54
55
56try:
57 dev.ctrl_transfer(
58 request_type,
59 USBRQ_HID_SET_REPORT,
60 HID_REPORT_OPTION,
61 0,
62 [0, 0, 0xFF] + [0] * 5
63 )
64except usb.core.USBError:
65 # for some reason I keep getting USBError, but it works!
66 pass
67
68# wait a bit until bootloader starts up
69time.sleep(2)
70
71print('OK')
72print('Programming...')
73if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0:
74 print('\nDone!')
diff --git a/keyboards/ps2avrGB/ps2avrGB.c b/keyboards/ps2avrGB/ps2avrGB.c
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/ps2avrGB/ps2avrGB.c
diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h
new file mode 100644
index 000000000..6432e3be9
--- /dev/null
+++ b/keyboards/ps2avrGB/ps2avrGB.h
@@ -0,0 +1,43 @@
1/*
2Copyright 2017 Luiz Ribeiro <luizribeiro@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 KEYMAP_COMMON_H
19#define KEYMAP_COMMON_H
20
21#include "keycode.h"
22#include "action.h"
23
24#define KEYMAP( \
25 K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
26 K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
27 K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
28 K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
29 K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
30 K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \
31) \
32{ \
33 { KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \
34 { KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \
35 { KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \
36 { KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \
37 { KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \
38 { KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \
39 { KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \
40 { KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \
41}
42
43#endif
diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/ps2avrGB/rules.mk
new file mode 100644
index 000000000..e2b5922ea
--- /dev/null
+++ b/keyboards/ps2avrGB/rules.mk
@@ -0,0 +1,43 @@
1# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
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# MCU name
17MCU = atmega32a
18PROTOCOL = VUSB
19
20# unsupported features for now
21NO_UART = yes
22NO_SUSPEND_POWER_DOWN = yes
23BACKLIGHT_ENABLE = no
24
25# processor frequency
26F_CPU = 12000000
27
28# build options
29BOOTMAGIC_ENABLE = yes
30MOUSEKEY_ENABLE = yes
31EXTRAKEY_ENABLE = yes
32CONSOLE_ENABLE = yes
33COMMAND_ENABLE = yes
34
35OPT_DEFS = -DDEBUG_LEVEL=0
36OPT_DEFS += -DBOOTLOADER_SIZE=2048
37
38# custom matrix setup
39CUSTOM_MATRIX = yes
40SRC = matrix.c
41
42# programming options
43PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex
diff --git a/keyboards/ps2avrGB/usbconfig.h b/keyboards/ps2avrGB/usbconfig.h
new file mode 100644
index 000000000..d2d848fcd
--- /dev/null
+++ b/keyboards/ps2avrGB/usbconfig.h
@@ -0,0 +1,396 @@
1/* Name: usbconfig.h
2 * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
3 * Author: Christian Starkjohann
4 * Creation Date: 2005-04-01
5 * Tabsize: 4
6 * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
7 * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
8 * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
9 */
10
11#ifndef __usbconfig_h_included__
12#define __usbconfig_h_included__
13
14#include "config.h"
15
16/*
17General Description:
18This file is an example configuration (with inline documentation) for the USB
19driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is
20also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may
21wire the lines to any other port, as long as D+ is also wired to INT0 (or any
22other hardware interrupt, as long as it is the highest level interrupt, see
23section at the end of this file).
24*/
25
26/* ---------------------------- Hardware Config ---------------------------- */
27
28#define USB_CFG_IOPORTNAME D
29/* This is the port where the USB bus is connected. When you configure it to
30 * "B", the registers PORTB, PINB and DDRB will be used.
31 */
32#define USB_CFG_DMINUS_BIT 3
33/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
34 * This may be any bit in the port.
35 */
36#define USB_CFG_DPLUS_BIT 2
37/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
38 * This may be any bit in the port. Please note that D+ must also be connected
39 * to interrupt pin INT0! [You can also use other interrupts, see section
40 * "Optional MCU Description" below, or you can connect D- to the interrupt, as
41 * it is required if you use the USB_COUNT_SOF feature. If you use D- for the
42 * interrupt, the USB interrupt will also be triggered at Start-Of-Frame
43 * markers every millisecond.]
44 */
45#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
46/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000,
47 * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code
48 * require no crystal, they tolerate +/- 1% deviation from the nominal
49 * frequency. All other rates require a precision of 2000 ppm and thus a
50 * crystal!
51 * Since F_CPU should be defined to your actual clock rate anyway, you should
52 * not need to modify this setting.
53 */
54#define USB_CFG_CHECK_CRC 0
55/* Define this to 1 if you want that the driver checks integrity of incoming
56 * data packets (CRC checks). CRC checks cost quite a bit of code size and are
57 * currently only available for 18 MHz crystal clock. You must choose
58 * USB_CFG_CLOCK_KHZ = 18000 if you enable this option.
59 */
60
61/* ----------------------- Optional Hardware Config ------------------------ */
62
63/* #define USB_CFG_PULLUP_IOPORTNAME D */
64/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
65 * V+, you can connect and disconnect the device from firmware by calling
66 * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
67 * This constant defines the port on which the pullup resistor is connected.
68 */
69/* #define USB_CFG_PULLUP_BIT 4 */
70/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
71 * above) where the 1.5k pullup resistor is connected. See description
72 * above for details.
73 */
74
75/* --------------------------- Functional Range ---------------------------- */
76
77#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
78/* Define this to 1 if you want to compile a version with two endpoints: The
79 * default control endpoint 0 and an interrupt-in endpoint (any other endpoint
80 * number).
81 */
82#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
83/* Define this to 1 if you want to compile a version with three endpoints: The
84 * default control endpoint 0, an interrupt-in endpoint 3 (or the number
85 * configured below) and a catch-all default interrupt-in endpoint as above.
86 * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
87 */
88#define USB_CFG_EP3_NUMBER 3
89/* If the so-called endpoint 3 is used, it can now be configured to any other
90 * endpoint number (except 0) with this macro. Default if undefined is 3.
91 */
92/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */
93/* The above macro defines the startup condition for data toggling on the
94 * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
95 * Since the token is toggled BEFORE sending any data, the first packet is
96 * sent with the oposite value of this configuration!
97 */
98#define USB_CFG_IMPLEMENT_HALT 0
99/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
100 * for endpoint 1 (interrupt endpoint). Although you may not need this feature,
101 * it is required by the standard. We have made it a config option because it
102 * bloats the code considerably.
103 */
104#define USB_CFG_SUPPRESS_INTR_CODE 0
105/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
106 * want to send any data over them. If this macro is defined to 1, functions
107 * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
108 * you need the interrupt-in endpoints in order to comply to an interface
109 * (e.g. HID), but never want to send any data. This option saves a couple
110 * of bytes in flash memory and the transmit buffers in RAM.
111 */
112#define USB_CFG_INTR_POLL_INTERVAL 1
113/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
114 * interval. The value is in milliseconds and must not be less than 10 ms for
115 * low speed devices.
116 */
117#define USB_CFG_IS_SELF_POWERED 0
118/* Define this to 1 if the device has its own power supply. Set it to 0 if the
119 * device is powered from the USB bus.
120 */
121#define USB_CFG_MAX_BUS_POWER 500
122/* Set this variable to the maximum USB bus power consumption of your device.
123 * The value is in milliamperes. [It will be divided by two since USB
124 * communicates power requirements in units of 2 mA.]
125 */
126#define USB_CFG_IMPLEMENT_FN_WRITE 1
127/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
128 * transfers. Set it to 0 if you don't need it and want to save a couple of
129 * bytes.
130 */
131#define USB_CFG_IMPLEMENT_FN_READ 0
132/* Set this to 1 if you need to send control replies which are generated
133 * "on the fly" when usbFunctionRead() is called. If you only want to send
134 * data from a static buffer, set it to 0 and return the data from
135 * usbFunctionSetup(). This saves a couple of bytes.
136 */
137#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0
138/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
139 * You must implement the function usbFunctionWriteOut() which receives all
140 * interrupt/bulk data sent to any endpoint other than 0. The endpoint number
141 * can be found in 'usbRxToken'.
142 */
143#define USB_CFG_HAVE_FLOWCONTROL 0
144/* Define this to 1 if you want flowcontrol over USB data. See the definition
145 * of the macros usbDisableAllRequests() and usbEnableAllRequests() in
146 * usbdrv.h.
147 */
148#define USB_CFG_DRIVER_FLASH_PAGE 0
149/* If the device has more than 64 kBytes of flash, define this to the 64 k page
150 * where the driver's constants (descriptors) are located. Or in other words:
151 * Define this to 1 for boot loaders on the ATMega128.
152 */
153#define USB_CFG_LONG_TRANSFERS 0
154/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
155 * in a single control-in or control-out transfer. Note that the capability
156 * for long transfers increases the driver size.
157 */
158/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
159/* This macro is a hook if you want to do unconventional things. If it is
160 * defined, it's inserted at the beginning of received message processing.
161 * If you eat the received message and don't want default processing to
162 * proceed, do a return after doing your things. One possible application
163 * (besides debugging) is to flash a status LED on each packet.
164 */
165/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */
166/* This macro is a hook if you need to know when an USB RESET occurs. It has
167 * one parameter which distinguishes between the start of RESET state and its
168 * end.
169 */
170/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */
171/* This macro (if defined) is executed when a USB SET_ADDRESS request was
172 * received.
173 */
174#define USB_COUNT_SOF 1
175/* define this macro to 1 if you need the global variable "usbSofCount" which
176 * counts SOF packets. This feature requires that the hardware interrupt is
177 * connected to D- instead of D+.
178 */
179/* #ifdef __ASSEMBLER__
180 * macro myAssemblerMacro
181 * in YL, TCNT0
182 * sts timer0Snapshot, YL
183 * endm
184 * #endif
185 * #define USB_SOF_HOOK myAssemblerMacro
186 * This macro (if defined) is executed in the assembler module when a
187 * Start Of Frame condition is detected. It is recommended to define it to
188 * the name of an assembler macro which is defined here as well so that more
189 * than one assembler instruction can be used. The macro may use the register
190 * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
191 * immediately after an SOF pulse may be lost and must be retried by the host.
192 * What can you do with this hook? Since the SOF signal occurs exactly every
193 * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
194 * designs running on the internal RC oscillator.
195 * Please note that Start Of Frame detection works only if D- is wired to the
196 * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
197 */
198#define USB_CFG_CHECK_DATA_TOGGLING 0
199/* define this macro to 1 if you want to filter out duplicate data packets
200 * sent by the host. Duplicates occur only as a consequence of communication
201 * errors, when the host does not receive an ACK. Please note that you need to
202 * implement the filtering yourself in usbFunctionWriteOut() and
203 * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
204 * for each control- and out-endpoint to check for duplicate packets.
205 */
206#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
207/* define this macro to 1 if you want the function usbMeasureFrameLength()
208 * compiled in. This function can be used to calibrate the AVR's RC oscillator.
209 */
210#define USB_USE_FAST_CRC 0
211/* The assembler module has two implementations for the CRC algorithm. One is
212 * faster, the other is smaller. This CRC routine is only used for transmitted
213 * messages where timing is not critical. The faster routine needs 31 cycles
214 * per byte while the smaller one needs 61 to 69 cycles. The faster routine
215 * may be worth the 32 bytes bigger code size if you transmit lots of data and
216 * run the AVR close to its limit.
217 */
218
219/* -------------------------- Device Description --------------------------- */
220
221#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF)
222/* USB vendor ID for the device, low byte first. If you have registered your
223 * own Vendor ID, define it here. Otherwise you may use one of obdev's free
224 * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
225 * *** IMPORTANT NOTE ***
226 * This template uses obdev's shared VID/PID pair for Vendor Class devices
227 * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
228 * the implications!
229 */
230#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF)
231/* This is the ID of the product, low byte first. It is interpreted in the
232 * scope of the vendor ID. If you have registered your own VID with usb.org
233 * or if you have licensed a PID from somebody else, define it here. Otherwise
234 * you may use one of obdev's free shared VID/PID pairs. See the file
235 * USB-IDs-for-free.txt for details!
236 * *** IMPORTANT NOTE ***
237 * This template uses obdev's shared VID/PID pair for Vendor Class devices
238 * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
239 * the implications!
240 */
241#define USB_CFG_DEVICE_VERSION 0x00, 0x02
242/* Version number of the device: Minor number first, then major number.
243 */
244#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r'
245#define USB_CFG_VENDOR_NAME_LEN 13
246/* These two values define the vendor name returned by the USB device. The name
247 * must be given as a list of characters under single quotes. The characters
248 * are interpreted as Unicode (UTF-16) entities.
249 * If you don't want a vendor name string, undefine these macros.
250 * ALWAYS define a vendor name containing your Internet domain name if you use
251 * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
252 * details.
253 */
254#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B'
255#define USB_CFG_DEVICE_NAME_LEN 8
256/* Same as above for the device name. If you don't want a device name, undefine
257 * the macros. See the file USB-IDs-for-free.txt before you assign a name if
258 * you use a shared VID/PID.
259 */
260/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */
261/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */
262/* Same as above for the serial number. If you don't want a serial number,
263 * undefine the macros.
264 * It may be useful to provide the serial number through other means than at
265 * compile time. See the section about descriptor properties below for how
266 * to fine tune control over USB descriptors such as the string descriptor
267 * for the serial number.
268 */
269#define USB_CFG_DEVICE_CLASS 0
270#define USB_CFG_DEVICE_SUBCLASS 0
271/* See USB specification if you want to conform to an existing device class.
272 * Class 0xff is "vendor specific".
273 */
274#define USB_CFG_INTERFACE_CLASS 3 /* HID */
275#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */
276#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */
277/* See USB specification if you want to conform to an existing device class or
278 * protocol. The following classes must be set at interface level:
279 * HID class is 3, no subclass and protocol required (but may be useful!)
280 * CDC class is 2, use subclass 2 and protocol 1 for ACM
281 */
282#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0
283/* Define this to the length of the HID report descriptor, if you implement
284 * an HID device. Otherwise don't define it or define it to 0.
285 * If you use this define, you must add a PROGMEM character array named
286 * "usbHidReportDescriptor" to your code which contains the report descriptor.
287 * Don't forget to keep the array and this define in sync!
288 */
289
290/* #define USB_PUBLIC static */
291/* Use the define above if you #include usbdrv.c instead of linking against it.
292 * This technique saves a couple of bytes in flash memory.
293 */
294
295/* ------------------- Fine Control over USB Descriptors ------------------- */
296/* If you don't want to use the driver's default USB descriptors, you can
297 * provide our own. These can be provided as (1) fixed length static data in
298 * flash memory, (2) fixed length static data in RAM or (3) dynamically at
299 * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
300 * information about this function.
301 * Descriptor handling is configured through the descriptor's properties. If
302 * no properties are defined or if they are 0, the default descriptor is used.
303 * Possible properties are:
304 * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
305 * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
306 * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
307 * you want RAM pointers.
308 * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
309 * in static memory is in RAM, not in flash memory.
310 * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
311 * the driver must know the descriptor's length. The descriptor itself is
312 * found at the address of a well known identifier (see below).
313 * List of static descriptor names (must be declared PROGMEM if in flash):
314 * char usbDescriptorDevice[];
315 * char usbDescriptorConfiguration[];
316 * char usbDescriptorHidReport[];
317 * char usbDescriptorString0[];
318 * int usbDescriptorStringVendor[];
319 * int usbDescriptorStringDevice[];
320 * int usbDescriptorStringSerialNumber[];
321 * Other descriptors can't be provided statically, they must be provided
322 * dynamically at runtime.
323 *
324 * Descriptor properties are or-ed or added together, e.g.:
325 * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
326 *
327 * The following descriptors are defined:
328 * USB_CFG_DESCR_PROPS_DEVICE
329 * USB_CFG_DESCR_PROPS_CONFIGURATION
330 * USB_CFG_DESCR_PROPS_STRINGS
331 * USB_CFG_DESCR_PROPS_STRING_0
332 * USB_CFG_DESCR_PROPS_STRING_VENDOR
333 * USB_CFG_DESCR_PROPS_STRING_PRODUCT
334 * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
335 * USB_CFG_DESCR_PROPS_HID
336 * USB_CFG_DESCR_PROPS_HID_REPORT
337 * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
338 *
339 * Note about string descriptors: String descriptors are not just strings, they
340 * are Unicode strings prefixed with a 2 byte header. Example:
341 * int serialNumberDescriptor[] = {
342 * USB_STRING_DESCRIPTOR_HEADER(6),
343 * 'S', 'e', 'r', 'i', 'a', 'l'
344 * };
345 */
346
347#define USB_CFG_DESCR_PROPS_DEVICE 0
348#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC
349//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
350#define USB_CFG_DESCR_PROPS_STRINGS 0
351#define USB_CFG_DESCR_PROPS_STRING_0 0
352#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
353#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
354#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
355#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
356//#define USB_CFG_DESCR_PROPS_HID 0
357#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
358//#define USB_CFG_DESCR_PROPS_HID_REPORT 0
359#define USB_CFG_DESCR_PROPS_UNKNOWN 0
360
361#define usbMsgPtr_t unsigned short
362/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
363 * a scalar type here because gcc generates slightly shorter code for scalar
364 * arithmetics than for pointer arithmetics. Remove this define for backward
365 * type compatibility or define it to an 8 bit type if you use data in RAM only
366 * and all RAM is below 256 bytes (tiny memory model in IAR CC).
367 */
368
369/* ----------------------- Optional MCU Description ------------------------ */
370
371/* The following configurations have working defaults in usbdrv.h. You
372 * usually don't need to set them explicitly. Only if you want to run
373 * the driver on a device which is not yet supported or with a compiler
374 * which is not fully supported (such as IAR C) or if you use a differnt
375 * interrupt than INT0, you may have to define some of these.
376 */
377/* #define USB_INTR_CFG MCUCR */
378/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */
379/* #define USB_INTR_CFG_CLR 0 */
380/* #define USB_INTR_ENABLE GIMSK */
381/* #define USB_INTR_ENABLE_BIT INT0 */
382/* #define USB_INTR_PENDING GIFR */
383/* #define USB_INTR_PENDING_BIT INTF0 */
384/* #define USB_INTR_VECTOR INT0_vect */
385
386/* Set INT1 for D- falling edge to count SOF */
387/* #define USB_INTR_CFG EICRA */
388#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10))
389/* #define USB_INTR_CFG_CLR 0 */
390/* #define USB_INTR_ENABLE EIMSK */
391#define USB_INTR_ENABLE_BIT INT1
392/* #define USB_INTR_PENDING EIFR */
393#define USB_INTR_PENDING_BIT INTF1
394#define USB_INTR_VECTOR INT1_vect
395
396#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/readme.md b/keyboards/readme.md
index 81a23c7e5..d2f41ad7e 100644
--- a/keyboards/readme.md
+++ b/keyboards/readme.md
@@ -51,5 +51,6 @@ These keyboards are part of the QMK repository, but their manufacturers are not
51* [S60-x](/keyboards/s60-x) &mdash; DIY compact keyboard designed by VinnyCordeiro for Sentraq. 51* [S60-x](/keyboards/s60-x) &mdash; DIY compact keyboard designed by VinnyCordeiro for Sentraq.
52* [Satan](/keyboards/satan) &mdash; A GH60 variant. 52* [Satan](/keyboards/satan) &mdash; A GH60 variant.
53* [SixKeyBoard](/keyboards/sixkeyboard) &mdash; A 6-key keyboard made by TechKeys. 53* [SixKeyBoard](/keyboards/sixkeyboard) &mdash; A 6-key keyboard made by TechKeys.
54* [TheVan 44](/keyboars/tv44) &mdash; A 44-key staggered keybard by Evangs. 54* [TheVan 44](/keyboards/tv44) &mdash; A 44-key staggered keybard by Evangs.
55* [WhiteFox](/keyboards/whitefox) &mdash; A 65% keyboard designed as a partnership by matt3o, Massdrop and Input Club
55* [Vision Division](/keyboards/vision_division) &mdash; Full Size / Split Linear Keyboard by IBNobody. 56* [Vision Division](/keyboards/vision_division) &mdash; Full Size / Split Linear Keyboard by IBNobody.
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/default/keymap.c b/keyboards/tv44/keymaps/default/keymap.c
index f3f989f2d..b9fe33a7c 100644
--- a/keyboards/tv44/keymaps/default/keymap.c
+++ b/keyboards/tv44/keymaps/default/keymap.c
@@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
30 [_QW] = { /* Qwerty */ 30 [_QW] = { /* Qwerty */
31 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, 31 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
32 {MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1) }, 32 {MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1) },
33 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_F, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2) }, 33 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2) },
34 {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } 34 {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) }
35 }, 35 },
36 [_DV] = { /* Dvorak */ 36 [_DV] = { /* Dvorak */
diff --git a/keyboards/whitefox/Makefile b/keyboards/whitefox/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/whitefox/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/whitefox/bootloader_defs.h b/keyboards/whitefox/bootloader_defs.h
new file mode 100644
index 000000000..c67153be6
--- /dev/null
+++ b/keyboards/whitefox/bootloader_defs.h
@@ -0,0 +1 @@
#define KIIBOHD_BOOTLOADER
diff --git a/keyboards/whitefox/chconf.h b/keyboards/whitefox/chconf.h
new file mode 100644
index 000000000..d9114ec85
--- /dev/null
+++ b/keyboards/whitefox/chconf.h
@@ -0,0 +1,524 @@
1/*
2 ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/**
18 * @file templates/chconf.h
19 * @brief Configuration file template.
20 * @details A copy of this file must be placed in each project directory, it
21 * contains the application specific kernel settings.
22 *
23 * @addtogroup config
24 * @details Kernel related settings and hooks.
25 * @{
26 */
27
28#ifndef CHCONF_H
29#define CHCONF_H
30
31#define _CHIBIOS_RT_CONF_
32
33/*===========================================================================*/
34/**
35 * @name System timers settings
36 * @{
37 */
38/*===========================================================================*/
39
40/**
41 * @brief System time counter resolution.
42 * @note Allowed values are 16 or 32 bits.
43 */
44#define CH_CFG_ST_RESOLUTION 32
45
46/**
47 * @brief System tick frequency.
48 * @details Frequency of the system timer that drives the system ticks. This
49 * setting also defines the system tick time unit.
50 */
51#define CH_CFG_ST_FREQUENCY 100000
52
53/**
54 * @brief Time delta constant for the tick-less mode.
55 * @note If this value is zero then the system uses the classic
56 * periodic tick. This value represents the minimum number
57 * of ticks that is safe to specify in a timeout directive.
58 * The value one is not valid, timeouts are rounded up to
59 * this value.
60 */
61#define CH_CFG_ST_TIMEDELTA 0
62
63/** @} */
64
65/*===========================================================================*/
66/**
67 * @name Kernel parameters and options
68 * @{
69 */
70/*===========================================================================*/
71
72/**
73 * @brief Round robin interval.
74 * @details This constant is the number of system ticks allowed for the
75 * threads before preemption occurs. Setting this value to zero
76 * disables the preemption for threads with equal priority and the
77 * round robin becomes cooperative. Note that higher priority
78 * threads can still preempt, the kernel is always preemptive.
79 * @note Disabling the round robin preemption makes the kernel more compact
80 * and generally faster.
81 * @note The round robin preemption is not supported in tickless mode and
82 * must be set to zero in that case.
83 */
84#define CH_CFG_TIME_QUANTUM 20
85
86/**
87 * @brief Managed RAM size.
88 * @details Size of the RAM area to be managed by the OS. If set to zero
89 * then the whole available RAM is used. The core memory is made
90 * available to the heap allocator and/or can be used directly through
91 * the simplified core memory allocator.
92 *
93 * @note In order to let the OS manage the whole RAM the linker script must
94 * provide the @p __heap_base__ and @p __heap_end__ symbols.
95 * @note Requires @p CH_CFG_USE_MEMCORE.
96 */
97#define CH_CFG_MEMCORE_SIZE 0
98
99/**
100 * @brief Idle thread automatic spawn suppression.
101 * @details When this option is activated the function @p chSysInit()
102 * does not spawn the idle thread. The application @p main()
103 * function becomes the idle thread and must implement an
104 * infinite loop.
105 */
106#define CH_CFG_NO_IDLE_THREAD FALSE
107
108/* Use __WFI in the idle thread for waiting. Does lower the power
109 * consumption. */
110#define CORTEX_ENABLE_WFI_IDLE TRUE
111
112/** @} */
113
114/*===========================================================================*/
115/**
116 * @name Performance options
117 * @{
118 */
119/*===========================================================================*/
120
121/**
122 * @brief OS optimization.
123 * @details If enabled then time efficient rather than space efficient code
124 * is used when two possible implementations exist.
125 *
126 * @note This is not related to the compiler optimization options.
127 * @note The default is @p TRUE.
128 */
129#define CH_CFG_OPTIMIZE_SPEED TRUE
130
131/** @} */
132
133/*===========================================================================*/
134/**
135 * @name Subsystem options
136 * @{
137 */
138/*===========================================================================*/
139
140/**
141 * @brief Time Measurement APIs.
142 * @details If enabled then the time measurement APIs are included in
143 * the kernel.
144 *
145 * @note The default is @p TRUE.
146 */
147#define CH_CFG_USE_TM FALSE
148
149/**
150 * @brief Threads registry APIs.
151 * @details If enabled then the registry APIs are included in the kernel.
152 *
153 * @note The default is @p TRUE.
154 */
155#define CH_CFG_USE_REGISTRY TRUE
156
157/**
158 * @brief Threads synchronization APIs.
159 * @details If enabled then the @p chThdWait() function is included in
160 * the kernel.
161 *
162 * @note The default is @p TRUE.
163 */
164#define CH_CFG_USE_WAITEXIT TRUE
165
166/**
167 * @brief Semaphores APIs.
168 * @details If enabled then the Semaphores APIs are included in the kernel.
169 *
170 * @note The default is @p TRUE.
171 */
172#define CH_CFG_USE_SEMAPHORES TRUE
173
174/**
175 * @brief Semaphores queuing mode.
176 * @details If enabled then the threads are enqueued on semaphores by
177 * priority rather than in FIFO order.
178 *
179 * @note The default is @p FALSE. Enable this if you have special
180 * requirements.
181 * @note Requires @p CH_CFG_USE_SEMAPHORES.
182 */
183#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
184
185/**
186 * @brief Mutexes APIs.
187 * @details If enabled then the mutexes APIs are included in the kernel.
188 *
189 * @note The default is @p TRUE.
190 */
191#define CH_CFG_USE_MUTEXES TRUE
192
193/**
194 * @brief Enables recursive behavior on mutexes.
195 * @note Recursive mutexes are heavier and have an increased
196 * memory footprint.
197 *
198 * @note The default is @p FALSE.
199 * @note Requires @p CH_CFG_USE_MUTEXES.
200 */
201#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
202
203/**
204 * @brief Conditional Variables APIs.
205 * @details If enabled then the conditional variables APIs are included
206 * in the kernel.
207 *
208 * @note The default is @p TRUE.
209 * @note Requires @p CH_CFG_USE_MUTEXES.
210 */
211#define CH_CFG_USE_CONDVARS TRUE
212
213/**
214 * @brief Conditional Variables APIs with timeout.
215 * @details If enabled then the conditional variables APIs with timeout
216 * specification are included in the kernel.
217 *
218 * @note The default is @p TRUE.
219 * @note Requires @p CH_CFG_USE_CONDVARS.
220 */
221#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
222
223/**
224 * @brief Events Flags APIs.
225 * @details If enabled then the event flags APIs are included in the kernel.
226 *
227 * @note The default is @p TRUE.
228 */
229#define CH_CFG_USE_EVENTS TRUE
230
231/**
232 * @brief Events Flags APIs with timeout.
233 * @details If enabled then the events APIs with timeout specification
234 * are included in the kernel.
235 *
236 * @note The default is @p TRUE.
237 * @note Requires @p CH_CFG_USE_EVENTS.
238 */
239#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
240
241/**
242 * @brief Synchronous Messages APIs.
243 * @details If enabled then the synchronous messages APIs are included
244 * in the kernel.
245 *
246 * @note The default is @p TRUE.
247 */
248#define CH_CFG_USE_MESSAGES TRUE
249
250/**
251 * @brief Synchronous Messages queuing mode.
252 * @details If enabled then messages are served by priority rather than in
253 * FIFO order.
254 *
255 * @note The default is @p FALSE. Enable this if you have special
256 * requirements.
257 * @note Requires @p CH_CFG_USE_MESSAGES.
258 */
259#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
260
261/**
262 * @brief Mailboxes APIs.
263 * @details If enabled then the asynchronous messages (mailboxes) APIs are
264 * included in the kernel.
265 *
266 * @note The default is @p TRUE.
267 * @note Requires @p CH_CFG_USE_SEMAPHORES.
268 */
269#define CH_CFG_USE_MAILBOXES TRUE
270
271/**
272 * @brief Core Memory Manager APIs.
273 * @details If enabled then the core memory manager APIs are included
274 * in the kernel.
275 *
276 * @note The default is @p TRUE.
277 */
278#define CH_CFG_USE_MEMCORE TRUE
279
280/**
281 * @brief Heap Allocator APIs.
282 * @details If enabled then the memory heap allocator APIs are included
283 * in the kernel.
284 *
285 * @note The default is @p TRUE.
286 * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
287 * @p CH_CFG_USE_SEMAPHORES.
288 * @note Mutexes are recommended.
289 */
290#define CH_CFG_USE_HEAP TRUE
291
292/**
293 * @brief Memory Pools Allocator APIs.
294 * @details If enabled then the memory pools allocator APIs are included
295 * in the kernel.
296 *
297 * @note The default is @p TRUE.
298 */
299#define CH_CFG_USE_MEMPOOLS TRUE
300
301/**
302 * @brief Dynamic Threads APIs.
303 * @details If enabled then the dynamic threads creation APIs are included
304 * in the kernel.
305 *
306 * @note The default is @p TRUE.
307 * @note Requires @p CH_CFG_USE_WAITEXIT.
308 * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
309 */
310#define CH_CFG_USE_DYNAMIC TRUE
311
312/** @} */
313
314/*===========================================================================*/
315/**
316 * @name Debug options
317 * @{
318 */
319/*===========================================================================*/
320
321/**
322 * @brief Debug option, kernel statistics.
323 *
324 * @note The default is @p FALSE.
325 */
326#define CH_DBG_STATISTICS FALSE
327
328/**
329 * @brief Debug option, system state check.
330 * @details If enabled the correct call protocol for system APIs is checked
331 * at runtime.
332 *
333 * @note The default is @p FALSE.
334 */
335#define CH_DBG_SYSTEM_STATE_CHECK FALSE
336
337/**
338 * @brief Debug option, parameters checks.
339 * @details If enabled then the checks on the API functions input
340 * parameters are activated.
341 *
342 * @note The default is @p FALSE.
343 */
344#define CH_DBG_ENABLE_CHECKS FALSE
345
346/**
347 * @brief Debug option, consistency checks.
348 * @details If enabled then all the assertions in the kernel code are
349 * activated. This includes consistency checks inside the kernel,
350 * runtime anomalies and port-defined checks.
351 *
352 * @note The default is @p FALSE.
353 */
354#define CH_DBG_ENABLE_ASSERTS FALSE
355
356/**
357 * @brief Debug option, trace buffer.
358 * @details If enabled then the trace buffer is activated.
359 *
360 * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
361 */
362#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
363
364/**
365 * @brief Trace buffer entries.
366 * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
367 * different from @p CH_DBG_TRACE_MASK_DISABLED.
368 */
369#define CH_DBG_TRACE_BUFFER_SIZE 128
370
371/**
372 * @brief Debug option, stack checks.
373 * @details If enabled then a runtime stack check is performed.
374 *
375 * @note The default is @p FALSE.
376 * @note The stack check is performed in a architecture/port dependent way.
377 * It may not be implemented or some ports.
378 * @note The default failure mode is to halt the system with the global
379 * @p panic_msg variable set to @p NULL.
380 */
381#define CH_DBG_ENABLE_STACK_CHECK FALSE
382
383/**
384 * @brief Debug option, stacks initialization.
385 * @details If enabled then the threads working area is filled with a byte
386 * value when a thread is created. This can be useful for the
387 * runtime measurement of the used stack.
388 *
389 * @note The default is @p FALSE.
390 */
391#define CH_DBG_FILL_THREADS FALSE
392
393/**
394 * @brief Debug option, threads profiling.
395 * @details If enabled then a field is added to the @p thread_t structure that
396 * counts the system ticks occurred while executing the thread.
397 *
398 * @note The default is @p FALSE.
399 * @note This debug option is not currently compatible with the
400 * tickless mode.
401 */
402#define CH_DBG_THREADS_PROFILING FALSE
403
404/** @} */
405
406/*===========================================================================*/
407/**
408 * @name Kernel hooks
409 * @{
410 */
411/*===========================================================================*/
412
413/**
414 * @brief Threads descriptor structure extension.
415 * @details User fields added to the end of the @p thread_t structure.
416 */
417#define CH_CFG_THREAD_EXTRA_FIELDS \
418 /* Add threads custom fields here.*/
419
420/**
421 * @brief Threads initialization hook.
422 * @details User initialization code added to the @p chThdInit() API.
423 *
424 * @note It is invoked from within @p chThdInit() and implicitly from all
425 * the threads creation APIs.
426 */
427#define CH_CFG_THREAD_INIT_HOOK(tp) { \
428 /* Add threads initialization code here.*/ \
429}
430
431/**
432 * @brief Threads finalization hook.
433 * @details User finalization code added to the @p chThdExit() API.
434 */
435#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
436 /* Add threads finalization code here.*/ \
437}
438
439/**
440 * @brief Context switch hook.
441 * @details This hook is invoked just before switching between threads.
442 */
443#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
444 /* Context switch code here.*/ \
445}
446
447/**
448 * @brief ISR enter hook.
449 */
450#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
451 /* IRQ prologue code here.*/ \
452}
453
454/**
455 * @brief ISR exit hook.
456 */
457#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
458 /* IRQ epilogue code here.*/ \
459}
460
461/**
462 * @brief Idle thread enter hook.
463 * @note This hook is invoked within a critical zone, no OS functions
464 * should be invoked from here.
465 * @note This macro can be used to activate a power saving mode.
466 */
467#define CH_CFG_IDLE_ENTER_HOOK() { \
468 /* Idle-enter code here.*/ \
469}
470
471/**
472 * @brief Idle thread leave hook.
473 * @note This hook is invoked within a critical zone, no OS functions
474 * should be invoked from here.
475 * @note This macro can be used to deactivate a power saving mode.
476 */
477#define CH_CFG_IDLE_LEAVE_HOOK() { \
478 /* Idle-leave code here.*/ \
479}
480
481/**
482 * @brief Idle Loop hook.
483 * @details This hook is continuously invoked by the idle thread loop.
484 */
485#define CH_CFG_IDLE_LOOP_HOOK() { \
486 /* Idle loop code here.*/ \
487}
488
489/**
490 * @brief System tick event hook.
491 * @details This hook is invoked in the system tick handler immediately
492 * after processing the virtual timers queue.
493 */
494#define CH_CFG_SYSTEM_TICK_HOOK() { \
495 /* System tick event code here.*/ \
496}
497
498/**
499 * @brief System halt hook.
500 * @details This hook is invoked in case to a system halting error before
501 * the system is halted.
502 */
503#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
504 /* System halt code here.*/ \
505}
506
507/**
508 * @brief Trace hook.
509 * @details This hook is invoked each time a new record is written in the
510 * trace buffer.
511 */
512#define CH_CFG_TRACE_HOOK(tep) { \
513 /* Trace code here.*/ \
514}
515
516/** @} */
517
518/*===========================================================================*/
519/* Port-specific settings (override port settings defaulted in chcore.h). */
520/*===========================================================================*/
521
522#endif /* CHCONF_H */
523
524/** @} */
diff --git a/keyboards/whitefox/config.h b/keyboards/whitefox/config.h
new file mode 100644
index 000000000..b7116341f
--- /dev/null
+++ b/keyboards/whitefox/config.h
@@ -0,0 +1,78 @@
1/*
2Copyright 2015 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#define PREVENT_STUCK_MODIFIERS
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x0F0F
26#define DEVICE_VER 0x0001
27/* in python2: list(u"whatever".encode('utf-16-le')) */
28/* at most 32 characters or the ugly hack in usb_main.c borks */
29#define MANUFACTURER "Input Club"
30#define USBSTR_MANUFACTURER 'I', '\x00', 'n', '\x00', 'p', '\x00', 'u', '\x00', 't', '\x00', ' ', '\x00', 'C', '\x00', 'l', '\x00', 'u', '\x00', 'b', '\x00'
31#define PRODUCT "WhiteFox/QMK"
32#define USBSTR_PRODUCT 'W', '\x00', 'h', '\x00', 'i', '\x00', 't', '\x00', 'e', '\x00', 'F', '\x00', 'o', '\x00', 'x', '\x00', ' ', '\x00'
33
34/* key matrix size */
35#define MATRIX_ROWS 9
36#define MATRIX_COLS 8
37
38/* define if matrix has ghost */
39//#define MATRIX_HAS_GHOST
40
41/* Set 0 if debouncing isn't needed */
42#define DEBOUNCE 6
43
44/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
45//#define LOCKING_SUPPORT_ENABLE
46/* Locking resynchronize hack */
47//#define LOCKING_RESYNC_ENABLE
48
49/* key combination for command */
50#define IS_COMMAND() ( \
51 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
52)
53
54/* Keymap for Infinity prototype */
55//#define INFINITY_PROTOTYPE
56
57/* Keymap for Infinity 1.1a (first revision with LED support) */
58//#define INFINITY_LED
59
60/*
61 * Feature disable options
62 * These options are also useful to firmware size reduction.
63 */
64
65/* disable debug print */
66//#define NO_DEBUG
67
68/* disable print */
69//#define NO_PRINT
70
71/* disable action features */
72//#define NO_ACTION_LAYER
73//#define NO_ACTION_TAPPING
74//#define NO_ACTION_ONESHOT
75//#define NO_ACTION_MACRO
76//#define NO_ACTION_FUNCTION
77
78#endif
diff --git a/keyboards/whitefox/halconf.h b/keyboards/whitefox/halconf.h
new file mode 100644
index 000000000..46b37a4f4
--- /dev/null
+++ b/keyboards/whitefox/halconf.h
@@ -0,0 +1,353 @@
1/*
2 ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/**
18 * @file templates/halconf.h
19 * @brief HAL configuration header.
20 * @details HAL configuration file, this file allows to enable or disable the
21 * various device drivers from your application. You may also use
22 * this file in order to override the device drivers default settings.
23 *
24 * @addtogroup HAL_CONF
25 * @{
26 */
27
28#ifndef _HALCONF_H_
29#define _HALCONF_H_
30
31#include "mcuconf.h"
32
33/**
34 * @brief Enables the PAL subsystem.
35 */
36#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
37#define HAL_USE_PAL TRUE
38#endif
39
40/**
41 * @brief Enables the ADC subsystem.
42 */
43#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
44#define HAL_USE_ADC FALSE
45#endif
46
47/**
48 * @brief Enables the CAN subsystem.
49 */
50#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
51#define HAL_USE_CAN FALSE
52#endif
53
54/**
55 * @brief Enables the DAC subsystem.
56 */
57#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
58#define HAL_USE_DAC FALSE
59#endif
60
61/**
62 * @brief Enables the EXT subsystem.
63 */
64#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
65#define HAL_USE_EXT FALSE
66#endif
67
68/**
69 * @brief Enables the GPT subsystem.
70 */
71#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
72#define HAL_USE_GPT FALSE
73#endif
74
75/**
76 * @brief Enables the I2C subsystem.
77 */
78#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
79#define HAL_USE_I2C FALSE
80#endif
81
82/**
83 * @brief Enables the I2S subsystem.
84 */
85#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
86#define HAL_USE_I2S FALSE
87#endif
88
89/**
90 * @brief Enables the ICU subsystem.
91 */
92#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
93#define HAL_USE_ICU FALSE
94#endif
95
96/**
97 * @brief Enables the MAC subsystem.
98 */
99#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
100#define HAL_USE_MAC FALSE
101#endif
102
103/**
104 * @brief Enables the MMC_SPI subsystem.
105 */
106#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
107#define HAL_USE_MMC_SPI FALSE
108#endif
109
110/**
111 * @brief Enables the PWM subsystem.
112 */
113#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
114#define HAL_USE_PWM FALSE
115#endif
116
117/**
118 * @brief Enables the RTC subsystem.
119 */
120#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
121#define HAL_USE_RTC FALSE
122#endif
123
124/**
125 * @brief Enables the SDC subsystem.
126 */
127#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
128#define HAL_USE_SDC FALSE
129#endif
130
131/**
132 * @brief Enables the SERIAL subsystem.
133 */
134#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
135#define HAL_USE_SERIAL FALSE
136#endif
137
138/**
139 * @brief Enables the SERIAL over USB subsystem.
140 */
141#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
142#define HAL_USE_SERIAL_USB TRUE
143#endif
144
145/**
146 * @brief Enables the SPI subsystem.
147 */
148#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
149#define HAL_USE_SPI FALSE
150#endif
151
152/**
153 * @brief Enables the UART subsystem.
154 */
155#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
156#define HAL_USE_UART FALSE
157#endif
158
159/**
160 * @brief Enables the USB subsystem.
161 */
162#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
163#define HAL_USE_USB TRUE
164#endif
165
166/**
167 * @brief Enables the WDG subsystem.
168 */
169#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
170#define HAL_USE_WDG FALSE
171#endif
172
173/*===========================================================================*/
174/* ADC driver related settings. */
175/*===========================================================================*/
176
177/**
178 * @brief Enables synchronous APIs.
179 * @note Disabling this option saves both code and data space.
180 */
181#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
182#define ADC_USE_WAIT TRUE
183#endif
184
185/**
186 * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
187 * @note Disabling this option saves both code and data space.
188 */
189#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
190#define ADC_USE_MUTUAL_EXCLUSION TRUE
191#endif
192
193/*===========================================================================*/
194/* CAN driver related settings. */
195/*===========================================================================*/
196
197/**
198 * @brief Sleep mode related APIs inclusion switch.
199 */
200#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
201#define CAN_USE_SLEEP_MODE TRUE
202#endif
203
204/*===========================================================================*/
205/* I2C driver related settings. */
206/*===========================================================================*/
207
208/**
209 * @brief Enables the mutual exclusion APIs on the I2C bus.
210 */
211#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
212#define I2C_USE_MUTUAL_EXCLUSION TRUE
213#endif
214
215/*===========================================================================*/
216/* MAC driver related settings. */
217/*===========================================================================*/
218
219/**
220 * @brief Enables an event sources for incoming packets.
221 */
222#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
223#define MAC_USE_ZERO_COPY FALSE
224#endif
225
226/**
227 * @brief Enables an event sources for incoming packets.
228 */
229#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
230#define MAC_USE_EVENTS TRUE
231#endif
232
233/*===========================================================================*/
234/* MMC_SPI driver related settings. */
235/*===========================================================================*/
236
237/**
238 * @brief Delays insertions.
239 * @details If enabled this options inserts delays into the MMC waiting
240 * routines releasing some extra CPU time for the threads with
241 * lower priority, this may slow down the driver a bit however.
242 * This option is recommended also if the SPI driver does not
243 * use a DMA channel and heavily loads the CPU.
244 */
245#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
246#define MMC_NICE_WAITING TRUE
247#endif
248
249/*===========================================================================*/
250/* SDC driver related settings. */
251/*===========================================================================*/
252
253/**
254 * @brief Number of initialization attempts before rejecting the card.
255 * @note Attempts are performed at 10mS intervals.
256 */
257#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
258#define SDC_INIT_RETRY 100
259#endif
260
261/**
262 * @brief Include support for MMC cards.
263 * @note MMC support is not yet implemented so this option must be kept
264 * at @p FALSE.
265 */
266#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
267#define SDC_MMC_SUPPORT FALSE
268#endif
269
270/**
271 * @brief Delays insertions.
272 * @details If enabled this options inserts delays into the MMC waiting
273 * routines releasing some extra CPU time for the threads with
274 * lower priority, this may slow down the driver a bit however.
275 */
276#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
277#define SDC_NICE_WAITING TRUE
278#endif
279
280/*===========================================================================*/
281/* SERIAL driver related settings. */
282/*===========================================================================*/
283
284/**
285 * @brief Default bit rate.
286 * @details Configuration parameter, this is the baud rate selected for the
287 * default configuration.
288 */
289#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
290#define SERIAL_DEFAULT_BITRATE 38400
291#endif
292
293/**
294 * @brief Serial buffers size.
295 * @details Configuration parameter, you can change the depth of the queue
296 * buffers depending on the requirements of your application.
297 * @note The default is 64 bytes for both the transmission and receive
298 * buffers.
299 */
300#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
301#define SERIAL_BUFFERS_SIZE 16
302#endif
303
304/*===========================================================================*/
305/* SERIAL_USB driver related setting. */
306/*===========================================================================*/
307
308/**
309 * @brief Serial over USB buffers size.
310 * @details Configuration parameter, the buffer size must be a multiple of
311 * the USB data endpoint maximum packet size.
312 * @note The default is 64 bytes for both the transmission and receive
313 * buffers.
314 */
315#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
316#define SERIAL_USB_BUFFERS_SIZE 256
317#endif
318
319/*===========================================================================*/
320/* SPI driver related settings. */
321/*===========================================================================*/
322
323/**
324 * @brief Enables synchronous APIs.
325 * @note Disabling this option saves both code and data space.
326 */
327#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
328#define SPI_USE_WAIT TRUE
329#endif
330
331/**
332 * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
333 * @note Disabling this option saves both code and data space.
334 */
335#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
336#define SPI_USE_MUTUAL_EXCLUSION TRUE
337#endif
338
339/*===========================================================================*/
340/* USB driver related settings. */
341/*===========================================================================*/
342
343/**
344 * @brief Enables synchronous APIs.
345 * @note Disabling this option saves both code and data space.
346 */
347#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
348#define USB_USE_WAIT TRUE
349#endif
350
351#endif /* _HALCONF_H_ */
352
353/** @} */
diff --git a/keyboards/whitefox/keymaps/default/keymap.c b/keyboards/whitefox/keymaps/default/keymap.c
new file mode 100644
index 000000000..714f90659
--- /dev/null
+++ b/keyboards/whitefox/keymaps/default/keymap.c
@@ -0,0 +1,51 @@
1/*
2Copyright 2015 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#include "whitefox.h"
18
19const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 /* Layer 0: Default Layer
21 * ,---------------------------------------------------------------.
22 * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins|
23 * |---------------------------------------------------------------|
24 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|Del|
25 * |---------------------------------------------------------------|
26 * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU|
27 * |---------------------------------------------------------------|
28 * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD|
29 * |---------------------------------------------------------------|
30 * |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig|
31 * `---------------------------------------------------------------'
32 */
33 [0] = KEYMAP( \
34 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_INS, \
35 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \
36 KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\
37 KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\
38 KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_FN0, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \
39 ),
40 [1] = KEYMAP( \
41 KC_TRNS,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_TRNS,KC_TRNS,KC_MUTE,\
42 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, KC_TRNS,\
43 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,KC_TRNS, KC_VOLU,\
44 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, KC_PGUP,KC_VOLD,\
45 KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \
46 ),
47};
48
49const uint16_t fn_actions[] = {
50 [0] = ACTION_LAYER_MOMENTARY(1),
51};
diff --git a/keyboards/whitefox/keymaps/matt3o/keymap.c b/keyboards/whitefox/keymaps/matt3o/keymap.c
new file mode 100644
index 000000000..4455886a5
--- /dev/null
+++ b/keyboards/whitefox/keymaps/matt3o/keymap.c
@@ -0,0 +1,92 @@
1/*
2Copyright 2015 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#include "whitefox.h"
18
19const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 /* Layer 0: Default Layer
21 * ,---------------------------------------------------------------.
22 * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins|
23 * |---------------------------------------------------------------|
24 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|Del|
25 * |---------------------------------------------------------------|
26 * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU|
27 * |---------------------------------------------------------------|
28 * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD|
29 * |---------------------------------------------------------------|
30 * |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig|
31 * `---------------------------------------------------------------'
32 */
33 [0] = KEYMAP( \
34 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_MUTE,\
35 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \
36 KC_FN0, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\
37 KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\
38 KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_FN1, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \
39 ),
40 [1] = KEYMAP( \
41 KC_TRNS,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_TRNS,KC_TRNS,KC_TRNS,\
42 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,KC_DEL , KC_INS ,\
43 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,KC_TRNS, KC_VOLU,\
44 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, KC_PGUP,KC_VOLD,\
45 KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \
46 ),
47 [2] = KEYMAP( \
48 KC_SLEP,KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN2, \
49 KC_TRNS,KC_TRNS,KC_FN5 ,KC_FN6 ,KC_TRNS,KC_FN7 ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_TRNS,KC_TRNS,KC_TRNS, KC_FN3, \
50 KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN4 ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,\
51 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_TRNS,KC_TRNS,KC_TRNS,KC_MAIL,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,\
52 KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS \
53 ),
54};
55
56/* Give numbers some descriptive names */
57#define ACTION_LEDS_ALL 1
58#define ACTION_LEDS_GAME 2
59
60const uint16_t fn_actions[] = {
61 [0] = ACTION_LAYER_MOMENTARY(1),
62 [1] = ACTION_LAYER_MOMENTARY(2),
63 [2] = ACTION_FUNCTION(ACTION_LEDS_ALL),
64 [3] = ACTION_FUNCTION(ACTION_LEDS_GAME),
65
66 [4] = ACTION_USAGE_CONSUMER(0x1B4),
67 [5] = ACTION_USAGE_CONSUMER(0x196),
68 [6] = ACTION_USAGE_CONSUMER(0x1A6),
69 [7] = ACTION_USAGE_CONSUMER(0x1A0),
70
71};
72
73/* custom action function */
74void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
75 /*
76 (void)opt;
77 switch(id) {
78 case ACTION_LEDS_ALL:
79 if(record->event.pressed) {
80 // signal the LED controller thread
81 chMBPost(&led_mailbox, LED_MSG_GAME_TOGGLE, TIME_IMMEDIATE);
82 }
83 break;
84 case ACTION_LEDS_GAME:
85 if(record->event.pressed) {
86 // signal the LED controller thread
87 chMBPost(&led_mailbox, LED_MSG_ALL_TOGGLE, TIME_IMMEDIATE);
88 }
89 break;
90 }
91 */
92}
diff --git a/keyboards/whitefox/led.c b/keyboards/whitefox/led.c
new file mode 100644
index 000000000..aed66c7c0
--- /dev/null
+++ b/keyboards/whitefox/led.c
@@ -0,0 +1,24 @@
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#include "hal.h"
19
20#include "led.h"
21
22
23void led_set(uint8_t usb_led) {
24}
diff --git a/keyboards/whitefox/matrix.c b/keyboards/whitefox/matrix.c
new file mode 100644
index 000000000..9202ab023
--- /dev/null
+++ b/keyboards/whitefox/matrix.c
@@ -0,0 +1,132 @@
1#include <stdint.h>
2#include <stdbool.h>
3#include <string.h>
4#include "hal.h"
5#include "timer.h"
6#include "wait.h"
7#include "print.h"
8#include "matrix.h"
9
10
11/*
12 * Matt3o's WhiteFox
13 * Column pins are input with internal pull-down. Row pins are output and strobe with high.
14 * Key is high or 1 when it turns on.
15 *
16 * col: { PTD0, PTD1, PTD4, PTD5, PTD6, PTD7, PTC1, PTC2 }
17 * row: { PTB2, PTB3, PTB18, PTB19, PTC0, PTC8, PTC9, PTC10, PTC11 }
18 */
19/* matrix state(1:on, 0:off) */
20static matrix_row_t matrix[MATRIX_ROWS];
21static matrix_row_t matrix_debouncing[MATRIX_ROWS];
22static bool debouncing = false;
23static uint16_t debouncing_time = 0;
24
25
26void matrix_init(void)
27{
28//debug_matrix = true;
29 /* Column(sense) */
30 palSetPadMode(GPIOD, 0, PAL_MODE_INPUT_PULLDOWN);
31 palSetPadMode(GPIOD, 1, PAL_MODE_INPUT_PULLDOWN);
32 palSetPadMode(GPIOD, 4, PAL_MODE_INPUT_PULLDOWN);
33 palSetPadMode(GPIOD, 5, PAL_MODE_INPUT_PULLDOWN);
34 palSetPadMode(GPIOD, 6, PAL_MODE_INPUT_PULLDOWN);
35 palSetPadMode(GPIOD, 7, PAL_MODE_INPUT_PULLDOWN);
36 palSetPadMode(GPIOC, 1, PAL_MODE_INPUT_PULLDOWN);
37 palSetPadMode(GPIOC, 2, PAL_MODE_INPUT_PULLDOWN);
38
39 /* Row(strobe) */
40 palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL);
41 palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL);
42 palSetPadMode(GPIOB, 18, PAL_MODE_OUTPUT_PUSHPULL);
43 palSetPadMode(GPIOB, 19, PAL_MODE_OUTPUT_PUSHPULL);
44 palSetPadMode(GPIOC, 0, PAL_MODE_OUTPUT_PUSHPULL);
45 palSetPadMode(GPIOC, 8, PAL_MODE_OUTPUT_PUSHPULL);
46 palSetPadMode(GPIOC, 9, PAL_MODE_OUTPUT_PUSHPULL);
47 palSetPadMode(GPIOC, 10, PAL_MODE_OUTPUT_PUSHPULL);
48 palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL);
49
50 memset(matrix, 0, MATRIX_ROWS);
51 memset(matrix_debouncing, 0, MATRIX_ROWS);
52}
53
54uint8_t matrix_scan(void)
55{
56 for (int row = 0; row < MATRIX_ROWS; row++) {
57 matrix_row_t data = 0;
58
59 // strobe row
60 switch (row) {
61 case 0: palSetPad(GPIOB, 2); break;
62 case 1: palSetPad(GPIOB, 3); break;
63 case 2: palSetPad(GPIOB, 18); break;
64 case 3: palSetPad(GPIOB, 19); break;
65 case 4: palSetPad(GPIOC, 0); break;
66 case 5: palSetPad(GPIOC, 8); break;
67 case 6: palSetPad(GPIOC, 9); break;
68 case 7: palSetPad(GPIOC, 10); break;
69 case 8: palSetPad(GPIOC, 11); break;
70 }
71
72 wait_us(20); // need wait to settle pin state
73
74 // read col data: { PTD0, PTD1, PTD4, PTD5, PTD6, PTD7, PTC1, PTC2 }
75 data = ((palReadPort(GPIOC) & 0x06UL) << 5) |
76 ((palReadPort(GPIOD) & 0xF0UL) >> 2) |
77 (palReadPort(GPIOD) & 0x03UL);
78
79 // un-strobe row
80 switch (row) {
81 case 0: palClearPad(GPIOB, 2); break;
82 case 1: palClearPad(GPIOB, 3); break;
83 case 2: palClearPad(GPIOB, 18); break;
84 case 3: palClearPad(GPIOB, 19); break;
85 case 4: palClearPad(GPIOC, 0); break;
86 case 5: palClearPad(GPIOC, 8); break;
87 case 6: palClearPad(GPIOC, 9); break;
88 case 7: palClearPad(GPIOC, 10); break;
89 case 8: palClearPad(GPIOC, 11); break;
90 }
91
92 if (matrix_debouncing[row] != data) {
93 matrix_debouncing[row] = data;
94 debouncing = true;
95 debouncing_time = timer_read();
96 }
97 }
98
99 if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
100 for (int row = 0; row < MATRIX_ROWS; row++) {
101 matrix[row] = matrix_debouncing[row];
102 }
103 debouncing = false;
104 }
105 return 1;
106}
107
108bool matrix_is_on(uint8_t row, uint8_t col)
109{
110 return (matrix[row] & (1<<col));
111}
112
113matrix_row_t matrix_get_row(uint8_t row)
114{
115 return matrix[row];
116}
117
118void matrix_print(void)
119{
120 xprintf("\nr/c 01234567\n");
121 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
122 xprintf("%X0: ", row);
123 matrix_row_t data = matrix_get_row(row);
124 for (int col = 0; col < MATRIX_COLS; col++) {
125 if (data & (1<<col))
126 xprintf("1");
127 else
128 xprintf("0");
129 }
130 xprintf("\n");
131 }
132}
diff --git a/keyboards/whitefox/mcuconf.h b/keyboards/whitefox/mcuconf.h
new file mode 100644
index 000000000..28f3c6cda
--- /dev/null
+++ b/keyboards/whitefox/mcuconf.h
@@ -0,0 +1,54 @@
1/*
2 ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17#ifndef _MCUCONF_H_
18#define _MCUCONF_H_
19
20#define K20x_MCUCONF
21
22/*
23 * HAL driver system settings.
24 */
25
26/* Select the MCU clocking mode below by enabling the appropriate block. */
27
28#define KINETIS_NO_INIT FALSE
29
30/* PEE mode - 48MHz system clock driven by external crystal. */
31#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE
32#define KINETIS_PLLCLK_FREQUENCY 72000000UL
33#define KINETIS_SYSCLK_FREQUENCY 72000000UL
34#define KINETIS_BUSCLK_FREQUENCY 36000000UL
35#define KINETIS_FLASHCLK_FREQUENCY 24000000UL
36
37/*
38 * SERIAL driver system settings.
39 */
40#define KINETIS_SERIAL_USE_UART0 TRUE
41
42/*
43 * USB driver settings
44 */
45#define KINETIS_USB_USE_USB0 TRUE
46#define KINETIS_USB_USB0_IRQ_PRIORITY 5
47
48/*
49 * I2C driver settings
50 */
51#define KINETIS_I2C_USE_I2C0 TRUE
52#define KINETIS_I2C_I2C0_PRIORITY 4
53
54#endif /* _MCUCONF_H_ */
diff --git a/keyboards/whitefox/readme.md b/keyboards/whitefox/readme.md
new file mode 100644
index 000000000..0714ad563
--- /dev/null
+++ b/keyboards/whitefox/readme.md
@@ -0,0 +1,7 @@
1WhiteFox keyboard firmware
2======================
3
4This is an experimental port which came from the original TMK WhiteFox repo.
5
6The LED controller was not ported, as the original was a dirty hack and it would
7be good to have complete support.
diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk
new file mode 100644
index 000000000..18b690f49
--- /dev/null
+++ b/keyboards/whitefox/rules.mk
@@ -0,0 +1,68 @@
1# project specific files
2SRC = matrix.c \
3 led.c
4
5## chip/board settings
6# - the next two should match the directories in
7# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
8# - For Teensies, FAMILY = KINETIS and SERIES is either
9# KL2x (LC) or K20x (3.0,3.1,3.2).
10# - For Infinity KB, SERIES = K20x
11MCU_FAMILY = KINETIS
12MCU_SERIES = K20x
13
14# Linker script to use
15# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
16# or <this_dir>/ld/
17# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
18# - LDSCRIPT =
19# - MKL26Z64 for Teensy LC
20# - MK20DX128 for Teensy 3.0
21# - MK20DX256 for Teensy 3.1 and 3.2
22# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader
23# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader
24MCU_LDSCRIPT = MK20DX256BLDR8
25
26# Startup code to use
27# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
28# - STARTUP =
29# - kl2x for Teensy LC
30# - k20x5 for Teensy 3.0 and Infinity KB
31# - k20x7 for Teensy 3.1 and 3.2
32MCU_STARTUP = k20x7
33
34# Board: it should exist either in <chibios>/os/hal/boards/
35# or <this_dir>/boards
36# - BOARD =
37# - PJRC_TEENSY_LC for Teensy LC
38# - PJRC_TEENSY_3 for Teensy 3.0
39# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
40# - MCHCK_K20 for Infinity KB
41BOARD = PJRC_TEENSY_3_1
42
43# Cortex version
44# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
45MCU = cortex-m4
46
47# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
48# I.e. 6 for Teensy LC; 7 for Teensy 3.x
49ARMV = 7
50
51# Vector table for application
52# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
53# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
54#OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000
55OPT_DEFS =
56
57# Build Options
58# comment out to disable the options.
59#
60BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration
61## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
62MOUSEKEY_ENABLE ?= yes # Mouse keys
63EXTRAKEY_ENABLE ?= yes # Audio control and System control
64#CONSOLE_ENABLE ?= yes # Console for debug
65COMMAND_ENABLE ?= yes # Commands for debug and configuration
66#SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
67NKRO_ENABLE ?= yes # USB Nkey Rollover
68CUSTOM_MATRIX ?= yes # Custom matrix file
diff --git a/keyboards/whitefox/whitefox.c b/keyboards/whitefox/whitefox.c
new file mode 100644
index 000000000..d35bf8338
--- /dev/null
+++ b/keyboards/whitefox/whitefox.c
@@ -0,0 +1,17 @@
1/*
2Copyright 2012,2013 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#include "whitefox.h"
diff --git a/keyboards/whitefox/whitefox.h b/keyboards/whitefox/whitefox.h
new file mode 100644
index 000000000..3b3c6bd21
--- /dev/null
+++ b/keyboards/whitefox/whitefox.h
@@ -0,0 +1,54 @@
1/*
2Copyright 2014 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#ifndef WHITEFOX_H
18#define WHITEFOX_H
19
20#include "quantum.h"
21
22/* WhiteFox
23 * ,---------------------------------------------------------------.
24 * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins|
25 * |---------------------------------------------------------------|
26 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|Del|
27 * |---------------------------------------------------------------|
28 * |CapsL | A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU|
29 * |---------------------------------------------------------------|
30 * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD|
31 * |---------------------------------------------------------------|
32 * |Ctrl|Gui |Alt | Space |App |Alt |Gui | |Lef|Dow|Rig|
33 * `---------------------------------------------------------------'
34 */
35
36#define KEYMAP( \
37 K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, K61, \
38 K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \
39 K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K74, K84, K05, \
40 K15, K25, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \
41 K76, K86, K07, K17, K27, K37, K47, K57, K67, K77 \
42) { \
43 { K00, K01, K02, K03, K04, K05, K06, K07 }, \
44 { K10, K11, K12, K13, K14, K15, K16, K17 }, \
45 { K20, K21, K22, K23, K24, K25, K26, K27 }, \
46 { K30, K31, K32, K33, K34, K35, K36, K37 }, \
47 { K40, K41, K42, K43, K44, K45, K46, K47 }, \
48 { K50, K51, K52, K53, K54, K55, K56, K57 }, \
49 { K60, K61, K62, K63, K64, K65, K66, K67 }, \
50 { K70, K71, K72, K73, K74, K75, K76, K77 }, \
51 { K80, K81, K82, K83, K84, K85, K86, KC_NO } \
52}
53
54#endif
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/process_keycode/process_music.c b/quantum/process_keycode/process_music.c
index ca68bef6c..1e2648bff 100644
--- a/quantum/process_keycode/process_music.c
+++ b/quantum/process_keycode/process_music.c
@@ -114,6 +114,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
114 music_sequence_interval+=10; 114 music_sequence_interval+=10;
115 return false; 115 return false;
116 } 116 }
117 #define MUSIC_MODE_GUITAR
117 118
118 #ifdef MUSIC_MODE_CHROMATIC 119 #ifdef MUSIC_MODE_CHROMATIC
119 float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + record->event.key.col + music_offset)/12.0+(MATRIX_ROWS - record->event.key.row)); 120 float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + record->event.key.col + music_offset)/12.0+(MATRIX_ROWS - record->event.key.row));
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/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 5cd3c8e78..4853655f9 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -159,6 +159,8 @@ enum quantum_keycodes {
159#define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT) 159#define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT)
160#define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI) 160#define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI)
161#define ALTG(kc) (kc | QK_RCTL | QK_RALT) 161#define ALTG(kc) (kc | QK_RCTL | QK_RALT)
162#define SCMD(kc) (kc | QK_LGUI | QK_LSFT)
163#define SWIN(kc) SCMD(kc)
162 164
163#define MOD_HYPR 0xf 165#define MOD_HYPR 0xf
164#define MOD_MEH 0x7 166#define MOD_MEH 0x7
@@ -293,6 +295,8 @@ enum quantum_keycodes {
293#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 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
294#define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui 296#define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui
295#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/ 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/
298#define SCMD_T(kc) MT((MOD_LGUI | MOD_LSFT), kc)
299#define SWIN_T(kc) SCMD_T(kc)
296 300
297// Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap 301// Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap
298#define KC_HYPR HYPR(KC_NO) 302#define KC_HYPR HYPR(KC_NO)
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 90584cabc..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 entirity 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.mk b/tmk_core/common.mk
index 3c1373c08..a86dccc61 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -80,6 +80,14 @@ ifeq ($(strip $(SLEEP_LED_ENABLE)), yes)
80 TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN 80 TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN
81endif 81endif
82 82
83ifeq ($(strip $(NO_UART)), yes)
84 TMK_COMMON_DEFS += -DNO_UART
85endif
86
87ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes)
88 TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN
89endif
90
83ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) 91ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
84 TMK_COMMON_SRC += $(COMMON_DIR)/backlight.c 92 TMK_COMMON_SRC += $(COMMON_DIR)/backlight.c
85 TMK_COMMON_DEFS += -DBACKLIGHT_ENABLE 93 TMK_COMMON_DEFS += -DBACKLIGHT_ENABLE
diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c
index ad547b985..34db8d0b0 100644
--- a/tmk_core/common/avr/bootloader.c
+++ b/tmk_core/common/avr/bootloader.c
@@ -1,6 +1,7 @@
1#include <stdint.h> 1#include <stdint.h>
2#include <stdbool.h> 2#include <stdbool.h>
3#include <avr/io.h> 3#include <avr/io.h>
4#include <avr/eeprom.h>
4#include <avr/interrupt.h> 5#include <avr/interrupt.h>
5#include <avr/wdt.h> 6#include <avr/wdt.h>
6#include <util/delay.h> 7#include <util/delay.h>
@@ -89,6 +90,12 @@ void bootloader_jump(void) {
89 _delay_ms(5); 90 _delay_ms(5);
90 #endif 91 #endif
91 92
93 #ifdef BOOTLOADHID_BOOTLOADER
94 // force bootloadHID to stay in bootloader mode, so that it waits
95 // for a new firmware to be flashed
96 eeprom_write_byte((uint8_t *)1, 0x00);
97 #endif
98
92 // watchdog reset 99 // watchdog reset
93 reset_key = BOOTLOADER_RESET_KEY; 100 reset_key = BOOTLOADER_RESET_KEY;
94 wdt_enable(WDTO_250MS); 101 wdt_enable(WDTO_250MS);
@@ -114,6 +121,11 @@ void bootloader_jump(void) {
114 #endif 121 #endif
115} 122}
116 123
124#ifdef __AVR_ATmega32A__
125// MCUSR is actually called MCUCSR in ATmega32A
126#define MCUSR MCUCSR
127#endif
128
117/* this runs before main() */ 129/* this runs before main() */
118void bootloader_jump_after_watchdog_reset(void) __attribute__ ((used, naked, section (".init3"))); 130void bootloader_jump_after_watchdog_reset(void) __attribute__ ((used, naked, section (".init3")));
119void bootloader_jump_after_watchdog_reset(void) 131void bootloader_jump_after_watchdog_reset(void)
diff --git a/tmk_core/common/avr/timer.c b/tmk_core/common/avr/timer.c
index 84af44488..369015200 100644
--- a/tmk_core/common/avr/timer.c
+++ b/tmk_core/common/avr/timer.c
@@ -29,25 +29,35 @@ volatile uint32_t timer_count;
29 29
30void timer_init(void) 30void timer_init(void)
31{ 31{
32 // Timer0 CTC mode
33 TCCR0A = 0x02;
34
35#if TIMER_PRESCALER == 1 32#if TIMER_PRESCALER == 1
36 TCCR0B = 0x01; 33 uint8_t prescaler = 0x01;
37#elif TIMER_PRESCALER == 8 34#elif TIMER_PRESCALER == 8
38 TCCR0B = 0x02; 35 uint8_t prescaler = 0x02;
39#elif TIMER_PRESCALER == 64 36#elif TIMER_PRESCALER == 64
40 TCCR0B = 0x03; 37 uint8_t prescaler = 0x03;
41#elif TIMER_PRESCALER == 256 38#elif TIMER_PRESCALER == 256
42 TCCR0B = 0x04; 39 uint8_t prescaler = 0x04;
43#elif TIMER_PRESCALER == 1024 40#elif TIMER_PRESCALER == 1024
44 TCCR0B = 0x05; 41 uint8_t prescaler = 0x05;
45#else 42#else
46# error "Timer prescaler value is NOT vaild." 43# error "Timer prescaler value is NOT vaild."
47#endif 44#endif
48 45
46#ifndef __AVR_ATmega32A__
47 // Timer0 CTC mode
48 TCCR0A = 0x02;
49
50 TCCR0B = prescaler;
51
49 OCR0A = TIMER_RAW_TOP; 52 OCR0A = TIMER_RAW_TOP;
50 TIMSK0 = (1<<OCIE0A); 53 TIMSK0 = (1<<OCIE0A);
54#else
55 // Timer0 CTC mode
56 TCCR0 = (1 << WGM01) | prescaler;
57
58 OCR0 = TIMER_RAW_TOP;
59 TIMSK = (1 << OCIE0);
60#endif
51} 61}
52 62
53inline 63inline
@@ -107,7 +117,12 @@ uint32_t timer_elapsed32(uint32_t last)
107} 117}
108 118
109// excecuted once per 1ms.(excess for just timer count?) 119// excecuted once per 1ms.(excess for just timer count?)
110ISR(TIMER0_COMPA_vect) 120#ifndef __AVR_ATmega32A__
121#define TIMER_INTERRUPT_VECTOR TIMER0_COMPA_vect
122#else
123#define TIMER_INTERRUPT_VECTOR TIMER0_COMP_vect
124#endif
125ISR(TIMER_INTERRUPT_VECTOR, ISR_NOBLOCK)
111{ 126{
112 timer_count++; 127 timer_count++;
113} 128}
diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c
index 5f29bc0b4..f79d5a257 100644
--- a/tmk_core/common/command.c
+++ b/tmk_core/common/command.c
@@ -235,8 +235,11 @@ static void print_status(void)
235 print("\n\t- Status -\n"); 235 print("\n\t- Status -\n");
236 236
237 print_val_hex8(host_keyboard_leds()); 237 print_val_hex8(host_keyboard_leds());
238#ifndef PROTOCOL_VUSB
239 // these aren't set on the V-USB protocol, so we just ignore them for now
238 print_val_hex8(keyboard_protocol); 240 print_val_hex8(keyboard_protocol);
239 print_val_hex8(keyboard_idle); 241 print_val_hex8(keyboard_idle);
242#endif
240#ifdef NKRO_ENABLE 243#ifdef NKRO_ENABLE
241 print_val_hex8(keymap_config.nkro); 244 print_val_hex8(keymap_config.nkro);
242#endif 245#endif
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 371d93f3e..765350792 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -188,7 +188,7 @@ MATRIX_LOOP_END:
188#endif 188#endif
189 189
190#ifdef VISUALIZER_ENABLE 190#ifdef VISUALIZER_ENABLE
191 visualizer_update(default_layer_state, layer_state, host_keyboard_leds()); 191 visualizer_update(default_layer_state, layer_state, visualizer_get_mods(), host_keyboard_leds());
192#endif 192#endif
193 193
194 // update LED 194 // update LED
diff --git a/tmk_core/protocol/vusb.mk b/tmk_core/protocol/vusb.mk
index 3cba3f71a..897b833e1 100644
--- a/tmk_core/protocol/vusb.mk
+++ b/tmk_core/protocol/vusb.mk
@@ -18,4 +18,5 @@ endif
18 18
19 19
20# Search Path 20# Search Path
21VPATH += $(TMK_DIR)/protocol/vusb:$(TMK_DIR)/protocol/vusb/usbdrv 21VPATH += $(TMK_PATH)/$(VUSB_DIR)
22VPATH += $(TMK_PATH)/$(VUSB_DIR)/usbdrv
diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c
index 8e4a266e9..f6a0c7e9a 100644
--- a/tmk_core/protocol/vusb/main.c
+++ b/tmk_core/protocol/vusb/main.c
@@ -48,8 +48,12 @@ int main(void)
48 uint16_t last_timer = timer_read(); 48 uint16_t last_timer = timer_read();
49#endif 49#endif
50 50
51#ifdef CLKPR
52 // avoid unintentional changes of clock frequency in devices that have a
53 // clock prescaler
51 CLKPR = 0x80, CLKPR = 0; 54 CLKPR = 0x80, CLKPR = 0;
52#ifndef PS2_USE_USART 55#endif
56#ifndef NO_UART
53 uart_init(UART_BAUD_RATE); 57 uart_init(UART_BAUD_RATE);
54#endif 58#endif
55 59
diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c
index eaa1c512d..a8c13b928 100644
--- a/tmk_core/protocol/vusb/vusb.c
+++ b/tmk_core/protocol/vusb/vusb.c
@@ -15,6 +15,8 @@ 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 17
18#include <avr/eeprom.h>
19#include <avr/wdt.h>
18#include <stdint.h> 20#include <stdint.h>
19#include "usbdrv.h" 21#include "usbdrv.h"
20#include "usbconfig.h" 22#include "usbconfig.h"
@@ -24,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
24#include "debug.h" 26#include "debug.h"
25#include "host_driver.h" 27#include "host_driver.h"
26#include "vusb.h" 28#include "vusb.h"
29#include "bootloader.h"
27 30
28 31
29static uint8_t vusb_keyboard_leds = 0; 32static uint8_t vusb_keyboard_leds = 0;
@@ -163,6 +166,7 @@ static struct {
163 uint16_t len; 166 uint16_t len;
164 enum { 167 enum {
165 NONE, 168 NONE,
169 BOOTLOADER,
166 SET_LED 170 SET_LED
167 } kind; 171 } kind;
168} last_req; 172} last_req;
@@ -193,6 +197,11 @@ usbRequest_t *rq = (void *)data;
193 debug("SET_LED: "); 197 debug("SET_LED: ");
194 last_req.kind = SET_LED; 198 last_req.kind = SET_LED;
195 last_req.len = rq->wLength.word; 199 last_req.len = rq->wLength.word;
200#ifdef BOOTLOADER_SIZE
201 } else if(rq->wValue.word == 0x0301) {
202 last_req.kind = BOOTLOADER;
203 last_req.len = rq->wLength.word;
204#endif
196 } 205 }
197 return USB_NO_MSG; // to get data in usbFunctionWrite 206 return USB_NO_MSG; // to get data in usbFunctionWrite
198 } else { 207 } else {
@@ -220,6 +229,11 @@ uchar usbFunctionWrite(uchar *data, uchar len)
220 last_req.len = 0; 229 last_req.len = 0;
221 return 1; 230 return 1;
222 break; 231 break;
232 case BOOTLOADER:
233 usbDeviceDisconnect();
234 bootloader_jump();
235 return 1;
236 break;
223 case NONE: 237 case NONE:
224 default: 238 default:
225 return -1; 239 return -1;
@@ -266,7 +280,7 @@ const PROGMEM uchar keyboard_hid_report[] = {
266 0x95, 0x06, // Report Count (6), 280 0x95, 0x06, // Report Count (6),
267 0x75, 0x08, // Report Size (8), 281 0x75, 0x08, // Report Size (8),
268 0x15, 0x00, // Logical Minimum (0), 282 0x15, 0x00, // Logical Minimum (0),
269 0x25, 0xFF, 0x00 // Logical Maximum(255), 283 0x25, 0xFF, 0x00, // Logical Maximum(255),
270 0x05, 0x07, // Usage Page (Key Codes), 284 0x05, 0x07, // Usage Page (Key Codes),
271 0x19, 0x00, // Usage Minimum (0), 285 0x19, 0x00, // Usage Minimum (0),
272 0x29, 0xFF, // Usage Maximum (255), 286 0x29, 0xFF, // Usage Maximum (255),
@@ -336,7 +350,7 @@ const PROGMEM uchar mouse_hid_report[] = {
336 0xa1, 0x01, // COLLECTION (Application) 350 0xa1, 0x01, // COLLECTION (Application)
337 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2) 351 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2)
338 0x15, 0x01, // LOGICAL_MINIMUM (0x1) 352 0x15, 0x01, // LOGICAL_MINIMUM (0x1)
339 0x25, 0xb7, 0x00 // LOGICAL_MAXIMUM (0xb7) 353 0x25, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7)
340 0x19, 0x01, // USAGE_MINIMUM (0x1) 354 0x19, 0x01, // USAGE_MINIMUM (0x1)
341 0x29, 0xb7, // USAGE_MAXIMUM (0xb7) 355 0x29, 0xb7, // USAGE_MAXIMUM (0xb7)
342 0x75, 0x10, // REPORT_SIZE (16) 356 0x75, 0x10, // REPORT_SIZE (16)
@@ -481,11 +495,11 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq)
481 /* interface index */ 495 /* interface index */
482 switch (rq->wIndex.word) { 496 switch (rq->wIndex.word) {
483 case 0: 497 case 0:
484 usbMsgPtr = keyboard_hid_report; 498 usbMsgPtr = (unsigned char *)keyboard_hid_report;
485 len = sizeof(keyboard_hid_report); 499 len = sizeof(keyboard_hid_report);
486 break; 500 break;
487 case 1: 501 case 1:
488 usbMsgPtr = mouse_hid_report; 502 usbMsgPtr = (unsigned char *)mouse_hid_report;
489 len = sizeof(mouse_hid_report); 503 len = sizeof(mouse_hid_report);
490 break; 504 break;
491 } 505 }