diff options
22 files changed, 715 insertions, 153 deletions
diff --git a/.travis.yml b/.travis.yml index b206d1451..792f2cd05 100644 --- a/.travis.yml +++ b/.travis.yml | |||
| @@ -5,6 +5,7 @@ language: c | |||
| 5 | branches: | 5 | branches: |
| 6 | except: | 6 | except: |
| 7 | - /^.*-automated-build$/ | 7 | - /^.*-automated-build$/ |
| 8 | - /^[0-9]+\.[0-9]+\.[0-9]+/ | ||
| 8 | env: | 9 | env: |
| 9 | global: | 10 | global: |
| 10 | - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= | 11 | - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= |
| @@ -19,7 +20,7 @@ install: | |||
| 19 | before_script: | 20 | before_script: |
| 20 | - avr-gcc --version | 21 | - avr-gcc --version |
| 21 | script: | 22 | script: |
| 22 | - make $TARGET AUTOGEN=$AUTOGEN | 23 | - 'if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then make $TARGET AUTOGEN=$AUTOGEN; fi' |
| 23 | addons: | 24 | addons: |
| 24 | apt: | 25 | apt: |
| 25 | packages: | 26 | packages: |
diff --git a/Dockerfile b/Dockerfile index c42bbeb32..744ded857 100644 --- a/Dockerfile +++ b/Dockerfile | |||
| @@ -25,4 +25,5 @@ ENV subproject=ez | |||
| 25 | ENV keymap=default | 25 | ENV keymap=default |
| 26 | 26 | ||
| 27 | VOLUME /qmk | 27 | VOLUME /qmk |
| 28 | WORKDIR /qmk \ No newline at end of file | 28 | WORKDIR /qmk |
| 29 | CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap} | ||
| @@ -16,10 +16,10 @@ ifdef SILENT | |||
| 16 | endif | 16 | endif |
| 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 |
| 20 | override SILENT := false | 20 | override SILENT := false |
| 21 | 21 | ||
| 22 | ON_ERROR := error_occured=1 | 22 | ON_ERROR := error_occurred=1 |
| 23 | 23 | ||
| 24 | STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST)) | 24 | STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST)) |
| 25 | ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST)) | 25 | ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST)) |
| @@ -34,13 +34,13 @@ ABS_ROOT_DIR := $(dir $(ABS_ROOT_MAKEFILE)) | |||
| 34 | STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR)) | 34 | STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR)) |
| 35 | BUILD_DIR := $(ROOT_DIR)/.build | 35 | BUILD_DIR := $(ROOT_DIR)/.build |
| 36 | TEST_DIR := $(BUILD_DIR)/test | 36 | TEST_DIR := $(BUILD_DIR)/test |
| 37 | ERROR_FILE := $(BUILD_DIR)/error_occured | 37 | ERROR_FILE := $(BUILD_DIR)/error_occurred |
| 38 | 38 | ||
| 39 | MAKEFILE_INCLUDED=yes | 39 | MAKEFILE_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 |
| 45 | define NEXT_PATH_ELEMENT | 45 | define 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 |
| 85 | KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile))) | 85 | KEYBOARDS := $(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 |
| 89 | ifdef keyboard | 89 | ifdef 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 |
| 112 | ifneq ($(KEYMAP),) | 112 | ifneq ($(KEYMAP),) |
| @@ -170,7 +170,7 @@ define TRY_TO_MATCH_RULE_FROM_LIST_HELPER3 | |||
| 170 | endef | 170 | endef |
| 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 |
| 176 | define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2 | 176 | define 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; |
| 408 | endef | 408 | endef |
| 409 | 409 | ||
| 410 | # Just parse all the keymaps for a specifc keyboard | 410 | # Just parse all the keymaps for a specific keyboard |
| 411 | define PARSE_ALL_KEYMAPS | 411 | define PARSE_ALL_KEYMAPS |
| 412 | $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYMAP,$$(KEYMAPS))) | 412 | $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYMAP,$$(KEYMAPS))) |
| 413 | endef | 413 | endef |
| @@ -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 |
| 453 | define SET_SILENT_MODE | 453 | define 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 |
| 467 | define RUN_COMMAND | 467 | define RUN_COMMAND |
| 468 | +error_occured=0;\ | 468 | +error_occurred=0;\ |
| 469 | $(COMMAND_$(SILENT_MODE)_$(COMMAND))\ | 469 | $(COMMAND_$(SILENT_MODE)_$(COMMAND))\ |
| 470 | if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; | 470 | if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; |
| 471 | 471 | ||
| 472 | 472 | ||
| 473 | endef | 473 | endef |
| 474 | define RUN_TEST | 474 | define RUN_TEST |
| 475 | +error_occured=0;\ | 475 | +error_occurred=0;\ |
| 476 | $($(TEST)_COMMAND)\ | 476 | $($(TEST)_COMMAND)\ |
| 477 | if [ $$error_occured -gt 0 ]; then echo $$error_occured > $(ERROR_FILE); fi; | 477 | if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; |
| 478 | 478 | ||
| 479 | endef | 479 | endef |
| 480 | 480 | ||
| @@ -514,7 +514,7 @@ endif | |||
| 514 | .PHONY: all | 514 | .PHONY: all |
| 515 | all: all-keyboards test-all | 515 | all: 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 |
| 519 | all-keyboards: allkb-allsp-allkm | 519 | all-keyboards: allkb-allsp-allkm |
| 520 | 520 | ||
diff --git a/build_keyboard.mk b/build_keyboard.mk index b85557d4a..2c64e93a2 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk | |||
| @@ -144,6 +144,11 @@ ifeq ($(strip $(MIDI_ENABLE)), yes) | |||
| 144 | SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c | 144 | SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c |
| 145 | endif | 145 | endif |
| 146 | 146 | ||
| 147 | ifeq ($(strip $(COMBO_ENABLE)), yes) | ||
| 148 | OPT_DEFS += -DCOMBO_ENABLE | ||
| 149 | SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c | ||
| 150 | endif | ||
| 151 | |||
| 147 | ifeq ($(strip $(VIRTSER_ENABLE)), yes) | 152 | ifeq ($(strip $(VIRTSER_ENABLE)), yes) |
| 148 | OPT_DEFS += -DVIRTSER_ENABLE | 153 | OPT_DEFS += -DVIRTSER_ENABLE |
| 149 | endif | 154 | endif |
diff --git a/keyboards/ergodox/keymaps/deadcyclo/Makefile b/keyboards/ergodox/keymaps/deadcyclo/Makefile new file mode 100644 index 000000000..039f07c8e --- /dev/null +++ b/keyboards/ergodox/keymaps/deadcyclo/Makefile | |||
| @@ -0,0 +1 @@ | |||
| UNICODE_ENABLE = yes | |||
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png index 4208c5189..2c03af581 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png +++ b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png | |||
| Binary files differ | |||
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png index ccda70e39..5adb7ac77 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png +++ b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png | |||
| Binary files differ | |||
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png index 481e63e32..a267ff23d 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png +++ b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png | |||
| Binary files differ | |||
diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png index 9ebba6734..c8c90cf5c 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png +++ b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png | |||
| Binary files differ | |||
diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index d75c805bf..5774511cc 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c | |||
| @@ -8,15 +8,86 @@ | |||
| 8 | #define MDIA 2 // media keys | 8 | #define MDIA 2 // media keys |
| 9 | #define NAVG 3 // navigation | 9 | #define NAVG 3 // navigation |
| 10 | 10 | ||
| 11 | enum custom_keycodes { | 11 | enum macros { |
| 12 | PLACEHOLDER = SAFE_RANGE, // can always be here | 12 | RUN |
| 13 | }; | ||
| 14 | |||
| 15 | enum 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 */ |
| 25 | enum 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 | |||
| 44 | enum emojis2 { | ||
| 45 | SMRK2, | ||
| 46 | LOVE | ||
| 47 | }; | ||
| 48 | |||
| 49 | enum 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 | ||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 91 | const 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, | 201 | KC_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 | ||
| 191 | const uint16_t PROGMEM fn_actions[] = { | 262 | const 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 | ||
| 195 | const 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 | ||
| 213 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 300 | void 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 | ||
| 465 | const 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. |
| 241 | void matrix_init_user(void) { | 477 | void 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. |
| 246 | void matrix_scan_user(void) { | 482 | void matrix_scan_user(void) { |
| 247 | |||
| 248 | uint8_t layer = biton32(layer_state); | 483 | uint8_t layer = biton32(layer_state); |
| 249 | 484 | ||
| 250 | ergodox_board_led_off(); | 485 | ergodox_board_led_off(); |
| @@ -254,12 +489,21 @@ void matrix_scan_user(void) { | |||
| 254 | switch (layer) { | 489 | switch (layer) { |
| 255 | case 1: | 490 | case 1: |
| 256 | ergodox_right_led_1_on(); | 491 | ergodox_right_led_1_on(); |
| 492 | #ifdef RGBLIGHT_ENABLE | ||
| 493 | rgblight_setrgb(0xff,0x00,0x00); | ||
| 494 | #endif | ||
| 257 | break; | 495 | break; |
| 258 | case 2: | 496 | case 2: |
| 259 | ergodox_right_led_2_on(); | 497 | ergodox_right_led_2_on(); |
| 498 | #ifdef RGBLIGHT_ENABLE | ||
| 499 | rgblight_setrgb(0x00,0xff,0x00); | ||
| 500 | #endif | ||
| 260 | break; | 501 | break; |
| 261 | case 3: | 502 | case 3: |
| 262 | ergodox_right_led_3_on(); | 503 | ergodox_right_led_3_on(); |
| 504 | #ifdef RGBLIGHT_ENABLE | ||
| 505 | rgblight_setrgb(0x00,0x00,0xff); | ||
| 506 | #endif | ||
| 263 | break; | 507 | break; |
| 264 | case 4: | 508 | case 4: |
| 265 | ergodox_right_led_1_on(); // TODO: Make a fourth layer | 509 | ergodox_right_led_1_on(); // TODO: Make a fourth layer |
diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 809dd6eb5..fa41f0ec1 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md | |||
| @@ -1,9 +1,11 @@ | |||
| 1 | # ErgoDox EZ 1337 configuration | 1 | # ErgoDox EZ 1337 configuration |
| 2 | 2 | ||
| 3 | Custom layout based on the default layout. Intended for interational users of us intl-altgr layout. Note that | 3 | Custom layout based on the default layout. Intended for interational |
| 4 | some common keys might be missing, as this layout is intented to be used on *nix systems by users familiar | 4 | users of us intl-altgr layout. Note that some common keys might be |
| 5 | with their system. The layout is geared towards avoiding using the rat (mouse for those of you who are | 5 | missing, as this layout is intented to be used on *nix systems by |
| 6 | unfamiliar with tiling window managers) as much as possibly. | 6 | users familiar with their system. The layout is geared towards |
| 7 | avoiding using the rat (mouse for those of you who are unfamiliar with | ||
| 8 | tiling window managers) as much as possibly. | ||
| 7 | 9 | ||
| 8 | # Layouts | 10 | # Layouts |
| 9 | 11 | ||
| @@ -13,24 +15,58 @@ All layer images created using [keyboard-layout-editor](http://www.keyboard-layo | |||
| 13 | 15 | ||
| 14 | [](http://www.keyboard-layout-editor.com/#/gists/0321b18620180a3e46c498206eb65366) | 16 | [](http://www.keyboard-layout-editor.com/#/gists/0321b18620180a3e46c498206eb65366) |
| 15 | 17 | ||
| 16 | ## Layer 1 - Symbols | 18 | The base layer here is marked with the us international alt-gr layout, |
| 19 | including characters bound to what on an iso keyboard would be alt-gr | ||
| 20 | and on an ansi keyboard right alt. | ||
| 17 | 21 | ||
| 18 | [](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) | 22 | Regular (and irregular) modifier keys are marked with a yellowish |
| 23 | gray. Layer moderators are marked with blue, red and green, which are | ||
| 24 | the same colors each layer displays on the LEDs when active. | ||
| 19 | 25 | ||
| 20 | ## Layer 2 - Media and Mouse | 26 | All of the layer switch keys, except for the two center keys marked L1 |
| 27 | TOG, are dual purpose. Hence for example the top left key produces ESC | ||
| 28 | if tapped, and temporarilly toggles L3 when hold down. The two center | ||
| 29 | L1 TOG keys toggle L1 on and off for more permanent layer toggling. | ||
| 21 | 30 | ||
| 22 | [](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731) | 31 | The UNI keys enter the linux ibus unicode composer mode |
| 32 | (ie. Ctrl+Shift+u). Use this to enter unicode characters. Hit the key, | ||
| 33 | type in the unicode hex value, and hit enter. | ||
| 23 | 34 | ||
| 24 | ## Layer 3 - Navigation | 35 | ## Layer 1 - Symbols and RGB |
| 25 | 36 | ||
| 26 | [](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) | 37 | [](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) |
| 38 | |||
| 39 | The Symbols and RGB layer contains function keys, commonly used | ||
| 40 | symbols, a numpad and if you have the new Ergodox Ez shine keys for | ||
| 41 | controlling various RGB-led functions. In addition, it provides an up | ||
| 42 | and a down key for easy scrolling. RGB controller keys are yellow. | ||
| 43 | |||
| 44 | ## Layer 2 - Media, Mouse and Navigation | ||
| 45 | |||
| 46 | [](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731) | ||
| 47 | |||
| 48 | The Media, Mouse and unicode layer contains special keys for moving | ||
| 49 | the mouse and clicking on it with the keyboard. In addition it | ||
| 50 | provides standard media control keys, and default arrow keys. | ||
| 51 | |||
| 52 | ## Layer 3 - Unicode | ||
| 53 | |||
| 54 | [](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) | ||
| 55 | |||
| 56 | The unicode layer provides keys for directly typing unicode (utf-8) | ||
| 27 | 57 | ||
| 28 | # Changelog | 58 | # Changelog |
| 29 | 59 | ||
| 30 | - 02.01.2017 Added delete key on second layer | 60 | - 02.01.2017 Added delete key on second layer |
| 31 | - 10.01.2017 Added layer images to readme | 61 | - 10.01.2017 Added layer images to readme |
| 62 | - 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand | ||
| 63 | - 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2 | ||
| 64 | - 25.01.2017 Added lots of new emojis and some unicode keys | ||
| 65 | - 27.01.2017 Added new unicode keys and shortcut for ibus unicode composer key (CTRL+SHIFT+U) | ||
| 32 | 66 | ||
| 33 | # TODO | 67 | # TODO |
| 34 | 68 | ||
| 35 | - Add unicode support (direct input and indirect? see algernon layout for examples) | 69 | - Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?) |
| 36 | - Add descriptions below each layer image of any special functions/keys | 70 | - Make macros for gnu screen and i3wm |
| 71 | - Look into the app launch macros in algernon keymap | ||
| 72 | |||
diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index 6e296737a..a63ce5907 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md | |||
| @@ -74,6 +74,10 @@ not be very difficult to adapt it to support more if required. | |||
| 74 | Flashing | 74 | Flashing |
| 75 | -------- | 75 | -------- |
| 76 | 76 | ||
| 77 | From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. | ||
| 78 | |||
| 79 | Example: `make rev2-serial-avrdude` | ||
| 80 | |||
| 77 | If you define `EE_HANDS` in your `config.h`, you will need to set the | 81 | If you define `EE_HANDS` in your `config.h`, you will need to set the |
| 78 | EEPROM for the left and right halves. The EEPROM is used to store whether the | 82 | EEPROM for the left and right halves. The EEPROM is used to store whether the |
| 79 | half is left handed or right handed. This makes it so that the same firmware | 83 | half is left handed or right handed. This makes it so that the same firmware |
diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index 1aee5313c..0dc549130 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk | |||
| @@ -73,3 +73,13 @@ USE_I2C ?= yes | |||
| 73 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | 73 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend |
| 74 | 74 | ||
| 75 | CUSTOM_MATRIX = yes | 75 | CUSTOM_MATRIX = yes |
| 76 | |||
| 77 | avrdude: build | ||
| 78 | ls /dev/tty* > /tmp/1; \ | ||
| 79 | echo "Reset your Pro Micro then hit any key to continue..."; \ | ||
| 80 | read -n 1 -s; \ | ||
| 81 | ls /dev/tty* > /tmp/2; \ | ||
| 82 | USB=`diff /tmp/1 /tmp/2 | grep '>' | sed -e 's/> //'`; \ | ||
| 83 | avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex | ||
| 84 | |||
| 85 | .PHONY: avrdude | ||
diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c new file mode 100644 index 000000000..e2189ad98 --- /dev/null +++ b/quantum/process_keycode/process_combo.c | |||
| @@ -0,0 +1,134 @@ | |||
| 1 | #include "process_combo.h" | ||
| 2 | #include "print.h" | ||
| 3 | |||
| 4 | |||
| 5 | #define COMBO_TIMER_ELAPSED -1 | ||
| 6 | |||
| 7 | |||
| 8 | __attribute__ ((weak)) | ||
| 9 | combo_t key_combos[] = { | ||
| 10 | |||
| 11 | }; | ||
| 12 | |||
| 13 | __attribute__ ((weak)) | ||
| 14 | void process_combo_event(uint8_t combo_index, bool pressed) { | ||
| 15 | |||
| 16 | } | ||
| 17 | |||
| 18 | static uint8_t current_combo_index = 0; | ||
| 19 | |||
| 20 | static inline void send_combo(uint16_t action, bool pressed) | ||
| 21 | { | ||
| 22 | if (action) { | ||
| 23 | if (pressed) { | ||
| 24 | register_code16(action); | ||
| 25 | } else { | ||
| 26 | unregister_code16(action); | ||
| 27 | } | ||
| 28 | } else { | ||
| 29 | process_combo_event(current_combo_index, pressed); | ||
| 30 | } | ||
| 31 | } | ||
| 32 | |||
| 33 | #define ALL_COMBO_KEYS_ARE_DOWN (((1<<count)-1) == combo->state) | ||
| 34 | #define NO_COMBO_KEYS_ARE_DOWN (0 == combo->state) | ||
| 35 | #define KEY_STATE_DOWN(key) do{ combo->state |= (1<<key); } while(0) | ||
| 36 | #define KEY_STATE_UP(key) do{ combo->state &= ~(1<<key); } while(0) | ||
| 37 | static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record) | ||
| 38 | { | ||
| 39 | uint8_t count = 0; | ||
| 40 | uint8_t index = -1; | ||
| 41 | /* Find index of keycode and number of combo keys */ | ||
| 42 | for (const uint16_t *keys = combo->keys; ;++count) { | ||
| 43 | uint16_t key = pgm_read_word(&keys[count]); | ||
| 44 | if (keycode == key) index = count; | ||
| 45 | if (COMBO_END == key) break; | ||
| 46 | } | ||
| 47 | |||
| 48 | /* Return if not a combo key */ | ||
| 49 | if (-1 == (int8_t)index) return false; | ||
| 50 | |||
| 51 | /* The combos timer is used to signal whether the combo is active */ | ||
| 52 | bool is_combo_active = COMBO_TIMER_ELAPSED == combo->timer ? false : true; | ||
| 53 | |||
| 54 | if (record->event.pressed) { | ||
| 55 | KEY_STATE_DOWN(index); | ||
| 56 | |||
| 57 | if (is_combo_active) { | ||
| 58 | if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was pressed */ | ||
| 59 | send_combo(combo->keycode, true); | ||
| 60 | combo->timer = COMBO_TIMER_ELAPSED; | ||
| 61 | } else { /* Combo key was pressed */ | ||
| 62 | combo->timer = timer_read(); | ||
| 63 | #ifdef COMBO_ALLOW_ACTION_KEYS | ||
| 64 | combo->prev_record = *record; | ||
| 65 | #else | ||
| 66 | combo->prev_key = keycode; | ||
| 67 | #endif | ||
| 68 | } | ||
| 69 | } | ||
| 70 | } else { | ||
| 71 | if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was released */ | ||
| 72 | send_combo(combo->keycode, false); | ||
| 73 | } | ||
| 74 | |||
| 75 | if (is_combo_active) { /* Combo key was tapped */ | ||
| 76 | #ifdef COMBO_ALLOW_ACTION_KEYS | ||
| 77 | record->event.pressed = true; | ||
| 78 | process_action(record, store_or_get_action(record->event.pressed, record->event.key)); | ||
| 79 | record->event.pressed = false; | ||
| 80 | process_action(record, store_or_get_action(record->event.pressed, record->event.key)); | ||
| 81 | #else | ||
| 82 | register_code16(keycode); | ||
| 83 | send_keyboard_report(); | ||
| 84 | unregister_code16(keycode); | ||
| 85 | #endif | ||
| 86 | combo->timer = 0; | ||
| 87 | } | ||
| 88 | |||
| 89 | KEY_STATE_UP(index); | ||
| 90 | } | ||
| 91 | |||
| 92 | if (NO_COMBO_KEYS_ARE_DOWN) { | ||
| 93 | combo->timer = 0; | ||
| 94 | } | ||
| 95 | |||
| 96 | return is_combo_active; | ||
| 97 | } | ||
| 98 | |||
| 99 | bool process_combo(uint16_t keycode, keyrecord_t *record) | ||
| 100 | { | ||
| 101 | bool is_combo_key = false; | ||
| 102 | |||
| 103 | for (current_combo_index = 0; current_combo_index < COMBO_COUNT; ++current_combo_index) { | ||
| 104 | combo_t *combo = &key_combos[current_combo_index]; | ||
| 105 | is_combo_key |= process_single_combo(combo, keycode, record); | ||
| 106 | } | ||
| 107 | |||
| 108 | return !is_combo_key; | ||
| 109 | } | ||
| 110 | |||
| 111 | void matrix_scan_combo(void) | ||
| 112 | { | ||
| 113 | for (int i = 0; i < COMBO_COUNT; ++i) { | ||
| 114 | combo_t *combo = &key_combos[i]; | ||
| 115 | if (combo->timer && | ||
| 116 | combo->timer != COMBO_TIMER_ELAPSED && | ||
| 117 | timer_elapsed(combo->timer) > COMBO_TERM) { | ||
| 118 | |||
| 119 | /* This disables the combo, meaning key events for this | ||
| 120 | * combo will be handled by the next processors in the chain | ||
| 121 | */ | ||
| 122 | combo->timer = COMBO_TIMER_ELAPSED; | ||
| 123 | |||
| 124 | #ifdef COMBO_ALLOW_ACTION_KEYS | ||
| 125 | process_action(&combo->prev_record, | ||
| 126 | store_or_get_action(combo->prev_record.event.pressed, | ||
| 127 | combo->prev_record.event.key)); | ||
| 128 | #else | ||
| 129 | unregister_code16(combo->prev_key); | ||
| 130 | register_code16(combo->prev_key); | ||
| 131 | #endif | ||
| 132 | } | ||
| 133 | } | ||
| 134 | } | ||
diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h new file mode 100644 index 000000000..847f2b737 --- /dev/null +++ b/quantum/process_keycode/process_combo.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | #ifndef PROCESS_COMBO_H | ||
| 2 | #define PROCESS_COMBO_H | ||
| 3 | |||
| 4 | #include <stdint.h> | ||
| 5 | #include "progmem.h" | ||
| 6 | #include "quantum.h" | ||
| 7 | |||
| 8 | typedef struct | ||
| 9 | { | ||
| 10 | const uint16_t *keys; | ||
| 11 | uint16_t keycode; | ||
| 12 | #ifdef EXTRA_EXTRA_LONG_COMBOS | ||
| 13 | uint32_t state; | ||
| 14 | #elif EXTRA_LONG_COMBOS | ||
| 15 | uint16_t state; | ||
| 16 | #else | ||
| 17 | uint8_t state; | ||
| 18 | #endif | ||
| 19 | uint16_t timer; | ||
| 20 | #ifdef COMBO_ALLOW_ACTION_KEYS | ||
| 21 | keyrecord_t prev_record; | ||
| 22 | #else | ||
| 23 | uint16_t prev_key; | ||
| 24 | #endif | ||
| 25 | } combo_t; | ||
| 26 | |||
| 27 | |||
| 28 | #define COMBO(ck, ca) {.keys = &(ck)[0], .keycode = (ca)} | ||
| 29 | #define COMBO_ACTION(ck) {.keys = &(ck)[0]} | ||
| 30 | |||
| 31 | #define COMBO_END 0 | ||
| 32 | #ifndef COMBO_COUNT | ||
| 33 | #define COMBO_COUNT 0 | ||
| 34 | #endif | ||
| 35 | #ifndef COMBO_TERM | ||
| 36 | #define COMBO_TERM TAPPING_TERM | ||
| 37 | #endif | ||
| 38 | |||
| 39 | bool process_combo(uint16_t keycode, keyrecord_t *record); | ||
| 40 | void matrix_scan_combo(void); | ||
| 41 | void process_combo_event(uint8_t combo_index, bool pressed); | ||
| 42 | |||
| 43 | #endif | ||
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 6ae362c4c..403dca538 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c | |||
| @@ -43,12 +43,16 @@ static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_acti | |||
| 43 | if (action->state.finished) | 43 | if (action->state.finished) |
| 44 | return; | 44 | return; |
| 45 | action->state.finished = true; | 45 | action->state.finished = true; |
| 46 | add_mods(action->state.oneshot_mods); | ||
| 47 | send_keyboard_report(); | ||
| 46 | _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); | 48 | _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); |
| 47 | } | 49 | } |
| 48 | 50 | ||
| 49 | static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *action) | 51 | static 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 | ||
| 54 | bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { | 58 | bool 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++) { | 117 | for (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 @@ | |||
| 9 | typedef struct | 9 | typedef struct |
| 10 | { | 10 | { |
| 11 | uint8_t count; | 11 | uint8_t count; |
| 12 | uint8_t oneshot_mods; | ||
| 12 | uint16_t keycode; | 13 | uint16_t keycode; |
| 13 | uint16_t timer; | 14 | uint16_t timer; |
| 14 | bool interrupted; | 15 | bool interrupted; |
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index a30e93ae3..9995ba9bd 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c | |||
| @@ -141,7 +141,16 @@ bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { | |||
| 141 | const uint32_t* map = unicode_map; | 141 | const uint32_t* map = unicode_map; |
| 142 | uint16_t index = keycode & 0x7FF; | 142 | uint16_t index = keycode & 0x7FF; |
| 143 | uint32_t code = pgm_read_dword_far(&map[index]); | 143 | uint32_t code = pgm_read_dword_far(&map[index]); |
| 144 | if ((code > 0xFFFF && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { | 144 | if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) { |
| 145 | // Convert to UTF-16 surrogate pair | ||
| 146 | code -= 0x10000; | ||
| 147 | uint32_t lo = code & 0x3ff; | ||
| 148 | uint32_t hi = (code & 0xffc00) >> 10; | ||
| 149 | unicode_input_start(); | ||
| 150 | register_hex32(hi + 0xd800); | ||
| 151 | register_hex32(lo + 0xdc00); | ||
| 152 | unicode_input_finish(); | ||
| 153 | } else if ((code > 0x10ffff && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { | ||
| 145 | // when character is out of range supported by the OS | 154 | // when character is out of range supported by the OS |
| 146 | unicode_map_input_error(); | 155 | unicode_map_input_error(); |
| 147 | } else { | 156 | } else { |
diff --git a/quantum/quantum.c b/quantum/quantum.c index 63ffe2074..b83ae433e 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -33,14 +33,42 @@ static void do_code16 (uint16_t code, void (*f) (uint8_t)) { | |||
| 33 | f(KC_RGUI); | 33 | f(KC_RGUI); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | static inline void qk_register_weak_mods(uint8_t kc) { | ||
| 37 | add_weak_mods(MOD_BIT(kc)); | ||
| 38 | send_keyboard_report(); | ||
| 39 | } | ||
| 40 | |||
| 41 | static inline void qk_unregister_weak_mods(uint8_t kc) { | ||
| 42 | del_weak_mods(MOD_BIT(kc)); | ||
| 43 | send_keyboard_report(); | ||
| 44 | } | ||
| 45 | |||
| 46 | static inline void qk_register_mods(uint8_t kc) { | ||
| 47 | add_weak_mods(MOD_BIT(kc)); | ||
| 48 | send_keyboard_report(); | ||
| 49 | } | ||
| 50 | |||
| 51 | static inline void qk_unregister_mods(uint8_t kc) { | ||
| 52 | del_weak_mods(MOD_BIT(kc)); | ||
| 53 | send_keyboard_report(); | ||
| 54 | } | ||
| 55 | |||
| 36 | void register_code16 (uint16_t code) { | 56 | void register_code16 (uint16_t code) { |
| 37 | do_code16 (code, register_code); | 57 | if (IS_MOD(code) || code == KC_NO) { |
| 58 | do_code16 (code, qk_register_mods); | ||
| 59 | } else { | ||
| 60 | do_code16 (code, qk_register_weak_mods); | ||
| 61 | } | ||
| 38 | register_code (code); | 62 | register_code (code); |
| 39 | } | 63 | } |
| 40 | 64 | ||
| 41 | void unregister_code16 (uint16_t code) { | 65 | void unregister_code16 (uint16_t code) { |
| 42 | unregister_code (code); | 66 | unregister_code (code); |
| 43 | do_code16 (code, unregister_code); | 67 | if (IS_MOD(code) || code == KC_NO) { |
| 68 | do_code16 (code, qk_unregister_mods); | ||
| 69 | } else { | ||
| 70 | do_code16 (code, qk_unregister_weak_mods); | ||
| 71 | } | ||
| 44 | } | 72 | } |
| 45 | 73 | ||
| 46 | __attribute__ ((weak)) | 74 | __attribute__ ((weak)) |
| @@ -130,6 +158,9 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 130 | #ifndef DISABLE_CHORDING | 158 | #ifndef DISABLE_CHORDING |
| 131 | process_chording(keycode, record) && | 159 | process_chording(keycode, record) && |
| 132 | #endif | 160 | #endif |
| 161 | #ifdef COMBO_ENABLE | ||
| 162 | process_combo(keycode, record) && | ||
| 163 | #endif | ||
| 133 | #ifdef UNICODE_ENABLE | 164 | #ifdef UNICODE_ENABLE |
| 134 | process_unicode(keycode, record) && | 165 | process_unicode(keycode, record) && |
| 135 | #endif | 166 | #endif |
| @@ -508,6 +539,11 @@ void matrix_scan_quantum() { | |||
| 508 | #ifdef TAP_DANCE_ENABLE | 539 | #ifdef TAP_DANCE_ENABLE |
| 509 | matrix_scan_tap_dance(); | 540 | matrix_scan_tap_dance(); |
| 510 | #endif | 541 | #endif |
| 542 | |||
| 543 | #ifdef COMBO_ENABLE | ||
| 544 | matrix_scan_combo(); | ||
| 545 | #endif | ||
| 546 | |||
| 511 | matrix_scan_kb(); | 547 | matrix_scan_kb(); |
| 512 | } | 548 | } |
| 513 | 549 | ||
diff --git a/quantum/quantum.h b/quantum/quantum.h index e6adf974a..8614c053a 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h | |||
| @@ -63,6 +63,10 @@ extern uint32_t default_layer_state; | |||
| 63 | #include "process_printer.h" | 63 | #include "process_printer.h" |
| 64 | #endif | 64 | #endif |
| 65 | 65 | ||
| 66 | #ifdef COMBO_ENABLE | ||
| 67 | #include "process_combo.h" | ||
| 68 | #endif | ||
| 69 | |||
| 66 | #define SEND_STRING(str) send_string(PSTR(str)) | 70 | #define SEND_STRING(str) send_string(PSTR(str)) |
| 67 | void send_string(const char *str); | 71 | void send_string(const char *str); |
| 68 | 72 | ||
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index d485b46c7..f03670a7f 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c | |||
| @@ -49,6 +49,13 @@ void action_exec(keyevent_t event) | |||
| 49 | 49 | ||
| 50 | keyrecord_t record = { .event = event }; | 50 | keyrecord_t record = { .event = event }; |
| 51 | 51 | ||
| 52 | #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) | ||
| 53 | if (has_oneshot_layer_timed_out()) { | ||
| 54 | dprintf("Oneshot layer: timeout\n"); | ||
| 55 | clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); | ||
| 56 | } | ||
| 57 | #endif | ||
| 58 | |||
| 52 | #ifndef NO_ACTION_TAPPING | 59 | #ifndef NO_ACTION_TAPPING |
| 53 | action_tapping_process(record); | 60 | action_tapping_process(record); |
| 54 | #else | 61 | #else |
| @@ -100,7 +107,7 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 100 | return true; | 107 | return true; |
| 101 | } | 108 | } |
| 102 | 109 | ||
| 103 | void process_record(keyrecord_t *record) | 110 | void process_record(keyrecord_t *record) |
| 104 | { | 111 | { |
| 105 | if (IS_NOEVENT(record->event)) { return; } | 112 | if (IS_NOEVENT(record->event)) { return; } |
| 106 | 113 | ||
| @@ -126,13 +133,6 @@ void process_action(keyrecord_t *record, action_t action) | |||
| 126 | uint8_t tap_count = record->tap.count; | 133 | uint8_t tap_count = record->tap.count; |
| 127 | #endif | 134 | #endif |
| 128 | 135 | ||
| 129 | #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) | ||
| 130 | if (has_oneshot_layer_timed_out()) { | ||
| 131 | dprintf("Oneshot layer: timeout\n"); | ||
| 132 | clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); | ||
| 133 | } | ||
| 134 | #endif | ||
| 135 | |||
| 136 | if (event.pressed) { | 136 | if (event.pressed) { |
| 137 | // clear the potential weak mods left by previously pressed keys | 137 | // clear the potential weak mods left by previously pressed keys |
| 138 | clear_weak_mods(); | 138 | clear_weak_mods(); |
diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index f432976d0..3751da1e5 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh | |||
| @@ -7,21 +7,49 @@ rev=$(git rev-parse --short HEAD) | |||
| 7 | git config --global user.name "Travis CI" | 7 | git config --global user.name "Travis CI" |
| 8 | git config --global user.email "jack.humb+travis.ci@gmail.com" | 8 | git config --global user.email "jack.humb+travis.ci@gmail.com" |
| 9 | 9 | ||
| 10 | make ergodox-ez AUTOGEN=true | 10 | if [[ "$TRAVIS_BRANCH" == "master" ]] ; then |
| 11 | 11 | ||
| 12 | find . -name ".build" | xargs rm -rf | 12 | increment_version () |
| 13 | cd .. | 13 | { |
| 14 | git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git | 14 | declare -a part=( ${1//\./ } ) |
| 15 | cd qmk.fm | 15 | part[2]=$((part[2] + 1)) |
| 16 | git submodule update --init --recursive | 16 | new="${part[*]}" |
| 17 | rm -rf keyboard | 17 | echo -e "${new// /.}" |
| 18 | rm -rf keyboards | 18 | } |
| 19 | cp -r ../qmk_firmware/keyboards . | 19 | |
| 20 | mkdir keyboards/ergodox_ez/ | 20 | NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) |
| 21 | cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html | 21 | if [[ $NEFM -gt 0 ]] ; then |
| 22 | cp ../qmk_firmware/readme.md qmk_readme.md | 22 | echo "Essential files modified." |
| 23 | ./generate.sh | 23 | git fetch --tags |
| 24 | 24 | lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1) | |
| 25 | git add -A | 25 | newtag=$(increment_version $lasttag) |
| 26 | git commit -m "generated from qmk_firmware/$TRAVIS_BRANCH@${rev}" | 26 | git tag $newtag |
| 27 | git push | 27 | git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware |
| 28 | else | ||
| 29 | echo "No essential files modified." | ||
| 30 | fi | ||
| 31 | |||
| 32 | if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then | ||
| 33 | |||
| 34 | make ergodox-ez AUTOGEN=true | ||
| 35 | |||
| 36 | find . -name ".build" | xargs rm -rf | ||
| 37 | cd .. | ||
| 38 | git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git | ||
| 39 | cd qmk.fm | ||
| 40 | git submodule update --init --recursive | ||
| 41 | rm -rf keyboard | ||
| 42 | rm -rf keyboards | ||
| 43 | cp -r ../qmk_firmware/keyboards . | ||
| 44 | mkdir keyboards/ergodox_ez/ | ||
| 45 | cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html | ||
| 46 | cp ../qmk_firmware/readme.md qmk_readme.md | ||
| 47 | ./generate.sh | ||
| 48 | |||
| 49 | git add -A | ||
| 50 | git commit -m "generated from qmk/qmk_firmware@${rev}" | ||
| 51 | git push | ||
| 52 | |||
| 53 | fi | ||
| 54 | |||
| 55 | fi \ No newline at end of file | ||
