aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--build_keyboard.mk36
-rw-r--r--doc/COPYING.GPLv2339
-rw-r--r--doc/COPYING.GPLv3674
-rw-r--r--doc/keymap.md235
-rw-r--r--keyboards/atreus/keymaps/default/keymap.c12
-rw-r--r--keyboards/atreus/keymaps/xyverz/keymap.c8
-rw-r--r--keyboards/atreus62/atreus62.h38
-rw-r--r--keyboards/atreus62/keymaps/xyverz/keymap.c175
-rw-r--r--keyboards/clueboard/keymaps/xyverz/Makefile49
-rw-r--r--keyboards/clueboard/keymaps/xyverz/keymap.c111
-rw-r--r--keyboards/ergodox/ez/config.h3
-rw-r--r--keyboards/ergodox/keymaps/italian/keymap.c223
-rw-r--r--keyboards/ergodox/keymaps/italian/readme.md72
-rw-r--r--keyboards/ergodox/keymaps/xyverz/keymap.c14
-rw-r--r--keyboards/ergodox/keymaps/xyverz/readme.md8
-rw-r--r--keyboards/ergodox/readme.md21
-rw-r--r--keyboards/frosty_flake/Makefile3
-rw-r--r--keyboards/frosty_flake/config.h147
-rw-r--r--keyboards/frosty_flake/frosty_flake.c63
-rw-r--r--keyboards/frosty_flake/frosty_flake.h50
-rw-r--r--keyboards/frosty_flake/keymaps/default/Makefile21
-rw-r--r--keyboards/frosty_flake/keymaps/default/config.h8
-rw-r--r--keyboards/frosty_flake/keymaps/default/keymap.c11
-rw-r--r--keyboards/frosty_flake/keymaps/default/readme.md1
-rw-r--r--keyboards/frosty_flake/matrix.c135
-rw-r--r--keyboards/frosty_flake/readme.md32
-rw-r--r--keyboards/frosty_flake/rules.mk71
-rw-r--r--keyboards/gh60/keymaps/dbroqua_7U/Makefile111
-rw-r--r--keyboards/gh60/keymaps/dbroqua_7U/keymap.c88
-rw-r--r--keyboards/gh60/keymaps/xyverz/keymap.c149
-rw-r--r--keyboards/handwired/atreus50/Makefile3
-rw-r--r--keyboards/handwired/atreus50/atreus50.c10
-rw-r--r--keyboards/handwired/atreus50/atreus50.h36
-rw-r--r--keyboards/handwired/atreus50/config.h163
-rw-r--r--keyboards/handwired/atreus50/keymaps/default/Makefile6
-rw-r--r--keyboards/handwired/atreus50/keymaps/default/keymap.c250
-rw-r--r--keyboards/handwired/atreus50/readme.md16
-rw-r--r--keyboards/handwired/atreus50/rules.mk81
-rw-r--r--keyboards/handwired/kbod/Makefile3
-rw-r--r--keyboards/handwired/kbod/config.h167
-rw-r--r--keyboards/handwired/kbod/kbod.c28
-rw-r--r--keyboards/handwired/kbod/kbod.h21
-rw-r--r--keyboards/handwired/kbod/keymaps/default/Makefile21
-rw-r--r--keyboards/handwired/kbod/keymaps/default/config.h8
-rw-r--r--keyboards/handwired/kbod/keymaps/default/keymap.c104
-rw-r--r--keyboards/handwired/kbod/keymaps/default/readme.md5
-rw-r--r--keyboards/handwired/kbod/readme.md21
-rw-r--r--keyboards/handwired/kbod/rules.mk68
-rw-r--r--keyboards/kinesis/keymaps/xyverz/Makefile21
-rw-r--r--keyboards/kinesis/keymaps/xyverz/config.h8
-rw-r--r--keyboards/kinesis/keymaps/xyverz/keymap.c302
-rw-r--r--keyboards/kinesis/keymaps/xyverz/readme.md128
-rw-r--r--keyboards/lets_split/keymaps/OLED_sample/config.h17
-rw-r--r--keyboards/lets_split/keymaps/OLED_sample/keymap.c3
-rw-r--r--keyboards/lets_split/keymaps/hexwire/Makefile4
-rw-r--r--keyboards/lets_split/keymaps/hexwire/compact_keymap.h23
-rw-r--r--keyboards/lets_split/keymaps/hexwire/config.h20
-rw-r--r--keyboards/lets_split/keymaps/hexwire/keymap.c14
-rw-r--r--keyboards/lets_split/keymaps/xyverz/config.h37
-rw-r--r--keyboards/lets_split/keymaps/xyverz/keymap.c191
-rw-r--r--keyboards/lets_split/lets_split.h14
-rw-r--r--keyboards/lets_split/readme.md11
-rw-r--r--keyboards/lets_split/rev1/config.h7
-rw-r--r--keyboards/lets_split/rev1/rev1.h24
-rw-r--r--keyboards/lets_split/rev2/rev2.c1
-rw-r--r--keyboards/lets_split/rev2/rev2.h73
-rw-r--r--keyboards/lets_split/rules.mk14
-rw-r--r--keyboards/lets_split/split_util.c2
-rw-r--r--keyboards/lets_split/ssd1306.c4
-rw-r--r--keyboards/lets_split/ssd1306.h17
-rw-r--r--keyboards/planck/keymaps/callum/keymap.c12
-rw-r--r--keyboards/planck/keymaps/dbroqua/config.h29
-rw-r--r--keyboards/planck/keymaps/default/config.h29
-rw-r--r--keyboards/planck/keymaps/experimental/config.h23
-rw-r--r--keyboards/planck/keymaps/impossible/config.h29
-rw-r--r--keyboards/planck/keymaps/jeebak/config.h29
-rw-r--r--keyboards/planck/keymaps/jhenahan/config.h23
-rw-r--r--keyboards/planck/keymaps/khord/Makefile4
-rw-r--r--keyboards/planck/keymaps/khord/config.h93
-rw-r--r--keyboards/planck/keymaps/khord/keymap.c336
-rw-r--r--keyboards/planck/keymaps/premek/config.h29
-rw-r--r--keyboards/planck/keymaps/sgoodwin/config.h29
-rw-r--r--keyboards/planck/keymaps/smt/config.h29
-rw-r--r--keyboards/planck/keymaps/thermal_printer/config.h23
-rw-r--r--keyboards/planck/keymaps/unicode/config.h29
-rw-r--r--keyboards/planck/keymaps/xyverz/Makefile6
-rw-r--r--keyboards/planck/keymaps/xyverz/config.h29
-rw-r--r--keyboards/planck/keymaps/xyverz/keymap.c24
-rw-r--r--keyboards/planck/keymaps/zach/Makefile29
-rw-r--r--keyboards/planck/keymaps/zach/config.h94
-rw-r--r--keyboards/planck/keymaps/zach/keymap.c48
-rw-r--r--keyboards/planck/keymaps/zach/zach_common_functions.c447
-rw-r--r--keyboards/preonic/keymaps/CMD-Preonic/config.h29
-rw-r--r--keyboards/preonic/keymaps/default/config.h29
-rw-r--r--keyboards/preonic/keymaps/smt/config.h29
-rw-r--r--keyboards/preonic/keymaps/xyverz/Makefile23
-rw-r--r--keyboards/preonic/keymaps/xyverz/config.h21
-rw-r--r--keyboards/preonic/keymaps/xyverz/keymap.c244
-rw-r--r--keyboards/preonic/keymaps/xyverz/makefile.mk1
-rw-r--r--keyboards/preonic/keymaps/zach/Makefile29
-rw-r--r--keyboards/preonic/keymaps/zach/config.h95
-rw-r--r--keyboards/preonic/keymaps/zach/keymap.c54
-rw-r--r--keyboards/preonic/keymaps/zach/zach_common_functions.c447
-rw-r--r--keyboards/satan/keymaps/admiralStrokers/Makefile24
-rw-r--r--keyboards/satan/keymaps/admiralStrokers/config.h96
-rw-r--r--keyboards/satan/keymaps/admiralStrokers/keymap.c195
-rw-r--r--keyboards/satan/keymaps/admiralStrokers/readme.md13
-rw-r--r--keyboards/satan/keymaps/midi/Makefile21
-rw-r--r--keyboards/satan/keymaps/midi/config.h29
-rw-r--r--keyboards/satan/keymaps/midi/keymap.c77
-rw-r--r--keyboards/satan/keymaps/midi/readme.md1
-rw-r--r--keyboards/satan/keymaps/smt/Makefile (renamed from keyboards/planck/keymaps/xyverz/makefile.mk)8
-rw-r--r--keyboards/satan/keymaps/smt/keymap.c141
-rw-r--r--keyboards/satan/keymaps/smt/readme.md1
-rw-r--r--keyboards/subatomic/keymaps/default/config.h29
-rw-r--r--keyboards/tada68/keymaps/default/keymap.c66
-rw-r--r--keyboards/tada68/keymaps/default/readme.md2
-rw-r--r--keyboards/tada68/readme.md15
-rw-r--r--keyboards/tv44/keymaps/tong92/Makefile21
-rw-r--r--keyboards/tv44/keymaps/tong92/config.h12
-rw-r--r--keyboards/tv44/keymaps/tong92/keymap.c138
-rw-r--r--keyboards/tv44/keymaps/tong92/readme.md52
-rw-r--r--keyboards/tv44/keymaps/xyverz/keymap.c26
-rw-r--r--keyboards/xd60/keymaps/cheese/README.md13
-rw-r--r--keyboards/xd60/keymaps/cheese/base_layout.pngbin0 -> 23729 bytes
-rw-r--r--keyboards/xd60/keymaps/cheese/fn_layout.pngbin0 -> 20690 bytes
-rw-r--r--keyboards/xd60/keymaps/cheese/keymap.c67
-rw-r--r--license_GPLv2.md264
-rw-r--r--license_GPLv3.md656
-rw-r--r--license_Modified_BSD.md32
-rw-r--r--quantum/analog.c16
-rw-r--r--quantum/analog.h16
-rw-r--r--quantum/api.c18
-rw-r--r--quantum/api.h18
-rw-r--r--quantum/api/api_sysex.c15
-rw-r--r--quantum/api/api_sysex.h18
-rw-r--r--quantum/audio/audio.c337
-rw-r--r--quantum/audio/audio.h17
-rw-r--r--quantum/audio/audio_pwm.c15
-rw-r--r--quantum/audio/luts.c16
-rw-r--r--quantum/audio/luts.h18
-rw-r--r--quantum/audio/musical_notes.h18
-rw-r--r--quantum/audio/song_list.h54
-rw-r--r--quantum/audio/voices.c15
-rw-r--r--quantum/audio/voices.h17
-rw-r--r--quantum/audio/wave.h18
-rw-r--r--quantum/config_common.h16
-rw-r--r--quantum/dynamic_macro.h16
-rw-r--r--quantum/keycode_config.c18
-rw-r--r--quantum/keycode_config.h16
-rw-r--r--quantum/keymap.h2
-rw-r--r--quantum/keymap_common.c2
-rw-r--r--quantum/keymap_extras/keymap_bepo.h15
-rw-r--r--quantum/keymap_extras/keymap_canadian_multilingual.h15
-rw-r--r--quantum/keymap_extras/keymap_colemak.h15
-rw-r--r--quantum/keymap_extras/keymap_dvorak.h15
-rw-r--r--quantum/keymap_extras/keymap_dvp.h16
-rw-r--r--quantum/keymap_extras/keymap_fr_ch.h15
-rw-r--r--quantum/keymap_extras/keymap_french.h15
-rw-r--r--quantum/keymap_extras/keymap_french_osx.h17
-rw-r--r--quantum/keymap_extras/keymap_german.h16
-rw-r--r--quantum/keymap_extras/keymap_german_ch.h15
-rw-r--r--quantum/keymap_extras/keymap_german_osx.h15
-rw-r--r--quantum/keymap_extras/keymap_jp.h17
-rw-r--r--quantum/keymap_extras/keymap_neo2.h15
-rw-r--r--quantum/keymap_extras/keymap_nordic.h15
-rw-r--r--quantum/keymap_extras/keymap_norwegian.h15
-rw-r--r--quantum/keymap_extras/keymap_plover.h15
-rw-r--r--quantum/keymap_extras/keymap_russian.h77
-rw-r--r--quantum/keymap_extras/keymap_spanish.h15
-rw-r--r--quantum/keymap_extras/keymap_uk.h15
-rw-r--r--quantum/keymap_extras/keymap_unicode_cyrillic.h163
-rwxr-xr-xquantum/light_ws2812.c13
-rwxr-xr-xquantum/light_ws2812.h14
-rw-r--r--quantum/matrix.c3
-rw-r--r--quantum/pincontrol.h15
-rw-r--r--quantum/process_keycode/process_audio.c62
-rw-r--r--quantum/process_keycode/process_audio.h11
-rw-r--r--quantum/process_keycode/process_chording.c18
-rw-r--r--quantum/process_keycode/process_chording.h18
-rw-r--r--quantum/process_keycode/process_combo.c16
-rw-r--r--quantum/process_keycode/process_combo.h16
-rw-r--r--quantum/process_keycode/process_leader.c18
-rw-r--r--quantum/process_keycode/process_leader.h18
-rw-r--r--quantum/process_keycode/process_midi.c307
-rw-r--r--quantum/process_keycode/process_midi.h243
-rw-r--r--quantum/process_keycode/process_music.c133
-rw-r--r--quantum/process_keycode/process_music.h24
-rw-r--r--quantum/process_keycode/process_printer.c18
-rw-r--r--quantum/process_keycode/process_printer.h18
-rw-r--r--quantum/process_keycode/process_printer_bb.c18
-rw-r--r--quantum/process_keycode/process_tap_dance.c17
-rw-r--r--quantum/process_keycode/process_tap_dance.h15
-rw-r--r--quantum/process_keycode/process_ucis.c18
-rw-r--r--quantum/process_keycode/process_ucis.h16
-rw-r--r--quantum/process_keycode/process_unicode.c21
-rw-r--r--quantum/process_keycode/process_unicode.h15
-rw-r--r--quantum/process_keycode/process_unicode_common.c32
-rw-r--r--quantum/process_keycode/process_unicode_common.h18
-rw-r--r--quantum/process_keycode/process_unicodemap.c18
-rw-r--r--quantum/process_keycode/process_unicodemap.h18
-rw-r--r--quantum/quantum.c43
-rw-r--r--quantum/quantum.h22
-rw-r--r--quantum/quantum_keycodes.h259
-rw-r--r--quantum/rgblight.c15
-rw-r--r--quantum/rgblight.h15
-rw-r--r--quantum/serial_link/LICENSE2
-rw-r--r--quantum/template/Makefile17
-rw-r--r--quantum/template/config.h25
-rw-r--r--quantum/template/keymaps/default/Makefile22
-rw-r--r--quantum/template/keymaps/default/config.h18
-rw-r--r--quantum/template/keymaps/default/keymap.c17
-rw-r--r--quantum/template/rules.mk2
-rw-r--r--quantum/template/template.c15
-rw-r--r--quantum/template/template.h17
-rw-r--r--quantum/variable_trace.c16
-rw-r--r--quantum/variable_trace.h16
-rw-r--r--readme.md2
-rw-r--r--tmk_core/chibios.mk7
-rw-r--r--tmk_core/common.mk19
-rw-r--r--tmk_core/common/action_tapping.c9
-rw-r--r--tmk_core/common/eeconfig.h1
-rw-r--r--tmk_core/protocol/lufa.mk17
-rw-r--r--tmk_core/protocol/lufa/adafruit_ble.h4
-rw-r--r--tmk_core/protocol/lufa/bluetooth.h16
-rw-r--r--tmk_core/protocol/lufa/lufa.c109
-rw-r--r--tmk_core/protocol/lufa/lufa.h2
-rw-r--r--tmk_core/protocol/lufa/outputselect.c6
-rw-r--r--tmk_core/protocol/lufa/outputselect.h1
230 files changed, 10012 insertions, 2363 deletions
diff --git a/.gitignore b/.gitignore
index f66a961fd..6029afce4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
1.dep 1.dep
2*.o 2*.o
3*.bin
3*.eep 4*.eep
4*.elf 5*.elf
5*.hex 6*.hex
diff --git a/build_keyboard.mk b/build_keyboard.mk
index 4a6fc0980..82464d583 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -23,9 +23,9 @@ ifdef master
23 MASTER = $(master) 23 MASTER = $(master)
24endif 24endif
25 25
26ifeq ($(MASTER),right) 26ifeq ($(MASTER),right)
27 OPT_DEFS += -DMASTER_IS_ON_RIGHT 27 OPT_DEFS += -DMASTER_IS_ON_RIGHT
28else 28else
29 ifneq ($(MASTER),left) 29 ifneq ($(MASTER),left)
30$(error MASTER does not have a valid value(left/right)) 30$(error MASTER does not have a valid value(left/right))
31 endif 31 endif
@@ -38,7 +38,7 @@ KEYBOARD_C := $(KEYBOARD_PATH)/$(KEYBOARD).c
38 38
39ifneq ("$(wildcard $(KEYBOARD_C))","") 39ifneq ("$(wildcard $(KEYBOARD_C))","")
40 include $(KEYBOARD_PATH)/rules.mk 40 include $(KEYBOARD_PATH)/rules.mk
41else 41else
42 $(error "$(KEYBOARD_C)" does not exist) 42 $(error "$(KEYBOARD_C)" does not exist)
43endif 43endif
44 44
@@ -49,7 +49,7 @@ ifneq ($(SUBPROJECT),)
49 ifneq ("$(wildcard $(SUBPROJECT_C))","") 49 ifneq ("$(wildcard $(SUBPROJECT_C))","")
50 OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT) 50 OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT)
51 include $(SUBPROJECT_PATH)/rules.mk 51 include $(SUBPROJECT_PATH)/rules.mk
52 else 52 else
53 $(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist) 53 $(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist)
54 endif 54 endif
55endif 55endif
@@ -83,7 +83,7 @@ ifneq ($(SUBPROJECT),)
83 endif 83 endif
84endif 84endif
85 85
86# Save the defines and includes here, so we don't include any keymap specific ones 86# Save the defines and includes here, so we don't include any keymap specific ones
87PROJECT_DEFS := $(OPT_DEFS) 87PROJECT_DEFS := $(OPT_DEFS)
88PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(SUBPROJECT_PATH) $(KEYBOARD_PATH) 88PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(SUBPROJECT_PATH) $(KEYBOARD_PATH)
89PROJECT_CONFIG := $(CONFIG_H) 89PROJECT_CONFIG := $(CONFIG_H)
@@ -139,11 +139,27 @@ ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
139 MIDI_ENABLE=yes 139 MIDI_ENABLE=yes
140endif 140endif
141 141
142MUSIC_ENABLE := 0
143
144ifeq ($(strip $(AUDIO_ENABLE)), yes)
145 OPT_DEFS += -DAUDIO_ENABLE
146 MUSIC_ENABLE := 1
147 SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
148 SRC += $(QUANTUM_DIR)/audio/audio.c
149 SRC += $(QUANTUM_DIR)/audio/voices.c
150 SRC += $(QUANTUM_DIR)/audio/luts.c
151endif
152
142ifeq ($(strip $(MIDI_ENABLE)), yes) 153ifeq ($(strip $(MIDI_ENABLE)), yes)
143 OPT_DEFS += -DMIDI_ENABLE 154 OPT_DEFS += -DMIDI_ENABLE
155 MUSIC_ENABLE := 1
144 SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c 156 SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
145endif 157endif
146 158
159ifeq ($(MUSIC_ENABLE), 1)
160 SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
161endif
162
147ifeq ($(strip $(COMBO_ENABLE)), yes) 163ifeq ($(strip $(COMBO_ENABLE)), yes)
148 OPT_DEFS += -DCOMBO_ENABLE 164 OPT_DEFS += -DCOMBO_ENABLE
149 SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c 165 SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
@@ -153,14 +169,6 @@ ifeq ($(strip $(VIRTSER_ENABLE)), yes)
153 OPT_DEFS += -DVIRTSER_ENABLE 169 OPT_DEFS += -DVIRTSER_ENABLE
154endif 170endif
155 171
156ifeq ($(strip $(AUDIO_ENABLE)), yes)
157 OPT_DEFS += -DAUDIO_ENABLE
158 SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
159 SRC += $(QUANTUM_DIR)/audio/audio.c
160 SRC += $(QUANTUM_DIR)/audio/voices.c
161 SRC += $(QUANTUM_DIR)/audio/luts.c
162endif
163
164ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes) 172ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
165 OPT_DEFS += -DFAUXCLICKY_ENABLE 173 OPT_DEFS += -DFAUXCLICKY_ENABLE
166 SRC += $(QUANTUM_DIR)/fauxclicky.c 174 SRC += $(QUANTUM_DIR)/fauxclicky.c
@@ -250,7 +258,7 @@ endif
250 258
251OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) 259OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
252$(KEYMAP_OUTPUT)_SRC := $(SRC) 260$(KEYMAP_OUTPUT)_SRC := $(SRC)
253$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" 261$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
254$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) 262$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
255$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H) 263$(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H)
256$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) 264$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC)
diff --git a/doc/COPYING.GPLv2 b/doc/COPYING.GPLv2
deleted file mode 100644
index d159169d1..000000000
--- a/doc/COPYING.GPLv2
+++ /dev/null
@@ -1,339 +0,0 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 2, June 1991
3
4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9 Preamble
10
11 The licenses for most software are designed to take away your
12freedom to share and change it. By contrast, the GNU General Public
13License is intended to guarantee your freedom to share and change free
14software--to make sure the software is free for all its users. This
15General Public License applies to most of the Free Software
16Foundation's software and to any other program whose authors commit to
17using it. (Some other Free Software Foundation software is covered by
18the GNU Lesser General Public License instead.) You can apply it to
19your programs, too.
20
21 When we speak of free software, we are referring to freedom, not
22price. Our General Public Licenses are designed to make sure that you
23have the freedom to distribute copies of free software (and charge for
24this service if you wish), that you receive source code or can get it
25if you want it, that you can change the software or use pieces of it
26in new free programs; and that you know you can do these things.
27
28 To protect your rights, we need to make restrictions that forbid
29anyone to deny you these rights or to ask you to surrender the rights.
30These restrictions translate to certain responsibilities for you if you
31distribute copies of the software, or if you modify it.
32
33 For example, if you distribute copies of such a program, whether
34gratis or for a fee, you must give the recipients all the rights that
35you have. You must make sure that they, too, receive or can get the
36source code. And you must show them these terms so they know their
37rights.
38
39 We protect your rights with two steps: (1) copyright the software, and
40(2) offer you this license which gives you legal permission to copy,
41distribute and/or modify the software.
42
43 Also, for each author's protection and ours, we want to make certain
44that everyone understands that there is no warranty for this free
45software. If the software is modified by someone else and passed on, we
46want its recipients to know that what they have is not the original, so
47that any problems introduced by others will not reflect on the original
48authors' reputations.
49
50 Finally, any free program is threatened constantly by software
51patents. We wish to avoid the danger that redistributors of a free
52program will individually obtain patent licenses, in effect making the
53program proprietary. To prevent this, we have made it clear that any
54patent must be licensed for everyone's free use or not licensed at all.
55
56 The precise terms and conditions for copying, distribution and
57modification follow.
58
59 GNU GENERAL PUBLIC LICENSE
60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
62 0. This License applies to any program or other work which contains
63a notice placed by the copyright holder saying it may be distributed
64under the terms of this General Public License. The "Program", below,
65refers to any such program or work, and a "work based on the Program"
66means either the Program or any derivative work under copyright law:
67that is to say, a work containing the Program or a portion of it,
68either verbatim or with modifications and/or translated into another
69language. (Hereinafter, translation is included without limitation in
70the term "modification".) Each licensee is addressed as "you".
71
72Activities other than copying, distribution and modification are not
73covered by this License; they are outside its scope. The act of
74running the Program is not restricted, and the output from the Program
75is covered only if its contents constitute a work based on the
76Program (independent of having been made by running the Program).
77Whether that is true depends on what the Program does.
78
79 1. You may copy and distribute verbatim copies of the Program's
80source code as you receive it, in any medium, provided that you
81conspicuously and appropriately publish on each copy an appropriate
82copyright notice and disclaimer of warranty; keep intact all the
83notices that refer to this License and to the absence of any warranty;
84and give any other recipients of the Program a copy of this License
85along with the Program.
86
87You may charge a fee for the physical act of transferring a copy, and
88you may at your option offer warranty protection in exchange for a fee.
89
90 2. You may modify your copy or copies of the Program or any portion
91of it, thus forming a work based on the Program, and copy and
92distribute such modifications or work under the terms of Section 1
93above, provided that you also meet all of these conditions:
94
95 a) You must cause the modified files to carry prominent notices
96 stating that you changed the files and the date of any change.
97
98 b) You must cause any work that you distribute or publish, that in
99 whole or in part contains or is derived from the Program or any
100 part thereof, to be licensed as a whole at no charge to all third
101 parties under the terms of this License.
102
103 c) If the modified program normally reads commands interactively
104 when run, you must cause it, when started running for such
105 interactive use in the most ordinary way, to print or display an
106 announcement including an appropriate copyright notice and a
107 notice that there is no warranty (or else, saying that you provide
108 a warranty) and that users may redistribute the program under
109 these conditions, and telling the user how to view a copy of this
110 License. (Exception: if the Program itself is interactive but
111 does not normally print such an announcement, your work based on
112 the Program is not required to print an announcement.)
113
114These requirements apply to the modified work as a whole. If
115identifiable sections of that work are not derived from the Program,
116and can be reasonably considered independent and separate works in
117themselves, then this License, and its terms, do not apply to those
118sections when you distribute them as separate works. But when you
119distribute the same sections as part of a whole which is a work based
120on the Program, the distribution of the whole must be on the terms of
121this License, whose permissions for other licensees extend to the
122entire whole, and thus to each and every part regardless of who wrote it.
123
124Thus, it is not the intent of this section to claim rights or contest
125your rights to work written entirely by you; rather, the intent is to
126exercise the right to control the distribution of derivative or
127collective works based on the Program.
128
129In addition, mere aggregation of another work not based on the Program
130with the Program (or with a work based on the Program) on a volume of
131a storage or distribution medium does not bring the other work under
132the scope of this License.
133
134 3. You may copy and distribute the Program (or a work based on it,
135under Section 2) in object code or executable form under the terms of
136Sections 1 and 2 above provided that you also do one of the following:
137
138 a) Accompany it with the complete corresponding machine-readable
139 source code, which must be distributed under the terms of Sections
140 1 and 2 above on a medium customarily used for software interchange; or,
141
142 b) Accompany it with a written offer, valid for at least three
143 years, to give any third party, for a charge no more than your
144 cost of physically performing source distribution, a complete
145 machine-readable copy of the corresponding source code, to be
146 distributed under the terms of Sections 1 and 2 above on a medium
147 customarily used for software interchange; or,
148
149 c) Accompany it with the information you received as to the offer
150 to distribute corresponding source code. (This alternative is
151 allowed only for noncommercial distribution and only if you
152 received the program in object code or executable form with such
153 an offer, in accord with Subsection b above.)
154
155The source code for a work means the preferred form of the work for
156making modifications to it. For an executable work, complete source
157code means all the source code for all modules it contains, plus any
158associated interface definition files, plus the scripts used to
159control compilation and installation of the executable. However, as a
160special exception, the source code distributed need not include
161anything that is normally distributed (in either source or binary
162form) with the major components (compiler, kernel, and so on) of the
163operating system on which the executable runs, unless that component
164itself accompanies the executable.
165
166If distribution of executable or object code is made by offering
167access to copy from a designated place, then offering equivalent
168access to copy the source code from the same place counts as
169distribution of the source code, even though third parties are not
170compelled to copy the source along with the object code.
171
172 4. You may not copy, modify, sublicense, or distribute the Program
173except as expressly provided under this License. Any attempt
174otherwise to copy, modify, sublicense or distribute the Program is
175void, and will automatically terminate your rights under this License.
176However, parties who have received copies, or rights, from you under
177this License will not have their licenses terminated so long as such
178parties remain in full compliance.
179
180 5. You are not required to accept this License, since you have not
181signed it. However, nothing else grants you permission to modify or
182distribute the Program or its derivative works. These actions are
183prohibited by law if you do not accept this License. Therefore, by
184modifying or distributing the Program (or any work based on the
185Program), you indicate your acceptance of this License to do so, and
186all its terms and conditions for copying, distributing or modifying
187the Program or works based on it.
188
189 6. Each time you redistribute the Program (or any work based on the
190Program), the recipient automatically receives a license from the
191original licensor to copy, distribute or modify the Program subject to
192these terms and conditions. You may not impose any further
193restrictions on the recipients' exercise of the rights granted herein.
194You are not responsible for enforcing compliance by third parties to
195this License.
196
197 7. If, as a consequence of a court judgment or allegation of patent
198infringement or for any other reason (not limited to patent issues),
199conditions are imposed on you (whether by court order, agreement or
200otherwise) that contradict the conditions of this License, they do not
201excuse you from the conditions of this License. If you cannot
202distribute so as to satisfy simultaneously your obligations under this
203License and any other pertinent obligations, then as a consequence you
204may not distribute the Program at all. For example, if a patent
205license would not permit royalty-free redistribution of the Program by
206all those who receive copies directly or indirectly through you, then
207the only way you could satisfy both it and this License would be to
208refrain entirely from distribution of the Program.
209
210If any portion of this section is held invalid or unenforceable under
211any particular circumstance, the balance of the section is intended to
212apply and the section as a whole is intended to apply in other
213circumstances.
214
215It is not the purpose of this section to induce you to infringe any
216patents or other property right claims or to contest validity of any
217such claims; this section has the sole purpose of protecting the
218integrity of the free software distribution system, which is
219implemented by public license practices. Many people have made
220generous contributions to the wide range of software distributed
221through that system in reliance on consistent application of that
222system; it is up to the author/donor to decide if he or she is willing
223to distribute software through any other system and a licensee cannot
224impose that choice.
225
226This section is intended to make thoroughly clear what is believed to
227be a consequence of the rest of this License.
228
229 8. If the distribution and/or use of the Program is restricted in
230certain countries either by patents or by copyrighted interfaces, the
231original copyright holder who places the Program under this License
232may add an explicit geographical distribution limitation excluding
233those countries, so that distribution is permitted only in or among
234countries not thus excluded. In such case, this License incorporates
235the limitation as if written in the body of this License.
236
237 9. The Free Software Foundation may publish revised and/or new versions
238of the General Public License from time to time. Such new versions will
239be similar in spirit to the present version, but may differ in detail to
240address new problems or concerns.
241
242Each version is given a distinguishing version number. If the Program
243specifies a version number of this License which applies to it and "any
244later version", you have the option of following the terms and conditions
245either of that version or of any later version published by the Free
246Software Foundation. If the Program does not specify a version number of
247this License, you may choose any version ever published by the Free Software
248Foundation.
249
250 10. If you wish to incorporate parts of the Program into other free
251programs whose distribution conditions are different, write to the author
252to ask for permission. For software which is copyrighted by the Free
253Software Foundation, write to the Free Software Foundation; we sometimes
254make exceptions for this. Our decision will be guided by the two goals
255of preserving the free status of all derivatives of our free software and
256of promoting the sharing and reuse of software generally.
257
258 NO WARRANTY
259
260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268REPAIR OR CORRECTION.
269
270 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278POSSIBILITY OF SUCH DAMAGES.
279
280 END OF TERMS AND CONDITIONS
281
282 How to Apply These Terms to Your New Programs
283
284 If you develop a new program, and you want it to be of the greatest
285possible use to the public, the best way to achieve this is to make it
286free software which everyone can redistribute and change under these terms.
287
288 To do so, attach the following notices to the program. It is safest
289to attach them to the start of each source file to most effectively
290convey the exclusion of warranty; and each file should have at least
291the "copyright" line and a pointer to where the full notice is found.
292
293 <one line to give the program's name and a brief idea of what it does.>
294 Copyright (C) <year> <name of author>
295
296 This program is free software; you can redistribute it and/or modify
297 it under the terms of the GNU General Public License as published by
298 the Free Software Foundation; either version 2 of the License, or
299 (at your option) any later version.
300
301 This program is distributed in the hope that it will be useful,
302 but WITHOUT ANY WARRANTY; without even the implied warranty of
303 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 GNU General Public License for more details.
305
306 You should have received a copy of the GNU General Public License along
307 with this program; if not, write to the Free Software Foundation, Inc.,
308 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
310Also add information on how to contact you by electronic and paper mail.
311
312If the program is interactive, make it output a short notice like this
313when it starts in an interactive mode:
314
315 Gnomovision version 69, Copyright (C) year name of author
316 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 This is free software, and you are welcome to redistribute it
318 under certain conditions; type `show c' for details.
319
320The hypothetical commands `show w' and `show c' should show the appropriate
321parts of the General Public License. Of course, the commands you use may
322be called something other than `show w' and `show c'; they could even be
323mouse-clicks or menu items--whatever suits your program.
324
325You should also get your employer (if you work as a programmer) or your
326school, if any, to sign a "copyright disclaimer" for the program, if
327necessary. Here is a sample; alter the names:
328
329 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
332 <signature of Ty Coon>, 1 April 1989
333 Ty Coon, President of Vice
334
335This General Public License does not permit incorporating your program into
336proprietary programs. If your program is a subroutine library, you may
337consider it more useful to permit linking proprietary applications with the
338library. If this is what you want to do, use the GNU Lesser General
339Public License instead of this License.
diff --git a/doc/COPYING.GPLv3 b/doc/COPYING.GPLv3
deleted file mode 100644
index 94a9ed024..000000000
--- a/doc/COPYING.GPLv3
+++ /dev/null
@@ -1,674 +0,0 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 3, 29 June 2007
3
4 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8 Preamble
9
10 The GNU General Public License is a free, copyleft license for
11software and other kinds of works.
12
13 The licenses for most software and other practical works are designed
14to take away your freedom to share and change the works. By contrast,
15the GNU General Public License is intended to guarantee your freedom to
16share and change all versions of a program--to make sure it remains free
17software for all its users. We, the Free Software Foundation, use the
18GNU General Public License for most of our software; it applies also to
19any other work released this way by its authors. You can apply it to
20your programs, too.
21
22 When we speak of free software, we are referring to freedom, not
23price. Our General Public Licenses are designed to make sure that you
24have the freedom to distribute copies of free software (and charge for
25them if you wish), that you receive source code or can get it if you
26want it, that you can change the software or use pieces of it in new
27free programs, and that you know you can do these things.
28
29 To protect your rights, we need to prevent others from denying you
30these rights or asking you to surrender the rights. Therefore, you have
31certain responsibilities if you distribute copies of the software, or if
32you modify it: responsibilities to respect the freedom of others.
33
34 For example, if you distribute copies of such a program, whether
35gratis or for a fee, you must pass on to the recipients the same
36freedoms that you received. You must make sure that they, too, receive
37or can get the source code. And you must show them these terms so they
38know their rights.
39
40 Developers that use the GNU GPL protect your rights with two steps:
41(1) assert copyright on the software, and (2) offer you this License
42giving you legal permission to copy, distribute and/or modify it.
43
44 For the developers' and authors' protection, the GPL clearly explains
45that there is no warranty for this free software. For both users' and
46authors' sake, the GPL requires that modified versions be marked as
47changed, so that their problems will not be attributed erroneously to
48authors of previous versions.
49
50 Some devices are designed to deny users access to install or run
51modified versions of the software inside them, although the manufacturer
52can do so. This is fundamentally incompatible with the aim of
53protecting users' freedom to change the software. The systematic
54pattern of such abuse occurs in the area of products for individuals to
55use, which is precisely where it is most unacceptable. Therefore, we
56have designed this version of the GPL to prohibit the practice for those
57products. If such problems arise substantially in other domains, we
58stand ready to extend this provision to those domains in future versions
59of the GPL, as needed to protect the freedom of users.
60
61 Finally, every program is threatened constantly by software patents.
62States should not allow patents to restrict development and use of
63software on general-purpose computers, but in those that do, we wish to
64avoid the special danger that patents applied to a free program could
65make it effectively proprietary. To prevent this, the GPL assures that
66patents cannot be used to render the program non-free.
67
68 The precise terms and conditions for copying, distribution and
69modification follow.
70
71 TERMS AND CONDITIONS
72
73 0. Definitions.
74
75 "This License" refers to version 3 of the GNU General Public License.
76
77 "Copyright" also means copyright-like laws that apply to other kinds of
78works, such as semiconductor masks.
79
80 "The Program" refers to any copyrightable work licensed under this
81License. Each licensee is addressed as "you". "Licensees" and
82"recipients" may be individuals or organizations.
83
84 To "modify" a work means to copy from or adapt all or part of the work
85in a fashion requiring copyright permission, other than the making of an
86exact copy. The resulting work is called a "modified version" of the
87earlier work or a work "based on" the earlier work.
88
89 A "covered work" means either the unmodified Program or a work based
90on the Program.
91
92 To "propagate" a work means to do anything with it that, without
93permission, would make you directly or secondarily liable for
94infringement under applicable copyright law, except executing it on a
95computer or modifying a private copy. Propagation includes copying,
96distribution (with or without modification), making available to the
97public, and in some countries other activities as well.
98
99 To "convey" a work means any kind of propagation that enables other
100parties to make or receive copies. Mere interaction with a user through
101a computer network, with no transfer of a copy, is not conveying.
102
103 An interactive user interface displays "Appropriate Legal Notices"
104to the extent that it includes a convenient and prominently visible
105feature that (1) displays an appropriate copyright notice, and (2)
106tells the user that there is no warranty for the work (except to the
107extent that warranties are provided), that licensees may convey the
108work under this License, and how to view a copy of this License. If
109the interface presents a list of user commands or options, such as a
110menu, a prominent item in the list meets this criterion.
111
112 1. Source Code.
113
114 The "source code" for a work means the preferred form of the work
115for making modifications to it. "Object code" means any non-source
116form of a work.
117
118 A "Standard Interface" means an interface that either is an official
119standard defined by a recognized standards body, or, in the case of
120interfaces specified for a particular programming language, one that
121is widely used among developers working in that language.
122
123 The "System Libraries" of an executable work include anything, other
124than the work as a whole, that (a) is included in the normal form of
125packaging a Major Component, but which is not part of that Major
126Component, and (b) serves only to enable use of the work with that
127Major Component, or to implement a Standard Interface for which an
128implementation is available to the public in source code form. A
129"Major Component", in this context, means a major essential component
130(kernel, window system, and so on) of the specific operating system
131(if any) on which the executable work runs, or a compiler used to
132produce the work, or an object code interpreter used to run it.
133
134 The "Corresponding Source" for a work in object code form means all
135the source code needed to generate, install, and (for an executable
136work) run the object code and to modify the work, including scripts to
137control those activities. However, it does not include the work's
138System Libraries, or general-purpose tools or generally available free
139programs which are used unmodified in performing those activities but
140which are not part of the work. For example, Corresponding Source
141includes interface definition files associated with source files for
142the work, and the source code for shared libraries and dynamically
143linked subprograms that the work is specifically designed to require,
144such as by intimate data communication or control flow between those
145subprograms and other parts of the work.
146
147 The Corresponding Source need not include anything that users
148can regenerate automatically from other parts of the Corresponding
149Source.
150
151 The Corresponding Source for a work in source code form is that
152same work.
153
154 2. Basic Permissions.
155
156 All rights granted under this License are granted for the term of
157copyright on the Program, and are irrevocable provided the stated
158conditions are met. This License explicitly affirms your unlimited
159permission to run the unmodified Program. The output from running a
160covered work is covered by this License only if the output, given its
161content, constitutes a covered work. This License acknowledges your
162rights of fair use or other equivalent, as provided by copyright law.
163
164 You may make, run and propagate covered works that you do not
165convey, without conditions so long as your license otherwise remains
166in force. You may convey covered works to others for the sole purpose
167of having them make modifications exclusively for you, or provide you
168with facilities for running those works, provided that you comply with
169the terms of this License in conveying all material for which you do
170not control copyright. Those thus making or running the covered works
171for you must do so exclusively on your behalf, under your direction
172and control, on terms that prohibit them from making any copies of
173your copyrighted material outside their relationship with you.
174
175 Conveying under any other circumstances is permitted solely under
176the conditions stated below. Sublicensing is not allowed; section 10
177makes it unnecessary.
178
179 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
181 No covered work shall be deemed part of an effective technological
182measure under any applicable law fulfilling obligations under article
18311 of the WIPO copyright treaty adopted on 20 December 1996, or
184similar laws prohibiting or restricting circumvention of such
185measures.
186
187 When you convey a covered work, you waive any legal power to forbid
188circumvention of technological measures to the extent such circumvention
189is effected by exercising rights under this License with respect to
190the covered work, and you disclaim any intention to limit operation or
191modification of the work as a means of enforcing, against the work's
192users, your or third parties' legal rights to forbid circumvention of
193technological measures.
194
195 4. Conveying Verbatim Copies.
196
197 You may convey verbatim copies of the Program's source code as you
198receive it, in any medium, provided that you conspicuously and
199appropriately publish on each copy an appropriate copyright notice;
200keep intact all notices stating that this License and any
201non-permissive terms added in accord with section 7 apply to the code;
202keep intact all notices of the absence of any warranty; and give all
203recipients a copy of this License along with the Program.
204
205 You may charge any price or no price for each copy that you convey,
206and you may offer support or warranty protection for a fee.
207
208 5. Conveying Modified Source Versions.
209
210 You may convey a work based on the Program, or the modifications to
211produce it from the Program, in the form of source code under the
212terms of section 4, provided that you also meet all of these conditions:
213
214 a) The work must carry prominent notices stating that you modified
215 it, and giving a relevant date.
216
217 b) The work must carry prominent notices stating that it is
218 released under this License and any conditions added under section
219 7. This requirement modifies the requirement in section 4 to
220 "keep intact all notices".
221
222 c) You must license the entire work, as a whole, under this
223 License to anyone who comes into possession of a copy. This
224 License will therefore apply, along with any applicable section 7
225 additional terms, to the whole of the work, and all its parts,
226 regardless of how they are packaged. This License gives no
227 permission to license the work in any other way, but it does not
228 invalidate such permission if you have separately received it.
229
230 d) If the work has interactive user interfaces, each must display
231 Appropriate Legal Notices; however, if the Program has interactive
232 interfaces that do not display Appropriate Legal Notices, your
233 work need not make them do so.
234
235 A compilation of a covered work with other separate and independent
236works, which are not by their nature extensions of the covered work,
237and which are not combined with it such as to form a larger program,
238in or on a volume of a storage or distribution medium, is called an
239"aggregate" if the compilation and its resulting copyright are not
240used to limit the access or legal rights of the compilation's users
241beyond what the individual works permit. Inclusion of a covered work
242in an aggregate does not cause this License to apply to the other
243parts of the aggregate.
244
245 6. Conveying Non-Source Forms.
246
247 You may convey a covered work in object code form under the terms
248of sections 4 and 5, provided that you also convey the
249machine-readable Corresponding Source under the terms of this License,
250in one of these ways:
251
252 a) Convey the object code in, or embodied in, a physical product
253 (including a physical distribution medium), accompanied by the
254 Corresponding Source fixed on a durable physical medium
255 customarily used for software interchange.
256
257 b) Convey the object code in, or embodied in, a physical product
258 (including a physical distribution medium), accompanied by a
259 written offer, valid for at least three years and valid for as
260 long as you offer spare parts or customer support for that product
261 model, to give anyone who possesses the object code either (1) a
262 copy of the Corresponding Source for all the software in the
263 product that is covered by this License, on a durable physical
264 medium customarily used for software interchange, for a price no
265 more than your reasonable cost of physically performing this
266 conveying of source, or (2) access to copy the
267 Corresponding Source from a network server at no charge.
268
269 c) Convey individual copies of the object code with a copy of the
270 written offer to provide the Corresponding Source. This
271 alternative is allowed only occasionally and noncommercially, and
272 only if you received the object code with such an offer, in accord
273 with subsection 6b.
274
275 d) Convey the object code by offering access from a designated
276 place (gratis or for a charge), and offer equivalent access to the
277 Corresponding Source in the same way through the same place at no
278 further charge. You need not require recipients to copy the
279 Corresponding Source along with the object code. If the place to
280 copy the object code is a network server, the Corresponding Source
281 may be on a different server (operated by you or a third party)
282 that supports equivalent copying facilities, provided you maintain
283 clear directions next to the object code saying where to find the
284 Corresponding Source. Regardless of what server hosts the
285 Corresponding Source, you remain obligated to ensure that it is
286 available for as long as needed to satisfy these requirements.
287
288 e) Convey the object code using peer-to-peer transmission, provided
289 you inform other peers where the object code and Corresponding
290 Source of the work are being offered to the general public at no
291 charge under subsection 6d.
292
293 A separable portion of the object code, whose source code is excluded
294from the Corresponding Source as a System Library, need not be
295included in conveying the object code work.
296
297 A "User Product" is either (1) a "consumer product", which means any
298tangible personal property which is normally used for personal, family,
299or household purposes, or (2) anything designed or sold for incorporation
300into a dwelling. In determining whether a product is a consumer product,
301doubtful cases shall be resolved in favor of coverage. For a particular
302product received by a particular user, "normally used" refers to a
303typical or common use of that class of product, regardless of the status
304of the particular user or of the way in which the particular user
305actually uses, or expects or is expected to use, the product. A product
306is a consumer product regardless of whether the product has substantial
307commercial, industrial or non-consumer uses, unless such uses represent
308the only significant mode of use of the product.
309
310 "Installation Information" for a User Product means any methods,
311procedures, authorization keys, or other information required to install
312and execute modified versions of a covered work in that User Product from
313a modified version of its Corresponding Source. The information must
314suffice to ensure that the continued functioning of the modified object
315code is in no case prevented or interfered with solely because
316modification has been made.
317
318 If you convey an object code work under this section in, or with, or
319specifically for use in, a User Product, and the conveying occurs as
320part of a transaction in which the right of possession and use of the
321User Product is transferred to the recipient in perpetuity or for a
322fixed term (regardless of how the transaction is characterized), the
323Corresponding Source conveyed under this section must be accompanied
324by the Installation Information. But this requirement does not apply
325if neither you nor any third party retains the ability to install
326modified object code on the User Product (for example, the work has
327been installed in ROM).
328
329 The requirement to provide Installation Information does not include a
330requirement to continue to provide support service, warranty, or updates
331for a work that has been modified or installed by the recipient, or for
332the User Product in which it has been modified or installed. Access to a
333network may be denied when the modification itself materially and
334adversely affects the operation of the network or violates the rules and
335protocols for communication across the network.
336
337 Corresponding Source conveyed, and Installation Information provided,
338in accord with this section must be in a format that is publicly
339documented (and with an implementation available to the public in
340source code form), and must require no special password or key for
341unpacking, reading or copying.
342
343 7. Additional Terms.
344
345 "Additional permissions" are terms that supplement the terms of this
346License by making exceptions from one or more of its conditions.
347Additional permissions that are applicable to the entire Program shall
348be treated as though they were included in this License, to the extent
349that they are valid under applicable law. If additional permissions
350apply only to part of the Program, that part may be used separately
351under those permissions, but the entire Program remains governed by
352this License without regard to the additional permissions.
353
354 When you convey a copy of a covered work, you may at your option
355remove any additional permissions from that copy, or from any part of
356it. (Additional permissions may be written to require their own
357removal in certain cases when you modify the work.) You may place
358additional permissions on material, added by you to a covered work,
359for which you have or can give appropriate copyright permission.
360
361 Notwithstanding any other provision of this License, for material you
362add to a covered work, you may (if authorized by the copyright holders of
363that material) supplement the terms of this License with terms:
364
365 a) Disclaiming warranty or limiting liability differently from the
366 terms of sections 15 and 16 of this License; or
367
368 b) Requiring preservation of specified reasonable legal notices or
369 author attributions in that material or in the Appropriate Legal
370 Notices displayed by works containing it; or
371
372 c) Prohibiting misrepresentation of the origin of that material, or
373 requiring that modified versions of such material be marked in
374 reasonable ways as different from the original version; or
375
376 d) Limiting the use for publicity purposes of names of licensors or
377 authors of the material; or
378
379 e) Declining to grant rights under trademark law for use of some
380 trade names, trademarks, or service marks; or
381
382 f) Requiring indemnification of licensors and authors of that
383 material by anyone who conveys the material (or modified versions of
384 it) with contractual assumptions of liability to the recipient, for
385 any liability that these contractual assumptions directly impose on
386 those licensors and authors.
387
388 All other non-permissive additional terms are considered "further
389restrictions" within the meaning of section 10. If the Program as you
390received it, or any part of it, contains a notice stating that it is
391governed by this License along with a term that is a further
392restriction, you may remove that term. If a license document contains
393a further restriction but permits relicensing or conveying under this
394License, you may add to a covered work material governed by the terms
395of that license document, provided that the further restriction does
396not survive such relicensing or conveying.
397
398 If you add terms to a covered work in accord with this section, you
399must place, in the relevant source files, a statement of the
400additional terms that apply to those files, or a notice indicating
401where to find the applicable terms.
402
403 Additional terms, permissive or non-permissive, may be stated in the
404form of a separately written license, or stated as exceptions;
405the above requirements apply either way.
406
407 8. Termination.
408
409 You may not propagate or modify a covered work except as expressly
410provided under this License. Any attempt otherwise to propagate or
411modify it is void, and will automatically terminate your rights under
412this License (including any patent licenses granted under the third
413paragraph of section 11).
414
415 However, if you cease all violation of this License, then your
416license from a particular copyright holder is reinstated (a)
417provisionally, unless and until the copyright holder explicitly and
418finally terminates your license, and (b) permanently, if the copyright
419holder fails to notify you of the violation by some reasonable means
420prior to 60 days after the cessation.
421
422 Moreover, your license from a particular copyright holder is
423reinstated permanently if the copyright holder notifies you of the
424violation by some reasonable means, this is the first time you have
425received notice of violation of this License (for any work) from that
426copyright holder, and you cure the violation prior to 30 days after
427your receipt of the notice.
428
429 Termination of your rights under this section does not terminate the
430licenses of parties who have received copies or rights from you under
431this License. If your rights have been terminated and not permanently
432reinstated, you do not qualify to receive new licenses for the same
433material under section 10.
434
435 9. Acceptance Not Required for Having Copies.
436
437 You are not required to accept this License in order to receive or
438run a copy of the Program. Ancillary propagation of a covered work
439occurring solely as a consequence of using peer-to-peer transmission
440to receive a copy likewise does not require acceptance. However,
441nothing other than this License grants you permission to propagate or
442modify any covered work. These actions infringe copyright if you do
443not accept this License. Therefore, by modifying or propagating a
444covered work, you indicate your acceptance of this License to do so.
445
446 10. Automatic Licensing of Downstream Recipients.
447
448 Each time you convey a covered work, the recipient automatically
449receives a license from the original licensors, to run, modify and
450propagate that work, subject to this License. You are not responsible
451for enforcing compliance by third parties with this License.
452
453 An "entity transaction" is a transaction transferring control of an
454organization, or substantially all assets of one, or subdividing an
455organization, or merging organizations. If propagation of a covered
456work results from an entity transaction, each party to that
457transaction who receives a copy of the work also receives whatever
458licenses to the work the party's predecessor in interest had or could
459give under the previous paragraph, plus a right to possession of the
460Corresponding Source of the work from the predecessor in interest, if
461the predecessor has it or can get it with reasonable efforts.
462
463 You may not impose any further restrictions on the exercise of the
464rights granted or affirmed under this License. For example, you may
465not impose a license fee, royalty, or other charge for exercise of
466rights granted under this License, and you may not initiate litigation
467(including a cross-claim or counterclaim in a lawsuit) alleging that
468any patent claim is infringed by making, using, selling, offering for
469sale, or importing the Program or any portion of it.
470
471 11. Patents.
472
473 A "contributor" is a copyright holder who authorizes use under this
474License of the Program or a work on which the Program is based. The
475work thus licensed is called the contributor's "contributor version".
476
477 A contributor's "essential patent claims" are all patent claims
478owned or controlled by the contributor, whether already acquired or
479hereafter acquired, that would be infringed by some manner, permitted
480by this License, of making, using, or selling its contributor version,
481but do not include claims that would be infringed only as a
482consequence of further modification of the contributor version. For
483purposes of this definition, "control" includes the right to grant
484patent sublicenses in a manner consistent with the requirements of
485this License.
486
487 Each contributor grants you a non-exclusive, worldwide, royalty-free
488patent license under the contributor's essential patent claims, to
489make, use, sell, offer for sale, import and otherwise run, modify and
490propagate the contents of its contributor version.
491
492 In the following three paragraphs, a "patent license" is any express
493agreement or commitment, however denominated, not to enforce a patent
494(such as an express permission to practice a patent or covenant not to
495sue for patent infringement). To "grant" such a patent license to a
496party means to make such an agreement or commitment not to enforce a
497patent against the party.
498
499 If you convey a covered work, knowingly relying on a patent license,
500and the Corresponding Source of the work is not available for anyone
501to copy, free of charge and under the terms of this License, through a
502publicly available network server or other readily accessible means,
503then you must either (1) cause the Corresponding Source to be so
504available, or (2) arrange to deprive yourself of the benefit of the
505patent license for this particular work, or (3) arrange, in a manner
506consistent with the requirements of this License, to extend the patent
507license to downstream recipients. "Knowingly relying" means you have
508actual knowledge that, but for the patent license, your conveying the
509covered work in a country, or your recipient's use of the covered work
510in a country, would infringe one or more identifiable patents in that
511country that you have reason to believe are valid.
512
513 If, pursuant to or in connection with a single transaction or
514arrangement, you convey, or propagate by procuring conveyance of, a
515covered work, and grant a patent license to some of the parties
516receiving the covered work authorizing them to use, propagate, modify
517or convey a specific copy of the covered work, then the patent license
518you grant is automatically extended to all recipients of the covered
519work and works based on it.
520
521 A patent license is "discriminatory" if it does not include within
522the scope of its coverage, prohibits the exercise of, or is
523conditioned on the non-exercise of one or more of the rights that are
524specifically granted under this License. You may not convey a covered
525work if you are a party to an arrangement with a third party that is
526in the business of distributing software, under which you make payment
527to the third party based on the extent of your activity of conveying
528the work, and under which the third party grants, to any of the
529parties who would receive the covered work from you, a discriminatory
530patent license (a) in connection with copies of the covered work
531conveyed by you (or copies made from those copies), or (b) primarily
532for and in connection with specific products or compilations that
533contain the covered work, unless you entered into that arrangement,
534or that patent license was granted, prior to 28 March 2007.
535
536 Nothing in this License shall be construed as excluding or limiting
537any implied license or other defenses to infringement that may
538otherwise be available to you under applicable patent law.
539
540 12. No Surrender of Others' Freedom.
541
542 If conditions are imposed on you (whether by court order, agreement or
543otherwise) that contradict the conditions of this License, they do not
544excuse you from the conditions of this License. If you cannot convey a
545covered work so as to satisfy simultaneously your obligations under this
546License and any other pertinent obligations, then as a consequence you may
547not convey it at all. For example, if you agree to terms that obligate you
548to collect a royalty for further conveying from those to whom you convey
549the Program, the only way you could satisfy both those terms and this
550License would be to refrain entirely from conveying the Program.
551
552 13. Use with the GNU Affero General Public License.
553
554 Notwithstanding any other provision of this License, you have
555permission to link or combine any covered work with a work licensed
556under version 3 of the GNU Affero General Public License into a single
557combined work, and to convey the resulting work. The terms of this
558License will continue to apply to the part which is the covered work,
559but the special requirements of the GNU Affero General Public License,
560section 13, concerning interaction through a network will apply to the
561combination as such.
562
563 14. Revised Versions of this License.
564
565 The Free Software Foundation may publish revised and/or new versions of
566the GNU General Public License from time to time. Such new versions will
567be similar in spirit to the present version, but may differ in detail to
568address new problems or concerns.
569
570 Each version is given a distinguishing version number. If the
571Program specifies that a certain numbered version of the GNU General
572Public License "or any later version" applies to it, you have the
573option of following the terms and conditions either of that numbered
574version or of any later version published by the Free Software
575Foundation. If the Program does not specify a version number of the
576GNU General Public License, you may choose any version ever published
577by the Free Software Foundation.
578
579 If the Program specifies that a proxy can decide which future
580versions of the GNU General Public License can be used, that proxy's
581public statement of acceptance of a version permanently authorizes you
582to choose that version for the Program.
583
584 Later license versions may give you additional or different
585permissions. However, no additional obligations are imposed on any
586author or copyright holder as a result of your choosing to follow a
587later version.
588
589 15. Disclaimer of Warranty.
590
591 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
600 16. Limitation of Liability.
601
602 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610SUCH DAMAGES.
611
612 17. Interpretation of Sections 15 and 16.
613
614 If the disclaimer of warranty and limitation of liability provided
615above cannot be given local legal effect according to their terms,
616reviewing courts shall apply local law that most closely approximates
617an absolute waiver of all civil liability in connection with the
618Program, unless a warranty or assumption of liability accompanies a
619copy of the Program in return for a fee.
620
621 END OF TERMS AND CONDITIONS
622
623 How to Apply These Terms to Your New Programs
624
625 If you develop a new program, and you want it to be of the greatest
626possible use to the public, the best way to achieve this is to make it
627free software which everyone can redistribute and change under these terms.
628
629 To do so, attach the following notices to the program. It is safest
630to attach them to the start of each source file to most effectively
631state the exclusion of warranty; and each file should have at least
632the "copyright" line and a pointer to where the full notice is found.
633
634 <one line to give the program's name and a brief idea of what it does.>
635 Copyright (C) <year> <name of author>
636
637 This program is free software: you can redistribute it and/or modify
638 it under the terms of the GNU General Public License as published by
639 the Free Software Foundation, either version 3 of the License, or
640 (at your option) any later version.
641
642 This program is distributed in the hope that it will be useful,
643 but WITHOUT ANY WARRANTY; without even the implied warranty of
644 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 GNU General Public License for more details.
646
647 You should have received a copy of the GNU General Public License
648 along with this program. If not, see <http://www.gnu.org/licenses/>.
649
650Also add information on how to contact you by electronic and paper mail.
651
652 If the program does terminal interaction, make it output a short
653notice like this when it starts in an interactive mode:
654
655 <program> Copyright (C) <year> <name of author>
656 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 This is free software, and you are welcome to redistribute it
658 under certain conditions; type `show c' for details.
659
660The hypothetical commands `show w' and `show c' should show the appropriate
661parts of the General Public License. Of course, your program's commands
662might be different; for a GUI interface, you would use an "about box".
663
664 You should also get your employer (if you work as a programmer) or school,
665if any, to sign a "copyright disclaimer" for the program, if necessary.
666For more information on this, and how to apply and follow the GNU GPL, see
667<http://www.gnu.org/licenses/>.
668
669 The GNU General Public License does not permit incorporating your program
670into proprietary programs. If your program is a subroutine library, you
671may consider it more useful to permit linking proprietary applications with
672the library. If this is what you want to do, use the GNU Lesser General
673Public License instead of this License. But first, please read
674<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/doc/keymap.md b/doc/keymap.md
index 6f2a663fc..3ea138ea8 100644
--- a/doc/keymap.md
+++ b/doc/keymap.md
@@ -1,15 +1,30 @@
1Keymap framework - how to define your keymap 1Keymap framework - how to define your keymap
2============================================ 2============================================
3***NOTE: This is not final version, may be inconsistent with source code and changed occasionally for a while.*** 3***NOTE: This is updated for QMK but this is still work in progress. This may still be inconsistent with the source code.***
4
5QMK is based on TMK. Understanding the essential changes made should help you understand variable names etc.
6
7## TMK vs. QMK
8
9| Firmware |TMK |QMK |
10|---------------------------|-----------------------|-------------------------|
11| Maintainer |hasu |Jack Humbert et al. |
12| Build path customization | `TMK_DIR = ...` | `include .../Makefile` |
13| `keymaps` data | 3D array of `uint8_t` holding **keycode** | 3D array of `uint16_t` holding **action code** |
14| `fn_actions` data | 1D array of `uint16_t` holding **action code** | 1D array of `uint16_t` holding **action code** |
15
16Since QMK is based on TMK and uses major portion of TMK code as is, understanding the essential changes made should help you understand the code.
4 17
5## 0. Keymap and layers 18## 0. Keymap and layers
6**Keymap** is comprised of multiple layers of key layout, you can define **32 layers** at most. 19In QMK, **`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`** holds multiple **layers** of keymap information in **16 bit** data holding the **action code**. You can define **32 layers** at most.
7**Layer** is an array of **keycodes** to define **actions** for each physical keys.
8respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence.
9 20
10 Keymap: 32 Layers Layer: Keycode matrix 21For trivial key definitions, the higher 8 bits of the **action code** are all 0 and the lower 8 bits holds the USB HID usage code generated by the key as **keycode**.
22
23Respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence.
24
25 Keymap: 32 Layers Layer: action code matrix
11 ----------------- --------------------- 26 ----------------- ---------------------
12 stack of layers array_of_keycode[row][column] 27 stack of layers array_of_action_code[row][column]
13 ____________ precedence _______________________ 28 ____________ precedence _______________________
14 / / | high / ESC / F1 / F2 / F3 .... 29 / / | high / ESC / F1 / F2 / F3 ....
15 31 /___________// | /-----/-----/-----/----- 30 31 /___________// | /-----/-----/-----/-----
@@ -22,11 +37,15 @@ respective layers can be validated simultaneously. Layers are indexed with 0 to
22 0 /___________/ V low 0 `-------------------------- 37 0 /___________/ V low 0 `--------------------------
23 38
24 39
40Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history.
41
42### 0.1 Keymap layer status
43Keymap layer has its state in two 32 bit parameters:
25 44
26### 0.1 Keymap status 45* **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred.
27Keymap has its state in two parameters: 46* **`layer_state`** () has current on/off status of the layer on its each bit.
28**`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit.
29 47
48Keymap has its state in two parameter **`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit.
30Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`. 49Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`.
31To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty. 50To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
32 51
@@ -67,97 +86,132 @@ On the other hand, you shall change `layer_state` to overlay base layer with som
67### 0.2 Layer Precedence and Transparency 86### 0.2 Layer Precedence and Transparency
68Note that ***higher layer has higher priority on stack of layers***, namely firmware falls down from top layer to bottom to look up keycode. Once it spots keycode other than **`KC_TRNS`**(transparent) on a layer it stops searching and lower layers aren't referred. 87Note that ***higher layer has higher priority on stack of layers***, namely firmware falls down from top layer to bottom to look up keycode. Once it spots keycode other than **`KC_TRNS`**(transparent) on a layer it stops searching and lower layers aren't referred.
69 88
70You can place `KC_TRNS` on overlay layer changes just part of layout to fall back on lower or base layer. 89You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer.
71Key with `KC_TRANS` doesn't has its own keycode and refers to lower valid layers for keycode, instead. 90Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead.
72See example below. 91See example below.
73 92
74 93
75### 0.3 Keymap Example 94### 0.3 Keymap Example
76Keymap is **`keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array. 95Keymap in this QMK is **`static const uint16_t PROGMEM keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array. It holds the 16 bit quantum keycode (action code).
96
97> Please note that keymap in the TMK, which QMK was forked from, is **`static const uint8_t PROGMEM keymaps[]`** C array which holds the 8 bit keycode (~USB HID usage code).
77 98
78This is a keymap example for [HHKB](http://en.wikipedia.org/wiki/Happy_Hacking_Keyboard) keyboard. 99This is a keymap example for [HHKB](http://en.wikipedia.org/wiki/Happy_Hacking_Keyboard) keyboard.
79This example has three layers, 'Qwerty' as base layer, 'Cursor' and 'Mousekey'. 100This example has three layers, 'QWERTY' as base layer, 'FN' and 'MOUSE'.
101
80In this example, 102In this example,
81 103
82 `Fn0` is a **momentary layer switching** key, you can use keys on Cursor layer while holding the key. 104 `MO(layer)` is a **momentary layer switching** key.
83 105
84 `Fn1` is a momentary layer switching key with tapping feature, you can get semicolon **';'** with taping the key and switch layers while holding the key. The word **'tap'** or **'tapping'** mean to press and release a key quickly. 106You can find other keymap definitions in file `keymap.c` located on project directories.
107```
108/*
109 * dbroqua HHKB Layout
110 */
111#include "hhkb.h"
112
113#define BASE 0
114#define FN 1
115#define MOUSE 2
116
117const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
118 /* BASE Level: Default Layer
119 * ,-----------------------------------------------------------------------------------------.
120 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
121 * |-----------------------------------------------------------------------------------------+
122 * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
123 * |-----------------------------------------------------------------------------------------+
124 * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
125 * |-----------------------------------------------------------------------------------------+
126 * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn |
127 * +-----------------------------------------------------------------------------------------+
128 * | Gui | Alt | Space | AltGr |Mouse|
129 * `----------------------------------------------------------------´
130 */
131 [BASE] = KEYMAP(
132 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, \
133 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, \
134 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
135 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(FN), \
136 KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, MO(MOUSE)
137 ),
138
139 /* FN Layer
140 * ,-----------------------------------------------------------------------------------------.
141 * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del|
142 * |-----------------------------------------------------------------------------------------+
143 * | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | |
144 * |-----------------------------------------------------------------------------------------+
145 * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left |Right| |
146 * |-----------------------------------------------------------------------------------------+
147 * | | Prev| Play| Next| | | + | - | End |PgDwn| Down| | |
148 * +-----------------------------------------------------------------------------------------+
149 * | | | | Stop | |
150 * `----------------------------------------------------------------´
151 */
152 [FN] = KEYMAP(
153 KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
154 KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, \
155 KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \
156 KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
157 KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_TRNS
158 ),
159
160 /* MOUSE Layer
161 * ,-----------------------------------------------------------------------------------------.
162 * | | | | | | | | | | | | | | | |
163 * |-----------------------------------------------------------------------------------------+
164 * | | | WUp | | | | | | | | Btn1| Up | Btn2| |
165 * |-----------------------------------------------------------------------------------------+
166 * | | WLt | WDn | WRt | | | | | | | Left |Right| |
167 * |-----------------------------------------------------------------------------------------+
168 * | | | | | | | | | | Btn3| Down| | |
169 * +-----------------------------------------------------------------------------------------+
170 * | | | | | |
171 * `----------------------------------------------------------------´
172 */
173 [MOUSE] = KEYMAP(
174 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_TRNS, \
175 KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, \
176 KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_R, KC_TRNS, \
177 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_MS_D, KC_TRNS, KC_TRNS, \
178 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
179 )
180};
85 181
86 `Fn2` is a **toggle layer switch** key, you can stay switched layer after releasing the key unlike momentary switching. 182const uint16_t PROGMEM fn_actions[] = {
87 183
88You can find other keymap definitions in file `keymap.c` located on project directories. 184};
89 185
90 static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 186const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
91 /* 0: Qwerty 187{
92 * ,-----------------------------------------------------------. 188 // MACRODOWN only works in this function
93 * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| 189 switch(id) {
94 * |-----------------------------------------------------------| 190 case 0:
95 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs| 191 if (record->event.pressed) {
96 * |-----------------------------------------------------------| 192 register_code(KC_RSFT);
97 * |Contro| A| S| D| F| G| H| J| K| L|Fn1| '|Enter | 193 } else {
98 * |-----------------------------------------------------------| 194 unregister_code(KC_RSFT);
99 * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| 195 }
100 * `-----------------------------------------------------------' 196 break;
101 * |Gui|Alt |Space |Alt |Fn2| 197 }
102 * `-------------------------------------------' 198 return MACRO_NONE;
103 */ 199};
104 KEYMAP(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, \ 200```
105 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, \
106 LCTL,A, S, D, F, G, H, J, K, L, FN1, QUOT,ENT, \
107 LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,FN0, \
108 LGUI,LALT, SPC, RALT,FN2),
109 /* 1: Cursor(HHKB mode)
110 * ,-----------------------------------------------------------.
111 * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|
112 * |-----------------------------------------------------------|
113 * |Caps | | | | | | | |Psc|Slk|Pus|Up | |Backs|
114 * |-----------------------------------------------------------|
115 * |Contro|VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter |
116 * |-----------------------------------------------------------|
117 * |Shift | | | | | | +| -|End|PgD|Dow|Shift | |
118 * `-----------------------------------------------------------'
119 * |Gui |Alt |Space |Alt |Gui|
120 * `--------------------------------------------'
121 */
122 KEYMAP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \
123 CAPS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,UP, TRNS,BSPC, \
124 LCTL,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,ENT, \
125 LSFT,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN,RSFT,TRNS, \
126 LGUI,LALT, SPC, RALT,RGUI),
127 /* 2: Mousekey
128 * ,-----------------------------------------------------------.
129 * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|
130 * |-----------------------------------------------------------|
131 * |Tab | | | | | |MwL|MwD|MwU|MwR| | | |Backs|
132 * |-----------------------------------------------------------|
133 * |Contro| | | | | |McL|McD|McU|McR| | |Return |
134 * |-----------------------------------------------------------|
135 * |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | |
136 * `-----------------------------------------------------------'
137 * |Gui |Alt |Mb1 |Alt | |
138 * `--------------------------------------------'
139 * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel
140 */
141 KEYMAP(ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \
142 TAB, TRNS,TRNS,TRNS,TRNS,TRNS,WH_L,WH_D,WH_U,WH_R,TRNS,TRNS,TRNS,BSPC, \
143 LCTL,TRNS,ACL0,ACL1,ACL2,TRNS,MS_L,MS_D,MS_U,MS_R,TRNS,QUOT,ENT, \
144 LSFT,TRNS,TRNS,TRNS,TRNS,BTN3,BTN2,BTN1,BTN4,BTN5,SLSH,RSFT,TRNS, \
145 LGUI,LALT, BTN1, RALT,TRNS),
146 };
147 201
148 static const uint16_t PROGMEM fn_actions[] = {
149 ACTION_LAYER_MOMENTARY(1), // FN0
150 ACTION_LAYER_TAP_KEY(2, KC_SCLN), // FN1
151 ACTION_LAYER_TOGGLE(2), // FN2
152 };
153 202
203## 1. Keycode
204See [`tmk_core/common/keycode.h`](../tmk_core/common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap. Keycodes are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) plus special codes in the `0xA5-DF` range.
205
206Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys.
154 207
208keymaps[]
155 209
210In `KEYMAP()` macro, TMK recommends you to keep prefix part `KC_` of keycode to keep keymap compact. For example, just use `A` instead you place `KC_A` in `KEYMAP()`. But this doesn't apply for QMK.
156 211
157## 1. Keycode 212The `KEYMAP()` macro defines correspondence between the physical key location to the electrical key connection.
158See [`common/keycode.h`](../common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap. Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys.
159 213
160 ***In `KEYMAP()` macro you should omit prefix part `KC_` of keycode to keep keymap compact.*** For example, just use `A` instead you place `KC_A` in `KEYMAP()`. Some keycodes has 4-letter **short name** in addition to descriptive name, you'll prefer short one in `KEYMAP()`. 214Some keycodes has 7-letter **short name** such as `KC_COMM` in addition to descriptive name `KC_COMMA`, you'll prefer short one in `KEYMAP()`.
161 215
162### 1.0 Other key 216### 1.0 Other key
163- `KC_NO` for no action 217- `KC_NO` for no action
@@ -192,7 +246,10 @@ There are 8 modifiers which has discrimination between left and right.
192- `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation 246- `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation
193 247
194### 1.5 Fn key 248### 1.5 Fn key
195`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***32 `Fn` keys can be defined at most.*** 249You don't need to use this functionality under QMK since this is a backward compatibility functionality. Unlike TMK, you can write action code itself directly in **`static const uint16_t PROGMEM keymaps[]`** C array using `MO(layer)`, etc.
250
251`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***Only 32 `Fn` keys can be defined at most.***
252
196 253
197### 1.6 Keycode Table 254### 1.6 Keycode Table
198 See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes. 255 See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes.
@@ -549,6 +606,9 @@ Layer switching with tap key:
549 606
550[dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys 607[dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
551 608
609When user hold a key after tap, it repeat the tapped key rather to hold a modifier key.
610If you prefer to hold a modifier instead, define `TAPPING_FORCE_HOLD` in `config.h`.
611See https://github.com/qmk/qmk_firmware/issues/889 for the detail.
552 612
553### 4.2 Tap Toggle 613### 4.2 Tap Toggle
554This is a feature to assign both toggle layer and momentary switch layer action to just same one physical key. It works as momentary layer switch when holding a key but toggle switch with several taps. 614This is a feature to assign both toggle layer and momentary switch layer action to just same one physical key. It works as momentary layer switch when holding a key but toggle switch with several taps.
@@ -581,15 +641,11 @@ Similar to layer tap toggle, this works as a momentary modifier when holding, bu
581 641
582 642
583## 5. Legacy Keymap 643## 5. Legacy Keymap
584This was used in prior version and still works due to legacy support code in `common/keymap.c`. Legacy keymap doesn't support many of features that new keymap offers. ***It is not recommended to use Legacy Keymap for new project.*** 644In QMK, `tmk_core/common/keymap.c` is missing and its replacement `quantum/keymap_common.c` lacks Legacy Keymap support.
585
586To enable Legacy Keymap support define this macro in `config.h`.
587
588 #define USE_LEGACY_KEYMAP
589 645
590Legacy Keymap uses two arrays `fn_layer[]` and `fn_keycode[]` to define Fn key. The index of arrays corresponds with postfix number of `Fn` key. Array `fn_layer[]` indicates destination layer to switch and `fn_keycode[]` has keycodes to send when tapping `Fn` key. 646Legacy Keymap uses two arrays `fn_layer[]` and `fn_keycode[]` to define Fn key. The index of arrays corresponds with postfix number of `Fn` key. Array `fn_layer[]` indicates destination layer to switch and `fn_keycode[]` has keycodes to send when tapping `Fn` key.
591 647
592In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key. 648In the following legacy keymap setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key.
593 649
594 static const uint8_t PROGMEM fn_layer[] = { 650 static const uint8_t PROGMEM fn_layer[] = {
595 1, // Fn0 651 1, // Fn0
@@ -603,6 +659,7 @@ In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2
603 KC_SPC, // Fn2 659 KC_SPC, // Fn2
604 }; 660 };
605 661
662Under QMK, these can be realized using action code ACTION_LAYER_TAP_KEY(1, KC_NO), ACTION_LAYER_TAP_KEY(2, KC_NO), and ACTION_LAYER_TAP_KEY(2, KC_SPC) in the `keymaps` directly.
606 663
607## 6. Terminology 664## 6. Terminology
608***TBD*** 665***TBD***
diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c
index 04ad66fed..ce92e89c9 100644
--- a/keyboards/atreus/keymaps/default/keymap.c
+++ b/keyboards/atreus/keymaps/default/keymap.c
@@ -15,8 +15,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
15[_QW] = { /* Qwerty */ 15[_QW] = { /* Qwerty */
16 {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P }, 16 {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P },
17 {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, 17 {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN },
18 {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, 18 {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH },
19 {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT } 19 {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT }
20}, 20},
21/* 21/*
22 * ! @ up { } || pgup 7 8 9 * 22 * ! @ up { } || pgup 7 8 9 *
@@ -27,8 +27,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
27[_RS] = { /* [> RAISE <] */ 27[_RS] = { /* [> RAISE <] */
28 {KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, 28 {KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR},
29 {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, 29 {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS},
30 {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LALT, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS}, 30 {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LCTL, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS},
31 {TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL} 31 {TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL}
32}, 32},
33/* 33/*
34 * insert home up end pgup || up F7 F8 F9 F10 34 * insert home up end pgup || up F7 F8 F9 F10
@@ -39,8 +39,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
39[_LW] = { /* [> LOWER <] */ 39[_LW] = { /* [> LOWER <] */
40 {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, 40 {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10},
41 {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, 41 {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11},
42 {KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12}, 42 {KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_LCTL, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12},
43 {KC_TRNS, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_PSCR, KC_SLCK, KC_PAUS} 43 {KC_TRNS, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_SPC, DF(_QW), KC_PSCR, KC_SLCK, KC_PAUS}
44}}; 44}};
45 45
46const uint16_t PROGMEM fn_actions[] = { 46const uint16_t PROGMEM fn_actions[] = {
diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c
index b418cc9b5..66fdebb50 100644
--- a/keyboards/atreus/keymaps/xyverz/keymap.c
+++ b/keyboards/atreus/keymaps/xyverz/keymap.c
@@ -35,23 +35,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35 {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P }, 35 {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P },
36 {KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, 36 {KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN},
37 {SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, CTL_T(KC_DEL), KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) }, 37 {SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, CTL_T(KC_DEL), KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) },
38 {KC_ESC, KC_TAB, KC_LGUI, MO(_L2), KC_BSPC, ALT_T(KC_ENT), KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT} 38 {KC_ESC, KC_TAB, KC_LGUI, MO(_L2), KC_BSPC, ALT_T(KC_ENT), KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_EQL}
39 }, 39 },
40 [_CM] = { /* Colemak */ 40 [_CM] = { /* Colemak */
41 {KC_Q, KC_W, KC_F, KC_P, KC_G, KC_NO, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, 41 {KC_Q, KC_W, KC_F, KC_P, KC_G, KC_NO, KC_J, KC_L, KC_U, KC_Y, KC_SCLN},
42 {KC_A, KC_R, KC_S, KC_T, KC_D, KC_NO, KC_H, KC_N, KC_E, KC_I, KC_O }, 42 {KC_A, KC_R, KC_S, KC_T, KC_D, KC_NO, KC_H, KC_N, KC_E, KC_I, KC_O },
43 {SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, CTL_T(KC_DEL), KC_K, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) }, 43 {SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, CTL_T(KC_DEL), KC_K, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) },
44 {KC_ESC, KC_TAB, KC_LGUI, MO(_L2), KC_BSPC, ALT_T(KC_ENT), KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT} 44 {KC_ESC, KC_TAB, KC_LGUI, MO(_L2), KC_BSPC, ALT_T(KC_ENT), KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_EQL}
45 }, 45 },
46 [_L1] = { /* LAYER 1 */ 46 [_L1] = { /* LAYER 1 */
47 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0 }, 47 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0 },
48 {KC_TAB, KC_INS, KC_UP, KC_DEL, KC_HOME, KC_NO, KC_PGUP, KC_MUTE, KC_VOLD, KC_VOLU, KC_EQL }, 48 {KC_TAB, KC_INS, KC_UP, KC_DEL, KC_HOME, KC_NO, KC_PGUP, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS},
49 {KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_LCTL, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, KC_BSLS}, 49 {KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_LCTL, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, KC_BSLS},
50 {KC_TRNS, KC_GRV, KC_LGUI, KC_TRNS, KC_DEL, KC_LALT, KC_SPC, KC_TRNS, KC_LBRC, KC_RBRC, KC_ENT } 50 {KC_TRNS, KC_GRV, KC_LGUI, KC_TRNS, KC_DEL, KC_LALT, KC_SPC, KC_TRNS, KC_LBRC, KC_RBRC, KC_ENT }
51 }, 51 },
52 [_L2] = { /* LAYER 2 */ 52 [_L2] = { /* LAYER 2 */
53 {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, 53 {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
54 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_PLUS}, 54 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_PIPE},
55 {KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12 }, 55 {KC_TRNS, KC_TRNS, DVORAK, QWERTY, COLEMAK, KC_LCTL, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12 },
56 {KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, LSFT(KC_LBRC), LSFT(KC_RBRC), RESET} 56 {KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_BSPC, KC_LALT, KC_SPC, KC_TRNS, LSFT(KC_LBRC), LSFT(KC_RBRC), RESET}
57 } 57 }
diff --git a/keyboards/atreus62/atreus62.h b/keyboards/atreus62/atreus62.h
index eacf5b451..ca5cda8a8 100644
--- a/keyboards/atreus62/atreus62.h
+++ b/keyboards/atreus62/atreus62.h
@@ -9,18 +9,34 @@ void promicro_bootloader_jmp(bool program);
9// The first section contains all of the arguements 9// The first section contains all of the arguements
10// The second converts the arguments into a two-dimensional array 10// The second converts the arguments into a two-dimensional array
11#define KEYMAP( \ 11#define KEYMAP( \
12 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ 12 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
13 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ 13 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
14 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ 14 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
15 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ 15 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
16 k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \ 16 k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \
17) \ 17) \
18{ \ 18{ \
19 { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \ 19 { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \
20 { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \ 20 { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \
21 { k20, k21, k22, k23, k24, k25, KC_NO, k26, k27, k28, k29, k2a, k2b }, \ 21 { k20, k21, k22, k23, k24, k25, KC_NO, k26, k27, k28, k29, k2a, k2b }, \
22 { k30, k31, k32, k33, k34, k35, k46, k36, k37, k38, k39, k3a, k3b }, \ 22 { k30, k31, k32, k33, k34, k35, k46, k36, k37, k38, k39, k3a, k3b }, \
23 { k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c, k4d } \ 23 { k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c, k4d } \
24} 24}
25 25
26#endif \ No newline at end of file 26// Used to create a keymap using only KC_ prefixed keys.
27#define KC_KEYMAP( \
28 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
29 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
30 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
31 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
32 k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \
33) \
34{ \
35 { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \
36 { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \
37 { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_NO, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \
38 { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k46, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b }, \
39 { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b, KC_##k4c, KC_##k4d } \
40}
41
42#endif
diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c
new file mode 100644
index 000000000..7b7c69f57
--- /dev/null
+++ b/keyboards/atreus62/keymaps/xyverz/keymap.c
@@ -0,0 +1,175 @@
1/* This is the Atreus62 keyboard layout by Xyverz aka u/Zrevyx on r/mk
2 I've blatantly stolen what works for me from the Planck and Preonic
3 layouts and modified this file to fit me. Initial credet goes to
4 u/profet23 for the doing all the work and adding this keyboard to
5 QMK in the first place.
6
7 I've got Dvorak, Qwerty, and Colemak layouts at this time, with the
8 possibility of adding more in the future.
9
10 The bottom row is fairly Kinesis-ish since the Contour and Advantage
11 keyboards have been my daily drivers for the last 17 years. I hope
12 You can get some enjoyment out of this layout should you chose it!
13
14CHANGELOG:
15
16 0.1 - Initial commit. Based off of Profet's default keymap.
17 0.2 - Converted to a more Planck/Preonic keymap style file with
18 persistent layers enabled. Renamed layers to reflect OLKB maps.
19 Added a TODO list.
20
21TODO:
22
23 * Make the layout more efficient, even if it means changing the RAISE
24 and LOWER functionality.
25 * Add legends in comments for each layer. Maybe.
26 * Add a gaming layer.
27
28*/
29
30// this is the style you want to emulate.
31// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
32#include "atreus62.h"
33#include "action_layer.h"
34#include "eeconfig.h"
35
36// Each layer gets a name for readability, which is then used in the keymap matrix below.
37// The underscores don't mean anything - you can have a layer called STUFF or any other name.
38// Layer names don't all need to be of the same length, obviously, and you can also skip them
39// entirely and just use numbers.
40#define _DVORAK 0
41#define _QWERTY 1
42#define _COLEMAK 2
43#define _WOW 3
44#define _LOWER 4
45#define _RAISE 5
46#define _ADJUST 16
47
48enum atreus52_keycodes {
49 DVORAK = SAFE_RANGE,
50 QWERTY,
51 COLEMAK,
52 WOW,
53 LOWER,
54 RAISE
55};
56
57// Fillers to make layering more clear
58#define _______ KC_TRNS
59#define XXXXXXX KC_NO
60
61const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
62 [_DVORAK] = { /* dvorak */
63 { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS },
64 { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH },
65 { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS },
66 { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LGUI, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT },
67 { KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL }
68 },
69
70 [_QWERTY] = { /* qwerty */
71 { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS },
72 { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL },
73 { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT },
74 { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT },
75 { KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL }
76 },
77
78 [_COLEMAK] = { /* colemak */
79 { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS },
80 { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL },
81 { KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT },
82 { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT },
83 { KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL}
84 },
85
86 [_WOW] = { /* Dvorak with minor modifications for playing World of Warcraft */
87 { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS },
88 { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH },
89 { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS },
90 { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT },
91 { KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, CTL_T(KC_ENT), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT }
92 },
93
94 [_LOWER] = {
95 { KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 },
96 { KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE },
97 { _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______ },
98 { _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______ },
99 { _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ }
100 },
101 [_RAISE] = {
102 { KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 },
103 { KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS },
104 { _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______ },
105 { _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______ },
106 { _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ }
107 },
108 [_ADJUST] = {
109 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
110 { _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
111 { _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, WOW },
112 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
113 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
114 },
115
116};
117
118const uint16_t PROGMEM fn_actions[] = {
119
120};
121
122void persistant_default_layer_set(uint16_t default_layer) {
123 eeconfig_update_default_layer(default_layer);
124 default_layer_set(default_layer);
125}
126
127bool process_record_user(uint16_t keycode, keyrecord_t *record) {
128 switch (keycode) {
129 case QWERTY:
130 if (record->event.pressed) {
131 persistant_default_layer_set(1UL<<_QWERTY);
132 }
133 return false;
134 break;
135 case COLEMAK:
136 if (record->event.pressed) {
137 persistant_default_layer_set(1UL<<_COLEMAK);
138 }
139 return false;
140 break;
141 case DVORAK:
142 if (record->event.pressed) {
143 persistant_default_layer_set(1UL<<_DVORAK);
144 }
145 return false;
146 break;
147 case WOW:
148 if (record->event.pressed) {
149 persistant_default_layer_set(1UL<<_WOW);
150 }
151 return false;
152 break;
153 case LOWER:
154 if (record->event.pressed) {
155 layer_on(_LOWER);
156 update_tri_layer(_LOWER, _RAISE, _ADJUST);
157 } else {
158 layer_off(_LOWER);
159 update_tri_layer(_LOWER, _RAISE, _ADJUST);
160 }
161 return false;
162 break;
163 case RAISE:
164 if (record->event.pressed) {
165 layer_on(_RAISE);
166 update_tri_layer(_LOWER, _RAISE, _ADJUST);
167 } else {
168 layer_off(_RAISE);
169 update_tri_layer(_LOWER, _RAISE, _ADJUST);
170 }
171 return false;
172 break;
173 }
174 return true;
175};
diff --git a/keyboards/clueboard/keymaps/xyverz/Makefile b/keyboards/clueboard/keymaps/xyverz/Makefile
new file mode 100644
index 000000000..950dadf84
--- /dev/null
+++ b/keyboards/clueboard/keymaps/xyverz/Makefile
@@ -0,0 +1,49 @@
1#----------------------------------------------------------------------------
2# On command line:
3#
4# make all = Make software.
5#
6# make clean = Clean out built project files.
7#
8# make coff = Convert ELF to AVR COFF.
9#
10# make extcoff = Convert ELF to AVR Extended COFF.
11#
12# make program = Download the hex file to the device.
13# Please customize your programmer settings(PROGRAM_CMD)
14#
15# make teensy = Download the hex file to the device, using teensy_loader_cli.
16# (must have teensy_loader_cli installed).
17#
18# make dfu = Download the hex file to the device, using dfu-programmer (must
19# have dfu-programmer installed).
20#
21# make flip = Download the hex file to the device, using Atmel FLIP (must
22# have Atmel FLIP installed).
23#
24# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
25# (must have dfu-programmer installed).
26#
27# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
28# (must have Atmel FLIP installed).
29#
30# make debug = Start either simulavr or avarice as specified for debugging,
31# with avr-gdb or avr-insight as the front end for debugging.
32#
33# make filename.s = Just compile filename.c into the assembler code only.
34#
35# make filename.i = Create a preprocessed source file for use in submitting
36# bug reports to the GCC project.
37#
38# To rebuild project do "make clean" then "make all".
39#----------------------------------------------------------------------------
40
41# Build Options
42# change to "no" to disable the options, or define them in the makefile.mk in
43# the appropriate keymap folder that will get included automatically
44#
45RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
46
47ifndef QUANTUM_DIR
48 include ../../../../Makefile
49endif \ No newline at end of file
diff --git a/keyboards/clueboard/keymaps/xyverz/keymap.c b/keyboards/clueboard/keymaps/xyverz/keymap.c
new file mode 100644
index 000000000..453911973
--- /dev/null
+++ b/keyboards/clueboard/keymaps/xyverz/keymap.c
@@ -0,0 +1,111 @@
1// Xyverz' keymap.
2// It's based on the default keymap, but Dvorak!
3
4#include "clueboard.h"
5
6// Used for SHIFT_ESC
7#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
8
9// Each layer gets a name for readability, which is then used in the keymap matrix below.
10// The underscores don't mean anything - you can have a layer called STUFF or any other name.
11// Layer names don't all need to be of the same length, obviously, and you can also skip them
12// entirely and just use numbers.
13#define _BL 0
14#define _FL 1
15#define _RS 2
16
17const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
18 /* Keymap _BL: (Base Layer) Default Layer
19 * ,--------------------------------------------------------------------------. ,----.
20 * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| BS| |PGUP|
21 * |--------------------------------------------------------------------------| |----|
22 * | Tab| '| ,| .| P| Y| F| G| C| R| L| /| =| \| |PGDN|
23 * |--------------------------------------------------------------------------| `----'
24 * |_FL/Caps| A| O| E| U| I| H| D| H| T| N| S| - | Ent|
25 * |-----------------------------------------------------------------------------.
26 * |Shift| BS| ;| Q| J| K| X| B| M| W| V| Z| BS|Shift| UP|
27 * |------------------------------------------------------------------------|----|----.
28 * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT|
29 * `----------------------------------------------------------------------------------'
30 */
31[_BL] = KEYMAP(
32 F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \
33 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, \
34 LT(_FL, KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, \
35 KC_LSFT, KC_RO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \
36 KC_LCTL, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
37
38 /* Keymap _FL: Function Layer
39 * ,--------------------------------------------------------------------------. ,----.
40 * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN|
41 * |--------------------------------------------------------------------------| |----|
42 * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE|
43 * |--------------------------------------------------------------------------| `----'
44 * | | | _RS| | | | | | | | | | | |
45 * |-----------------------------------------------------------------------------.
46 * | | | | | | | | | | | | | | |PGUP|
47 * |------------------------------------------------------------------------|----|----.
48 * | | | | | | | | | | _FL|HOME|PGDN| END|
49 * `----------------------------------------------------------------------------------'
50 */
51[_FL] = KEYMAP(
52 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, BL_STEP, \
53 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, KC_TRNS, KC_TRNS, \
54 KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
55 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_PGUP, \
56 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END),
57
58 /* Keymap _RS: Reset layer
59 * ,--------------------------------------------------------------------------. ,----.
60 * | | | | | | | | | | | | | | | RGB| |VAL+|
61 * |--------------------------------------------------------------------------| |----|
62 * | | | | |RESET| | | | | | | | | | |VAL-|
63 * |--------------------------------------------------------------------------| `----'
64 * | | | _RS| | | | | | | | | | | |
65 * |-----------------------------------------------------------------------------.
66 * | | | | | | | | | | | | | | |SAT+|
67 * |------------------------------------------------------------------------|----|----.
68 * | | | | | | | | | | _FL|HUE-|SAT-|HUE+|
69 * `----------------------------------------------------------------------------------'
70 */
71[_RS] = KEYMAP(
72 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, RGB_TOG, RGB_VAI, \
73 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \
74 KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
75 MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \
76 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI),
77};
78
79enum function_id {
80 SHIFT_ESC,
81};
82
83const uint16_t PROGMEM fn_actions[] = {
84 [0] = ACTION_FUNCTION(SHIFT_ESC),
85};
86
87void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
88 static uint8_t shift_esc_shift_mask;
89 switch (id) {
90 case SHIFT_ESC:
91 shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
92 if (record->event.pressed) {
93 if (shift_esc_shift_mask) {
94 add_key(KC_GRV);
95 send_keyboard_report();
96 } else {
97 add_key(KC_ESC);
98 send_keyboard_report();
99 }
100 } else {
101 if (shift_esc_shift_mask) {
102 del_key(KC_GRV);
103 send_keyboard_report();
104 } else {
105 del_key(KC_ESC);
106 send_keyboard_report();
107 }
108 }
109 break;
110 }
111}
diff --git a/keyboards/ergodox/ez/config.h b/keyboards/ergodox/ez/config.h
index e4f95c302..a3347de45 100644
--- a/keyboards/ergodox/ez/config.h
+++ b/keyboards/ergodox/ez/config.h
@@ -49,6 +49,9 @@ 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/* fix space cadet rollover issue */
53#define DISABLE_SPACE_CADET_ROLLOVER
54
52// #define RGB_MIDI 55// #define RGB_MIDI
53#define RGBW_BB_TWI 56#define RGBW_BB_TWI
54 57
diff --git a/keyboards/ergodox/keymaps/italian/keymap.c b/keyboards/ergodox/keymaps/italian/keymap.c
new file mode 100644
index 000000000..e4c7a569c
--- /dev/null
+++ b/keyboards/ergodox/keymaps/italian/keymap.c
@@ -0,0 +1,223 @@
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 | ESC | | T2 | 6 | 7 | 8 | 9 | 0 | ' |
22 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
23 * | Tab | Q | W | E | R | T | TT1 | | TT1 | Y | U | I | O | P | è |
24 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
25 * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ò | à |
26 * |--------+------+------+------+------+------| Alt | | Alt |------+------+------+------+------+--------|
27 * | LShift | Z | X | C | V | B | | | | N | M | , | . | ù |-/RShift|
28 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
29 * |</Win | + | - | * |//Ctr | |ì/RAlt| Left | Down | Up | Right | ~L1 |
30 * `----------------------------------' `----------------------------------'
31 * ,-------------. ,-------------.
32 * | Ins | LGui | | Win | Ctrl |
33 * ,------|------|------| |------+--------+------.
34 * | | | Home | | PgUp | | |
35 * |Backsp| Del |------| |------| Enter |Space |
36 * |ace | | End | | PgDn | | |
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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
44 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TT(SYMB),
45 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G,
46 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT,
47 MT(MOD_LGUI,KC_NONUS_BSLASH),KC_PPLS, KC_PMNS,KC_PAST,MT(MOD_LCTL,KC_PSLS),
48 KC_INS, KC_LGUI,
49 KC_HOME,
50 KC_BSPC,KC_DEL, KC_END,
51 // right hand
52 TG(MDIA), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
53 TT(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
54 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
55 KC_LALT, KC_N, KC_M, KC_COMM,KC_DOT, KC_BSLASH, MT(MOD_RSFT,KC_SLSH),
56 MT(MOD_RALT,KC_EQL), KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT,
57 KC_LGUI, KC_RCTL,
58 KC_PGUP,
59 KC_PGDN, KC_ENT, KC_SPC
60 ),
61/* Keymap 1: Symbol Layer
62 *
63 * ,--------------------------------------------------. ,--------------------------------------------------.
64 * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
65 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
66 * | | ! | @ | { | } | | | | | | | 7 | 8 | 9 | | F12 |
67 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
68 * | | # | $ | [ | ] | & |------| |------| | 4 | 5 | 6 | | |
69 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
70 * | | % | ^ | ( | ) | | | | | | 1 | 2 | 3 | | |
71 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
72 * | | | | | | | . | | | | |
73 * `----------------------------------' `----------------------------------'
74 * ,-------------. ,-------------.
75 * | | | | | |
76 * ,------|------|------| |------+------+------.
77 * | | | | | | | |
78 * | | |------| |------| | 0 |
79 * | | | | | | | |
80 * `--------------------' `--------------------'
81 */
82// SYMBOLS
83[SYMB] = KEYMAP(
84 // left hand
85 M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
86 KC_TRNS, KC_EXLM, RALT(KC_SCLN), RALT(KC_LCBR), RALT(KC_RCBR), KC_TILD, KC_TRNS,
87 KC_TRNS, RALT(KC_QUOT), KC_DLR, RALT(KC_LBRC), RALT(KC_RBRC), KC_CIRC,
88 KC_TRNS, KC_PERC, LSFT(KC_EQL), LSFT(KC_8), LSFT(KC_9), KC_TRNS, KC_TRNS,
89 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
90 KC_TRNS, KC_TRNS,
91 KC_TRNS,
92 KC_TRNS, KC_TRNS, KC_TRNS,
93 // right hand
94 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
95 KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
96 KC_TRNS, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
97 KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
98 KC_DOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
99 KC_TRNS, KC_TRNS,
100 KC_TRNS,
101 KC_TRNS, KC_TRNS, KC_0
102),
103/* Keymap 2: Media and mouse keys
104 *
105 * ,--------------------------------------------------. ,--------------------------------------------------.
106 * | | | | | | | | | | | | | | | |
107 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
108 * | | | | MsUp | | | | | | Lclk | Rclk | | | | |
109 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
110 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
111 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
112 * | | | | | | | | | | | | Prev | Next | | |
113 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
114 * | | | | | | |VolUp |VolDn | Mute | | |
115 * `----------------------------------' `----------------------------------'
116 * ,-------------. ,-------------.
117 * | | | | | |
118 * ,------|------|------| |------+------+------.
119 * | | | | | | |Brwser|
120 * | | |------| |------| |Back |
121 * | | | | | | | |
122 * `--------------------' `--------------------'
123 */
124// MEDIA AND MOUSE
125[MDIA] = KEYMAP(
126 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
127 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
128 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
129 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
136 KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
137 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
138 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
139 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
140 KC_TRNS, KC_TRNS,
141 KC_TRNS,
142 KC_TRNS, KC_TRNS, KC_WBAK
143),
144};
145
146const uint16_t PROGMEM fn_actions[] = {
147 [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
148};
149
150const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
151{
152 // MACRODOWN only works in this function
153 switch(id) {
154 case 0:
155 if (record->event.pressed) {
156 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
157 }
158 break;
159 case 1:
160 if (record->event.pressed) { // For resetting EEPROM
161 eeconfig_init();
162 }
163 break;
164 }
165 return MACRO_NONE;
166};
167
168bool process_record_user(uint16_t keycode, keyrecord_t *record) {
169 switch (keycode) {
170 // dynamically generate these.
171 case EPRM:
172 if (record->event.pressed) {
173 eeconfig_init();
174 }
175 return false;
176 break;
177 case VRSN:
178 if (record->event.pressed) {
179 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
180 }
181 return false;
182 break;
183 case RGB_SLD:
184 if (record->event.pressed) {
185 #ifdef RGBLIGHT_ENABLE
186 rgblight_mode(1);
187 #endif
188 }
189 return false;
190 break;
191 }
192 return true;
193}
194
195// Runs just one time when the keyboard initializes.
196void matrix_init_user(void) {
197
198};
199
200
201// Runs constantly in the background, in a loop.
202void matrix_scan_user(void) {
203
204 uint8_t layer = biton32(layer_state);
205
206 ergodox_board_led_off();
207 ergodox_right_led_1_off();
208 ergodox_right_led_2_off();
209 ergodox_right_led_3_off();
210 switch (layer) {
211 // TODO: Make this relevant to the ErgoDox EZ.
212 case 1:
213 ergodox_right_led_1_on();
214 break;
215 case 2:
216 ergodox_right_led_2_on();
217 break;
218 default:
219 // none
220 break;
221 }
222
223};
diff --git a/keyboards/ergodox/keymaps/italian/readme.md b/keyboards/ergodox/keymaps/italian/readme.md
new file mode 100644
index 000000000..215c24a5a
--- /dev/null
+++ b/keyboards/ergodox/keymaps/italian/readme.md
@@ -0,0 +1,72 @@
1# ErgoDox Italian layout
2
3## Layer 0
4```
5
6 ,--------------------------------------------------. ,--------------------------------------------------.
7 | \ | 1 | 2 | 3 | 4 | 5 | ESC | | T2 | 6 | 7 | 8 | 9 | 0 | ' |
8 |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
9 | Tab | Q | W | E | R | T | TT1 | | TT1 | Y | U | I | O | P | è |
10 |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
11 | Caps | A | S | D | F | G |------| |------| H | J | K | L | ò | à |
12 |--------+------+------+------+------+------| Alt | | Alt |------+------+------+------+------+--------|
13 | LShift | Z | X | C | V | B | | | | N | M | , | . | ù |-/RShift|
14 `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
15 |</Win | + | - | * |//Ctr | |ì/RAlt| Left | Down | Up | Right | ~L1 |
16 `----------------------------------' `----------------------------------'
17 ,-------------. ,-------------.
18 | Ins | LGui | | Win | Ctrl |
19 ,------|------|------| |------+--------+------.
20 | | | Home | | PgUp | | |
21 |Backsp| Del |------| |------| Enter |Space |
22 |ace | | End | | PgDn | | |
23 `--------------------' `----------------------'
24```
25
26## Layer 1
27```
28
29 ,--------------------------------------------------. ,--------------------------------------------------.
30 |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
31 |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
32 | | ! | @ | { | } | | | | | | | 7 | 8 | 9 | | F12 |
33 |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
34 | | # | $ | [ | ] | & |------| |------| | 4 | 5 | 6 | | |
35 |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
36 | | % | ^ | ( | ) | | | | | | 1 | 2 | 3 | | |
37 `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
38 | | | | | | | . | | | | |
39 `----------------------------------' `----------------------------------'
40 ,-------------. ,-------------.
41 | | | | | |
42 ,------|------|------| |------+------+------.
43 | | | | | | | |
44 | | |------| |------| | 0 |
45 | | | | | | | |
46 `--------------------' `--------------------'
47```
48
49## Layer 2
50```
51
52 ,--------------------------------------------------. ,--------------------------------------------------.
53 | | | | | | | | | | | | | | | |
54 |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
55 | | | | MsUp | | | | | | Lclk | Rclk | | | | |
56 |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
57 | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
58 |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
59 | | | | | | | | | | | | Prev | Next | | |
60 `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
61 | | | | | | |VolUp |VolDn | Mute | | |
62 `----------------------------------' `----------------------------------'
63 ,-------------. ,-------------.
64 | | | | | |
65 ,------|------|------| |------+------+------.
66 | | | | | | |Brwser|
67 | | |------| |------| |Back |
68 | | | | | | | |
69 `--------------------' `--------------------'
70```
71
72
diff --git a/keyboards/ergodox/keymaps/xyverz/keymap.c b/keyboards/ergodox/keymaps/xyverz/keymap.c
index 08ee5aeda..ec909ec53 100644
--- a/keyboards/ergodox/keymaps/xyverz/keymap.c
+++ b/keyboards/ergodox/keymaps/xyverz/keymap.c
@@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
40 40
41/* Layer 0 : Dvorak 41/* Layer 0 : Dvorak
42 * ,--------------------------------------------------. ,--------------------------------------------------. 42 * ,--------------------------------------------------. ,--------------------------------------------------.
43 * | ] | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | [ | 43 * | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | / |
44 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| 44 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
45 * | Tab | ' | , | . | P | Y | | | | F | G | C | R | L | \ | 45 * | Tab | ' | , | . | P | Y | | | | F | G | C | R | L | \ |
46 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 46 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
@@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
48 * |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------| 48 * |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------|
49 * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift | 49 * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift |
50 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 50 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
51 * | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI | 51 * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI |
52 * `----------------------------------' `----------------------------------' 52 * `----------------------------------' `----------------------------------'
53 * ,-------------. ,-------------. 53 * ,-------------. ,-------------.
54 * | LCTL | LALT | | RALT | RCTL | 54 * | LCTL | LALT | | RALT | RCTL |
@@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
61 */ 61 */
62[_DV] = KEYMAP( 62[_DV] = KEYMAP(
63 // left hand 63 // left hand
64 KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, 64 KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
65 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX, 65 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX,
66 KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, 66 KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I,
67 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(_MD), 67 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(_MD),
@@ -70,11 +70,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
70 KC_HOME, 70 KC_HOME,
71 KC_BSPC, KC_DEL, KC_END, 71 KC_BSPC, KC_DEL, KC_END,
72 // right hand 72 // right hand
73 KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, 73 KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH,
74 XXXXXXX, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, 74 XXXXXXX, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS,
75 KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, 75 KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
76 MO(_KP), KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, 76 MO(_KP), KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
77 KC_UP, KC_DOWN, KC_SLSH, KC_EQL, KC_RGUI, 77 KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_RGUI,
78 KC_RALT, KC_RCTL, 78 KC_RALT, KC_RCTL,
79 KC_PGUP, 79 KC_PGUP,
80 KC_PGDN, KC_ENT, KC_SPC 80 KC_PGDN, KC_ENT, KC_SPC
@@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
91 * |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------| 91 * |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------|
92 * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | 92 * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
93 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 93 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
94 * | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI | 94 * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI |
95 * `----------------------------------' `----------------------------------' 95 * `----------------------------------' `----------------------------------'
96 * ,-------------. ,-------------. 96 * ,-------------. ,-------------.
97 * | LCTL | LALT | | RALT | RCTL | 97 * | LCTL | LALT | | RALT | RCTL |
@@ -133,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
133 * |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------| 133 * |--------+------+------+------+------+------| _MD | | _KP |------+------+------+------+------+--------|
134 * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | RShift | 134 * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | RShift |
135 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 135 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
136 * | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI | 136 * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI |
137 * `----------------------------------' `----------------------------------' 137 * `----------------------------------' `----------------------------------'
138 * ,-------------. ,-------------. 138 * ,-------------. ,-------------.
139 * | LCTL | LALT | | RALT | RCTL | 139 * | LCTL | LALT | | RALT | RCTL |
diff --git a/keyboards/ergodox/keymaps/xyverz/readme.md b/keyboards/ergodox/keymaps/xyverz/readme.md
index 6ecdabc9e..134fb50af 100644
--- a/keyboards/ergodox/keymaps/xyverz/readme.md
+++ b/keyboards/ergodox/keymaps/xyverz/readme.md
@@ -2,7 +2,7 @@
2 2
3## About this keymap: 3## About this keymap:
4 4
5The Dvorak layout shown herestems from my early Kinesis years, using the Contour PS/2 with a Dvorak software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the corner keys. I've decided to continue using this layout with my ErgoDox. 5The Dvorak layout shown here stems from my early Kinesis years, using the Contour PS/2 with a Dvorak software layout. ~~Because of this, the RBRC and LBRC were on opposite sides of the board in the corner keys. I've decided to continue using this layout with my ErgoDox.~~ I've decided do give the normal placing of the SLSH, EQL, and xBRC keys a try, after using a different keyboard for a while...
6 6
7The QWERTY layout shown here is based entirely on the Kinesis Advantage layout, with the additional keys as shown in the diagrams. The Colemak layout is merely an adaptation of that. 7The QWERTY layout shown here is based entirely on the Kinesis Advantage layout, with the additional keys as shown in the diagrams. The Colemak layout is merely an adaptation of that.
8 8
@@ -17,15 +17,15 @@ I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar t
17### Layer 0: Dvorak layer 17### Layer 0: Dvorak layer
18 18
19 ,--------------------------------------------------.,--------------------------------------------------. 19 ,--------------------------------------------------.,--------------------------------------------------.
20 | ] | 1 | 2 | 3 | 4 | 5 | ESC || ESC | 6 | 7 | 8 | 9 | 0 | [ | 20 | = | 1 | 2 | 3 | 4 | 5 | ESC || ESC | 6 | 7 | 8 | 9 | 0 | / |
21 |--------+------+------+------+------+-------------||------+------+------+------+------+------+--------| 21 |--------+------+------+------+------+-------------||------+------+------+------+------+------+--------|
22 | Tab | ' | , | . | Y | Y | || | F | G | C | R | L | \ | 22 | Tab | ' | , | . | P | Y | || | F | G | C | R | L | \ |
23 |--------+------+------+------+------+------| || |------+------+------+------+------+--------| 23 |--------+------+------+------+------+------| || |------+------+------+------+------+--------|
24 | CapsLk | A | O | E | U | I |------||------| D | H | T | N | S | - | 24 | CapsLk | A | O | E | U | I |------||------| D | H | T | N | S | - |
25 |--------+------+------+------+------+------| _MD || _KP |------+------+------+------+------+--------| 25 |--------+------+------+------+------+------| _MD || _KP |------+------+------+------+------+--------|
26 | LShift | Z | X | C | V | X | || | B | M | W | V | Z | RShift | 26 | LShift | Z | X | C | V | X | || | B | M | W | V | Z | RShift |
27 `--------+------+------+------+------+-------------'`-------------+------+------+------+------+--------' 27 `--------+------+------+------+------+-------------'`-------------+------+------+------+------+--------'
28 | LGUI | ` | INS | Left | Rght | | Up | Dn | / | = | RGUI | 28 | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI |
29 `----------------------------------' `----------------------------------' 29 `----------------------------------' `----------------------------------'
30 ,-------------.,-------------. 30 ,-------------.,-------------.
31 | LCtr | LAlt || Ralt | RCtr | 31 | LCtr | LAlt || Ralt | RCtr |
diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md
index 5e50548be..3d6fb455a 100644
--- a/keyboards/ergodox/readme.md
+++ b/keyboards/ergodox/readme.md
@@ -1,6 +1,6 @@
1# The Easy Way 1# The Easy Way
2 2
3If you have an ErgoDox EZ, the absolute easiest way for you to customize your firmware is using the [graphical configurator](http://configure.ergodox-ez.com), which uses QMK under the hood. 3If you have an ErgoDox EZ, the absolute easiest way for you to customize your firmware is using the [graphical configurator](http://configure.ergodox-ez.com), which uses QMK under the hood.
4 4
5If you can find firmware someone else has made that does what you want, that 5If you can find firmware someone else has made that does what you want, that
6is the easiest way to customize your ErgoDox. It requires no programming 6is the easiest way to customize your ErgoDox. It requires no programming
@@ -69,12 +69,16 @@ files. Check them out with:
69 69
70The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). 70The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html).
71 71
72Linux users need to modify udev rules as described on the Teensy Linux page. 72Linux users need to modify udev rules as described on the [Teensy
73Some distributions provide a binary, maybe called `teensy-loader-cli`). 73Linux page]. Some distributions provide a binary, maybe called
74`teensy-loader-cli`.
75
76[Teensy Linux page]: https://www.pjrc.com/teensy/loader_linux.html
74 77
75To flash the firmware: 78To flash the firmware:
76 79
77 - Build the firmware with `make keymapname`, for example `make default` 80 - Build the firmware with `make keymapname`, for example `make default`
81
78 - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. 82 - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g.
79 `ergodox_ez_default.hex` 83 `ergodox_ez_default.hex`
80 84
@@ -87,6 +91,15 @@ To flash the firmware:
87 91
88 - Click the button in the Teensy app to download the firmware. 92 - Click the button in the Teensy app to download the firmware.
89 93
94To flash with ´teensy-loader-cli´:
95
96 - Build the firmware with `make keymapname`, for example `make default`
97
98 - Run ´<path/to/>teensy_loader_cli --mcu=atmega32u4 -w ergodox_ez_<keymap>.hex´
99
100 - Press the Reset button by inserting a paperclip gently into the reset hole
101 in the top right corder.
102
90## ErgoDox Infinity 103## ErgoDox Infinity
91 104
92The Infinity is two completely independent keyboards, and needs to be flashed 105The Infinity is two completely independent keyboards, and needs to be flashed
diff --git a/keyboards/frosty_flake/Makefile b/keyboards/frosty_flake/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/frosty_flake/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif
diff --git a/keyboards/frosty_flake/config.h b/keyboards/frosty_flake/config.h
new file mode 100644
index 000000000..2c73f1074
--- /dev/null
+++ b/keyboards/frosty_flake/config.h
@@ -0,0 +1,147 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Bathroom Epiphanies
28#define PRODUCT frosty_flake
29#define DESCRIPTION Frosty Flake controller for the CM Storm Quick Fire Rapid
30
31/*
32 * Frosty Flake Rev. 20140521 made by Bathroom Ephiphanies
33 * Ported from the Bathroom Epiphanies TMK Firmware:
34 * https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers
35 *
36 */
37
38/* key matrix size */
39#define MATRIX_ROWS 8 // Row0 - Row7 in the schematic
40#define MATRIX_COLS 18 // ColA - ColR in the schematic
41
42/*
43 * Keyboard Matrix Assignments
44 */
45#define UNUSED_PINS { B0, C4, D3 }
46
47/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
48#define DEBOUNCING_DELAY 5
49
50/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
51#define LOCKING_SUPPORT_ENABLE
52/* Locking resynchronize hack */
53#define LOCKING_RESYNC_ENABLE
54
55/*
56 * Force NKRO
57 *
58 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
59 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
60 * makefile for this to work.)
61 *
62 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
63 * until the next keyboard reset.
64 *
65 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
66 * fully operational during normal computer usage.
67 *
68 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
69 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
70 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
71 * power-up.
72 *
73 */
74//#define FORCE_NKRO
75
76/*
77 * Magic Key Options
78 *
79 * Magic keys are hotkey commands that allow control over firmware functions of
80 * the keyboard. They are best used in combination with the HID Listen program,
81 * found here: https://www.pjrc.com/teensy/hid_listen.html
82 *
83 * The options below allow the magic key functionality to be changed. This is
84 * useful if your keyboard/keypad is missing keys and you want magic key support.
85 *
86 */
87
88/* key combination for magic key command */
89#define IS_COMMAND() ( \
90 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
91)
92
93/* control how magic key switches layers */
94//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
95//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
96//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
97
98/* override magic key keymap */
99//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
100//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
101//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
102//#define MAGIC_KEY_HELP1 H
103//#define MAGIC_KEY_HELP2 SLASH
104//#define MAGIC_KEY_DEBUG D
105//#define MAGIC_KEY_DEBUG_MATRIX X
106//#define MAGIC_KEY_DEBUG_KBD K
107//#define MAGIC_KEY_DEBUG_MOUSE M
108//#define MAGIC_KEY_VERSION V
109//#define MAGIC_KEY_STATUS S
110//#define MAGIC_KEY_CONSOLE C
111//#define MAGIC_KEY_LAYER0_ALT1 ESC
112//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
113//#define MAGIC_KEY_LAYER0 0
114//#define MAGIC_KEY_LAYER1 1
115//#define MAGIC_KEY_LAYER2 2
116//#define MAGIC_KEY_LAYER3 3
117//#define MAGIC_KEY_LAYER4 4
118//#define MAGIC_KEY_LAYER5 5
119//#define MAGIC_KEY_LAYER6 6
120//#define MAGIC_KEY_LAYER7 7
121//#define MAGIC_KEY_LAYER8 8
122//#define MAGIC_KEY_LAYER9 9
123//#define MAGIC_KEY_BOOTLOADER PAUSE
124//#define MAGIC_KEY_LOCK CAPS
125//#define MAGIC_KEY_EEPROM E
126//#define MAGIC_KEY_NKRO N
127//#define MAGIC_KEY_SLEEP_LED Z
128
129/*
130 * Feature disable options
131 * These options are also useful to firmware size reduction.
132 */
133
134/* disable debug print */
135//#define NO_DEBUG
136
137/* disable print */
138//#define NO_PRINT
139
140/* disable action features */
141//#define NO_ACTION_LAYER
142//#define NO_ACTION_TAPPING
143//#define NO_ACTION_ONESHOT
144//#define NO_ACTION_MACRO
145//#define NO_ACTION_FUNCTION
146
147#endif
diff --git a/keyboards/frosty_flake/frosty_flake.c b/keyboards/frosty_flake/frosty_flake.c
new file mode 100644
index 000000000..1cd476038
--- /dev/null
+++ b/keyboards/frosty_flake/frosty_flake.c
@@ -0,0 +1,63 @@
1#include "frosty_flake.h"
2
3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6
7 matrix_init_user();
8}
9
10void matrix_scan_kb(void) {
11 // put your looping keyboard code here
12 // runs every cycle (a lot)
13
14 matrix_scan_user();
15}
16
17bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
18 // put your per-action keyboard code here
19 // runs for every action, just before processing by the firmware
20
21 return process_record_user(keycode, record);
22}
23
24void led_set_kb(uint8_t usb_led) {
25 DDRB |= (1<<7);
26 DDRC |= (1<<5) | (1<<6);
27
28 print_dec(usb_led);
29
30 if (usb_led & (1<<USB_LED_CAPS_LOCK))
31 PORTC &= ~(1<<5);
32 else
33 PORTC |= (1<<5);
34
35 if (usb_led & (1<<USB_LED_NUM_LOCK))
36 PORTB &= ~(1<<7);
37 else
38 PORTB |= (1<<7);
39
40 if (usb_led & (1<<USB_LED_SCROLL_LOCK))
41 PORTC &= ~(1<<6);
42 else
43 PORTC |= (1<<6);
44
45 led_set_user(usb_led);
46}
47
48__attribute__ ((weak))
49void matrix_init_user(void) {
50}
51
52__attribute__ ((weak))
53void matrix_scan_user(void) {
54}
55
56__attribute__ ((weak))
57bool process_record_user(uint16_t keycode, keyrecord_t *record) {
58 return true;
59}
60
61__attribute__ ((weak))
62void led_set_user(uint8_t usb_led) {
63} \ No newline at end of file
diff --git a/keyboards/frosty_flake/frosty_flake.h b/keyboards/frosty_flake/frosty_flake.h
new file mode 100644
index 000000000..3b52df6ba
--- /dev/null
+++ b/keyboards/frosty_flake/frosty_flake.h
@@ -0,0 +1,50 @@
1#ifndef FROSTY_FLAKE_H
2#define FROSTY_FLAKE_H
3
4#include "quantum.h"
5
6// This a shortcut to help you visually see your layout.
7// The following is an example using the Planck MIT layout
8// The first section contains all of the arguements
9// The second converts the arguments into a two-dimensional array
10
11/*
12 Matrix col/row mapping
13
14 ,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
15 | J6 | | I4 | H4 | H2 | H6 | | A7 | E6 | D2 | D4 | | B4 | B7 | B6 | B0 | | C7 | C5 | A5 |
16 `----' `-------------------' `-------------------' `-------------------' `--------------'
17 ,-------------------------------------------------------------------------. ,--------------. ,-------------------.
18 | J4 | J7 | I7 | H7 | G7 | G4 | F4 | F7 | E7 | D7 | R7 | R4 | E4 | B2 | | L4 | O4 | Q4 | | K1 | L1 | Q1 | Q0 |
19 |-------------------------------------------------------------------------| |--------------| |-------------------|
20 | J2 | J5 | I5 | H5 | G5 | G2 | F2 | F5 | E5 | D5 | R5 | R2 | E2 | B3 | | K4 | O7 | Q7 | | K5 | L5 | Q5 | O5 |
21 |-------------------------------------------------------------------------| '--------------' |-------------- |
22 | O5 | J3 | I3 | H3 | G3 | G6 | F6 | F3 | E3 | D3 | R3 | R6 | B1 | | K2 | L2 | Q2 | |
23 |-------------------------------------------------------------------------| ,----. |-------------------|
24 | N2 | J1 | I1 | H1 | G1 | G0 | F0 | F1 | E1 | D1 | R0 | N3 | | O6 | | K3 | L3 | Q3 | O3 |
25 |-------------------------------------------------------------------------| ,--------------. |-------------- |
26 | A4 | P2 | C6 | K6 | C0 | M3 | D0 | A1 | | O0 | K0 | L0 | | L6 | Q6 | |
27 `-------------------------------------------------------------------------' `--------------' `-------------------'
28*/
29#define KEYMAP( \
30 KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
31 KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \
32 KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \
33 KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \
34 KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \
35 KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \
36) \
37{ \
38/* Columns and rows need to be swapped in the below definition */ \
39/* A B C D E F G H I J K L M N O P Q R */ \
40/* 0 */ { KC_NO, KB0, KC0, KD0, KC_NO, KF0, KG0, KC_NO, KC_NO, KC_NO, KK0, KL0, KC_NO, KC_NO, KO0, KC_NO, KQ0, KR0 }, \
41/* 1 */ { KA1, KB1, KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, KC_NO, KC_NO, KC_NO, KC_NO, KQ1, KC_NO }, \
42/* 2 */ { KC_NO, KB2, KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KC_NO, KN2, KC_NO, KP2, KQ2, KR2 }, \
43/* 3 */ { KC_NO, KB3, KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KQ3, KR3 }, \
44/* 4 */ { KA4, KB4, KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KC_NO, KC_NO, KO4, KC_NO, KQ4, KR4 }, \
45/* 5 */ { KA5, KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KC_NO, KC_NO, KO5, KC_NO, KQ5, KR5 }, \
46/* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO, KC_NO, KO6, KC_NO, KQ6, KR6 }, \
47/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \
48}
49
50#endif
diff --git a/keyboards/frosty_flake/keymaps/default/Makefile b/keyboards/frosty_flake/keymaps/default/Makefile
new file mode 100644
index 000000000..9d3df5964
--- /dev/null
+++ b/keyboards/frosty_flake/keymaps/default/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif
diff --git a/keyboards/frosty_flake/keymaps/default/config.h b/keyboards/frosty_flake/keymaps/default/config.h
new file mode 100644
index 000000000..8893d122e
--- /dev/null
+++ b/keyboards/frosty_flake/keymaps/default/config.h
@@ -0,0 +1,8 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6// place overrides here
7
8#endif
diff --git a/keyboards/frosty_flake/keymaps/default/keymap.c b/keyboards/frosty_flake/keymaps/default/keymap.c
new file mode 100644
index 000000000..4dc7ed655
--- /dev/null
+++ b/keyboards/frosty_flake/keymaps/default/keymap.c
@@ -0,0 +1,11 @@
1#include "frosty_flake.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4[0] = KEYMAP(\
5 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
6 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
7 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \
8 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_ENT, KC_P4, KC_P5, KC_P6, \
9 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_P1, KC_P2, KC_P3,KC_PENT, \
10 KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT)
11}; \ No newline at end of file
diff --git a/keyboards/frosty_flake/keymaps/default/readme.md b/keyboards/frosty_flake/keymaps/default/readme.md
new file mode 100644
index 000000000..11bf4825f
--- /dev/null
+++ b/keyboards/frosty_flake/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for frosty_flake
diff --git a/keyboards/frosty_flake/matrix.c b/keyboards/frosty_flake/matrix.c
new file mode 100644
index 000000000..05dffdb64
--- /dev/null
+++ b/keyboards/frosty_flake/matrix.c
@@ -0,0 +1,135 @@
1/*
2 Copyright 2017 Gabriel Young <gabeplaysdrums@live.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*/
17
18#include <stdint.h>
19#include <stdbool.h>
20#include <avr/io.h>
21#include <util/delay.h>
22#include "print.h"
23#include "debug.h"
24#include "util.h"
25#include "matrix.h"
26
27#ifndef DEBOUNCING_DELAY
28# define DEBOUNCING_DELAY 5
29#endif
30static uint8_t debouncing = DEBOUNCING_DELAY;
31
32static matrix_row_t matrix[MATRIX_ROWS];
33static matrix_row_t matrix_debouncing[MATRIX_ROWS];
34
35static matrix_row_t scan_col(void) {
36 return (
37 (PINC&(1<<7) ? 0 : ((matrix_row_t)1<<0)) |
38 (PINB&(1<<5) ? 0 : ((matrix_row_t)1<<1)) |
39 (PINB&(1<<4) ? 0 : ((matrix_row_t)1<<2)) |
40 (PINB&(1<<6) ? 0 : ((matrix_row_t)1<<3)) |
41 (PINB&(1<<1) ? 0 : ((matrix_row_t)1<<4)) |
42 (PINB&(1<<2) ? 0 : ((matrix_row_t)1<<5)) |
43 (PINB&(1<<3) ? 0 : ((matrix_row_t)1<<6)) |
44 (PINB&(1<<0) ? 0 : ((matrix_row_t)1<<7))
45 );
46}
47
48static void select_col(uint8_t col) {
49 switch (col) {
50 case 0: PORTD = (PORTD & ~0b01111011) | 0b00011011; break;
51 case 1: PORTD = (PORTD & ~0b01111011) | 0b01000011; break;
52 case 2: PORTD = (PORTD & ~0b01111011) | 0b01101010; break;
53 case 3: PORTD = (PORTD & ~0b01111011) | 0b01111001; break;
54 case 4: PORTD = (PORTD & ~0b01111011) | 0b01100010; break;
55 case 5: PORTD = (PORTD & ~0b01111011) | 0b01110001; break;
56 case 6: PORTD = (PORTD & ~0b01111011) | 0b01100001; break;
57 case 7: PORTD = (PORTD & ~0b01111011) | 0b01110000; break;
58 case 8: PORTD = (PORTD & ~0b01111011) | 0b01100000; break;
59 case 9: PORTD = (PORTD & ~0b01111011) | 0b01101000; break;
60 case 10: PORTD = (PORTD & ~0b01111011) | 0b00101011; break;
61 case 11: PORTD = (PORTD & ~0b01111011) | 0b00110011; break;
62 case 12: PORTD = (PORTD & ~0b01111011) | 0b00100011; break;
63 case 13: PORTD = (PORTD & ~0b01111011) | 0b01111000; break;
64 case 14: PORTD = (PORTD & ~0b01111011) | 0b00010011; break;
65 case 15: PORTD = (PORTD & ~0b01111011) | 0b01101001; break;
66 case 16: PORTD = (PORTD & ~0b01111011) | 0b00001011; break;
67 case 17: PORTD = (PORTD & ~0b01111011) | 0b00111011; break;
68 }
69}
70
71void matrix_init(void) {
72 /* Row output pins */
73 DDRD |= 0b01111011;
74 /* Column input pins */
75 DDRC &= ~0b10000000;
76 DDRB &= ~0b01111111;
77 PORTC |= 0b10000000;
78 PORTB |= 0b01111111;
79
80 for (uint8_t i=0; i < MATRIX_ROWS; i++)
81 matrix[i] = matrix_debouncing[i] = 0;
82
83 matrix_init_quantum();
84}
85
86uint8_t matrix_scan(void) {
87 for (uint8_t col = 0; col < MATRIX_COLS; col++) {
88 select_col(col);
89 _delay_us(3);
90 matrix_row_t col_scan = scan_col();
91 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
92 bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
93 bool curr_bit = col_scan & (1<<row);
94 if (prev_bit != curr_bit) {
95 matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
96 debouncing = DEBOUNCING_DELAY;
97 }
98 }
99 }
100
101 if (debouncing) {
102 if (--debouncing)
103 _delay_ms(1);
104 else
105 for (uint8_t i = 0; i < MATRIX_ROWS; i++)
106 matrix[i] = matrix_debouncing[i];
107 }
108
109 matrix_scan_quantum();
110 return 1;
111}
112
113inline matrix_row_t matrix_get_row(uint8_t row) {
114 return matrix[row];
115}
116
117void matrix_print(void) {
118 print("\nr\\c ABCDEFGHIJKLMNOPQR\n");
119 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
120 matrix_row_t matrix_row = matrix_get_row(row);
121 xprintf("%02X: ", row);
122 for (uint8_t col = 0; col < MATRIX_COLS; col++) {
123 bool curr_bit = matrix_row & (1<<col);
124 xprintf("%c", curr_bit ? '*' : '.');
125 }
126 print("\n");
127 }
128}
129
130uint8_t matrix_key_count(void) {
131 uint8_t count = 0;
132 for (uint8_t row = 0; row < MATRIX_ROWS; row++)
133 count += bitpop32(matrix[row]);
134 return count;
135} \ No newline at end of file
diff --git a/keyboards/frosty_flake/readme.md b/keyboards/frosty_flake/readme.md
new file mode 100644
index 000000000..ff440e33b
--- /dev/null
+++ b/keyboards/frosty_flake/readme.md
@@ -0,0 +1,32 @@
1frosty_flake keyboard firmware
2======================
3
4This is the firmware for Rev. 20140521 of the Frosty Flake controller by [Bathroom Epiphanies](http://bathroomepiphanies.com/controllers/), a replacement controller for the [Cooler Master Quick Fire Rapid](http://www.coolermaster.com/peripheral/keyboards/quickfirerapid/).
5
6The code was adapted from the [BathroomEpiphanies TMK Firmware](https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers), but has been cleaned up to match the [schematic](https://deskthority.net/wiki/File:Frosty_Flake_Schematics.pdf) and gone through some minor refactoring for QMK.
7
8## Quantum MK Firmware
9
10For the full Quantum feature list, see [the parent readme](/).
11
12## Building
13
14Download or clone the whole firmware and navigate to the keyboards/frosty_flake folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
15
16Depending on which keymap you would like to use, you will have to compile slightly differently.
17
18### Default
19
20To build with the default keymap, simply run `make default`.
21
22### Other Keymaps
23
24Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
25
26To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
27
28```
29$ make [default|jack|<name>]
30```
31
32Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/frosty_flake/rules.mk b/keyboards/frosty_flake/rules.mk
new file mode 100644
index 000000000..dd2f4b6ee
--- /dev/null
+++ b/keyboards/frosty_flake/rules.mk
@@ -0,0 +1,71 @@
1# MCU name
2#MCU = at90usb1287
3MCU = atmega32u2
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Boot Section Size in *bytes*
43# Teensy halfKay 512
44# Teensy++ halfKay 1024
45# Atmel DFU loader 4096
46# LUFA bootloader 4096
47# USBaspLoader 2048
48OPT_DEFS += -DBOOTLOADER_SIZE=4096
49
50
51# Build Options
52# change yes to no to disable
53#
54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
57CONSOLE_ENABLE ?= yes # Console for debug(+400)
58COMMAND_ENABLE ?= yes # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE ?= no # USB Nkey Rollover
63BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE ?= no # MIDI controls
65UNICODE_ENABLE ?= no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE ?= no # Audio output on port C6
68FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
69
70CUSTOM_MATRIX = yes
71SRC += matrix.c \ No newline at end of file
diff --git a/keyboards/gh60/keymaps/dbroqua_7U/Makefile b/keyboards/gh60/keymaps/dbroqua_7U/Makefile
new file mode 100644
index 000000000..da0f07d7d
--- /dev/null
+++ b/keyboards/gh60/keymaps/dbroqua_7U/Makefile
@@ -0,0 +1,111 @@
1#----------------------------------------------------------------------------
2# On command line:
3#
4# make all = Make software.
5#
6# make clean = Clean out built project files.
7#
8# make coff = Convert ELF to AVR COFF.
9#
10# make extcoff = Convert ELF to AVR Extended COFF.
11#
12# make program = Download the hex file to the device.
13# Please customize your programmer settings(PROGRAM_CMD)
14#
15# make teensy = Download the hex file to the device, using teensy_loader_cli.
16# (must have teensy_loader_cli installed).
17#
18# make dfu = Download the hex file to the device, using dfu-programmer (must
19# have dfu-programmer installed).
20#
21# make flip = Download the hex file to the device, using Atmel FLIP (must
22# have Atmel FLIP installed).
23#
24# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
25# (must have dfu-programmer installed).
26#
27# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
28# (must have Atmel FLIP installed).
29#
30# make debug = Start either simulavr or avarice as specified for debugging,
31# with avr-gdb or avr-insight as the front end for debugging.
32#
33# make filename.s = Just compile filename.c into the assembler code only.
34#
35# make filename.i = Create a preprocessed source file for use in submitting
36# bug reports to the GCC project.
37#
38# To rebuild project do "make clean" then "make all".
39#----------------------------------------------------------------------------
40
41# MCU name
42#MCU = at90usb1287
43MCU = atmega32u4
44
45# Processor frequency.
46# This will define a symbol, F_CPU, in all source code files equal to the
47# processor frequency in Hz. You can then use this symbol in your source code to
48# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
49# automatically to create a 32-bit value in your source code.
50#
51# This will be an integer division of F_USB below, as it is sourced by
52# F_USB after it has run through any CPU prescalers. Note that this value
53# does not *change* the processor frequency - it should merely be updated to
54# reflect the processor speed set externally so that the code can use accurate
55# software delays.
56F_CPU = 16000000
57
58
59#
60# LUFA specific
61#
62# Target architecture (see library "Board Types" documentation).
63ARCH = AVR8
64
65# Input clock frequency.
66# This will define a symbol, F_USB, in all source code files equal to the
67# input clock frequency (before any prescaling is performed) in Hz. This value may
68# differ from F_CPU if prescaling is used on the latter, and is required as the
69# raw input clock is fed directly to the PLL sections of the AVR for high speed
70# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
71# at the end, this will be done automatically to create a 32-bit value in your
72# source code.
73#
74# If no clock division is performed on the input clock inside the AVR (via the
75# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
76F_USB = $(F_CPU)
77
78# Interrupt driven control endpoint task(+60)
79OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
80
81
82# Boot Section Size in *bytes*
83# Teensy halfKay 512
84# Teensy++ halfKay 1024
85# Atmel DFU loader 4096
86# LUFA bootloader 4096
87# USBaspLoader 2048
88OPT_DEFS += -DBOOTLOADER_SIZE=4096
89
90
91# Build Options
92# comment out to disable the options.
93#
94BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
95MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
96EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
97# CONSOLE_ENABLE ?= yes # Console for debug(+400)
98# COMMAND_ENABLE ?= yes # Commands for debug and configuration
99KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
100# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
101SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
102NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
103# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
104# MIDI_ENABLE ?= YES # MIDI controls
105# UNICODE_ENABLE ?= YES # Unicode
106# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
107RGBLIGHT_ENABLE ?= no # Enable RGB Underglow
108
109ifndef QUANTUM_DIR
110 include ../../../../Makefile
111endif \ No newline at end of file
diff --git a/keyboards/gh60/keymaps/dbroqua_7U/keymap.c b/keyboards/gh60/keymaps/dbroqua_7U/keymap.c
new file mode 100644
index 000000000..bebfe5af5
--- /dev/null
+++ b/keyboards/gh60/keymaps/dbroqua_7U/keymap.c
@@ -0,0 +1,88 @@
1#include "gh60.h"
2#include "action_layer.h"
3
4#define _DEFAULT 0
5#define _FN 1
6
7int esc_led = 0;
8
9// Fillers to make layering more clear
10#define ______ KC_TRNS
11
12const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
13/* Qwerty gui/alt/space/alt/gui
14 * ,-----------------------------------------------------------------------------------------.
15 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
16 * |-----------------------------------------------------------------------------------------+
17 * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
18 * |-----------------------------------------------------------------------------------------+
19 * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
20 * |-----------------------------------------------------------------------------------------+
21 * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
22 * |-----------------------------------------------------------------------------------------+
23 * |LGUI | LAlt | Space | RAlt |RGUI |
24 * `-----------------------------------------------------------------'
25 */
26 [_DEFAULT] = KEYMAP_HHKB( /* Basic QWERTY */
27 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, \
28 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, \
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, KC_ENT, \
30 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), \
31 ______, KC_LGUI, KC_LALT, KC_SPC, ______, KC_RALT, KC_RGUI, ______ \
32 ),
33
34/* FN Layer
35 * ,-----------------------------------------------------------------------------------------.
36 * | Led | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
37 * |-----------------------------------------------------------------------------------------+
38 * | CAPS | | | | | | | | Psc | Slck| Paus| Up | | |
39 * |-----------------------------------------------------------------------------------------+
40 * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
41 * |-----------------------------------------------------------------------------------------+
42 * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
43 * |-----------------------------------------------------------------------------------------+
44 * | | | | Stop | |
45 * `-----------------------------------------------------------------'
46 */
47 [_FN] = KEYMAP_HHKB( /* Layer 1 */
48 F(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
49 KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
50 ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT,______, \
51 ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \
52 ______, ______, ______, ______, ______, KC_MSTP, ______, ______ \
53 )
54};
55
56const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
57{
58 // MACRODOWN only works in this function
59 return MACRO_NONE;
60};
61
62enum function_id {
63 LED_TOGGLE
64};
65
66const uint16_t PROGMEM fn_actions[] = {
67 [0] = ACTION_FUNCTION(LED_TOGGLE)
68};
69
70void esc_led_toggle(void) {
71 if (esc_led == 0){
72 esc_led = 1;
73 gh60_esc_led_on();
74 } else {
75 esc_led = 0;
76 gh60_esc_led_off();
77 }
78}
79
80void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
81 switch (id) {
82 case LED_TOGGLE:
83 if (record->event.pressed) {
84 esc_led_toggle();
85 }
86 break;
87 }
88} \ No newline at end of file
diff --git a/keyboards/gh60/keymaps/xyverz/keymap.c b/keyboards/gh60/keymaps/xyverz/keymap.c
new file mode 100644
index 000000000..e83a7f5a3
--- /dev/null
+++ b/keyboards/gh60/keymaps/xyverz/keymap.c
@@ -0,0 +1,149 @@
1#include "gh60.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5
6extern keymap_config_t keymap_config;
7
8
9// Each layer gets a name for readability, which is then used in the keymap matrix below.
10// The underscores don't mean anything - you can have a layer called STUFF or any other name.
11// Layer names don't all need to be of the same length, obviously, and you can also skip them
12// entirely and just use numbers.
13#define _QW 0
14#define _DV 1
15#define _CM 2
16#define _FL 3
17
18// Macro name shortcuts
19#define QWERTY M(_QW)
20#define DVORAK M(_DV)
21#define COLEMAK M(_CM)
22
23// Fillers to make layering more clear
24#define _______ KC_TRNS
25#define XXXXXXX KC_NO
26
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28
29 /*
30 * _QW: Qwerty Layer
31 * ,-----------------------------------------------------------.
32 * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|
33 * |-----------------------------------------------------------|
34 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
35 * |-----------------------------------------------------------|
36 * |Fn | A| S| D| F| G| H| J| K| L| ;| '| Return|
37 * |-----------------------------------------------------------|
38 * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift|
39 * |-----------------------------------------------------------|
40 * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn|
41 * `-----------------------------------------------------------'
42 */
43[_QW] = { /* Layer 0: Qwerty */
44 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC},
45 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS},
46 {MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT },
47 {KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT},
48 {KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL)}
49 },
50
51 /*
52 * _DV: Dvorak Layer
53 * ,-----------------------------------------------------------.
54 * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| Backsp|
55 * |-----------------------------------------------------------|
56 * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| \|
57 * |-----------------------------------------------------------|
58 * |Fn | A| O| E| U| I| D| H| T| N| S| -| Return|
59 * |-----------------------------------------------------------|
60 * |Shift | ;| Q| J| K| X| B| M| W| V| Z| Shift|
61 * |-----------------------------------------------------------|
62 * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn|
63 * `-----------------------------------------------------------'
64 */
65[_DV] = { /* Layer 1: Dvorak */
66 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC},
67 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS},
68 {MO(_FL), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT },
69 {KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, XXXXXXX, KC_RSFT},
70 {KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL)}
71 },
72
73 /*
74 * _CM: Colemak Layer
75 * ,-----------------------------------------------------------.
76 * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|
77 * |-----------------------------------------------------------|
78 * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \|
79 * |-----------------------------------------------------------|
80 * |Fn | A| R| S| T| D| H| N| E| I| O| '| Return|
81 * |-----------------------------------------------------------|
82 * |Shift | Z| X| C| V| B| K| M| ,| .| /| Shift|
83 * |-----------------------------------------------------------|
84 * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| Fn|
85 * `-----------------------------------------------------------'
86 */
87[_CM] = { /* Layer 2: Colemak */
88 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC},
89 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS},
90 {MO(_FL), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT },
91 {KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT},
92 {KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RGUI, KC_RALT, KC_RCTL, MO(_FL)}
93 },
94
95 /*
96 * _FL: Function Layer
97 * ,-----------------------------------------------------------.
98 * | |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Del|
99 * |-----------------------------------------------------------|
100 * | | | | | | | |PgU| Up|PgD|PSc|SLk|Pau| |
101 * |-----------------------------------------------------------|
102 * | | |MPr|MPl|MNx| |Hom| Lt| Dn| Rt| | | |
103 * |-----------------------------------------------------------|
104 * |CAPS | |Mut|VlD|VlU| |End| | | | | |
105 * |-----------------------------------------------------------|
106 * |_QW |_DV |_CM | | | | | |
107 * `-----------------------------------------------------------'
108 */
109[_FL] = { /* Layer 3: Functions */
110 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL },
111 {_______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______},
112 {_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, XXXXXXX, _______},
113 {KC_CAPS, XXXXXXX, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_END, _______, _______, _______, _______, XXXXXXX, _______},
114 {QWERTY, DVORAK, COLEMAK, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______}
115 },
116
117
118};
119
120const uint16_t PROGMEM fn_actions[] = {
121
122};
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
129const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
130{
131 switch(id) {
132 case _DV:
133 if (record->event.pressed) {
134 persistant_default_layer_set(1UL<<_DV);
135 }
136 break;
137 case _QW:
138 if (record->event.pressed) {
139 persistant_default_layer_set(1UL<<_QW);
140 }
141 break;
142 case _CM:
143 if (record->event.pressed) {
144 persistant_default_layer_set(1UL<<_CM);
145 }
146 break;
147 }
148 return MACRO_NONE;
149};
diff --git a/keyboards/handwired/atreus50/Makefile b/keyboards/handwired/atreus50/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/handwired/atreus50/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif
diff --git a/keyboards/handwired/atreus50/atreus50.c b/keyboards/handwired/atreus50/atreus50.c
new file mode 100644
index 000000000..225a51bcc
--- /dev/null
+++ b/keyboards/handwired/atreus50/atreus50.c
@@ -0,0 +1,10 @@
1#include "atreus50.h"
2
3void matrix_init_kb(void) {
4
5 // Turn status LED on
6 //DDRE |= (1<<6);
7 PORTE |= (1<<6);
8
9 matrix_init_user();
10};
diff --git a/keyboards/handwired/atreus50/atreus50.h b/keyboards/handwired/atreus50/atreus50.h
new file mode 100644
index 000000000..de06f255e
--- /dev/null
+++ b/keyboards/handwired/atreus50/atreus50.h
@@ -0,0 +1,36 @@
1#ifndef ATREUS50_H
2#define ATREUS50_H
3
4#include "quantum.h"
5
6// The first section contains all of the arguements
7// The second converts the arguments into a two-dimensional array
8#define KEYMAP( \
9 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
10 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
11 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
12 k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \
13) \
14{ \
15 { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \
16 { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \
17 { k20, k21, k22, k23, k24, k25, km0, k26, k27, k28, k29, k2a, k2b }, \
18 { k30, k31, k32, k33, k34, k35, km1, k36, k37, k38, k39, k3a, k3b } \
19}
20
21#define COMPACT_KEYMAP( \
22 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
23 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
24 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
25 k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \
26) \
27{ \
28 { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \
29 { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \
30 { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##km0, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \
31 { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##km1, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b } \
32}
33
34#define KC_ KC_TRNS
35
36#endif
diff --git a/keyboards/handwired/atreus50/config.h b/keyboards/handwired/atreus50/config.h
new file mode 100644
index 000000000..2e34e0f89
--- /dev/null
+++ b/keyboards/handwired/atreus50/config.h
@@ -0,0 +1,163 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xBB80
25#define PRODUCT_ID 0x040D
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Hexwire
28#define PRODUCT Atreus 50 Keyboard
29#define DESCRIPTION Atreus layout with extra column
30
31/* key matrix size */
32#define MATRIX_ROWS 4
33#define MATRIX_COLS 13
34
35/* Planck PCB default pin-out */
36#define MATRIX_ROW_PINS { D3, D2, D1, D0 }
37#define MATRIX_COL_PINS { D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 }
38#define UNUSED_PINS
39
40/* COL2ROW or ROW2COL */
41#define DIODE_DIRECTION COL2ROW
42
43// #define BACKLIGHT_PIN B7
44// #define BACKLIGHT_BREATHING
45// #define BACKLIGHT_LEVELS 3
46
47
48/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
49#define DEBOUNCING_DELAY 5
50
51/* define if matrix has ghost (lacks anti-ghosting diodes) */
52//#define MATRIX_HAS_GHOST
53
54/* number of backlight levels */
55
56/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
57#define LOCKING_SUPPORT_ENABLE
58/* Locking resynchronize hack */
59#define LOCKING_RESYNC_ENABLE
60
61
62/* ws2812 RGB LED */
63#define RGB_DI_PIN C6
64#define RGBLIGHT_ANIMATIONS
65#define RGBLED_NUM 12 // Number of LEDs
66#define RGBLIGHT_HUE_STEP 10
67#define RGBLIGHT_SAT_STEP 17
68#define RGBLIGHT_VAL_STEP 17
69
70
71/*
72 * Force NKRO
73 *
74 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
75 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
76 * makefile for this to work.)
77 *
78 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
79 * until the next keyboard reset.
80 *
81 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
82 * fully operational during normal computer usage.
83 *
84 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
85 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
86 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
87 * power-up.
88 *
89 */
90//#define FORCE_NKRO
91
92/*
93 * Magic Key Options
94 *
95 * Magic keys are hotkey commands that allow control over firmware functions of
96 * the keyboard. They are best used in combination with the HID Listen program,
97 * found here: https://www.pjrc.com/teensy/hid_listen.html
98 *
99 * The options below allow the magic key functionality to be changed. This is
100 * useful if your keyboard/keypad is missing keys and you want magic key support.
101 *
102 */
103
104/* key combination for magic key command */
105#define IS_COMMAND() ( \
106 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
107)
108
109/* control how magic key switches layers */
110//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
111//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
112//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
113
114/* override magic key keymap */
115//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
116//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
117//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
118//#define MAGIC_KEY_HELP1 H
119//#define MAGIC_KEY_HELP2 SLASH
120//#define MAGIC_KEY_DEBUG D
121//#define MAGIC_KEY_DEBUG_MATRIX X
122//#define MAGIC_KEY_DEBUG_KBD K
123//#define MAGIC_KEY_DEBUG_MOUSE M
124//#define MAGIC_KEY_VERSION V
125//#define MAGIC_KEY_STATUS S
126//#define MAGIC_KEY_CONSOLE C
127//#define MAGIC_KEY_LAYER0_ALT1 ESC
128//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
129//#define MAGIC_KEY_LAYER0 0
130//#define MAGIC_KEY_LAYER1 1
131//#define MAGIC_KEY_LAYER2 2
132//#define MAGIC_KEY_LAYER3 3
133//#define MAGIC_KEY_LAYER4 4
134//#define MAGIC_KEY_LAYER5 5
135//#define MAGIC_KEY_LAYER6 6
136//#define MAGIC_KEY_LAYER7 7
137//#define MAGIC_KEY_LAYER8 8
138//#define MAGIC_KEY_LAYER9 9
139//#define MAGIC_KEY_BOOTLOADER PAUSE
140//#define MAGIC_KEY_LOCK CAPS
141//#define MAGIC_KEY_EEPROM E
142//#define MAGIC_KEY_NKRO N
143//#define MAGIC_KEY_SLEEP_LED Z
144
145/*
146 * Feature disable options
147 * These options are also useful to firmware size reduction.
148 */
149
150/* disable debug print */
151//#define NO_DEBUG
152
153/* disable print */
154//#define NO_PRINT
155
156/* disable action features */
157//#define NO_ACTION_LAYER
158//#define NO_ACTION_TAPPING
159//#define NO_ACTION_ONESHOT
160//#define NO_ACTION_MACRO
161//#define NO_ACTION_FUNCTION
162
163#endif
diff --git a/keyboards/handwired/atreus50/keymaps/default/Makefile b/keyboards/handwired/atreus50/keymaps/default/Makefile
new file mode 100644
index 000000000..d7b0fa7fd
--- /dev/null
+++ b/keyboards/handwired/atreus50/keymaps/default/Makefile
@@ -0,0 +1,6 @@
1RGBLIGHT_ENABLE = yes
2AUDIO_ENABLE = no
3
4ifndef QUANTUM_DIR
5 include ../../../../Makefile
6endif \ No newline at end of file
diff --git a/keyboards/handwired/atreus50/keymaps/default/keymap.c b/keyboards/handwired/atreus50/keymaps/default/keymap.c
new file mode 100644
index 000000000..415405ec2
--- /dev/null
+++ b/keyboards/handwired/atreus50/keymaps/default/keymap.c
@@ -0,0 +1,250 @@
1#include "atreus50.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 _QWERTY 0
13#define _COLEMAK 1
14#define _DVORAK 2
15#define _LOWER 3
16#define _RAISE 4
17#define _MOVEMENT 5
18#define _ADJUST 16
19
20enum custom_keycodes {
21 QWERTY = SAFE_RANGE,
22 COLEMAK,
23 DVORAK,
24 LOWER,
25 RAISE,
26 MOVEMENT,
27 BACKLIT
28};
29
30// Fillers to make layering more clear
31#define _______ KC_TRNS
32#define XXXXXXX KC_NO
33#define KC_X0 MT(MOD_LCTL, KC_ESC) // Hold for Left Ctrl, Tap for ESC
34#define KC_X1 LOWER
35#define KC_X2 RAISE
36#define KC_X3 MO(_MOVEMENT)
37#define KC_X4 MT(MOD_LSFT, KC_ENT) // Hold for Left Shift, Tap for Enter
38
39const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
40
41 [_QWERTY] = COMPACT_KEYMAP(
42 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
43 TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
44 //|----+----+----+----+----+----| |----+----+----+----+----+----|
45 X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
46 //|----+----+----+----+----+----| |----+----+----+----+----+----|
47 LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
48 //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
49 GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
50 //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
51 ),
52
53 [_COLEMAK] = COMPACT_KEYMAP(
54 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
55 TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
56 //|----+----+----+----+----+----| |----+----+----+----+----+----|
57 X0 , A , R , S , T , D , H , N , E , I , O ,QUOT,
58 //|----+----+----+----+----+----| |----+----+----+----+----+----|
59 LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
60 //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
61 GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
62 //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
63 ),
64
65 [_DVORAK] = COMPACT_KEYMAP(
66 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
67 TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
68 //|----+----+----+----+----+----| |----+----+----+----+----+----|
69 X0 , A , O , E , U , I , D , H , R , N , S ,SLSH,
70 //|----+----+----+----+----+----| |----+----+----+----+----+----|
71 LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
72 //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
73 GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT
74 //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
75 ),
76
77 [_LOWER] = COMPACT_KEYMAP(
78 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
79 TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL ,
80 //|----+----+----+----+----+----| |----+----+----+----+----+----|
81 DEL , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR,PIPE,
82 //|----+----+----+----+----+----| |----+----+----+----+----+----|
83 , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , ,
84 //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
85 , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY
86 //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
87 ),
88
89 [_RAISE] = COMPACT_KEYMAP(
90 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
91 GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,DEL ,
92 //|----+----+----+----+----+----| |----+----+----+----+----+----|
93 DEL , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC,BSLS,
94 //|----+----+----+----+----+----| |----+----+----+----+----+----|
95 , F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , ,
96 //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
97 , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY
98 //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
99 ),
100
101 [_MOVEMENT] = COMPACT_KEYMAP(
102 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
103 TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR, UP ,LPRN,RPRN,DEL ,
104 //|----+----+----+----+----+----| |----+----+----+----+----+----|
105 DEL , F1 , F2 , F3 , F4 , F5 , F6 ,LEFT,DOWN,RGHT,RCBR,PIPE,
106 //|----+----+----+----+----+----| |----+----+----+----+----+----|
107 , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , ,
108 //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
109 , , , , , , , ,PGDN,PGUP,MNXT,VOLD,VOLU,MPLY
110 //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
111 ),
112
113/* Adjust (Lower + Raise)
114 * |------+------+------+------+------+------. ,------+------+------+------+------+------|
115 * | | Reset| | | | | | | | | | | Del |
116 * |------+------+------+------+------+------| |------+------+------+------+------+------|
117 * | | | |Audoff|Aud on|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | |
118 * |------+------+------+------+------+------| |------+------+------+------+------+------|
119 * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | |
120 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
121 * | | | | | | | | | | | | | | |
122 * `-------------------------------------------------------------------------------------------------'
123 */
124 [_ADJUST] = KEYMAP( \
125 _______, RESET, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \
126 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
127 _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \
128 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
129 )
130
131};
132
133#ifdef AUDIO_ENABLE
134float tone_startup[][2] = {
135 {NOTE_B5, 20},
136 {NOTE_B6, 8},
137 {NOTE_DS6, 20},
138 {NOTE_B6, 8}
139};
140
141float tone_qwerty[][2] = SONG(QWERTY_SOUND);
142float tone_dvorak[][2] = SONG(DVORAK_SOUND);
143float tone_colemak[][2] = SONG(COLEMAK_SOUND);
144
145float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
146
147float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
148#endif
149
150void persistant_default_layer_set(uint16_t default_layer) {
151 eeconfig_update_default_layer(default_layer);
152 default_layer_set(default_layer);
153}
154
155bool process_record_user(uint16_t keycode, keyrecord_t *record) {
156 switch (keycode) {
157 case QWERTY:
158 if (record->event.pressed) {
159 #ifdef AUDIO_ENABLE
160 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
161 #endif
162 persistant_default_layer_set(1UL<<_QWERTY);
163 }
164 return false;
165 break;
166 case COLEMAK:
167 if (record->event.pressed) {
168 #ifdef AUDIO_ENABLE
169 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
170 #endif
171 persistant_default_layer_set(1UL<<_COLEMAK);
172 }
173 return false;
174 break;
175 case DVORAK:
176 if (record->event.pressed) {
177 #ifdef AUDIO_ENABLE
178 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
179 #endif
180 persistant_default_layer_set(1UL<<_DVORAK);
181 }
182 return false;
183 break;
184 case LOWER:
185 if (record->event.pressed) {
186 layer_on(_LOWER);
187 update_tri_layer(_LOWER, _RAISE, _ADJUST);
188 } else {
189 layer_off(_LOWER);
190 update_tri_layer(_LOWER, _RAISE, _ADJUST);
191 }
192 return false;
193 break;
194 case RAISE:
195 if (record->event.pressed) {
196 layer_on(_RAISE);
197 update_tri_layer(_LOWER, _RAISE, _ADJUST);
198 } else {
199 layer_off(_RAISE);
200 update_tri_layer(_LOWER, _RAISE, _ADJUST);
201 }
202 return false;
203 break;
204 case BACKLIT:
205 if (record->event.pressed) {
206 register_code(KC_RSFT);
207 #ifdef BACKLIGHT_ENABLE
208 backlight_step();
209 #endif
210 } else {
211 unregister_code(KC_RSFT);
212 }
213 return false;
214 break;
215 }
216 return true;
217};
218
219void matrix_init_user(void) {
220 #ifdef AUDIO_ENABLE
221 startup_user();
222 #endif
223}
224
225#ifdef AUDIO_ENABLE
226
227void startup_user()
228{
229 _delay_ms(20); // gets rid of tick
230 PLAY_NOTE_ARRAY(tone_startup, false, 0);
231}
232
233void shutdown_user()
234{
235 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
236 _delay_ms(150);
237 stop_all_notes();
238}
239
240void music_on_user(void)
241{
242 music_scale_user();
243}
244
245void music_scale_user(void)
246{
247 PLAY_NOTE_ARRAY(music_scale, false, 0);
248}
249
250#endif
diff --git a/keyboards/handwired/atreus50/readme.md b/keyboards/handwired/atreus50/readme.md
new file mode 100644
index 000000000..0c24f67db
--- /dev/null
+++ b/keyboards/handwired/atreus50/readme.md
@@ -0,0 +1,16 @@
1Handwired Atreus50
2==================
3
4This firmware is for a Handwired Atreus50 using an Arduino Pro Micro.
5
6## Pinout
7
8The following pins are used:
9- Columns 1-13: D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4
10- Rows 1-4: D3, D2, D1, D0
11
12## Compiling and loading the firmware
13
14To build the firmware, run `make`.
15
16To flash the firemware onto the microcontroller, run `make avrdude`, and press the reset button.
diff --git a/keyboards/handwired/atreus50/rules.mk b/keyboards/handwired/atreus50/rules.mk
new file mode 100644
index 000000000..7770ea2a2
--- /dev/null
+++ b/keyboards/handwired/atreus50/rules.mk
@@ -0,0 +1,81 @@
1
2
3# MCU name
4#MCU = at90usb1287
5MCU = atmega32u4
6
7# Processor frequency.
8# This will define a symbol, F_CPU, in all source code files equal to the
9# processor frequency in Hz. You can then use this symbol in your source code to
10# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
11# automatically to create a 32-bit value in your source code.
12#
13# This will be an integer division of F_USB below, as it is sourced by
14# F_USB after it has run through any CPU prescalers. Note that this value
15# does not *change* the processor frequency - it should merely be updated to
16# reflect the processor speed set externally so that the code can use accurate
17# software delays.
18F_CPU = 16000000
19
20#
21# LUFA specific
22#
23# Target architecture (see library "Board Types" documentation).
24ARCH = AVR8
25
26# Input clock frequency.
27# This will define a symbol, F_USB, in all source code files equal to the
28# input clock frequency (before any prescaling is performed) in Hz. This value may
29# differ from F_CPU if prescaling is used on the latter, and is required as the
30# raw input clock is fed directly to the PLL sections of the AVR for high speed
31# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
32# at the end, this will be done automatically to create a 32-bit value in your
33# source code.
34#
35# If no clock division is performed on the input clock inside the AVR (via the
36# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
37F_USB = $(F_CPU)
38
39# Interrupt driven control endpoint task(+60)
40OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
41
42
43# Boot Section Size in *bytes*
44# Teensy halfKay 512
45# Teensy++ halfKay 1024
46# Atmel DFU loader 4096
47# LUFA bootloader 4096
48# USBaspLoader 2048
49OPT_DEFS += -DBOOTLOADER_SIZE=4096
50
51# Build Options
52# change to "no" to disable the options, or define them in the Makefile in
53# the appropriate keymap folder that will get included automatically
54#
55BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
56MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
57EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
58CONSOLE_ENABLE ?= no # Console for debug(+400)
59COMMAND_ENABLE ?= yes # Commands for debug and configuration
60NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
61BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
62MIDI_ENABLE ?= no # MIDI controls
63AUDIO_ENABLE ?= no # Audio output on port C6
64UNICODE_ENABLE ?= no # Unicode
65BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
66RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
67
68# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
69SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
70
71avrdude: build
72 ls /dev/tty* > /tmp/1; \
73 echo "Reset your Pro Micro now"; \
74 while [[ -z $$USB ]]; do \
75 sleep 1; \
76 ls /dev/tty* > /tmp/2; \
77 USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
78 done; \
79 avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
80
81.PHONY: avrdude
diff --git a/keyboards/handwired/kbod/Makefile b/keyboards/handwired/kbod/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/handwired/kbod/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/handwired/kbod/config.h b/keyboards/handwired/kbod/config.h
new file mode 100644
index 000000000..f3d0c8bf2
--- /dev/null
+++ b/keyboards/handwired/kbod/config.h
@@ -0,0 +1,167 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER fudanchii
28#define PRODUCT kbod
29#define DESCRIPTION Keyboard of Disapproval
30
31/* key matrix size */
32#define MATRIX_ROWS 8
33#define MATRIX_COLS 8
34
35/*
36 * Keyboard Matrix Assignments
37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
45#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5, B6, B7, D6 }
46#define MATRIX_COL_PINS { D0, D1, F0, F1, F4, F5, F6, F7 }
47#define UNUSED_PINS
48
49/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
50#define DIODE_DIRECTION COL2ROW
51
52// #define BACKLIGHT_PIN B7
53// #define BACKLIGHT_BREATHING
54// #define BACKLIGHT_LEVELS 3
55
56
57/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
58#define DEBOUNCING_DELAY 5
59
60/* define if matrix has ghost (lacks anti-ghosting diodes) */
61//#define MATRIX_HAS_GHOST
62
63/* number of backlight levels */
64
65/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
66#define LOCKING_SUPPORT_ENABLE
67/* Locking resynchronize hack */
68#define LOCKING_RESYNC_ENABLE
69
70/*
71 * Force NKRO
72 *
73 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
74 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
75 * makefile for this to work.)
76 *
77 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
78 * until the next keyboard reset.
79 *
80 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
81 * fully operational during normal computer usage.
82 *
83 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
84 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
85 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
86 * power-up.
87 *
88 */
89//#define FORCE_NKRO
90
91/*
92 * Magic Key Options
93 *
94 * Magic keys are hotkey commands that allow control over firmware functions of
95 * the keyboard. They are best used in combination with the HID Listen program,
96 * found here: https://www.pjrc.com/teensy/hid_listen.html
97 *
98 * The options below allow the magic key functionality to be changed. This is
99 * useful if your keyboard/keypad is missing keys and you want magic key support.
100 *
101 */
102
103/* key combination for magic key command */
104#define IS_COMMAND() ( \
105 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
106)
107
108/* control how magic key switches layers */
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
110//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
111//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
112
113/* override magic key keymap */
114//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
115//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
116//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
117//#define MAGIC_KEY_HELP1 H
118//#define MAGIC_KEY_HELP2 SLASH
119//#define MAGIC_KEY_DEBUG D
120//#define MAGIC_KEY_DEBUG_MATRIX X
121//#define MAGIC_KEY_DEBUG_KBD K
122//#define MAGIC_KEY_DEBUG_MOUSE M
123//#define MAGIC_KEY_VERSION V
124//#define MAGIC_KEY_STATUS S
125//#define MAGIC_KEY_CONSOLE C
126//#define MAGIC_KEY_LAYER0_ALT1 ESC
127//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
128//#define MAGIC_KEY_LAYER0 0
129//#define MAGIC_KEY_LAYER1 1
130//#define MAGIC_KEY_LAYER2 2
131//#define MAGIC_KEY_LAYER3 3
132//#define MAGIC_KEY_LAYER4 4
133//#define MAGIC_KEY_LAYER5 5
134//#define MAGIC_KEY_LAYER6 6
135//#define MAGIC_KEY_LAYER7 7
136//#define MAGIC_KEY_LAYER8 8
137//#define MAGIC_KEY_LAYER9 9
138//#define MAGIC_KEY_BOOTLOADER PAUSE
139//#define MAGIC_KEY_LOCK CAPS
140//#define MAGIC_KEY_EEPROM E
141//#define MAGIC_KEY_NKRO N
142//#define MAGIC_KEY_SLEEP_LED Z
143
144/*
145 * Feature disable options
146 * These options are also useful to firmware size reduction.
147 */
148
149/* disable debug print */
150//#define NO_DEBUG
151
152/* disable print */
153//#define NO_PRINT
154
155/* disable action features */
156//#define NO_ACTION_LAYER
157//#define NO_ACTION_TAPPING
158//#define NO_ACTION_ONESHOT
159//#define NO_ACTION_MACRO
160//#define NO_ACTION_FUNCTION
161
162#define PREVENT_STUCK_MODIFIERS
163
164#undef TAPPING_TOGGLE
165#define TAPPING_TOGGLE 2
166
167#endif
diff --git a/keyboards/handwired/kbod/kbod.c b/keyboards/handwired/kbod/kbod.c
new file mode 100644
index 000000000..9a12cae0d
--- /dev/null
+++ b/keyboards/handwired/kbod/kbod.c
@@ -0,0 +1,28 @@
1#include "kbod.h"
2
3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6
7 matrix_init_user();
8}
9
10void matrix_scan_kb(void) {
11 // put your looping keyboard code here
12 // runs every cycle (a lot)
13
14 matrix_scan_user();
15}
16
17bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
18 // put your per-action keyboard code here
19 // runs for every action, just before processing by the firmware
20
21 return process_record_user(keycode, record);
22}
23
24void led_set_kb(uint8_t usb_led) {
25 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
26
27 led_set_user(usb_led);
28}
diff --git a/keyboards/handwired/kbod/kbod.h b/keyboards/handwired/kbod/kbod.h
new file mode 100644
index 000000000..356063624
--- /dev/null
+++ b/keyboards/handwired/kbod/kbod.h
@@ -0,0 +1,21 @@
1#ifndef KBOD_H
2#define KBOD_H
3
4#include "quantum.h"
5
6#define KEYMAP( \
7 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \
8 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \
9 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \
10 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \
11 k40, k41, k42, k43, k44, k45, k46, k47 \
12) \
13{ \
14 { k00, k01, k02, k03, k04, k05, k06, k07 }, { k08, k09, k0A, k0B, k0C, k0D, KC_NO, KC_NO }, \
15 { k10, k11, k12, k13, k14, k15, k16, k17 }, { k18, k19, k1A, k1B, k1C, k1D, KC_NO, k3B }, \
16 { k20, k21, k22, k23, k24, k25, k26, k27 }, { k28, k29, k2A, k2B, k2C, k38, k39, k3A }, \
17 { k30, k31, k32, k33, k34, k35, k36, k37 }, \
18 { k40, k41, k42, k43, k44, k45, k46, k47 }, \
19}
20
21#endif
diff --git a/keyboards/handwired/kbod/keymaps/default/Makefile b/keyboards/handwired/kbod/keymaps/default/Makefile
new file mode 100644
index 000000000..0d9def930
--- /dev/null
+++ b/keyboards/handwired/kbod/keymaps/default/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = no # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif \ No newline at end of file
diff --git a/keyboards/handwired/kbod/keymaps/default/config.h b/keyboards/handwired/kbod/keymaps/default/config.h
new file mode 100644
index 000000000..df06a2620
--- /dev/null
+++ b/keyboards/handwired/kbod/keymaps/default/config.h
@@ -0,0 +1,8 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6// place overrides here
7
8#endif \ No newline at end of file
diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c
new file mode 100644
index 000000000..1386b742f
--- /dev/null
+++ b/keyboards/handwired/kbod/keymaps/default/keymap.c
@@ -0,0 +1,104 @@
1#include "kbod.h"
2
3#define _____ KC_TRNS
4
5#define MODS_PRESSED(btn) (get_mods() & (MOD_BIT(KC_L##btn)|MOD_BIT(KC_R##btn)))
6
7#define SET_WHETHER(mask, btn1, btn2) \
8if (record->event.pressed) { \
9 if (mask) { \
10 add_key(btn2); \
11 send_keyboard_report(); \
12 } else { \
13 add_key(btn1); \
14 send_keyboard_report(); \
15 } \
16} else { \
17 if (mask) { \
18 del_key(btn2); \
19 send_keyboard_report(); \
20 } else { \
21 del_key(btn1); \
22 send_keyboard_report(); \
23 } \
24} \
25
26
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28 KEYMAP( /* Base */
29 F(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQUAL, KC_BSPC,
30 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,
31 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOT, KC_ENTER,
32 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSFT,
33 TT(1), KC_LCTL, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL
34 ),
35 KEYMAP( /* Cursor layer */
36 KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
37 TT(3), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_INSERT,
38 TT(2), _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_HOME, _____,
39 _____, _____, _____, _____, _____, _____, _____, _____, KC_PGUP, KC_PGDN, KC_END, KC_UP,
40 _____, _____, _____, _____, _____, KC_LEFT, KC_DOWN, KC_RIGHT
41 ),
42 KEYMAP( /* Keypad layer */
43 TO(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC,
44 _____, _____, _____, _____, _____, _____, _____, KC_P4, KC_P5, KC_P6, _____, _____, _____, _____,
45 _____, _____, _____, _____, _____, _____, _____, KC_P1, KC_P2, KC_P3, _____, _____, _____,
46 _____, _____, _____, _____, _____, _____, _____, KC_P0, KC_PDOT, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2,
47 _____, _____, _____, _____, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN3
48 ),
49 KEYMAP( /* Multimedia layer */
50 TO(0), _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _____,
51 _____, _____, KC_WAKE, _____, _____, _____, _____, _____, _____, _____, KC_MSTP, KC_MPRV, KC_MNXT, _____,
52 _____, _____, KC_SLEP, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,
53 _____, _____, KC_PWR, _____, _____, _____, _____, _____, _____, KC_MS_BTN1, KC_MS_WH_UP, KC_MS_BTN2,
54 _____, _____, _____, KC_MPLY, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_MS_BTN3
55 ),
56};
57
58const uint16_t PROGMEM fn_actions[] = {
59 [0] = ACTION_FUNCTION(0),
60 [1] = ACTION_FUNCTION(1),
61};
62
63
64void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
65 static uint8_t shift_esc_mask;
66 static uint8_t alt_mask;
67 switch (id) {
68 case 0:
69 shift_esc_mask = MODS_PRESSED(SHIFT);
70 SET_WHETHER(shift_esc_mask, KC_ESC, KC_GRAVE);
71 break;
72 case 1:
73 alt_mask = MODS_PRESSED(ALT);
74 SET_WHETHER(alt_mask, KC_4, KC_F4);
75 break;
76 }
77}
78
79const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
80{
81 return MACRO_NONE;
82};
83
84void led_set_user(uint8_t usb_led) {
85 if (usb_led & _BV(USB_LED_CAPS_LOCK)) {
86 PORTB |= _BV(PB0);
87 } else {
88 PORTB &= ~_BV(PB0);
89 }
90}
91
92void matrix_init_user(void) {
93 DDRB |= _BV(PB0);
94 DDRC |= _BV(PC7);
95}
96
97void matrix_scan_user(void) {
98 uint8_t layer = biton32(layer_state);
99 if (layer) {
100 PORTC |= _BV(PC7);
101 } else {
102 PORTC &= ~_BV(PC7);
103 }
104} \ No newline at end of file
diff --git a/keyboards/handwired/kbod/keymaps/default/readme.md b/keyboards/handwired/kbod/keymaps/default/readme.md
new file mode 100644
index 000000000..35c22ec00
--- /dev/null
+++ b/keyboards/handwired/kbod/keymaps/default/readme.md
@@ -0,0 +1,5 @@
1# The default keymap for kbod
2
3This is the default keymap for kbod,
4
5it consists of a base layer with QWERTY layout, a momentary cursor-layer, and mouse-keys and multimedia layers. \ No newline at end of file
diff --git a/keyboards/handwired/kbod/readme.md b/keyboards/handwired/kbod/readme.md
new file mode 100644
index 000000000..67bf711be
--- /dev/null
+++ b/keyboards/handwired/kbod/readme.md
@@ -0,0 +1,21 @@
1KBOD keyboard firmware
2======================
3
4KBOD is a 60% Keyboard kit, hand-wired, with Arduino Micro as its controller. It's utilize 8x8 matrix and has layout similar to GH-60
5
6## Quantum MK Firmware
7
8For the full Quantum feature list, see [the parent readme](/).
9
10## Building
11
12Download or clone the whole firmware and use ```make handwired-kbod-default``` to generate the .hex file. You may flash it with avrdude
13
14## Flashing
15Something along this line:
16
17```
18avrdude -p m32u4 -c avr109 -P <COM PORT> -C <avrdude conf file> -e -u flash:w:handwired_kbod_default.hex
19```
20
21[More info](https://github.com/fudanchii/keyboard_of_disapproval) \ No newline at end of file
diff --git a/keyboards/handwired/kbod/rules.mk b/keyboards/handwired/kbod/rules.mk
new file mode 100644
index 000000000..4fcd147a9
--- /dev/null
+++ b/keyboards/handwired/kbod/rules.mk
@@ -0,0 +1,68 @@
1# MCU name
2#MCU = at90usb1287
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Boot Section Size in *bytes*
43# Teensy halfKay 512
44# Teensy++ halfKay 1024
45# Atmel DFU loader 4096
46# LUFA bootloader 4096
47# USBaspLoader 2048
48OPT_DEFS += -DBOOTLOADER_SIZE=4096
49
50
51# Build Options
52# change yes to no to disable
53#
54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
57CONSOLE_ENABLE ?= no # Console for debug(+400)
58COMMAND_ENABLE ?= no # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE ?= no # USB Nkey Rollover
63BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE ?= no # MIDI controls
65UNICODE_ENABLE ?= no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE ?= no # Audio output on port C6
68FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
diff --git a/keyboards/kinesis/keymaps/xyverz/Makefile b/keyboards/kinesis/keymaps/xyverz/Makefile
new file mode 100644
index 000000000..1da780b84
--- /dev/null
+++ b/keyboards/kinesis/keymaps/xyverz/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif
diff --git a/keyboards/kinesis/keymaps/xyverz/config.h b/keyboards/kinesis/keymaps/xyverz/config.h
new file mode 100644
index 000000000..8893d122e
--- /dev/null
+++ b/keyboards/kinesis/keymaps/xyverz/config.h
@@ -0,0 +1,8 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6// place overrides here
7
8#endif
diff --git a/keyboards/kinesis/keymaps/xyverz/keymap.c b/keyboards/kinesis/keymaps/xyverz/keymap.c
new file mode 100644
index 000000000..62f47773c
--- /dev/null
+++ b/keyboards/kinesis/keymaps/xyverz/keymap.c
@@ -0,0 +1,302 @@
1#include "kinesis.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7#define _DV 0 // Dvorak layer
8#define _QW 1 // Qwerty layer
9#define _CM 2 // Colemak layer
10#define _MD 3 // Media Layer
11#define _KP 4 // Keypad Layer
12
13// Macro name shortcuts
14#define DVORAK M(_DV)
15#define QWERTY M(_QW)
16#define COLEMAK M(_CM)
17
18// Fillers to make layering more clear
19#define _______ KC_TRNS
20#define XXXXXXX KC_NO
21
22/*
23
24 Function Keys on All Layers (Keypad toggles):
25 ,-----------------------------------------------------------------.
26 | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 |
27 `-----------------------------------------------------------------'
28 ,-----------------------------------------------------------------.
29 | F9 | F10 | F11 | F12 | PScr | SLck | Paus | Keypad | RESET |
30 `-----------------------------------------------------------------'
31
32 Dvorak layer:
33 ,-------------------------------------------.,-------------------------------------------.
34 | ] | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | [ |
35 |--------+------+------+------+------+------||------+------+------+------+------+--------|
36 | Tab | ' | , | . | P | Y || F | G | C | R | L | \ |
37 |--------+------+------+------+------+------||------+------+------+------+------+--------|
38 | CapsLk | A | O | E | U | I || D | H | T | N | S | - |
39 |--------+------+------+------+------+------||------+------+------+------+------+--------|
40 | LShift | Z | X | C | V | X || B | M | W | V | Z | RShift |
41 `--------+------+------+------+------+------'`------+------+------+------+------+--------'
42 | ` | INS | Left | Rght | | Up | Dn | / | = |
43 `---------------------------' `---------------------------'
44 ,--------------.,--------------.
45 | LCtl | LAlt || RGUI | RCtl |
46 ,------|-------|------||------+-------+-------.
47 | | Del | Home || PgUp | Enter | |
48 | BkSp | / |------||------| / | Space |
49 | | Media | End || PgDn | KeyPd | |
50 `---------------------'`----------------------'
51
52 QWERTY layer:
53 ,-------------------------------------------.,-------------------------------------------.
54 | = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - |
55 |--------+------+------+------+------+------||------+------+------+------+------+--------|
56 | Tab | Q | W | E | R | T || Y | U | I | O | P | \ |
57 |--------+------+------+------+------+------||------+------+------+------+------+--------|
58 | CapsLk | A | S | D | F | G || H | J | K | L | ; | ' |
59 |--------+------+------+------+------+------||------+------+------+------+------+--------|
60 | LShift | Z | X | C | V | B || N | M | , | . | / | RShift |
61 `--------+------+------+------+------+------'`------+------+------+------+------+--------'
62 | ` | INS | Left | Rght | | Up | Dn | [ | ] |
63 `---------------------------' `---------------------------'
64 ,--------------.,--------------.
65 | LCtl | LAlt || RGUI | RCtl |
66 ,------|-------|------||------+-------+-------.
67 | | Del | Home || PgUp | Enter | |
68 | BkSp | / |------||------| / | Space |
69 | | Media | End || PgDn | KeyPd | |
70 `---------------------'`----------------------'
71
72 Colemak layer:
73 ,-------------------------------------------.,-------------------------------------------.
74 | = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - |
75 |--------+------+------+------+------+------||------+------+------+------+------+--------|
76 | Tab | Q | W | F | P | G || J | L | U | Y | ; | \ |
77 |--------+------+------+------+------+------||------+------+------+------+------+--------|
78 | BkSpc | A | R | S | T | D || H | N | E | I | O | ' |
79 |--------+------+------+------+------+------||------+------+------+------+------+--------|
80 | LShift | Z | X | C | V | B || K | M | , | . | / | RShift |
81 `--------+------+------+------+------+------'`------+------+------+------+------+--------'
82 | ` | INS | Left | Rght | | Up | Dn | [ | ] |
83 `---------------------------' `---------------------------'
84 ,--------------.,--------------.
85 | LCtl | LAlt || RGUI | RCtl |
86 ,------|-------|------||------+-------+-------.
87 | | Del | Home || PgUp | Enter | |
88 | BkSp | / |------||------| / | Space |
89 | | Media | End || PgDn | KeyPd | |
90 `---------------------'`----------------------'
91
92 Media layer:
93 ,-------------------------------------------.,-------------------------------------------.
94 | F11 | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F12 |
95 |--------+------+------+------+------+------||------+------+------+------+------+--------|
96 | | | | | | || | | | | | |
97 |--------+------+------+------+------+------||------+------+------+------+------+--------|
98 | | | | | | || | Mute | Vol- | Vol+ | | |
99 |--------+------+------+------+------+------||------+------+------+------+------+--------|
100 | | | | | | || Stop | Prev | Play | Next | Sel | |
101 `--------+------+------+------+------+------'`------+------+------+------+------+--------'
102 | | | | | | | | | |
103 `---------------------------' `---------------------------'
104 ,-------------.,-------------.
105 | | || | |
106 ,------|------|------||------+------+------.
107 | | | || | | |
108 | | |------||------| | |
109 | | | || | | |
110 `--------------------'`--------------------'
111
112 Keypad layer:
113 ,-------------------------------------------.,-------------------------------------------.
114 | Power | | | | | || | NmLk | KP = | KP / | KP * | |
115 |--------+------+------+------+------+------||------+------+------+------+------+--------|
116 | Sleep | | | | | || | KP 7 | KP 8 | KP 9 | KP - | |
117 |--------+------+------+------+------+------||------+------+------+------+------+--------|
118 | Wake | |QWERTY|Colemk|Dvorak| || | KP 4 | KP 5 | KP 6 | KP + | |
119 |--------+------+------+------+------+------||------+------+------+------+------+--------|
120 | | | | | | || | KP 1 | KP 2 | KP 3 |KP Ent| |
121 `--------+------+------+------+------+------'`------+------+------+------+------+--------'
122 | | | | | | | | KP . |KP Ent| |
123 `---------------------------' `----------------------------------'
124 ,-------------.,-------------.
125 | | || | |
126 ,------|------|------||------+------+------.
127 | | | || | | |
128 | | |------||------| | KP 0 |
129 | | | || | | |
130 `--------------------'`--------------------'
131*/
132
133const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
134
135[_DV] = KEYMAP(
136 // Left Hand
137 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8,
138 KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5,
139 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y,
140 KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I,
141 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X,
142 KC_GRV, KC_INS, KC_LEFT, KC_RGHT,
143 // Left Thumb
144 KC_LCTL, KC_LALT,
145 KC_HOME,
146 KC_BSPC, LT(_MD, KC_DEL), KC_END,
147
148 // Right Hand
149 KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KP), RESET,
150 KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC,
151 KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS,
152 KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
153 KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
154 KC_UP, KC_DOWN, KC_SLSH, KC_EQL,
155 // Right Thumb
156 KC_RGUI, KC_RCTL,
157 KC_PGUP,
158 KC_PGDN, LT(_KP, KC_ENT), KC_SPC
159 ),
160
161[_QW] = KEYMAP(
162 // Left Hand
163 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8,
164 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5,
165 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
166 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G,
167 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
168 KC_GRV, KC_INS, KC_LEFT, KC_RGHT,
169 // Left Thumb
170 KC_LCTL, KC_LALT,
171 KC_HOME,
172 KC_BSPC, LT(_MD, KC_DEL), KC_END,
173
174 // Right Hand
175 KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KP), RESET,
176 KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
177 KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL ,
178 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
179 KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
180 KC_UP, KC_DOWN, KC_LBRC, KC_RBRC,
181 // Right Thumb
182 KC_RGUI, KC_RCTL,
183 KC_PGUP,
184 KC_PGDN, LT(_KP, KC_ENT), KC_SPC
185 ),
186
187[_CM] = KEYMAP(
188 // Left Hand
189 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8,
190 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5,
191 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G,
192 KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
193 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
194 KC_GRV, KC_INS, KC_LEFT, KC_RGHT,
195 // Left Thumb
196 KC_LCTL, KC_LALT,
197 KC_HOME,
198 KC_BSPC, LT(_MD, KC_DEL), KC_END,
199
200 // Right Hand
201 KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_KP), RESET,
202 KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
203 KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL,
204 KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
205 KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
206 KC_UP, KC_DOWN, KC_LBRC, KC_RBRC,
207 // Right Thumb
208 KC_RGUI, KC_RCTL,
209 KC_PGUP,
210 KC_PGDN, LT(_KP, KC_ENT), KC_SPC
211 ),
212
213[_MD] = KEYMAP(
214 // Left Hand
215 _______, _______, _______, _______, _______, _______, _______, _______, _______,
216 KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
217 _______, _______, _______, _______, _______, _______,
218 _______, _______, _______, _______, _______, _______,
219 _______, _______, _______, _______, _______, _______,
220 _______, _______, _______, _______,
221 // Left Thumb
222 _______, _______,
223 _______,
224 _______, _______, _______,
225
226 // Right Hand
227 _______, _______, _______, _______, _______, _______, _______, _______, _______,
228 KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12,
229 _______, _______, _______, _______, _______, _______,
230 _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
231 KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSEL, _______,
232 _______, _______, _______, _______,
233 // Right Thumb
234 _______, _______,
235 _______,
236 _______, _______, _______
237 ),
238
239[_KP] = KEYMAP(
240 // Left Hand
241 _______, _______, _______, _______, _______, _______, _______, _______, _______,
242 KC_PWR, _______, _______, _______, _______, _______,
243 KC_SLEP, _______, _______, _______, _______, _______,
244 KC_WAKE, _______, QWERTY, COLEMAK, DVORAK, _______,
245 _______, _______, _______, _______, _______, _______,
246 _______, _______, _______, _______,
247 // Left Thumb
248 _______, _______,
249 _______,
250 _______, _______, _______,
251
252 // Right Hand */
253 _______, _______, _______, _______, _______, _______, _______, _______, _______,
254 _______, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, _______,
255 _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______,
256 _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______,
257 _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______,
258 _______, _______, KC_PDOT, KC_PENT,
259 // Right Thumb
260 _______, _______,
261 _______,
262 _______, _______, KC_P0
263 )
264
265};
266
267
268const uint16_t PROGMEM fn_actions[] = {
269
270};
271
272void persistant_default_layer_set(uint16_t default_layer) {
273 eeconfig_update_default_layer(default_layer);
274 default_layer_set(default_layer);
275}
276
277const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
278{
279 switch(id) {
280 case _DV:
281 if (record->event.pressed) {
282 persistant_default_layer_set(1UL<<_DV);
283 }
284 break;
285 case _QW:
286 if (record->event.pressed) {
287 persistant_default_layer_set(1UL<<_QW);
288 }
289 break;
290 case _CM:
291 if (record->event.pressed) {
292 persistant_default_layer_set(1UL<<_CM);
293 }
294 break;
295 }
296 return MACRO_NONE;
297};
298
299// Runs just one time when the keyboard initializes.
300void matrix_init_user(void) {
301
302};
diff --git a/keyboards/kinesis/keymaps/xyverz/readme.md b/keyboards/kinesis/keymaps/xyverz/readme.md
new file mode 100644
index 000000000..a10d7c2ba
--- /dev/null
+++ b/keyboards/kinesis/keymaps/xyverz/readme.md
@@ -0,0 +1,128 @@
1# Xyverz's Kinesis Keymap
2
3## About this keymap:
4
5The Dvorak layout shown here stems from my early Kinesis years, using the Contour PS/2 with a Dvorak software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the corner keys. I've decided to continue using this layout with my QMK Kinesis.
6
7The QWERTY layout shown here is based entirely on the Kinesis Advantage layout. The Colemak layout is merely an adaptation of that.
8
9I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts.
10
11## Still to do:
12
13 * Implement the CapsLock, NumLock, and ScrLck LEDs on the off-chance that I decide to actually solder some to the keyboard.
14
15### Function Keys on All Layers (keypad toggles):
16 ,-----------------------------------------------------------------.
17 | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 |
18 `-----------------------------------------------------------------'
19 ,-----------------------------------------------------------------.
20 | F9 | F10 | F11 | F12 | PScr | SLck | Paus | Keypad | Reset |
21 `-----------------------------------------------------------------'
22
23### Layer 0: Dvorak layer
24
25 ,-------------------------------------------.,-------------------------------------------.
26 | ] | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | [ |
27 |--------+------+------+------+------+------||------+------+------+------+------+--------|
28 | Tab | ' | , | . | P | Y || F | G | C | R | L | \ |
29 |--------+------+------+------+------+------||------+------+------+------+------+--------|
30 | CapsLk | A | O | E | U | I || D | H | T | N | S | - |
31 |--------+------+------+------+------+------||------+------+------+------+------+--------|
32 | LShift | Z | X | C | V | X || B | M | W | V | Z | RShift |
33 `--------+------+------+------+------+------'`------+------+------+------+------+--------'
34 | ` | Ins | Left | Rght | | Up | Dn | / | = |
35 `---------------------------' `---------------------------'
36 ,--------------.,--------------.
37 | LCtl | LAlt || RGUI | RCtl |
38 ,------|-------|------||------+-------+-------.
39 | | Del | Home || PgUp | Enter | |
40 | BkSp | / |------||------| / | Space |
41 | | Media | End || PgDn | KeyPd | |
42 `---------------------'`----------------------'
43
44### Layer 1: QWERTY layer
45
46 ,-------------------------------------------.,-------------------------------------------.
47 | = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - |
48 |--------+------+------+------+------+------||------+------+------+------+------+--------|
49 | Tab | Q | W | E | R | T || Y | U | I | O | P | \ |
50 |--------+------+------+------+------+------||------+------+------+------+------+--------|
51 | CapsLk | A | S | D | F | G || H | J | K | L | ; | ' |
52 |--------+------+------+------+------+------||------+------+------+------+------+--------|
53 | LShift | Z | X | C | V | B || N | M | , | . | / | RShift |
54 `--------+------+------+------+------+------'`------+------+------+------+------+--------'
55 | ` | Ins | Left | Rght | | Up | Dn | [ | ] |
56 `---------------------------' `---------------------------'
57 ,--------------.,--------------.
58 | LCtl | LAlt || RGUI | RCtl |
59 ,------|-------|------||------+-------+-------.
60 | | Del | Home || PgUp | Enter | |
61 | BkSp | / |------||------| / | Space |
62 | | Media | End || PgDn | KeyPd | |
63 `---------------------'`----------------------'
64
65### Keymap 2: Colemak layer
66
67 ,-------------------------------------------.,-------------------------------------------.
68 | = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - |
69 |--------+------+------+------+------+------||------+------+------+------+------+--------|
70 | Tab | Q | W | F | P | G || J | L | U | Y | ; | \ |
71 |--------+------+------+------+------+------||------+------+------+------+------+--------|
72 | BkSpc | A | R | S | T | D || H | N | E | I | O | ' |
73 |--------+------+------+------+------+------||------+------+------+------+------+--------|
74 | LShift | Z | X | C | V | B || K | M | , | . | / | RShift |
75 `--------+------+------+------+------+------'`------+------+------+------+------+--------'
76 | ` | Ins | Left | Rght | | Up | Dn | [ | ] |
77 `---------------------------' `---------------------------'
78 ,--------------.,--------------.
79 | LCtl | LAlt || RGUI | RCtl |
80 ,------|-------|------||------+-------+-------.
81 | | Del | Home || PgUp | Enter | |
82 | BkSp | / |------||------| / | Space |
83 | | Media | End || PgDn | KeyPd | |
84 `---------------------'`----------------------'
85
86### layer 3 : Media layer
87
88 ,-------------------------------------------.,-------------------------------------------.
89 | F11 | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F12 |
90 |--------+------+------+------+------+------||------+------+------+------+------+--------|
91 | | | | | | || | | | | | |
92 |--------+------+------+------+------+------||------+------+------+------+------+--------|
93 | | | | | | || | Mute | Vol- | Vol+ | | |
94 |--------+------+------+------+------+------||------+------+------+------+------+--------|
95 | | | | | | || Stop | Prev | Play | Next | Sel | |
96 `--------+------+------+------+------+------'`------+------+------+------+------+--------'
97 | | | | | | | | | |
98 `---------------------------' `---------------------------'
99 ,-------------.,-------------.
100 | | || | |
101 ,------|------|------||------+------+------.
102 | | | || | | |
103 | | |------||------| | |
104 | | | || | | |
105 `--------------------'`--------------------'
106
107
108
109### Keymap 4: Keypad layer
110
111 ,-------------------------------------------.,-------------------------------------------.
112 | Power | | | | | || | NmLk | KP = | KP / | KP * | |
113 |--------+------+------+------+------+------||------+------+------+------+------+--------|
114 | Sleep | | | | | || | KP 7 | KP 8 | KP 9 | KP - | |
115 |--------+------+------+------+------+------||------+------+------+------+------+--------|
116 | Wake | |QWERTY|Colemk|Dvorak| || | KP 4 | KP 5 | KP 6 | KP + | |
117 |--------+------+------+------+------+------||------+------+------+------+------+--------|
118 | | | | | | || | KP 1 | KP 2 | KP 3 |KP Ent| |
119 `--------+------+------+------+------+------'`------+------+------+------+------+--------'
120 | | | | | | | | KP . |KP Ent| |
121 `---------------------------' `----------------------------------'
122 ,-------------.,-------------.
123 | | || | |
124 ,------|------|------||------+------+------.
125 | | | || | | |
126 | | |------||------| | KP 0 |
127 | | | || | | |
128 `--------------------'`--------------------'
diff --git a/keyboards/lets_split/keymaps/OLED_sample/config.h b/keyboards/lets_split/keymaps/OLED_sample/config.h
index 353ea368c..8389ba111 100644
--- a/keyboards/lets_split/keymaps/OLED_sample/config.h
+++ b/keyboards/lets_split/keymaps/OLED_sample/config.h
@@ -27,19 +27,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
27#define TAPPING_FORCE_HOLD 27#define TAPPING_FORCE_HOLD
28#define TAPPING_TERM 100 28#define TAPPING_TERM 100
29 29
30#ifdef SUBPROJECT_rev1
31 #include "../../rev1/config.h"
32#endif
33#ifdef SUBPROJECT_rev2
34 #include "../../rev2/config.h"
35#endif
36
30#undef RGBLED_NUM 37#undef RGBLED_NUM
31#define RGBLIGHT_ANIMATIONS 38#define RGBLIGHT_ANIMATIONS
32#define RGBLED_NUM 6 39#define RGBLED_NUM 6
33#define RGBLIGHT_HUE_STEP 10 40#define RGBLIGHT_HUE_STEP 10
34#define RGBLIGHT_SAT_STEP 17 41#define RGBLIGHT_SAT_STEP 17
35#define RGBLIGHT_VAL_STEP 17 42#define RGBLIGHT_VAL_STEP 17
36
37
38
39
40#ifdef SUBPROJECT_rev1
41 #include "../../rev1/config.h"
42#endif
43#ifdef SUBPROJECT_rev2
44 #include "../../rev2/config.h"
45#endif \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c
index 072b825ab..493ebcd3f 100644
--- a/keyboards/lets_split/keymaps/OLED_sample/keymap.c
+++ b/keyboards/lets_split/keymaps/OLED_sample/keymap.c
@@ -6,6 +6,9 @@
6#ifdef AUDIO_ENABLE 6#ifdef AUDIO_ENABLE
7 #include "audio.h" 7 #include "audio.h"
8#endif 8#endif
9#ifdef SSD1306OLED
10 #include "ssd1306.h"
11#endif
9 12
10extern keymap_config_t keymap_config; 13extern keymap_config_t keymap_config;
11 14
diff --git a/keyboards/lets_split/keymaps/hexwire/Makefile b/keyboards/lets_split/keymaps/hexwire/Makefile
index 1e3cebb14..1e5761278 100644
--- a/keyboards/lets_split/keymaps/hexwire/Makefile
+++ b/keyboards/lets_split/keymaps/hexwire/Makefile
@@ -1 +1,5 @@
1RGBLIGHT_ENABLE = yes 1RGBLIGHT_ENABLE = yes
2
3ifndef QUANTUM_DIR
4 include ../../../../Makefile
5endif
diff --git a/keyboards/lets_split/keymaps/hexwire/compact_keymap.h b/keyboards/lets_split/keymaps/hexwire/compact_keymap.h
deleted file mode 100644
index d9d063fbf..000000000
--- a/keyboards/lets_split/keymaps/hexwire/compact_keymap.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#ifndef COMPACT_KEYMAP_H
2#define COMPACT_KEYMAP_H
3
4#define COMPACT_KEYMAP( \
5 k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \
6 k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \
7 k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \
8 k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \
9 ) \
10 { \
11 { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05 }, \
12 { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15 }, \
13 { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25 }, \
14 { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35 }, \
15 { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45 }, \
16 { KC_##k50, KC_##k51, KC_##k52, KC_##k53, KC_##k54, KC_##k55 }, \
17 { KC_##k60, KC_##k61, KC_##k62, KC_##k63, KC_##k64, KC_##k65 }, \
18 { KC_##k70, KC_##k71, KC_##k72, KC_##k73, KC_##k74, KC_##k75 } \
19 }
20
21#define KC_ KC_TRNS
22
23#endif \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/hexwire/config.h b/keyboards/lets_split/keymaps/hexwire/config.h
index 983f8e352..e315d8c0c 100644
--- a/keyboards/lets_split/keymaps/hexwire/config.h
+++ b/keyboards/lets_split/keymaps/hexwire/config.h
@@ -18,15 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18 18
19#define USE_SERIAL 19#define USE_SERIAL
20 20
21#define EE_HANDS 21#define TAPPING_TERM 150
22
23#undef RGBLED_NUM
24#define RGB_DI_PIN B0
25#define RGBLIGHT_ANIMATIONS
26#define RGBLED_NUM 8
27#define RGBLIGHT_HUE_STEP 8
28#define RGBLIGHT_SAT_STEP 8
29#define RGBLIGHT_VAL_STEP 8
30 22
31#ifdef SUBPROJECT_rev1 23#ifdef SUBPROJECT_rev1
32 #include "../../rev1/config.h" 24 #include "../../rev1/config.h"
@@ -34,6 +26,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
34#ifdef SUBPROJECT_rev2 26#ifdef SUBPROJECT_rev2
35 #include "../../rev2/config.h" 27 #include "../../rev2/config.h"
36#endif 28#endif
37#ifdef SUBPROJECT_rev2fliphalf 29
38 #include "../../rev2fliphalf/config.h" 30#undef RGBLED_NUM
39#endif 31#define RGBLIGHT_ANIMATIONS
32#define RGBLED_NUM 8
33#define RGBLIGHT_HUE_STEP 8
34#define RGBLIGHT_SAT_STEP 8
35#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/lets_split/keymaps/hexwire/keymap.c b/keyboards/lets_split/keymaps/hexwire/keymap.c
index 796a1fcab..fcf3cde75 100644
--- a/keyboards/lets_split/keymaps/hexwire/keymap.c
+++ b/keyboards/lets_split/keymaps/hexwire/keymap.c
@@ -1,7 +1,6 @@
1#include "lets_split.h" 1#include "lets_split.h"
2#include "action_layer.h" 2#include "action_layer.h"
3#include "eeconfig.h" 3#include "eeconfig.h"
4#include "compact_keymap.h"
5 4
6extern keymap_config_t keymap_config; 5extern keymap_config_t keymap_config;
7 6
@@ -25,6 +24,7 @@ enum custom_keycodes {
25 ADJUST, 24 ADJUST,
26}; 25};
27 26
27#define KC_ KC_TRNS
28#define _______ KC_TRNS 28#define _______ KC_TRNS
29 29
30#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen 30#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
@@ -39,7 +39,7 @@ enum custom_keycodes {
39 39
40const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 40const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
41 41
42 [_QWERTY] = COMPACT_KEYMAP( 42 [_QWERTY] = KC_KEYMAP(
43 //,----+----+----+----+----+----. ,----+----+----+----+----+----. 43 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
44 TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, 44 TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
45 //|----+----+----+----+----+----| |----+----+----+----+----+----| 45 //|----+----+----+----+----+----| |----+----+----+----+----+----|
@@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
51 //`----+----+----+----+----+----' `----+----+----+----+----+----' 51 //`----+----+----+----+----+----' `----+----+----+----+----+----'
52 ), 52 ),
53 53
54 [_COLEMAK] = COMPACT_KEYMAP( 54 [_COLEMAK] = KC_KEYMAP(
55 //,----+----+----+----+----+----. ,----+----+----+----+----+----. 55 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
56 TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, 56 TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
57 //|----+----+----+----+----+----| |----+----+----+----+----+----| 57 //|----+----+----+----+----+----| |----+----+----+----+----+----|
@@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
63 //`----+----+----+----+----+----' `----+----+----+----+----+----' 63 //`----+----+----+----+----+----' `----+----+----+----+----+----'
64 ), 64 ),
65 65
66 [_DVORAK] = COMPACT_KEYMAP( 66 [_DVORAK] = KC_KEYMAP(
67 //,----+----+----+----+----+----. ,----+----+----+----+----+----. 67 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
68 TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, 68 TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
69 //|----+----+----+----+----+----| |----+----+----+----+----+----| 69 //|----+----+----+----+----+----| |----+----+----+----+----+----|
@@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
75 //`----+----+----+----+----+----' `----+----+----+----+----+----' 75 //`----+----+----+----+----+----' `----+----+----+----+----+----'
76 ), 76 ),
77 77
78 [_LOWER] = COMPACT_KEYMAP( 78 [_LOWER] = KC_KEYMAP(
79 //,----+----+----+----+----+----. ,----+----+----+----+----+----. 79 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
80 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , 80 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
81 //|----+----+----+----+----+----| |----+----+----+----+----+----| 81 //|----+----+----+----+----+----| |----+----+----+----+----+----|
@@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
87 //`----+----+----+----+----+----' `----+----+----+----+----+----' 87 //`----+----+----+----+----+----' `----+----+----+----+----+----'
88 ), 88 ),
89 89
90 [_RAISE] = COMPACT_KEYMAP( 90 [_RAISE] = KC_KEYMAP(
91 //,----+----+----+----+----+----. ,----+----+----+----+----+----. 91 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
92 ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , 92 ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
93 //|----+----+----+----+----+----| |----+----+----+----+----+----| 93 //|----+----+----+----+----+----| |----+----+----+----+----+----|
@@ -99,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
99 //`----+----+----+----+----+----' `----+----+----+----+----+----' 99 //`----+----+----+----+----+----' `----+----+----+----+----+----'
100 ), 100 ),
101 101
102 [_FN3] = COMPACT_KEYMAP( 102 [_FN3] = KC_KEYMAP(
103 //,----+----+----+----+----+----. ,----+----+----+----+----+----. 103 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
104 F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , 104 F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
105 //|----+----+----+----+----+----| |----+----+----+----+----+----| 105 //|----+----+----+----+----+----| |----+----+----+----+----+----|
diff --git a/keyboards/lets_split/keymaps/xyverz/config.h b/keyboards/lets_split/keymaps/xyverz/config.h
new file mode 100644
index 000000000..1b5be030e
--- /dev/null
+++ b/keyboards/lets_split/keymaps/xyverz/config.h
@@ -0,0 +1,37 @@
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
19#define USE_SERIAL
20
21#define MASTER_LEFT
22// #define MASTER_RIGHT
23// #define EE_HANDS
24
25#ifdef SUBPROJECT_rev1
26 #include "../../rev1/config.h"
27#endif
28#ifdef SUBPROJECT_rev2
29 #include "../../rev2/config.h"
30 /* RGB Underglow */
31 #undef RGBLED_NUM
32 #define RGBLIGHT_ANIMATIONS
33 #define RGBLED_NUM 8
34#endif
35#ifdef SUBPROJECT_rev2fliphalf
36 #include "../../rev2fliphalf/config.h"
37#endif
diff --git a/keyboards/lets_split/keymaps/xyverz/keymap.c b/keyboards/lets_split/keymaps/xyverz/keymap.c
new file mode 100644
index 000000000..216e94696
--- /dev/null
+++ b/keyboards/lets_split/keymaps/xyverz/keymap.c
@@ -0,0 +1,191 @@
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 planck_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 * | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right |
42 * `-----------------------------------------------------------------------------------'
43 */
44[_QWERTY] = KEYMAP ( \
45 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
46 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
47 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,\
48 KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \
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 * | Brite| Ctrl | Alt | GUI |Lower | Bksp |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_RSFT, \
66 KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \
67),
68
69/* Dvorak
70 * ,-----------------------------------------------------------------------------------.
71 * | Tab | " | , | . | P | Y | F | G | C | R | L | / |
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 | Shift|
76 * |------+------+------+------+------+------+------+------+------+------+------+------|
77 * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter |
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_SLSH, \
82 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
83 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \
84 KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \
85),
86
87/* Lower
88 * ,-----------------------------------------------------------------------------------.
89 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
90 * |------+------+------+------+------+-------------+------+------+------+------+------|
91 * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
92 * |------+------+------+------+------+------|------+------+------+------+------+------|
93 * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | |
94 * |------+------+------+------+------+------+------+------+------+------+------+------|
95 * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter |
96 * `-----------------------------------------------------------------------------------'
97 */
98[_LOWER] = KEYMAP ( \
99 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
100 KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
101 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \
102 _______, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \
103),
104
105/* Raise
106 * ,-----------------------------------------------------------------------------------.
107 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
108 * |------+------+------+------+------+-------------+------+------+------+------+------|
109 * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
110 * |------+------+------+------+------+------|------+------+------+------+------+------|
111 * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | |
112 * |------+------+------+------+------+------+------+------+------+------+------+------|
113 * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter |
114 * `-----------------------------------------------------------------------------------'
115 */
116[_RAISE] = KEYMAP ( \
117 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
118 KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
119 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, \
120 _______, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \
121),
122
123/* Adjust (Lower + Raise)
124 * ,-----------------------------------------------------------------------------------.
125 * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 |
126 * |------+------+------+------+------+-------------+------+------+------+------+------|
127 * | | Reset| |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
128 * |------+------+------+------+------+------|------+------+------+------+------+------|
129 * | |RGB ON| MODE | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | | | |
130 * |------+------+------+------+------+------+------+------+------+------+------+------|
131 * | | | | | | | | | | | |
132 * `-----------------------------------------------------------------------------------'
133 */
134[_ADJUST] = KEYMAP ( \
135 KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \
136 _______, RESET, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
137 _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, \
138 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
139)
140
141
142};
143
144void persistant_default_layer_set(uint16_t default_layer) {
145 eeconfig_update_default_layer(default_layer);
146 default_layer_set(default_layer);
147}
148
149bool process_record_user(uint16_t keycode, keyrecord_t *record) {
150 switch (keycode) {
151 case QWERTY:
152 if (record->event.pressed) {
153 persistant_default_layer_set(1UL<<_QWERTY);
154 }
155 return false;
156 break;
157 case COLEMAK:
158 if (record->event.pressed) {
159 persistant_default_layer_set(1UL<<_COLEMAK);
160 }
161 return false;
162 break;
163 case DVORAK:
164 if (record->event.pressed) {
165 persistant_default_layer_set(1UL<<_DVORAK);
166 }
167 return false;
168 break;
169 case LOWER:
170 if (record->event.pressed) {
171 layer_on(_LOWER);
172 update_tri_layer(_LOWER, _RAISE, _ADJUST);
173 } else {
174 layer_off(_LOWER);
175 update_tri_layer(_LOWER, _RAISE, _ADJUST);
176 }
177 return false;
178 break;
179 case RAISE:
180 if (record->event.pressed) {
181 layer_on(_RAISE);
182 update_tri_layer(_LOWER, _RAISE, _ADJUST);
183 } else {
184 layer_off(_RAISE);
185 update_tri_layer(_LOWER, _RAISE, _ADJUST);
186 }
187 return false;
188 break;
189 }
190 return true;
191}
diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h
index 0de308c7a..1892bf2cb 100644
--- a/keyboards/lets_split/lets_split.h
+++ b/keyboards/lets_split/lets_split.h
@@ -11,6 +11,20 @@
11 #include "rev2fliphalf.h" 11 #include "rev2fliphalf.h"
12#endif 12#endif
13 13
14// Used to create a keymap using only KC_ prefixed keys
15#define KC_KEYMAP( \
16 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
17 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
18 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
19 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
20 ) \
21 KEYMAP( \
22 KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
23 KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
24 KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
25 KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
26 )
27
14#include "quantum.h" 28#include "quantum.h"
15 29
16#endif \ No newline at end of file 30#endif \ No newline at end of file
diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md
index ecce3f415..7e5a54602 100644
--- a/keyboards/lets_split/readme.md
+++ b/keyboards/lets_split/readme.md
@@ -7,6 +7,12 @@ Split keyboard firmware for Arduino Pro Micro or other ATmega32u4
7based boards. 7based boards.
8 8
9 9
10## Build Guide
11
12A build guide for putting together the Let's Split v2 can be found here: [An Overly Verbose Guide to Building a Let's Split Keyboard](https://github.com/nicinabox/lets-split-guide)
13
14There is additional information there about flashing and adding RGB underglow.
15
10## First Time Setup 16## First Time Setup
11 17
12Download or clone the whole firmware and navigate to the keyboards/lets_split directory. Once your dev env is setup, you'll be able to generate the default .hex using: 18Download or clone the whole firmware and navigate to the keyboards/lets_split directory. Once your dev env is setup, you'll be able to generate the default .hex using:
@@ -62,8 +68,7 @@ Apart from diodes and key switches for the keyboard matrix in each half, you
62will need: 68will need:
63 69
64* 2 Arduino Pro Micro's. You can find theses on aliexpress for ≈3.50USD each. 70* 2 Arduino Pro Micro's. You can find theses on aliexpress for ≈3.50USD each.
65* 2 TRS sockets 71* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable
66* 1 TRS cable.
67 72
68Alternatively, you can use any sort of cable and socket that has at least 3 73Alternatively, you can use any sort of cable and socket that has at least 3
69wires. If you want to use I2C to communicate between halves, you will need a 74wires. If you want to use I2C to communicate between halves, you will need a
@@ -77,7 +82,7 @@ A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and t
77Wiring 82Wiring
78------ 83------
79 84
80The 3 wires of the TRS cable need to connect GND, VCC, and digital pin 3 (i.e. 85The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e.
81PD0 on the ATmega32u4) between the two Pro Micros. 86PD0 on the ATmega32u4) between the two Pro Micros.
82 87
83Then wire your key matrix to any of the remaining 17 IO pins of the pro micro 88Then wire your key matrix to any of the remaining 17 IO pins of the pro micro
diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h
index 2f5bde953..5fb87cf5d 100644
--- a/keyboards/lets_split/rev1/config.h
+++ b/keyboards/lets_split/rev1/config.h
@@ -63,6 +63,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
63 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ 63 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
64) 64)
65 65
66/* ws2812 RGB LED */
67#define RGB_DI_PIN D3
68#define RGBLIGHT_TIMER
69#define RGBLED_NUM 16 // Number of LEDs
70#define ws2812_PORTREG PORTD
71#define ws2812_DDRREG DDRD
72
66/* 73/*
67 * Feature disable options 74 * Feature disable options
68 * These options are also useful to firmware size reduction. 75 * These options are also useful to firmware size reduction.
diff --git a/keyboards/lets_split/rev1/rev1.h b/keyboards/lets_split/rev1/rev1.h
index 4667c9fb0..6bf9f0f03 100644
--- a/keyboards/lets_split/rev1/rev1.h
+++ b/keyboards/lets_split/rev1/rev1.h
@@ -9,20 +9,20 @@
9//void promicro_bootloader_jmp(bool program); 9//void promicro_bootloader_jmp(bool program);
10 10
11#define KEYMAP( \ 11#define KEYMAP( \
12 k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ 12 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
13 k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ 13 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
14 k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ 14 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
15 k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ 15 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
16 ) \ 16 ) \
17 { \ 17 { \
18 { k00, k01, k02, k03, k04, k05 }, \ 18 { L00, L01, L02, L03, L04, L05 }, \
19 { k10, k11, k12, k13, k14, k15 }, \ 19 { L10, L11, L12, L13, L14, L15 }, \
20 { k20, k21, k22, k23, k24, k25 }, \ 20 { L20, L21, L22, L23, L24, L25 }, \
21 { k30, k31, k32, k33, k34, k35 }, \ 21 { L30, L31, L32, L33, L34, L35 }, \
22 { k40, k41, k42, k43, k44, k45 }, \ 22 { R00, R01, R02, R03, R04, R05 }, \
23 { k50, k51, k52, k53, k54, k55 }, \ 23 { R10, R11, R12, R13, R14, R15 }, \
24 { k60, k61, k62, k63, k64, k65 }, \ 24 { R20, R21, R22, R23, R24, R25 }, \
25 { k70, k71, k72, k73, k74, k75 } \ 25 { R30, R31, R32, R33, R34, R35 } \
26 } 26 }
27 27
28#endif \ No newline at end of file 28#endif \ No newline at end of file
diff --git a/keyboards/lets_split/rev2/rev2.c b/keyboards/lets_split/rev2/rev2.c
index 8bfa171d0..20a4c6be1 100644
--- a/keyboards/lets_split/rev2/rev2.c
+++ b/keyboards/lets_split/rev2/rev2.c
@@ -37,4 +37,3 @@ void shutdown_user(void) {
37 stop_all_notes(); 37 stop_all_notes();
38 #endif 38 #endif
39} 39}
40
diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h
index 054731366..0c4e8e7de 100644
--- a/keyboards/lets_split/rev2/rev2.h
+++ b/keyboards/lets_split/rev2/rev2.h
@@ -10,62 +10,51 @@
10#ifdef USE_I2C 10#ifdef USE_I2C
11#include <stddef.h> 11#include <stddef.h>
12#ifdef __AVR__ 12#ifdef __AVR__
13#include <avr/io.h> 13 #include <avr/io.h>
14#include <avr/interrupt.h> 14 #include <avr/interrupt.h>
15#endif
16#ifdef SSD1306OLED
17extern bool iota_gfx_init(void);
18extern void iota_gfx_task(void);
19extern bool iota_gfx_off(void);
20extern bool iota_gfx_on(void);
21extern void iota_gfx_flush(void);
22extern void iota_gfx_write_char(uint8_t c);
23extern void iota_gfx_write(const char *data);
24extern void iota_gfx_write_P(const char *data);
25extern void iota_gfx_clear_screen(void);
26#endif 15#endif
27#endif 16#endif
28 17
29//void promicro_bootloader_jmp(bool program); 18//void promicro_bootloader_jmp(bool program);
30 19
31#ifndef FLIP_HALF 20#ifndef FLIP_HALF
32//Standard Keymap 21// Standard Keymap
22// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
33#define KEYMAP( \ 23#define KEYMAP( \
34 k40, k41, k42, k43, k44, k45, k05, k04, k03, k02, k01, k00, \ 24 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
35 k50, k51, k52, k53, k54, k55, k15, k14, k13, k12, k11, k10, \ 25 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
36 k60, k61, k62, k63, k64, k65, k25, k24, k23, k22, k21, k20, \ 26 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
37 k70, k71, k72, k73, k74, k75, k35, k34, k33, k32, k31, k30 \ 27 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
38 ) \ 28 ) \
39 { \ 29 { \
40 { k45, k44, k43, k42, k41, k40 }, \ 30 { L00, L01, L02, L03, L04, L05 }, \
41 { k55, k54, k53, k52, k51, k50 }, \ 31 { L10, L11, L12, L13, L14, L15 }, \
42 { k65, k64, k63, k62, k61, k60 }, \ 32 { L20, L21, L22, L23, L24, L25 }, \
43 { k75, k74, k73, k72, k71, k70 }, \ 33 { L30, L31, L32, L33, L34, L35 }, \
44 { k00, k01, k02, k03, k04, k05 }, \ 34 { R05, R04, R03, R02, R01, R00 }, \
45 { k10, k11, k12, k13, k14, k15 }, \ 35 { R15, R14, R13, R12, R11, R10 }, \
46 { k20, k21, k22, k23, k24, k25 }, \ 36 { R25, R24, R23, R22, R21, R20 }, \
47 { k30, k31, k32, k33, k34, k35 } \ 37 { R35, R34, R33, R32, R31, R30 } \
48 } 38 }
49
50#else 39#else
51// Keymap with one side flipped 40// Keymap with right side flipped
41// (TRRS jack on both halves are to the right)
52#define KEYMAP( \ 42#define KEYMAP( \
53 k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ 43 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
54 k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ 44 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
55 k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ 45 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
56 k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ 46 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
57 ) \ 47 ) \
58 { \ 48 { \
59 { k00, k01, k02, k03, k04, k05 }, \ 49 { L00, L01, L02, L03, L04, L05 }, \
60 { k10, k11, k12, k13, k14, k15 }, \ 50 { L10, L11, L12, L13, L14, L15 }, \
61 { k20, k21, k22, k23, k24, k25 }, \ 51 { L20, L21, L22, L23, L24, L25 }, \
62 { k30, k31, k32, k33, k34, k35 }, \ 52 { L30, L31, L32, L33, L34, L35 }, \
63 { k45, k44, k43, k42, k41, k40 }, \ 53 { R00, R01, R02, R03, R04, R05 }, \
64 { k55, k54, k53, k52, k51, k50 }, \ 54 { R10, R11, R12, R13, R14, R15 }, \
65 { k65, k64, k63, k62, k61, k60 }, \ 55 { R20, R21, R22, R23, R24, R25 }, \
66 { k75, k74, k73, k72, k71, k70 } \ 56 { R30, R31, R32, R33, R34, R35 } \
67 } 57 }
68#endif 58#endif
69 59
70 60#endif
71#endif \ No newline at end of file
diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk
index ff159e0f0..79860ea35 100644
--- a/keyboards/lets_split/rules.mk
+++ b/keyboards/lets_split/rules.mk
@@ -1,7 +1,7 @@
1SRC += matrix.c \ 1SRC += matrix.c \
2 i2c.c \ 2 i2c.c \
3 split_util.c \ 3 split_util.c \
4 serial.c\ 4 serial.c \
5 ssd1306.c 5 ssd1306.c
6 6
7# MCU name 7# MCU name
@@ -74,3 +74,15 @@ USE_I2C ?= yes
74SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 74SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
75 75
76CUSTOM_MATRIX = yes 76CUSTOM_MATRIX = yes
77
78avrdude: build
79 ls /dev/tty* > /tmp/1; \
80 echo "Reset your Pro Micro now"; \
81 while [[ -z $$USB ]]; do \
82 sleep 1; \
83 ls /dev/tty* > /tmp/2; \
84 USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
85 done; \
86 avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
87
88.PHONY: avrdude
diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c
index 46586fbc0..39639c3b4 100644
--- a/keyboards/lets_split/split_util.c
+++ b/keyboards/lets_split/split_util.c
@@ -21,7 +21,7 @@ static void setup_handedness(void) {
21 #ifdef EE_HANDS 21 #ifdef EE_HANDS
22 isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); 22 isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
23 #else 23 #else
24 // I2c_MASTER_RIGHT ish deprecate use MASTER_RIGHT instead since this works for both serial and i2c: 24 // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c
25 #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) 25 #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
26 isLeftHand = !has_usb(); 26 isLeftHand = !has_usb();
27 #else 27 #else
diff --git a/keyboards/lets_split/ssd1306.c b/keyboards/lets_split/ssd1306.c
index 4bf3a8743..5c6dff27f 100644
--- a/keyboards/lets_split/ssd1306.c
+++ b/keyboards/lets_split/ssd1306.c
@@ -1,9 +1,9 @@
1#ifdef SSD1306OLED 1#ifdef SSD1306OLED
2
3#include "ssd1306.h"
2#include "config.h" 4#include "config.h"
3#include "i2c.h" 5#include "i2c.h"
4#include <stdbool.h>
5#include <string.h> 6#include <string.h>
6#include <stdio.h>
7#include "print.h" 7#include "print.h"
8#include "lets_split.h" 8#include "lets_split.h"
9#include "common/glcdfont.c" 9#include "common/glcdfont.c"
diff --git a/keyboards/lets_split/ssd1306.h b/keyboards/lets_split/ssd1306.h
new file mode 100644
index 000000000..b0c74f987
--- /dev/null
+++ b/keyboards/lets_split/ssd1306.h
@@ -0,0 +1,17 @@
1#ifndef SSD1306_H
2#define SSD1306_H
3
4#include <stdbool.h>
5#include <stdio.h>
6
7bool iota_gfx_init(void);
8void iota_gfx_task(void);
9bool iota_gfx_off(void);
10bool iota_gfx_on(void);
11void iota_gfx_flush(void);
12void iota_gfx_write_char(uint8_t c);
13void iota_gfx_write(const char *data);
14void iota_gfx_write_P(const char *data);
15void iota_gfx_clear_screen(void);
16
17#endif
diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c
index aede27df7..09063cb97 100644
--- a/keyboards/planck/keymaps/callum/keymap.c
+++ b/keyboards/planck/keymaps/callum/keymap.c
@@ -48,19 +48,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
48 48
49/* MOVE 49/* MOVE
50 * ,-----------------------------------------------------------------------------------. 50 * ,-----------------------------------------------------------------------------------.
51 * | H(3) | H(F1)| H(F2)| H(F3)| H(F4)| H(F5)| H(8) | Home | Up | End | H(7) | Esc | 51 * | H(F7)| H(F8)| H(6) | H(5) | H(4) | H(F9)|H(F10)| Home | Up | End | H(A) | Esc |
52 * |------+------+------+------+------+------+------+------+------+------+------+------| 52 * |------+------+------+------+------+------+------+------+------+------+------+------|
53 * | H(4) | H(F6)| H(F7)| H(F8)| H(F9)|H(F10)| H(9) | Left | Down | Right| Caps | Del | 53 * | H(F3)| H(F4)| H(3) | H(2) | H(1) | H(F5)| H(F6)| Left | Down | Right| Caps | Del |
54 * |------+------+------+------+------+------+------+------+------+------+------+------| 54 * |------+------+------+------+------+------+------+------+------+------+------+------|
55 * | |H(F11)|H(F12)| H(0) | H(1) | H(2) | H(A) | Pg Dn| Pg Up| H(5) | H(6) | | 55 * | | H(0) | H(9) | H(8) | H(7) | H(F1)| H(F2)| Pg Dn| Pg Up|H(F11)|H(F12)| |
56 * |------+------+------+------+------+------+------+------+------+------+------+------| 56 * |------+------+------+------+------+------+------+------+------+------+------+------|
57 * | | | | | | | | | | | | | 57 * | | | | | | | | | | | | |
58 * `-----------------------------------------------------------------------------------' 58 * `-----------------------------------------------------------------------------------'
59 */ 59 */
60[_MOVE] = { 60[_MOVE] = {
61 {H(KC_3), H(KC_F1),H(KC_F2),H(KC_F3),H(KC_F4),H(KC_F5),H(KC_8), KC_HOME, KC_UP, KC_END, H(KC_7), KC_ESC }, 61 {H(KC_F7),H(KC_F8),H(KC_6), H(KC_5), H(KC_4), H(KC_F9),H(KC_F10),KC_HOME,KC_UP, KC_END, H(KC_A), KC_ESC },
62 {H(KC_4), H(KC_F6),H(KC_F7),H(KC_F8),H(KC_F9),H(KC_F10),H(KC_9),KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, 62 {H(KC_F3),H(KC_F4),H(KC_3), H(KC_2), H(KC_1), H(KC_F5),H(KC_F6),KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL },
63 {_______, H(KC_F11),H(KC_F12),H(KC_0),H(KC_1),H(KC_2), H(KC_A), KC_PGDN, KC_PGUP, H(KC_5), H(KC_6), _______}, 63 {_______, H(KC_0), H(KC_9), H(KC_8), H(KC_7), H(KC_F1),H(KC_F2),KC_PGDN,KC_PGUP,H(KC_F11),H(KC_F12),_______},
64 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 64 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
65}, 65},
66 66
diff --git a/keyboards/planck/keymaps/dbroqua/config.h b/keyboards/planck/keymaps/dbroqua/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/planck/keymaps/dbroqua/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/default/config.h b/keyboards/planck/keymaps/default/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/planck/keymaps/default/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/experimental/config.h b/keyboards/planck/keymaps/experimental/config.h
index cc093bee4..492490ca1 100644
--- a/keyboards/planck/keymaps/experimental/config.h
+++ b/keyboards/planck/keymaps/experimental/config.h
@@ -14,4 +14,27 @@
14#define RGBLIGHT_HUE_STEP 10 14#define RGBLIGHT_HUE_STEP 10
15#define RGBLIGHT_SAT_STEP 17 15#define RGBLIGHT_SAT_STEP 17
16 16
17/*
18 * MIDI options
19 */
20
21/* Prevent use of disabled MIDI features in the keymap */
22//#define MIDI_ENABLE_STRICT 1
23
24/* enable basic MIDI features:
25 - MIDI notes can be sent when in Music mode is on
26*/
27#define MIDI_BASIC
28
29/* enable advanced MIDI features:
30 - MIDI notes can be added to the keymap
31 - Octave shift and transpose
32 - Virtual sustain, portamento, and modulation wheel
33 - etc.
34*/
35//#define MIDI_ADVANCED
36
37/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
38//#define MIDI_TONE_KEYCODE_OCTAVES 2
39
17#endif 40#endif
diff --git a/keyboards/planck/keymaps/impossible/config.h b/keyboards/planck/keymaps/impossible/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/planck/keymaps/impossible/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/jeebak/config.h b/keyboards/planck/keymaps/jeebak/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/planck/keymaps/jeebak/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/jhenahan/config.h b/keyboards/planck/keymaps/jhenahan/config.h
index cd3adc41c..1e42b92b9 100644
--- a/keyboards/planck/keymaps/jhenahan/config.h
+++ b/keyboards/planck/keymaps/jhenahan/config.h
@@ -6,4 +6,27 @@
6#define FORCE_NKRO 6#define FORCE_NKRO
7#define WORKMAN_SOUND COLEMAK_SOUND 7#define WORKMAN_SOUND COLEMAK_SOUND
8 8
9/*
10 * MIDI options
11 */
12
13/* Prevent use of disabled MIDI features in the keymap */
14//#define MIDI_ENABLE_STRICT 1
15
16/* enable basic MIDI features:
17 - MIDI notes can be sent when in Music mode is on
18*/
19#define MIDI_BASIC
20
21/* enable advanced MIDI features:
22 - MIDI notes can be added to the keymap
23 - Octave shift and transpose
24 - Virtual sustain, portamento, and modulation wheel
25 - etc.
26*/
27//#define MIDI_ADVANCED
28
29/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
30//#define MIDI_TONE_KEYCODE_OCTAVES 2
31
9#endif 32#endif
diff --git a/keyboards/planck/keymaps/khord/Makefile b/keyboards/planck/keymaps/khord/Makefile
new file mode 100644
index 000000000..f0ed9e8dc
--- /dev/null
+++ b/keyboards/planck/keymaps/khord/Makefile
@@ -0,0 +1,4 @@
1TAP_DANCE_ENABLE = yes
2ifndef QUANTUM_DIR
3 include ../../../../Makefile
4endif
diff --git a/keyboards/planck/keymaps/khord/config.h b/keyboards/planck/keymaps/khord/config.h
new file mode 100644
index 000000000..008f3a5c2
--- /dev/null
+++ b/keyboards/planck/keymaps/khord/config.h
@@ -0,0 +1,93 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define MANUFACTURER Ortholinear Keyboards
27#define PRODUCT The Planck Keyboard
28#define DESCRIPTION A compact ortholinear keyboard
29
30/* key matrix size */
31#define MATRIX_ROWS 4
32#define MATRIX_COLS 12
33
34/* Planck PCB default pin-out */
35#define MATRIX_ROW_PINS { D0, D5, B5, B6 }
36#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
37#define UNUSED_PINS
38
39#define AUDIO_VOICES
40
41#define BACKLIGHT_PIN B7
42
43/* COL2ROW or ROW2COL */
44#define DIODE_DIRECTION COL2ROW
45
46/* define if matrix has ghost */
47//#define MATRIX_HAS_GHOST
48
49/* number of backlight levels */
50#define BACKLIGHT_LEVELS 3
51
52/* Set 0 if debouncing isn't needed */
53#define DEBOUNCING_DELAY 5
54
55/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
56#define LOCKING_SUPPORT_ENABLE
57/* Locking resynchronize hack */
58#define LOCKING_RESYNC_ENABLE
59
60/* key combination for command */
61#define IS_COMMAND() ( \
62 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
63)
64
65/* Tap Dance */
66#define TAPPING_TERM 150
67
68/*
69 * Feature disable options
70 * These options are also useful to firmware size reduction.
71 */
72
73/* disable debug print */
74//#define NO_DEBUG
75
76/* disable print */
77//#define NO_PRINT
78
79/* disable action features */
80//#define NO_ACTION_LAYER
81//#define NO_ACTION_TAPPING
82//#define NO_ACTION_ONESHOT
83//#define NO_ACTION_MACRO
84//#define NO_ACTION_FUNCTION
85
86#ifdef SUBPROJECT_rev3
87 #include "rev3/config.h"
88#endif
89#ifdef SUBPROJECT_rev4
90 #include "rev4/config.h"
91#endif
92
93#endif
diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c
new file mode 100644
index 000000000..8001a0986
--- /dev/null
+++ b/keyboards/planck/keymaps/khord/keymap.c
@@ -0,0 +1,336 @@
1// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
2// this is the style you want to emulate.
3
4#include "planck.h"
5#include "action_layer.h"
6#ifdef AUDIO_ENABLE
7 #include "audio.h"
8#endif
9#include "eeconfig.h"
10
11extern keymap_config_t keymap_config;
12
13// Each layer gets a name for readability, which is then used in the keymap matrix below.
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
16// entirely and just use numbers.
17#define _QWERTY 0
18#define _COLEMAK 1
19#define _DVORAK 2
20#define _LOWER 3
21#define _RAISE 4
22#define _PLOVER 5
23#define _ADJUST 16
24
25enum planck_keycodes {
26 QWERTY = SAFE_RANGE,
27 COLEMAK,
28 DVORAK,
29 PLOVER,
30 LOWER,
31 RAISE,
32 BACKLIT,
33 EXT_PLV
34};
35
36// Fillers to make layering more clear
37#define _______ KC_TRNS
38#define XXXXXXX KC_NO
39
40// Tap Dance Declarations
41enum {
42 ESC_CAP = 0,
43 LFT_HOM,
44 DWN_PDN,
45 UPP_PUP,
46 RGT_END
47};
48
49// Dylan's additions
50#define C_A_DEL LALT(LCTL(KC_DEL))
51#define C_A_INS LALT(LCTL(KC_INS))
52
53const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
54
55/* Qwerty
56 * ,-----------------------------------------------------------------------------------.
57 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
58 * |------+------+------+------+------+-------------+------+------+------+------+------|
59 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
60 * |------+------+------+------+------+------|------+------+------+------+------+------|
61 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
62 * |------+------+------+------+------+------+------+------+------+------+------+------|
63 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
64 * `-----------------------------------------------------------------------------------'
65 */
66[_QWERTY] = {
67 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
68 {TD(ESC_CAP), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT },
69 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)},
70 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }
71},
72
73/* Colemak
74 * ,-----------------------------------------------------------------------------------.
75 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
76 * |------+------+------+------+------+-------------+------+------+------+------+------|
77 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
78 * |------+------+------+------+------+------|------+------+------+------+------+------|
79 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
80 * |------+------+------+------+------+------+------+------+------+------+------+------|
81 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
82 * `-----------------------------------------------------------------------------------'
83 */
84[_COLEMAK] = {
85 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
86 {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
87 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
88 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
89},
90
91/* Dvorak
92 * ,-----------------------------------------------------------------------------------.
93 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
94 * |------+------+------+------+------+-------------+------+------+------+------+------|
95 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
96 * |------+------+------+------+------+------|------+------+------+------+------+------|
97 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
98 * |------+------+------+------+------+------+------+------+------+------+------+------|
99 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
100 * `-----------------------------------------------------------------------------------'
101 */
102[_DVORAK] = {
103 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
104 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
105 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
106 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
107},
108
109/* Lower
110 * ,-----------------------------------------------------------------------------------.
111 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
112 * |------+------+------+------+------+-------------+------+------+------+------+------|
113 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
114 * |------+------+------+------+------+------|------+------+------+------+------+------|
115 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | END | HOME |Enter |
116 * |------+------+------+------+------+------+------+------+------+------+------+------|
117 * | | | | | | | | Next | Vol- | Vol+ | Play |
118 * `-----------------------------------------------------------------------------------'
119 */
120[_LOWER] = {
121 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
122 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
123 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_END, KC_HOME, _______},
124 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
125},
126
127/* Raise
128 * ,-----------------------------------------------------------------------------------.
129 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
130 * |------+------+------+------+------+-------------+------+------+------+------+------|
131 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
132 * |------+------+------+------+------+------|------+------+------+------+------+------|
133 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |PG DN |PG UP |Enter |
134 * |------+------+------+------+------+------+------+------+------+------+------+------|
135 * | | | | | | | | Next | Vol- | Vol+ | Play |
136 * `-----------------------------------------------------------------------------------'
137 */
138[_RAISE] = {
139 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
140 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
141 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGDN, KC_PGUP, _______},
142 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
143},
144
145/* Plover layer (http://opensteno.org)
146 * ,-----------------------------------------------------------------------------------.
147 * | # | # | # | # | # | # | # | # | # | # | # | # |
148 * |------+------+------+------+------+-------------+------+------+------+------+------|
149 * | | S | T | P | H | * | * | F | P | L | T | D |
150 * |------+------+------+------+------+------|------+------+------+------+------+------|
151 * |TogOut| S | K | W | R | * | * | R | B | G | S | Z |
152 * |------+------+------+------+------+------+------+------+------+------+------+------|
153 * | Exit | | | A | O | | E | U | | | |
154 * `-----------------------------------------------------------------------------------'
155 */
156
157[_PLOVER] = {
158 {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
159 {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
160 {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
161 {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
162},
163
164/* Adjust (Lower + Raise)
165 * ,-----------------------------------------------------------------------------------.
166 * | | Reset| | | | | | | | | | Del |
167 * |------+------+------+------+------+-------------+------+------+------+------+------|
168 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
169 * |------+------+------+------+------+------|------+------+------+------+------+------|
170 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
171 * |------+------+------+------+------+------+------+------+------+------+------+------|
172 * | | | | | | | | | | | |
173 * `-----------------------------------------------------------------------------------'
174 */
175[_ADJUST] = {
176 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
177 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
178 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
179 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_A_INS, C_A_DEL}
180}
181
182
183};
184
185
186qk_tap_dance_action_t tap_dance_actions[] = {
187 [ESC_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
188 [LFT_HOM] = ACTION_TAP_DANCE_DOUBLE(KC_LEFT, KC_HOME),
189 [DWN_PDN] = ACTION_TAP_DANCE_DOUBLE(KC_DOWN, KC_PGDN),
190 [UPP_PUP] = ACTION_TAP_DANCE_DOUBLE(KC_UP, KC_PGUP),
191 [RGT_END] = ACTION_TAP_DANCE_DOUBLE(KC_RGHT, KC_END)
192};
193
194#ifdef AUDIO_ENABLE
195
196float tone_startup[][2] = SONG(SONIC_RING); //plug in
197float tone_qwerty[][2] = SONG(QWERTY_SOUND);
198float tone_dvorak[][2] = SONG(DVORAK_SOUND);
199float tone_colemak[][2] = SONG(COLEMAK_SOUND);
200float tone_plover[][2] = SONG(PLOVER_SOUND);
201float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
202float music_scale[][2] = SONG(ZELDA_PUZZLE); //music mode
203
204float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
205#endif
206
207
208void persistant_default_layer_set(uint16_t default_layer) {
209 eeconfig_update_default_layer(default_layer);
210 default_layer_set(default_layer);
211}
212
213bool process_record_user(uint16_t keycode, keyrecord_t *record) {
214 switch (keycode) {
215 case QWERTY:
216 if (record->event.pressed) {
217 #ifdef AUDIO_ENABLE
218 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
219 #endif
220 persistant_default_layer_set(1UL<<_QWERTY);
221 }
222 return false;
223 break;
224 case COLEMAK:
225 if (record->event.pressed) {
226 #ifdef AUDIO_ENABLE
227 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
228 #endif
229 persistant_default_layer_set(1UL<<_COLEMAK);
230 }
231 return false;
232 break;
233 case DVORAK:
234 if (record->event.pressed) {
235 #ifdef AUDIO_ENABLE
236 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
237 #endif
238 persistant_default_layer_set(1UL<<_DVORAK);
239 }
240 return false;
241 break;
242 case LOWER:
243 if (record->event.pressed) {
244 layer_on(_LOWER);
245 update_tri_layer(_LOWER, _RAISE, _ADJUST);
246 } else {
247 layer_off(_LOWER);
248 update_tri_layer(_LOWER, _RAISE, _ADJUST);
249 }
250 return false;
251 break;
252 case RAISE:
253 if (record->event.pressed) {
254 layer_on(_RAISE);
255 update_tri_layer(_LOWER, _RAISE, _ADJUST);
256 } else {
257 layer_off(_RAISE);
258 update_tri_layer(_LOWER, _RAISE, _ADJUST);
259 }
260 return false;
261 break;
262 case BACKLIT:
263 if (record->event.pressed) {
264 register_code(KC_RSFT);
265 #ifdef BACKLIGHT_ENABLE
266 backlight_step();
267 #endif
268 } else {
269 unregister_code(KC_RSFT);
270 }
271 return false;
272 break;
273 case PLOVER:
274 if (record->event.pressed) {
275 #ifdef AUDIO_ENABLE
276 stop_all_notes();
277 PLAY_NOTE_ARRAY(tone_plover, false, 0);
278 #endif
279 layer_off(_RAISE);
280 layer_off(_LOWER);
281 layer_off(_ADJUST);
282 layer_on(_PLOVER);
283 if (!eeconfig_is_enabled()) {
284 eeconfig_init();
285 }
286 keymap_config.raw = eeconfig_read_keymap();
287 keymap_config.nkro = 1;
288 eeconfig_update_keymap(keymap_config.raw);
289 }
290 return false;
291 break;
292 case EXT_PLV:
293 if (record->event.pressed) {
294 #ifdef AUDIO_ENABLE
295 PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);
296 #endif
297 layer_off(_PLOVER);
298 }
299 return false;
300 break;
301 }
302 return true;
303}
304
305void matrix_init_user(void) {
306 #ifdef AUDIO_ENABLE
307 startup_user();
308 #endif
309}
310
311#ifdef AUDIO_ENABLE
312
313void startup_user()
314{
315 _delay_ms(20); // gets rid of tick
316 PLAY_NOTE_ARRAY(tone_startup, false, 0);
317}
318
319void shutdown_user()
320{
321 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
322 _delay_ms(150);
323 stop_all_notes();
324}
325
326void music_on_user(void)
327{
328 music_scale_user();
329}
330
331void music_scale_user(void)
332{
333 PLAY_NOTE_ARRAY(music_scale, false, 0);
334}
335
336#endif
diff --git a/keyboards/planck/keymaps/premek/config.h b/keyboards/planck/keymaps/premek/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/planck/keymaps/premek/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/sgoodwin/config.h b/keyboards/planck/keymaps/sgoodwin/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/planck/keymaps/sgoodwin/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/smt/config.h b/keyboards/planck/keymaps/smt/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/planck/keymaps/smt/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/thermal_printer/config.h b/keyboards/planck/keymaps/thermal_printer/config.h
index 430b6493c..bcd098930 100644
--- a/keyboards/planck/keymaps/thermal_printer/config.h
+++ b/keyboards/planck/keymaps/thermal_printer/config.h
@@ -20,4 +20,27 @@
20 sei(); \ 20 sei(); \
21 } while(0) 21 } while(0)
22 22
23/*
24 * MIDI options
25 */
26
27/* Prevent use of disabled MIDI features in the keymap */
28//#define MIDI_ENABLE_STRICT 1
29
30/* enable basic MIDI features:
31 - MIDI notes can be sent when in Music mode is on
32*/
33#define MIDI_BASIC
34
35/* enable advanced MIDI features:
36 - MIDI notes can be added to the keymap
37 - Octave shift and transpose
38 - Virtual sustain, portamento, and modulation wheel
39 - etc.
40*/
41//#define MIDI_ADVANCED
42
43/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
44//#define MIDI_TONE_KEYCODE_OCTAVES 2
45
23 #endif \ No newline at end of file 46 #endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/unicode/config.h b/keyboards/planck/keymaps/unicode/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/planck/keymaps/unicode/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/xyverz/Makefile b/keyboards/planck/keymaps/xyverz/Makefile
new file mode 100644
index 000000000..55bf853a0
--- /dev/null
+++ b/keyboards/planck/keymaps/xyverz/Makefile
@@ -0,0 +1,6 @@
1BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
2AUDIO_ENABLE = no # Audio output on port C6
3
4ifndef QUANTUM_DIR
5 include ../../../../Makefile
6endif
diff --git a/keyboards/planck/keymaps/xyverz/config.h b/keyboards/planck/keymaps/xyverz/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/planck/keymaps/xyverz/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/xyverz/keymap.c b/keyboards/planck/keymaps/xyverz/keymap.c
index 192933b18..329bb043a 100644
--- a/keyboards/planck/keymaps/xyverz/keymap.c
+++ b/keyboards/planck/keymaps/xyverz/keymap.c
@@ -44,14 +44,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
44 * |------+------+------+------+------+------|------+------+------+------+------+------| 44 * |------+------+------+------+------+------|------+------+------+------+------+------|
45 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | 45 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
46 * |------+------+------+------+------+------+------+------+------+------+------+------| 46 * |------+------+------+------+------+------+------+------+------+------+------+------|
47 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | 47 * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter |
48 * `-----------------------------------------------------------------------------------' 48 * `-----------------------------------------------------------------------------------'
49 */ 49 */
50[_QWERTY] = { 50[_QWERTY] = {
51 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, 51 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
52 {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, 52 {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
53 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, 53 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
54 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} 54 {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT }
55}, 55},
56 56
57/* Colemak 57/* Colemak
@@ -62,14 +62,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
62 * |------+------+------+------+------+------|------+------+------+------+------+------| 62 * |------+------+------+------+------+------|------+------+------+------+------+------|
63 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | 63 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
64 * |------+------+------+------+------+------+------+------+------+------+------+------| 64 * |------+------+------+------+------+------+------+------+------+------+------+------|
65 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | 65 * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter |
66 * `-----------------------------------------------------------------------------------' 66 * `-----------------------------------------------------------------------------------'
67 */ 67 */
68[_COLEMAK] = { 68[_COLEMAK] = {
69 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, 69 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
70 {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, 70 {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
71 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, 71 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
72 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} 72 {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT }
73}, 73},
74 74
75/* Dvorak 75/* Dvorak
@@ -86,8 +86,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
86[_DVORAK] = { 86[_DVORAK] = {
87 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, 87 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH},
88 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, 88 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS},
89 {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)}, 89 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT},
90 {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } 90 {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT }
91}, 91},
92 92
93/* Lower 93/* Lower
@@ -128,9 +128,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
128 128
129/* Adjust (Lower + Raise) 129/* Adjust (Lower + Raise)
130 * ,-----------------------------------------------------------------------------------. 130 * ,-----------------------------------------------------------------------------------.
131 * | | Reset| | | | | | | | | | Del | 131 * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 |
132 * |------+------+------+------+------+-------------+------+------+------+------+------| 132 * |------+------+------+------+------+-------------+------+------+------+------+------|
133 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | 133 * | | Reset| |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
134 * |------+------+------+------+------+------|------+------+------+------+------+------| 134 * |------+------+------+------+------+------|------+------+------+------+------+------|
135 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | 135 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
136 * |------+------+------+------+------+------+------+------+------+------+------+------| 136 * |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -138,8 +138,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
138 * `-----------------------------------------------------------------------------------' 138 * `-----------------------------------------------------------------------------------'
139 */ 139 */
140[_ADJUST] = { 140[_ADJUST] = {
141 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, 141 {KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 },
142 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, 142 {_______, RESET, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______},
143 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, 143 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
144 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 144 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
145} 145}
diff --git a/keyboards/planck/keymaps/zach/Makefile b/keyboards/planck/keymaps/zach/Makefile
new file mode 100644
index 000000000..9d86fc81f
--- /dev/null
+++ b/keyboards/planck/keymaps/zach/Makefile
@@ -0,0 +1,29 @@
1# Zach Planck Makefile
2# Max .hex size is about 28636 bytes
3
4# Build Options
5# change to "no" to disable the options, or define them in the Makefile in
6# the appropriate keymap folder that will get included automatically
7#
8TAP_DANCE_ENABLE = yes # Enable TapDance functionality
9BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
10MOUSEKEY_ENABLE = no # Mouse keys(+4700)
11EXTRAKEY_ENABLE = no # Audio control and System control(+450)
12CONSOLE_ENABLE = no # Console for debug(+400)
13COMMAND_ENABLE = no # Commands for debug and configuration
14NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
15USB_6KRO_ENABLE = no # 6key Rollover
16BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
17MIDI_ENABLE = no # MIDI controls
18AUDIO_ENABLE = no # Audio output on port C6
19#VARIABLE_TRACE = no # Debug changes to variable values
20UNICODE_ENABLE = no # Unicode (can't be used with unicodemap)
21UNICODEMAP_ENABLE = yes # Enable extended unicode
22BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
23RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
24# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
25SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
26
27ifndef QUANTUM_DIR
28 include ../../../../Makefile
29endif
diff --git a/keyboards/planck/keymaps/zach/config.h b/keyboards/planck/keymaps/zach/config.h
new file mode 100644
index 000000000..d309c9493
--- /dev/null
+++ b/keyboards/planck/keymaps/zach/config.h
@@ -0,0 +1,94 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define MANUFACTURER Ortholinear Keyboards
27#define PRODUCT The Planck Keyboard
28#define DESCRIPTION A compact ortholinear keyboard
29
30/* key matrix size */
31#define MATRIX_ROWS 4
32#define MATRIX_COLS 12
33
34/* Planck PCB default pin-out */
35#define MATRIX_ROW_PINS { D0, D5, B5, B6 }
36#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
37#define UNUSED_PINS
38
39#define BACKLIGHT_PIN B7
40
41/* COL2ROW or ROW2COL */
42#define DIODE_DIRECTION COL2ROW
43
44/* define if matrix has ghost */
45//#define MATRIX_HAS_GHOST
46
47//#define BACKLIGHT_BREATHING // LED breathing
48/* number of backlight levels */
49#define BACKLIGHT_LEVELS 5
50
51/* Set 0 if debouncing isn't needed */
52#define DEBOUNCING_DELAY 5
53
54/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
55//#define LOCKING_SUPPORT_ENABLE
56#undef LOCKING_SUPPORT_ENABLE
57/* Locking resynchronize hack */
58//#define LOCKING_RESYNC_ENABLE
59#undef LOCKING_RESYNC_ENABLE
60
61/* key combination for command */
62#define IS_COMMAND() ( \
63 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
64)
65
66/*
67 * Feature disable options
68 * These options are also useful to firmware size reduction.
69 */
70
71/* disable debug print */
72//#define NO_DEBUG
73/* disable print */
74//#define NO_PRINT
75#undef NO_PRINT
76
77/* disable action features */
78//#define NO_ACTION_LAYER
79#define NO_ACTION_TAPPING
80//#define NO_ACTION_ONESHOT
81#define NO_ACTION_MACRO
82#define NO_ACTION_FUNCTION
83#define PREVENT_STUCK_MODIFIERS
84//#define DYNAMIC_MACRO_ENABLE // Enable if you need to use the macro functionality
85//#define SPACE_CADET // Parenthesis on L/R shift
86
87#ifdef SUBPROJECT_rev3
88 #include "rev3/config.h"
89#endif
90#ifdef SUBPROJECT_rev4
91 #include "rev4/config.h"
92#endif
93
94#endif
diff --git a/keyboards/planck/keymaps/zach/keymap.c b/keyboards/planck/keymaps/zach/keymap.c
new file mode 100644
index 000000000..710477df5
--- /dev/null
+++ b/keyboards/planck/keymaps/zach/keymap.c
@@ -0,0 +1,48 @@
1// Zach Nielsen Custom Planck Keyboard layout
2#include "planck.h"
3#define PLANCK_YES // This is the Planck
4#include "zach_common_functions.c"
5
6const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
7[_COLEMAK] = { /* Base Layer */
8 {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC},
9 {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT},
10 {SHFT_CAP,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
11 {CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
12},
13
14[_SWCOLE] = { /* Software Colemak */
15 {_______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______},
16 {_______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______},
17 {_______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______},
18 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
19},
20
21[_RAISE] = { /* RAISE - Numpad and Unicode symbols */
22 {KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______},
23 {KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, PENGY, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR},
24 {_______, KC_COLN, TFLIP, LAROW, RAROW, DUCK, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS},
25 {_______, KC_PIPE, TPUT, _______, _______, KC_TAB, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL}
26},
27
28[_LOWER] = { /* LOWER - Symbols, Paging, CtrAltDel */
29 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL},
30 {KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP},
31 {CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN},
32 {_______, _______, _______, _______, _______, KC_TAB, KC_TAB, _______, _______, _______, _______, _______}
33},
34
35[_ADJUST] = { /* ADJUST - Macros, Layer Switching, Function Keys */
36 {UNIWIN, XXXXXXX, XXXXXXX, PENGY, DUCK, KC_INS, KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX},
37 {UNILIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX},
38 {_______, CADKEY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX},
39 {_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
40},
41
42[_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */
43 {_______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______},
44 {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______},
45 {XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX},
46 {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______}
47}
48};
diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c
new file mode 100644
index 000000000..2c47b2289
--- /dev/null
+++ b/keyboards/planck/keymaps/zach/zach_common_functions.c
@@ -0,0 +1,447 @@
1#ifndef ZACH_COMMON_FUNCTIONS
2#define ZACH_COMMON_FUNCTIONS
3#include "eeconfig.h"
4#include "action_layer.h"
5#include "keymap_colemak.h"
6extern keymap_config_t keymap_config;
7
8// Fillers to make layering more clear
9#define _______ KC_TRNS
10#define XXXXXXX KC_NO
11#define C(n) RCTL(n)
12#define CADKEY RCTL(RALT(KC_DEL))
13
14void tap(uint16_t keycode){
15 register_code(keycode);
16 unregister_code(keycode);
17};
18
19void persistant_default_layer_set(uint16_t default_layer){
20 eeconfig_update_default_layer(default_layer);
21 default_layer_set(default_layer);
22};
23
24// Automatic number generation of important keywords
25enum my_keycodes{
26 // Layer numbers
27 _COLEMAK = 0,
28 _SWCOLE,
29 _RAISE,
30 _LOWER,
31 _ADJUST,
32 _UNICODES,
33 // These use process_record_user()
34 COLEMAK = SAFE_RANGE,
35 SWCOLE,
36 LOWER,
37 RAISE,
38 SHFT_CAP,
39 CTRLB,
40 CPYPST,
41 FACE,
42 UNIWIN,
43 UNILIN,
44 DISFACE,
45 TFLIP,
46 TPUT,
47 SHRUG,
48 RANDIG,
49 // Tap_Dance nums
50 RAI = 0,
51 LOW,
52 SUP
53};
54
55#ifdef AUDIO_ENABLE
56#include "audio.h"
57float tone_startup[][2] = SONG(STARTUP_SOUND);
58float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
59float tone_colemak[][2] = SONG(COLEMAK_SOUND);
60float tone_swcole[][2] = SONG(QWERTY_SOUND);
61float tone_capslock_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
62float tone_capslock_off[][2] = SONG(CAPS_LOCK_OFF_SOUND);
63float tone_ctrl_mod[][2] = SONG(COIN_SOUND);
64float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND);
65float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
66float uniwin[][2] = SONG(UNICODE_WINDOWS);
67float unilin[][2] = SONG(UNICODE_LINUX);
68#endif
69
70#ifdef TAP_DANCE_ENABLE
71#define TAPPING_TERM 200
72
73void dance_raise_press(qk_tap_dance_state_t *state, void *user_data){// Called on each tap
74 switch(state->count){ // Only turn the layer on once
75 case 1:
76 layer_off(_UNICODES);
77 layer_on(_RAISE);
78 update_tri_layer(_LOWER, _RAISE, _ADJUST);
79 break;
80 }
81};
82void dance_raise_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release
83 switch(state->count){
84 case 1: // Normal action. Turn off layers
85 layer_off(_RAISE);
86 update_tri_layer(_LOWER, _RAISE, _ADJUST);
87 layer_off(_UNICODES);
88 break;
89 }
90};
91/////////////////////////////////////////////////////////////////////
92void dance_lower_press(qk_tap_dance_state_t *state, void *user_data){// Called on tap
93 switch(state->count){
94 case 1: // Turn on lower
95 layer_off(_UNICODES);
96 layer_on(_LOWER);
97 update_tri_layer(_LOWER, _RAISE, _ADJUST);
98 break;
99 }
100};
101void dance_lower_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release
102 switch(state->count){
103 case 1: // Normal action. Turn off layers
104 layer_off(_LOWER);
105 update_tri_layer(_LOWER, _RAISE, _ADJUST);
106 layer_off(_UNICODES);
107 break;
108 case 2: // Turn on _UNICODES layer
109 layer_off(_LOWER);
110 update_tri_layer(_LOWER, _RAISE, _ADJUST);
111 layer_on(_UNICODES);
112 #ifdef AUDIO_ENABLE
113 PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0);
114 #endif
115 break;
116 }
117};
118/////////////////////////////////////////////////////////////////////
119void dance_super_press(qk_tap_dance_state_t *state, void *user_data){ // Called on down
120 if(state->count == 1){
121 register_code(KC_LGUI);
122 }
123}
124void dance_super_done(qk_tap_dance_state_t *state, void *user_data){ // Called on timeout
125 switch(state->count){
126 case 2:
127 register_code(KC_LGUI);
128 tap(KC_L);
129 unregister_code(KC_LGUI);
130 break;
131 }
132}
133void dance_super_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on up
134 unregister_code(KC_LGUI);
135}
136
137qk_tap_dance_action_t tap_dance_actions[] = {
138 [RAI] = ACTION_TAP_DANCE_FN_ADVANCED(dance_raise_press, NULL, dance_raise_lift),
139 [LOW] = ACTION_TAP_DANCE_FN_ADVANCED(dance_lower_press, NULL, dance_lower_lift),
140 [SUP] = ACTION_TAP_DANCE_FN_ADVANCED(dance_super_press, dance_super_done, dance_super_lift)
141};
142#endif
143
144//#ifdef UNICODE_ENABLE
145// Unicode shortcuts
146#define IBANG X(0x203D)
147#define RAROW X(0x2192)
148#define LAROW X(0x2190)
149#define DEGREE X(0x00B0)
150#define OMEGA X(0x03A9)
151#define WOMEGA X(0x03C9)
152#define MICRO X(0x00B5)
153#define PLUMIN X(0x00B1)
154#define SUPA2 X(0x00B2)
155#define ROMAN1 X(0x2160)
156#define ROMAN2 X(0x2161)
157#define ROMAN3 X(0x2162)
158#define ROMAN4 X(0x2163)
159#define ROMAN5 X(0x2164)
160#define ROMAN6 X(0x2165)
161#define ROMAN7 X(0x2166)
162#define roman1 X(0x2170)
163#define roman2 X(0x2171)
164#define roman3 X(0x2172)
165#define roman4 X(0x2173)
166#define roman5 X(0x2174)
167#define roman6 X(0x2175)
168#define roman7 X(0x2176)
169
170#ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X(<unicode>)
171enum Ext_Unicode{
172 PENGUIN = 0,
173 BOAR,
174 MONKEY,
175 DRAGON,
176 CHICK,
177 TUMBLER
178};
179const uint32_t PROGMEM unicode_map[] = {
180 [PENGUIN] = 0x1F427,
181 [BOAR] = 0x1F417,
182 [MONKEY] = 0x1F412,
183 [DRAGON] = 0x1F409,
184 [CHICK] = 0x1F425,
185 [TUMBLER] = 0x1F943
186};
187#define PENGY X(PENGUIN)
188#define BOARY X(BOAR)
189#define MNKY X(MONKEY)
190#define DRGN X(DRAGON)
191#define DUCK X(CHICK)
192#define TMBL X(TUMBLER)
193#endif
194
195//#endif
196
197static uint16_t key_timer;
198static uint8_t caps_status = 0;
199bool process_record_user(uint16_t keycode, keyrecord_t *record) {
200 switch (keycode) {
201 case COLEMAK:
202 if(record->event.pressed){
203 persistant_default_layer_set(1UL<<_COLEMAK);
204 #ifdef AUDIO_ENABLE
205 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
206 #endif
207 }
208 return false;
209 break;
210 case SWCOLE:
211 if(record->event.pressed){
212 persistant_default_layer_set(1UL<<_SWCOLE);
213 #ifdef AUDIO_ENABLE
214 PLAY_NOTE_ARRAY(tone_swcole, false, 0);
215 #endif
216 }
217 return false;
218 break;
219 case RAISE:
220 if(record->event.pressed){
221 layer_on(_RAISE);
222 update_tri_layer(_LOWER, _RAISE, _ADJUST);
223 } else {
224 layer_off(_RAISE);
225 update_tri_layer(_LOWER, _RAISE, _ADJUST);
226 }
227 return false;
228 break;
229 case LOWER:
230 if(record->event.pressed){
231 layer_on(_LOWER);
232 update_tri_layer(_LOWER, _RAISE, _ADJUST);
233 } else {
234 layer_off(_LOWER);
235 update_tri_layer(_LOWER, _RAISE, _ADJUST);
236 }
237 return false;
238 break;
239 case SHFT_CAP:
240 if(record->event.pressed){
241 key_timer = timer_read(); // if the key is being pressed, we start the timer.
242 register_code(KC_LSHIFT);
243 } else { // this means the key was just released (tap or "held down")
244 if(timer_elapsed(key_timer) < 152){ // Time in ms, the threshold we pick for counting something as a tap.
245 tap(KC_CAPS);
246 if(caps_status == 0){
247 caps_status = 1;
248 #ifdef AUDIO_ENABLE
249 PLAY_NOTE_ARRAY(tone_capslock_on, false, 0);
250 #endif
251 } else {
252 caps_status = 0;
253 #ifdef AUDIO_ENABLE
254 PLAY_NOTE_ARRAY(tone_capslock_off, false, 0);
255 #endif
256 }
257 }
258 unregister_code(KC_LSHIFT);
259 }
260 return false;
261 break;
262 case CTRLB: // Control-B on tap (bold)
263 if(record->event.pressed){
264 key_timer = timer_read(); // if the key is being pressed, we start the timer.
265 register_code(KC_LCTL);
266 } else { // this means the key was just released (tap or "held down")
267 if (timer_elapsed(key_timer) < 152) { // Time in ms, the threshold we pick for counting something as a tap.
268 tap(KC_B);
269 #ifdef AUDIO_ENABLE
270 PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0);
271 #endif
272 #ifdef BACKLIGHT_BREATHING
273 breathing_speed_set(2);
274 breathing_pulse();
275 #endif
276 }
277 unregister_code(KC_LCTL);
278 }
279 return false;
280 break;
281 case CPYPST: // One key copy/paste
282 if(record->event.pressed){
283 key_timer = timer_read();
284 } else {
285 if (timer_elapsed(key_timer) > 152) { // Hold, copy
286 register_code(KC_LCTL);
287 tap(KC_C);
288 unregister_code(KC_LCTL);
289 #ifdef AUDIO_ENABLE
290 PLAY_NOTE_ARRAY(tone_copy, false, 0);
291 #endif
292 } else { // Tap, paste
293 register_code(KC_LCTL);
294 tap(KC_V);
295 unregister_code(KC_LCTL);
296 #ifdef AUDIO_ENABLE
297 PLAY_NOTE_ARRAY(tone_paste, false, 0);
298 #endif
299 }
300 }
301 return false;
302 break;
303 #ifdef UNICODE_ENABLE
304 case UNIWIN:
305 if(record->event.pressed){
306 set_unicode_input_mode(UC_WIN);
307 #ifdef AUDIO_ENABLE
308 PLAY_NOTE_ARRAY(uniwin, false, 0);
309 #endif
310 }
311 return false;
312 break;
313 case UNILIN:
314 if(record->event.pressed){
315 set_unicode_input_mode(UC_LNX);
316 #ifdef AUDIO_ENABLE
317 PLAY_NOTE_ARRAY(unilin, false, 0);
318 #endif
319 }
320 return false;
321 break;
322 case DISFACE: // ಠ_ಠ
323 if(record->event.pressed){
324 process_unicode((0x0CA0|QK_UNICODE), record); // Eye
325 register_code(KC_RSFT);
326 tap(KC_MINS);
327 unregister_code(KC_RSFT);
328 process_unicode((0x0CA0|QK_UNICODE), record); // Eye
329 }
330 return false;
331 break;
332 case TFLIP: // (╯°□°)╯ ︵ ┻━┻
333 if(record->event.pressed){
334 register_code(KC_RSFT);
335 tap(KC_9);
336 unregister_code(KC_RSFT);
337 process_unicode((0x256F|QK_UNICODE), record); // Arm
338 process_unicode((0x00B0|QK_UNICODE), record); // Eye
339 process_unicode((0x25A1|QK_UNICODE), record); // Mouth
340 process_unicode((0x00B0|QK_UNICODE), record); // Eye
341 register_code(KC_RSFT);
342 tap(KC_0);
343 unregister_code(KC_RSFT);
344 process_unicode((0x256F|QK_UNICODE), record); // Arm
345 tap(KC_SPC);
346 process_unicode((0x0361|QK_UNICODE), record); // Flippy
347 tap(KC_SPC);
348 process_unicode((0x253B|QK_UNICODE), record); // Table
349 process_unicode((0x2501|QK_UNICODE), record); // Table
350 process_unicode((0x253B|QK_UNICODE), record); // Table
351 }
352 return false;
353 break;
354 case TPUT: // ┬──┬ ノ( ゜-゜ノ)
355 if(record->event.pressed){
356 process_unicode((0x252C|QK_UNICODE), record); // Table
357 process_unicode((0x2500|QK_UNICODE), record); // Table
358 process_unicode((0x2500|QK_UNICODE), record); // Table
359 process_unicode((0x252C|QK_UNICODE), record); // Table
360 tap(KC_SPC);
361 process_unicode((0x30CE|QK_UNICODE), record); // Arm
362 register_code(KC_RSFT);
363 tap(KC_9);
364 unregister_code(KC_RSFT);
365 tap(KC_SPC);
366 process_unicode((0x309C|QK_UNICODE), record); // Eye
367 tap(KC_MINS);
368 process_unicode((0x309C|QK_UNICODE), record); // Eye
369 process_unicode((0x30CE|QK_UNICODE), record); // Arm
370 register_code(KC_RSFT);
371 tap(KC_0);
372 unregister_code(KC_RSFT);
373 }
374 return false;
375 break;
376 case SHRUG: // ¯\_(ツ)_/¯
377 if(record->event.pressed){
378 process_unicode((0x00AF|QK_UNICODE), record); // Hand
379 tap(KC_BSLS); // Arm
380 register_code(KC_RSFT);
381 tap(KC_UNDS); // Arm
382 tap(KC_LPRN); // Head
383 unregister_code(KC_RSFT);
384 process_unicode((0x30C4|QK_UNICODE), record); // Face
385 register_code(KC_RSFT);
386 tap(KC_RPRN); // Head
387 tap(KC_UNDS); // Arm
388 unregister_code(KC_RSFT);
389 tap(KC_SLSH); // Arm
390 process_unicode((0x00AF|QK_UNICODE), record); // Hand
391 }
392 return false;
393 break;
394 #endif
395 case FACE: // (o_O)
396 if(record->event.pressed){
397 register_code(KC_RSFT);
398 tap(KC_LPRN);
399 unregister_code(KC_RSFT);
400 tap(KC_O);
401 register_code(KC_RSFT);
402 tap(KC_UNDS);
403 tap(KC_O);
404 tap(KC_RPRN);
405 unregister_code(KC_RSFT);
406 }
407 return false;
408 break;
409 case RANDIG:
410 if (record->event.pressed) {
411 tap_random_base64();
412 }
413 return false;
414 break;
415 }
416 return true;
417};
418
419void matrix_init_user(void){ // Run once at startup
420 #ifdef AUDIO_ENABLE
421 _delay_ms(50); // gets rid of tick
422 PLAY_NOTE_ARRAY(tone_startup, false, 0);
423 #endif
424}
425
426#ifdef AUDIO_ENABLE
427void play_goodbye_tone(void){
428 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
429 _delay_ms(150);
430}
431
432void shutdown_user(){
433 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
434 _delay_ms(150);
435 stop_all_notes();
436}
437
438void music_on_user(void){ // Run when the music layer is turned on
439 PLAY_NOTE_ARRAY(tone_startup, false, 0);
440}
441
442void music_off_user(void){ // Run when music is turned off
443 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
444}
445#endif
446
447#endif
diff --git a/keyboards/preonic/keymaps/CMD-Preonic/config.h b/keyboards/preonic/keymaps/CMD-Preonic/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/preonic/keymaps/CMD-Preonic/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/default/config.h b/keyboards/preonic/keymaps/default/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/preonic/keymaps/default/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/smt/config.h b/keyboards/preonic/keymaps/smt/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/preonic/keymaps/smt/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/xyverz/Makefile b/keyboards/preonic/keymaps/xyverz/Makefile
new file mode 100644
index 000000000..ea5f6c164
--- /dev/null
+++ b/keyboards/preonic/keymaps/xyverz/Makefile
@@ -0,0 +1,23 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = no # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = no # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17
18# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
19SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
20
21ifndef QUANTUM_DIR
22 include ../../../../Makefile
23endif \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/xyverz/config.h b/keyboards/preonic/keymaps/xyverz/config.h
new file mode 100644
index 000000000..4e12921fe
--- /dev/null
+++ b/keyboards/preonic/keymaps/xyverz/config.h
@@ -0,0 +1,21 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6// Number of backlight levels
7#undef BACKLIGHT_LEVELS
8#define BACKLIGHT_LEVELS 3
9
10/* ws2812 RGB LED */
11#undef RGB_DI_PIN
12#define RGB_DI_PIN B3
13#undef RGBLED_NUM
14#define RGBLIGHT_ANIMATIONS
15#define RGBLED_NUM 11 // Number of LEDs
16#define RGBLIGHT_HUE_STEP 10
17#define RGBLIGHT_SAT_STEP 17
18#define RGBLIGHT_VAL_STEP 17
19
20
21#endif \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/xyverz/keymap.c b/keyboards/preonic/keymaps/xyverz/keymap.c
index adc7392e5..c8457cda1 100644
--- a/keyboards/preonic/keymaps/xyverz/keymap.c
+++ b/keyboards/preonic/keymaps/xyverz/keymap.c
@@ -14,22 +14,16 @@
14#define _DVORAK 2 14#define _DVORAK 2
15#define _LOWER 3 15#define _LOWER 3
16#define _RAISE 4 16#define _RAISE 4
17#define _MUSIC 5
18#define _ADJUST 16 17#define _ADJUST 16
19 18
20// Macro name shortcuts 19enum preonic_keycodes {
21#define QWERTY M(_QWERTY) 20 QWERTY = SAFE_RANGE,
22#define COLEMAK M(_COLEMAK) 21 COLEMAK,
23#define DVORAK M(_DVORAK) 22 DVORAK,
24#define LOWER M(_LOWER) 23 LOWER,
25#define RAISE M(_RAISE) 24 RAISE,
26#define M_BL 5 25 BACKLIT
27#define AUD_OFF M(6) 26};
28#define AUD_ON M(7)
29#define MUS_OFF M(8)
30#define MUS_ON M(9)
31#define VC_IN M(10)
32#define VC_DE M(11)
33 27
34// Fillers to make layering more clear 28// Fillers to make layering more clear
35#define _______ KC_TRNS 29#define _______ KC_TRNS
@@ -47,41 +41,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
47 * |------+------+------+------+------+------|------+------+------+------+------+------| 41 * |------+------+------+------+------+------|------+------+------+------+------+------|
48 * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| 42 * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift|
49 * |------+------+------+------+------+------+------+------+------+------+------+------| 43 * |------+------+------+------+------+------+------+------+------+------+------+------|
50 * | Ctrl | Alt | Left |Right |Lower | Space |Raise | Up | Down | GUI |Enter | 44 * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter |
51 * `-----------------------------------------------------------------------------------' 45 * `-----------------------------------------------------------------------------------'
52 */ 46 */
53[_QWERTY] = { 47[_QWERTY] = {
54 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, 48 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
55 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, 49 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL },
56 {KC_MINS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, 50 {KC_MINS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
57 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, 51 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
58 {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_SPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } 52 {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT }
59}, 53},
60 54
61/* Colemak 55/* Colemak
62 * ,-----------------------------------------------------------------------------------. 56 * ,-----------------------------------------------------------------------------------.
63 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | 57 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
64 * |------+------+------+------+------+------+------+------+------+------+------+------| 58 * |------+------+------+------+------+------+------+------+------+------+------+------|
65 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | 59 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
66 * |------+------+------+------+------+-------------+------+------+------+------+------| 60 * |------+------+------+------+------+-------------+------+------+------+------+------|
67 * | Esc | A | R | S | T | D | H | N | E | I | O | " | 61 * | Bksp | A | R | S | T | D | H | N | E | I | O | " |
68 * |------+------+------+------+------+------|------+------+------+------+------+------| 62 * |------+------+------+------+------+------|------+------+------+------+------+------|
69 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | 63 * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
70 * |------+------+------+------+------+------+------+------+------+------+------+------| 64 * |------+------+------+------+------+------+------+------+------+------+------+------|
71 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | 65 * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter |
72 * `-----------------------------------------------------------------------------------' 66 * `-----------------------------------------------------------------------------------'
73 */ 67 */
74[_COLEMAK] = { 68[_COLEMAK] = {
75 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, 69 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
76 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL}, 70 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL },
77 {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, 71 {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
78 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, 72 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
79 {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} 73 {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT }
80}, 74},
81 75
82/* Dvorak 76/* Dvorak
83 * ,-----------------------------------------------------------------------------------. 77 * ,-----------------------------------------------------------------------------------.
84 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | 78 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
85 * |------+------+------+------+------+------+------+------+------+------+------+------| 79 * |------+------+------+------+------+------+------+------+------+------+------+------|
86 * | Tab | " | , | . | P | Y | F | G | C | R | L | / | 80 * | Tab | " | , | . | P | Y | F | G | C | R | L | / |
87 * |------+------+------+------+------+-------------+------+------+------+------+------| 81 * |------+------+------+------+------+-------------+------+------+------+------+------|
@@ -89,112 +83,98 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
89 * |------+------+------+------+------+------|------+------+------+------+------+------| 83 * |------+------+------+------+------+------|------+------+------+------+------+------|
90 * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| 84 * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift|
91 * |------+------+------+------+------+------+------+------+------+------+------+------| 85 * |------+------+------+------+------+------+------+------+------+------+------+------|
92 * | Ctrl | Alt | Left |Right |Lower | Space |Raise | Up | Down | GUI |Enter | 86 * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter |
93 * `-----------------------------------------------------------------------------------' 87 * `-----------------------------------------------------------------------------------'
94 */ 88 */
95[_DVORAK] = { 89[_DVORAK] = {
96 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, 90 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS},
97 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, 91 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH},
98 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, 92 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS},
99 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT}, 93 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT},
100 {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_SPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } 94 {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT }
101}, 95},
102 96
103/* Lower 97/* Lower
104 * ,-----------------------------------------------------------------------------------. 98 * ,-----------------------------------------------------------------------------------.
105 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | 99 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
106 * |------+------+------+------+------+-------------+------+------+------+------+------| 100 * |------+------+------+------+------+-------------+------+------+------+------+------|
107 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | 101 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | |
108 * |------+------+------+------+------+-------------+------+------+------+------+------| 102 * |------+------+------+------+------+-------------+------+------+------+------+------|
109 * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | 103 * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | |
110 * |------+------+------+------+------+------|------+------+------+------+------+------| 104 * |------+------+------+------+------+------|------+------+------+------+------+------|
111 * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | 105 * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | |
112 * |------+------+------+------+------+------+------+------+------+------+------+------| 106 * |------+------+------+------+------+------+------+------+------+------+------+------|
113 * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | 107 * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter |
114 * `-----------------------------------------------------------------------------------' 108 * `-----------------------------------------------------------------------------------'
115 */ 109 */
116[_LOWER] = { 110[_LOWER] = {
117 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, 111 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
118 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, 112 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE},
119 {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, 113 {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______},
120 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, 114 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______},
121 {M(M_BL), _______, KC_HOME, KC_END, _______, KC_INS, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} 115 {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______}
122}, 116},
123 117
124/* Raise 118/* Raise
125 * ,-----------------------------------------------------------------------------------. 119 * ,-----------------------------------------------------------------------------------.
126 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | 120 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
127 * |------+------+------+------+------+------+------+------+------+------+------+------| 121 * |------+------+------+------+------+------+------+------+------+------+------+------|
128 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | 122 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | \ |
129 * |------+------+------+------+------+-------------+------+------+------+------+------| 123 * |------+------+------+------+------+-------------+------+------+------+------+------|
130 * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | 124 * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | |
131 * |------+------+------+------+------+------|------+------+------+------+------+------| 125 * |------+------+------+------+------+------|------+------+------+------+------+------|
132 * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | 126 * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | |
133 * |------+------+------+------+------+------+------+------+------+------+------+------| 127 * |------+------+------+------+------+------+------+------+------+------+------+------|
134 * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | 128 * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter |
135 * `-----------------------------------------------------------------------------------' 129 * `-----------------------------------------------------------------------------------'
136 */ 130 */
137[_RAISE] = { 131[_RAISE] = {
138 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, 132 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
139 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, 133 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSLS},
140 {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, 134 {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______},
141 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______}, 135 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______},
142 {M(M_BL), _______, KC_HOME, KC_END, _______, KC_INS, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} 136 {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______}
143},
144
145/* Music (reserved for process_action_user)
146 *
147 */
148[_MUSIC] = {
149 {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
150 {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
151 {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
152 {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
153 {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
154}, 137},
155 138
156/* Adjust (Lower + Raise) 139/* Adjust (Lower + Raise)
157 * ,-----------------------------------------------------------------------------------. 140 * ,-----------------------------------------------------------------------------------.
158 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | 141 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
159 * |------+------+------+------+------+------+------+------+------+------+------+------| 142 * |------+------+------+------+------+------+------+------+------+------+------+------|
160 * | | Reset| | | | | | | | | | Del | 143 * | | Reset| | | | | | | | | | |
161 * |------+------+------+------+------+-------------+------+------+------+------+------| 144 * |------+------+------+------+------+-------------+------+------+------+------+------|
162 * | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | 145 * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
163 * |------+------+------+------+------+------|------+------+------+------+------+------| 146 * |------+------+------+------+------+------|------+------+------+------+------+------|
164 * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | 147 * | |RGB ON| MODE | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | | | |
165 * |------+------+------+------+------+------+------+------+------+------+------+------| 148 * |------+------+------+------+------+------+------+------+------+------+------+------|
166 * | | | | | | | | | | | | 149 * | | | | | | | | | | | |
167 * `-----------------------------------------------------------------------------------' 150 * `-----------------------------------------------------------------------------------'
168 */ 151 */
169[_ADJUST] = { 152[_ADJUST] = {
170 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, 153 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
171 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, 154 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
172 {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, 155 {_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______},
173 {_______, VC_DE, VC_IN, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, 156 {_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______},
174 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 157 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
175} 158}
176 159
177 160
178}; 161};
179 162
180const uint16_t PROGMEM fn_actions[] = {
181
182};
183
184#ifdef AUDIO_ENABLE 163#ifdef AUDIO_ENABLE
185float start_up[][2] = { 164float tone_startup[][2] = {
186 {440.0*pow(2.0,(14)/12.0), 20}, 165 {NOTE_B5, 20},
187 {440.0*pow(2.0,(26)/12.0), 8}, 166 {NOTE_B6, 8},
188 {440.0*pow(2.0,(18)/12.0), 20}, 167 {NOTE_DS6, 20},
189 {440.0*pow(2.0,(26)/12.0), 8} 168 {NOTE_B6, 8}
190}; 169};
191 170
192float tone_qwerty[][2] = SONG(QWERTY_SOUND); 171float tone_qwerty[][2] = SONG(QWERTY_SOUND);
193float tone_dvorak[][2] = SONG(DVORAK_SOUND); 172float tone_dvorak[][2] = SONG(DVORAK_SOUND);
194float tone_colemak[][2] = SONG(COLEMAK_SOUND); 173float tone_colemak[][2] = SONG(COLEMAK_SOUND);
195 174
196float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); 175float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
197float goodbye[][2] = SONG(GOODBYE_SOUND); 176
177float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
198#endif 178#endif
199 179
200void persistant_default_layer_set(uint16_t default_layer) { 180void persistant_default_layer_set(uint16_t default_layer) {
@@ -202,34 +182,36 @@ void persistant_default_layer_set(uint16_t default_layer) {
202 default_layer_set(default_layer); 182 default_layer_set(default_layer);
203} 183}
204 184
205const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) 185bool process_record_user(uint16_t keycode, keyrecord_t *record) {
206{ 186 switch (keycode) {
207 switch(id) { 187 case QWERTY:
208 case _QWERTY:
209 if (record->event.pressed) { 188 if (record->event.pressed) {
210 #ifdef AUDIO_ENABLE 189 #ifdef AUDIO_ENABLE
211 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 190 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
212 #endif 191 #endif
213 persistant_default_layer_set(1UL<<_QWERTY); 192 persistant_default_layer_set(1UL<<_QWERTY);
214 } 193 }
194 return false;
215 break; 195 break;
216 case _COLEMAK: 196 case COLEMAK:
217 if (record->event.pressed) { 197 if (record->event.pressed) {
218 #ifdef AUDIO_ENABLE 198 #ifdef AUDIO_ENABLE
219 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 199 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
220 #endif 200 #endif
221 persistant_default_layer_set(1UL<<_COLEMAK); 201 persistant_default_layer_set(1UL<<_COLEMAK);
222 } 202 }
203 return false;
223 break; 204 break;
224 case _DVORAK: 205 case DVORAK:
225 if (record->event.pressed) { 206 if (record->event.pressed) {
226 #ifdef AUDIO_ENABLE 207 #ifdef AUDIO_ENABLE
227 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 208 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
228 #endif 209 #endif
229 persistant_default_layer_set(1UL<<_DVORAK); 210 persistant_default_layer_set(1UL<<_DVORAK);
230 } 211 }
212 return false;
231 break; 213 break;
232 case _LOWER: 214 case LOWER:
233 if (record->event.pressed) { 215 if (record->event.pressed) {
234 layer_on(_LOWER); 216 layer_on(_LOWER);
235 update_tri_layer(_LOWER, _RAISE, _ADJUST); 217 update_tri_layer(_LOWER, _RAISE, _ADJUST);
@@ -237,8 +219,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
237 layer_off(_LOWER); 219 layer_off(_LOWER);
238 update_tri_layer(_LOWER, _RAISE, _ADJUST); 220 update_tri_layer(_LOWER, _RAISE, _ADJUST);
239 } 221 }
222 return false;
240 break; 223 break;
241 case _RAISE: 224 case RAISE:
242 if (record->event.pressed) { 225 if (record->event.pressed) {
243 layer_on(_RAISE); 226 layer_on(_RAISE);
244 update_tri_layer(_LOWER, _RAISE, _ADJUST); 227 update_tri_layer(_LOWER, _RAISE, _ADJUST);
@@ -246,8 +229,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
246 layer_off(_RAISE); 229 layer_off(_RAISE);
247 update_tri_layer(_LOWER, _RAISE, _ADJUST); 230 update_tri_layer(_LOWER, _RAISE, _ADJUST);
248 } 231 }
232 return false;
249 break; 233 break;
250 case M_BL: 234 case BACKLIT:
251 if (record->event.pressed) { 235 if (record->event.pressed) {
252 register_code(KC_RSFT); 236 register_code(KC_RSFT);
253 #ifdef BACKLIGHT_ENABLE 237 #ifdef BACKLIGHT_ENABLE
@@ -256,87 +240,41 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
256 } else { 240 } else {
257 unregister_code(KC_RSFT); 241 unregister_code(KC_RSFT);
258 } 242 }
259 break; 243 return false;
260 case 6: 244 break;
261 if (record->event.pressed) {
262 #ifdef AUDIO_ENABLE
263 audio_off();
264 #endif
265 }
266 break;
267 case 7:
268 if (record->event.pressed) {
269 #ifdef AUDIO_ENABLE
270 audio_on();
271 PLAY_NOTE_ARRAY(start_up, false, 0);
272 #endif
273 }
274 break;
275 case 8:
276 if (record->event.pressed) {
277 #ifdef AUDIO_ENABLE
278 layer_off(_MUSIC);
279 stop_all_notes();
280 #endif
281 }
282 break;
283 case 9:
284 if (record->event.pressed) {
285 #ifdef AUDIO_ENABLE
286 PLAY_NOTE_ARRAY(music_scale, false, 0);
287 layer_on(_MUSIC);
288 #endif
289 }
290 break;
291 case 10:
292 if (record->event.pressed) {
293 #ifdef AUDIO_ENABLE
294 voice_iterate();
295 PLAY_NOTE_ARRAY(music_scale, false, 0);
296 #endif
297 }
298 break;
299 case 11:
300 if (record->event.pressed) {
301 #ifdef AUDIO_ENABLE
302 voice_deiterate();
303 PLAY_NOTE_ARRAY(music_scale, false, 0);
304 #endif
305 }
306 break;
307 } 245 }
308 return MACRO_NONE; 246 return true;
309}; 247};
310 248
311
312void matrix_init_user(void) { 249void matrix_init_user(void) {
313 #ifdef AUDIO_ENABLE 250 #ifdef AUDIO_ENABLE
314 _delay_ms(20); // gets rid of tick 251 startup_user();
315 PLAY_NOTE_ARRAY(start_up, false, 0); 252 #endif
316 #endif
317} 253}
318 254
319#ifdef AUDIO_ENABLE 255#ifdef AUDIO_ENABLE
320 256
321uint8_t starting_note = 0x0C; 257void startup_user()
322int offset = 7; 258{
323 259 _delay_ms(20); // gets rid of tick
324void process_action_user(keyrecord_t *record) { 260 PLAY_NOTE_ARRAY(tone_startup, false, 0);
261}
325 262
326 if (IS_LAYER_ON(_MUSIC)) { 263void shutdown_user()
327 if (record->event.pressed) { 264{
328 play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF); 265 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
329 } else { 266 _delay_ms(150);
330 stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); 267 stop_all_notes();
331 } 268}
332 }
333 269
270void music_on_user(void)
271{
272 music_scale_user();
334} 273}
335 274
336void play_goodbye_tone() 275void music_scale_user(void)
337{ 276{
338 PLAY_NOTE_ARRAY(goodbye, false, 0); 277 PLAY_NOTE_ARRAY(music_scale, false, 0);
339 _delay_ms(150);
340} 278}
341 279
342#endif \ No newline at end of file 280#endif
diff --git a/keyboards/preonic/keymaps/xyverz/makefile.mk b/keyboards/preonic/keymaps/xyverz/makefile.mk
deleted file mode 100644
index 628167ff6..000000000
--- a/keyboards/preonic/keymaps/xyverz/makefile.mk
+++ /dev/null
@@ -1 +0,0 @@
1AUDIO_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/zach/Makefile b/keyboards/preonic/keymaps/zach/Makefile
new file mode 100644
index 000000000..eebf41349
--- /dev/null
+++ b/keyboards/preonic/keymaps/zach/Makefile
@@ -0,0 +1,29 @@
1# Zach Preonic Makefile
2# Max .hex size is about 28636 bytes
3
4# Build Options
5# change to "no" to disable the options, or define them in the Makefile in
6# the appropriate keymap folder that will get included automatically
7#
8TAP_DANCE_ENABLE = yes # Enable TapDance functionality
9BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
10MOUSEKEY_ENABLE = no # Mouse keys(+4700)
11EXTRAKEY_ENABLE = no # Audio control and System control(+450)
12CONSOLE_ENABLE = no # Console for debug(+400)
13COMMAND_ENABLE = no # Commands for debug and configuration
14NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
15USB_6KRO_ENABLE = no # 6key Rollover
16BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
17MIDI_ENABLE = no # MIDI controls
18AUDIO_ENABLE = yes # Audio output on port C6
19#VARIABLE_TRACE = no # Debug changes to variable values
20UNICODE_ENABLE = no # Unicode
21UNICODEMAP_ENABLE = yes # Enable extended unicode
22BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
23RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
24# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
25SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
26
27ifndef QUANTUM_DIR
28 include ../../../../Makefile
29endif
diff --git a/keyboards/preonic/keymaps/zach/config.h b/keyboards/preonic/keymaps/zach/config.h
new file mode 100644
index 000000000..bb8913c7a
--- /dev/null
+++ b/keyboards/preonic/keymaps/zach/config.h
@@ -0,0 +1,95 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6061
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Ortholinear Keyboards
28#define PRODUCT The Preonic Keyboard
29#define DESCRIPTION A compact ortholinear keyboard
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 12
34
35/* Planck PCB default pin-out */
36#define MATRIX_ROW_PINS { D2, D5, B5, B6, D3 }
37#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
38#define UNUSED_PINS
39
40#define BACKLIGHT_PIN B7
41
42/* COL2ROW or ROW2COL */
43#define DIODE_DIRECTION COL2ROW
44
45/* define if matrix has ghost */
46//#define MATRIX_HAS_GHOST
47
48
49#define BACKLIGHT_BREATHING // LED breathing
50/* number of backlight levels */
51#define BACKLIGHT_LEVELS 5
52
53/* Set 0 if debouncing isn't needed */
54#define DEBOUNCING_DELAY 5
55
56/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
57//#define LOCKING_SUPPORT_ENABLE
58/* Locking resynchronize hack */
59//#define LOCKING_RESYNC_ENABLE
60
61/* key combination for command */
62#define IS_COMMAND() ( \
63 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
64)
65
66/* ws2812 RGB LED */
67//#define RGB_DI_PIN D1
68//#define RGBLIGHT_TIMER
69//#define RGBLED_NUM 28 // Number of LEDs
70//#define RGBLIGHT_HUE_STEP 10
71//#define RGBLIGHT_SAT_STEP 17
72//#define RGBLIGHT_VAL_STEP 17
73
74/*
75 * Feature disable options
76 * These options are also useful to firmware size reduction.
77 */
78
79/* disable debug print */
80//#define NO_DEBUG
81/* disable print */
82//#define NO_PRINT
83
84/* disable action features */
85//#define NO_ACTION_LAYER
86#define NO_ACTION_TAPPING
87//#define NO_ACTION_ONESHOT
88#define NO_ACTION_MACRO
89#define NO_ACTION_FUNCTION
90#define PREVENT_STUCK_MODIFIERS
91//#define DYNAMIC_MACRO_ENABLE // Enable if you need to use the macro functionality
92//#define SPACE_CADET // Parenthesis on L/R shift
93
94
95#endif
diff --git a/keyboards/preonic/keymaps/zach/keymap.c b/keyboards/preonic/keymaps/zach/keymap.c
new file mode 100644
index 000000000..6ce37840b
--- /dev/null
+++ b/keyboards/preonic/keymaps/zach/keymap.c
@@ -0,0 +1,54 @@
1// Zach Nielsen Custom Preonic Keyboard layout
2#include "preonic.h"
3#define PREONIC_YES // This is the Preonic
4#include "zach_common_functions.c"
5
6const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
7[_COLEMAK] = { /* Base Layer */
8 {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
9 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_ENT},
10 {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT},
11 {SHFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
12 {CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
13},
14
15[_SWCOLE] = { /* Software Colemak */
16 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
17 {_______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______},
18 {_______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______},
19 {_______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______},
20 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
21},
22
23[_RAISE] = { /* RAISE - Numpad and Unicode symbols */
24 {KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
25 {KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______},
26 {KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, XXXXXXX, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR},
27 {_______, KC_COLN, TFLIP, LAROW, RAROW, XXXXXXX, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS},
28 {_______, KC_PIPE, TPUT, _______, _______, KC_TAB, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL}
29},
30
31[_LOWER] = { /* LOWER - Symbols, Paging, CtrAltDel */
32 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL},
33 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL},
34 {KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP},
35 {CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN},
36 {_______, _______, _______, _______, _______, KC_TAB, KC_TAB, _______, _______, _______, _______, _______}
37},
38
39[_ADJUST] = { /* ADJUST - Macros, Layer Switching, Function Keys */
40 {UNIWIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_TOG, MU_TOG},
41 {UNILIN, SUPA2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX},
42 {XXXXXXX, DEGREE, IBANG, LAROW, RAROW, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, BL_INC},
43 {_______, CADKEY, MICRO, WOMEGA, OMEGA, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, BL_DEC},
44 {_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, MUV_DE, MUV_IN, BL_TOGG}
45},
46
47[_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */
48 {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______},
49 {_______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______},
50 {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______},
51 {XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX},
52 {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______}
53}
54};
diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c
new file mode 100644
index 000000000..2c47b2289
--- /dev/null
+++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c
@@ -0,0 +1,447 @@
1#ifndef ZACH_COMMON_FUNCTIONS
2#define ZACH_COMMON_FUNCTIONS
3#include "eeconfig.h"
4#include "action_layer.h"
5#include "keymap_colemak.h"
6extern keymap_config_t keymap_config;
7
8// Fillers to make layering more clear
9#define _______ KC_TRNS
10#define XXXXXXX KC_NO
11#define C(n) RCTL(n)
12#define CADKEY RCTL(RALT(KC_DEL))
13
14void tap(uint16_t keycode){
15 register_code(keycode);
16 unregister_code(keycode);
17};
18
19void persistant_default_layer_set(uint16_t default_layer){
20 eeconfig_update_default_layer(default_layer);
21 default_layer_set(default_layer);
22};
23
24// Automatic number generation of important keywords
25enum my_keycodes{
26 // Layer numbers
27 _COLEMAK = 0,
28 _SWCOLE,
29 _RAISE,
30 _LOWER,
31 _ADJUST,
32 _UNICODES,
33 // These use process_record_user()
34 COLEMAK = SAFE_RANGE,
35 SWCOLE,
36 LOWER,
37 RAISE,
38 SHFT_CAP,
39 CTRLB,
40 CPYPST,
41 FACE,
42 UNIWIN,
43 UNILIN,
44 DISFACE,
45 TFLIP,
46 TPUT,
47 SHRUG,
48 RANDIG,
49 // Tap_Dance nums
50 RAI = 0,
51 LOW,
52 SUP
53};
54
55#ifdef AUDIO_ENABLE
56#include "audio.h"
57float tone_startup[][2] = SONG(STARTUP_SOUND);
58float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
59float tone_colemak[][2] = SONG(COLEMAK_SOUND);
60float tone_swcole[][2] = SONG(QWERTY_SOUND);
61float tone_capslock_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
62float tone_capslock_off[][2] = SONG(CAPS_LOCK_OFF_SOUND);
63float tone_ctrl_mod[][2] = SONG(COIN_SOUND);
64float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND);
65float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
66float uniwin[][2] = SONG(UNICODE_WINDOWS);
67float unilin[][2] = SONG(UNICODE_LINUX);
68#endif
69
70#ifdef TAP_DANCE_ENABLE
71#define TAPPING_TERM 200
72
73void dance_raise_press(qk_tap_dance_state_t *state, void *user_data){// Called on each tap
74 switch(state->count){ // Only turn the layer on once
75 case 1:
76 layer_off(_UNICODES);
77 layer_on(_RAISE);
78 update_tri_layer(_LOWER, _RAISE, _ADJUST);
79 break;
80 }
81};
82void dance_raise_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release
83 switch(state->count){
84 case 1: // Normal action. Turn off layers
85 layer_off(_RAISE);
86 update_tri_layer(_LOWER, _RAISE, _ADJUST);
87 layer_off(_UNICODES);
88 break;
89 }
90};
91/////////////////////////////////////////////////////////////////////
92void dance_lower_press(qk_tap_dance_state_t *state, void *user_data){// Called on tap
93 switch(state->count){
94 case 1: // Turn on lower
95 layer_off(_UNICODES);
96 layer_on(_LOWER);
97 update_tri_layer(_LOWER, _RAISE, _ADJUST);
98 break;
99 }
100};
101void dance_lower_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on release
102 switch(state->count){
103 case 1: // Normal action. Turn off layers
104 layer_off(_LOWER);
105 update_tri_layer(_LOWER, _RAISE, _ADJUST);
106 layer_off(_UNICODES);
107 break;
108 case 2: // Turn on _UNICODES layer
109 layer_off(_LOWER);
110 update_tri_layer(_LOWER, _RAISE, _ADJUST);
111 layer_on(_UNICODES);
112 #ifdef AUDIO_ENABLE
113 PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0);
114 #endif
115 break;
116 }
117};
118/////////////////////////////////////////////////////////////////////
119void dance_super_press(qk_tap_dance_state_t *state, void *user_data){ // Called on down
120 if(state->count == 1){
121 register_code(KC_LGUI);
122 }
123}
124void dance_super_done(qk_tap_dance_state_t *state, void *user_data){ // Called on timeout
125 switch(state->count){
126 case 2:
127 register_code(KC_LGUI);
128 tap(KC_L);
129 unregister_code(KC_LGUI);
130 break;
131 }
132}
133void dance_super_lift(qk_tap_dance_state_t *state, void *user_data){ // Called on up
134 unregister_code(KC_LGUI);
135}
136
137qk_tap_dance_action_t tap_dance_actions[] = {
138 [RAI] = ACTION_TAP_DANCE_FN_ADVANCED(dance_raise_press, NULL, dance_raise_lift),
139 [LOW] = ACTION_TAP_DANCE_FN_ADVANCED(dance_lower_press, NULL, dance_lower_lift),
140 [SUP] = ACTION_TAP_DANCE_FN_ADVANCED(dance_super_press, dance_super_done, dance_super_lift)
141};
142#endif
143
144//#ifdef UNICODE_ENABLE
145// Unicode shortcuts
146#define IBANG X(0x203D)
147#define RAROW X(0x2192)
148#define LAROW X(0x2190)
149#define DEGREE X(0x00B0)
150#define OMEGA X(0x03A9)
151#define WOMEGA X(0x03C9)
152#define MICRO X(0x00B5)
153#define PLUMIN X(0x00B1)
154#define SUPA2 X(0x00B2)
155#define ROMAN1 X(0x2160)
156#define ROMAN2 X(0x2161)
157#define ROMAN3 X(0x2162)
158#define ROMAN4 X(0x2163)
159#define ROMAN5 X(0x2164)
160#define ROMAN6 X(0x2165)
161#define ROMAN7 X(0x2166)
162#define roman1 X(0x2170)
163#define roman2 X(0x2171)
164#define roman3 X(0x2172)
165#define roman4 X(0x2173)
166#define roman5 X(0x2174)
167#define roman6 X(0x2175)
168#define roman7 X(0x2176)
169
170#ifdef UNICODEMAP_ENABLE // For Unicode characters larger than 0x8000. Send with X(<unicode>)
171enum Ext_Unicode{
172 PENGUIN = 0,
173 BOAR,
174 MONKEY,
175 DRAGON,
176 CHICK,
177 TUMBLER
178};
179const uint32_t PROGMEM unicode_map[] = {
180 [PENGUIN] = 0x1F427,
181 [BOAR] = 0x1F417,
182 [MONKEY] = 0x1F412,
183 [DRAGON] = 0x1F409,
184 [CHICK] = 0x1F425,
185 [TUMBLER] = 0x1F943
186};
187#define PENGY X(PENGUIN)
188#define BOARY X(BOAR)
189#define MNKY X(MONKEY)
190#define DRGN X(DRAGON)
191#define DUCK X(CHICK)
192#define TMBL X(TUMBLER)
193#endif
194
195//#endif
196
197static uint16_t key_timer;
198static uint8_t caps_status = 0;
199bool process_record_user(uint16_t keycode, keyrecord_t *record) {
200 switch (keycode) {
201 case COLEMAK:
202 if(record->event.pressed){
203 persistant_default_layer_set(1UL<<_COLEMAK);
204 #ifdef AUDIO_ENABLE
205 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
206 #endif
207 }
208 return false;
209 break;
210 case SWCOLE:
211 if(record->event.pressed){
212 persistant_default_layer_set(1UL<<_SWCOLE);
213 #ifdef AUDIO_ENABLE
214 PLAY_NOTE_ARRAY(tone_swcole, false, 0);
215 #endif
216 }
217 return false;
218 break;
219 case RAISE:
220 if(record->event.pressed){
221 layer_on(_RAISE);
222 update_tri_layer(_LOWER, _RAISE, _ADJUST);
223 } else {
224 layer_off(_RAISE);
225 update_tri_layer(_LOWER, _RAISE, _ADJUST);
226 }
227 return false;
228 break;
229 case LOWER:
230 if(record->event.pressed){
231 layer_on(_LOWER);
232 update_tri_layer(_LOWER, _RAISE, _ADJUST);
233 } else {
234 layer_off(_LOWER);
235 update_tri_layer(_LOWER, _RAISE, _ADJUST);
236 }
237 return false;
238 break;
239 case SHFT_CAP:
240 if(record->event.pressed){
241 key_timer = timer_read(); // if the key is being pressed, we start the timer.
242 register_code(KC_LSHIFT);
243 } else { // this means the key was just released (tap or "held down")
244 if(timer_elapsed(key_timer) < 152){ // Time in ms, the threshold we pick for counting something as a tap.
245 tap(KC_CAPS);
246 if(caps_status == 0){
247 caps_status = 1;
248 #ifdef AUDIO_ENABLE
249 PLAY_NOTE_ARRAY(tone_capslock_on, false, 0);
250 #endif
251 } else {
252 caps_status = 0;
253 #ifdef AUDIO_ENABLE
254 PLAY_NOTE_ARRAY(tone_capslock_off, false, 0);
255 #endif
256 }
257 }
258 unregister_code(KC_LSHIFT);
259 }
260 return false;
261 break;
262 case CTRLB: // Control-B on tap (bold)
263 if(record->event.pressed){
264 key_timer = timer_read(); // if the key is being pressed, we start the timer.
265 register_code(KC_LCTL);
266 } else { // this means the key was just released (tap or "held down")
267 if (timer_elapsed(key_timer) < 152) { // Time in ms, the threshold we pick for counting something as a tap.
268 tap(KC_B);
269 #ifdef AUDIO_ENABLE
270 PLAY_NOTE_ARRAY(tone_ctrl_mod, false, 0);
271 #endif
272 #ifdef BACKLIGHT_BREATHING
273 breathing_speed_set(2);
274 breathing_pulse();
275 #endif
276 }
277 unregister_code(KC_LCTL);
278 }
279 return false;
280 break;
281 case CPYPST: // One key copy/paste
282 if(record->event.pressed){
283 key_timer = timer_read();
284 } else {
285 if (timer_elapsed(key_timer) > 152) { // Hold, copy
286 register_code(KC_LCTL);
287 tap(KC_C);
288 unregister_code(KC_LCTL);
289 #ifdef AUDIO_ENABLE
290 PLAY_NOTE_ARRAY(tone_copy, false, 0);
291 #endif
292 } else { // Tap, paste
293 register_code(KC_LCTL);
294 tap(KC_V);
295 unregister_code(KC_LCTL);
296 #ifdef AUDIO_ENABLE
297 PLAY_NOTE_ARRAY(tone_paste, false, 0);
298 #endif
299 }
300 }
301 return false;
302 break;
303 #ifdef UNICODE_ENABLE
304 case UNIWIN:
305 if(record->event.pressed){
306 set_unicode_input_mode(UC_WIN);
307 #ifdef AUDIO_ENABLE
308 PLAY_NOTE_ARRAY(uniwin, false, 0);
309 #endif
310 }
311 return false;
312 break;
313 case UNILIN:
314 if(record->event.pressed){
315 set_unicode_input_mode(UC_LNX);
316 #ifdef AUDIO_ENABLE
317 PLAY_NOTE_ARRAY(unilin, false, 0);
318 #endif
319 }
320 return false;
321 break;
322 case DISFACE: // ಠ_ಠ
323 if(record->event.pressed){
324 process_unicode((0x0CA0|QK_UNICODE), record); // Eye
325 register_code(KC_RSFT);
326 tap(KC_MINS);
327 unregister_code(KC_RSFT);
328 process_unicode((0x0CA0|QK_UNICODE), record); // Eye
329 }
330 return false;
331 break;
332 case TFLIP: // (╯°□°)╯ ︵ ┻━┻
333 if(record->event.pressed){
334 register_code(KC_RSFT);
335 tap(KC_9);
336 unregister_code(KC_RSFT);
337 process_unicode((0x256F|QK_UNICODE), record); // Arm
338 process_unicode((0x00B0|QK_UNICODE), record); // Eye
339 process_unicode((0x25A1|QK_UNICODE), record); // Mouth
340 process_unicode((0x00B0|QK_UNICODE), record); // Eye
341 register_code(KC_RSFT);
342 tap(KC_0);
343 unregister_code(KC_RSFT);
344 process_unicode((0x256F|QK_UNICODE), record); // Arm
345 tap(KC_SPC);
346 process_unicode((0x0361|QK_UNICODE), record); // Flippy
347 tap(KC_SPC);
348 process_unicode((0x253B|QK_UNICODE), record); // Table
349 process_unicode((0x2501|QK_UNICODE), record); // Table
350 process_unicode((0x253B|QK_UNICODE), record); // Table
351 }
352 return false;
353 break;
354 case TPUT: // ┬──┬ ノ( ゜-゜ノ)
355 if(record->event.pressed){
356 process_unicode((0x252C|QK_UNICODE), record); // Table
357 process_unicode((0x2500|QK_UNICODE), record); // Table
358 process_unicode((0x2500|QK_UNICODE), record); // Table
359 process_unicode((0x252C|QK_UNICODE), record); // Table
360 tap(KC_SPC);
361 process_unicode((0x30CE|QK_UNICODE), record); // Arm
362 register_code(KC_RSFT);
363 tap(KC_9);
364 unregister_code(KC_RSFT);
365 tap(KC_SPC);
366 process_unicode((0x309C|QK_UNICODE), record); // Eye
367 tap(KC_MINS);
368 process_unicode((0x309C|QK_UNICODE), record); // Eye
369 process_unicode((0x30CE|QK_UNICODE), record); // Arm
370 register_code(KC_RSFT);
371 tap(KC_0);
372 unregister_code(KC_RSFT);
373 }
374 return false;
375 break;
376 case SHRUG: // ¯\_(ツ)_/¯
377 if(record->event.pressed){
378 process_unicode((0x00AF|QK_UNICODE), record); // Hand
379 tap(KC_BSLS); // Arm
380 register_code(KC_RSFT);
381 tap(KC_UNDS); // Arm
382 tap(KC_LPRN); // Head
383 unregister_code(KC_RSFT);
384 process_unicode((0x30C4|QK_UNICODE), record); // Face
385 register_code(KC_RSFT);
386 tap(KC_RPRN); // Head
387 tap(KC_UNDS); // Arm
388 unregister_code(KC_RSFT);
389 tap(KC_SLSH); // Arm
390 process_unicode((0x00AF|QK_UNICODE), record); // Hand
391 }
392 return false;
393 break;
394 #endif
395 case FACE: // (o_O)
396 if(record->event.pressed){
397 register_code(KC_RSFT);
398 tap(KC_LPRN);
399 unregister_code(KC_RSFT);
400 tap(KC_O);
401 register_code(KC_RSFT);
402 tap(KC_UNDS);
403 tap(KC_O);
404 tap(KC_RPRN);
405 unregister_code(KC_RSFT);
406 }
407 return false;
408 break;
409 case RANDIG:
410 if (record->event.pressed) {
411 tap_random_base64();
412 }
413 return false;
414 break;
415 }
416 return true;
417};
418
419void matrix_init_user(void){ // Run once at startup
420 #ifdef AUDIO_ENABLE
421 _delay_ms(50); // gets rid of tick
422 PLAY_NOTE_ARRAY(tone_startup, false, 0);
423 #endif
424}
425
426#ifdef AUDIO_ENABLE
427void play_goodbye_tone(void){
428 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
429 _delay_ms(150);
430}
431
432void shutdown_user(){
433 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
434 _delay_ms(150);
435 stop_all_notes();
436}
437
438void music_on_user(void){ // Run when the music layer is turned on
439 PLAY_NOTE_ARRAY(tone_startup, false, 0);
440}
441
442void music_off_user(void){ // Run when music is turned off
443 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
444}
445#endif
446
447#endif
diff --git a/keyboards/satan/keymaps/admiralStrokers/Makefile b/keyboards/satan/keymaps/admiralStrokers/Makefile
new file mode 100644
index 000000000..61dfedeb8
--- /dev/null
+++ b/keyboards/satan/keymaps/admiralStrokers/Makefile
@@ -0,0 +1,24 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = no # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = no # Commands for debug and configuration
10SLEEP_LED_ENABLE = no # Enables your LED to breathe while your computer is sleeping.
11NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
12BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
13MIDI_ENABLE = no # MIDI controls
14AUDIO_ENABLE = no # Audio output on port C6
15UNICODEMAP_ENABLE = no # This allows sending unicode symbols using X(<unicode>) in your keymap.
16UNICODE_ENABLE =no # Unicode
17UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for details on Windows).
18BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
19RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
20SLEEP_LED_ENABLE = no# Breathing sleep LED during USB suspend
21API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings
22ifndef QUANTUM_DIR
23 include ../../../../Makefile
24endif
diff --git a/keyboards/satan/keymaps/admiralStrokers/config.h b/keyboards/satan/keymaps/admiralStrokers/config.h
new file mode 100644
index 000000000..d0338fb7e
--- /dev/null
+++ b/keyboards/satan/keymaps/admiralStrokers/config.h
@@ -0,0 +1,96 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H_ADMSTROK
19#define CONFIG_H_ADMSTROK
20
21#include "config_common.h"
22#include "../../config.h"
23
24/* USB Device descriptor parameter */
25#define VENDOR_ID 0xFEED
26#define PRODUCT_ID 0x6060
27#define DEVICE_VER 0x0003
28#define MANUFACTURER SATAN
29#define PRODUCT GH60
30#define DESCRIPTION QMK keyboard firmware for Satan GH60 with WS2812 support
31
32/* key matrix size */
33#define MATRIX_ROWS 5
34#define MATRIX_COLS 14
35
36// ROWS: Top to bottom, COLS: Left to right
37
38#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
39#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 }
40#define UNUSED_PINS
41
42#define BACKLIGHT_PIN B6
43
44/* COL2ROW or ROW2COL */
45#define DIODE_DIRECTION COL2ROW
46
47/* define if matrix has ghost */
48//#define MATRIX_HAS_GHOST
49
50/* Set 0 if debouncing isn't needed */
51#define DEBOUNCING_DELAY 5
52
53/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
54#define LOCKING_SUPPORT_ENABLE
55/* Locking resynchronize hack */
56#define LOCKING_RESYNC_ENABLE
57
58/* key combination for command */
59#define IS_COMMAND() ( \
60 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
61)
62
63/* Backlight configuration */
64#define BACKLIGHT_LEVELS 4
65
66/* Underlight configuration */
67#define RGB_DI_PIN E2
68#define RGBLIGHT_ANIMATIONS
69#define RGBLED_NUM 8 // Number of LEDs
70#define RGBLIGHT_HUE_STEP 10
71#define RGBLIGHT_SAT_STEP 17
72#define RGBLIGHT_VAL_STEP 17
73
74#define DISABLE_SPACE_CADET_ROLLOVER
75
76
77
78/*
79 * Feature disable options
80 * These options are also useful to firmware size reduction.
81 */
82
83/* disable debug print */
84//#define NO_DEBUG
85
86/* disable print */
87//#define NO_PRINT
88
89/* disable action features */
90//#define NO_ACTION_LAYER
91//#define NO_ACTION_TAPPING
92//#define NO_ACTION_ONESHOT
93//#define NO_ACTION_MACRO
94//#define NO_ACTION_FUNCTION
95
96#endif
diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/satan/keymaps/admiralStrokers/keymap.c
new file mode 100644
index 000000000..b6dc29c67
--- /dev/null
+++ b/keyboards/satan/keymaps/admiralStrokers/keymap.c
@@ -0,0 +1,195 @@
1#include "satan.h"
2
3static uint16_t key_timer;
4
5bool checktime(void){
6 return (timer_elapsed(key_timer) < 150) ? true : false;
7 };
8
9// general keydefs
10#define norm 0 // Default layer
11#define elev 1 // Layer directional keys
12#define supr 2 // F-keys and mediakeys
13#define spac 3 //
14#define FNO1 4 //
15#define FNO2 5 //
16#define FNO3 6 //
17#define MAC0 M(0) //
18#define MAC1 M(1) //
19#define MAC2 M(2) //
20#define MAC3 M(3) //
21#define MAC4 M(4) //
22#define MAC5 M(5) //
23#define MAC6 M(6) //
24#define MAC7 M(7) //
25#define MAC8 M(8) //
26#define MAC9 M(9) //
27#define GRAV KC_GRV //
28#define MEDI F(FNO1)//
29
30// General shortenings
31#define ESCA KC_ESC
32#define MINS KC_MINS
33#define EQUL KC_EQL
34#define BSPC KC_BSPC
35#define DELE KC_DEL
36#define LBRC KC_LBRC
37#define RBRC KC_RBRC
38#define ALTR KC_RALT
39#define SCLN KC_SCLN
40#define QUOT KC_QUOT
41#define NUHS KC_NUHS
42#define ENTE KC_ENT
43#define NUBS KC_NUBS // Less/ greater sign
44#define COMM KC_COMM // Comma
45#define FSTO KC_DOT // Full stop
46#define SLSH KC_SLSH
47#define ALTL KC_LALT
48#define GUIL KC_LGUI
49#define GUIR KC_RGUI
50#define MENO KC_MENU
51// The F-row/layer:
52#define FK01 KC_F1
53#define FK02 KC_F2
54#define FK03 KC_F3
55#define FK04 KC_F4
56#define FK05 KC_F5
57#define FK06 KC_F6
58#define FK07 KC_F7
59#define FK08 KC_F8
60#define FK09 KC_F9
61#define FK10 KC_F10
62#define FK11 KC_F11
63#define FK12 KC_F12
64#define FK13 KC_F13
65#define FK14 KC_F14
66// Special Actions and Media Keys
67#define INSE KC_INS // Insert here
68#define HOME KC_HOME // Go to beginning of line
69#define ENDI KC_END // go to end of line
70#define PSCR KC_PSCR // Print Screen
71#define SLCK KC_SLCK // go to end of line
72#define PGDN KC_PGDN // go to end of line
73#define PGUP KC_PGUP // go to end of line
74#define PLPS KC_MPLY // Play/Pause
75#define PAUS KC_PAUS // Pause button
76#define MUTE KC_MUTE // Mute sound
77#define VOLU KC_VOLU // Volume increase
78#define VOLD KC_VOLD // Volume decrease
79#define MNXT KC_MNXT // next track
80#define MPRV KC_MPRV // prev track
81#define MSTP KC_MSTP // stop playing
82#define MSEL KC_MSEL // Select media (Start playing it)
83#define MAIL KC_MAIL // Open default mail app
84#define CALC KC_CALC // Open default calculator app
85#define MYCM KC_MYCM // Open default file manager
86//#define LILO KC_XXXXXX // Reserved for later
87//#define LIHI KC_XXXXXX // Reserved for later
88
89
90// dual-role shortcuts
91#define DUTB LT(elev, KC_TAB) // `tabs` layer on hold and tab on tap
92#define DUSP LT(spac, KC_SPACE) // `spce` layer on hold and space on tap
93#define LOCK LGUI(KC_L) // lock computer (win)
94
95// Space Admiral Strokers
96#define SADL MAC0 // Hold for lshift and { on tap
97#define SADR MAC1 // Hold for rshift and } on tap
98#define CADL MAC2 // Hold for lctrl and [ on tap
99#define CADR MAC3 // Hold for rctrl and ] on tap
100
101// arrow cluster duality bottom right corner
102#define ARLF ALT_T(KC_LEFT) // Left arrow
103#define ARRT CTL_T(KC_RIGHT)// Right arrow
104#define ARUP SFT_T(KC_UP) // Up arrow
105#define ARDN GUI_T(KC_DOWN) // Down arrow
106
107// brackets
108#define NOCL RALT(KC_7) // [
109#define NOCR RALT(KC_0) // ]
110#define NOPL LSFT(KC_8) // (
111#define NOPR LSFT(KC_9) // )
112#define NOAL KC_NUBS // <
113#define NOAR LSFT(KC_NUBS) // >
114#define NOBL RALT(KC_8) // [
115#define NOBR RALT(KC_9) // ]
116
117// increase readability
118#define XXXX KC_TRNS
119#define DEAD KC_NO
120#define SCAN KC_TRNS // Scandinavian keys, the Row 5 key 5 is actually Row 1 key 15 on the PCB
121
122const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
123[ norm ] = KEYMAP( // Normal scandinavian mapping (danish has QUOT and SCLN wapped)
124 GRAV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MINS, EQUL, BSPC, DELE,\
125 DUTB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LBRC, RBRC, DEAD,\
126 ALTR, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SCLN, QUOT, NUHS, ENTE,\
127 SADL, NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, COMM, FSTO, SLSH, SADR, DEAD,\
128 CADL, ALTL, GUIL, DUSP, GUIR, MEDI, MENO, CADR),
129
130[ elev ] = KEYMAP( // The f-Row (with f13-14), Special keys and media keys
131 LOCK, FK01, FK02, FK03, FK04, FK05, FK06, FK07, FK08, FK09, FK10, FK11, FK12, FK13, FK14,\
132 XXXX, XXXX, XXXX, XXXX, MAIL, XXXX, XXXX, HOME, INSE, PSCR, SLCK, PAUS, PGUP, XXXX,\
133 XXXX, XXXX, XXXX, XXXX, MYCM, XXXX, XXXX, MPRV, PAUS, MNXT, XXXX, XXXX, PGDN, ENDI,\
134 XXXX, XXXX, XXXX, XXXX, CALC, XXXX, XXXX, XXXX, MUTE, VOLD, VOLU, XXXX, ARUP, DEAD,\
135 XXXX, XXXX, XXXX, PLPS, XXXX, ARLF, ARDN, ARRT),
136
137[ spac ] = KEYMAP( // The space controls (by pressing space)
138 XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
139 XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
140 XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
141 XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\
142 XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX),
143
144[ supr ] = KEYMAP( // Additional layer for later use.
145 XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
146 XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
147 XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
148 XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\
149 XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX),
150};
151
152const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function
153 switch(id) {
154 case 0: //MAC0 - Hold for lshift and { on tap
155 if (record->event.pressed) {
156 key_timer = timer_read();
157 return MACRO(D(LSFT), END );
158 } else {
159 return checktime() ? MACRO(U(LSFT),D(RALT),T(7),U(RALT),END): MACRO(U(LSFT),END);
160 }; break;
161 case 1: //MAC1 - Hold for rshift and } on tap
162 if (record->event.pressed) {
163 key_timer = timer_read();
164 return MACRO(D(RSFT), END );
165 } else {
166 return checktime() ? MACRO(U(RSFT),D(RALT),T(0),U(RALT),END): MACRO(U(RSFT),END);
167 }; break;
168 case 2: //MAC2 - Hold for lctrl and [ on tap
169 if (record->event.pressed) {
170 key_timer = timer_read();
171 return MACRO(D(LCTL), END );
172 } else {return checktime() ? MACRO(U(LCTL),D(RALT),T(8),U(RALT),END):MACRO(U(LCTL),END);
173 }; break;
174 case 3: //MAC3 - Hold for rctrl and ] on tap
175 if (record->event.pressed) {
176 key_timer = timer_read();
177 return MACRO(D(RCTL), END );
178 } else {
179 return checktime() ? MACRO(U(RCTL),D(RALT),T(9),U(RALT),END):MACRO(U(RCTL),END);
180 }; break;
181 case 4: //MAC4 reserved for later.
182 if (record->event.pressed) { } else { }; break;
183 case 5: //MAC5 reserved for later.
184 if (record->event.pressed) { } else { }; break;
185 case 6: //MAC6 reserved for later.
186 if (record->event.pressed) { } else { }; break;
187 } return MACRO_NONE;
188};
189/*
190 Later use:
191 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { }
192 enum function_id { };
193 const uint16_t PROGMEM fn_actions[] = { };
194
195*/
diff --git a/keyboards/satan/keymaps/admiralStrokers/readme.md b/keyboards/satan/keymaps/admiralStrokers/readme.md
new file mode 100644
index 000000000..9b30caf34
--- /dev/null
+++ b/keyboards/satan/keymaps/admiralStrokers/readme.md
@@ -0,0 +1,13 @@
1# Admiral Strokers keymap
2## For the Satan GH60 PCB
3The Admiral STN60 is a layout for users of the satan GH60, optimized with some nice features such as mod tap for brackets (Similar to Space Cadett), space mod for F-row/ layer with easy to access media and control keys. The layout below is just as an example and is ISO based, ANSI and JIS layouts will be included later.
4
5``````
6[ _tmp ] = KEYMAP( // Copy this to get started. SCAN is scandinavian layout specific.
7XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX,\
8XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\
9XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, SCAN, XXXX,\
10XXXX, SCAN, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, DEAD,\
11XXXX, XXXX, XXXX, XXXX, SCAN, XXXX, XXXX, XXXX, XXXX),\
12
13```
diff --git a/keyboards/satan/keymaps/midi/Makefile b/keyboards/satan/keymaps/midi/Makefile
new file mode 100644
index 000000000..89c34b394
--- /dev/null
+++ b/keyboards/satan/keymaps/midi/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
12MIDI_ENABLE = yes # MIDI support (+2400 to 4200, depending on config)
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif
diff --git a/keyboards/satan/keymaps/midi/config.h b/keyboards/satan/keymaps/midi/config.h
new file mode 100644
index 000000000..8e10b04ec
--- /dev/null
+++ b/keyboards/satan/keymaps/midi/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/satan/keymaps/midi/keymap.c b/keyboards/satan/keymaps/midi/keymap.c
new file mode 100644
index 000000000..8378b4e4b
--- /dev/null
+++ b/keyboards/satan/keymaps/midi/keymap.c
@@ -0,0 +1,77 @@
1#include "satan.h"
2
3// Each layer gets a name for readability, which is then used in the keymap matrix below.
4// The underscores don't mean anything - you can have a layer called STUFF or any other name.
5// Layer names don't all need to be of the same length, obviously, and you can also skip them
6// entirely and just use numbers.
7#define _BL 0
8#define _ML 1
9
10// readability
11#define _______ KC_TRNS
12#define XXXXXXX KC_NO
13
14const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
15 /* Keymap _BL: (Base Layer) Default Layer
16 * ,-----------------------------------------------------------.
17 * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
18 * |-----------------------------------------------------------|
19 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
20 * |-----------------------------------------------------------|
21 * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |
22 * |-----------------------------------------------------------|
23 * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
24 * |-----------------------------------------------------------|
25 * |Ctrl|Gui |Alt | Space |Alt |Gui |Midi|Ctrl |
26 * `-----------------------------------------------------------'
27 */
28[_BL] = KEYMAP_ANSI(
29 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
30 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS, \
31 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_ENT, \
32 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \
33 KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(_ML), KC_RCTL),
34
35#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)
36/* Keymap _ML: MIDI Layer (Advanced)
37 * ,------------------------------------------------------------------------.
38 * | Exit | | | | | | | | | | | | | |
39 * |------------------------------------------------------------------------|
40 * | Ch+ | | C# | D# | | F# | G# | A# | | C# | D# | | | |
41 * |------------------------------------------------------------------------|
42 * | Mod | C | D | E | F | G | A | B | C | D | E | F | |
43 * |------------------------------------------------------------------------|
44 * | Sustain |Oct-|Oct+|Mod-|Mod+| | | |Tns-|Tns+|Tns0| Sustain |
45 * |------------------------------------------------------------------------|
46 * | | | | All notes off | | | | |
47 * `------------------------------------------------------------------------'
48 */
49[_ML] = KEYMAP_ANSI(
50 TG(_ML), MI_VEL_1, MI_VEL_2, MI_VEL_3, MI_VEL_4, MI_VEL_5, MI_VEL_6, MI_VEL_7, MI_VEL_8, MI_VEL_9, MI_VEL_10, XXXXXXX, XXXXXXX, XXXXXXX, \
51 MI_CHU, XXXXXXX, MI_Cs, MI_Ds, XXXXXXX, MI_Fs, MI_Gs, MI_As, XXXXXXX, MI_Cs_1, MI_Ds_1, XXXXXXX, XXXXXXX, XXXXXXX, \
52 MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, _______, \
53 MI_SUS, MI_OCTD, MI_OCTU, MI_MODSD, MI_MODSU, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRNSD, MI_TRNSU, MI_TRNS_0, MI_SUS, \
54 _______, _______, _______, MI_ALLOFF, _______, _______, _______, _______),
55#elif defined(MIDI_ENABLE) && defined(MIDI_BASIC)
56/* Keymap _ML: MIDI Layer (Advanced)
57 * ,------------------------------------------------------------------------.
58 * | Exit | | | | | | | | | | | | | |
59 * |------------------------------------------------------------------------|
60 * | | | | | | | | | | | | | | |
61 * |------------------------------------------------------------------------|
62 * | | | | | | | | | | | | | |
63 * |------------------------------------------------------------------------|
64 * | |MuOn|MuOf|MiOn|MiOf| | | | | | | |
65 * |------------------------------------------------------------------------|
66 * | | | | | | | | |
67 * `------------------------------------------------------------------------'
68 */
69
70[_ML] = KEYMAP_ANSI(
71 TG(_ML), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
72 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
73 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
74 _______, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, \
75 _______, _______, _______, _______, _______, _______, _______, _______),
76#endif
77}; \ No newline at end of file
diff --git a/keyboards/satan/keymaps/midi/readme.md b/keyboards/satan/keymaps/midi/readme.md
new file mode 100644
index 000000000..87844a854
--- /dev/null
+++ b/keyboards/satan/keymaps/midi/readme.md
@@ -0,0 +1 @@
# Satan GH60 layout demonstrating MIDI key mapping
diff --git a/keyboards/planck/keymaps/xyverz/makefile.mk b/keyboards/satan/keymaps/smt/Makefile
index 93a89bb4a..0c9ae824f 100644
--- a/keyboards/planck/keymaps/xyverz/makefile.mk
+++ b/keyboards/satan/keymaps/smt/Makefile
@@ -1,5 +1,3 @@
1
2
3# Build Options 1# Build Options
4# change to "no" to disable the options, or define them in the Makefile in 2# change to "no" to disable the options, or define them in the Makefile in
5# the appropriate keymap folder that will get included automatically 3# the appropriate keymap folder that will get included automatically
@@ -12,13 +10,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 10NKRO_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 11BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
14MIDI_ENABLE = no # MIDI controls 12MIDI_ENABLE = no # MIDI controls
15AUDIO_ENABLE = yes # Audio output on port C6 13AUDIO_ENABLE = no # Audio output on port C6
16UNICODE_ENABLE = no # Unicode 14UNICODE_ENABLE = no # Unicode
17BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 15BLUETOOTH_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. 16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
19 17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
20# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
21SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
22 18
23ifndef QUANTUM_DIR 19ifndef QUANTUM_DIR
24 include ../../../../Makefile 20 include ../../../../Makefile
diff --git a/keyboards/satan/keymaps/smt/keymap.c b/keyboards/satan/keymaps/smt/keymap.c
new file mode 100644
index 000000000..d90849914
--- /dev/null
+++ b/keyboards/satan/keymaps/smt/keymap.c
@@ -0,0 +1,141 @@
1#include "satan.h"
2
3
4// Used for SHIFT_ESC
5#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
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 _FUNC 3
15
16enum planck_keycodes {
17 QWERTY = SAFE_RANGE,
18 COLEMAK,
19 DVORAK
20};
21
22#define _______ KC_TRNS
23#define XXXXXXX KC_NO
24
25// Custom macros
26#define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt
27#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
28#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt)
29#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32 /* Keymap _QWERTY: (Base Layer) Default Layer
33 * ,-----------------------------------------------------------.
34 * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
35 * |-----------------------------------------------------------|
36 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
37 * |-----------------------------------------------------------|
38 * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |
39 * |-----------------------------------------------------------|
40 * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
41 * |-----------------------------------------------------------|
42 * |Ctrl|Gui |Alt | Space |Alt |Gui |Fn |Ctrl |
43 * `-----------------------------------------------------------'
44 */
45[_QWERTY] = KEYMAP_ANSI(
46 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
47 HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS, \
48 CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
49 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \
50 KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_FUNC),KC_RCTL),
51
52 /* Keymap _COLEMAK: (Base Layer) Default Layer
53 * ,-----------------------------------------------------------.
54 * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
55 * |-----------------------------------------------------------|
56 * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \ |
57 * |-----------------------------------------------------------|
58 * |CAPS | A| R| S| T| D| H| N| E| I| O| '|Return |
59 * |-----------------------------------------------------------|
60 * |Shift | Z| X| C| V| B| K| M| ,| .| /|Shift |
61 * |-----------------------------------------------------------|
62 * |Ctrl|Gui |Alt | Space |Alt |Gui |Fn |Ctrl |
63 * `-----------------------------------------------------------'
64 */
65[_COLEMAK] = KEYMAP_ANSI(
66 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
67 HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,KC_LBRC, KC_RBRC,KC_BSLS, \
68 CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O ,KC_QUOT, KC_ENT, \
69 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, SFT_ENT, \
70 KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_FUNC),KC_RCTL),
71
72 /* Keymap _DVORAK: (Base Layer) Default Layer
73 * ,-----------------------------------------------------------.
74 * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]|Backsp |
75 * |-----------------------------------------------------------|
76 * |HypTb| '| ,| .| P| Y| F| G| C| R| L| /| =| \ |
77 * |-----------------------------------------------------------|
78 * |CtrlEsc| A| O| E| U| I| D| H| T| N| S| -|Return |
79 * |-----------------------------------------------------------|
80 * |Shift | ;| Q| J| K| X| B| M| W| V| Z|ShiftEnter|
81 * |-----------------------------------------------------------|
82 * |Ctrl|Gui |Alt | Space |Alt |Gui |Fn |Ctrl |
83 * `-----------------------------------------------------------'
84 */
85[_DVORAK] = KEYMAP_ANSI(
86 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC,KC_BSPC, \
87 HPR_TAB, KC_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \
88 CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \
89 KC_LSFT, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \
90 KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_FUNC),KC_RCTL),
91
92 /* Keymap _FUNC: Function Layer
93 * ,-----------------------------------------------------------.
94 * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete |
95 * |-----------------------------------------------------------|
96 * | |Hom| UP|End| | | |Qwt|Cmk|Dvk| |BL-|BL+|BL |
97 * |-----------------------------------------------------------|
98 * | |LFT| DN| RT| | |LFT| DN| UP| RT|Vo+|Pg+| |
99 * |-----------------------------------------------------------|
100 * | | | |Prv|Ply|Nxt| | | |Vo-|Pg-| |
101 * |-----------------------------------------------------------|
102 * |RESET| | | | | | | |
103 * `-----------------------------------------------------------'
104 */
105[_FUNC] = KEYMAP_ANSI(
106 _______,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_DEL, \
107 _______,KC_HOME,KC_UP ,KC_END ,_______,_______,_______,QWERTY ,COLEMAK,DVORAK ,_______,BL_DEC ,BL_INC ,BL_TOGG, \
108 _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,KC_VOLU,KC_PGUP ,_______, \
109 _______ ,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_VOLD,KC_PGDN ,_______, \
110 RESET ,_______,_______ ,_______ ,_______,_______,_______,_______
111 )
112};
113
114void persistant_default_layer_set(uint16_t default_layer) {
115 eeconfig_update_default_layer(default_layer);
116 default_layer_set(default_layer);
117}
118
119bool process_record_user(uint16_t keycode, keyrecord_t *record) {
120 switch (keycode) {
121 case QWERTY:
122 if (record->event.pressed) {
123 persistant_default_layer_set(1UL<<_QWERTY);
124 }
125 return false;
126 break;
127 case COLEMAK:
128 if (record->event.pressed) {
129 persistant_default_layer_set(1UL<<_COLEMAK);
130 }
131 return false;
132 break;
133 case DVORAK:
134 if (record->event.pressed) {
135 persistant_default_layer_set(1UL<<_DVORAK);
136 }
137 return false;
138 break;
139 }
140 return true;
141}
diff --git a/keyboards/satan/keymaps/smt/readme.md b/keyboards/satan/keymaps/smt/readme.md
new file mode 100644
index 000000000..7b706d601
--- /dev/null
+++ b/keyboards/satan/keymaps/smt/readme.md
@@ -0,0 +1 @@
# smt's Satan GH60 layout
diff --git a/keyboards/subatomic/keymaps/default/config.h b/keyboards/subatomic/keymaps/default/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/subatomic/keymaps/default/config.h
@@ -0,0 +1,29 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6/*
7 * MIDI options
8 */
9
10/* Prevent use of disabled MIDI features in the keymap */
11//#define MIDI_ENABLE_STRICT 1
12
13/* enable basic MIDI features:
14 - MIDI notes can be sent when in Music mode is on
15*/
16#define MIDI_BASIC
17
18/* enable advanced MIDI features:
19 - MIDI notes can be added to the keymap
20 - Octave shift and transpose
21 - Virtual sustain, portamento, and modulation wheel
22 - etc.
23*/
24//#define MIDI_ADVANCED
25
26/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
27//#define MIDI_TONE_KEYCODE_OCTAVES 2
28
29#endif \ No newline at end of file
diff --git a/keyboards/tada68/keymaps/default/keymap.c b/keyboards/tada68/keymaps/default/keymap.c
index da57c0343..f28116e0a 100644
--- a/keyboards/tada68/keymaps/default/keymap.c
+++ b/keyboards/tada68/keymaps/default/keymap.c
@@ -1,9 +1,5 @@
1#include "tada68.h" 1#include "tada68.h"
2 2
3
4// Used for SHIFT_ESC
5#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below. 3// 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. 4// 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 5// Layer names don't all need to be of the same length, obviously, and you can also skip them
@@ -36,63 +32,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36 32
37 /* Keymap _FL: Function Layer 33 /* Keymap _FL: Function Layer
38 * ,----------------------------------------------------------------. 34 * ,----------------------------------------------------------------.
39 * | | | | | | | | | | | | | | RESET| | 35 * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins |
40 * |----------------------------------------------------------------| 36 * |----------------------------------------------------------------|
41 * | | | | | | | | | | | |BL-|BL+|BL | | 37 * | | |Up | | | | | | | | | | | |Hme |
42 * |----------------------------------------------------------------| 38 * |----------------------------------------------------------------|
43 * | | | | | | | | | | | | | | 39 * | |<- |Dn | ->| | | | | | | | | |End |
44 * |----------------------------------------------------------------| 40 * |----------------------------------------------------------------|
45 * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | | | 41 * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| |MouseL|MsU|Rck |
46 * |----------------------------------------------------------------| 42 * |----------------------------------------------------------------|
47 * | | | | | | | | | | | 43 * | | | | | | | |MsL|MsD|MsR |
48 * `----------------------------------------------------------------' 44 * `----------------------------------------------------------------'
49 */ 45 */
50[_FL] = KEYMAP_ANSI( 46[_FL] = KEYMAP_ANSI(
51 #ifdef RGBLIGHT_ENABLE 47 _______, KC_F1 ,KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS , \
52 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,_______, \ 48 _______,_______,KC_UP, _______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,KC_HOME, \
53 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,_______, \ 49 _______,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \
54 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \ 50 _______,_______,_______,BL_DEC, BL_TOGG,BL_INC, _______,KC_VOLD,KC_VOLU,KC_MUTE,_______,KC_BTN1, KC_MS_U, KC_BTN2, \
55 _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______,_______,_______, \ 51 _______,_______,_______, _______, _______,_______,_______,KC_MS_L,KC_MS_D, KC_MS_R),
56 _______,_______,_______, _______, _______,_______,_______,_______,_______, _______),
57 #else
58 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,_______, \
59 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,_______, \
60 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \
61 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
62 _______,_______,_______, _______, _______,_______,_______,_______,_______, _______),
63 #endif
64};
65
66/*enum function_id {
67 //SHIFT_ESC,
68}; 52};
69
70const uint16_t PROGMEM fn_actions[] = {
71 //[0] = ACTION_FUNCTION(SHIFT_ESC),
72};
73
74void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
75 static uint8_t shift_esc_shift_mask;
76 switch (id) {
77 case SHIFT_ESC:
78 shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
79 if (record->event.pressed) {
80 if (shift_esc_shift_mask) {
81 add_key(KC_GRV);
82 send_keyboard_report();
83 } else {
84 add_key(KC_ESC);
85 send_keyboard_report();
86 }
87 } else {
88 if (shift_esc_shift_mask) {
89 del_key(KC_GRV);
90 send_keyboard_report();
91 } else {
92 del_key(KC_ESC);
93 send_keyboard_report();
94 }
95 }
96 break;
97 }
98}*/
diff --git a/keyboards/tada68/keymaps/default/readme.md b/keyboards/tada68/keymaps/default/readme.md
index 36760d6b9..53412d7c2 100644
--- a/keyboards/tada68/keymaps/default/readme.md
+++ b/keyboards/tada68/keymaps/default/readme.md
@@ -1 +1,3 @@
1# default TADA68 layout 1# default TADA68 layout
2
3This layout replicates the default factory layout of the TADA68.
diff --git a/keyboards/tada68/readme.md b/keyboards/tada68/readme.md
index 552fdea52..dbe2fdca1 100644
--- a/keyboards/tada68/readme.md
+++ b/keyboards/tada68/readme.md
@@ -1,4 +1,15 @@
1TADA68 keyboard firmware 1TADA68 keyboard firmware
2====================== 2========================
3 3
4TODO: to be updated. 41) from the keyboards/tada68 directory run:
5```
6$ make flashbin
7```
8
92) hit the reset button on the TADA, the lights will start flashing.
10
113) You'll see a new drive on your computer called TADA68. Backup the original factory `FLASH.BIN` file thats inside it.
12
134) Delete `FLASH.BIN` from the TADA drive and copy `tada68_default.bin` that was generated at the root of the qmk directory into the TADA drive.
14
155) Hit ESC on the keyboard. The lights will stop flashing and your firmware is loaded! \ No newline at end of file
diff --git a/keyboards/tv44/keymaps/tong92/Makefile b/keyboards/tv44/keymaps/tong92/Makefile
new file mode 100644
index 000000000..e60e3c5c5
--- /dev/null
+++ b/keyboards/tv44/keymaps/tong92/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = no # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = no # Commands for debug and configuration
10NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif \ No newline at end of file
diff --git a/keyboards/tv44/keymaps/tong92/config.h b/keyboards/tv44/keymaps/tong92/config.h
new file mode 100644
index 000000000..be959a823
--- /dev/null
+++ b/keyboards/tv44/keymaps/tong92/config.h
@@ -0,0 +1,12 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6// place overrides here
7#ifdef BACKLIGHT_ENABLE
8 #define BACKLIGHT_PIN B2
9 #define BACKLIGHT_LEVELS 7
10#endif
11
12#endif
diff --git a/keyboards/tv44/keymaps/tong92/keymap.c b/keyboards/tv44/keymaps/tong92/keymap.c
new file mode 100644
index 000000000..4a16b3554
--- /dev/null
+++ b/keyboards/tv44/keymaps/tong92/keymap.c
@@ -0,0 +1,138 @@
1// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
2// this is the style you want to emulate.
3//Author: tong92 <tong92power@gmail.com>
4
5#include "tv44.h"
6#include "action_layer.h"
7#include "eeconfig.h"
8#ifdef BACKLIGHT_ENABLE
9 #include "backlight.h"
10#endif
11
12// Fillers to make layering more clear
13#define _______ KC_TRNS
14#define LOWER F(1)
15#define RAISE F(2)
16#define FTN MO(4)
17#define MOUSE M(10)
18#define GO_DEFT M(99)
19#define XXXXXXX KC_NO
20
21const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
22
23/* Qwerty
24 * ,--------------------------------------------------------------------------.
25 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
26 * |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
27 * | Ctrl | A | S | D | F | G | H | J | K | L | ; | Enter|
28 * |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
29 * | Shift | Z | X | C | V | B | N | M | , | . | / |Shift|
30 * |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
31 * | Ftn1 | GUI | Alt | Space/LOWER | Space/RAISE | ' | [ | ] | Alt |
32 * `--------------------------------------------------------------------------'
33 */
34[0] = {
35{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
36{KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT},
37{KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT,KC_SLSH,KC_RSFT },
38{FTN ,KC_LGUI,KC_LALT,LOWER,XXXXXXX,XXXXXXX,XXXXXXX,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,KC_RALT}
39},
40/* LOWER
41 * ,--------------------------------------------------------------------------.
42 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
43 * |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
44 * | | F1 | F2 | F3 | F4 | F5 | F6 | - | + | [ | ] | \ |
45 * |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
46 * | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
47 * |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
48 * | | | | | | END | LEFT| Down|RIGHT|
49 * `--------------------------------------------------------------------------'
50 */
51[1] = {
52{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
53{_______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS },
54{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN },
55{XXXXXXX,_______,_______,_______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT}
56},
57/* RAISE
58 * ,--------------------------------------------------------------------------.
59 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
60 * |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
61 * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | { | } | | |
62 * |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
63 * | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
64 * |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
65 * | | | | | | END | LEFT| Down|RIGHT|
66 * `--------------------------------------------------------------------------'
67 */
68[2] ={
69{KC_TILD,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______ },
70{_______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS,KC_EQL, KC_LCBR,KC_RCBR,KC_PIPE },
71{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN },
72{XXXXXXX,_______,_______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT}
73},
74/* FTN
75 * ,--------------------------------------------------------------------------.
76 * | ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DELET |
77 * |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
78 * | |WinLe|WinDo|WinRi| |Al+Ca|CapsL| LEFT| DOWN|RIGHT| | |
79 * |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
80 * | |WinLW|WinRW| | |Ct+Ca|ScroL| HOME| | END | | Ctrl|
81 * |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
82 * | | DeskL | DeskR| Task Manager| DeskX | MOUSE| | | LED |
83 * `--------------------------------------------------------------------------'
84 */
85[4] = {
86{KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DELT},
87{_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT) ,XXXXXXX ,LALT(KC_CAPS),KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX},
88{_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX ,LCTL(KC_CAPS),KC_SLCK,KC_HOME,XXXXXXX,KC_END,XXXXXXX,KC_RCTL},
89{_______,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LCTL(LALT(KC_DELT)),XXXXXXX,XXXXXXX,XXXXXXX,LGUI(LCTL(KC_F4)),MOUSE,XXXXXXX,XXXXXXX,M(0)}
90},
91/* MOUSE
92 * ,--------------------------------------------------------------------------.
93 * | | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| | RESET |
94 * |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
95 * | | |Mo_Le|Mo_Do|Mo_Ri| | |M_Bt1|M_WhD|M_Bt2| | |
96 * |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
97 * | | | | | | | |M_AC0|M_AC1|M_AC2| | |
98 * |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
99 * | | | | GO_DEFAULT | GO_DEFAULT | | | | |
100 * `--------------------------------------------------------------------------'
101 */
102[10] ={
103{XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,RESET},
104{XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R,XXXXXXX,XXXXXXX,KC_BTN1,KC_WH_D,KC_BTN2,XXXXXXX,XXXXXXX},
105{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,XXXXXXX},
106{XXXXXXX,XXXXXXX,XXXXXXX,GO_DEFT,XXXXXXX,XXXXXXX,XXXXXXX,GO_DEFT,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX}
107}
108};
109
110const uint16_t PROGMEM fn_actions[] = {
111 [1] = ACTION_LAYER_TAP_KEY(1, KC_SPC),
112 [2] = ACTION_LAYER_TAP_KEY(2, KC_SPC)
113};
114
115const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
116{
117 switch(id) {
118 case 0:
119 if (record->event.pressed) {
120 #ifdef BACKLIGHT_ENABLE
121 backlight_step();
122 #endif
123 }
124 break;
125 case 10:
126 if (record->event.pressed) {
127 layer_on(10);
128 }
129 break;
130 case 99:
131 if (record->event.pressed) {
132 layer_off(10);
133 layer_off(4);
134 }
135 break;
136 }
137 return MACRO_NONE;
138}; \ No newline at end of file
diff --git a/keyboards/tv44/keymaps/tong92/readme.md b/keyboards/tv44/keymaps/tong92/readme.md
new file mode 100644
index 000000000..820857256
--- /dev/null
+++ b/keyboards/tv44/keymaps/tong92/readme.md
@@ -0,0 +1,52 @@
1# The tong92's keymap for tv44
2
3- Arrow Layout (45key)
4- my keymap for Window User
5- Mouse Layer : space -> Default Layer
6
7## Qwerty
8 ,--------------------------------------------------------------------------.
9 | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
10 |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
11 | Ctrl | A | S | D | F | G | H | J | K | L | ; | Enter|
12 |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
13 | Shift | Z | X | C | V | B | N | M | , | . | / |Shift|
14 |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
15 | Ftn1 | GUI | Alt | Space/LOWER | Space/RAISE | ' | [ | ] | Alt |
16 `--------------------------------------------------------------------------'
17
18
19## RAISE
20 ,--------------------------------------------------------------------------.
21 | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
22 |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
23 | | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | { | } | | |
24 |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
25 | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo|
26 |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
27 | | | | | | END | LEFT| Down|RIGHT|
28 `--------------------------------------------------------------------------'
29
30
31## FTN
32 ,--------------------------------------------------------------------------.
33 | ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DELET |
34 |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
35 | |WinLe|WinDo|WinRi| |Al+Ca|CapsL| LEFT| DOWN|RIGHT| | |
36 |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
37 | |WinLW|WinRW| | |Ct+Ca|ScroL| HOME| | END | | Ctrl|
38 |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
39 | | DeskL | DeskR| Task Manager| DeskX | MOUSE| | | LED |
40 `--------------------------------------------------------------------------'
41
42
43## MOUSE
44 ,--------------------------------------------------------------------------.
45 | | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| | RESET |
46 |------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-------|
47 | | |Mo_Le|Mo_Do|Mo_Ri| | |M_Bt1|M_WhD|M_Bt2| | |
48 |-------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`------|
49 | | | | | | | |M_AC0|M_AC1|M_AC2| | |
50 |--------`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----`-----|
51 | | | | GO_DEFAULT | GO_DEFAULT | | | | |
52 `--------------------------------------------------------------------------'
diff --git a/keyboards/tv44/keymaps/xyverz/keymap.c b/keyboards/tv44/keymaps/xyverz/keymap.c
index 8cbcf8d35..00347b019 100644
--- a/keyboards/tv44/keymaps/xyverz/keymap.c
+++ b/keyboards/tv44/keymaps/xyverz/keymap.c
@@ -22,38 +22,38 @@ extern keymap_config_t keymap_config;
22 22
23const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 23const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
24 [_DV] = { /* 0: Dvorak */ 24 [_DV] = { /* 0: Dvorak */
25 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC }, 25 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH },
26 {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT }, 26 {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, LT(_L2, KC_MINS)},
27 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT }, 27 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT },
28 {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, MO(_L2) } 28 {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_BSLS, KC_EQL, XXXXXXX, KC_ENT }
29 }, 29 },
30 30
31 [_QW] = { /* 1: Qwerty */ 31 [_QW] = { /* 1: Qwerty */
32 {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 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
33 {MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT }, 33 {MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_L2, KC_QUOT)},
34 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, 34 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT },
35 {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, MO(_L2) } 35 {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, KC_ENT }
36 }, 36 },
37 37
38 [_CM] = { /* 2: Colemak */ 38 [_CM] = { /* 2: Colemak */
39 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC }, 39 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC },
40 {MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT }, 40 {MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, LT(_L2, KC_QUOT)},
41 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, 41 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT },
42 {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, MO(_L2) } 42 {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, KC_ENT }
43 }, 43 },
44 44
45 [_L1] = {/* 1: FN 1 */ 45 [_L1] = {/* 1: FN 1 */
46 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL }, 46 {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL },
47 {_______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______ }, 47 {_______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______ },
48 {_______, _______, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT }, 48 {_______, _______, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT },
49 {KC_ESC, KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_SLSH, _______, _______ } 49 {KC_ESC, KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_EQL, _______, _______ }
50 }, 50 },
51 51
52 [_L2] = { /* 2: FN 2 */ 52 [_L2] = { /* 2: FN 2 */
53 {KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_ESC }, 53 {KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC },
54 {_______, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_VOLU, KC_ENT }, 54 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_HOME, KC_PGUP, KC_VOLU, _______ },
55 {_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_VOLD, _______ }, 55 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_END, KC_PGDN, KC_VOLD, _______ },
56 {QWERTY, DVORAK, COLEMAK, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______ } 56 {QWERTY, DVORAK, COLEMAK, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_PLUS, _______, _______ }
57 } 57 }
58 58
59}; 59};
diff --git a/keyboards/xd60/keymaps/cheese/README.md b/keyboards/xd60/keymaps/cheese/README.md
new file mode 100644
index 000000000..8a5b97c03
--- /dev/null
+++ b/keyboards/xd60/keymaps/cheese/README.md
@@ -0,0 +1,13 @@
1# cheese's Layout
2Customized xd60 keymap
3
4![Base Layout](base_layout.png "Base Layout")
5![Fn Layout](fn_layout.png "Fn Layout")
6
7## Programming Instructions:
8`cd` into keymap directory, `make dfu`
9
10## Features
11- Media keys and movement keys setup like on the pok3r
12- Lower right movement keys setup like on the fc660m (fn+direction for home/end/page up and down)
13- Caps lock can be triggered by pressing both shift keys at the same time (and deactivated the same way)
diff --git a/keyboards/xd60/keymaps/cheese/base_layout.png b/keyboards/xd60/keymaps/cheese/base_layout.png
new file mode 100644
index 000000000..211c4c731
--- /dev/null
+++ b/keyboards/xd60/keymaps/cheese/base_layout.png
Binary files differ
diff --git a/keyboards/xd60/keymaps/cheese/fn_layout.png b/keyboards/xd60/keymaps/cheese/fn_layout.png
new file mode 100644
index 000000000..fe5ae99e0
--- /dev/null
+++ b/keyboards/xd60/keymaps/cheese/fn_layout.png
Binary files differ
diff --git a/keyboards/xd60/keymaps/cheese/keymap.c b/keyboards/xd60/keymaps/cheese/keymap.c
new file mode 100644
index 000000000..25919a41f
--- /dev/null
+++ b/keyboards/xd60/keymaps/cheese/keymap.c
@@ -0,0 +1,67 @@
1#include "xd60.h"
2#include "action_layer.h"
3
4// Each layer gets a name for readability.
5// The underscores don't mean anything - you can
6// have a layer called STUFF or any other name.
7// Layer names don't all need to be of the same
8// length, and you can also skip them entirely
9// and just use numbers.
10#define _BL 0
11#define _FL 1
12#define _LS 2
13#define _RS 3
14
15const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
16
17 /* (Base Layer) Default Layer
18 * ,-----------------------------------------------------------.
19 * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
20 * |-----------------------------------------------------------|
21 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |
22 * |-----------------------------------------------------------|
23 * |FUNCTION| A| S| D| F| G| H| J| K| L| ;| '|Return|
24 * |-----------------------------------------------------------|
25 * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
26 * |-----------------------------------------------------------|
27 * |Ctrl|Gui |Alt | Space |FN|Left|Up|Down|Right|
28 * `-----------------------------------------------------------'
29 */
30 [_BL] = KEYMAP(
31 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \
32 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
33 MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
34 F(0), KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(1), F(1), F(1), \
35 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT),
36
37// Function Layer
38 [_FL] = KEYMAP(
39 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \
40 KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CALC, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \
41 KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, \
42 KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, \
43 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_PGDN, KC_END),
44
45// Left Shift Layer
46 [_LS] = KEYMAP(
47 KC_GRV, 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, \
48 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, \
49 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, \
50 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_CAPS, KC_CAPS, KC_CAPS, \
51 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
52
53// Right Shift Layer
54 [_RS] = KEYMAP(
55 KC_GRV, 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, \
56 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, \
57 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, \
58 KC_CAPS, 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, \
59 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
60
61};
62
63// Custom Actions
64const uint16_t PROGMEM fn_actions[] = {
65 [0] = ACTION_LAYER_MODS(_LS, MOD_LSFT),
66 [1] = ACTION_LAYER_MODS(_RS, MOD_RSFT),
67};
diff --git a/license_GPLv2.md b/license_GPLv2.md
new file mode 100644
index 000000000..b017086e9
--- /dev/null
+++ b/license_GPLv2.md
@@ -0,0 +1,264 @@
1The GNU General Public License, Version 2, June 1991 (GPLv2)
2============================================================
3
4> Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
6
7Everyone is permitted to copy and distribute verbatim copies of this license
8document, but changing it is not allowed.
9
10
11Preamble
12--------
13
14The licenses for most software are designed to take away your freedom to share
15and change it. By contrast, the GNU General Public License is intended to
16guarantee your freedom to share and change free software--to make sure the
17software is free for all its users. This General Public License applies to most
18of the Free Software Foundation's software and to any other program whose
19authors commit to using it. (Some other Free Software Foundation software is
20covered by the GNU Lesser General Public License instead.) You can apply it to
21your programs, too.
22
23When we speak of free software, we are referring to freedom, not price. Our
24General Public Licenses are designed to make sure that you have the freedom to
25distribute copies of free software (and charge for this service if you wish),
26that you receive source code or can get it if you want it, that you can change
27the software or use pieces of it in new free programs; and that you know you can
28do these things.
29
30To protect your rights, we need to make restrictions that forbid anyone to deny
31you these rights or to ask you to surrender the rights. These restrictions
32translate to certain responsibilities for you if you distribute copies of the
33software, or if you modify it.
34
35For example, if you distribute copies of such a program, whether gratis or for a
36fee, you must give the recipients all the rights that you have. You must make
37sure that they, too, receive or can get the source code. And you must show them
38these terms so they know their rights.
39
40We protect your rights with two steps: (1) copyright the software, and (2) offer
41you this license which gives you legal permission to copy, distribute and/or
42modify the software.
43
44Also, for each author's protection and ours, we want to make certain that
45everyone understands that there is no warranty for this free software. If the
46software is modified by someone else and passed on, we want its recipients to
47know that what they have is not the original, so that any problems introduced by
48others will not reflect on the original authors' reputations.
49
50Finally, any free program is threatened constantly by software patents. We wish
51to avoid the danger that redistributors of a free program will individually
52obtain patent licenses, in effect making the program proprietary. To prevent
53this, we have made it clear that any patent must be licensed for everyone's free
54use or not licensed at all.
55
56The precise terms and conditions for copying, distribution and modification
57follow.
58
59
60Terms And Conditions For Copying, Distribution And Modification
61---------------------------------------------------------------
62
63**0.** This License applies to any program or other work which contains a notice
64placed by the copyright holder saying it may be distributed under the terms of
65this General Public License. The "Program", below, refers to any such program or
66work, and a "work based on the Program" means either the Program or any
67derivative work under copyright law: that is to say, a work containing the
68Program or a portion of it, either verbatim or with modifications and/or
69translated into another language. (Hereinafter, translation is included without
70limitation in the term "modification".) Each licensee is addressed as "you".
71
72Activities other than copying, distribution and modification are not covered by
73this License; they are outside its scope. The act of running the Program is not
74restricted, and the output from the Program is covered only if its contents
75constitute a work based on the Program (independent of having been made by
76running the Program). Whether that is true depends on what the Program does.
77
78**1.** You may copy and distribute verbatim copies of the Program's source code
79as you receive it, in any medium, provided that you conspicuously and
80appropriately publish on each copy an appropriate copyright notice and
81disclaimer of warranty; keep intact all the notices that refer to this License
82and to the absence of any warranty; and give any other recipients of the Program
83a copy of this License along with the Program.
84
85You may charge a fee for the physical act of transferring a copy, and you may at
86your option offer warranty protection in exchange for a fee.
87
88**2.** You may modify your copy or copies of the Program or any portion of it,
89thus forming a work based on the Program, and copy and distribute such
90modifications or work under the terms of Section 1 above, provided that you also
91meet all of these conditions:
92
93* **a)** You must cause the modified files to carry prominent notices stating
94 that you changed the files and the date of any change.
95
96* **b)** You must cause any work that you distribute or publish, that in whole
97 or in part contains or is derived from the Program or any part thereof, to
98 be licensed as a whole at no charge to all third parties under the terms of
99 this License.
100
101* **c)** If the modified program normally reads commands interactively when
102 run, you must cause it, when started running for such interactive use in the
103 most ordinary way, to print or display an announcement including an
104 appropriate copyright notice and a notice that there is no warranty (or
105 else, saying that you provide a warranty) and that users may redistribute
106 the program under these conditions, and telling the user how to view a copy
107 of this License. (Exception: if the Program itself is interactive but does
108 not normally print such an announcement, your work based on the Program is
109 not required to print an announcement.)
110
111These requirements apply to the modified work as a whole. If identifiable
112sections of that work are not derived from the Program, and can be reasonably
113considered independent and separate works in themselves, then this License, and
114its terms, do not apply to those sections when you distribute them as separate
115works. But when you distribute the same sections as part of a whole which is a
116work based on the Program, the distribution of the whole must be on the terms of
117this License, whose permissions for other licensees extend to the entire whole,
118and thus to each and every part regardless of who wrote it.
119
120Thus, it is not the intent of this section to claim rights or contest your
121rights to work written entirely by you; rather, the intent is to exercise the
122right to control the distribution of derivative or collective works based on the
123Program.
124
125In addition, mere aggregation of another work not based on the Program with the
126Program (or with a work based on the Program) on a volume of a storage or
127distribution medium does not bring the other work under the scope of this
128License.
129
130**3.** You may copy and distribute the Program (or a work based on it, under
131Section 2) in object code or executable form under the terms of Sections 1 and 2
132above provided that you also do one of the following:
133
134* **a)** Accompany it with the complete corresponding machine-readable source
135 code, which must be distributed under the terms of Sections 1 and 2 above on
136 a medium customarily used for software interchange; or,
137
138* **b)** Accompany it with a written offer, valid for at least three years, to
139 give any third party, for a charge no more than your cost of physically
140 performing source distribution, a complete machine-readable copy of the
141 corresponding source code, to be distributed under the terms of Sections 1
142 and 2 above on a medium customarily used for software interchange; or,
143
144* **c)** Accompany it with the information you received as to the offer to
145 distribute corresponding source code. (This alternative is allowed only for
146 noncommercial distribution and only if you received the program in object
147 code or executable form with such an offer, in accord with Subsection b
148 above.)
149
150The source code for a work means the preferred form of the work for making
151modifications to it. For an executable work, complete source code means all the
152source code for all modules it contains, plus any associated interface
153definition files, plus the scripts used to control compilation and installation
154of the executable. However, as a special exception, the source code distributed
155need not include anything that is normally distributed (in either source or
156binary form) with the major components (compiler, kernel, and so on) of the
157operating system on which the executable runs, unless that component itself
158accompanies the executable.
159
160If distribution of executable or object code is made by offering access to copy
161from a designated place, then offering equivalent access to copy the source code
162from the same place counts as distribution of the source code, even though third
163parties are not compelled to copy the source along with the object code.
164
165**4.** You may not copy, modify, sublicense, or distribute the Program except as
166expressly provided under this License. Any attempt otherwise to copy, modify,
167sublicense or distribute the Program is void, and will automatically terminate
168your rights under this License. However, parties who have received copies, or
169rights, from you under this License will not have their licenses terminated so
170long as such parties remain in full compliance.
171
172**5.** You are not required to accept this License, since you have not signed
173it. However, nothing else grants you permission to modify or distribute the
174Program or its derivative works. These actions are prohibited by law if you do
175not accept this License. Therefore, by modifying or distributing the Program (or
176any work based on the Program), you indicate your acceptance of this License to
177do so, and all its terms and conditions for copying, distributing or modifying
178the Program or works based on it.
179
180**6.** Each time you redistribute the Program (or any work based on the
181Program), the recipient automatically receives a license from the original
182licensor to copy, distribute or modify the Program subject to these terms and
183conditions. You may not impose any further restrictions on the recipients'
184exercise of the rights granted herein. You are not responsible for enforcing
185compliance by third parties to this License.
186
187**7.** If, as a consequence of a court judgment or allegation of patent
188infringement or for any other reason (not limited to patent issues), conditions
189are imposed on you (whether by court order, agreement or otherwise) that
190contradict the conditions of this License, they do not excuse you from the
191conditions of this License. If you cannot distribute so as to satisfy
192simultaneously your obligations under this License and any other pertinent
193obligations, then as a consequence you may not distribute the Program at all.
194For example, if a patent license would not permit royalty-free redistribution of
195the Program by all those who receive copies directly or indirectly through you,
196then the only way you could satisfy both it and this License would be to refrain
197entirely from distribution of the Program.
198
199If any portion of this section is held invalid or unenforceable under any
200particular circumstance, the balance of the section is intended to apply and the
201section as a whole is intended to apply in other circumstances.
202
203It is not the purpose of this section to induce you to infringe any patents or
204other property right claims or to contest validity of any such claims; this
205section has the sole purpose of protecting the integrity of the free software
206distribution system, which is implemented by public license practices. Many
207people have made generous contributions to the wide range of software
208distributed through that system in reliance on consistent application of that
209system; it is up to the author/donor to decide if he or she is willing to
210distribute software through any other system and a licensee cannot impose that
211choice.
212
213This section is intended to make thoroughly clear what is believed to be a
214consequence of the rest of this License.
215
216**8.** If the distribution and/or use of the Program is restricted in certain
217countries either by patents or by copyrighted interfaces, the original copyright
218holder who places the Program under this License may add an explicit
219geographical distribution limitation excluding those countries, so that
220distribution is permitted only in or among countries not thus excluded. In such
221case, this License incorporates the limitation as if written in the body of this
222License.
223
224**9.** The Free Software Foundation may publish revised and/or new versions of
225the General Public License from time to time. Such new versions will be similar
226in spirit to the present version, but may differ in detail to address new
227problems or concerns.
228
229Each version is given a distinguishing version number. If the Program specifies
230a version number of this License which applies to it and "any later version",
231you have the option of following the terms and conditions either of that version
232or of any later version published by the Free Software Foundation. If the
233Program does not specify a version number of this License, you may choose any
234version ever published by the Free Software Foundation.
235
236**10.** If you wish to incorporate parts of the Program into other free programs
237whose distribution conditions are different, write to the author to ask for
238permission. For software which is copyrighted by the Free Software Foundation,
239write to the Free Software Foundation; we sometimes make exceptions for this.
240Our decision will be guided by the two goals of preserving the free status of
241all derivatives of our free software and of promoting the sharing and reuse of
242software generally.
243
244
245No Warranty
246-----------
247
248**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
249THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
250STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
251"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
252BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
253PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
254PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
255ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
256
257**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
258WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
259THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
260GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
261INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
262BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
263FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
264OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
diff --git a/license_GPLv3.md b/license_GPLv3.md
new file mode 100644
index 000000000..2061be2b7
--- /dev/null
+++ b/license_GPLv3.md
@@ -0,0 +1,656 @@
1The GNU General Public License, Version 3, 29 June 2007 (GPLv3)
2===============================================================
3
4> Copyright &copy; 2007
5> Free Software Foundation, Inc.
6> <<http://fsf.org/>>
7
8Everyone is permitted to copy and distribute verbatim copies of this license
9document, but changing it is not allowed.
10
11
12Preamble
13--------
14
15The GNU General Public License is a free, copyleft license for software and
16other kinds of works.
17
18The licenses for most software and other practical works are designed to take
19away your freedom to share and change the works. By contrast, the GNU General
20Public License is intended to guarantee your freedom to share and change all
21versions of a program--to make sure it remains free software for all its users.
22We, the Free Software Foundation, use the GNU General Public License for most of
23our software; it applies also to any other work released this way by its
24authors. You can apply it to your programs, too.
25
26When we speak of free software, we are referring to freedom, not price. Our
27General Public Licenses are designed to make sure that you have the freedom to
28distribute copies of free software (and charge for them if you wish), that you
29receive source code or can get it if you want it, that you can change the
30software or use pieces of it in new free programs, and that you know you can do
31these things.
32
33To protect your rights, we need to prevent others from denying you these rights
34or asking you to surrender the rights. Therefore, you have certain
35responsibilities if you distribute copies of the software, or if you modify it:
36responsibilities to respect the freedom of others.
37
38For example, if you distribute copies of such a program, whether gratis or for a
39fee, you must pass on to the recipients the same freedoms that you received. You
40must make sure that they, too, receive or can get the source code. And you must
41show them these terms so they know their rights.
42
43Developers that use the GNU GPL protect your rights with two steps: (1) assert
44copyright on the software, and (2) offer you this License giving you legal
45permission to copy, distribute and/or modify it.
46
47For the developers' and authors' protection, the GPL clearly explains that there
48is no warranty for this free software. For both users' and authors' sake, the
49GPL requires that modified versions be marked as changed, so that their problems
50will not be attributed erroneously to authors of previous versions.
51
52Some devices are designed to deny users access to install or run modified
53versions of the software inside them, although the manufacturer can do so. This
54is fundamentally incompatible with the aim of protecting users' freedom to
55change the software. The systematic pattern of such abuse occurs in the area of
56products for individuals to use, which is precisely where it is most
57unacceptable. Therefore, we have designed this version of the GPL to prohibit
58the practice for those products. If such problems arise substantially in other
59domains, we stand ready to extend this provision to those domains in future
60versions of the GPL, as needed to protect the freedom of users.
61
62Finally, every program is threatened constantly by software patents. States
63should not allow patents to restrict development and use of software on
64general-purpose computers, but in those that do, we wish to avoid the special
65danger that patents applied to a free program could make it effectively
66proprietary. To prevent this, the GPL assures that patents cannot be used to
67render the program non-free.
68
69The precise terms and conditions for copying, distribution and modification
70follow.
71
72
73TERMS AND CONDITIONS
74--------------------
75
76
77### 0. Definitions.
78
79"This License refers to version 3 of the GNU General Public License.
80
81"Copyright" also means copyright-like laws that apply to other kinds of works,
82such as semiconductor masks.
83
84"The Program" refers to any copyrightable work licensed under this License. Each
85licensee is addressed as "you". "Licensees" and "recipients" may be individuals
86or organizations.
87
88To "modify" a work means to copy from or adapt all or part of the work in a
89fashion requiring copyright permission, other than the making of an exact copy.
90The resulting work is called a "modified version" of the earlier work or a work
91"based on" the earlier work.
92
93A "covered work" means either the unmodified Program or a work based on the
94Program.
95
96To "propagate" a work means to do anything with it that, without permission,
97would make you directly or secondarily liable for infringement under applicable
98copyright law, except executing it on a computer or modifying a private copy.
99Propagation includes copying, distribution (with or without modification),
100making available to the public, and in some countries other activities as well.
101
102To "convey" a work means any kind of propagation that enables other parties to
103make or receive copies. Mere interaction with a user through a computer network,
104with no transfer of a copy, is not conveying.
105
106An interactive user interface displays "Appropriate Legal Notices" to the extent
107that it includes a convenient and prominently visible feature that (1) displays
108an appropriate copyright notice, and (2) tells the user that there is no
109warranty for the work (except to the extent that warranties are provided), that
110licensees may convey the work under this License, and how to view a copy of this
111License. If the interface presents a list of user commands or options, such as a
112menu, a prominent item in the list meets this criterion.
113
114
115### 1. Source Code.
116
117The "source code" for a work means the preferred form of the work for making
118modifications to it. "Object code" means any non-source form of a work.
119
120A "Standard Interface" means an interface that either is an official standard
121defined by a recognized standards body, or, in the case of interfaces specified
122for a particular programming language, one that is widely used among developers
123working in that language.
124
125The "System Libraries" of an executable work include anything, other than the
126work as a whole, that (a) is included in the normal form of packaging a Major
127Component, but which is not part of that Major Component, and (b) serves only to
128enable use of the work with that Major Component, or to implement a Standard
129Interface for which an implementation is available to the public in source code
130form. A "Major Component", in this context, means a major essential component
131(kernel, window system, and so on) of the specific operating system (if any) on
132which the executable work runs, or a compiler used to produce the work, or an
133object code interpreter used to run it.
134
135The "Corresponding Source" for a work in object code form means all the source
136code needed to generate, install, and (for an executable work) run the object
137code and to modify the work, including scripts to control those activities.
138However, it does not include the work's System Libraries, or general-purpose
139tools or generally available free programs which are used unmodified in
140performing those activities but which are not part of the work. For example,
141Corresponding Source includes interface definition files associated with source
142files for the work, and the source code for shared libraries and dynamically
143linked subprograms that the work is specifically designed to require, such as by
144intimate data communication or control flow between those subprograms and other
145parts of the work.
146
147The Corresponding Source need not include anything that users can regenerate
148automatically from other parts of the Corresponding Source.
149
150The Corresponding Source for a work in source code form is that same work.
151
152
153### 2. Basic Permissions.
154
155All rights granted under this License are granted for the term of copyright on
156the Program, and are irrevocable provided the stated conditions are met. This
157License explicitly affirms your unlimited permission to run the unmodified
158Program. The output from running a covered work is covered by this License only
159if the output, given its content, constitutes a covered work. This License
160acknowledges your rights of fair use or other equivalent, as provided by
161copyright law.
162
163You may make, run and propagate covered works that you do not convey, without
164conditions so long as your license otherwise remains in force. You may convey
165covered works to others for the sole purpose of having them make modifications
166exclusively for you, or provide you with facilities for running those works,
167provided that you comply with the terms of this License in conveying all
168material for which you do not control copyright. Those thus making or running
169the covered works for you must do so exclusively on your behalf, under your
170direction and control, on terms that prohibit them from making any copies of
171your copyrighted material outside their relationship with you.
172
173Conveying under any other circumstances is permitted solely under the conditions
174stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
175
176
177### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
178
179No covered work shall be deemed part of an effective technological measure under
180any applicable law fulfilling obligations under article 11 of the WIPO copyright
181treaty adopted on 20 December 1996, or similar laws prohibiting or restricting
182circumvention of such measures.
183
184When you convey a covered work, you waive any legal power to forbid
185circumvention of technological measures to the extent such circumvention is
186effected by exercising rights under this License with respect to the covered
187work, and you disclaim any intention to limit operation or modification of the
188work as a means of enforcing, against the work's users, your or third parties'
189legal rights to forbid circumvention of technological measures.
190
191
192### 4. Conveying Verbatim Copies.
193
194You may convey verbatim copies of the Program's source code as you receive it,
195in any medium, provided that you conspicuously and appropriately publish on each
196copy an appropriate copyright notice; keep intact all notices stating that this
197License and any non-permissive terms added in accord with section 7 apply to the
198code; keep intact all notices of the absence of any warranty; and give all
199recipients a copy of this License along with the Program.
200
201You may charge any price or no price for each copy that you convey, and you may
202offer support or warranty protection for a fee.
203
204
205### 5. Conveying Modified Source Versions.
206
207You may convey a work based on the Program, or the modifications to produce it
208from the Program, in the form of source code under the terms of section 4,
209provided that you also meet all of these conditions:
210
211* **a)** The work must carry prominent notices stating that you modified it,
212 and giving a relevant date.
213
214* **b)** The work must carry prominent notices stating that it is released
215 under this License and any conditions added under section 7. This
216 requirement modifies the requirement in section 4 to "keep intact all
217 notices".
218
219* **c)** You must license the entire work, as a whole, under this License to
220 anyone who comes into possession of a copy. This License will therefore
221 apply, along with any applicable section 7 additional terms, to the whole of
222 the work, and all its parts, regardless of how they are packaged. This
223 License gives no permission to license the work in any other way, but it
224 does not invalidate such permission if you have separately received it.
225
226* **d)** If the work has interactive user interfaces, each must display
227 Appropriate Legal Notices; however, if the Program has interactive
228 interfaces that do not display Appropriate Legal Notices, your work need not
229 make them do so.
230
231A compilation of a covered work with other separate and independent works,
232which are not by their nature extensions of the covered work, and which are
233not combined with it such as to form a larger program, in or on a volume of
234a storage or distribution medium, is called an "aggregate" if the
235compilation and its resulting copyright are not used to limit the access or
236legal rights of the compilation's users beyond what the individual works
237permit. Inclusion of a covered work in an aggregate does not cause this
238License to apply to the other parts of the aggregate.
239
240
241### 6. Conveying Non-Source Forms.
242
243You may convey a covered work in object code form under the terms of sections 4
244and 5, provided that you also convey the machine-readable Corresponding Source
245under the terms of this License, in one of these ways:
246
247* **a)** Convey the object code in, or embodied in, a physical product
248 (including a physical distribution medium), accompanied by the Corresponding
249 Source fixed on a durable physical medium customarily used for software
250 interchange.
251
252* **b)** Convey the object code in, or embodied in, a physical product
253 (including a physical distribution medium), accompanied by a written offer,
254 valid for at least three years and valid for as long as you offer spare
255 parts or customer support for that product model, to give anyone who
256 possesses the object code either (1) a copy of the Corresponding Source for
257 all the software in the product that is covered by this License, on a
258 durable physical medium customarily used for software interchange, for a
259 price no more than your reasonable cost of physically performing this
260 conveying of source, or (2) access to copy the Corresponding Source from a
261 network server at no charge.
262
263* **c)** Convey individual copies of the object code with a copy of the
264 written offer to provide the Corresponding Source. This alternative is
265 allowed only occasionally and noncommercially, and only if you received the
266 object code with such an offer, in accord with subsection 6b.
267
268* **d)** Convey the object code by offering access from a designated place
269 (gratis or for a charge), and offer equivalent access to the Corresponding
270 Source in the same way through the same place at no further charge. You need
271 not require recipients to copy the Corresponding Source along with the
272 object code. If the place to copy the object code is a network server, the
273 Corresponding Source may be on a different server (operated by you or a
274 third party) that supports equivalent copying facilities, provided you
275 maintain clear directions next to the object code saying where to find the
276 Corresponding Source. Regardless of what server hosts the Corresponding
277 Source, you remain obligated to ensure that it is available for as long as
278 needed to satisfy these requirements.
279
280* **e)** Convey the object code using peer-to-peer transmission, provided you
281 inform other peers where the object code and Corresponding Source of the
282 work are being offered to the general public at no charge under subsection
283 6d.
284
285A separable portion of the object code, whose source code is excluded from
286the Corresponding Source as a System Library, need not be included in
287conveying the object code work.
288
289A "User Product" is either (1) a "consumer product", which means any
290tangible personal property which is normally used for personal, family, or
291household purposes, or (2) anything designed or sold for incorporation into
292a dwelling. In determining whether a product is a consumer product, doubtful
293cases shall be resolved in favor of coverage. For a particular product
294received by a particular user, "normally used" refers to a typical or common
295use of that class of product, regardless of the status of the particular
296user or of the way in which the particular user actually uses, or expects or
297is expected to use, the product. A product is a consumer product regardless
298of whether the product has substantial commercial, industrial or non-
299consumer uses, unless such uses represent the only significant mode of use
300of the product.
301
302"Installation Information" for a User Product means any methods, procedures,
303authorization keys, or other information required to install and execute
304modified versions of a covered work in that User Product from a modified
305version of its Corresponding Source. The information must suffice to ensure
306that the continued functioning of the modified object code is in no case
307prevented or interfered with solely because modification has been made.
308
309If you convey an object code work under this section in, or with, or
310specifically for use in, a User Product, and the conveying occurs as part of
311a transaction in which the right of possession and use of the User Product
312is transferred to the recipient in perpetuity or for a fixed term
313(regardless of how the transaction is characterized), the Corresponding
314Source conveyed under this section must be accompanied by the Installation
315Information. But this requirement does not apply if neither you nor any
316third party retains the ability to install modified object code on the User
317Product (for example, the work has been installed in ROM).
318
319The requirement to provide Installation Information does not include a
320requirement to continue to provide support service, warranty, or updates for
321a work that has been modified or installed by the recipient, or for the User
322Product in which it has been modified or installed. Access to a network may
323be denied when the modification itself materially and adversely affects the
324operation of the network or violates the rules and protocols for
325communication across the network.
326
327Corresponding Source conveyed, and Installation Information provided, in
328accord with this section must be in a format that is publicly documented
329(and with an implementation available to the public in source code form),
330and must require no special password or key for unpacking, reading or
331copying.
332
333
334### 7. Additional Terms.
335
336"Additional permissions" are terms that supplement the terms of this License by
337making exceptions from one or more of its conditions. Additional permissions
338that are applicable to the entire Program shall be treated as though they were
339included in this License, to the extent that they are valid under applicable
340law. If additional permissions apply only to part of the Program, that part may
341be used separately under those permissions, but the entire Program remains
342governed by this License without regard to the additional permissions.
343
344When you convey a copy of a covered work, you may at your option remove any
345additional permissions from that copy, or from any part of it. (Additional
346permissions may be written to require their own removal in certain cases when
347you modify the work.) You may place additional permissions on material, added by
348you to a covered work, for which you have or can give appropriate copyright
349permission.
350
351Notwithstanding any other provision of this License, for material you add to a
352covered work, you may (if authorized by the copyright holders of that material)
353supplement the terms of this License with terms:
354
355* **a)** Disclaiming warranty or limiting liability differently from the terms
356 of sections 15 and 16 of this License; or
357
358* **b)** Requiring preservation of specified reasonable legal notices or
359 author attributions in that material or in the Appropriate Legal Notices
360 displayed by works containing it; or
361
362* **c)** Prohibiting misrepresentation of the origin of that material, or
363 requiring that modified versions of such material be marked in reasonable
364 ways as different from the original version; or
365
366* **d)** Limiting the use for publicity purposes of names of licensors or
367 authors of the material; or
368
369* **e)** Declining to grant rights under trademark law for use of some trade
370 names, trademarks, or service marks; or
371
372* **f)** Requiring indemnification of licensors and authors of that material
373 by anyone who conveys the material (or modified versions of it) with
374 contractual assumptions of liability to the recipient, for any liability
375 that these contractual assumptions directly impose on those licensors and
376 authors.
377
378All other non-permissive additional terms are considered "further restrictions"
379within the meaning of section 10. If the Program as you received it, or any part
380of it, contains a notice stating that it is governed by this License along with
381a term that is a further restriction, you may remove that term. If a license
382document contains a further restriction but permits relicensing or conveying
383under this License, you may add to a covered work material governed by the terms
384of that license document, provided that the further restriction does not survive
385such relicensing or conveying.
386
387If you add terms to a covered work in accord with this section, you must place,
388in the relevant source files, a statement of the additional terms that apply to
389those files, or a notice indicating where to find the applicable terms.
390
391Additional terms, permissive or non-permissive, may be stated in the form of a
392separately written license, or stated as exceptions; the above requirements
393apply either way.
394
395
396### 8. Termination.
397
398You may not propagate or modify a covered work except as expressly provided
399under this License. Any attempt otherwise to propagate or modify it is void, and
400will automatically terminate your rights under this License (including any
401patent licenses granted under the third paragraph of section 11).
402
403However, if you cease all violation of this License, then your license from a
404particular copyright holder is reinstated (a) provisionally, unless and until
405the copyright holder explicitly and finally terminates your license, and (b)
406permanently, if the copyright holder fails to notify you of the violation by
407some reasonable means prior to 60 days after the cessation.
408
409Moreover, your license from a particular copyright holder is reinstated
410permanently if the copyright holder notifies you of the violation by some
411reasonable means, this is the first time you have received notice of violation
412of this License (for any work) from that copyright holder, and you cure the
413violation prior to 30 days after your receipt of the notice.
414
415Termination of your rights under this section does not terminate the licenses of
416parties who have received copies or rights from you under this License. If your
417rights have been terminated and not permanently reinstated, you do not qualify
418to receive new licenses for the same material under section 10.
419
420
421### 9. Acceptance Not Required for Having Copies.
422
423You are not required to accept this License in order to receive or run a copy of
424the Program. Ancillary propagation of a covered work occurring solely as a
425consequence of using peer-to-peer transmission to receive a copy likewise does
426not require acceptance. However, nothing other than this License grants you
427permission to propagate or modify any covered work. These actions infringe
428copyright if you do not accept this License. Therefore, by modifying or
429propagating a covered work, you indicate your acceptance of this License to do
430so.
431
432
433### 10. Automatic Licensing of Downstream Recipients.
434
435Each time you convey a covered work, the recipient automatically receives a
436license from the original licensors, to run, modify and propagate that work,
437subject to this License. You are not responsible for enforcing compliance by
438third parties with this License.
439
440An "entity transaction" is a transaction transferring control of an
441organization, or substantially all assets of one, or subdividing an
442organization, or merging organizations. If propagation of a covered work results
443from an entity transaction, each party to that transaction who receives a copy
444of the work also receives whatever licenses to the work the party's predecessor
445in interest had or could give under the previous paragraph, plus a right to
446possession of the Corresponding Source of the work from the predecessor in
447interest, if the predecessor has it or can get it with reasonable efforts.
448
449You may not impose any further restrictions on the exercise of the rights
450granted or affirmed under this License. For example, you may not impose a
451license fee, royalty, or other charge for exercise of rights granted under this
452License, and you may not initiate litigation (including a cross-claim or
453counterclaim in a lawsuit) alleging that any patent claim is infringed by
454making, using, selling, offering for sale, or importing the Program or any
455portion of it.
456
457
458### 11. Patents.
459
460A "contributor" is a copyright holder who authorizes use under this License of
461the Program or a work on which the Program is based. The work thus licensed is
462called the contributor's "contributor version".
463
464A contributor's "essential patent claims" are all patent claims owned or
465controlled by the contributor, whether already acquired or hereafter acquired,
466that would be infringed by some manner, permitted by this License, of making,
467using, or selling its contributor version, but do not include claims that would
468be infringed only as a consequence of further modification of the contributor
469version. For purposes of this definition, "control" includes the right to grant
470patent sublicenses in a manner consistent with the requirements of this License.
471
472Each contributor grants you a non-exclusive, worldwide, royalty-free patent
473license under the contributor's essential patent claims, to make, use, sell,
474offer for sale, import and otherwise run, modify and propagate the contents of
475its contributor version.
476
477In the following three paragraphs, a "patent license" is any express agreement
478or commitment, however denominated, not to enforce a patent (such as an express
479permission to practice a patent or covenant not to sue for patent infringement).
480To "grant" such a patent license to a party means to make such an agreement or
481commitment not to enforce a patent against the party.
482
483If you convey a covered work, knowingly relying on a patent license, and the
484Corresponding Source of the work is not available for anyone to copy, free of
485charge and under the terms of this License, through a publicly available network
486server or other readily accessible means, then you must either (1) cause the
487Corresponding Source to be so available, or (2) arrange to deprive yourself of
488the benefit of the patent license for this particular work, or (3) arrange, in a
489manner consistent with the requirements of this License, to extend the patent
490license to downstream recipients. "Knowingly relying" means you have actual
491knowledge that, but for the patent license, your conveying the covered work in a
492country, or your recipient's use of the covered work in a country, would
493infringe one or more identifiable patents in that country that you have reason
494to believe are valid.
495
496If, pursuant to or in connection with a single transaction or arrangement, you
497convey, or propagate by procuring conveyance of, a covered work, and grant a
498patent license to some of the parties receiving the covered work authorizing
499them to use, propagate, modify or convey a specific copy of the covered work,
500then the patent license you grant is automatically extended to all recipients of
501the covered work and works based on it.
502
503A patent license is "discriminatory" if it does not include within the scope of
504its coverage, prohibits the exercise of, or is conditioned on the non- exercise
505of one or more of the rights that are specifically granted under this License.
506You may not convey a covered work if you are a party to an arrangement with a
507third party that is in the business of distributing software, under which you
508make payment to the third party based on the extent of your activity of
509conveying the work, and under which the third party grants, to any of the
510parties who would receive the covered work from you, a discriminatory patent
511license (a) in connection with copies of the covered work conveyed by you (or
512copies made from those copies), or (b) primarily for and in connection with
513specific products or compilations that contain the covered work, unless you
514entered into that arrangement, or that patent license was granted, prior to 28
515March 2007.
516
517Nothing in this License shall be construed as excluding or limiting any implied
518license or other defenses to infringement that may otherwise be available to you
519under applicable patent law.
520
521
522### 12. No Surrender of Others' Freedom.
523
524If conditions are imposed on you (whether by court order, agreement or
525otherwise) that contradict the conditions of this License, they do not excuse
526you from the conditions of this License. If you cannot convey a covered work so
527as to satisfy simultaneously your obligations under this License and any other
528pertinent obligations, then as a consequence you may not convey it at all. For
529example, if you agree to terms that obligate you to collect a royalty for
530further conveying from those to whom you convey the Program, the only way you
531could satisfy both those terms and this License would be to refrain entirely
532from conveying the Program.
533
534
535### 13. Use with the GNU Affero General Public License.
536
537Notwithstanding any other provision of this License, you have permission to link
538or combine any covered work with a work licensed under version 3 of the GNU
539Affero General Public License into a single combined work, and to convey the
540resulting work. The terms of this License will continue to apply to the part
541which is the covered work, but the special requirements of the GNU Affero
542General Public License, section 13, concerning interaction through a network
543will apply to the combination as such.
544
545
546### 14. Revised Versions of this License.
547
548The Free Software Foundation may publish revised and/or new versions of the GNU
549General Public License from time to time. Such new versions will be similar in
550spirit to the present version, but may differ in detail to address new problems
551or concerns.
552
553Each version is given a distinguishing version number. If the Program specifies
554that a certain numbered version of the GNU General Public License "or any later
555version" applies to it, you have the option of following the terms and
556conditions either of that numbered version or of any later version published by
557the Free Software Foundation. If the Program does not specify a version number
558of the GNU General Public License, you may choose any version ever published by
559the Free Software Foundation.
560
561If the Program specifies that a proxy can decide which future versions of the
562GNU General Public License can be used, that proxy's public statement of
563acceptance of a version permanently authorizes you to choose that version for
564the Program.
565
566Later license versions may give you additional or different permissions.
567However, no additional obligations are imposed on any author or copyright holder
568as a result of your choosing to follow a later version.
569
570
571### 15. Disclaimer of Warranty.
572
573THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
574EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
575PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
576EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
577MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
578QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
579DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
580
581
582### 16. Limitation of Liability.
583
584IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
585COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
586PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
587INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
588THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
589INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
590PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY
591HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
592
593### 17. Interpretation of Sections 15 and 16.
594
595If the disclaimer of warranty and limitation of liability provided above cannot
596be given local legal effect according to their terms, reviewing courts shall
597apply local law that most closely approximates an absolute waiver of all civil
598liability in connection with the Program, unless a warranty or assumption of
599liability accompanies a copy of the Program in return for a fee.
600
601END OF TERMS AND CONDITIONS
602
603
604How to Apply These Terms to Your New Programs
605---------------------------------------------
606
607If you develop a new program, and you want it to be of the greatest possible use
608to the public, the best way to achieve this is to make it free software which
609everyone can redistribute and change under these terms.
610
611To do so, attach the following notices to the program. It is safest to attach
612them to the start of each source file to most effectively state the exclusion of
613warranty; and each file should have at least the "copyright" line and a pointer
614to where the full notice is found.
615
616 <one line to give the program's name and a brief idea of what it does.>
617 Copyright (C) <year> <name of author>
618
619 This program is free software: you can redistribute it and/or modify it
620 under the terms of the GNU General Public License as published by the Free
621 Software Foundation, either version 3 of the License, or (at your option)
622 any later version.
623
624 This program is distributed in the hope that it will be useful, but WITHOUT
625 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
626 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
627 more details.
628
629 You should have received a copy of the GNU General Public License along with
630 this program. If not, see <http://www.gnu.org/licenses/>.
631
632Also add information on how to contact you by electronic and paper mail.
633
634If the program does terminal interaction, make it output a short notice like
635this when it starts in an interactive mode:
636
637 <program> Copyright (C) <year> <name of author>
638 This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
639 This is free software, and you are welcome to redistribute it under certain
640 conditions; type 'show c' for details.
641
642The hypothetical commands 'show w' and 'show c' should show the appropriate
643parts of the General Public License. Of course, your program's commands might be
644different; for a GUI interface, you would use an "about box".
645
646You should also get your employer (if you work as a programmer) or school, if
647any, to sign a "copyright disclaimer" for the program, if necessary. For more
648information on this, and how to apply and follow the GNU GPL, see
649<<http://www.gnu.org/licenses/>>.
650
651The GNU General Public License does not permit incorporating your program into
652proprietary programs. If your program is a subroutine library, you may consider
653it more useful to permit linking proprietary applications with the library. If
654this is what you want to do, use the GNU Lesser General Public License instead
655of this License. But first, please read
656<<http://www.gnu.org/philosophy/why-not-lgpl.html>>.
diff --git a/license_Modified_BSD.md b/license_Modified_BSD.md
new file mode 100644
index 000000000..3d5f00f2c
--- /dev/null
+++ b/license_Modified_BSD.md
@@ -0,0 +1,32 @@
1This software is licensed with a Modified BSD License.
2
3All of this is supposed to be Free Software, Open Source, DFSG-free,
4GPL-compatible, and OK to use in both free and proprietary applications.
5Additions and corrections to this file are welcome.
6
7Redistribution and use in source and binary forms, with or without
8modification, are permitted provided that the following conditions are met:
9
10* Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12
13* Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in
15 the documentation and/or other materials provided with the
16 distribution.
17
18* Neither the name of the copyright holders nor the names of
19 contributors may be used to endorse or promote products derived
20 from this software without specific prior written permission.
21
22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32POSSIBILITY OF SUCH DAMAGE.
diff --git a/quantum/analog.c b/quantum/analog.c
index 49b84ee0e..1ec38df75 100644
--- a/quantum/analog.c
+++ b/quantum/analog.c
@@ -1,3 +1,19 @@
1/* Copyright 2015 Jack Humbert
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// Simple analog to digitial conversion 17// Simple analog to digitial conversion
2 18
3#include <avr/io.h> 19#include <avr/io.h>
diff --git a/quantum/analog.h b/quantum/analog.h
index 9b95a93be..8d93de7dc 100644
--- a/quantum/analog.h
+++ b/quantum/analog.h
@@ -1,3 +1,19 @@
1/* Copyright 2015 Jack Humbert
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 _analog_h_included__ 17#ifndef _analog_h_included__
2#define _analog_h_included__ 18#define _analog_h_included__
3 19
diff --git a/quantum/api.c b/quantum/api.c
index 6a7c0a433..52dfe23e1 100644
--- a/quantum/api.c
+++ b/quantum/api.c
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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#include "api.h" 17#include "api.h"
2#include "quantum.h" 18#include "quantum.h"
3 19
@@ -176,4 +192,4 @@ void process_api(uint16_t length, uint8_t * data) {
176 // #endif 192 // #endif
177 } 193 }
178 194
179} \ No newline at end of file 195}
diff --git a/quantum/api.h b/quantum/api.h
index 00dcdb895..efc0ddca1 100644
--- a/quantum/api.h
+++ b/quantum/api.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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 _API_H_ 17#ifndef _API_H_
2#define _API_H_ 18#define _API_H_
3 19
@@ -56,4 +72,4 @@ bool process_api_keyboard(uint8_t length, uint8_t * data);
56__attribute__ ((weak)) 72__attribute__ ((weak))
57bool process_api_user(uint8_t length, uint8_t * data); 73bool process_api_user(uint8_t length, uint8_t * data);
58 74
59#endif \ No newline at end of file 75#endif
diff --git a/quantum/api/api_sysex.c b/quantum/api/api_sysex.c
index 868f854b9..6a2ee9012 100644
--- a/quantum/api/api_sysex.c
+++ b/quantum/api/api_sysex.c
@@ -1,3 +1,18 @@
1/* Copyright 2016 Jack Humbert, Fred Sundvik
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 */
1#include "api_sysex.h" 16#include "api_sysex.h"
2#include "sysex_tools.h" 17#include "sysex_tools.h"
3#include "print.h" 18#include "print.h"
diff --git a/quantum/api/api_sysex.h b/quantum/api/api_sysex.h
index b947b60e5..a23f00f57 100644
--- a/quantum/api/api_sysex.h
+++ b/quantum/api/api_sysex.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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 _API_SYSEX_H_ 17#ifndef _API_SYSEX_H_
2#define _API_SYSEX_H_ 18#define _API_SYSEX_H_
3 19
@@ -7,4 +23,4 @@ void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t * bytes,
7 23
8#define SEND_BYTES(mt, dt, b, l) send_bytes_sysex(mt, dt, b, l) 24#define SEND_BYTES(mt, dt, b, l) send_bytes_sysex(mt, dt, b, l)
9 25
10#endif \ No newline at end of file 26#endif
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c
index 2a315fd16..597073611 100644
--- a/quantum/audio/audio.c
+++ b/quantum/audio/audio.c
@@ -1,3 +1,18 @@
1/* Copyright 2016 Jack Humbert
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 */
1#include <stdio.h> 16#include <stdio.h>
2#include <string.h> 17#include <string.h>
3//#include <math.h> 18//#include <math.h>
@@ -89,15 +104,15 @@ void audio_init()
89 } 104 }
90 audio_config.raw = eeconfig_read_audio(); 105 audio_config.raw = eeconfig_read_audio();
91 106
92 // Set port PC6 (OC3A and /OC4A) as output 107 // Set port PC6 (OC3A and /OC4A) as output
93 DDRC |= _BV(PORTC6); 108 DDRC |= _BV(PORTC6);
94 109
95 DISABLE_AUDIO_COUNTER_3_ISR; 110 DISABLE_AUDIO_COUNTER_3_ISR;
96 111
97 // TCCR3A / TCCR3B: Timer/Counter #3 Control Registers 112 // TCCR3A / TCCR3B: Timer/Counter #3 Control Registers
98 // Compare Output Mode (COM3An) = 0b00 = Normal port operation, OC3A disconnected from PC6 113 // Compare Output Mode (COM3An) = 0b00 = Normal port operation, OC3A disconnected from PC6
99 // Waveform Generation Mode (WGM3n) = 0b1110 = Fast PWM Mode 14 (Period = ICR3, Duty Cycle = OCR3A) 114 // Waveform Generation Mode (WGM3n) = 0b1110 = Fast PWM Mode 14 (Period = ICR3, Duty Cycle = OCR3A)
100 // Clock Select (CS3n) = 0b010 = Clock / 8 115 // Clock Select (CS3n) = 0b010 = Clock / 8
101 TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30); 116 TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30);
102 TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30); 117 TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30);
103 118
@@ -106,6 +121,8 @@ void audio_init()
106 121
107void stop_all_notes() 122void stop_all_notes()
108{ 123{
124 dprintf("audio stop all notes");
125
109 if (!audio_initialized) { 126 if (!audio_initialized) {
110 audio_init(); 127 audio_init();
111 } 128 }
@@ -128,6 +145,8 @@ void stop_all_notes()
128 145
129void stop_note(float freq) 146void stop_note(float freq)
130{ 147{
148 dprintf("audio stop note freq=%d", (int)freq);
149
131 if (playing_note) { 150 if (playing_note) {
132 if (!audio_initialized) { 151 if (!audio_initialized) {
133 audio_init(); 152 audio_init();
@@ -183,159 +202,161 @@ float vibrato(float average_freq) {
183 202
184ISR(TIMER3_COMPA_vect) 203ISR(TIMER3_COMPA_vect)
185{ 204{
186 float freq; 205 float freq;
187 206
188 if (playing_note) { 207 if (playing_note) {
189 if (voices > 0) { 208 if (voices > 0) {
190 if (polyphony_rate > 0) { 209 if (polyphony_rate > 0) {
191 if (voices > 1) { 210 if (voices > 1) {
192 voice_place %= voices; 211 voice_place %= voices;
193 if (place++ > (frequencies[voice_place] / polyphony_rate / CPU_PRESCALER)) { 212 if (place++ > (frequencies[voice_place] / polyphony_rate / CPU_PRESCALER)) {
194 voice_place = (voice_place + 1) % voices; 213 voice_place = (voice_place + 1) % voices;
195 place = 0.0; 214 place = 0.0;
196 } 215 }
197 } 216 }
198 217
199 #ifdef VIBRATO_ENABLE 218 #ifdef VIBRATO_ENABLE
200 if (vibrato_strength > 0) { 219 if (vibrato_strength > 0) {
201 freq = vibrato(frequencies[voice_place]); 220 freq = vibrato(frequencies[voice_place]);
202 } else { 221 } else {
203 freq = frequencies[voice_place]; 222 freq = frequencies[voice_place];
204 } 223 }
205 #else 224 #else
206 freq = frequencies[voice_place]; 225 freq = frequencies[voice_place];
207 #endif 226 #endif
208 } else { 227 } else {
209 if (glissando) { 228 if (glissando) {
210 if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) { 229 if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) {
211 frequency = frequency * pow(2, 440/frequency/12/2); 230 frequency = frequency * pow(2, 440/frequency/12/2);
212 } else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) { 231 } else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) {
213 frequency = frequency * pow(2, -440/frequency/12/2); 232 frequency = frequency * pow(2, -440/frequency/12/2);
214 } else { 233 } else {
215 frequency = frequencies[voices - 1]; 234 frequency = frequencies[voices - 1];
216 } 235 }
217 } else { 236 } else {
218 frequency = frequencies[voices - 1]; 237 frequency = frequencies[voices - 1];
219 } 238 }
220 239
221 #ifdef VIBRATO_ENABLE 240 #ifdef VIBRATO_ENABLE
222 if (vibrato_strength > 0) { 241 if (vibrato_strength > 0) {
223 freq = vibrato(frequency); 242 freq = vibrato(frequency);
224 } else { 243 } else {
225 freq = frequency; 244 freq = frequency;
226 } 245 }
227 #else 246 #else
228 freq = frequency; 247 freq = frequency;
229 #endif 248 #endif
230 } 249 }
231 250
232 if (envelope_index < 65535) { 251 if (envelope_index < 65535) {
233 envelope_index++; 252 envelope_index++;
234 } 253 }
235 254
236 freq = voice_envelope(freq); 255 freq = voice_envelope(freq);
237 256
238 if (freq < 30.517578125) { 257 if (freq < 30.517578125) {
239 freq = 30.52; 258 freq = 30.52;
240 } 259 }
241 260
242 TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER)); 261 TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER));
243 TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre); 262 TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre);
244 } 263 }
245 } 264 }
246 265
247 if (playing_notes) { 266 if (playing_notes) {
248 if (note_frequency > 0) { 267 if (note_frequency > 0) {
249 #ifdef VIBRATO_ENABLE 268 #ifdef VIBRATO_ENABLE
250 if (vibrato_strength > 0) { 269 if (vibrato_strength > 0) {
251 freq = vibrato(note_frequency); 270 freq = vibrato(note_frequency);
252 } else { 271 } else {
253 freq = note_frequency; 272 freq = note_frequency;
254 } 273 }
255 #else 274 #else
256 freq = note_frequency; 275 freq = note_frequency;
257 #endif 276 #endif
258 277
259 if (envelope_index < 65535) { 278 if (envelope_index < 65535) {
260 envelope_index++; 279 envelope_index++;
261 } 280 }
262 freq = voice_envelope(freq); 281 freq = voice_envelope(freq);
263 282
264 TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER)); 283 TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER));
265 TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre); 284 TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre);
266 } else { 285 } else {
267 TIMER_3_PERIOD = 0; 286 TIMER_3_PERIOD = 0;
268 TIMER_3_DUTY_CYCLE = 0; 287 TIMER_3_DUTY_CYCLE = 0;
269 } 288 }
270 289
271 note_position++; 290 note_position++;
272 bool end_of_note = false; 291 bool end_of_note = false;
273 if (TIMER_3_PERIOD > 0) { 292 if (TIMER_3_PERIOD > 0) {
274 end_of_note = (note_position >= (note_length / TIMER_3_PERIOD * 0xFFFF)); 293 end_of_note = (note_position >= (note_length / TIMER_3_PERIOD * 0xFFFF));
275 } else { 294 } else {
276 end_of_note = (note_position >= (note_length * 0x7FF)); 295 end_of_note = (note_position >= (note_length * 0x7FF));
277 } 296 }
278 297
279 if (end_of_note) { 298 if (end_of_note) {
280 current_note++; 299 current_note++;
281 if (current_note >= notes_count) { 300 if (current_note >= notes_count) {
282 if (notes_repeat) { 301 if (notes_repeat) {
283 current_note = 0; 302 current_note = 0;
284 } else { 303 } else {
285 DISABLE_AUDIO_COUNTER_3_ISR; 304 DISABLE_AUDIO_COUNTER_3_ISR;
286 DISABLE_AUDIO_COUNTER_3_OUTPUT; 305 DISABLE_AUDIO_COUNTER_3_OUTPUT;
287 playing_notes = false; 306 playing_notes = false;
288 return; 307 return;
289 } 308 }
290 } 309 }
291 if (!note_resting && (notes_rest > 0)) { 310 if (!note_resting && (notes_rest > 0)) {
292 note_resting = true; 311 note_resting = true;
293 note_frequency = 0; 312 note_frequency = 0;
294 note_length = notes_rest; 313 note_length = notes_rest;
295 current_note--; 314 current_note--;
296 } else { 315 } else {
297 note_resting = false; 316 note_resting = false;
298 envelope_index = 0; 317 envelope_index = 0;
299 note_frequency = (*notes_pointer)[current_note][0]; 318 note_frequency = (*notes_pointer)[current_note][0];
300 note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); 319 note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100);
301 } 320 }
302 321
303 note_position = 0; 322 note_position = 0;
304 } 323 }
305 } 324 }
306 325
307 if (!audio_config.enable) { 326 if (!audio_config.enable) {
308 playing_notes = false; 327 playing_notes = false;
309 playing_note = false; 328 playing_note = false;
310 } 329 }
311} 330}
312 331
313void play_note(float freq, int vol) { 332void play_note(float freq, int vol) {
314 333
334 dprintf("audio play note freq=%d vol=%d", (int)freq, vol);
335
315 if (!audio_initialized) { 336 if (!audio_initialized) {
316 audio_init(); 337 audio_init();
317 } 338 }
318 339
319 if (audio_config.enable && voices < 8) { 340 if (audio_config.enable && voices < 8) {
320 DISABLE_AUDIO_COUNTER_3_ISR; 341 DISABLE_AUDIO_COUNTER_3_ISR;
321 342
322 // Cancel notes if notes are playing 343 // Cancel notes if notes are playing
323 if (playing_notes) 344 if (playing_notes)
324 stop_all_notes(); 345 stop_all_notes();
325 346
326 playing_note = true; 347 playing_note = true;
327 348
328 envelope_index = 0; 349 envelope_index = 0;
329 350
330 if (freq > 0) { 351 if (freq > 0) {
331 frequencies[voices] = freq; 352 frequencies[voices] = freq;
332 volumes[voices] = vol; 353 volumes[voices] = vol;
333 voices++; 354 voices++;
334 } 355 }
335 356
336 ENABLE_AUDIO_COUNTER_3_ISR; 357 ENABLE_AUDIO_COUNTER_3_ISR;
337 ENABLE_AUDIO_COUNTER_3_OUTPUT; 358 ENABLE_AUDIO_COUNTER_3_OUTPUT;
338 } 359 }
339 360
340} 361}
341 362
@@ -346,37 +367,37 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest)
346 audio_init(); 367 audio_init();
347 } 368 }
348 369
349 if (audio_config.enable) { 370 if (audio_config.enable) {
350 371
351 DISABLE_AUDIO_COUNTER_3_ISR; 372 DISABLE_AUDIO_COUNTER_3_ISR;
352 373
353 // Cancel note if a note is playing 374 // Cancel note if a note is playing
354 if (playing_note) 375 if (playing_note)
355 stop_all_notes(); 376 stop_all_notes();
356 377
357 playing_notes = true; 378 playing_notes = true;
358 379
359 notes_pointer = np; 380 notes_pointer = np;
360 notes_count = n_count; 381 notes_count = n_count;
361 notes_repeat = n_repeat; 382 notes_repeat = n_repeat;
362 notes_rest = n_rest; 383 notes_rest = n_rest;
363 384
364 place = 0; 385 place = 0;
365 current_note = 0; 386 current_note = 0;
366 387
367 note_frequency = (*notes_pointer)[current_note][0]; 388 note_frequency = (*notes_pointer)[current_note][0];
368 note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); 389 note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100);
369 note_position = 0; 390 note_position = 0;
370 391
371 392
372 ENABLE_AUDIO_COUNTER_3_ISR; 393 ENABLE_AUDIO_COUNTER_3_ISR;
373 ENABLE_AUDIO_COUNTER_3_OUTPUT; 394 ENABLE_AUDIO_COUNTER_3_OUTPUT;
374 } 395 }
375 396
376} 397}
377 398
378bool is_playing_notes(void) { 399bool is_playing_notes(void) {
379 return playing_notes; 400 return playing_notes;
380} 401}
381 402
382bool is_audio_on(void) { 403bool is_audio_on(void) {
diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h
index 47f326ea0..27fdc2ab6 100644
--- a/quantum/audio/audio.h
+++ b/quantum/audio/audio.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 Jack Humbert
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 */
1#ifndef AUDIO_H 16#ifndef AUDIO_H
2#define AUDIO_H 17#define AUDIO_H
3 18
@@ -88,4 +103,4 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest)
88 103
89bool is_playing_notes(void); 104bool is_playing_notes(void);
90 105
91#endif \ No newline at end of file 106#endif
diff --git a/quantum/audio/audio_pwm.c b/quantum/audio/audio_pwm.c
index f820eec1b..ded86edee 100644
--- a/quantum/audio/audio_pwm.c
+++ b/quantum/audio/audio_pwm.c
@@ -1,3 +1,18 @@
1/* Copyright 2016 Jack Humbert
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 */
1#include <stdio.h> 16#include <stdio.h>
2#include <string.h> 17#include <string.h>
3//#include <math.h> 18//#include <math.h>
diff --git a/quantum/audio/luts.c b/quantum/audio/luts.c
index 9f3de9a05..57f2d5924 100644
--- a/quantum/audio/luts.c
+++ b/quantum/audio/luts.c
@@ -1,3 +1,19 @@
1/* Copyright 2016 IBNobody
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#include <avr/io.h> 17#include <avr/io.h>
2#include <avr/interrupt.h> 18#include <avr/interrupt.h>
3#include <avr/pgmspace.h> 19#include <avr/pgmspace.h>
diff --git a/quantum/audio/luts.h b/quantum/audio/luts.h
index 7df3078a7..155e34e88 100644
--- a/quantum/audio/luts.h
+++ b/quantum/audio/luts.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 IBNobody
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#include <avr/io.h> 17#include <avr/io.h>
2#include <avr/interrupt.h> 18#include <avr/interrupt.h>
3#include <avr/pgmspace.h> 19#include <avr/pgmspace.h>
@@ -12,4 +28,4 @@
12extern const float vibrato_lut[VIBRATO_LUT_LENGTH]; 28extern const float vibrato_lut[VIBRATO_LUT_LENGTH];
13extern const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH]; 29extern const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH];
14 30
15#endif /* LUTS_H */ \ No newline at end of file 31#endif /* LUTS_H */
diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h
index b08d16a6f..a3aaa2f19 100644
--- a/quantum/audio/musical_notes.h
+++ b/quantum/audio/musical_notes.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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 MUSICAL_NOTES_H 17#ifndef MUSICAL_NOTES_H
2#define MUSICAL_NOTES_H 18#define MUSICAL_NOTES_H
3 19
@@ -214,4 +230,4 @@
214#define NOTE_BF8 NOTE_AS8 230#define NOTE_BF8 NOTE_AS8
215 231
216 232
217#endif \ No newline at end of file 233#endif
diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h
index 8022ca672..db2d1a94c 100644
--- a/quantum/audio/song_list.h
+++ b/quantum/audio/song_list.h
@@ -1,8 +1,27 @@
1/* Copyright 2016 Jack Humbert
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 */
1#include "musical_notes.h" 16#include "musical_notes.h"
2 17
3#ifndef SONG_LIST_H 18#ifndef SONG_LIST_H
4#define SONG_LIST_H 19#define SONG_LIST_H
5 20
21#define COIN_SOUND \
22 E__NOTE(_A5 ),\
23 HD_NOTE(_E6 ),
24
6#define ODE_TO_JOY \ 25#define ODE_TO_JOY \
7 Q__NOTE(_E4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_G4), \ 26 Q__NOTE(_E4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_G4), \
8 Q__NOTE(_G4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_D4), \ 27 Q__NOTE(_G4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_D4), \
@@ -122,4 +141,39 @@
122 E__NOTE(_E5), \ 141 E__NOTE(_E5), \
123 E__NOTE(_D5), 142 E__NOTE(_D5),
124 143
144#define UNICODE_WINDOWS \
145 E__NOTE(_B5), \
146 S__NOTE(_E6),
147
148#define UNICODE_LINUX \
149 E__NOTE(_E6), \
150 S__NOTE(_B5),
151
152#define COIN_SOUND \
153 E__NOTE(_A5 ), \
154 HD_NOTE(_E6 ),
155
156#define ONE_UP_SOUND \
157 Q__NOTE(_E6 ), \
158 Q__NOTE(_G6 ), \
159 Q__NOTE(_E7 ), \
160 Q__NOTE(_C7 ), \
161 Q__NOTE(_D7 ), \
162 Q__NOTE(_G7 ),
163
164#define SONIC_RING \
165 E__NOTE(_E6), \
166 E__NOTE(_G6), \
167 HD_NOTE(_C7),
168
169#define ZELDA_PUZZLE \
170 Q__NOTE(_G5), \
171 Q__NOTE(_FS5), \
172 Q__NOTE(_DS5), \
173 Q__NOTE(_A4), \
174 Q__NOTE(_GS4), \
175 Q__NOTE(_E5), \
176 Q__NOTE(_GS5), \
177 HD_NOTE(_C6),
178
125#endif 179#endif
diff --git a/quantum/audio/voices.c b/quantum/audio/voices.c
index c2edb75f0..54ebd423b 100644
--- a/quantum/audio/voices.c
+++ b/quantum/audio/voices.c
@@ -1,3 +1,18 @@
1/* Copyright 2016 Jack Humbert
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 */
1#include "voices.h" 16#include "voices.h"
2#include "audio.h" 17#include "audio.h"
3#include "stdlib.h" 18#include "stdlib.h"
diff --git a/quantum/audio/voices.h b/quantum/audio/voices.h
index 52f7e006d..9403a6b5e 100644
--- a/quantum/audio/voices.h
+++ b/quantum/audio/voices.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 Jack Humbert
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 */
1#include <stdint.h> 16#include <stdint.h>
2#include <stdbool.h> 17#include <stdbool.h>
3#include <avr/io.h> 18#include <avr/io.h>
@@ -32,4 +47,4 @@ void set_voice(voice_type v);
32void voice_iterate(void); 47void voice_iterate(void);
33void voice_deiterate(void); 48void voice_deiterate(void);
34 49
35#endif \ No newline at end of file 50#endif
diff --git a/quantum/audio/wave.h b/quantum/audio/wave.h
index 6ebc34851..f15615dd1 100644
--- a/quantum/audio/wave.h
+++ b/quantum/audio/wave.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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#include <avr/io.h> 17#include <avr/io.h>
2#include <avr/interrupt.h> 18#include <avr/interrupt.h>
3#include <avr/pgmspace.h> 19#include <avr/pgmspace.h>
@@ -262,4 +278,4 @@ const uint8_t sinewave[] PROGMEM= //2048 values
2620x76,0x77,0x77,0x77,0x78,0x78,0x78,0x79, 2780x76,0x77,0x77,0x77,0x78,0x78,0x78,0x79,
2630x79,0x7a,0x7a,0x7a,0x7b,0x7b,0x7c,0x7c, 2790x79,0x7a,0x7a,0x7a,0x7b,0x7b,0x7c,0x7c,
2640x7c,0x7d,0x7d,0x7e,0x7e,0x7e,0x7f,0x7f 2800x7c,0x7d,0x7d,0x7e,0x7e,0x7e,0x7f,0x7f
265}; \ No newline at end of file 281};
diff --git a/quantum/config_common.h b/quantum/config_common.h
index 28f68b9c7..c88e02d91 100644
--- a/quantum/config_common.h
+++ b/quantum/config_common.h
@@ -1,3 +1,19 @@
1/* Copyright 2015-2017 Jack Humbert
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 CONFIG_DEFINITIONS_H 17#ifndef CONFIG_DEFINITIONS_H
2#define CONFIG_DEFINITIONS_H 18#define CONFIG_DEFINITIONS_H
3 19
diff --git a/quantum/dynamic_macro.h b/quantum/dynamic_macro.h
index e6dbc5b9c..64093f293 100644
--- a/quantum/dynamic_macro.h
+++ b/quantum/dynamic_macro.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */ 17/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */
2#ifndef DYNAMIC_MACROS_H 18#ifndef DYNAMIC_MACROS_H
3#define DYNAMIC_MACROS_H 19#define DYNAMIC_MACROS_H
diff --git a/quantum/keycode_config.c b/quantum/keycode_config.c
index 6d90781a1..4f7bc525e 100644
--- a/quantum/keycode_config.c
+++ b/quantum/keycode_config.c
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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#include "keycode_config.h" 17#include "keycode_config.h"
2 18
3extern keymap_config_t keymap_config; 19extern keymap_config_t keymap_config;
@@ -71,4 +87,4 @@ uint16_t keycode_config(uint16_t keycode) {
71 default: 87 default:
72 return keycode; 88 return keycode;
73 } 89 }
74} \ No newline at end of file 90}
diff --git a/quantum/keycode_config.h b/quantum/keycode_config.h
index c15b0d32f..293fefecf 100644
--- a/quantum/keycode_config.h
+++ b/quantum/keycode_config.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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#include "eeconfig.h" 17#include "eeconfig.h"
2#include "keycode.h" 18#include "keycode.h"
3 19
diff --git a/quantum/keymap.h b/quantum/keymap.h
index c000d2da8..5d64be19c 100644
--- a/quantum/keymap.h
+++ b/quantum/keymap.h
@@ -1,5 +1,5 @@
1/* 1/*
2Copyright 2012,2013 Jun Wako <wakojun@gmail.com> 2Copyright 2012-2016 Jun Wako <wakojun@gmail.com>
3 3
4This program is free software: you can redistribute it and/or modify 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 5it under the terms of the GNU General Public License as published by
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c
index 002eabd85..6cf4f031f 100644
--- a/quantum/keymap_common.c
+++ b/quantum/keymap_common.c
@@ -1,5 +1,5 @@
1/* 1/*
2Copyright 2012,2013 Jun Wako <wakojun@gmail.com> 2Copyright 2012-2017 Jun Wako <wakojun@gmail.com>
3 3
4This program is free software: you can redistribute it and/or modify 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 5it under the terms of the GNU General Public License as published by
diff --git a/quantum/keymap_extras/keymap_bepo.h b/quantum/keymap_extras/keymap_bepo.h
index e5ef39552..013559e96 100644
--- a/quantum/keymap_extras/keymap_bepo.h
+++ b/quantum/keymap_extras/keymap_bepo.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 Didier Loiseau
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 */
1/* Keymap macros for the French BÉPO layout - http://bepo.fr */ 16/* Keymap macros for the French BÉPO layout - http://bepo.fr */
2#ifndef KEYMAP_BEPO_H 17#ifndef KEYMAP_BEPO_H
3#define KEYMAP_BEPO_H 18#define KEYMAP_BEPO_H
diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h
index 0bc20c7b9..1d45bee32 100644
--- a/quantum/keymap_extras/keymap_canadian_multilingual.h
+++ b/quantum/keymap_extras/keymap_canadian_multilingual.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 Didier Loiseau
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 */
1#ifndef KEYMAP_CANADIAN_MULTILINGUAG_H 16#ifndef KEYMAP_CANADIAN_MULTILINGUAG_H
2#define KEYMAP_CANADIAN_MULTILINGUAG_H 17#define KEYMAP_CANADIAN_MULTILINGUAG_H
3 18
diff --git a/quantum/keymap_extras/keymap_colemak.h b/quantum/keymap_extras/keymap_colemak.h
index b8d615748..2d3f9c06a 100644
--- a/quantum/keymap_extras/keymap_colemak.h
+++ b/quantum/keymap_extras/keymap_colemak.h
@@ -1,3 +1,18 @@
1/* Copyright 2015-2016 Jack Humbert
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 */
1#ifndef KEYMAP_COLEMAK_H 16#ifndef KEYMAP_COLEMAK_H
2#define KEYMAP_COLEMAK_H 17#define KEYMAP_COLEMAK_H
3 18
diff --git a/quantum/keymap_extras/keymap_dvorak.h b/quantum/keymap_extras/keymap_dvorak.h
index a0feed850..b1d5604ba 100644
--- a/quantum/keymap_extras/keymap_dvorak.h
+++ b/quantum/keymap_extras/keymap_dvorak.h
@@ -1,3 +1,18 @@
1/* Copyright 2015-2016 Jack Humbert
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 */
1#ifndef KEYMAP_DVORAK_H 16#ifndef KEYMAP_DVORAK_H
2#define KEYMAP_DVORAK_H 17#define KEYMAP_DVORAK_H
3 18
diff --git a/quantum/keymap_extras/keymap_dvp.h b/quantum/keymap_extras/keymap_dvp.h
index 83f49a52b..50e2d1f46 100644
--- a/quantum/keymap_extras/keymap_dvp.h
+++ b/quantum/keymap_extras/keymap_dvp.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 Artyom Mironov
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_DVP_H 17#ifndef KEYMAP_DVP_H
2#define KEYMAP_DVP_H 18#define KEYMAP_DVP_H
3 19
diff --git a/quantum/keymap_extras/keymap_fr_ch.h b/quantum/keymap_extras/keymap_fr_ch.h
index 87d4bb24c..c0ca832a6 100644
--- a/quantum/keymap_extras/keymap_fr_ch.h
+++ b/quantum/keymap_extras/keymap_fr_ch.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 Vincent Pochet
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 */
1#ifndef KEYMAP_FR_CH 16#ifndef KEYMAP_FR_CH
2#define KEYMAP_FR_CH 17#define KEYMAP_FR_CH
3 18
diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h
index 401bbdf64..3308dc5f7 100644
--- a/quantum/keymap_extras/keymap_french.h
+++ b/quantum/keymap_extras/keymap_french.h
@@ -1,3 +1,18 @@
1/* Copyright 2015-2016 Jack Humbert
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 */
1#ifndef KEYMAP_FRENCH_H 16#ifndef KEYMAP_FRENCH_H
2#define KEYMAP_FRENCH_H 17#define KEYMAP_FRENCH_H
3 18
diff --git a/quantum/keymap_extras/keymap_french_osx.h b/quantum/keymap_extras/keymap_french_osx.h
index 004d73ee2..ecade3fe9 100644
--- a/quantum/keymap_extras/keymap_french_osx.h
+++ b/quantum/keymap_extras/keymap_french_osx.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 Sébastien Pérochon
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 */
1#ifndef KEYMAP_FRENCH_OSX_H 16#ifndef KEYMAP_FRENCH_OSX_H
2#define KEYMAP_FRENCH_OSX_H 17#define KEYMAP_FRENCH_OSX_H
3 18
@@ -74,4 +89,4 @@
74#define FR_PIPE LSFT(LALT(KC_L)) 89#define FR_PIPE LSFT(LALT(KC_L))
75#define FR_BSLS LSFT(LALT(FR_COLN)) 90#define FR_BSLS LSFT(LALT(FR_COLN))
76 91
77#endif \ No newline at end of file 92#endif
diff --git a/quantum/keymap_extras/keymap_german.h b/quantum/keymap_extras/keymap_german.h
index 7e2e0ed44..e007c26ef 100644
--- a/quantum/keymap_extras/keymap_german.h
+++ b/quantum/keymap_extras/keymap_german.h
@@ -1,3 +1,19 @@
1/* Copyright 2015-2016 Matthias Schmidtt
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_GERMAN 17#ifndef KEYMAP_GERMAN
2#define KEYMAP_GERMAN 18#define KEYMAP_GERMAN
3 19
diff --git a/quantum/keymap_extras/keymap_german_ch.h b/quantum/keymap_extras/keymap_german_ch.h
index b66d582a4..8332e00af 100644
--- a/quantum/keymap_extras/keymap_german_ch.h
+++ b/quantum/keymap_extras/keymap_german_ch.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 heartsekai
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 */
1#ifndef KEYMAP_SWISS_GERMAN 16#ifndef KEYMAP_SWISS_GERMAN
2#define KEYMAP_SWISS_GERMAN 17#define KEYMAP_SWISS_GERMAN
3 18
diff --git a/quantum/keymap_extras/keymap_german_osx.h b/quantum/keymap_extras/keymap_german_osx.h
index f63f06618..798bb7579 100644
--- a/quantum/keymap_extras/keymap_german_osx.h
+++ b/quantum/keymap_extras/keymap_german_osx.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 Stephen Bösebeck
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 */
1#ifndef KEYMAP_GERMAN_OSX 16#ifndef KEYMAP_GERMAN_OSX
2#define KEYMAP_GERMAN_OSX 17#define KEYMAP_GERMAN_OSX
3 18
diff --git a/quantum/keymap_extras/keymap_jp.h b/quantum/keymap_extras/keymap_jp.h
index e81b5952e..fb74bce8d 100644
--- a/quantum/keymap_extras/keymap_jp.h
+++ b/quantum/keymap_extras/keymap_jp.h
@@ -1,4 +1,19 @@
1/* JP106-layout (Japanese Standard) 1/* Copyright 2016 h-youhei
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 * JP106-layout (Japanese Standard)
2 * 17 *
3 * For more information, see 18 * For more information, see
4 * http://www2d.biglobe.ne.jp/~msyk/keyboard/layout/usbkeycode.html 19 * http://www2d.biglobe.ne.jp/~msyk/keyboard/layout/usbkeycode.html
diff --git a/quantum/keymap_extras/keymap_neo2.h b/quantum/keymap_extras/keymap_neo2.h
index 80439af34..174f4a6ee 100644
--- a/quantum/keymap_extras/keymap_neo2.h
+++ b/quantum/keymap_extras/keymap_neo2.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 Matthias Schmitt
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 */
1#ifndef KEYMAP_NEO2 16#ifndef KEYMAP_NEO2
2#define KEYMAP_NEO2 17#define KEYMAP_NEO2
3 18
diff --git a/quantum/keymap_extras/keymap_nordic.h b/quantum/keymap_extras/keymap_nordic.h
index 9b0ef35ca..6b34db558 100644
--- a/quantum/keymap_extras/keymap_nordic.h
+++ b/quantum/keymap_extras/keymap_nordic.h
@@ -1,3 +1,18 @@
1/* Copyright 2015-2016 Jack Humbert
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 */
1#ifndef KEYMAP_NORDIC_H 16#ifndef KEYMAP_NORDIC_H
2#define KEYMAP_NORDIC_H 17#define KEYMAP_NORDIC_H
3 18
diff --git a/quantum/keymap_extras/keymap_norwegian.h b/quantum/keymap_extras/keymap_norwegian.h
index 5c4e8c495..b7128973a 100644
--- a/quantum/keymap_extras/keymap_norwegian.h
+++ b/quantum/keymap_extras/keymap_norwegian.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 Jack Humbert
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 */
1#ifndef KEYMAP_NORWEGIAN_H 16#ifndef KEYMAP_NORWEGIAN_H
2#define KEYMAP_NORWEGIAN_H 17#define KEYMAP_NORWEGIAN_H
3 18
diff --git a/quantum/keymap_extras/keymap_plover.h b/quantum/keymap_extras/keymap_plover.h
index 9b88f7d84..de6d8c53f 100644
--- a/quantum/keymap_extras/keymap_plover.h
+++ b/quantum/keymap_extras/keymap_plover.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 James Kay
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 */
1#ifndef KEYMAP_PLOVER_H 16#ifndef KEYMAP_PLOVER_H
2#define KEYMAP_PLOVER_H 17#define KEYMAP_PLOVER_H
3 18
diff --git a/quantum/keymap_extras/keymap_russian.h b/quantum/keymap_extras/keymap_russian.h
deleted file mode 100644
index 237e9abde..000000000
--- a/quantum/keymap_extras/keymap_russian.h
+++ /dev/null
@@ -1,77 +0,0 @@
1#ifndef KEYMAP_RUSSIAN_H
2#define KEYMAP_RUSSIAN_H
3
4#include "keymap.h"
5
6// Normal Chracters // reg SHIFT
7#define RU_A KC_F // а and А
8#define RU_BE KC_COMM // б and Б
9#define RU_VE KC_D // в and В
10#define RU_GHE KC_U // г and Г
11#define RU_DE KC_L // д and Д
12#define RU_IE KC_T // е and Е
13#define RU_IO KC_GRV // ё and Ё
14#define RU_ZHE KC_SCLN // ж and Ж
15#define RU_ZE KC_P // з and З
16#define RU_I KC_B // и and И
17#define RU_SRT_I KC_Q // й and Й
18#define RU_KA KC_R // к and К
19#define RU_EL KC_K // л and Л
20#define RU_EM KC_V // м and М
21#define RU_EN KC_Y // н and Н
22#define RU_O KC_J // о and О
23#define RU_PE KC_G // п and П
24#define RU_ER KC_H // р and Р
25#define RU_ES KC_C // с and С
26#define RU_TE KC_N // т and Т
27#define RU_U KC_E // у and У
28#define RU_EF KC_A // ф and Ф
29#define RU_HA KC_LBRC // х and Х
30#define RU_TSE KC_W // ц and Ц
31#define RU_CHE KC_X // ч and Ч
32#define RU_SHA KC_I // ш and Ш
33#define RU_SHCHA KC_O // щ and Щ
34#define RU_HSIGN KC_RBRC // ъ and Ъ
35#define RU_YERU KC_S // ы and Ы
36#define RU_SSIGN KC_M // ь and Ь
37#define RU_E KC_QUOT // э and Э
38#define RU_YU KC_DOT // ю and Ю
39#define RU_YA KC_Z // я and Я
40
41#define RU_1 KC_1 // 1 and !
42#define RU_2 KC_2 // 2 and "
43#define RU_3 KC_3 // 3 and №
44#define RU_4 KC_4 // 4 and ;
45#define RU_5 KC_5 // 5 and %
46#define RU_6 KC_6 // 6 and :
47#define RU_7 KC_7 // 7 and ?
48#define RU_8 KC_8 // 8 and *
49#define RU_9 KC_9 // 9 and (
50#define RU_0 KC_0 // 0 and )
51
52#define RU_MINS KC_MINS // - and _
53#define RU_EQL KC_EQL // = and +
54#define RU_BSLS KC_BSLS // \ and /
55#define RU_DOT KC_SLSH // . and ,
56
57// Shifted Chracters
58#define RU_EXLM LSFT(RU_1) // !
59#define RU_DQUT LSFT(RU_2) // "
60#define RU_NMRO LSFT(RU_3) // №
61#define RU_SCLN LSFT(RU_4) // ;
62#define RU_PERC LSFT(RU_5) // %
63#define RU_COLN LSFT(RU_6) // :
64#define RU_QUES LSFT(RU_7) // ?
65#define RU_ASTR LSFT(RU_8) // *
66#define RU_LPRN LSFT(RU_9) // (
67#define RU_RPRN LSFT(RU_0) // )
68
69#define RU_UNDR LSFT(RU_MINS) // _
70#define RU_PLUS LSFT(RU_EQL) // +
71#define RU_SLSH LSFT(RU_BSLS) // /
72#define RU_COMM LSFT(RU_DOT) // ,
73
74// Alt Gr-ed characters
75#define RU_RUBL RALT(RU_8) // ₽
76
77#endif
diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h
index 4ba568af2..3a5787e9c 100644
--- a/quantum/keymap_extras/keymap_spanish.h
+++ b/quantum/keymap_extras/keymap_spanish.h
@@ -1,3 +1,18 @@
1/* Copyright 2015-2016 Jack Humbert
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 */
1#ifndef KEYMAP_SPANISH_H 16#ifndef KEYMAP_SPANISH_H
2#define KEYMAP_SPANISH_H 17#define KEYMAP_SPANISH_H
3 18
diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h
index 00c87afc3..9d02efe04 100644
--- a/quantum/keymap_extras/keymap_uk.h
+++ b/quantum/keymap_extras/keymap_uk.h
@@ -1,3 +1,18 @@
1/* Copyright 2015-2016 Jack Humbert
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 */
1#ifndef KEYMAP_UK_H 16#ifndef KEYMAP_UK_H
2#define KEYMAP_UK_H 17#define KEYMAP_UK_H
3 18
diff --git a/quantum/keymap_extras/keymap_unicode_cyrillic.h b/quantum/keymap_extras/keymap_unicode_cyrillic.h
deleted file mode 100644
index a40626d91..000000000
--- a/quantum/keymap_extras/keymap_unicode_cyrillic.h
+++ /dev/null
@@ -1,163 +0,0 @@
1#ifndef KEYMAP_CYRILLIC_H
2#define KEYMAP_CYRILLIC_H
3
4#include "keymap.h"
5
6/*
7 * This is based off of
8 * https://en.wikipedia.org/wiki/Cyrillic_script
9 *
10 * Unicode is iffy, a software implementation is preferred
11 */
12
13// Capital Char russian/ukrainian/bulgarian
14#define CY_A UC(0x0410) // А rus ukr bul
15#define CY_BE UC(0x0411) // Б rus ukr bul
16#define CY_VE UC(0x0412) // В rus ukr bul
17#define CY_GHE UC(0x0413) // Г rus ukr bul
18#define CY_GHEUP UC(0x0490) // Ґ ukr
19#define CY_DE UC(0x0414) // Д rus ukr bul
20#define CY_DJE UC(0x0402) // Ђ
21#define CY_GJE UC(0x0403) // Ѓ
22#define CY_IE UC(0x0415) // Е rus ukr bul
23#define CY_IO UC(0x0401) // Ё rus
24#define CY_UIE UC(0x0404) // Є ukr
25#define CY_ZHE UC(0x0416) // Ж rus ukr bul
26#define CY_ZE UC(0x0417) // З rus ukr bul
27#define CY_DZE UC(0x0405) // Ѕ
28#define CY_I UC(0x0418) // И rus ukr bul
29#define CY_B_U_I UC(0x0406) // І ukr
30#define CY_YI UC(0x0407) // Ї ukr
31#define CY_SRT_I UC(0x0419) // Й rus ukr bul
32#define CY_JE UC(0x0408) // Ј
33#define CY_KA UC(0x041a) // К rus ukr bul
34#define CY_EL UC(0x041b) // Л rus ukr bul
35#define CY_LJE UC(0x0409) // Љ
36#define CY_EM UC(0x041c) // М rus ukr bul
37#define CY_EN UC(0x041d) // Н rus ukr bul
38#define CY_NJE UC(0x040a) // Њ
39#define CY_O UC(0x041e) // О rus ukr bul
40#define CY_PE UC(0x041f) // П rus ukr bul
41#define CY_ER UC(0x0420) // Р rus ukr bul
42#define CY_ES UC(0x0421) // С rus ukr bul
43#define CY_TE UC(0x0422) // Т rus ukr bul
44#define CY_TSHE UC(0x040b) // Ћ
45#define CY_KJE UC(0x040c) // Ќ
46#define CY_U UC(0x0423) // У rus ukr bul
47#define CY_SRT_U UC(0x040e) // Ў
48#define CY_EF UC(0x0424) // Ф rus ukr bul
49#define CY_HA UC(0x0425) // Х rus bul
50#define CY_TSE UC(0x0426) // Ц rus ukr bul
51#define CY_CHE UC(0x0427) // Ч rus ukr bul
52#define CY_DZHE UC(0x040f) // Џ
53#define CY_SHA UC(0x0428) // Ш rus ukr bul
54#define CY_SHCHA UC(0x0429) // Щ rus ukr bul
55#define CY_HSIGN UC(0x042a) // Ъ rus bul
56#define CY_YERU UC(0x042b) // Ы rus
57#define CY_SSIGN UC(0x042c) // Ь rus ukr bul
58#define CY_E UC(0x042d) // Э rus
59#define CY_YU UC(0x042e) // Ю rus ukr bul
60#define CY_YA UC(0x042f) // Я rus ukr bul
61// Important Cyrillic non-Slavic letters
62#define CY_PALOCHKA UC(0x04c0) // Ӏ
63#define CY_SCHWA UC(0x04d8) // Ә
64#define CY_GHE_S UC(0x0492) // Ғ
65#define CY_ZE_D UC(0x0498) // Ҙ
66#define CY_ES_D UC(0x04aa) // Ҫ
67#define CY_BR_KA UC(0x04a0) // Ҡ
68#define CY_ZHE_D UC(0x0496) // Җ
69#define CY_KA_D UC(0x049a) // Қ
70#define CY_EN_D UC(0x04a2) // Ң
71#define CY_ENGHE UC(0x04a4) // Ҥ
72#define CY_BRD_O UC(0x04e8) // Ө
73#define CY_STR_U UC(0x04ae) // Ү
74#define CY_S_U_S UC(0x04b0) // Ұ
75#define CY_SHHA UC(0x04ba) // Һ
76#define CY_HA_D UC(0x04b2) // Ҳ
77
78
79// Small
80#define CY_a UC(0x0430) // a rus ukr bul
81#define CY_be UC(0x0431) // б rus ukr bul
82#define CY_ve UC(0x0432) // в rus ukr bul
83#define CY_ghe UC(0x0433) // г rus ukr bul
84#define CY_gheup UC(0x0491) // ґ ukr
85#define CY_de UC(0x0434) // д rus ukr bul
86#define CY_dje UC(0x0452) // ђ
87#define CY_gje UC(0x0453) // ѓ
88#define CY_ie UC(0x0435) // е rus ukr bul
89#define CY_io UC(0x0451) // ё rus
90#define CY_uie UC(0x0454) // є ukr
91#define CY_zhe UC(0x0436) // ж rus ukr bul
92#define CY_ze UC(0x0437) // з rus ukr bul
93#define CY_dze UC(0x0455) // ѕ
94#define CY_i UC(0x0438) // и rus ukr bul
95#define CY_b_u_i UC(0x0456) // і ukr
96#define CY_yi UC(0x0457) // ї ukr
97#define CY_srt_i UC(0x0439) // й rus ukr bul
98#define CY_je UC(0x0458) // ј
99#define CY_ka UC(0x043a) // к rus ukr bul
100#define CY_el UC(0x043b) // л rus ukr bul
101#define CY_lje UC(0x0459) // љ
102#define CY_em UC(0x043c) // м rus ukr bul
103#define CY_en UC(0x043d) // н rus ukr bul
104#define CY_nje UC(0x045a) // њ
105#define CY_o UC(0x043e) // о rus ukr bul
106#define CY_pe UC(0x043f) // п rus ukr bul
107#define CY_er UC(0x0440) // р rus ukr bul
108#define CY_es UC(0x0441) // с rus ukr bul
109#define CY_te UC(0x0442) // т rus ukr bul
110#define CY_tshe UC(0x045b) // ћ
111#define CY_kje UC(0x045c) // ќ
112#define CY_u UC(0x0443) // у rus ukr bul
113#define CY_srt_u UC(0x045e) // ў
114#define CY_ef UC(0x0444) // ф rus ukr bul
115#define CY_ha UC(0x0445) // х rus ukr bul
116#define CY_tse UC(0x0446) // ц rus ukr bul
117#define CY_che UC(0x0447) // ч rus ukr bul
118#define CY_dzhe UC(0x045f) // џ
119#define CY_sha UC(0x0448) // ш rus ukr bul
120#define CY_shcha UC(0x0449) // щ rus ukr bul
121#define CY_hsign UC(0x044a) // ъ rus bul
122#define CY_yeru UC(0x044b) // ы rus
123#define CY_ssign UC(0x044c) // ь rus ukr bul
124#define CY_e UC(0x044d) // э rus
125#define CY_yu UC(0x044e) // ю rus ukr bul
126#define CY_ya UC(0x044f) // я rus ukr bul
127// Important Cyrillic non-Slavic letters
128#define CY_palochka UC(0x04cf) // ӏ
129#define CY_schwa UC(0x04d9) // ә
130#define CY_ghe_s UC(0x0493) // ғ
131#define CY_ze_d UC(0x0499) // ҙ
132#define CY_es_d UC(0x04ab) // ҫ
133#define CY_br_ka UC(0x04a1) // ҡ
134#define CY_zhe_d UC(0x0497) // җ
135#define CY_ka_d UC(0x049b) // қ
136#define CY_en_d UC(0x04a3) // ң
137#define CY_enghe UC(0x04a5) // ҥ
138#define CY_brd_o UC(0x04e9) // ө
139#define CY_str_u UC(0x04af) // ү
140#define CY_s_u_s UC(0x04b1) // ұ
141#define CY_shha UC(0x04bb) // һ
142#define CY_ha_d UC(0x04b3) // ҳ
143
144
145// Extra
146#define CY_slr_ve UC(0x1c80) // ᲀ CYRILLIC SMALL LETTER ROUNDED VE
147#define CY_ll_de UC(0x1c81) // ᲁ CYRILLIC SMALL LETTER LONG-LEGGED DE
148#define CY_ZEMLYA UC(0xa640) // Ꙁ CYRILLIC CAPITAL LETTER ZEMLYA
149#define CY_zemlya UC(0xa641) // ꙁ CYRILLIC SMALL LETTER ZEMLYA
150#define CY_RV_DZE UC(0xa644) // Ꙅ CYRILLIC CAPITAL LETTER REVERSED DZE
151#define CY_rv_DZE UC(0xa645) // ꙅ CYRILLIC SMALL LETTER REVERSED DZE
152#define CY_slw_es UC(0x1c83) // ᲃ CYRILLIC SMALL LETTER WIDE ES
153#define CY_st_te UC(0x1c84) // ᲄ CYRILLIC SMALL LETTER TALL TE
154#define CY_3l_te UC(0x1c85) // ᲅ CYRILLIC SMALL LETTER THREE-LEGGED TE
155#define CY_thsign UC(0x1c86) // ᲆ CYRILLIC SMALL LETTER TALL HARD SIGN
156#define CY_YERUBY UC(0xa650) // Ꙑ CYRILLIC CAPITAL LETTER YERU WITH BACK YER
157#define CY_yeruby UC(0xa651) // ꙑ CYRILLIC SMALL LETTER YERU WITH BACK YER
158#define CY_RUBL UC(0x20bd) // ₽
159#define CY_NMRO UC(0x2116) // №
160
161// The letters Zje and Sje are made for other letters and accent marks
162
163#endif
diff --git a/quantum/light_ws2812.c b/quantum/light_ws2812.c
index 55bdd9cd8..2506e3d8e 100755
--- a/quantum/light_ws2812.c
+++ b/quantum/light_ws2812.c
@@ -7,7 +7,18 @@
7* Jan 18th, 2014 v2.0b Initial Version 7* Jan 18th, 2014 v2.0b Initial Version
8* Nov 29th, 2015 v2.3 Added SK6812RGBW support 8* Nov 29th, 2015 v2.3 Added SK6812RGBW support
9* 9*
10* License: GNU GPL v2 (see License.txt) 10* This program is free software: you can redistribute it and/or modify
11* it under the terms of the GNU General Public License as published by
12* the Free Software Foundation, either version 2 of the License, or
13* (at your option) any later version.
14*
15* This program is distributed in the hope that it will be useful,
16* but WITHOUT ANY WARRANTY; without even the implied warranty of
17* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18* GNU General Public License for more details.
19*
20* You should have received a copy of the GNU General Public License
21* along with this program. If not, see <http://www.gnu.org/licenses/>.
11*/ 22*/
12 23
13#include "light_ws2812.h" 24#include "light_ws2812.h"
diff --git a/quantum/light_ws2812.h b/quantum/light_ws2812.h
index 2f78c20fc..60924a0fb 100755
--- a/quantum/light_ws2812.h
+++ b/quantum/light_ws2812.h
@@ -6,8 +6,18 @@
6 * 6 *
7 * Please do not change this file! All configuration is handled in "ws2812_config.h" 7 * Please do not change this file! All configuration is handled in "ws2812_config.h"
8 * 8 *
9 * License: GNU GPL v2 (see License.txt) 9 * This program is free software: you can redistribute it and/or modify
10 + 10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
11 */ 21 */
12 22
13#ifndef LIGHT_WS2812_H_ 23#ifndef LIGHT_WS2812_H_
diff --git a/quantum/matrix.c b/quantum/matrix.c
index ac523482a..5337e2626 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -1,6 +1,5 @@
1/* 1/*
2Copyright 2012 Jun Wako 2Copyright 2012-2017 Jun Wako, Jack Humbert
3Copyright 2014 Jack Humbert
4 3
5This program is free software: you can redistribute it and/or modify 4This program is free software: you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by 5it under the terms of the GNU General Public License as published by
diff --git a/quantum/pincontrol.h b/quantum/pincontrol.h
index 36ce29ef2..d77977ebe 100644
--- a/quantum/pincontrol.h
+++ b/quantum/pincontrol.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 Wez Furlong
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 */
1#pragma once 16#pragma once
2// Some helpers for controlling gpio pins 17// Some helpers for controlling gpio pins
3#include <avr/io.h> 18#include <avr/io.h>
diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c
new file mode 100644
index 000000000..0b6380ed3
--- /dev/null
+++ b/quantum/process_keycode/process_audio.c
@@ -0,0 +1,62 @@
1#include "audio.h"
2#include "process_audio.h"
3
4static float compute_freq_for_midi_note(uint8_t note)
5{
6 // https://en.wikipedia.org/wiki/MIDI_tuning_standard
7 return pow(2.0, (note - 69) / 12.0) * 440.0f;
8}
9
10bool process_audio(uint16_t keycode, keyrecord_t *record) {
11
12 if (keycode == AU_ON && record->event.pressed) {
13 audio_on();
14 return false;
15 }
16
17 if (keycode == AU_OFF && record->event.pressed) {
18 audio_off();
19 return false;
20 }
21
22 if (keycode == AU_TOG && record->event.pressed) {
23 if (is_audio_on())
24 {
25 audio_off();
26 }
27 else
28 {
29 audio_on();
30 }
31 return false;
32 }
33
34 if (keycode == MUV_IN && record->event.pressed) {
35 voice_iterate();
36 music_scale_user();
37 return false;
38 }
39
40 if (keycode == MUV_DE && record->event.pressed) {
41 voice_deiterate();
42 music_scale_user();
43 return false;
44 }
45
46 return true;
47}
48
49void process_audio_noteon(uint8_t note) {
50 play_note(compute_freq_for_midi_note(note), 0xF);
51}
52
53void process_audio_noteoff(uint8_t note) {
54 stop_note(compute_freq_for_midi_note(note));
55}
56
57void process_audio_all_notes_off(void) {
58 stop_all_notes();
59}
60
61__attribute__ ((weak))
62void audio_on_user() {} \ No newline at end of file
diff --git a/quantum/process_keycode/process_audio.h b/quantum/process_keycode/process_audio.h
new file mode 100644
index 000000000..7ac15b733
--- /dev/null
+++ b/quantum/process_keycode/process_audio.h
@@ -0,0 +1,11 @@
1#ifndef PROCESS_AUDIO_H
2#define PROCESS_AUDIO_H
3
4bool process_audio(uint16_t keycode, keyrecord_t *record);
5void process_audio_noteon(uint8_t note);
6void process_audio_noteoff(uint8_t note);
7void process_audio_all_notes_off(void);
8
9void audio_on_user(void);
10
11#endif \ No newline at end of file
diff --git a/quantum/process_keycode/process_chording.c b/quantum/process_keycode/process_chording.c
index d7814629f..6c6ebe300 100644
--- a/quantum/process_keycode/process_chording.c
+++ b/quantum/process_keycode/process_chording.c
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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#include "process_chording.h" 17#include "process_chording.h"
2 18
3bool keys_chord(uint8_t keys[]) { 19bool keys_chord(uint8_t keys[]) {
@@ -57,4 +73,4 @@ bool process_chording(uint16_t keycode, keyrecord_t *record) {
57 } 73 }
58 } 74 }
59 return true; 75 return true;
60} \ No newline at end of file 76}
diff --git a/quantum/process_keycode/process_chording.h b/quantum/process_keycode/process_chording.h
index 49c97db3b..8c0f4862a 100644
--- a/quantum/process_keycode/process_chording.h
+++ b/quantum/process_keycode/process_chording.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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 PROCESS_CHORDING_H 17#ifndef PROCESS_CHORDING_H
2#define PROCESS_CHORDING_H 18#define PROCESS_CHORDING_H
3 19
@@ -13,4 +29,4 @@ uint8_t chord_key_down = 0;
13 29
14bool process_chording(uint16_t keycode, keyrecord_t *record); 30bool process_chording(uint16_t keycode, keyrecord_t *record);
15 31
16#endif \ No newline at end of file 32#endif
diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c
index e2189ad98..58d45add2 100644
--- a/quantum/process_keycode/process_combo.c
+++ b/quantum/process_keycode/process_combo.c
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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#include "process_combo.h" 17#include "process_combo.h"
2#include "print.h" 18#include "print.h"
3 19
diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h
index 847f2b737..a5dbd788a 100644
--- a/quantum/process_keycode/process_combo.h
+++ b/quantum/process_keycode/process_combo.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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 PROCESS_COMBO_H 17#ifndef PROCESS_COMBO_H
2#define PROCESS_COMBO_H 18#define PROCESS_COMBO_H
3 19
diff --git a/quantum/process_keycode/process_leader.c b/quantum/process_keycode/process_leader.c
index e53d221e7..473906d65 100644
--- a/quantum/process_keycode/process_leader.c
+++ b/quantum/process_keycode/process_leader.c
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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#include "process_leader.h" 17#include "process_leader.h"
2 18
3__attribute__ ((weak)) 19__attribute__ ((weak))
@@ -35,4 +51,4 @@ bool process_leader(uint16_t keycode, keyrecord_t *record) {
35 } 51 }
36 } 52 }
37 return true; 53 return true;
38} \ No newline at end of file 54}
diff --git a/quantum/process_keycode/process_leader.h b/quantum/process_keycode/process_leader.h
index c83db8abb..da7a3d2ef 100644
--- a/quantum/process_keycode/process_leader.h
+++ b/quantum/process_keycode/process_leader.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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 PROCESS_LEADER_H 17#ifndef PROCESS_LEADER_H
2#define PROCESS_LEADER_H 18#define PROCESS_LEADER_H
3 19
@@ -20,4 +36,4 @@ void leader_end(void);
20#define LEADER_EXTERNS() extern bool leading; extern uint16_t leader_time; extern uint16_t leader_sequence[5]; extern uint8_t leader_sequence_size 36#define LEADER_EXTERNS() extern bool leading; extern uint16_t leader_time; extern uint16_t leader_sequence[5]; extern uint8_t leader_sequence_size
21#define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT) 37#define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT)
22 38
23#endif \ No newline at end of file 39#endif
diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c
index 577dad43a..9184feaae 100644
--- a/quantum/process_keycode/process_midi.c
+++ b/quantum/process_keycode/process_midi.c
@@ -1,68 +1,253 @@
1/* Copyright 2016 Jack Humbert
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 */
1#include "process_midi.h" 16#include "process_midi.h"
2 17
3bool midi_activated = false; 18#ifdef MIDI_ENABLE
4uint8_t midi_starting_note = 0x0C; 19#include "midi.h"
5int midi_offset = 7; 20
6 21#ifdef MIDI_BASIC
7bool process_midi(uint16_t keycode, keyrecord_t *record) { 22
8 if (keycode == MI_ON && record->event.pressed) { 23void process_midi_basic_noteon(uint8_t note)
9 midi_activated = true; 24{
10#ifdef AUDIO_ENABLE 25 midi_send_noteon(&midi_device, 0, note, 128);
11 music_scale_user(); 26}
12#endif 27
13 return false; 28void process_midi_basic_noteoff(uint8_t note)
14 } 29{
30 midi_send_noteoff(&midi_device, 0, note, 0);
31}
32
33void process_midi_all_notes_off(void)
34{
35 midi_send_cc(&midi_device, 0, 0x7B, 0);
36}
37
38#endif // MIDI_BASIC
39
40#ifdef MIDI_ADVANCED
41
42#include "timer.h"
43
44static uint8_t tone_status[MIDI_TONE_COUNT];
45
46static uint8_t midi_modulation;
47static int8_t midi_modulation_step;
48static uint16_t midi_modulation_timer;
49
50inline uint8_t compute_velocity(uint8_t setting)
51{
52 return (setting + 1) * (128 / (MIDI_VELOCITY_MAX - MIDI_VELOCITY_MIN + 1));
53}
15 54
16 if (keycode == MI_OFF && record->event.pressed) { 55void midi_init(void)
17 midi_activated = false; 56{
18 midi_send_cc(&midi_device, 0, 0x7B, 0); 57 midi_config.octave = MI_OCT_2 - MIDI_OCTAVE_MIN;
19 return false; 58 midi_config.transpose = 0;
59 midi_config.velocity = (MIDI_VELOCITY_MAX - MIDI_VELOCITY_MIN);
60 midi_config.channel = 0;
61 midi_config.modulation_interval = 8;
62
63 for (uint8_t i = 0; i < MIDI_TONE_COUNT; i++)
64 {
65 tone_status[i] = MIDI_INVALID_NOTE;
20 } 66 }
21 67
22 if (midi_activated) { 68 midi_modulation = 0;
23 if (record->event.key.col == (MATRIX_COLS - 1) && record->event.key.row == (MATRIX_ROWS - 1)) { 69 midi_modulation_step = 0;
24 if (record->event.pressed) { 70 midi_modulation_timer = 0;
25 midi_starting_note++; // Change key 71}
26 midi_send_cc(&midi_device, 0, 0x7B, 0); 72
27 } 73void midi_task(void)
28 return false; 74{
29 } 75 if (timer_elapsed(midi_modulation_timer) < midi_config.modulation_interval)
30 if (record->event.key.col == (MATRIX_COLS - 2) && record->event.key.row == (MATRIX_ROWS - 1)) { 76 return;
31 if (record->event.pressed) { 77 midi_modulation_timer = timer_read();
32 midi_starting_note--; // Change key 78
33 midi_send_cc(&midi_device, 0, 0x7B, 0); 79 if (midi_modulation_step != 0)
34 } 80 {
35 return false; 81 dprintf("midi modulation %d\n", midi_modulation);
36 } 82 midi_send_cc(&midi_device, midi_config.channel, 0x1, midi_modulation);
37 if (record->event.key.col == (MATRIX_COLS - 3) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) { 83
38 midi_offset++; // Change scale 84 if (midi_modulation_step < 0 && midi_modulation < -midi_modulation_step) {
39 midi_send_cc(&midi_device, 0, 0x7B, 0); 85 midi_modulation = 0;
40 return false; 86 midi_modulation_step = 0;
41 } 87 return;
42 if (record->event.key.col == (MATRIX_COLS - 4) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) { 88 }
43 midi_offset--; // Change scale 89
44 midi_send_cc(&midi_device, 0, 0x7B, 0); 90 midi_modulation += midi_modulation_step;
45 return false; 91
46 } 92 if (midi_modulation > 127)
47 // basic 93 midi_modulation = 127;
48 // uint8_t note = (midi_starting_note + SCALE[record->event.key.col + midi_offset])+12*(MATRIX_ROWS - record->event.key.row);
49 // advanced
50 // uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+12*(MATRIX_ROWS - record->event.key.row);
51 // guitar
52 uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+5*(MATRIX_ROWS - record->event.key.row);
53 // violin
54 // uint8_t note = (midi_starting_note + record->event.key.col + midi_offset)+7*(MATRIX_ROWS - record->event.key.row);
55
56 if (record->event.pressed) {
57 // midi_send_noteon(&midi_device, record->event.key.row, midi_starting_note + SCALE[record->event.key.col], 127);
58 midi_send_noteon(&midi_device, 0, note, 127);
59 } else {
60 // midi_send_noteoff(&midi_device, record->event.key.row, midi_starting_note + SCALE[record->event.key.col], 127);
61 midi_send_noteoff(&midi_device, 0, note, 127);
62 }
63
64 if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through
65 return false;
66 } 94 }
67 return true;
68} 95}
96
97uint8_t midi_compute_note(uint16_t keycode)
98{
99 return 12 * midi_config.octave + (keycode - MIDI_TONE_MIN) + midi_config.transpose;
100}
101
102bool process_midi(uint16_t keycode, keyrecord_t *record)
103{
104 switch (keycode) {
105 case MIDI_TONE_MIN ... MIDI_TONE_MAX:
106 {
107 uint8_t channel = midi_config.channel;
108 uint8_t tone = keycode - MIDI_TONE_MIN;
109 uint8_t velocity = compute_velocity(midi_config.velocity);
110 if (record->event.pressed) {
111 uint8_t note = midi_compute_note(keycode);
112 midi_send_noteon(&midi_device, channel, note, velocity);
113 dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity);
114 tone_status[tone] = note;
115 }
116 else {
117 uint8_t note = tone_status[tone];
118 if (note != MIDI_INVALID_NOTE)
119 {
120 midi_send_noteoff(&midi_device, channel, note, velocity);
121 dprintf("midi noteoff channel:%d note:%d velocity:%d\n", channel, note, velocity);
122 }
123 tone_status[tone] = MIDI_INVALID_NOTE;
124 }
125 return false;
126 }
127 case MIDI_OCTAVE_MIN ... MIDI_OCTAVE_MAX:
128 if (record->event.pressed) {
129 midi_config.octave = keycode - MIDI_OCTAVE_MIN;
130 dprintf("midi octave %d\n", midi_config.octave);
131 }
132 return false;
133 case MI_OCTD:
134 if (record->event.pressed && midi_config.octave > 0) {
135 midi_config.octave--;
136 dprintf("midi octave %d\n", midi_config.octave);
137 }
138 return false;
139 case MI_OCTU:
140 if (record->event.pressed && midi_config.octave < (MIDI_OCTAVE_MAX - MIDI_OCTAVE_MIN)) {
141 midi_config.octave++;
142 dprintf("midi octave %d\n", midi_config.octave);
143 }
144 return false;
145 case MIDI_TRANSPOSE_MIN ... MIDI_TRANSPOSE_MAX:
146 if (record->event.pressed) {
147 midi_config.transpose = keycode - MI_TRNS_0;
148 dprintf("midi transpose %d\n", midi_config.transpose);
149 }
150 return false;
151 case MI_TRNSD:
152 if (record->event.pressed && midi_config.transpose > (MIDI_TRANSPOSE_MIN - MI_TRNS_0)) {
153 midi_config.transpose--;
154 dprintf("midi transpose %d\n", midi_config.transpose);
155 }
156 return false;
157 case MI_TRNSU:
158 if (record->event.pressed && midi_config.transpose < (MIDI_TRANSPOSE_MAX - MI_TRNS_0)) {
159 const bool positive = midi_config.transpose > 0;
160 midi_config.transpose++;
161 if (positive && midi_config.transpose < 0)
162 midi_config.transpose--;
163 dprintf("midi transpose %d\n", midi_config.transpose);
164 }
165 return false;
166 case MIDI_VELOCITY_MIN ... MIDI_VELOCITY_MAX:
167 if (record->event.pressed) {
168 midi_config.velocity = keycode - MIDI_VELOCITY_MIN;
169 dprintf("midi velocity %d\n", midi_config.velocity);
170 }
171 return false;
172 case MI_VELD:
173 if (record->event.pressed && midi_config.velocity > 0) {
174 midi_config.velocity--;
175 dprintf("midi velocity %d\n", midi_config.velocity);
176 }
177 return false;
178 case MI_VELU:
179 if (record->event.pressed) {
180 midi_config.velocity++;
181 dprintf("midi velocity %d\n", midi_config.velocity);
182 }
183 return false;
184 case MIDI_CHANNEL_MIN ... MIDI_CHANNEL_MAX:
185 if (record->event.pressed) {
186 midi_config.channel = keycode - MIDI_CHANNEL_MIN;
187 dprintf("midi channel %d\n", midi_config.channel);
188 }
189 return false;
190 case MI_CHD:
191 if (record->event.pressed) {
192 midi_config.channel--;
193 dprintf("midi channel %d\n", midi_config.channel);
194 }
195 return false;
196 case MI_CHU:
197 if (record->event.pressed) {
198 midi_config.channel++;
199 dprintf("midi channel %d\n", midi_config.channel);
200 }
201 return false;
202 case MI_ALLOFF:
203 if (record->event.pressed) {
204 midi_send_cc(&midi_device, midi_config.channel, 0x7B, 0);
205 dprintf("midi all notes off\n");
206 }
207 return false;
208 case MI_SUS:
209 midi_send_cc(&midi_device, midi_config.channel, 0x40, record->event.pressed ? 127 : 0);
210 dprintf("midi sustain %d\n", record->event.pressed);
211 return false;
212 case MI_PORT:
213 midi_send_cc(&midi_device, midi_config.channel, 0x41, record->event.pressed ? 127 : 0);
214 dprintf("midi portamento %d\n", record->event.pressed);
215 return false;
216 case MI_SOST:
217 midi_send_cc(&midi_device, midi_config.channel, 0x42, record->event.pressed ? 127 : 0);
218 dprintf("midi sostenuto %d\n", record->event.pressed);
219 return false;
220 case MI_SOFT:
221 midi_send_cc(&midi_device, midi_config.channel, 0x43, record->event.pressed ? 127 : 0);
222 dprintf("midi soft %d\n", record->event.pressed);
223 return false;
224 case MI_LEG:
225 midi_send_cc(&midi_device, midi_config.channel, 0x43, record->event.pressed ? 127 : 0);
226 dprintf("midi legato %d\n", record->event.pressed);
227 return false;
228 case MI_MOD:
229 midi_modulation_step = record->event.pressed ? 1 : -1;
230 return false;
231 case MI_MODSD:
232 if (record->event.pressed) {
233 midi_config.modulation_interval++;
234 // prevent overflow
235 if (midi_config.modulation_interval == 0)
236 midi_config.modulation_interval--;
237 dprintf("midi modulation interval %d\n", midi_config.modulation_interval);
238 }
239 return false;
240 case MI_MODSU:
241 if (record->event.pressed && midi_config.modulation_interval > 0) {
242 midi_config.modulation_interval--;
243 dprintf("midi modulation interval %d\n", midi_config.modulation_interval);
244 }
245 return false;
246 };
247
248 return true;
249}
250
251#endif // MIDI_ADVANCED
252
253#endif // MIDI_ENABLE
diff --git a/quantum/process_keycode/process_midi.h b/quantum/process_keycode/process_midi.h
index acd4fc1b1..ccac8981a 100644
--- a/quantum/process_keycode/process_midi.h
+++ b/quantum/process_keycode/process_midi.h
@@ -1,207 +1,56 @@
1/* Copyright 2016 Jack Humbert
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 PROCESS_MIDI_H 17#ifndef PROCESS_MIDI_H
2#define PROCESS_MIDI_H 18#define PROCESS_MIDI_H
3 19
4#include "quantum.h" 20#include "quantum.h"
5 21
6bool process_midi(uint16_t keycode, keyrecord_t *record); 22#ifdef MIDI_ENABLE
23
24#ifdef MIDI_BASIC
25void process_midi_basic_noteon(uint8_t note);
26void process_midi_basic_noteoff(uint8_t note);
27void process_midi_all_notes_off(void);
28#endif
7 29
8#define MIDI(n) ((n) | 0x6000) 30#ifdef MIDI_ADVANCED
9#define MIDI12 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000 31typedef union {
32 uint32_t raw;
33 struct {
34 uint8_t octave :4;
35 int8_t transpose :4;
36 uint8_t velocity :4;
37 uint8_t channel :4;
38 uint8_t modulation_interval :4;
39 };
40} midi_config_t;
41
42midi_config_t midi_config;
43
44void midi_init(void);
45void midi_task(void);
46bool process_midi(uint16_t keycode, keyrecord_t *record);
10 47
11#define CHNL(note, channel) (note + (channel << 8)) 48#define MIDI_INVALID_NOTE 0xFF
49#define MIDI_TONE_COUNT (MIDI_TONE_MAX - MIDI_TONE_MIN + 1)
12 50
13#define SCALE (int8_t []){ 0 + (12*0), 2 + (12*0), 4 + (12*0), 5 + (12*0), 7 + (12*0), 9 + (12*0), 11 + (12*0), \ 51uint8_t midi_compute_note(uint16_t keycode);
14 0 + (12*1), 2 + (12*1), 4 + (12*1), 5 + (12*1), 7 + (12*1), 9 + (12*1), 11 + (12*1), \ 52#endif // MIDI_ADVANCED
15 0 + (12*2), 2 + (12*2), 4 + (12*2), 5 + (12*2), 7 + (12*2), 9 + (12*2), 11 + (12*2), \
16 0 + (12*3), 2 + (12*3), 4 + (12*3), 5 + (12*3), 7 + (12*3), 9 + (12*3), 11 + (12*3), \
17 0 + (12*4), 2 + (12*4), 4 + (12*4), 5 + (12*4), 7 + (12*4), 9 + (12*4), 11 + (12*4), }
18 53
19#define N_CN1 (0x600C + (12 * -1) + 0 ) 54#endif // MIDI_ENABLE
20#define N_CN1S (0x600C + (12 * -1) + 1 )
21#define N_DN1F (0x600C + (12 * -1) + 1 )
22#define N_DN1 (0x600C + (12 * -1) + 2 )
23#define N_DN1S (0x600C + (12 * -1) + 3 )
24#define N_EN1F (0x600C + (12 * -1) + 3 )
25#define N_EN1 (0x600C + (12 * -1) + 4 )
26#define N_FN1 (0x600C + (12 * -1) + 5 )
27#define N_FN1S (0x600C + (12 * -1) + 6 )
28#define N_GN1F (0x600C + (12 * -1) + 6 )
29#define N_GN1 (0x600C + (12 * -1) + 7 )
30#define N_GN1S (0x600C + (12 * -1) + 8 )
31#define N_AN1F (0x600C + (12 * -1) + 8 )
32#define N_AN1 (0x600C + (12 * -1) + 9 )
33#define N_AN1S (0x600C + (12 * -1) + 10)
34#define N_BN1F (0x600C + (12 * -1) + 10)
35#define N_BN1 (0x600C + (12 * -1) + 11)
36#define N_C0 (0x600C + (12 * 0) + 0 )
37#define N_C0S (0x600C + (12 * 0) + 1 )
38#define N_D0F (0x600C + (12 * 0) + 1 )
39#define N_D0 (0x600C + (12 * 0) + 2 )
40#define N_D0S (0x600C + (12 * 0) + 3 )
41#define N_E0F (0x600C + (12 * 0) + 3 )
42#define N_E0 (0x600C + (12 * 0) + 4 )
43#define N_F0 (0x600C + (12 * 0) + 5 )
44#define N_F0S (0x600C + (12 * 0) + 6 )
45#define N_G0F (0x600C + (12 * 0) + 6 )
46#define N_G0 (0x600C + (12 * 0) + 7 )
47#define N_G0S (0x600C + (12 * 0) + 8 )
48#define N_A0F (0x600C + (12 * 0) + 8 )
49#define N_A0 (0x600C + (12 * 0) + 9 )
50#define N_A0S (0x600C + (12 * 0) + 10)
51#define N_B0F (0x600C + (12 * 0) + 10)
52#define N_B0 (0x600C + (12 * 0) + 11)
53#define N_C1 (0x600C + (12 * 1) + 0 )
54#define N_C1S (0x600C + (12 * 1) + 1 )
55#define N_D1F (0x600C + (12 * 1) + 1 )
56#define N_D1 (0x600C + (12 * 1) + 2 )
57#define N_D1S (0x600C + (12 * 1) + 3 )
58#define N_E1F (0x600C + (12 * 1) + 3 )
59#define N_E1 (0x600C + (12 * 1) + 4 )
60#define N_F1 (0x600C + (12 * 1) + 5 )
61#define N_F1S (0x600C + (12 * 1) + 6 )
62#define N_G1F (0x600C + (12 * 1) + 6 )
63#define N_G1 (0x600C + (12 * 1) + 7 )
64#define N_G1S (0x600C + (12 * 1) + 8 )
65#define N_A1F (0x600C + (12 * 1) + 8 )
66#define N_A1 (0x600C + (12 * 1) + 9 )
67#define N_A1S (0x600C + (12 * 1) + 10)
68#define N_B1F (0x600C + (12 * 1) + 10)
69#define N_B1 (0x600C + (12 * 1) + 11)
70#define N_C2 (0x600C + (12 * 2) + 0 )
71#define N_C2S (0x600C + (12 * 2) + 1 )
72#define N_D2F (0x600C + (12 * 2) + 1 )
73#define N_D2 (0x600C + (12 * 2) + 2 )
74#define N_D2S (0x600C + (12 * 2) + 3 )
75#define N_E2F (0x600C + (12 * 2) + 3 )
76#define N_E2 (0x600C + (12 * 2) + 4 )
77#define N_F2 (0x600C + (12 * 2) + 5 )
78#define N_F2S (0x600C + (12 * 2) + 6 )
79#define N_G2F (0x600C + (12 * 2) + 6 )
80#define N_G2 (0x600C + (12 * 2) + 7 )
81#define N_G2S (0x600C + (12 * 2) + 8 )
82#define N_A2F (0x600C + (12 * 2) + 8 )
83#define N_A2 (0x600C + (12 * 2) + 9 )
84#define N_A2S (0x600C + (12 * 2) + 10)
85#define N_B2F (0x600C + (12 * 2) + 10)
86#define N_B2 (0x600C + (12 * 2) + 11)
87#define N_C3 (0x600C + (12 * 3) + 0 )
88#define N_C3S (0x600C + (12 * 3) + 1 )
89#define N_D3F (0x600C + (12 * 3) + 1 )
90#define N_D3 (0x600C + (12 * 3) + 2 )
91#define N_D3S (0x600C + (12 * 3) + 3 )
92#define N_E3F (0x600C + (12 * 3) + 3 )
93#define N_E3 (0x600C + (12 * 3) + 4 )
94#define N_F3 (0x600C + (12 * 3) + 5 )
95#define N_F3S (0x600C + (12 * 3) + 6 )
96#define N_G3F (0x600C + (12 * 3) + 6 )
97#define N_G3 (0x600C + (12 * 3) + 7 )
98#define N_G3S (0x600C + (12 * 3) + 8 )
99#define N_A3F (0x600C + (12 * 3) + 8 )
100#define N_A3 (0x600C + (12 * 3) + 9 )
101#define N_A3S (0x600C + (12 * 3) + 10)
102#define N_B3F (0x600C + (12 * 3) + 10)
103#define N_B3 (0x600C + (12 * 3) + 11)
104#define N_C4 (0x600C + (12 * 4) + 0 )
105#define N_C4S (0x600C + (12 * 4) + 1 )
106#define N_D4F (0x600C + (12 * 4) + 1 )
107#define N_D4 (0x600C + (12 * 4) + 2 )
108#define N_D4S (0x600C + (12 * 4) + 3 )
109#define N_E4F (0x600C + (12 * 4) + 3 )
110#define N_E4 (0x600C + (12 * 4) + 4 )
111#define N_F4 (0x600C + (12 * 4) + 5 )
112#define N_F4S (0x600C + (12 * 4) + 6 )
113#define N_G4F (0x600C + (12 * 4) + 6 )
114#define N_G4 (0x600C + (12 * 4) + 7 )
115#define N_G4S (0x600C + (12 * 4) + 8 )
116#define N_A4F (0x600C + (12 * 4) + 8 )
117#define N_A4 (0x600C + (12 * 4) + 9 )
118#define N_A4S (0x600C + (12 * 4) + 10)
119#define N_B4F (0x600C + (12 * 4) + 10)
120#define N_B4 (0x600C + (12 * 4) + 11)
121#define N_C5 (0x600C + (12 * 5) + 0 )
122#define N_C5S (0x600C + (12 * 5) + 1 )
123#define N_D5F (0x600C + (12 * 5) + 1 )
124#define N_D5 (0x600C + (12 * 5) + 2 )
125#define N_D5S (0x600C + (12 * 5) + 3 )
126#define N_E5F (0x600C + (12 * 5) + 3 )
127#define N_E5 (0x600C + (12 * 5) + 4 )
128#define N_F5 (0x600C + (12 * 5) + 5 )
129#define N_F5S (0x600C + (12 * 5) + 6 )
130#define N_G5F (0x600C + (12 * 5) + 6 )
131#define N_G5 (0x600C + (12 * 5) + 7 )
132#define N_G5S (0x600C + (12 * 5) + 8 )
133#define N_A5F (0x600C + (12 * 5) + 8 )
134#define N_A5 (0x600C + (12 * 5) + 9 )
135#define N_A5S (0x600C + (12 * 5) + 10)
136#define N_B5F (0x600C + (12 * 5) + 10)
137#define N_B5 (0x600C + (12 * 5) + 11)
138#define N_C6 (0x600C + (12 * 6) + 0 )
139#define N_C6S (0x600C + (12 * 6) + 1 )
140#define N_D6F (0x600C + (12 * 6) + 1 )
141#define N_D6 (0x600C + (12 * 6) + 2 )
142#define N_D6S (0x600C + (12 * 6) + 3 )
143#define N_E6F (0x600C + (12 * 6) + 3 )
144#define N_E6 (0x600C + (12 * 6) + 4 )
145#define N_F6 (0x600C + (12 * 6) + 5 )
146#define N_F6S (0x600C + (12 * 6) + 6 )
147#define N_G6F (0x600C + (12 * 6) + 6 )
148#define N_G6 (0x600C + (12 * 6) + 7 )
149#define N_G6S (0x600C + (12 * 6) + 8 )
150#define N_A6F (0x600C + (12 * 6) + 8 )
151#define N_A6 (0x600C + (12 * 6) + 9 )
152#define N_A6S (0x600C + (12 * 6) + 10)
153#define N_B6F (0x600C + (12 * 6) + 10)
154#define N_B6 (0x600C + (12 * 6) + 11)
155#define N_C7 (0x600C + (12 * 7) + 0 )
156#define N_C7S (0x600C + (12 * 7) + 1 )
157#define N_D7F (0x600C + (12 * 7) + 1 )
158#define N_D7 (0x600C + (12 * 7) + 2 )
159#define N_D7S (0x600C + (12 * 7) + 3 )
160#define N_E7F (0x600C + (12 * 7) + 3 )
161#define N_E7 (0x600C + (12 * 7) + 4 )
162#define N_F7 (0x600C + (12 * 7) + 5 )
163#define N_F7S (0x600C + (12 * 7) + 6 )
164#define N_G7F (0x600C + (12 * 7) + 6 )
165#define N_G7 (0x600C + (12 * 7) + 7 )
166#define N_G7S (0x600C + (12 * 7) + 8 )
167#define N_A7F (0x600C + (12 * 7) + 8 )
168#define N_A7 (0x600C + (12 * 7) + 9 )
169#define N_A7S (0x600C + (12 * 7) + 10)
170#define N_B7F (0x600C + (12 * 7) + 10)
171#define N_B7 (0x600C + (12 * 7) + 11)
172#define N_C8 (0x600C + (12 * 8) + 0 )
173#define N_C8S (0x600C + (12 * 8) + 1 )
174#define N_D8F (0x600C + (12 * 8) + 1 )
175#define N_D8 (0x600C + (12 * 8) + 2 )
176#define N_D8S (0x600C + (12 * 8) + 3 )
177#define N_E8F (0x600C + (12 * 8) + 3 )
178#define N_E8 (0x600C + (12 * 8) + 4 )
179#define N_F8 (0x600C + (12 * 8) + 5 )
180#define N_F8S (0x600C + (12 * 8) + 6 )
181#define N_G8F (0x600C + (12 * 8) + 6 )
182#define N_G8 (0x600C + (12 * 8) + 7 )
183#define N_G8S (0x600C + (12 * 8) + 8 )
184#define N_A8F (0x600C + (12 * 8) + 8 )
185#define N_A8 (0x600C + (12 * 8) + 9 )
186#define N_A8S (0x600C + (12 * 8) + 10)
187#define N_B8F (0x600C + (12 * 8) + 10)
188#define N_B8 (0x600C + (12 * 8) + 11)
189#define N_C8 (0x600C + (12 * 8) + 0 )
190#define N_C8S (0x600C + (12 * 8) + 1 )
191#define N_D8F (0x600C + (12 * 8) + 1 )
192#define N_D8 (0x600C + (12 * 8) + 2 )
193#define N_D8S (0x600C + (12 * 8) + 3 )
194#define N_E8F (0x600C + (12 * 8) + 3 )
195#define N_E8 (0x600C + (12 * 8) + 4 )
196#define N_F8 (0x600C + (12 * 8) + 5 )
197#define N_F8S (0x600C + (12 * 8) + 6 )
198#define N_G8F (0x600C + (12 * 8) + 6 )
199#define N_G8 (0x600C + (12 * 8) + 7 )
200#define N_G8S (0x600C + (12 * 8) + 8 )
201#define N_A8F (0x600C + (12 * 8) + 8 )
202#define N_A8 (0x600C + (12 * 8) + 9 )
203#define N_A8S (0x600C + (12 * 8) + 10)
204#define N_B8F (0x600C + (12 * 8) + 10)
205#define N_B8 (0x600C + (12 * 8) + 11)
206 55
207#endif \ No newline at end of file 56#endif
diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c
index 1e2648bff..217dca280 100644
--- a/quantum/process_keycode/process_music.c
+++ b/quantum/process_keycode/process_music.c
@@ -1,5 +1,29 @@
1/* Copyright 2016 Jack Humbert
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 */
1#include "process_music.h" 16#include "process_music.h"
2 17
18#ifdef AUDIO_ENABLE
19#include "process_audio.h"
20#endif
21#if defined(MIDI_ENABLE) && defined(MIDI_BASIC)
22#include "process_midi.h"
23#endif
24
25#if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
26
3bool music_activated = false; 27bool music_activated = false;
4uint8_t music_starting_note = 0x0C; 28uint8_t music_starting_note = 0x0C;
5int music_offset = 7; 29int music_offset = 7;
@@ -8,36 +32,41 @@ int music_offset = 7;
8static bool music_sequence_recording = false; 32static bool music_sequence_recording = false;
9static bool music_sequence_recorded = false; 33static bool music_sequence_recorded = false;
10static bool music_sequence_playing = false; 34static bool music_sequence_playing = false;
11static float music_sequence[16] = {0}; 35static uint8_t music_sequence[16] = {0};
12static uint8_t music_sequence_count = 0; 36static uint8_t music_sequence_count = 0;
13static uint8_t music_sequence_position = 0; 37static uint8_t music_sequence_position = 0;
14 38
15static uint16_t music_sequence_timer = 0; 39static uint16_t music_sequence_timer = 0;
16static uint16_t music_sequence_interval = 100; 40static uint16_t music_sequence_interval = 100;
17 41
18bool process_music(uint16_t keycode, keyrecord_t *record) { 42static void music_noteon(uint8_t note) {
43 #ifdef AUDIO_ENABLE
44 process_audio_noteon(note);
45 #endif
46 #if defined(MIDI_ENABLE) && defined(MIDI_BASIC)
47 process_midi_basic_noteon(note);
48 #endif
49}
19 50
20 if (keycode == AU_ON && record->event.pressed) { 51static void music_noteoff(uint8_t note) {
21 audio_on(); 52 #ifdef AUDIO_ENABLE
22 return false; 53 process_audio_noteoff(note);
23 } 54 #endif
55 #if defined(MIDI_ENABLE) && defined(MIDI_BASIC)
56 process_midi_basic_noteoff(note);
57 #endif
58}
24 59
25 if (keycode == AU_OFF && record->event.pressed) { 60void music_all_notes_off(void) {
26 audio_off(); 61 #ifdef AUDIO_ENABLE
27 return false; 62 process_audio_all_notes_off();
28 } 63 #endif
64 #if defined(MIDI_ENABLE) && defined(MIDI_BASIC)
65 process_midi_all_notes_off();
66 #endif
67}
29 68
30 if (keycode == AU_TOG && record->event.pressed) { 69bool process_music(uint16_t keycode, keyrecord_t *record) {
31 if (is_audio_on())
32 {
33 audio_off();
34 }
35 else
36 {
37 audio_on();
38 }
39 return false;
40 }
41 70
42 if (keycode == MU_ON && record->event.pressed) { 71 if (keycode == MU_ON && record->event.pressed) {
43 music_on(); 72 music_on();
@@ -61,22 +90,10 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
61 return false; 90 return false;
62 } 91 }
63 92
64 if (keycode == MUV_IN && record->event.pressed) {
65 voice_iterate();
66 music_scale_user();
67 return false;
68 }
69
70 if (keycode == MUV_DE && record->event.pressed) {
71 voice_deiterate();
72 music_scale_user();
73 return false;
74 }
75
76 if (music_activated) { 93 if (music_activated) {
77 94
78 if (keycode == KC_LCTL && record->event.pressed) { // Start recording 95 if (keycode == KC_LCTL && record->event.pressed) { // Start recording
79 stop_all_notes(); 96 music_all_notes_off();
80 music_sequence_recording = true; 97 music_sequence_recording = true;
81 music_sequence_recorded = false; 98 music_sequence_recorded = false;
82 music_sequence_playing = false; 99 music_sequence_playing = false;
@@ -85,7 +102,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
85 } 102 }
86 103
87 if (keycode == KC_LALT && record->event.pressed) { // Stop recording/playing 104 if (keycode == KC_LALT && record->event.pressed) { // Stop recording/playing
88 stop_all_notes(); 105 music_all_notes_off();
89 if (music_sequence_recording) { // was recording 106 if (music_sequence_recording) { // was recording
90 music_sequence_recorded = true; 107 music_sequence_recorded = true;
91 } 108 }
@@ -95,7 +112,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
95 } 112 }
96 113
97 if (keycode == KC_LGUI && record->event.pressed && music_sequence_recorded) { // Start playing 114 if (keycode == KC_LGUI && record->event.pressed && music_sequence_recorded) { // Start playing
98 stop_all_notes(); 115 music_all_notes_off();
99 music_sequence_recording = false; 116 music_sequence_recording = false;
100 music_sequence_playing = true; 117 music_sequence_playing = true;
101 music_sequence_position = 0; 118 music_sequence_position = 0;
@@ -114,32 +131,34 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
114 music_sequence_interval+=10; 131 music_sequence_interval+=10;
115 return false; 132 return false;
116 } 133 }
134
117 #define MUSIC_MODE_GUITAR 135 #define MUSIC_MODE_GUITAR
118 136
119 #ifdef MUSIC_MODE_CHROMATIC 137 #ifdef MUSIC_MODE_CHROMATIC
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)); 138 uint8_t note = (music_starting_note + record->event.key.col + music_offset - 3)+12*(MATRIX_ROWS - record->event.key.row);
121 #elif defined(MUSIC_MODE_GUITAR) 139 #elif defined(MUSIC_MODE_GUITAR)
122 float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + record->event.key.col + music_offset)/12.0+(float)(MATRIX_ROWS - record->event.key.row + 7)*5.0/12); 140 uint8_t note = (music_starting_note + record->event.key.col + music_offset + 32)+5*(MATRIX_ROWS - record->event.key.row);
123 #elif defined(MUSIC_MODE_VIOLIN) 141 #elif defined(MUSIC_MODE_VIOLIN)
124 float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + record->event.key.col + music_offset)/12.0+(float)(MATRIX_ROWS - record->event.key.row + 5)*7.0/12); 142 uint8_t note = (music_starting_note + record->event.key.col + music_offset + 32)+7*(MATRIX_ROWS - record->event.key.row);
125 #else 143 #else
126 float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + SCALE[record->event.key.col + music_offset])/12.0+(MATRIX_ROWS - record->event.key.row)); 144 uint8_t note = (music_starting_note + SCALE[record->event.key.col + music_offset] - 3)+12*(MATRIX_ROWS - record->event.key.row);
127 #endif 145 #endif
128 146
129 if (record->event.pressed) { 147 if (record->event.pressed) {
130 play_note(freq, 0xF); 148 music_noteon(note);
131 if (music_sequence_recording) { 149 if (music_sequence_recording) {
132 music_sequence[music_sequence_count] = freq; 150 music_sequence[music_sequence_count] = note;
133 music_sequence_count++; 151 music_sequence_count++;
134 } 152 }
135 } else { 153 } else {
136 stop_note(freq); 154 music_noteoff(note);
137 } 155 }
138 156
139 if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through 157 if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through
140 return false; 158 return false;
141 } 159 }
142 return true; 160
161 return true;
143} 162}
144 163
145bool is_music_on(void) { 164bool is_music_on(void) {
@@ -161,26 +180,26 @@ void music_on(void) {
161 180
162void music_off(void) { 181void music_off(void) {
163 music_activated = 0; 182 music_activated = 0;
164 stop_all_notes(); 183 music_all_notes_off();
165} 184}
166 185
167
168__attribute__ ((weak))
169void music_on_user() {}
170
171__attribute__ ((weak))
172void audio_on_user() {}
173
174__attribute__ ((weak))
175void music_scale_user() {}
176
177void matrix_scan_music(void) { 186void matrix_scan_music(void) {
178 if (music_sequence_playing) { 187 if (music_sequence_playing) {
179 if ((music_sequence_timer == 0) || (timer_elapsed(music_sequence_timer) > music_sequence_interval)) { 188 if ((music_sequence_timer == 0) || (timer_elapsed(music_sequence_timer) > music_sequence_interval)) {
180 music_sequence_timer = timer_read(); 189 music_sequence_timer = timer_read();
181 stop_note(music_sequence[(music_sequence_position - 1 < 0)?(music_sequence_position - 1 + music_sequence_count):(music_sequence_position - 1)]); 190 uint8_t prev_note = music_sequence[(music_sequence_position - 1 < 0)?(music_sequence_position - 1 + music_sequence_count):(music_sequence_position - 1)];
182 play_note(music_sequence[music_sequence_position], 0xF); 191 uint8_t next_note = music_sequence[music_sequence_position];
192 music_noteoff(prev_note);
193 music_noteon(next_note);
183 music_sequence_position = (music_sequence_position + 1) % music_sequence_count; 194 music_sequence_position = (music_sequence_position + 1) % music_sequence_count;
184 } 195 }
185 } 196 }
186} 197}
198
199__attribute__ ((weak))
200void music_on_user() {}
201
202__attribute__ ((weak))
203void music_scale_user() {}
204
205#endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) \ No newline at end of file
diff --git a/quantum/process_keycode/process_music.h b/quantum/process_keycode/process_music.h
index 318b3e387..8dfbf041f 100644
--- a/quantum/process_keycode/process_music.h
+++ b/quantum/process_keycode/process_music.h
@@ -1,8 +1,26 @@
1/* Copyright 2016 Jack Humbert
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 PROCESS_MUSIC_H 17#ifndef PROCESS_MUSIC_H
2#define PROCESS_MUSIC_H 18#define PROCESS_MUSIC_H
3 19
4#include "quantum.h" 20#include "quantum.h"
5 21
22#if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
23
6bool process_music(uint16_t keycode, keyrecord_t *record); 24bool process_music(uint16_t keycode, keyrecord_t *record);
7 25
8bool is_music_on(void); 26bool is_music_on(void);
@@ -10,9 +28,9 @@ void music_toggle(void);
10void music_on(void); 28void music_on(void);
11void music_off(void); 29void music_off(void);
12 30
13void audio_on_user(void);
14void music_on_user(void); 31void music_on_user(void);
15void music_scale_user(void); 32void music_scale_user(void);
33void music_all_notes_off(void);
16 34
17void matrix_scan_music(void); 35void matrix_scan_music(void);
18 36
@@ -24,4 +42,6 @@ void matrix_scan_music(void);
24 0 + (12*4), 2 + (12*4), 4 + (12*4), 5 + (12*4), 7 + (12*4), 9 + (12*4), 11 + (12*4), } 42 0 + (12*4), 2 + (12*4), 4 + (12*4), 5 + (12*4), 7 + (12*4), 9 + (12*4), 11 + (12*4), }
25#endif 43#endif
26 44
27#endif \ No newline at end of file 45#endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
46
47#endif
diff --git a/quantum/process_keycode/process_printer.c b/quantum/process_keycode/process_printer.c
index 2e11dd366..807f7a0b9 100644
--- a/quantum/process_keycode/process_printer.c
+++ b/quantum/process_keycode/process_printer.c
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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#include "process_printer.h" 17#include "process_printer.h"
2#include "action_util.h" 18#include "action_util.h"
3 19
@@ -251,4 +267,4 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
251 } 267 }
252 return true; 268 return true;
253 269
254} \ No newline at end of file 270}
diff --git a/quantum/process_keycode/process_printer.h b/quantum/process_keycode/process_printer.h
index fdd36d75a..aa494ac8a 100644
--- a/quantum/process_keycode/process_printer.h
+++ b/quantum/process_keycode/process_printer.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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 PROCESS_PRINTER_H 17#ifndef PROCESS_PRINTER_H
2#define PROCESS_PRINTER_H 18#define PROCESS_PRINTER_H
3 19
@@ -5,4 +21,4 @@
5 21
6#include "protocol/serial.h" 22#include "protocol/serial.h"
7 23
8#endif \ No newline at end of file 24#endif
diff --git a/quantum/process_keycode/process_printer_bb.c b/quantum/process_keycode/process_printer_bb.c
index 1924d0377..55d3b552b 100644
--- a/quantum/process_keycode/process_printer_bb.c
+++ b/quantum/process_keycode/process_printer_bb.c
@@ -1,3 +1,19 @@
1/* Copyright 2016 Jack Humbert
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#include "process_printer.h" 17#include "process_printer.h"
2#include "action_util.h" 18#include "action_util.h"
3 19
@@ -257,4 +273,4 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) {
257 } 273 }
258 return true; 274 return true;
259 275
260} \ No newline at end of file 276}
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index 403dca538..b807ec3c3 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -1,6 +1,23 @@
1/* Copyright 2016 Jack Humbert
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 */
1#include "quantum.h" 16#include "quantum.h"
2#include "action_tapping.h" 17#include "action_tapping.h"
3 18
19uint8_t get_oneshot_mods(void);
20
4static uint16_t last_td; 21static uint16_t last_td;
5static int8_t highest_td = -1; 22static int8_t highest_td = -1;
6 23
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h
index 726752ecc..330809f83 100644
--- a/quantum/process_keycode/process_tap_dance.h
+++ b/quantum/process_keycode/process_tap_dance.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 Jack Humbert
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 */
1#ifndef PROCESS_TAP_DANCE_H 16#ifndef PROCESS_TAP_DANCE_H
2#define PROCESS_TAP_DANCE_H 17#define PROCESS_TAP_DANCE_H
3 18
diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c
index 4ad2533b0..86c0937f5 100644
--- a/quantum/process_keycode/process_ucis.c
+++ b/quantum/process_keycode/process_ucis.c
@@ -1,3 +1,19 @@
1/* Copyright 2017 Jack Humbert
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#include "process_ucis.h" 17#include "process_ucis.h"
2 18
3qk_ucis_state_t qk_ucis_state; 19qk_ucis_state_t qk_ucis_state;
@@ -130,4 +146,4 @@ bool process_ucis (uint16_t keycode, keyrecord_t *record) {
130 return false; 146 return false;
131 } 147 }
132 return true; 148 return true;
133} \ No newline at end of file 149}
diff --git a/quantum/process_keycode/process_ucis.h b/quantum/process_keycode/process_ucis.h
index 4332f57b3..3f736a709 100644
--- a/quantum/process_keycode/process_ucis.h
+++ b/quantum/process_keycode/process_ucis.h
@@ -1,3 +1,19 @@
1/* Copyright 2017 Jack Humbert
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 PROCESS_UCIS_H 17#ifndef PROCESS_UCIS_H
2#define PROCESS_UCIS_H 18#define PROCESS_UCIS_H
3 19
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c
index ccae6fdca..678a15234 100644
--- a/quantum/process_keycode/process_unicode.c
+++ b/quantum/process_keycode/process_unicode.c
@@ -1,8 +1,29 @@
1/* Copyright 2016 Jack Humbert
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 */
1#include "process_unicode.h" 16#include "process_unicode.h"
2#include "action_util.h" 17#include "action_util.h"
3 18
19static uint8_t first_flag = 0;
20
4bool process_unicode(uint16_t keycode, keyrecord_t *record) { 21bool process_unicode(uint16_t keycode, keyrecord_t *record) {
5 if (keycode > QK_UNICODE && record->event.pressed) { 22 if (keycode > QK_UNICODE && record->event.pressed) {
23 if (first_flag == 0) {
24 set_unicode_input_mode(eeprom_read_byte(EECONFIG_UNICODEMODE));
25 first_flag = 1;
26 }
6 uint16_t unicode = keycode & 0x7FFF; 27 uint16_t unicode = keycode & 0x7FFF;
7 unicode_input_start(); 28 unicode_input_start();
8 register_hex(unicode); 29 register_hex(unicode);
diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h
index 4c21f11eb..c525b74f0 100644
--- a/quantum/process_keycode/process_unicode.h
+++ b/quantum/process_keycode/process_unicode.h
@@ -1,3 +1,18 @@
1/* Copyright 2016 Jack Humbert
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 */
1#ifndef PROCESS_UNICODE_H 16#ifndef PROCESS_UNICODE_H
2#define PROCESS_UNICODE_H 17#define PROCESS_UNICODE_H
3 18
diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c
index 31bc3b7ab..1dbdec3e7 100644
--- a/quantum/process_keycode/process_unicode_common.c
+++ b/quantum/process_keycode/process_unicode_common.c
@@ -1,10 +1,28 @@
1/* Copyright 2017 Jack Humbert
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#include "process_unicode_common.h" 17#include "process_unicode_common.h"
2 18
19static uint8_t input_mode;
3uint8_t mods; 20uint8_t mods;
4 21
5void set_unicode_input_mode(uint8_t os_target) 22void set_unicode_input_mode(uint8_t os_target)
6{ 23{
7 input_mode = os_target; 24 input_mode = os_target;
25 eeprom_update_byte(EECONFIG_UNICODEMODE, os_target);
8} 26}
9 27
10uint8_t get_unicode_input_mode(void) { 28uint8_t get_unicode_input_mode(void) {
@@ -76,10 +94,22 @@ void unicode_input_finish (void) {
76 if (mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI); 94 if (mods & MOD_BIT(KC_RGUI)) register_code(KC_RGUI);
77} 95}
78 96
97__attribute__((weak))
98uint16_t hex_to_keycode(uint8_t hex)
99{
100 if (hex == 0x0) {
101 return KC_0;
102 } else if (hex < 0xA) {
103 return KC_1 + (hex - 0x1);
104 } else {
105 return KC_A + (hex - 0xA);
106 }
107}
108
79void register_hex(uint16_t hex) { 109void register_hex(uint16_t hex) {
80 for(int i = 3; i >= 0; i--) { 110 for(int i = 3; i >= 0; i--) {
81 uint8_t digit = ((hex >> (i*4)) & 0xF); 111 uint8_t digit = ((hex >> (i*4)) & 0xF);
82 register_code(hex_to_keycode(digit)); 112 register_code(hex_to_keycode(digit));
83 unregister_code(hex_to_keycode(digit)); 113 unregister_code(hex_to_keycode(digit));
84 } 114 }
85} \ No newline at end of file 115}
diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h
index 864693cdd..f5be1da5c 100644
--- a/quantum/process_keycode/process_unicode_common.h
+++ b/quantum/process_keycode/process_unicode_common.h
@@ -1,3 +1,19 @@
1/* Copyright 2017 Jack Humbert
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 PROCESS_UNICODE_COMMON_H 17#ifndef PROCESS_UNICODE_COMMON_H
2#define PROCESS_UNICODE_COMMON_H 18#define PROCESS_UNICODE_COMMON_H
3 19
@@ -129,4 +145,4 @@ void register_hex(uint16_t hex);
129#define UC_TILD UC(0x007E) 145#define UC_TILD UC(0x007E)
130#define UC_DEL UC(0x007F) 146#define UC_DEL UC(0x007F)
131 147
132#endif \ No newline at end of file 148#endif
diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c
index 68a593a18..0227fbdd7 100644
--- a/quantum/process_keycode/process_unicodemap.c
+++ b/quantum/process_keycode/process_unicodemap.c
@@ -1,3 +1,19 @@
1/* Copyright 2017 Jack Humbert
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#include "process_unicodemap.h" 17#include "process_unicodemap.h"
2#include "process_unicode_common.h" 18#include "process_unicode_common.h"
3 19
@@ -53,4 +69,4 @@ bool process_unicode_map(uint16_t keycode, keyrecord_t *record) {
53 } 69 }
54 } 70 }
55 return true; 71 return true;
56} \ No newline at end of file 72}
diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h
index 64a7a0109..929c88c0b 100644
--- a/quantum/process_keycode/process_unicodemap.h
+++ b/quantum/process_keycode/process_unicodemap.h
@@ -1,3 +1,19 @@
1/* Copyright 2017 Jack Humbert
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 PROCESS_UNICODEMAP_H 17#ifndef PROCESS_UNICODEMAP_H
2#define PROCESS_UNICODEMAP_H 18#define PROCESS_UNICODEMAP_H
3 19
@@ -6,4 +22,4 @@
6 22
7void unicode_map_input_error(void); 23void unicode_map_input_error(void);
8bool process_unicode_map(uint16_t keycode, keyrecord_t *record); 24bool process_unicode_map(uint16_t keycode, keyrecord_t *record);
9#endif \ No newline at end of file 25#endif
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 582f8920b..4f4cee4e9 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -1,3 +1,19 @@
1/* Copyright 2016-2017 Jack Humbert
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#include "quantum.h" 17#include "quantum.h"
2#ifdef PROTOCOL_LUFA 18#ifdef PROTOCOL_LUFA
3#include "outputselect.h" 19#include "outputselect.h"
@@ -98,8 +114,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
98 114
99void reset_keyboard(void) { 115void reset_keyboard(void) {
100 clear_keyboard(); 116 clear_keyboard();
101#ifdef AUDIO_ENABLE 117#if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_ENABLE_BASIC))
102 stop_all_notes(); 118 music_all_notes_off();
103 shutdown_user(); 119 shutdown_user();
104#endif 120#endif
105 wait_ms(250); 121 wait_ms(250);
@@ -119,7 +135,7 @@ void reset_keyboard(void) {
119#endif 135#endif
120 136
121static bool shift_interrupted[2] = {0, 0}; 137static bool shift_interrupted[2] = {0, 0};
122static uint16_t scs_timer = 0; 138static uint16_t scs_timer[2] = {0, 0};
123 139
124bool process_record_quantum(keyrecord_t *record) { 140bool process_record_quantum(keyrecord_t *record) {
125 141
@@ -153,10 +169,13 @@ bool process_record_quantum(keyrecord_t *record) {
153 169
154 if (!( 170 if (!(
155 process_record_kb(keycode, record) && 171 process_record_kb(keycode, record) &&
156 #ifdef MIDI_ENABLE 172 #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)
157 process_midi(keycode, record) && 173 process_midi(keycode, record) &&
158 #endif 174 #endif
159 #ifdef AUDIO_ENABLE 175 #ifdef AUDIO_ENABLE
176 process_audio(keycode, record) &&
177 #endif
178 #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
160 process_music(keycode, record) && 179 process_music(keycode, record) &&
161 #endif 180 #endif
162 #ifdef TAP_DANCE_ENABLE 181 #ifdef TAP_DANCE_ENABLE
@@ -294,14 +313,6 @@ bool process_record_quantum(keyrecord_t *record) {
294 return false; 313 return false;
295 break; 314 break;
296 #endif 315 #endif
297 #ifdef ADAFRUIT_BLE_ENABLE
298 case OUT_BLE:
299 if (record->event.pressed) {
300 set_output(OUTPUT_ADAFRUIT_BLE);
301 }
302 return false;
303 break;
304 #endif
305 #endif 316 #endif
306 case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: 317 case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO:
307 if (record->event.pressed) { 318 if (record->event.pressed) {
@@ -384,7 +395,7 @@ bool process_record_quantum(keyrecord_t *record) {
384 case KC_LSPO: { 395 case KC_LSPO: {
385 if (record->event.pressed) { 396 if (record->event.pressed) {
386 shift_interrupted[0] = false; 397 shift_interrupted[0] = false;
387 scs_timer = timer_read (); 398 scs_timer[0] = timer_read ();
388 register_mods(MOD_BIT(KC_LSFT)); 399 register_mods(MOD_BIT(KC_LSFT));
389 } 400 }
390 else { 401 else {
@@ -394,7 +405,7 @@ bool process_record_quantum(keyrecord_t *record) {
394 shift_interrupted[1] = true; 405 shift_interrupted[1] = true;
395 } 406 }
396 #endif 407 #endif
397 if (!shift_interrupted[0] && timer_elapsed(scs_timer) < TAPPING_TERM) { 408 if (!shift_interrupted[0] && timer_elapsed(scs_timer[0]) < TAPPING_TERM) {
398 register_code(LSPO_KEY); 409 register_code(LSPO_KEY);
399 unregister_code(LSPO_KEY); 410 unregister_code(LSPO_KEY);
400 } 411 }
@@ -407,7 +418,7 @@ bool process_record_quantum(keyrecord_t *record) {
407 case KC_RSPC: { 418 case KC_RSPC: {
408 if (record->event.pressed) { 419 if (record->event.pressed) {
409 shift_interrupted[1] = false; 420 shift_interrupted[1] = false;
410 scs_timer = timer_read (); 421 scs_timer[1] = timer_read ();
411 register_mods(MOD_BIT(KC_RSFT)); 422 register_mods(MOD_BIT(KC_RSFT));
412 } 423 }
413 else { 424 else {
@@ -417,7 +428,7 @@ bool process_record_quantum(keyrecord_t *record) {
417 shift_interrupted[1] = true; 428 shift_interrupted[1] = true;
418 } 429 }
419 #endif 430 #endif
420 if (!shift_interrupted[1] && timer_elapsed(scs_timer) < TAPPING_TERM) { 431 if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) {
421 register_code(RSPC_KEY); 432 register_code(RSPC_KEY);
422 unregister_code(RSPC_KEY); 433 unregister_code(RSPC_KEY);
423 } 434 }
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 259bac369..2bf18d095 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -1,3 +1,18 @@
1/* Copyright 2016-2017 Erez Zukerman, Jack Humbert
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 */
1#ifndef QUANTUM_H 16#ifndef QUANTUM_H
2#define QUANTUM_H 17#define QUANTUM_H
3 18
@@ -35,11 +50,16 @@ extern uint32_t default_layer_state;
35 50
36#ifdef MIDI_ENABLE 51#ifdef MIDI_ENABLE
37 #include <lufa.h> 52 #include <lufa.h>
53#ifdef MIDI_ADVANCED
38 #include "process_midi.h" 54 #include "process_midi.h"
39#endif 55#endif
56#endif // MIDI_ENABLE
40 57
41#ifdef AUDIO_ENABLE 58#ifdef AUDIO_ENABLE
42 #include "audio.h" 59 #include "process_audio.h"
60#endif
61
62#if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
43 #include "process_music.h" 63 #include "process_music.h"
44#endif 64#endif
45 65
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 903d57f1e..7354ae0da 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -1,7 +1,31 @@
1 1/* Copyright 2016-2017 Jack Humbert
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 */
2#ifndef QUANTUM_KEYCODES_H 16#ifndef QUANTUM_KEYCODES_H
3#define QUANTUM_KEYCODES_H 17#define QUANTUM_KEYCODES_H
4 18
19#ifndef MIDI_ENABLE_STRICT
20#define MIDI_ENABLE_STRICT 0
21#endif
22
23#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED))
24#ifndef MIDI_TONE_KEYCODE_OCTAVES
25#define MIDI_TONE_KEYCODE_OCTAVES 3
26#endif
27#endif
28
5enum quantum_keycodes { 29enum quantum_keycodes {
6 // Ranges used in shortucuts - not to be used directly 30 // Ranges used in shortucuts - not to be used directly
7 QK_TMK = 0x0000, 31 QK_TMK = 0x0000,
@@ -107,9 +131,230 @@ enum quantum_keycodes {
107 MUV_IN, 131 MUV_IN,
108 MUV_DE, 132 MUV_DE,
109 133
110 // Midi mode on/off 134 // Midi
111 MIDI_ON, 135#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
112 MIDI_OFF, 136 MI_ON, // send midi notes when music mode is enabled
137 MI_OFF, // don't send midi notes when music mode is enabled
138#endif
139
140#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED))
141 MIDI_TONE_MIN,
142
143#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 0
144 MI_C = MIDI_TONE_MIN,
145 MI_Cs,
146 MI_Db = MI_Cs,
147 MI_D,
148 MI_Ds,
149 MI_Eb = MI_Ds,
150 MI_E,
151 MI_F,
152 MI_Fs,
153 MI_Gb = MI_Fs,
154 MI_G,
155 MI_Gs,
156 MI_Ab = MI_Gs,
157 MI_A,
158 MI_As,
159 MI_Bb = MI_As,
160 MI_B,
161#endif
162
163#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 1
164 MI_C_1,
165 MI_Cs_1,
166 MI_Db_1 = MI_Cs_1,
167 MI_D_1,
168 MI_Ds_1,
169 MI_Eb_1 = MI_Ds_1,
170 MI_E_1,
171 MI_F_1,
172 MI_Fs_1,
173 MI_Gb_1 = MI_Fs_1,
174 MI_G_1,
175 MI_Gs_1,
176 MI_Ab_1 = MI_Gs_1,
177 MI_A_1,
178 MI_As_1,
179 MI_Bb_1 = MI_As_1,
180 MI_B_1,
181#endif
182
183#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 2
184 MI_C_2,
185 MI_Cs_2,
186 MI_Db_2 = MI_Cs_2,
187 MI_D_2,
188 MI_Ds_2,
189 MI_Eb_2 = MI_Ds_2,
190 MI_E_2,
191 MI_F_2,
192 MI_Fs_2,
193 MI_Gb_2 = MI_Fs_2,
194 MI_G_2,
195 MI_Gs_2,
196 MI_Ab_2 = MI_Gs_2,
197 MI_A_2,
198 MI_As_2,
199 MI_Bb_2 = MI_As_2,
200 MI_B_2,
201#endif
202
203#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 3
204 MI_C_3,
205 MI_Cs_3,
206 MI_Db_3 = MI_Cs_3,
207 MI_D_3,
208 MI_Ds_3,
209 MI_Eb_3 = MI_Ds_3,
210 MI_E_3,
211 MI_F_3,
212 MI_Fs_3,
213 MI_Gb_3 = MI_Fs_3,
214 MI_G_3,
215 MI_Gs_3,
216 MI_Ab_3 = MI_Gs_3,
217 MI_A_3,
218 MI_As_3,
219 MI_Bb_3 = MI_As_3,
220 MI_B_3,
221#endif
222
223#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 4
224 MI_C_4,
225 MI_Cs_4,
226 MI_Db_4 = MI_Cs_4,
227 MI_D_4,
228 MI_Ds_4,
229 MI_Eb_4 = MI_Ds_4,
230 MI_E_4,
231 MI_F_4,
232 MI_Fs_4,
233 MI_Gb_4 = MI_Fs_4,
234 MI_G_4,
235 MI_Gs_4,
236 MI_Ab_4 = MI_Gs_4,
237 MI_A_4,
238 MI_As_4,
239 MI_Bb_4 = MI_As_4,
240 MI_B_4,
241#endif
242
243#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5
244 MI_C_5,
245 MI_Cs_5,
246 MI_Db_5 = MI_Cs_5,
247 MI_D_5,
248 MI_Ds_5,
249 MI_Eb_5 = MI_Ds_5,
250 MI_E_5,
251 MI_F_5,
252 MI_Fs_5,
253 MI_Gb_5 = MI_Fs_5,
254 MI_G_5,
255 MI_Gs_5,
256 MI_Ab_5 = MI_Gs_5,
257 MI_A_5,
258 MI_As_5,
259 MI_Bb_5 = MI_As_5,
260 MI_B_5,
261#endif
262
263#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5
264 MIDI_TONE_MAX = MI_B_5,
265#elif MIDI_TONE_KEYCODE_OCTAVES > 4
266 MIDI_TONE_MAX = MI_B_4,
267#elif MIDI_TONE_KEYCODE_OCTAVES > 3
268 MIDI_TONE_MAX = MI_B_3,
269#elif MIDI_TONE_KEYCODE_OCTAVES > 2
270 MIDI_TONE_MAX = MI_B_2,
271#elif MIDI_TONE_KEYCODE_OCTAVES > 1
272 MIDI_TONE_MAX = MI_B_1,
273#elif MIDI_TONE_KEYCODE_OCTAVES > 0
274 MIDI_TONE_MAX = MI_B,
275#endif
276
277 MIDI_OCTAVE_MIN,
278 MI_OCT_N2 = MIDI_OCTAVE_MIN,
279 MI_OCT_N1,
280 MI_OCT_0,
281 MI_OCT_1,
282 MI_OCT_2,
283 MI_OCT_3,
284 MI_OCT_4,
285 MI_OCT_5,
286 MI_OCT_6,
287 MI_OCT_7,
288 MIDI_OCTAVE_MAX = MI_OCT_7,
289 MI_OCTD, // octave down
290 MI_OCTU, // octave up
291
292 MIDI_TRANSPOSE_MIN,
293 MI_TRNS_N6 = MIDI_TRANSPOSE_MIN,
294 MI_TRNS_N5,
295 MI_TRNS_N4,
296 MI_TRNS_N3,
297 MI_TRNS_N2,
298 MI_TRNS_N1,
299 MI_TRNS_0,
300 MI_TRNS_1,
301 MI_TRNS_2,
302 MI_TRNS_3,
303 MI_TRNS_4,
304 MI_TRNS_5,
305 MI_TRNS_6,
306 MIDI_TRANSPOSE_MAX = MI_TRNS_6,
307 MI_TRNSD, // transpose down
308 MI_TRNSU, // transpose up
309
310 MIDI_VELOCITY_MIN,
311 MI_VEL_1 = MIDI_VELOCITY_MIN,
312 MI_VEL_2,
313 MI_VEL_3,
314 MI_VEL_4,
315 MI_VEL_5,
316 MI_VEL_6,
317 MI_VEL_7,
318 MI_VEL_8,
319 MI_VEL_9,
320 MI_VEL_10,
321 MIDI_VELOCITY_MAX = MI_VEL_10,
322 MI_VELD, // velocity down
323 MI_VELU, // velocity up
324
325 MIDI_CHANNEL_MIN,
326 MI_CH1 = MIDI_CHANNEL_MIN,
327 MI_CH2,
328 MI_CH3,
329 MI_CH4,
330 MI_CH5,
331 MI_CH6,
332 MI_CH7,
333 MI_CH8,
334 MI_CH9,
335 MI_CH10,
336 MI_CH11,
337 MI_CH12,
338 MI_CH13,
339 MI_CH14,
340 MI_CH15,
341 MI_CH16,
342 MIDI_CHANNEL_MAX = MI_CH16,
343 MI_CHD, // previous channel
344 MI_CHU, // next channel
345
346 MI_ALLOFF, // all notes off
347
348 MI_SUS, // sustain
349 MI_PORT, // portamento
350 MI_SOST, // sostenuto
351 MI_SOFT, // soft pedal
352 MI_LEG, // legato
353
354 MI_MOD, // modulation
355 MI_MODSD, // decrease modulation speed
356 MI_MODSU, // increase modulation speed
357#endif // MIDI_ADVANCED
113 358
114 // Backlight functionality 359 // Backlight functionality
115 BL_0, 360 BL_0,
@@ -159,9 +404,6 @@ enum quantum_keycodes {
159#ifdef BLUETOOTH_ENABLE 404#ifdef BLUETOOTH_ENABLE
160 OUT_BT, 405 OUT_BT,
161#endif 406#endif
162#ifdef ADAFRUIT_BLE_ENABLE
163 OUT_BLE,
164#endif
165 407
166 // always leave at the end 408 // always leave at the end
167 SAFE_RANGE 409 SAFE_RANGE
@@ -282,9 +524,6 @@ enum quantum_keycodes {
282#define BL_ON BL_9 524#define BL_ON BL_9
283#define BL_OFF BL_0 525#define BL_OFF BL_0
284 526
285#define MI_ON MIDI_ON
286#define MI_OFF MIDI_OFF
287
288// GOTO layer - 16 layers max 527// GOTO layer - 16 layers max
289// when: 528// when:
290// ON_PRESS = 1 529// ON_PRESS = 1
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index dd1b91c63..eff70aae1 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -1,3 +1,18 @@
1/* Copyright 2016-2017 Yang Liu
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 */
1#include <avr/eeprom.h> 16#include <avr/eeprom.h>
2#include <avr/interrupt.h> 17#include <avr/interrupt.h>
3#include <util/delay.h> 18#include <util/delay.h>
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
index 2b3e791bf..92130192c 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight.h
@@ -1,3 +1,18 @@
1/* Copyright 2017 Yang Liu
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 */
1#ifndef RGBLIGHT_H 16#ifndef RGBLIGHT_H
2#define RGBLIGHT_H 17#define RGBLIGHT_H
3 18
diff --git a/quantum/serial_link/LICENSE b/quantum/serial_link/LICENSE
index d7cc3198c..d13cc4b26 100644
--- a/quantum/serial_link/LICENSE
+++ b/quantum/serial_link/LICENSE
@@ -1,7 +1,5 @@
1The MIT License (MIT) 1The MIT License (MIT)
2 2
3Copyright (c) 2016 Fred Sundvik
4
5Permission is hereby granted, free of charge, to any person obtaining a copy 3Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal 4of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights 5in the Software without restriction, including without limitation the rights
diff --git a/quantum/template/Makefile b/quantum/template/Makefile
index 4e2a6f00f..840dc9a28 100644
--- a/quantum/template/Makefile
+++ b/quantum/template/Makefile
@@ -1,3 +1,18 @@
1# Copyright 2013 Jun Wako <wakojun@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
1ifndef MAKEFILE_INCLUDED 16ifndef MAKEFILE_INCLUDED
2 include ../../Makefile 17 include ../../Makefile
3endif \ No newline at end of file 18endif
diff --git a/quantum/template/config.h b/quantum/template/config.h
index c61c4a618..dbca45765 100644
--- a/quantum/template/config.h
+++ b/quantum/template/config.h
@@ -1,5 +1,5 @@
1/* 1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com> 2Copyright 2017 REPLACE_WITH_YOUR_NAME
3 3
4This program is free software: you can redistribute it and/or modify 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 5it under the terms of the GNU General Public License as published by
@@ -159,4 +159,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
159//#define NO_ACTION_MACRO 159//#define NO_ACTION_MACRO
160//#define NO_ACTION_FUNCTION 160//#define NO_ACTION_FUNCTION
161 161
162/*
163 * MIDI options
164 */
165
166/* Prevent use of disabled MIDI features in the keymap */
167//#define MIDI_ENABLE_STRICT 1
168
169/* enable basic MIDI features:
170 - MIDI notes can be sent when in Music mode is on
171*/
172//#define MIDI_BASIC
173
174/* enable advanced MIDI features:
175 - MIDI notes can be added to the keymap
176 - Octave shift and transpose
177 - Virtual sustain, portamento, and modulation wheel
178 - etc.
179*/
180//#define MIDI_ADVANCED
181
182/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
183//#define MIDI_TONE_KEYCODE_OCTAVES 1
184
162#endif 185#endif
diff --git a/quantum/template/keymaps/default/Makefile b/quantum/template/keymaps/default/Makefile
index f4671a9d1..b8879076b 100644
--- a/quantum/template/keymaps/default/Makefile
+++ b/quantum/template/keymaps/default/Makefile
@@ -1,4 +1,20 @@
1# Build Options 1# Copyright 2013 Jun Wako <wakojun@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
17# QMK Build Options
2# change to "no" to disable the options, or define them in the Makefile in 18# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically 19# the appropriate keymap folder that will get included automatically
4# 20#
@@ -9,7 +25,7 @@ CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration 25COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 26NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality 27BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls 28MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
13AUDIO_ENABLE = no # Audio output on port C6 29AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode 30UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 31BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
@@ -18,4 +34,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18 34
19ifndef QUANTUM_DIR 35ifndef QUANTUM_DIR
20 include ../../../../Makefile 36 include ../../../../Makefile
21endif \ No newline at end of file 37endif
diff --git a/quantum/template/keymaps/default/config.h b/quantum/template/keymaps/default/config.h
index df06a2620..f52a97bbc 100644
--- a/quantum/template/keymaps/default/config.h
+++ b/quantum/template/keymaps/default/config.h
@@ -1,3 +1,19 @@
1/* Copyright 2017 REPLACE_WITH_YOUR_NAME
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 CONFIG_USER_H 17#ifndef CONFIG_USER_H
2#define CONFIG_USER_H 18#define CONFIG_USER_H
3 19
@@ -5,4 +21,4 @@
5 21
6// place overrides here 22// place overrides here
7 23
8#endif \ No newline at end of file 24#endif
diff --git a/quantum/template/keymaps/default/keymap.c b/quantum/template/keymaps/default/keymap.c
index e28a4723e..a123cd7ba 100644
--- a/quantum/template/keymaps/default/keymap.c
+++ b/quantum/template/keymaps/default/keymap.c
@@ -1,3 +1,18 @@
1/* Copyright 2017 REPLACE_WITH_YOUR_NAME
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 */
1#include "%KEYBOARD%.h" 16#include "%KEYBOARD%.h"
2 17
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -41,4 +56,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
41 56
42void led_set_user(uint8_t usb_led) { 57void led_set_user(uint8_t usb_led) {
43 58
44} \ No newline at end of file 59}
diff --git a/quantum/template/rules.mk b/quantum/template/rules.mk
index bad3387bf..a1f9377d8 100644
--- a/quantum/template/rules.mk
+++ b/quantum/template/rules.mk
@@ -61,7 +61,7 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE ?= no # USB Nkey Rollover 62NKRO_ENABLE ?= no # USB Nkey Rollover
63BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default 63BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE ?= no # MIDI controls 64MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
65UNICODE_ENABLE ?= no # Unicode 65UNICODE_ENABLE ?= no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID 66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE ?= no # Audio output on port C6 67AUDIO_ENABLE ?= no # Audio output on port C6
diff --git a/quantum/template/template.c b/quantum/template/template.c
index 5ef349583..97f788654 100644
--- a/quantum/template/template.c
+++ b/quantum/template/template.c
@@ -1,3 +1,18 @@
1/* Copyright 2017 REPLACE_WITH_YOUR_NAME
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 */
1#include "%KEYBOARD%.h" 16#include "%KEYBOARD%.h"
2 17
3void matrix_init_kb(void) { 18void matrix_init_kb(void) {
diff --git a/quantum/template/template.h b/quantum/template/template.h
index cd78a54e3..7e2b14f3c 100644
--- a/quantum/template/template.h
+++ b/quantum/template/template.h
@@ -1,3 +1,18 @@
1/* Copyright 2017 REPLACE_WITH_YOUR_NAME
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 */
1#ifndef %KEYBOARD_UPPERCASE%_H 16#ifndef %KEYBOARD_UPPERCASE%_H
2#define %KEYBOARD_UPPERCASE%_H 17#define %KEYBOARD_UPPERCASE%_H
3 18
@@ -5,7 +20,7 @@
5 20
6// This a shortcut to help you visually see your layout. 21// This a shortcut to help you visually see your layout.
7// The following is an example using the Planck MIT layout 22// The following is an example using the Planck MIT layout
8// The first section contains all of the arguements 23// The first section contains all of the arguments
9// The second converts the arguments into a two-dimensional array 24// The second converts the arguments into a two-dimensional array
10#define KEYMAP( \ 25#define KEYMAP( \
11 k00, k01, k02, \ 26 k00, k01, k02, \
diff --git a/quantum/variable_trace.c b/quantum/variable_trace.c
index de580244c..713747cfc 100644
--- a/quantum/variable_trace.c
+++ b/quantum/variable_trace.c
@@ -1,3 +1,19 @@
1/* Copyright 2016 Fred Sundvik
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#include "variable_trace.h" 17#include "variable_trace.h"
2#include <stddef.h> 18#include <stddef.h>
3#include <string.h> 19#include <string.h>
diff --git a/quantum/variable_trace.h b/quantum/variable_trace.h
index 46bd82786..dacc13858 100644
--- a/quantum/variable_trace.h
+++ b/quantum/variable_trace.h
@@ -1,3 +1,19 @@
1/* Copyright 2016 Fred Sundvik
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 VARIABLE_TRACE_H 17#ifndef VARIABLE_TRACE_H
2#define VARIABLE_TRACE_H 18#define VARIABLE_TRACE_H
3 19
diff --git a/readme.md b/readme.md
index b2dfc5f75..f7bf14b6a 100644
--- a/readme.md
+++ b/readme.md
@@ -32,7 +32,7 @@ The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/j
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/qmk/qmk_firmware/wiki) - the entirety of the readme has been moved here 34* [**The Wiki**](https://github.com/qmk/qmk_firmware/wiki) - the entirety of the readme has been moved here
35* The readme for your own keyboard: This is found under `keyboards/<your keyboards's name>/`. So for the ErgoDox EZ, it's [here](keyboards/ergodox/ez/); for the Planck, it's [here](keyboards/planck/) and so on. 35* The readme for your own keyboard: This is found under `keyboards/<your keyboards's name>/`. So for the ErgoDox, it's [here](keyboards/ergodox/); 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.
38 * [quantum/quantum_keycodes.h](quantum/quantum_keycodes.h) - this is where the QMK-specific aliases are all set up. Things like the Hyper and Meh key, the Leader key, and all of the other QMK innovations. These are also explained and documented below, but `quantum_keycodes.h` is where they're actually defined. 38 * [quantum/quantum_keycodes.h](quantum/quantum_keycodes.h) - this is where the QMK-specific aliases are all set up. Things like the Hyper and Meh key, the Leader key, and all of the other QMK innovations. These are also explained and documented below, but `quantum_keycodes.h` is where they're actually defined.
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index 062a712bd..eb0c40138 100644
--- a/tmk_core/chibios.mk
+++ b/tmk_core/chibios.mk
@@ -143,8 +143,13 @@ MCUFLAGS = -mcpu=$(MCU)
143 143
144DEBUG = gdb 144DEBUG = gdb
145 145
146DFU_ARGS =
147ifneq ("$(SERIAL)","")
148 DFU_ARGS += -S $(SERIAL)
149endif
150
146# List any extra directories to look for libraries here. 151# List any extra directories to look for libraries here.
147EXTRALIBDIRS = $(RULESPATH)/ld 152EXTRALIBDIRS = $(RULESPATH)/ld
148 153
149dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter 154dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter
150 dfu-util -D $(BUILD_DIR)/$(TARGET).bin \ No newline at end of file 155 dfu-util $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index a86dccc61..3e0bd7dbc 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -93,14 +93,25 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
93 TMK_COMMON_DEFS += -DBACKLIGHT_ENABLE 93 TMK_COMMON_DEFS += -DBACKLIGHT_ENABLE
94endif 94endif
95 95
96ifeq ($(strip $(ADAFRUIT_BLE_ENABLE)), yes)
97 TMK_COMMON_DEFS += -DADAFRUIT_BLE_ENABLE
98endif
99
100ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) 96ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
101 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE 97 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
102endif 98endif
103 99
100ifeq ($(strip $(BLUETOOTH)), AdafruitBLE)
101 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
102 TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_BLE
103endif
104
105ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey)
106 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
107 TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_EZKEY
108endif
109
110ifeq ($(strip $(BLUETOOTH)), RN42)
111 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
112 TMK_COMMON_DEFS += -DMODULE_RN42
113endif
114
104ifeq ($(strip $(ONEHAND_ENABLE)), yes) 115ifeq ($(strip $(ONEHAND_ENABLE)), yes)
105 TMK_COMMON_DEFS += -DONEHAND_ENABLE 116 TMK_COMMON_DEFS += -DONEHAND_ENABLE
106endif 117endif
diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c
index ff78d7f2a..bd9a69ae0 100644
--- a/tmk_core/common/action_tapping.c
+++ b/tmk_core/common/action_tapping.c
@@ -228,6 +228,7 @@ bool process_tapping(keyrecord_t *keyp)
228 if (WITHIN_TAPPING_TERM(event)) { 228 if (WITHIN_TAPPING_TERM(event)) {
229 if (event.pressed) { 229 if (event.pressed) {
230 if (IS_TAPPING_KEY(event.key)) { 230 if (IS_TAPPING_KEY(event.key)) {
231#ifndef TAPPING_FORCE_HOLD
231 if (!tapping_key.tap.interrupted && tapping_key.tap.count > 0) { 232 if (!tapping_key.tap.interrupted && tapping_key.tap.count > 0) {
232 // sequential tap. 233 // sequential tap.
233 keyp->tap = tapping_key.tap; 234 keyp->tap = tapping_key.tap;
@@ -237,11 +238,11 @@ bool process_tapping(keyrecord_t *keyp)
237 tapping_key = *keyp; 238 tapping_key = *keyp;
238 debug_tapping_key(); 239 debug_tapping_key();
239 return true; 240 return true;
240 } else {
241 // FIX: start new tap again
242 tapping_key = *keyp;
243 return true;
244 } 241 }
242#endif
243 // FIX: start new tap again
244 tapping_key = *keyp;
245 return true;
245 } else if (is_tap_key(event.key)) { 246 } else if (is_tap_key(event.key)) {
246 // Sequential tap can be interfered with other tap key. 247 // Sequential tap can be interfered with other tap key.
247 debug("Tapping: Start with interfering other tap.\n"); 248 debug("Tapping: Start with interfering other tap.\n");
diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h
index d8caa346f..280dc7ab6 100644
--- a/tmk_core/common/eeconfig.h
+++ b/tmk_core/common/eeconfig.h
@@ -33,6 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
33#define EECONFIG_BACKLIGHT (uint8_t *)6 33#define EECONFIG_BACKLIGHT (uint8_t *)6
34#define EECONFIG_AUDIO (uint8_t *)7 34#define EECONFIG_AUDIO (uint8_t *)7
35#define EECONFIG_RGBLIGHT (uint32_t *)8 35#define EECONFIG_RGBLIGHT (uint32_t *)8
36#define EECONFIG_UNICODEMODE (uint8_t *)12
36 37
37 38
38/* debug bit */ 39/* debug bit */
diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk
index de0cc795f..7ce727dab 100644
--- a/tmk_core/protocol/lufa.mk
+++ b/tmk_core/protocol/lufa.mk
@@ -22,11 +22,21 @@ ifeq ($(strip $(MIDI_ENABLE)), yes)
22 include $(TMK_PATH)/protocol/midi.mk 22 include $(TMK_PATH)/protocol/midi.mk
23endif 23endif
24 24
25ifeq ($(strip $(ADAFRUIT_BLE_ENABLE)), yes) 25ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
26 LUFA_SRC += $(LUFA_DIR)/adafruit_ble.cpp 26 LUFA_SRC += $(LUFA_DIR)/bluetooth.c \
27 $(TMK_DIR)/protocol/serial_uart.c
27endif 28endif
28 29
29ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) 30ifeq ($(strip $(BLUETOOTH)), AdafruitBLE)
31 LUFA_SRC += $(LUFA_DIR)/adafruit_ble.cpp
32endif
33
34ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey)
35 LUFA_SRC += $(LUFA_DIR)/bluetooth.c \
36 $(TMK_DIR)/protocol/serial_uart.c
37endif
38
39ifeq ($(strip $(BLUETOOTH)), RN42)
30 LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ 40 LUFA_SRC += $(LUFA_DIR)/bluetooth.c \
31 $(TMK_DIR)/protocol/serial_uart.c 41 $(TMK_DIR)/protocol/serial_uart.c
32endif 42endif
@@ -54,6 +64,7 @@ LUFA_OPTS += -DUSE_FLASH_DESCRIPTORS
54LUFA_OPTS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" 64LUFA_OPTS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
55#LUFA_OPTS += -DINTERRUPT_CONTROL_ENDPOINT 65#LUFA_OPTS += -DINTERRUPT_CONTROL_ENDPOINT
56LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8 66LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8
67LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8
57LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1 68LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1
58 69
59# Remote wakeup fix for ATmega32U2 https://github.com/tmk/tmk_keyboard/issues/361 70# Remote wakeup fix for ATmega32U2 https://github.com/tmk/tmk_keyboard/issues/361
diff --git a/tmk_core/protocol/lufa/adafruit_ble.h b/tmk_core/protocol/lufa/adafruit_ble.h
index 351fd55ae..b3bab3ca0 100644
--- a/tmk_core/protocol/lufa/adafruit_ble.h
+++ b/tmk_core/protocol/lufa/adafruit_ble.h
@@ -3,7 +3,7 @@
3 * Supports the Adafruit BLE board built around the nRF51822 chip. 3 * Supports the Adafruit BLE board built around the nRF51822 chip.
4 */ 4 */
5#pragma once 5#pragma once
6#ifdef ADAFRUIT_BLE_ENABLE 6#ifdef MODULE_ADAFRUIT_BLE
7#include <stdbool.h> 7#include <stdbool.h>
8#include <stdint.h> 8#include <stdint.h>
9#include <string.h> 9#include <string.h>
@@ -57,4 +57,4 @@ extern bool adafruit_ble_set_power_level(int8_t level);
57} 57}
58#endif 58#endif
59 59
60#endif // ADAFRUIT_BLE_ENABLE 60#endif // MODULE_ADAFRUIT_BLE
diff --git a/tmk_core/protocol/lufa/bluetooth.h b/tmk_core/protocol/lufa/bluetooth.h
index 78ece1cd0..f4b2f6f8b 100644
--- a/tmk_core/protocol/lufa/bluetooth.h
+++ b/tmk_core/protocol/lufa/bluetooth.h
@@ -62,4 +62,18 @@ void bluefruit_serial_send(uint8_t data);
62 (usage == AC_REFRESH ? 0x0000 : \ 62 (usage == AC_REFRESH ? 0x0000 : \
63 (usage == AC_BOOKMARKS ? 0x0000 : 0))))))))))))))))))) 63 (usage == AC_BOOKMARKS ? 0x0000 : 0)))))))))))))))))))
64 64
65#endif \ No newline at end of file 65#define CONSUMER2RN42(usage) \
66 (usage == AUDIO_MUTE ? 0x0040 : \
67 (usage == AUDIO_VOL_UP ? 0x0010 : \
68 (usage == AUDIO_VOL_DOWN ? 0x0020 : \
69 (usage == TRANSPORT_NEXT_TRACK ? 0x0100 : \
70 (usage == TRANSPORT_PREV_TRACK ? 0x0200 : \
71 (usage == TRANSPORT_STOP ? 0x0400 : \
72 (usage == TRANSPORT_STOP_EJECT ? 0x0800 : \
73 (usage == TRANSPORT_PLAY_PAUSE ? 0x0080 : \
74 (usage == AL_EMAIL ? 0x0200 : \
75 (usage == AL_LOCAL_BROWSER ? 0x8000 : \
76 (usage == AC_SEARCH ? 0x0400 : \
77 (usage == AC_HOME ? 0x0100 : 0))))))))))))
78
79 #endif
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c
index ba49284c9..ae6129d1a 100644
--- a/tmk_core/protocol/lufa/lufa.c
+++ b/tmk_core/protocol/lufa/lufa.c
@@ -67,10 +67,11 @@
67#endif 67#endif
68 68
69#ifdef BLUETOOTH_ENABLE 69#ifdef BLUETOOTH_ENABLE
70 #include "bluetooth.h" 70 #ifdef MODULE_ADAFRUIT_BLE
71#endif
72#ifdef ADAFRUIT_BLE_ENABLE
73 #include "adafruit_ble.h" 71 #include "adafruit_ble.h"
72 #else
73 #include "bluetooth.h"
74 #endif
74#endif 75#endif
75 76
76#ifdef VIRTSER_ENABLE 77#ifdef VIRTSER_ENABLE
@@ -602,18 +603,23 @@ static void send_keyboard(report_keyboard_t *report)
602 uint8_t where = where_to_send(); 603 uint8_t where = where_to_send();
603 604
604#ifdef BLUETOOTH_ENABLE 605#ifdef BLUETOOTH_ENABLE
605 if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { 606 if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
606 bluefruit_serial_send(0xFD); 607 #ifdef MODULE_ADAFRUIT_BLE
607 for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) {
608 bluefruit_serial_send(report->raw[i]);
609 }
610 }
611#endif
612
613#ifdef ADAFRUIT_BLE_ENABLE
614 if (where == OUTPUT_ADAFRUIT_BLE) {
615 adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); 608 adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys));
616 } 609 #elif MODULE_RN42
610 bluefruit_serial_send(0xFD);
611 bluefruit_serial_send(0x09);
612 bluefruit_serial_send(0x01);
613 for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) {
614 bluefruit_serial_send(report->raw[i]);
615 }
616 #else
617 bluefruit_serial_send(0xFD);
618 for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) {
619 bluefruit_serial_send(report->raw[i]);
620 }
621 #endif
622 }
617#endif 623#endif
618 624
619 if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { 625 if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) {
@@ -660,24 +666,22 @@ static void send_mouse(report_mouse_t *report)
660 uint8_t where = where_to_send(); 666 uint8_t where = where_to_send();
661 667
662#ifdef BLUETOOTH_ENABLE 668#ifdef BLUETOOTH_ENABLE
663 if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { 669 if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
664 bluefruit_serial_send(0xFD); 670 #ifdef MODULE_ADAFRUIT_BLE
665 bluefruit_serial_send(0x00);
666 bluefruit_serial_send(0x03);
667 bluefruit_serial_send(report->buttons);
668 bluefruit_serial_send(report->x);
669 bluefruit_serial_send(report->y);
670 bluefruit_serial_send(report->v); // should try sending the wheel v here
671 bluefruit_serial_send(report->h); // should try sending the wheel h here
672 bluefruit_serial_send(0x00);
673 }
674#endif
675
676#ifdef ADAFRUIT_BLE_ENABLE
677 if (where == OUTPUT_ADAFRUIT_BLE) {
678 // FIXME: mouse buttons 671 // FIXME: mouse buttons
679 adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h); 672 adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h);
680 } 673 #else
674 bluefruit_serial_send(0xFD);
675 bluefruit_serial_send(0x00);
676 bluefruit_serial_send(0x03);
677 bluefruit_serial_send(report->buttons);
678 bluefruit_serial_send(report->x);
679 bluefruit_serial_send(report->y);
680 bluefruit_serial_send(report->v); // should try sending the wheel v here
681 bluefruit_serial_send(report->h); // should try sending the wheel h here
682 bluefruit_serial_send(0x00);
683 #endif
684 }
681#endif 685#endif
682 686
683 if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { 687 if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) {
@@ -727,6 +731,19 @@ static void send_consumer(uint16_t data)
727 731
728#ifdef BLUETOOTH_ENABLE 732#ifdef BLUETOOTH_ENABLE
729 if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { 733 if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
734 #ifdef MODULE_ADAFRUIT_BLE
735 adafruit_ble_send_consumer_key(data, 0);
736 #elif MODULE_RN42
737 static uint16_t last_data = 0;
738 if (data == last_data) return;
739 last_data = data;
740 uint16_t bitmap = CONSUMER2RN42(data);
741 bluefruit_serial_send(0xFD);
742 bluefruit_serial_send(0x03);
743 bluefruit_serial_send(0x03);
744 bluefruit_serial_send(bitmap&0xFF);
745 bluefruit_serial_send((bitmap>>8)&0xFF);
746 #else
730 static uint16_t last_data = 0; 747 static uint16_t last_data = 0;
731 if (data == last_data) return; 748 if (data == last_data) return;
732 last_data = data; 749 last_data = data;
@@ -740,12 +757,7 @@ static void send_consumer(uint16_t data)
740 bluefruit_serial_send(0x00); 757 bluefruit_serial_send(0x00);
741 bluefruit_serial_send(0x00); 758 bluefruit_serial_send(0x00);
742 bluefruit_serial_send(0x00); 759 bluefruit_serial_send(0x00);
743 } 760 #endif
744#endif
745
746#ifdef ADAFRUIT_BLE_ENABLE
747 if (where == OUTPUT_ADAFRUIT_BLE) {
748 adafruit_ble_send_consumer_key(data, 0);
749 } 761 }
750#endif 762#endif
751 763
@@ -1101,16 +1113,23 @@ void cc_callback(MidiDevice * device,
1101 uint8_t chan, uint8_t num, uint8_t val); 1113 uint8_t chan, uint8_t num, uint8_t val);
1102void sysex_callback(MidiDevice * device, 1114void sysex_callback(MidiDevice * device,
1103 uint16_t start, uint8_t length, uint8_t * data); 1115 uint16_t start, uint8_t length, uint8_t * data);
1116
1117void setup_midi(void)
1118{
1119#ifdef MIDI_ADVANCED
1120 midi_init();
1121#endif
1122 midi_device_init(&midi_device);
1123 midi_device_set_send_func(&midi_device, usb_send_func);
1124 midi_device_set_pre_input_process_func(&midi_device, usb_get_midi);
1125}
1104#endif 1126#endif
1105 1127
1106int main(void) __attribute__ ((weak)); 1128int main(void) __attribute__ ((weak));
1107int main(void) 1129int main(void)
1108{ 1130{
1109
1110#ifdef MIDI_ENABLE 1131#ifdef MIDI_ENABLE
1111 midi_device_init(&midi_device); 1132 setup_midi();
1112 midi_device_set_send_func(&midi_device, usb_send_func);
1113 midi_device_set_pre_input_process_func(&midi_device, usb_get_midi);
1114#endif 1133#endif
1115 1134
1116 setup_mcu(); 1135 setup_mcu();
@@ -1130,7 +1149,7 @@ int main(void)
1130 // midi_send_noteoff(&midi_device, 0, 64, 127); 1149 // midi_send_noteoff(&midi_device, 0, 64, 127);
1131#endif 1150#endif
1132 1151
1133#ifdef BLUETOOTH_ENABLE 1152#if defined(MODULE_ADAFRUIT_EZKEY) || defined(MODULE_RN42)
1134 serial_init(); 1153 serial_init();
1135#endif 1154#endif
1136 1155
@@ -1161,7 +1180,7 @@ int main(void)
1161 1180
1162 print("Keyboard start.\n"); 1181 print("Keyboard start.\n");
1163 while (1) { 1182 while (1) {
1164 #if !defined(BLUETOOTH_ENABLE) && !defined(ADAFRUIT_BLE_ENABLE) 1183 #if !defined(BLUETOOTH_ENABLE)
1165 while (USB_DeviceState == DEVICE_STATE_Suspended) { 1184 while (USB_DeviceState == DEVICE_STATE_Suspended) {
1166 print("[s]"); 1185 print("[s]");
1167 suspend_power_down(); 1186 suspend_power_down();
@@ -1175,14 +1194,16 @@ int main(void)
1175 1194
1176#ifdef MIDI_ENABLE 1195#ifdef MIDI_ENABLE
1177 midi_device_process(&midi_device); 1196 midi_device_process(&midi_device);
1178 // MIDI_Task(); 1197#ifdef MIDI_ADVANCED
1198 midi_task();
1199#endif
1179#endif 1200#endif
1180 1201
1181#if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE) 1202#if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE)
1182 rgblight_task(); 1203 rgblight_task();
1183#endif 1204#endif
1184 1205
1185#ifdef ADAFRUIT_BLE_ENABLE 1206#ifdef MODULE_ADAFRUIT_BLE
1186 adafruit_ble_task(); 1207 adafruit_ble_task();
1187#endif 1208#endif
1188 1209
diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h
index a049fd43c..a51573786 100644
--- a/tmk_core/protocol/lufa/lufa.h
+++ b/tmk_core/protocol/lufa/lufa.h
@@ -49,7 +49,7 @@
49#include <LUFA/Drivers/USB/USB.h> 49#include <LUFA/Drivers/USB/USB.h>
50#include "host.h" 50#include "host.h"
51#ifdef MIDI_ENABLE 51#ifdef MIDI_ENABLE
52 #include "midi.h" 52 #include "process_midi.h"
53#endif 53#endif
54#ifdef __cplusplus 54#ifdef __cplusplus
55extern "C" { 55extern "C" {
diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c
index 5d2457bff..0df5d3b75 100644
--- a/tmk_core/protocol/lufa/outputselect.c
+++ b/tmk_core/protocol/lufa/outputselect.c
@@ -14,7 +14,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
14 14
15#include "lufa.h" 15#include "lufa.h"
16#include "outputselect.h" 16#include "outputselect.h"
17#ifdef ADAFRUIT_BLE_ENABLE 17#ifdef MODULE_ADAFRUIT_BLE
18 #include "adafruit_ble.h" 18 #include "adafruit_ble.h"
19#endif 19#endif
20 20
@@ -34,9 +34,9 @@ uint8_t auto_detect_output(void) {
34 return OUTPUT_USB; 34 return OUTPUT_USB;
35 } 35 }
36 36
37#ifdef ADAFRUIT_BLE_ENABLE 37#ifdef MODULE_ADAFRUIT_BLE
38 if (adafruit_ble_is_connected()) { 38 if (adafruit_ble_is_connected()) {
39 return OUTPUT_ADAFRUIT_BLE; 39 return OUTPUT_BLUETOOTH;
40 } 40 }
41#endif 41#endif
42 42
diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h
index 79b4dd35d..28cc3298e 100644
--- a/tmk_core/protocol/lufa/outputselect.h
+++ b/tmk_core/protocol/lufa/outputselect.h
@@ -18,7 +18,6 @@ enum outputs {
18 OUTPUT_NONE, 18 OUTPUT_NONE,
19 OUTPUT_USB, 19 OUTPUT_USB,
20 OUTPUT_BLUETOOTH, 20 OUTPUT_BLUETOOTH,
21 OUTPUT_ADAFRUIT_BLE,
22 21
23 // backward compatibility 22 // backward compatibility
24 OUTPUT_USB_AND_BT 23 OUTPUT_USB_AND_BT