aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Dockerfile4
-rw-r--r--book.json23
-rw-r--r--docs/Adding-features-to-QMK.md7
-rw-r--r--docs/BUILD_GUIDE.md (renamed from doc/BUILD_GUIDE.md)0
-rw-r--r--docs/Becoming-a-QMK-Collaborator.md7
-rw-r--r--docs/Build-Environment-Setup.md119
-rw-r--r--[-rwxr-xr-x]docs/CYGWIN_GUIDE.md (renamed from doc/CYGWIN_GUIDE.md)0
-rw-r--r--docs/Compatible-Microcontrollers.md25
-rw-r--r--docs/Custom-Quantum-Functions.md123
-rw-r--r--docs/Differences-from-TMK.md7
-rw-r--r--docs/Eclipse.md84
-rw-r--r--docs/Embedding.md64
-rw-r--r--docs/FAQ-Build.md151
-rw-r--r--docs/FAQ-Keymap.md248
-rw-r--r--docs/FAQ.md238
-rw-r--r--docs/FUSE.txt (renamed from doc/FUSE.txt)0
-rw-r--r--docs/Git-subtree.md7
-rw-r--r--docs/HAND_WIRE.md (renamed from doc/HAND_WIRE.md)0
-rw-r--r--docs/HHKB-Alt-controller.md5
-rw-r--r--docs/Home.md183
-rw-r--r--docs/Key-Functions.md117
-rw-r--r--docs/Keycodes.md228
-rw-r--r--docs/Keymap-examples.md37
-rw-r--r--docs/Keymap.md222
-rw-r--r--docs/Kiibohd.asciidoc29
-rw-r--r--docs/Leader-Key.md37
-rw-r--r--docs/License-Clarification-Details.md1272
-rw-r--r--docs/License-Clarification.md38
-rw-r--r--docs/Macros.md215
-rw-r--r--docs/Make-Instructions.md167
-rw-r--r--docs/Memory-write-error,-use-debug-for-more-info.md21
-rw-r--r--docs/Modding-your-keyboard.md388
-rw-r--r--docs/Mouse-keys.md17
-rw-r--r--docs/Other-Projects.md62
-rw-r--r--docs/PCB_GUIDE.md (renamed from doc/PCB_GUIDE.md)0
-rw-r--r--docs/POWER.txt (renamed from doc/POWER.txt)0
-rw-r--r--docs/Porting-Your-Keyboard-to-QMK-(ARM-and-other-ChibiOS-CPUs).md70
-rw-r--r--docs/Porting-your-keyboard-to-QMK.md59
-rw-r--r--docs/Previously-Asked-Questions.asciidoc14
-rw-r--r--docs/QMK-Overview.md75
-rw-r--r--docs/Report-Descriptor.md1
-rw-r--r--docs/SUMMARY.md26
-rw-r--r--docs/Space-Cadet-Shift.md24
-rw-r--r--docs/TMK-Based-Projects.md34
-rw-r--r--docs/TMK-Own-Projects.md69
-rw-r--r--docs/TMK_README.md (renamed from doc/TMK_README.md)0
-rw-r--r--docs/Tap-Dance.md144
-rw-r--r--docs/Test-for-ASCIIDOC.asciidoc17
-rw-r--r--docs/USB-HID.md11
-rw-r--r--docs/USB_NKRO.txt (renamed from doc/USB_NKRO.txt)0
-rw-r--r--docs/Unicode-and-additional-language-support.md54
-rw-r--r--docs/Unit-testing.md68
-rw-r--r--docs/VAGRANT_GUIDE.md (renamed from doc/VAGRANT_GUIDE.md)0
-rw-r--r--docs/_Sidebar.md21
-rw-r--r--docs/basic_how_keyboards_work.md (renamed from doc/basic_how_keyboards_work.md)0
-rw-r--r--docs/build_old.md (renamed from doc/build_old.md)0
-rw-r--r--docs/gitbook/images/favicon.icobin0 -> 117248 bytes
-rw-r--r--docs/gitbook/images/favicon.pngbin0 -> 242 bytes
-rw-r--r--docs/keycode.txt (renamed from doc/keycode.txt)48
-rw-r--r--docs/keymap_config_h_example.h (renamed from doc/keymap_config_h_example.h)0
-rw-r--r--docs/keymap_makefile_example.mk (renamed from doc/keymap_makefile_example.mk)0
-rw-r--r--docs/keymap_old.md (renamed from doc/keymap.md)0
-rw-r--r--docs/mbed-cortex-porting.md36
-rw-r--r--docs/other_projects.md (renamed from doc/other_projects.md)0
-rw-r--r--keyboards/atomic/keymaps/pvc/keymap.c4
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.pngbin75363 -> 0 bytes
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.pngbin92445 -> 0 bytes
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.pngbin91749 -> 0 bytes
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.pngbin72856 -> 0 bytes
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.pngbin74690 -> 0 bytes
-rw-r--r--keyboards/atreus/keymaps/replicaJunction/readme.md10
-rw-r--r--keyboards/atreus/keymaps/xyverz/keymap.c10
-rw-r--r--keyboards/atreus62/keymaps/mneme/README.md6
-rw-r--r--keyboards/atreus62/keymaps/mneme/img/base.pngbin457157 -> 0 bytes
-rw-r--r--keyboards/atreus62/keymaps/mneme/img/fun.pngbin425368 -> 0 bytes
-rw-r--r--keyboards/atreus62/keymaps/mneme/img/sym.pngbin433218 -> 0 bytes
-rw-r--r--keyboards/atreus62/keymaps/xyverz/keymap.c10
-rw-r--r--keyboards/clueboard/keymaps/caps_fn/layout.pngbin112289 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/caps_fn/readme.md11
-rw-r--r--keyboards/clueboard/keymaps/default/layout.pngbin112442 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/default/readme.md11
-rw-r--r--keyboards/clueboard/keymaps/jokrik/keymap.c86
-rw-r--r--keyboards/clueboard/keymaps/jokrik/readme.md2
-rw-r--r--keyboards/clueboard/keymaps/mac_optimized/keymap.c21
-rw-r--r--keyboards/clueboard/keymaps/mac_optimized/layout.pngbin107368 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/mac_optimized/readme.md11
-rw-r--r--keyboards/clueboard/keymaps/magicmonty/Makefile2
-rw-r--r--keyboards/clueboard/keymaps/magicmonty/keymap.c157
-rw-r--r--keyboards/clueboard/keymaps/magicmonty/readme.md23
-rw-r--r--keyboards/clueboard/keymaps/maximised/layout.pngbin111157 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/maximised/readme.md11
-rw-r--r--keyboards/clueboard/keymaps/mouse_keys/layout.pngbin143816 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/mouse_keys/readme.md9
-rw-r--r--keyboards/clueboard/keymaps/serubin/layout-base.pngbin38703 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/serubin/layout-fn.pngbin35216 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/serubin/layout-media.pngbin28944 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/serubin/readme.md15
-rw-r--r--keyboards/clueboard/keymaps/shift_fn/keymap.c2
-rw-r--r--keyboards/clueboard/keymaps/shift_fn/layout.pngbin107234 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/shift_fn/readme.md11
-rw-r--r--keyboards/clueboard/keymaps/skully/keymap.c2
-rw-r--r--keyboards/clueboard/keymaps/skully/layout.pngbin111676 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/skully/readme.md17
-rw-r--r--keyboards/clueboard/keymaps/smt/keymap.c8
-rw-r--r--keyboards/clueboard/keymaps/smt/layout.pngbin130672 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/smt/readme.md11
-rw-r--r--keyboards/clueboard/keymaps/unix_optimized/layout.pngbin111171 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/unix_optimized/readme.md11
-rw-r--r--keyboards/clueboard/keymaps/win_optimized/layout.pngbin110405 -> 0 bytes
-rw-r--r--keyboards/clueboard/keymaps/win_optimized/readme.md11
-rw-r--r--keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c10
-rw-r--r--keyboards/dk60/Makefile (renamed from keyboards/M10A/Makefile)0
-rw-r--r--keyboards/dk60/config.h55
-rw-r--r--keyboards/dk60/dk60.c34
-rw-r--r--keyboards/dk60/dk60.h41
-rw-r--r--keyboards/dk60/keymaps/default/keymap.c80
-rw-r--r--keyboards/dk60/readme.md8
-rw-r--r--keyboards/dk60/rules.mk21
-rw-r--r--keyboards/ergodox/config.h4
-rw-r--r--keyboards/ergodox/ez/config.h2
-rw-r--r--keyboards/ergodox/keymaps/333fred/Makefile12
-rw-r--r--keyboards/ergodox/keymaps/333fred/README.md122
-rw-r--r--keyboards/ergodox/keymaps/333fred/keymap.c361
-rw-r--r--keyboards/ergodox/keymaps/333fred/visualizer.c33
-rw-r--r--keyboards/ergodox/keymaps/adam/config.h6
-rw-r--r--keyboards/ergodox/keymaps/adam/keymap.c174
-rw-r--r--keyboards/ergodox/keymaps/adam/readme.md3
-rw-r--r--keyboards/ergodox/keymaps/dvorak_programmer_swe/keymap.c331
-rw-r--r--keyboards/ergodox/keymaps/dvorak_programmer_swe/readme.md28
-rw-r--r--keyboards/ergodox/keymaps/xyverz/keymap.c8
-rw-r--r--keyboards/ergodox/readme.md1
-rw-r--r--keyboards/frosty_flake/keymaps/nikchi/Makefile23
-rw-r--r--keyboards/frosty_flake/keymaps/nikchi/config.h23
-rw-r--r--keyboards/frosty_flake/keymaps/nikchi/keymap.c241
-rw-r--r--keyboards/frosty_flake/keymaps/nikchi/readme.md24
-rw-r--r--keyboards/frosty_flake/keymaps/nikchi/variableTapDance.md9
-rw-r--r--keyboards/frosty_flake/rules.mk4
-rw-r--r--keyboards/gh60/keymaps/xyverz/keymap.c8
-rw-r--r--keyboards/gherkin/Makefile3
-rw-r--r--keyboards/gherkin/README.md12
-rw-r--r--keyboards/gherkin/config.h58
-rw-r--r--keyboards/gherkin/gherkin.c1
-rw-r--r--keyboards/gherkin/gherkin.h18
-rw-r--r--keyboards/gherkin/keymaps/default/keymap.c171
-rw-r--r--keyboards/gherkin/rules.mk56
-rw-r--r--keyboards/handwired/atreus50/keymaps/default/keymap.c8
-rw-r--r--keyboards/handwired/magicforce68/README.md2
-rw-r--r--keyboards/handwired/magicforce68/wiring-layout.pngbin73739 -> 0 bytes
-rw-r--r--keyboards/handwired/ortho5x13/keymaps/default/keymap.c8
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/keymap.c12
-rw-r--r--keyboards/handwired/trackpoint/Makefile3
-rw-r--r--keyboards/handwired/trackpoint/README.md10
-rw-r--r--keyboards/handwired/trackpoint/config.h75
-rw-r--r--keyboards/handwired/trackpoint/keymaps/default/keymap.c7
-rw-r--r--keyboards/handwired/trackpoint/rules.mk25
-rw-r--r--keyboards/handwired/trackpoint/trackpoint.c5
-rw-r--r--keyboards/handwired/trackpoint/trackpoint.h13
-rw-r--r--keyboards/hhkb/keymaps/smt/keymap.c8
-rw-r--r--keyboards/jd45/keymaps/jeebak/keymap.c2
-rw-r--r--keyboards/jd45/keymaps/jeebak/readme.md2
-rw-r--r--keyboards/kc60/keymaps/stanleylai/base_layer.pngbin35164 -> 0 bytes
-rw-r--r--keyboards/kc60/keymaps/stanleylai/rgb_layer.pngbin19192 -> 0 bytes
-rw-r--r--keyboards/kc60/keymaps/workman-dead/kc60-wm-dead.pngbin117155 -> 0 bytes
-rw-r--r--keyboards/kc60/keymaps/workman-dead/readme.md2
-rw-r--r--keyboards/kinesis/keymaps/xyverz/keymap.c8
-rw-r--r--keyboards/kmac/Makefile18
-rw-r--r--keyboards/kmac/config.h178
-rw-r--r--keyboards/kmac/keymaps/default/Makefile37
-rw-r--r--keyboards/kmac/keymaps/default/config.h24
-rw-r--r--keyboards/kmac/keymaps/default/keymap.c97
-rw-r--r--keyboards/kmac/keymaps/default/readme.md56
-rw-r--r--keyboards/kmac/keymaps/winkeyless/Makefile37
-rw-r--r--keyboards/kmac/keymaps/winkeyless/config.h24
-rw-r--r--keyboards/kmac/keymaps/winkeyless/keymap.c97
-rw-r--r--keyboards/kmac/keymaps/winkeyless/readme.md57
-rw-r--r--keyboards/kmac/kmac.c109
-rw-r--r--keyboards/kmac/kmac.h56
-rw-r--r--keyboards/kmac/matrix.c311
-rw-r--r--keyboards/kmac/readme.md45
-rw-r--r--keyboards/kmac/rules.mk72
-rw-r--r--keyboards/lets_split/keymaps/OLED_sample/keymap.c8
-rw-r--r--keyboards/lets_split/keymaps/adam/config.h43
-rw-r--r--keyboards/lets_split/keymaps/adam/keymap.c79
-rw-r--r--keyboards/lets_split/keymaps/adam/makefile1
-rw-r--r--keyboards/lets_split/keymaps/hexwire/keymap.c10
-rw-r--r--keyboards/lets_split/keymaps/i2c/keymap.c8
-rw-r--r--keyboards/lets_split/keymaps/serial/keymap.c8
-rw-r--r--keyboards/lets_split/keymaps/smt/keymap.c8
-rw-r--r--keyboards/lets_split/keymaps/xyverz/keymap.c8
-rw-r--r--keyboards/lets_split/rules.mk2
-rw-r--r--keyboards/m10a/Makefile3
-rw-r--r--keyboards/m10a/config.h (renamed from keyboards/M10A/config.h)0
-rw-r--r--keyboards/m10a/keymaps/default/Makefile (renamed from keyboards/M10A/keymaps/default/Makefile)0
-rw-r--r--keyboards/m10a/keymaps/default/keymap.c (renamed from keyboards/M10A/keymaps/default/keymap.c)2
-rw-r--r--keyboards/m10a/m10a.c (renamed from keyboards/M10A/M10A.c)2
-rw-r--r--keyboards/m10a/m10a.h (renamed from keyboards/M10A/M10A.h)0
-rw-r--r--keyboards/m10a/rules.mk (renamed from keyboards/M10A/rules.mk)0
-rw-r--r--keyboards/mechmini/Makefile3
-rw-r--r--keyboards/mechmini/README.md56
-rw-r--r--keyboards/mechmini/config.h38
-rw-r--r--keyboards/mechmini/keymaps/default/keymap.c28
-rw-r--r--keyboards/mechmini/matrix.c104
-rw-r--r--keyboards/mechmini/mechmini.c0
-rw-r--r--keyboards/mechmini/mechmini.h41
-rw-r--r--keyboards/mechmini/program74
-rw-r--r--keyboards/mechmini/rules.mk43
-rw-r--r--keyboards/mechmini/usbconfig.h396
-rw-r--r--keyboards/nyquist/Makefile5
-rw-r--r--keyboards/nyquist/config.h27
-rw-r--r--keyboards/nyquist/i2c.c162
-rw-r--r--keyboards/nyquist/i2c.h49
-rw-r--r--keyboards/nyquist/keymaps/hexwire/Makefile5
-rw-r--r--keyboards/nyquist/keymaps/hexwire/README.md116
-rw-r--r--keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md20
-rw-r--r--keyboards/nyquist/keymaps/hexwire/config.h31
-rw-r--r--keyboards/nyquist/keymaps/hexwire/keymap.c218
-rwxr-xr-xkeyboards/nyquist/keymaps/hexwire/keymap_converter.py39
-rwxr-xr-xkeyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb40
-rw-r--r--keyboards/nyquist/keymaps/i2c/config.h26
-rw-r--r--keyboards/nyquist/keymaps/i2c/keymap.c231
-rw-r--r--keyboards/nyquist/keymaps/serial/config.h26
-rw-r--r--keyboards/nyquist/keymaps/serial/keymap.c232
-rw-r--r--keyboards/nyquist/matrix.c316
-rw-r--r--keyboards/nyquist/nyquist.c1
-rw-r--r--keyboards/nyquist/nyquist.h26
-rw-r--r--keyboards/nyquist/pro_micro.h362
-rw-r--r--keyboards/nyquist/readme.md167
-rw-r--r--keyboards/nyquist/rev1/Makefile3
-rw-r--r--keyboards/nyquist/rev1/config.h89
-rw-r--r--keyboards/nyquist/rev1/rev1.c39
-rw-r--r--keyboards/nyquist/rev1/rev1.h66
-rw-r--r--keyboards/nyquist/rev1/rules.mk5
-rw-r--r--keyboards/nyquist/rules.mk87
-rw-r--r--keyboards/nyquist/serial.c228
-rw-r--r--keyboards/nyquist/serial.h26
-rw-r--r--keyboards/nyquist/split_util.c84
-rw-r--r--keyboards/nyquist/split_util.h24
-rw-r--r--keyboards/phantom/keymaps/xyverz/keymap.c8
-rw-r--r--keyboards/planck/keymaps/ab/keyboard-layout.json32
-rw-r--r--keyboards/planck/keymaps/ab/keyboard-layout.pngbin26518 -> 27168 bytes
-rw-r--r--keyboards/planck/keymaps/ab/keymap.c14
-rw-r--r--keyboards/planck/keymaps/ab/readme.md2
-rw-r--r--keyboards/planck/keymaps/dbroqua/keymap.c4
-rw-r--r--keyboards/planck/keymaps/default/keymap.c8
-rw-r--r--keyboards/planck/keymaps/dshields/Makefile1
-rw-r--r--keyboards/planck/keymaps/dshields/config.h35
-rw-r--r--keyboards/planck/keymaps/dshields/keymap.c55
-rw-r--r--keyboards/planck/keymaps/espynn/keymap.c4
-rw-r--r--keyboards/planck/keymaps/experimental/keymap.c8
-rw-r--r--keyboards/planck/keymaps/impossible/keymap.c8
-rw-r--r--keyboards/planck/keymaps/jeebak/keymap.c2
-rw-r--r--keyboards/planck/keymaps/jeebak/readme.md2
-rw-r--r--keyboards/planck/keymaps/jhenahan/keymap.c6
-rw-r--r--keyboards/planck/keymaps/johannes/Makefile25
-rw-r--r--keyboards/planck/keymaps/johannes/keymap.c99
-rw-r--r--keyboards/planck/keymaps/johannes/planck-layout.pngbin0 -> 19661 bytes
-rw-r--r--keyboards/planck/keymaps/johannes/readme.md6
-rw-r--r--keyboards/planck/keymaps/khord/keymap.c8
-rw-r--r--keyboards/planck/keymaps/originerd/Makefile3
-rw-r--r--keyboards/planck/keymaps/originerd/keymap.c195
-rw-r--r--keyboards/planck/keymaps/originerd/readme.md58
-rw-r--r--keyboards/planck/keymaps/pete/keymap.c8
-rw-r--r--keyboards/planck/keymaps/premek/keymap.c8
-rw-r--r--keyboards/planck/keymaps/pvc/keymap.c4
-rw-r--r--keyboards/planck/keymaps/sgoodwin/keymap.c6
-rw-r--r--keyboards/planck/keymaps/smt/keymap.c8
-rw-r--r--keyboards/planck/keymaps/thermal_printer/keymap.c8
-rw-r--r--keyboards/planck/keymaps/unicode/keymap.c8
-rw-r--r--keyboards/planck/keymaps/xyverz/keymap.c8
-rw-r--r--keyboards/planck/keymaps/zach/zach_common_functions.c6
-rw-r--r--keyboards/preonic/keymaps/0xdec/keymap.c6
-rw-r--r--keyboards/preonic/keymaps/CMD-Preonic/keymap.c14
-rw-r--r--keyboards/preonic/keymaps/default/keymap.c8
-rw-r--r--keyboards/preonic/keymaps/jacwib/keymap.c6
-rw-r--r--keyboards/preonic/keymaps/kinesis/keymap.c2
-rw-r--r--keyboards/preonic/keymaps/nikchi/Makefile3
-rw-r--r--keyboards/preonic/keymaps/nikchi/config.h29
-rw-r--r--keyboards/preonic/keymaps/nikchi/keymap.c221
-rw-r--r--keyboards/preonic/keymaps/nikchi/readme.md1
-rw-r--r--keyboards/preonic/keymaps/smt/keymap.c8
-rw-r--r--keyboards/preonic/keymaps/xyverz/keymap.c8
-rw-r--r--keyboards/preonic/keymaps/zach/zach_common_functions.c6
-rw-r--r--keyboards/readme.md1
-rw-r--r--keyboards/roadkit/keymaps/default/keymap.c4
-rw-r--r--keyboards/roadkit/keymaps/singles/keymap.c6
-rw-r--r--keyboards/satan/keymaps/colemak/Makefile21
-rw-r--r--keyboards/satan/keymaps/colemak/keymap.c98
-rw-r--r--keyboards/satan/keymaps/colemak/readme.md1
-rw-r--r--keyboards/satan/keymaps/smt/keymap.c8
-rw-r--r--keyboards/subatomic/keymaps/default/keymap.c8
-rw-r--r--keyboards/tv44/keymaps/default/keymap.c8
-rw-r--r--keyboards/tv44/keymaps/jeebak/keymap.c2
-rw-r--r--keyboards/tv44/keymaps/jeebak/readme.md2
-rw-r--r--keyboards/tv44/keymaps/smt/keymap.c8
-rw-r--r--keyboards/tv44/keymaps/xyverz/keymap.c8
-rw-r--r--keyboards/vision_division/keymaps/default/keymap.c4
-rw-r--r--quantum/dynamic_macro.h4
-rw-r--r--quantum/process_keycode/process_tap_dance.c14
-rw-r--r--quantum/process_keycode/process_tap_dance.h7
-rw-r--r--quantum/process_keycode/process_unicodemap.c2
-rw-r--r--readme.md32
-rw-r--r--secrets.tar.encbin0 -> 10256 bytes
-rw-r--r--tmk_core/common.mk20
-rw-r--r--tmk_core/common/action.c32
-rw-r--r--tmk_core/common/action_tapping.c2
-rw-r--r--tmk_core/common/keyboard.c58
-rw-r--r--tmk_core/common/keyboard.h1
-rw-r--r--tmk_core/protocol/lufa/adafruit_ble.cpp20
-rw-r--r--tmk_core/protocol/lufa/adafruit_ble.h2
-rw-r--r--tmk_core/protocol/lufa/lufa.c4
-rw-r--r--tmk_core/protocol/ps2_mouse.c29
-rw-r--r--util/activate_wsl.sh17
-rw-r--r--util/drivers.txt46
-rw-r--r--util/ergodox_ez.html1
-rw-r--r--util/travis_build.sh2
-rw-r--r--util/travis_compiled_push.sh36
-rw-r--r--util/wsl_install.sh159
318 files changed, 13638 insertions, 485 deletions
diff --git a/.gitignore b/.gitignore
index 6029afce4..0b48b80e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,7 @@ quantum/version.h
22.idea/ 22.idea/
23CMakeLists.txt 23CMakeLists.txt
24.DS_STORE 24.DS_STORE
25/util/wsl_downloaded
25 26
26# Eclipse/PyCharm/Other IDE Settings 27# Eclipse/PyCharm/Other IDE Settings
27.cproject 28.cproject
diff --git a/Dockerfile b/Dockerfile
index 88da06f02..bc0285a44 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,6 +15,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y build-essential
15 binutils-arm-none-eabi \ 15 binutils-arm-none-eabi \
16 libnewlib-arm-none-eabi \ 16 libnewlib-arm-none-eabi \
17 git \ 17 git \
18 software-properties-common \
19 avrdude \
18 && rm -rf /var/lib/apt/lists/* 20 && rm -rf /var/lib/apt/lists/*
19 21
20ENV keyboard=ergodox 22ENV keyboard=ergodox
@@ -23,4 +25,4 @@ ENV keymap=default
23 25
24VOLUME /qmk 26VOLUME /qmk
25WORKDIR /qmk 27WORKDIR /qmk
26CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap} 28CMD make clean; make;
diff --git a/book.json b/book.json
new file mode 100644
index 000000000..64a997d1f
--- /dev/null
+++ b/book.json
@@ -0,0 +1,23 @@
1{
2 "structure": {
3 "readme": "Home.md"
4 },
5 "plugins" : ["toolbar", "edit-link", "anchors"],
6 "pluginsConfig": {
7 "edit-link": {
8 "base": "https://github.com/qmk/qmk_firmware/edit/master/docs",
9 "label": "Suggest an edit"
10 },
11 "toolbar": {
12 "buttons":
13 [
14 {
15 "label": "QMK Firmware",
16 "icon": "fa fa-github",
17 "url": "https://github.com/qmk/qmk_firmware"
18 }
19 ]
20 }
21 },
22 "root": "./docs/"
23}
diff --git a/docs/Adding-features-to-QMK.md b/docs/Adding-features-to-QMK.md
new file mode 100644
index 000000000..f6f7cba20
--- /dev/null
+++ b/docs/Adding-features-to-QMK.md
@@ -0,0 +1,7 @@
1If you have an idea for a custom feature or extra hardware connection, we'd love to accept it into QMK! These are generally done via [pull request](https://github.com/qmk/qmk_firmware/pulls) after forking, and here are some things to keep in mind when creating one:
2
3* **Disable by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, [open an issue](https://github.com/qmk/qmk_firmware/issues) for everyone to discuss it!
4* **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! Our Travis system will catch any issues, but it's generally faster for you to compile a few keyboards locally instead of waiting for the results to come back.
5* **Consider subprojects and different chip-bases** - there are several keyboards that have subprojects that have allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled in one that doesn't work.
6* **Explain your feature** - submitting a markdown write-up of what your feature does with your PR may be needed, and it will allow a collaborator to easily copy it into the wiki for documentation (after proofing and editing).
7* **Don't refactor code** - to maintain a clear vision of how things are laid out in QMK, we try to plan out refactors in-depth, and have a collaborator make the changes. If you have an idea for refactoring, or suggestions, [open an issue](https://github.com/qmk/qmk_firmware/issues). \ No newline at end of file
diff --git a/doc/BUILD_GUIDE.md b/docs/BUILD_GUIDE.md
index 78cf00b91..78cf00b91 100644
--- a/doc/BUILD_GUIDE.md
+++ b/docs/BUILD_GUIDE.md
diff --git a/docs/Becoming-a-QMK-Collaborator.md b/docs/Becoming-a-QMK-Collaborator.md
new file mode 100644
index 000000000..1427675fd
--- /dev/null
+++ b/docs/Becoming-a-QMK-Collaborator.md
@@ -0,0 +1,7 @@
1A QMK collaborator is a keyboard maker/designer that is interested in helping QMK grow and fully support their keyboard(s), and encouraging their users/customers to submit features, ideas, and keymaps. We're always looking to add more keyboards and collaborators, but we ask that they fulfill these requirements:
2
3* **Have a PCB available for sale** - unfortunately there's just too much variation and complications with handwired keyboards.
4* **Maintain the your keyboard's directory** - this may just require an initial setup to get your keyboard working, but it could also include accommodating changes made to QMK's core.
5* **Approve and merge your keyboard's keymap pull requests** - we like to encourage users to contribute their keymaps for others to see and work from when creating their own.
6
7If you feel you meet these requirements, shoot us an email at hello@qmk.fm with an introduction and some links to your keyboard! \ No newline at end of file
diff --git a/docs/Build-Environment-Setup.md b/docs/Build-Environment-Setup.md
new file mode 100644
index 000000000..d4cec91c7
--- /dev/null
+++ b/docs/Build-Environment-Setup.md
@@ -0,0 +1,119 @@
1### Windows 10
2
3#### Creators Update
4If you have Windows 10 with Creators Update or later, you can build and flash the firmware directly. Before the Creators Update, only building was possible. If you don't have it yet or if are unsure, follow [these instructions](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update).
5
6#### Windows Subsystem for Linux
7In addition to the Creators Update, you need Windows 10 Subystem for Linux, so install it following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). If you already have the Windows 10 Subsystem for Linux from the Anniversary update it's recommended that you [upgrade](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) it to 16.04LTS, because some keyboards don't compile with the toolchains included in 14.04LTS. Note that you need to know what your are doing if you chose the `sudo do-release-upgrade` method.
8
9#### Git
10If you already have cloned the repository on your Windows file system you can ignore this section.
11
12You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute.
13
14Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one.
15
16#### Toolchain setup
17The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information.
18
191. Open "Bash On Ubuntu On Windows" from the start menu.
202. Go to the directory where you cloned `qmk_firmware`. Note that the paths start with `/mnt/` in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`.
213. Run `util/wsl_install.sh` and follow the on-screen instructions.
224. Close the Bash command window, and re-open it.
235. You are ready to compile and flash the firmware!
24
25#### Some important things to keep in mind
26* You can run `util/wsl_install.sh` again to get all the newest updates.
27* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it.
28* The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations
29* You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work.
30
31### Windows (Vista and later)
321. If you have ever installed WinAVR, uninstall it.
332. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
343. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware).
354. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
365. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
376. Open the `\util` folder.
387. Double-click on the `1-setup-path-win` batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
398. Right-click on the `2-setup-environment-win` batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
40
41If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder.
42
43### Mac
44If you're using [homebrew,](http://brew.sh/) you can use the following commands:
45
46 brew tap osx-cross/avr
47 brew install avr-libc
48 brew install dfu-programmer
49
50This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage.
51
52You can also try these instructions:
53
541. Install Xcode from the App Store.
552. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
563. Install [DFU-Programmer](https://dfu-programmer.github.io/).
57
58If you are going to flash Infinity based keyboards you will also need dfu-util
59
60 brew install dfu-util
61
62### Linux
63
64To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.**
65
66You can also install things manually, but this documentation might not be always up to date with all requirements.
67
68The current requirements are the following, but not all might be needed depending on what you do. Also note that some systems might not have all the dependencies available as packages, or they might be named differently.
69
70```
71build-essential
72gcc
73unzip
74wget
75zip
76gcc-avr
77binutils-avr
78avr-libc
79dfu-programmer
80dfu-util
81gcc-arm-none-eabi
82binutils-arm-none-eabi
83libnewlib-arm-none-eabi
84git
85```
86
87Install the dependencies with your favorite package manager.
88
89Debian/Ubuntu example:
90
91 sudo apt-get update
92 sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
93
94### Docker
95
96If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap:
97
98```bash
99# You'll run this every time you want to build a keymap
100# modify the keymap and keyboard assigment to compile what you want
101# defaults are ergodox/default
102
103docker run -e keymap=gwen -e subproject=ez -e keyboard=ergodox --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
104
105# On windows docker seems to have issue with VOLUME tag in Dockerfile, and $('pwd') won't print a windows compliant path, use full path instead like this
106docker run -e keymap=default -e subproject=ez -e keyboard=ergobox --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
107
108```
109
110This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash.
111
112### Vagrant
113If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](https://github.com/qmk/qmk_firmware/blob/master/doc/VAGRANT_GUIDE.md).
114
115## Verify Your Installation
1161. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application.
1172. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead.
1183. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`.
1194. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below.
diff --git a/doc/CYGWIN_GUIDE.md b/docs/CYGWIN_GUIDE.md
index 05d71961a..05d71961a 100755..100644
--- a/doc/CYGWIN_GUIDE.md
+++ b/docs/CYGWIN_GUIDE.md
diff --git a/docs/Compatible-Microcontrollers.md b/docs/Compatible-Microcontrollers.md
new file mode 100644
index 000000000..20ba620f6
--- /dev/null
+++ b/docs/Compatible-Microcontrollers.md
@@ -0,0 +1,25 @@
1# Atmel AVR
2
3QMK should run on any Atmel AVR processor with enough Flash. It has been tested on the following:
4
5* ATmega32U4 ([PJRC Teensy 2.0](http://www.pjrc.com/teensy/))
6* AT90USB1286 ([PJRC Teensy++ 2.0](http://www.pjrc.com/teensy/))
7* AT90USB1287 ([Atmel USBKEY](http://www.atmel.com/tools/AT90USBKEY.aspx))
8* ATmega168P with using [V-USB](http://www.obdev.at/products/vusb/index.html)
9* ATmega328P with using [V-USB](http://www.obdev.at/products/vusb/index.html)
10* ATmega32U2
11* AT90USB1286, 646, 647 should work
12* AT90USB162 testing...
13
14NOTE: To enable full features of firmware you'll need 32KB flash size.
15
16Please add any tested microcontrollers to this list.
17
18# ARM
19
20You can also use any ARM processor that [ChibiOS](http://www.chibios.org) supports. The following processors have been tested:
21
22* [Kinetis MKL26Z64](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/l-series-ultra-low-power-m0-plus/kinetis-kl2x-48-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x)
23* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf)
24* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf)
25* [Kinetis MK20DX256](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/k-series-performance-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72) \ No newline at end of file
diff --git a/docs/Custom-Quantum-Functions.md b/docs/Custom-Quantum-Functions.md
new file mode 100644
index 000000000..1c4929e5a
--- /dev/null
+++ b/docs/Custom-Quantum-Functions.md
@@ -0,0 +1,123 @@
1A custom keyboard is about more than sending button presses to your computer. QMK has designed hooks to allow you to inject code, override functionality, and otherwise customize how your keyboard responds in different situations.
2
3## A Word on Keyboards vs Keymap
4
5We have structured QMK as a hierarchy:
6
7* Core
8 * Keyboard/Revision (`_kb`)
9 * Keymap (`_user`)
10
11Each of the functions described below can be defined with a `_kb()` suffix or an `_user()` suffix. We intend for you to use the `_kb()` suffix at the Keyboard/Revision level, while the `_user()` suffix should be used at the Keymap level.
12
13When defining functions at the Keyboard/Revision level it is important that your `_kb()` implementation call `_user()` before executing anything else- otherwise the keymap level function will never be called.
14
15## Matrix Initialization Code
16
17* Keyboard/Revision: `void matrix_init_kb(void)`
18* Keymap: `void matrix_init_user(void)`
19
20This function gets called when the matrix is initiated. You should use this function to initialize any custom hardware you may have, such as speakers, LED drivers, or other features which need to be setup after the keyboard powers on.
21
22### Example
23
24```
25void matrix_init_kb(void) {
26 // put your keyboard start-up code here
27 // runs once when the firmware starts up
28 matrix_init_user();
29
30 // JTAG disable for PORT F. write JTD bit twice within four cycles.
31 MCUCR |= (1<<JTD);
32 MCUCR |= (1<<JTD);
33
34 // * Set our LED pins as output
35 DDRB |= (1<<0);
36 DDRB |= (1<<1);
37 DDRB |= (1<<2);
38 DDRB |= (1<<3);
39 DDRB |= (1<<4);
40}
41```
42
43## Matrix Scanning Code
44
45* Keyboard/Revision: `void matrix_scan_kb(void)`
46* Keymap: `void matrix_scan_user(void)`
47
48This function gets called at every matrix scan, which is basically as often as the MCU can handle. Be careful what you put here, as it will get run a lot.
49
50You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LED's or a display) or other functionality that you want to trigger regularly even when the user isn't typing.
51
52## Hook Into Key Presses
53
54* Keyboard/Revision: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)`
55* Keymap: `bool process_record_user(uint16_t keycode, keyrecord_t *record)`
56
57This function gets called every time a key is pressed or released. This is particularly useful when defining custom keys or overriding the behavior of existing keys.
58
59The return value is whether or not QMK should continue processing the keycode - returning `false` stops the execution.
60
61The `keycode` variable is whatever is defined in your keymap, eg `MO(1)`, `KC_L`, etc. and can be switch-cased to execute code whenever a particular code is pressed.
62
63The `record` variable contains infomation about the actual press:
64
65```
66keyrecord_t record {
67 keyevent_t event {
68 keypos_t key {
69 uint8_t col
70 uint8_t row
71 }
72 bool pressed
73 uint16_t time
74 }
75}
76```
77
78The conditional `if (record->event.pressed)` can tell if the key is being pressed or released, and you can execute code based on that.
79
80## LED Control
81
82* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)`
83* Keymap: `void led_set_user(uint8_t usb_led)`
84
85This allows you to control the 5 LED's defined as part of the USB Keyboard spec. It will be called when the state of one of those 5 LEDs changes.
86
87* `USB_LED_NUM_LOCK`
88* `USB_LED_CAPS_LOCK`
89* `USB_LED_SCROLL_LOCK`
90* `USB_LED_COMPOSE`
91* `USB_LED_KANA`
92
93### Example:
94
95```
96void led_set_kb(uint8_t usb_led) {
97 if (usb_led & (1<<USB_LED_NUM_LOCK)) {
98 PORTB |= (1<<0);
99 } else {
100 PORTB &= ~(1<<0);
101 }
102 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
103 PORTB |= (1<<1);
104 } else {
105 PORTB &= ~(1<<1);
106 }
107 if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
108 PORTB |= (1<<2);
109 } else {
110 PORTB &= ~(1<<2);
111 }
112 if (usb_led & (1<<USB_LED_COMPOSE_LOCK)) {
113 PORTB |= (1<<3);
114 } else {
115 PORTB &= ~(1<<3);
116 }
117 if (usb_led & (1<<USB_LED_KANA_LOCK)) {
118 PORTB |= (1<<4);
119 } else {
120 PORTB &= ~(1<<4);
121 }
122}
123``` \ No newline at end of file
diff --git a/docs/Differences-from-TMK.md b/docs/Differences-from-TMK.md
new file mode 100644
index 000000000..10ca329dc
--- /dev/null
+++ b/docs/Differences-from-TMK.md
@@ -0,0 +1,7 @@
1Understanding the essential changes made on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) should help you understand the QMK Firmware.
2
3| Firmware |TMK |QMK |
4|------------------------------|-----------------------|-------------------------|
5| Maintainer |hasu (@tmk) |Jack Humbert et al. |
6| Build path customization | `TMK_DIR = ...` | `include .../Makefile` |
7| `keymaps` array data | 3D array of `uint8_t` holding **keycode** | 3D array of `uint16_t` holding **keycode** |
diff --git a/docs/Eclipse.md b/docs/Eclipse.md
new file mode 100644
index 000000000..b9aa67637
--- /dev/null
+++ b/docs/Eclipse.md
@@ -0,0 +1,84 @@
1[Eclipse](https://en.wikipedia.org/wiki/Eclipse_(software)) is an open-source [Integrated Development Environment](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) widely used for Java development, but with an extensible plugin system that allows to customize it for other languages and usages.
2
3Using an IDE such as Eclipse provides many advantages over a plain text editor, such as:
4* intelligent code completion
5* convenient navigation in the code
6* refactoring tools
7* build automation (no need for the command-line)
8* a GUI for GIT
9* static code analysis
10* many other tools such as debugging, code formatting, showing call hierarchies etc.
11
12The purpose of the is page is to document how to set-up Eclipse for developing AVR software, and working on the QMK code base.
13
14Note that this set-up has been tested on Ubuntu 16.04 only for the moment.
15
16# Prerequisites
17## Build environment
18Before starting, you must have followed the [Getting Started](/Home.md#getting-started) section corresponding to your system. In particular, you must have been able to build the firmware with [the `make` command](../#the-make-command).
19
20## Java
21Eclipse is a Java application, so you will need to install Java 8 or more recent to be able to run it. You may choose between the JRE or the JDK, the latter being useful if you intend to do Java development.
22
23# Install Eclipse and its plugins
24Eclipse comes in [several flavours](http://www.eclipse.org/downloads/eclipse-packages/) depending on the target usage that you will have. There is no package comprising the AVR stack, so we will need to start from Eclipse CDT (C/C++ Development Tooling) and install the necessary plugins.
25
26## Download and install Eclipse CDT
27If you already have Eclipse CDT on your system, you can skip this step. However it is advised to keep it up-to-date for better support.
28
29If you have another Eclipse package installed, it is normally possible to [install the CDT plugin over it](https://eclipse.org/cdt/downloads.php). However it is probably better to reinstall it from scratch to keep it light and avoid the clutter of tools that you don't need for the projects you will be working on.
30
31Installation is very simple: follow the [5 Steps to Install Eclipse](https://eclipse.org/downloads/eclipse-packages/?show_instructions=TRUE), and choose **Eclipse IDE for C/C++ Developers** at Step 3.
32
33Alternatively, you can also directly [download Eclipse IDE for C/C++ Developers](http://www.eclipse.org/downloads/eclipse-packages/) ([direct link to current version](http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/neonr)) and extract the package to the location of your choice (this creates an `eclipse` folder).
34
35## First Launch
36When installation is complete, click the <kbd>Launch</kbd> button. (If you extracted the package manually, open the Eclipse installation folder and double-click the `eclipse` executable)
37
38When you are prompted with the Workspace Selector, select a directory that will hold Eclipse metadata and usually your projects. **Do not select the `qmk_firmware` directory**, this will be the project directory. Select the parent folder instead, or another (preferably empty) folder of your choice (the default is fine if you do not use it yet).
39
40Once started, click the <kbd>Workbench</kbd> button at the top right to switch to the workbench view (there is a also checkbox at the bottom to skip the welcome screen at startup).
41
42## Install the necessary plugins
43Note: you do not need to restart Eclipse after installing each plugin. Simply restart once all plugins are installed.
44
45### [The AVR plugin](http://avr-eclipse.sourceforge.net/)
46This is the most important plugin as it will allow Eclipse to _understand_ AVR C code. Follow [the instructions for using the update site](http://avr-eclipse.sourceforge.net/wiki/index.php/Plugin_Download#Update_Site), and agree with the security warning for unsigned content.
47
48### [ANSI Escape in Console](https://marketplace.eclipse.org/content/ansi-escape-console)
49This plugin is necessary to properly display the colored build output generated by the QMK makefile.
50
511. Open <kbd><kbd>Help</kbd> > <kbd>Eclipse Marketplace…</kbd></kbd>
522. Search for _ANSI Escape in Console_
533. Click the <samp>Install</samp> button of the plugin
544. Follow the instructions and agree again with the security warning for unsigned content.
55
56Once both plugins are installed, restart Eclipse as prompted.
57
58# Configure Eclipse for QMK
59## Importing the project
601. Click <kbd><kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd></kbd>
612. On the next screen:
62 * Select the directory where you cloned the repository as _Existing Code Location_;
63 * (Optional) Give a different name to the project¹, e.g. _QMK_ or _Quantum_;
64 * Select the _AVR-GCC Toolchain_;
65 * Keep the rest as-is and click <kbd>Finish</kbd>
66
67 ![Importing QMK in Eclipse](http://i.imgur.com/oHYR1yW.png)
68
693. The project will now be loaded and indexed. Its files can be browsed easily through the _Project Explorer_ on the left.
70
71¹ There might be issues for importing the project with a custom name. If it does not work properly, try leaving the default project name (i.e. the name of the directory, probably `qmk_firmware`).
72
73## Build your keyboard
74We will now configure a make target that cleans the project and builds the keymap of your choice.
75
761. On the right side of the screen, select the <kbd>Make Target</kbd> tab
772. Expand the folder structure to the keyboard of your choice, e.g. `qmk_firmware/keyboards/ergodox`
783. Right-click on the keyboard folder and select <kbd>New…</kbd> (or select the folder and click the <kbd>New Make Target</kbd> icon above the tree)
794. Choose a name for your build target, e.g. _clean \<your keymap\>_
805. Make Target: this is the arguments that you give to `make` when building from the command line. If your target name does not match these arguments, uncheck <kbd>Same as target name</kbd> and input the correct arguments, e.g. `clean <your keymap>`
816. Leave the other options checked and click <kbd>OK</kbd>. Your make target will now appear under the selected keyboard.
827. (Optional) Toggle the <kbd>Hide Empty Folders</kbd> icon button above the targets tree to only show your build target.
838. Double-click the build target you created to trigger a build.
849. Select the <kbd>Console</kbd> view at the bottom to view the running build. \ No newline at end of file
diff --git a/docs/Embedding.md b/docs/Embedding.md
new file mode 100644
index 000000000..5c2f3b31e
--- /dev/null
+++ b/docs/Embedding.md
@@ -0,0 +1,64 @@
1# WARNING: Until issue [#173](https://github.com/tmk/tmk_keyboard/issues/173) goes through, the [core][1] repository will not be up-to-date with the latest changes and fixes, but can still be used.
2
3If you want to use TMK for your own keyboard project, you've got three options for embedding the [core][1].
4The recommended option is [subtrees](#1-git-subtree).
5
6After adding the embed you'll need to [modify the Makefile](#modifications-to-the-makefile) of your project to point to the core correctly.
7
8## 1. git subtree
9
10In order to set up the subtree in your project, first add the core repository as a remote:
11```
12git remote add -f core https://github.com/tmk/tmk_core
13```
14
15Then add the core as a subtree (directory) in your local repository:
16```
17git subtree add -P tmk_core core master --squash
18```
19
20And that's it!
21
22When you want to update the subtree in your repository to match the master on [tmk_core][1], do this:
23```
24git subtree pull -P tmk_core core master --squash
25```
26
27## 2. git submodule
28
29In order to set up the submodule in your project, first add a new submodule:
30```
31git submodule add https://github.com/tmk/tmk_core tmk_core
32```
33
34Then pull, sync and update the submodule:
35```
36git pull
37git submodule sync --recursive
38git submodule update --init --recursive
39```
40
41And that's it!
42
43When you want to update the subtree in your repository to match the master on [tmk_core][1], follow the same steps as above.
44
45If you want to clone a repository from GitHub that has submodule(s) in it, pass <kbd>--recursive</kbd> when cloning, like so:
46`git clone --recursive https://github.com/<username>/<repository>`
47
48## 3. Manually (without git)
49
50*Note: This is not recommended in any way, but it's still possible.*
51
52Download a zipped version of the [tmk_core][1] repository using this link:
53<https://github.com/tmk/tmk_core/archive/master.zip>
54
55Extract the zip in your project's directory, then rename the folder to <kbd>tmk_core</kbd>.
56
57## Modifications to the *Makefile*
58
59The one thing you have to make sure to change in the *Makefile* (compared to [tmk_keyboard](https://github.com/tmk/tmk_keyboard) drivers' *[Makefile](https://github.com/tmk/tmk_keyboard/blob/master/keyboard/gh60/Makefile#L45)*) is the "TMK_DIR" variable, which needs to point to the embed directory:
60```Makefile
61TMK_DIR = ./tmk_core
62```
63
64[1]: https://github.com/tmk/tmk_core \ No newline at end of file
diff --git a/docs/FAQ-Build.md b/docs/FAQ-Build.md
new file mode 100644
index 000000000..75babb6ba
--- /dev/null
+++ b/docs/FAQ-Build.md
@@ -0,0 +1,151 @@
1## READ FIRST
2- https://github.com/jackhumbert/qmk_firmware/blob/master/doc/BUILD_GUIDE.md
3
4In short,
5
6 $ make [-f Makefile.<variant>] [KEYMAP=...] clean
7 $ make [-f Makefile.<variant>] [KEYMAP=...]
8 $ make [-f Makefile.<variant>] [KEYMAP=...] dfu
9
10
11## Can't program on Linux and Mac
12You will need proper permission to operate a device. For Linux users see udev rules below.
13Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line.
14
15https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/sudo.8.html
16
17In short when your controller is ATMega32u4,
18
19 $ sudo dfu-programmer atmega32u4 erase --force
20 $ sudo dfu-programmer atmega32u4 flash your.hex
21 $ sudo dfu-programmer atmega32u4 reset
22
23or just
24
25 $ sudo make dfu
26
27But to run `make` with root privilege is not good idea. Use former method as possible.
28
29## Do 'make clean' before 'make'
30You'll need `make clean` after you edit **config.h** or change options like `KEYMAP`.
31
32Frist remove all files made in previous build,
33
34 $ make clean
35
36then build new firmware.
37
38 $ make [KEYMAP=...]
39
40Also you can always try `make clean` when you get other strange result during build.
41
42
43## WINAVR is obsolete
44It is no longer recommended and may cause some problem.
45See [Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
46
47## USB stack: LUFA or PJRC?
48Use **LUFA**.
49
50**PJRC** stack won't be supported actively anymore. There is no reason to hesitate to use LUFA except for binary size(about 1KB lager?). But **PJRC** is still very useful for debug and development purpose.
51See also [Issue #50](https://github.com/tmk/tmk_keyboard/issues/50) and [Issue #58](https://github.com/tmk/tmk_keyboard/issues/58).
52
53## Edit configuration but not change
54You will need followings after editing `CONSOLE_ENABLE`, `NKRO_ENABLE`, `EXTRAKEY_ENABLE` or `MOUSEKEY_ENABLE` option in **Makefile**.
55
56### 1. make clean
57This will be needed when you edit **config.h**.
58
59### 2. Remove Drivers from Device Manager(Windows)
60**Windows only.** Linux, OSX and other OS's doesn't require this. It looks like Windows keeps using driver installed when device was connected first time even after the device changes its configuration. To load proper drivers for new configuration you need to remove existent drivers from **Drvice Manager**.
61
62### 3. Build with different VID:PID
63**Windows only.** If method 2. does't work fou you try this. Change Vendor ID or Product ID in **config.h** and build firmware. Windows should recognize it as whole new device and start drivers install process.
64
65### 4. Just try other ports
66This will be useful and the easiest workaround for **Windows**.
67
68
69
70## USB VID and PID
71You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very least chance of collision with other product.
72
73For example TMK uses following numbers by default.
74```
75keyboard:
76hhkb: FEED:CAFE
77gh60: FEED:6060
78
79converter:
80x68k: FEED:6800
81ps2: FEED:6512
82adb: FEED:0ADB
83ibm4704: FEED:4704
84pc98: FEED:9898
85```
86
87Also see this.
88https://github.com/tmk/tmk_keyboard/issues/150
89
90You can buy a really unique VID:PID here. I don't think you need this for personal use.
91- http://www.obdev.at/products/vusb/license.html
92- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
93
94
95## Linux udev rules
96On Linux you need proper privilege to access device file of MCU, you'll have to use `sudo` when flashing firmware. You can circumvent this with placing these files in `/etc/udev/rules.d/`.
97
98**/etc/udev/rules.d/50-atmel-dfu.rules:**
99```
100# Atmel ATMega32U4
101SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666"
102# Atmel USBKEY AT90USB1287
103SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666"
104# Atmel ATMega32U2
105SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666"
106```
107
108**/etc/udev/rules.d/52-tmk-keyboard.rules:**
109```
110# tmk keyboard products https://github.com/tmk/tmk_keyboard
111SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
112```
113
114
115
116## Cortex: cstddef: No such file or directory
117GCC 4.8 of Ubuntu 14.04 had this problem and had to update to 4.9 with this PPA.
118https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded
119
120https://github.com/tmk/tmk_keyboard/issues/212
121https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef
122https://developer.mbed.org/forum/mbed/topic/5205/
123
124
125## 'clock_prescale_set' and 'clock_div_1' not available
126Your toolchain is too old to support the MCU. For example WinAVR 20100110 doesn't support ATMega32u2.
127
128```
129Compiling C: ../../tmk_core/protocol/lufa/lufa.c
130avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_alps64/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_alps64_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_alps64/protocol/lufa/lufa.o
131../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu':
132../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set'
133../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function)
134../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once
135../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.)
136make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1
137```
138
139
140## BOOTLOADER_SIZE for AVR
141Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment.
142
143```
144# Boot Section Size in *bytes*
145# Teensy halfKay 512
146# Teensy++ halfKay 2048
147# Atmel DFU loader 4096 (TMK Alt Controller)
148# LUFA bootloader 4096
149# USBaspLoader 2048
150OPT_DEFS += -DBOOTLOADER_SIZE=2048
151``` \ No newline at end of file
diff --git a/docs/FAQ-Keymap.md b/docs/FAQ-Keymap.md
new file mode 100644
index 000000000..7c73f571f
--- /dev/null
+++ b/docs/FAQ-Keymap.md
@@ -0,0 +1,248 @@
1## READ FIRST
2https://github.com/tmk/tmk_core/blob/master/doc/keymap.md
3
4## How to get keycode
5See [Keycodes](Keycodes). Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h).
6
7## Sysrq key
8Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'.
9
10See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and
11- http://en.wikipedia.org/wiki/Magic_SysRq_key
12- http://en.wikipedia.org/wiki/System_request
13
14## Power key doesn't work
15Use `KC_PWR` instead of `KC_POWER` or vice versa.
16- `KC_PWR` works with Windows and Linux, not with OSX.
17- `KC_POWER` works with OSX and Linux, not with Windows.
18
19http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264
20
21## Oneshot modifier
22Solves my personal 'the' problem. I often got 'the' or 'THe' wrongly instead of 'The'. Oneshot Shift mitgates this for me.
23https://github.com/tmk/tmk_keyboard/issues/67
24
25## Modifier/Layer stuck
26Modifier keys or layers can be stuck unless layer switching is configured properly.
27For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event.
28
29- https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching
30- http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604
31- https://github.com/tmk/tmk_keyboard/issues/248
32
33
34## Mechanical Lock Switch Support
35https://github.com/tmk/tmk_keyboard#mechanical-locking-support
36
37This feature is for *mechanical lock switch* like this Alps one.
38http://deskthority.net/wiki/Alps_SKCL_Lock
39
40Using enabling this feature and using keycodes `LCAP`, `LNUM` or `LSCR` in keymap you can use physical locking CapsLock, NumLock or ScrollLock keys as you expected.
41
42Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `CAPS`, `NLCK` and `SLCK`.***
43
44
45## Input special charactors other than ASCII like Cédille 'Ç'
46NO UNIVERSAL METHOD TO INPUT THOSE WORKS OVER ALL SYSTEMS. You have to define **MACRO** in way specific to your OS or layout.
47
48See this post for example **MACRO** code.
49
50http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620
51
52On **Windows** you can use `AltGr` key or **Alt code**.
53- http://en.wikipedia.org/wiki/AltGr_key
54- http://en.wikipedia.org/wiki/Alt_code
55
56On **Mac** OS defines `Option` key combinations.
57- http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input
58
59On **Xorg** you can use `compose` key, instead.
60- http://en.wikipedia.org/wiki/Compose_key
61
62And see this for **Unicode** input.
63- http://en.wikipedia.org/wiki/Unicode_input
64
65
66## Apple/Mac keyboard Fn
67Not supported.
68
69Apple/Mac keyboard sends keycode for Fn unlike most of other keyboards.
70I think you can send Apple Fn key using Apple venter specific Page 0xff01 and usage 0x0003. But you have to change HID Report Descriptor for this, of course.
71
72https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/AppleHIDUsageTables.h
73
74
75## Media control keys in Mac OSX
76#### KC_MNXT and KC_MPRV does not work on Mac
77Use `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) and `KC_MRWD`(`KC_MEDIA_REWIND`) instead of `KC_MNXT` and `KC_MPRV`.
78See https://github.com/tmk/tmk_keyboard/issues/195
79
80
81## Keys supported in Mac OSX?
82You can know which keycodes are supported in OSX from this source code.
83
84`usb_2_adb_keymap` array maps Keyboard/Keypad Page usages to ADB scancodes(OSX internal keycodes).
85
86https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/Cosmo_USB2ADB.c
87
88And `IOHIDConsumer::dispatchConsumerEvent` handles Consumer page usages.
89
90https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/IOHIDConsumer.cpp
91
92
93## JIS keys in Mac OSX
94Japanese JIS keyboard specific keys like `無変換(Muhenkan)`, `変換(Henkan)`, `ひらがな(hiragana)` are not recognized on OSX. You can use **Seil** to enable those keys, try following options.
95
96* Enable NFER Key on PC keyboard
97* Enable XFER Key on PC keyboard
98* Enable KATAKANA Key on PC keyboard
99
100https://pqrs.org/osx/karabiner/seil.html
101
102
103## RN-42 Bluetooth doesn't work with Karabiner
104Karabiner - Keymapping tool on Mac OSX - ignores inputs from RN-42 module by default. You have to enable this option to make Karabiner working with your keyboard.
105https://github.com/tekezo/Karabiner/issues/403#issuecomment-102559237
106
107See these for the deail of this problem.
108https://github.com/tmk/tmk_keyboard/issues/213
109https://github.com/tekezo/Karabiner/issues/403
110
111
112## Esc and `~ on a key
113
114
115You can define FC660 and Poker style ESC with `ACTION_LAYER_MODS`.
116https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#35-momentary-switching-with-modifiers
117
118```
119#include "keymap_common.h"
120
121
122/* Leopold FC660
123 * https://elitekeyboards.com/products.php?sub=leopold,compact&pid=fc660c
124 * Shift + Esc = ~
125 * Fn + Esc = `
126 *
127 * Votex Poker II
128 * https://adprice.fedorapeople.org/poker2_manual.pdf
129 * Fn + Esc = `
130 * Fn + Shift + Esc = ~
131 */
132const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
133 /* 0: qwerty */
134 [0] = KEYMAP( \
135 ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \
136 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
137 LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \
138 FN0, NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,ESC, \
139 LCTL,LGUI,LALT, SPC, RALT,FN1, RGUI,RCTL),
140 [1] = KEYMAP( \
141 GRV, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
142 TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\
143 TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
144 TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
145 TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS),
146 [2] = KEYMAP( \
147 GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \
148 TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\
149 TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
150 TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
151 TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS),
152};
153
154const uint16_t PROGMEM fn_actions[] = {
155 // https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#35-momentary-switching-with-modifiers
156 [0] = ACTION_LAYER_MODS(1, MOD_LSFT),
157 [1] = ACTION_LAYER_MOMENTARY(2),
158};
159```
160
161Otherwise, you can write code, see this.
162https://github.com/p3lim/keyboard_firmware/commit/fd799c12b69a5ab5addd1d4c03380a1b8ef8e9dc
163
164
165## 32 Fn keys are not enough?
166### actionmap
167It uses 16 bit codes and has no limitation of 32 Fn at the expense of memory space. TMK keymap is actually is 8 bit codes as subset of the actionmap.
168https://github.com/tmk/tmk_keyboard/issues?utf8=%E2%9C%93&q=is%3Aissue+actionmap
169
170### extension for modified keys
171https://geekhack.org/index.php?topic=41989.msg1885526#msg1885526
172
173
174## Arrow on Right Modifier keys with Dual-Role
175This turns right modifer keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**.
176```
177#include "keymap_common.h"
178
179
180/* Arrow keys on right modifier keys with TMK dual role feature
181 *
182 * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role
183 * https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
184 */
185const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
186 /* 0: qwerty */
187 [0] = KEYMAP( \
188 ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \
189 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
190 LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \
191 LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \
192 FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3),
193 [1] = KEYMAP( \
194 GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \
195 TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\
196 TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
197 TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \
198 TRNS,TRNS,TRNS, TRNS, TRNS,FN7, FN6, FN8),
199};
200
201const uint16_t PROGMEM fn_actions[] = {
202 [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP),
203 [1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN),
204 [2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT),
205 [3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT),
206 [4] = ACTION_LAYER_MOMENTARY(1),
207 [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP),
208 [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN),
209 [7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME),
210 [8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END),
211};
212
213```
214
215
216Dual-role key: https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
217
218
219## Eject on Mac OSX
220`EJCT` keycode works on OSX. https://github.com/tmk/tmk_keyboard/issues/250
221It seems Windows 10 ignores the code and Linux/Xorg recognizes but has no mapping by default.
222
223Not sure what keycode Eject is on genuine Apple keyboard actually. HHKB uses `F20` for Eject key(`Fn+f`) on Mac mode but this is not same as Apple Eject keycode probably.
224
225
226
227## What's weak_mods and real_mods in action_util.c
228___TO BE IMPROVED___
229
230real_mods is intended to retains state of real/physical modifier key state, while
231weak_mods retains state of virtual or temprary modifiers which should not affect state real modifier key.
232
233Let's say you hold down physical left shift key and type ACTION_MODS_KEY(LSHIFT, KC_A),
234
235with weak_mods,
236* (1) hold down left shift: real_mods |= MOD_BIT(LSHIFT)
237* (2) press ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods |= MOD_BIT(LSHIFT)
238* (3) release ACTION_MODS_KEY(LSHIFT, KC_A): waek_mods &= ~MOD_BIT(LSHIFT)
239real_mods still keeps modifier state.
240
241without weak mods,
242* (1) hold down left shift: real_mods |= MOD_BIT(LSHIFT)
243* (2) press ACTION_MODS_KEY(LSHIFT, KC_A): real_mods |= MOD_BIT(LSHIFT)
244* (3) release ACTION_MODS_KEY(LSHIFT, KC_A): real_mods &= ~MOD_BIT(LSHIFT)
245here real_mods lost state for 'physical left shift'.
246
247weak_mods is ORed with real_mods when keyboard report is sent.
248https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57 \ No newline at end of file
diff --git a/docs/FAQ.md b/docs/FAQ.md
new file mode 100644
index 000000000..0636d8b54
--- /dev/null
+++ b/docs/FAQ.md
@@ -0,0 +1,238 @@
1## READ FIRST
2- **README** of top directory : https://github.com/tmk/tmk_keyboard/blob/master/README.md
3- **README** of target project(keyboard/converter) directory.
4
5Note that you'll need to read **both**.
6
7
8# Build
9- [[FAQ/Build]]
10
11
12# Keymap
13- [[FAQ/Keymap]]
14
15
16# Debug Console
17## hid_listen can't recognize device
18When debug console of your device is not ready you will see like this:
19
20 Waiting for device:.........
21
22once the device is pluged in then *hid_listen* finds it you will get this message:
23
24 Waiting for new device:.........................
25 Listening:
26
27Check if you can't get this 'Listening:' message:
28- build with `CONSOLE_ENABLE=yes` in **Makefile**.
29
30You may need privilege to access the device on OS like Linux.
31- try `sudo hid_listen`
32
33## Can't get message on console
34Check:
35- *hid_listen* finds your device. See above.
36- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
37- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**.
38- try using 'print' function instead of debug print. See **common/print.h**.
39- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
40
41## Linux or UNIX like system requires Super User privilege
42Just use 'sudo' to execute *hid_listen* with privilege.
43```
44$ sudo hid_listen
45```
46
47Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system.
48
49File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu)
50```
51# tmk keyboard products https://github.com/tmk/tmk_keyboard
52SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
53```
54
55***
56
57# Miscellaneous
58## NKRO Doesn't work
59First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**.
60
61Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS.
62
63If your firmeare built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and keeped over power cycles.
64
65https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
66
67
68## TrackPoint needs reset circuit(PS/2 mouse support)
69Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754.
70
71- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
72- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
73
74
75## Can't read column of matrix beyond 16
76Use `1UL<<16` instead of `1<<16` in `read_cols()` in **matrix.h** when your columns goes beyond 16.
77
78In C `1` means one of **int** type which is **16bit** in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use **unsigned long** type with `1UL`.
79
80http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
81
82
83
84## Pull-up Resistor
85In some case converters needed to have pull-up resistors to work correctly. Place the resistor between VCC and signal line in parallel.
86
87For example:
88```
89Keyboard Conveter
90 ,------.
915V------+------|VCC |
92 | | |
93 R | |
94 | | |
95Signal--+------|PD0 |
96 | |
97GND------------|GND |
98 `------'
99R: 1K Ohm resistor
100```
101
102https://github.com/tmk/tmk_keyboard/issues/71
103
104
105## Arduino Micro's pin naming is confusing
106Note that Arduino Micro PCB marking is different from real AVR port name. D0 of Arduino Micro is not PD0, PD0 is D3. Check schematic yourself.
107http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
108
109
110
111## Bootloader jump doesn't work
112Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
113```
114# Size of Bootloaders in bytes:
115# Atmel DFU loader(ATmega32U4) 4096
116# Atmel DFU loader(AT90USB128) 8192
117# LUFA bootloader(ATmega32U4) 4096
118# Arduino Caterina(ATmega32U4) 4096
119# USBaspLoader(ATmega***) 2048
120# Teensy halfKay(ATmega32U4) 512
121# Teensy++ halfKay(AT90USB128) 2048
122OPT_DEFS += -DBOOTLOADER_SIZE=4096
123```
124AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet.
125Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**.
126
127AVR Boot section is located at end of Flash memory like the followings.
128```
129byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
1300x0000 +---------------+ 0x00000 +---------------+
131 | | | |
132 | | | |
133 | Application | | Application |
134 | | | |
135 = = = =
136 | | 32KB-4KB | | 128KB-8KB
1370x6000 +---------------+ 0x1E000 +---------------+
138 | Bootloader | 4KB | Bootloader | 8KB
1390x7FFF +---------------+ 0x1FFFF +---------------+
140
141
142byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
1430x0000 +---------------+ 0x00000 +---------------+
144 | | | |
145 | | | |
146 | Application | | Application |
147 | | | |
148 = = = =
149 | | 32KB-512B | | 128KB-2KB
1500x7E00 +---------------+ 0x1FC00 +---------------+
151 | Bootloader | 512B | Bootloader | 2KB
1520x7FFF +---------------+ 0x1FFFF +---------------+
153```
154
155And see this discussion for further reference.
156https://github.com/tmk/tmk_keyboard/issues/179
157
158
159## Special Extra key doesn't work(System, Audio control keys)
160You need to define `EXTRAKEY_ENABLE` in **makefile** to use them in TMK.
161```
162EXTRAKEY_ENABLE = yes # Audio control and System control
163```
164http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-60.html#p157919
165
166
167## Wakeup from sleep doesn't work
168In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
169
170Pressing any key during sleep should wake host.
171
172
173## Using Arduino?
174**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself.
175
176- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
177- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
178
179Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
180
181
182## Using PF4-7 pins of USB AVR?
183You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this.
184
185If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
186
187See this code.
188```
189 // JTAG disable for PORT F. write JTD bit twice within four cycles.
190 MCUCR |= (1<<JTD);
191 MCUCR |= (1<<JTD);
192```
193https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
194
195And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.
196
197
198## Adding LED indicators of Lock keys
199You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
200
201http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560
202
203## Program Arduino Micro/Leonardo
204Push reset button and then run command like this within 8 seconds.
205
206```
207avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0
208```
209
210Device name will vary depending on your system.
211
212http://arduino.cc/en/Main/ArduinoBoardMicro
213https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
214
215
216## USB 3 compatibility
217I heard some people have a problem with USB 3 port, try USB 2 port.
218
219
220## Mac compatibility
221### OS X 10.11 and Hub
222https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
223
224
225## Problem on BIOS(UEFI)/Resume(Sleep&Wake)/Power cycles
226Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).
227
228As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others.
229
230https://github.com/tmk/tmk_keyboard/issues/266
231https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
232
233
234
235## FLIP doesn't work
236### AtLibUsbDfu.dll not found
237Remove current driver and reinstall one FLIP provides from DeviceManager.
238http://imgur.com/a/bnwzy \ No newline at end of file
diff --git a/doc/FUSE.txt b/docs/FUSE.txt
index 99ddd2d18..99ddd2d18 100644
--- a/doc/FUSE.txt
+++ b/docs/FUSE.txt
diff --git a/docs/Git-subtree.md b/docs/Git-subtree.md
new file mode 100644
index 000000000..4fd7f8bea
--- /dev/null
+++ b/docs/Git-subtree.md
@@ -0,0 +1,7 @@
1## Update core branch procedure
2 git co master
3 git subtree split -P tmk_core -b <tmp_branch>
4 git co core
5 git merge <tmp_branch>
6 git co master
7 git subtree merge -P tmk_core --squash
diff --git a/doc/HAND_WIRE.md b/docs/HAND_WIRE.md
index 17ef3116f..17ef3116f 100644
--- a/doc/HAND_WIRE.md
+++ b/docs/HAND_WIRE.md
diff --git a/docs/HHKB-Alt-controller.md b/docs/HHKB-Alt-controller.md
new file mode 100644
index 000000000..c12d8d7ff
--- /dev/null
+++ b/docs/HHKB-Alt-controller.md
@@ -0,0 +1,5 @@
1# Alternative Controller for HHKB
2
3* [Geekhack.org thread](https://geekhack.org/index.php?topic=12047.0)
4
5* [Connector unmate](https://geekhack.org/index.php?topic=12047.msg1543860#msg1543860) \ No newline at end of file
diff --git a/docs/Home.md b/docs/Home.md
new file mode 100644
index 000000000..bc1d25bf2
--- /dev/null
+++ b/docs/Home.md
@@ -0,0 +1,183 @@
1# Quantum Mechanical Keyboard Firmware
2
3You have found the QMK Firmware documentation site. This is a keyboard firmware based on the [tmk\_keyboard firmware](http://github.com/tmk/tmk_keyboard) \([view differences](/Differences-from-TMK.md)\) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB.
4
5# Getting started
6
7Before you are able to compile, you'll need to install an environment for AVR or ARM development. You'll find the instructions for any OS below. If you find another/better way to set things up from scratch, please consider [making a pull request](https://github.com/qmk/qmk_firmware/pulls) with your changes!
8
9* [Build Environment Setup](/Build-Environment-Setup.md)
10* [QMK Overview](/QMK-Overview.md)
11
12# Configuring QMK Firmware
13
14The QMK Firmware can be configured via the `keymaps` array data. For simply generating a [basic keycode](/Keycodes.md), you add it as an element of your `keymaps` array data. For more complicated actions, there are more advanced keycodes that are organized carefully to represent common operations, some of which can be found on the [Key Functions](/Key-Functions.md) page.
15
16For more details of the `keymaps` array, see [Keymap Overview](/Keymap.md) page.
17
18## Space Cadet Shift: The future, built in
19
20Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds. Head on over to the [Space Cadet Shift](/Space-Cadet-Shift.md) page to read about it.
21
22## The Leader key: A new kind of modifier
23
24Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](/Leader-Key.md) page.
25
26## Tap Dance: A single key can do 3, 5, or 100 different things
27
28Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. Read more about it on the [Tap Dance](/Tap-Dance.md) page.
29
30## Temporarily setting the default layer
31
32`DF(layer)` - sets default layer to _layer_. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does.
33
34## Macro shortcuts: Send a whole string when pressing just one key
35
36How would you like a single keypress to send a whole word, sentence, paragraph, or even document? Head on over to the [Macros](/Macros.md) page to read up on all aspects of Simple and Dynamic Macros.
37
38## Additional keycode aliases for software-implemented layouts \(Colemak, Dvorak, etc\)
39
40Everything is assuming you're in Qwerty \(in software\) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap:
41
42```
43#include <keymap_colemak.h>
44```
45
46If you use Dvorak, use `keymap_dvorak.h` instead of `keymap_colemak.h` for this line. After including this line, you will get access to:
47
48* `CM_*` for all of the Colemak-equivalent characters
49* `DV_*` for all of the Dvorak-equivalent characters
50
51These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features.
52
53To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F`. Using `KC_F` under these same circumstances would result in `T`.
54
55## Backlight Breathing
56
57In order to enable backlight breathing, the following line must be added to your config.h file.
58
59```
60#define BACKLIGHT_BREATHING
61```
62
63The following function calls are used to control the breathing effect.
64
65* `breathing_enable()` - Enable the free-running breathing effect.
66* `breathing_disable()` - Disable the free-running breathing effect immediately.
67* `breathing_self_disable()` - Disable the free-running breathing effect after the current effect ends.
68* `breathing_toggle()` - Toggle the free-running breathing effect.
69* `breathing_defaults()` - Reset the speed and brightness settings of the breathing effect.
70
71The following function calls are used to control the maximum brightness of the breathing effect.
72
73* `breathing_intensity_set(value)` - Set the brightness of the breathing effect when it is at its max value.
74* `breathing_intensity_default()` - Reset the brightness of the breathing effect to the default value based on the current backlight intensity.
75
76The following function calls are used to control the cycling speed of the breathing effect.
77
78* `breathing_speed_set(value)` - Set the speed of the breathing effect - how fast it cycles.
79* `breathing_speed_inc(value)` - Increase the speed of the breathing effect by a fixed value.
80* `breathing_speed_dec(value)` - Decrease the speed of the breathing effect by a fixed value.
81* `breathing_speed_default()` - Reset the speed of the breathing effect to the default value.
82
83The following example shows how to enable the backlight breathing effect when the FUNCTION layer macro button is pressed:
84
85```
86case MACRO_FUNCTION:
87 if (record->event.pressed)
88 {
89 breathing_speed_set(3);
90 breathing_enable();
91 layer_on(LAYER_FUNCTION);
92 }
93 else
94 {
95 breathing_speed_set(1);
96 breathing_self_disable();
97 layer_off(LAYER_FUNCTION);
98 }
99 break;
100```
101
102The following example shows how to pulse the backlight on-off-on when the RAISED layer macro button is pressed:
103
104```
105case MACRO_RAISED:
106 if (record->event.pressed)
107 {
108 layer_on(LAYER_RAISED);
109 breathing_speed_set(2);
110 breathing_pulse();
111 update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
112 }
113 else
114 {
115 layer_off(LAYER_RAISED);
116 update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
117 }
118 break;
119```
120
121## Other firmware shortcut keycodes
122
123* `RESET` - puts the MCU in DFU mode for flashing new firmware \(with `make dfu`\)
124* `DEBUG` - the firmware into debug mode - you'll need hid\_listen to see things
125* `BL_ON` - turns the backlight on
126* `BL_OFF` - turns the backlight off
127* `BL_<n>` - sets the backlight to level _n_
128* `BL_INC` - increments the backlight level by one
129* `BL_DEC` - decrements the backlight level by one
130* `BL_TOGG` - toggles the backlight
131* `BL_STEP` - steps through the backlight levels
132
133Enable the backlight from the Makefile.
134
135# Custom Quantum functions
136
137All of these functions are available in the `*_kb()` or `*_user()` variety. `kb` ones should only be used in the `<keyboard>/<keyboard>.c` file, and `user` ones should only be used in the `keymap.c`. The keyboard ones call the user ones - it's necessary to keep these calls to allow the keymap functions to work correctly.
138
139## `void matrix_init_*(void)`
140
141This function gets called when the matrix is initiated, and can contain start-up code for your keyboard/keymap.
142
143## `void matrix_scan_*(void)`
144
145This function gets called at every matrix scan, which is basically as often as the MCU can handle. Be careful what you put here, as it will get run a lot.
146
147## `bool process_record_*(uint16_t keycode, keyrecord_t *record)`
148
149This function gets called on every keypress/release, and is where you can define custom functionality. The return value is whether or not QMK should continue processing the keycode - returning `false` stops the execution.
150
151The `keycode` variable is whatever is defined in your keymap, eg `MO(1)`, `KC_L`, etc. and can be switch-cased to execute code whenever a particular code is pressed.
152
153The `record` variable contains infomation about the actual press:
154
155```
156keyrecord_t record {
157 keyevent_t event {
158 keypos_t key {
159 uint8_t col
160 uint8_t row
161 }
162 bool pressed
163 uint16_t time
164 }
165}
166```
167
168The conditional `if (record->event.pressed)` can tell if the key is being pressed or released, and you can execute code based on that.
169
170## `void led_set_*(uint8_t usb_led)`
171
172This gets called whenever there is a state change on your host LEDs \(eg caps lock, scroll lock, etc\). The LEDs are defined as:
173
174```
175#define USB_LED_NUM_LOCK 0
176#define USB_LED_CAPS_LOCK 1
177#define USB_LED_SCROLL_LOCK 2
178#define USB_LED_COMPOSE 3
179#define USB_LED_KANA 4
180```
181
182and can be tested against the `usb_led` with a conditional like `if (usb_led & (1<<USB_LED_CAPS_LOCK))` - if this is true, you can turn your LED on, otherwise turn it off.
183
diff --git a/docs/Key-Functions.md b/docs/Key-Functions.md
new file mode 100644
index 000000000..228fea8ac
--- /dev/null
+++ b/docs/Key-Functions.md
@@ -0,0 +1,117 @@
1# Quick Aliases To Common Actions
2
3Your keymap can include shortcuts to common operations (called "function actions" in tmk).
4
5These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk `ACTION_*` functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap.md#2-action).
6
7Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them.
8
9### Switching and toggling layers
10
11`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack.
12
13`OSL(layer)` - momentary switch to *layer*, as a one-shot operation. So if you have a key that's defined as `OSL(1)`, and you tap that key, then only the very next keystroke would come from layer 1. You would drop back to layer zero immediately after that one keystroke. That's handy if you have a layer full of custom shortcuts -- for example, a dedicated key for closing a window. So you tap your one-shot layer mod, then tap that magic 'close window' key, and keep typing like a boss. Layer 1 would remain active as long as you hold that key down, too (so you can use it like a momentary toggle-layer key with extra powers).
14
15`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer).
16
17`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack.
18
19`TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed).
20
21`TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 1` for just one tap.
22
23
24### Fun with modifier keys
25
26* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias
27* `RSFT(kc)` - applies right Shift to *kc*
28* `LCTL(kc)` - applies left Control to *kc*
29* `RCTL(kc)` - applies right Control to *kc*
30* `LALT(kc)` - applies left Alt to *kc*
31* `RALT(kc)` - applies right Alt to *kc*
32* `LGUI(kc)` - applies left GUI (command/win) to *kc*
33* `RGUI(kc)` - applies right GUI (command/win) to *kc*
34* `HYPR(kc)` - applies Hyper (all modifiers) to *kc*
35* `MEH(kc)` - applies Meh (all modifiers except Win/Cmd) to *kc*
36* `LCAG(kc)` - applies CtrlAltGui to *kc*
37
38You can also chain these, like this:
39
40 LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress.
41
42The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `quantum/quantum_keycodes.h`.
43
44 KC_TILD ~
45 KC_EXLM !
46 KC_QUES ?
47 KC_AT @
48 KC_HASH #
49 KC_DLR $
50 KC_PERC %
51 KC_CIRC ^
52 KC_AMPR &
53 KC_ASTR *
54 KC_LPRN (
55 KC_RPRN )
56 KC_UNDS _
57 KC_PLUS +
58 KC_DQUO "
59 KC_LCBR {
60 KC_RCBR }
61 KC_LABK <
62 KC_RABK >
63 KC_PIPE |
64 KC_COLN :
65
66`OSM(mod)` - this is a "one shot" modifier. So let's say you have your left Shift key defined as `OSM(MOD_LSFT)`. Tap it, let go, and Shift is "on" -- but only for the next character you'll type. So to write "The", you don't need to hold down Shift -- you tap it, tap t, and move on with life. And if you hold down the left Shift key, it just works as a left Shift key, as you would expect (so you could type THE). There's also a magical, secret way to "lock" a modifier by tapping it multiple times. If you want to learn more about that, open an issue. :)
67
68`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down.
69
70These are the values you can use for the `mod` in `MT()` and `OSM()`:
71
72 * MOD_LCTL
73 * MOD_LSFT
74 * MOD_LALT
75 * MOD_LGUI
76 * MOD_RCTL
77 * MOD_RSFT
78 * MOD_RALT
79 * MOD_RGUI
80 * MOD_HYPR
81 * MOD_MEH
82
83These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. Note however, that you cannot mix right and left side modifiers.
84
85We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact:
86
87 * `CTL_T(kc)` - is LCTL when held and *kc* when tapped
88 * `SFT_T(kc)` - is LSFT when held and *kc* when tapped
89 * `ALT_T(kc)` - is LALT when held and *kc* when tapped
90 * `ALGR_T(kc)` - is AltGr when held and *kc* when tapped
91 * `GUI_T(kc)` - is LGUI when held and *kc* when tapped
92 * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)
93 * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped
94 * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift.
95
96##### Permissive Hold
97
98As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
99
100```
101#define PERMISSIVE_HOLD
102```
103
104This makes it easier for fast typists to use dual-function keys. As described in the PR:
105
106Without this, if you let go of a held key inside the tapping term, it won't register.
107
108Example: (Tapping Term = 200)
109
110- SHFT_T(KC_A) Down
111- KC_X Down
112- KC_X Up
113- SHFT_T(KC_A) Up
114
115With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X).
116
117With defaults, if above is typed within tapping term, this will emit `ax`, which I doubt is what anyone really wants
diff --git a/docs/Keycodes.md b/docs/Keycodes.md
new file mode 100644
index 000000000..a0c95a99f
--- /dev/null
+++ b/docs/Keycodes.md
@@ -0,0 +1,228 @@
1# Overview
2
3When defining a [keymap](Keymap.md) each key needs a valid key definition.
4
5This page documents the symbols that correspond to keycodes that are available to you in QMK.
6
7To customize your board, they can be used by themselves or as **action codes** in combination with one of the [many C macros](https://github.com/qmk/qmk_firmware/wiki#c-macros-for-action-code).
8
9The source of truth for these codes is [tmk_core/common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h) file in the qmk source code.
10
11# The Keycodes
12
13Keycodes in QMK are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with following exceptions:
14
15* `KC_NO` = 0 for no action
16* `KC_TRNS` = 1 for layer transparency
17* internal special keycodes in the `0xA5-DF` range (tmk heritage).
18
19## Letters and Numbers
20
21|KC_1|KC_2|KC_3|KC_4|KC_5|KC_6|KC_7|KC_8|
22|----|----|----|----|----|----|----|----|
23|KC_9|KC_0|KC_F1|KC_F2|KC_F3|KC_F4|KC_F5|KC_F6|
24|KC_F7|KC_F8|KC_F9|KC_F10|KC_F11|KC_F12|KC_F13|KC_F14|
25|KC_F15|KC_F16|KC_F17|KC_F18|KC_F19|KC_F20|KC_F21|KC_F22|
26|KC_F23|KC_F24|KC_A|KC_B|KC_C|KC_D|KC_E|KC_F|
27|KC_G|KC_H|KC_I|KC_J|KC_K|KC_L|KC_M|KC_N|
28|KC_O|KC_P|KC_Q|KC_R|KC_S|KC_T|KC_U|KC_V|
29|KC_W|KC_X|KC_Y|KC_Z|||||
30
31## Punctuation
32
33|Long Name|Short Name|Description|
34|---------|----------|-----------|
35|KC_ENTER|KC_ENT|`Return (ENTER)`|
36|KC_ESCAPE|KC_ESC|`ESCAPE`|
37|KC_BSPACE|KC_BSPC|`DELETE (Backspace)`|
38|KC_TAB||`Tab`|
39|KC_SPACE|KC_SPC|Spacebar|
40|KC_MINUS|KC_MINS|`-` and `_`|
41|KC_EQUAL|KC_EQL|`=` and `+`|
42|KC_LBRACKET|KC_LBRC|`[` and `{`|
43|KC_RBRACKET|KC_RBRC|`]` and `}`|
44|KC_BSLASH|KC_BSLS|`\` and <code>&#124;</code> |
45|KC_NONUS_HASH|KC_NUHS|Non-US `#` and `~`|
46|KC_NONUS_BSLASH|KC_NUBS|Non-US `\` and <code>&#124;</code> |
47|KC_INT1|KC_RO|JIS `\` and <code>&#124;</code> |
48|KC_INT2|KC_KANA|International216|
49|KC_INT3|KC_JYEN|Yen Symbol (`¥`)|
50|KC_SCOLON|KC_SCLN|`;` and `:`|
51|KC_QUOTE|KC_QUOT|`‘` and `“`|
52|KC_GRAVE|KC_GRV|Grave Accent and Tilde|
53|KC_COMMA|KC_COMM|`,` and `<`|
54|KC_DOT||`.` and `>`|
55|KC_SLASH|KC_SLSH|`/` and `?`|
56|KC_CAPSLOCK|KC_CAPS|Caps Lock|
57
58## Modifiers
59
60|Long Name|Short Name|Description|
61|---------|----------|-----------|
62|KC_LCTRL|KC_LCTL|LeftControl|
63|KC_LSHIFT|KC_LSFT|LeftShift|
64|KC_LALT||LeftAlt|
65|KC_LGUI||Left GUI(Windows/Apple/Meta key)|
66|KC_RCTRL|KC_RCTL|RightControl|
67|KC_RSHIFT|KC_RSFT|RightShift|
68|KC_RALT||RightAlt|
69|KC_RGUI||Right GUI(Windows/Apple/Meta key)|
70|KC_LOCKING_CAPS||Locking Caps Lock|
71|KC_LOCKING_NUM||Locking Num Lock|
72|KC_LOCKING_SCROLL||Locking Scroll Lock|
73|KC_INT4|KC_HENK|JIS Henken|
74|KC_INT5|KC_MHEN|JIS Muhenken|
75
76## Commands
77
78|Long Name|Short Name|Description|
79|---------|----------|-----------|
80|KC_PSCREEN|KC_PSCR|PrintScreen|
81|KC_SCROLLLOCK|KC_SLCK|Scroll Lock|
82|KC_PAUSE|KC_PAUS|Pause|
83|KC_INSERT|KC_INS|Insert|
84|KC_HOME||Home|
85|KC_PGUP||PageUp|
86|KC_DELETE|KC_DEL|Delete Forward|
87|KC_END||End|
88|KC_PGDOWN|KC_PGDN|PageDown|
89|KC_RIGHT|KC_RGHT|RightArrow|
90|KC_LEFT||LeftArrow|
91|KC_DOWN||DownArrow|
92|KC_UP||UpArrow|
93|KC_APPLICATION|KC_APP|Application|
94|KC_POWER||Power|
95|KC_EXECUTE||Execute|
96|KC_HELP||Help|
97|KC_MENU||Menu|
98|KC_SELECT||Select|
99|KC_AGAIN||Again|
100|KC_UNDO||Undo|
101|KC_CUT||Cut|
102|KC_COPY||Copy|
103|KC_PASTE||Paste|
104|KC_FIND||Find|
105|KC_ALT_ERASE||Alternate Erase|
106|KC_SYSREQ||SysReq/Attention|
107|KC_CANCEL||Cancel|
108|KC_CLEAR||Clear|
109|KC_PRIOR||Prior|
110|KC_RETURN||Return|
111|KC_SEPARATOR||Separator|
112|KC_OUT||Out|
113|KC_OPER||Oper|
114|KC_CLEAR_AGAIN||Clear/Again|
115|KC_CRSEL||CrSel/Props|
116|KC_EXSEL||ExSel|
117|KC_SYSTEM_POWER|KC_PWR|System Power Down|
118|KC_SYSTEM_SLEEP|KC_SLEP|System Sleep|
119|KC_SYSTEM_WAKE|KC_WAKE|System Wake|
120|KC_MAIL|KC_MAIL||
121|KC_CALCULATOR|KC_CALC||
122|KC_MY_COMPUTER|KC_MYCM||
123|KC_WWW_SEARCH|KC_WSCH||
124|KC_WWW_HOME|KC_WHOM||
125|KC_WWW_BACK|KC_WBAK||
126|KC_WWW_FORWARD|KC_WFWD||
127|KC_WWW_STOP|KC_WSTP||
128|KC_WWW_REFRESH|KC_WREF||
129|KC_WWW_FAVORITES|KC_WFAV||
130
131## Media Keys
132
133Windows and Mac use different key codes for next track and previous track. Make sure you choose the keycode that corresponds to your OS.
134
135|Long Name|Short Name|Description|
136|---------|----------|-----------|
137|KC_STOP||Stop|
138|KC__MUTE||Mute|
139|KC__VOLUP||Volume Up|
140|KC__VOLDOWN||Volume Down|
141|KC_AUDIO_MUTE|KC_MUTE||
142|KC_AUDIO_VOL_UP|KC_VOLU||
143|KC_AUDIO_VOL_DOWN|KC_VOLD||
144|KC_MEDIA_NEXT_TRACK|KC_MNXT|Next Track (Windows)|
145|KC_MEDIA_PREV_TRACK|KC_MPRV|Previous Track (Windows)|
146|KC_MEDIA_FAST_FORWARD|KC_MFFD|Next Track (macOS)|
147|KC_MEDIA_REWIND|KC_MRWD|Previous Track (macOS)|
148|KC_MEDIA_STOP|KC_MSTP||
149|KC_MEDIA_PLAY_PAUSE|KC_MPLY||
150|KC_MEDIA_SELECT|KC_MSEL||
151
152## Numpad
153
154|Long Name|Short Name|Description|
155|---------|----------|-----------|
156|KC_NUMLOCK|KC_NLCK|Keypad Num Lock and Clear|
157|KC_KP_SLASH|KC_PSLS|Keypad /|
158|KC_KP_ASTERISK|KC_PAST|Keypad *|
159|KC_KP_MINUS|KC_PMNS|Keypad -|
160|KC_KP_PLUS|KC_PPLS|Keypad +|
161|KC_KP_ENTER|KC_PENT|Keypad ENTER|
162|KC_KP_1|KC_P1|Keypad 1 and End|
163|KC_KP_2|KC_P2|Keypad 2 and Down Arrow|
164|KC_KP_3|KC_P3|Keypad 3 and PageDn|
165|KC_KP_4|KC_P4|Keypad 4 and Left Arrow|
166|KC_KP_5|KC_P5|Keypad 5|
167|KC_KP_6|KC_P6|Keypad 6 and Right Arrow|
168|KC_KP_7|KC_P7|Keypad 7 and Home|
169|KC_KP_8|KC_P8|Keypad 8 and Up Arrow|
170|KC_KP_9|KC_P9|Keypad 9 and PageUp|
171|KC_KP_0|KC_P0|Keypad 0 and Insert|
172|KC_KP_DOT|KC_PDOT|Keypad . and Delete|
173|KC_KP_EQUAL|KC_PEQL|Keypad =|
174|KC_KP_COMMA|KC_PCMM|Keypad Comma|
175|KC_KP_EQUAL_AS400||Keypad Equal Sign|
176
177## Special Keys
178
179|Long Name|Short Name|Description|
180|---------|----------|-----------|
181|KC_NO||Ignore this key. (NOOP) |
182
183## Mousekey
184
185|Long Name|Short Name|Description|
186|---------|----------|-----------|
187|KC_MS_UP|KC_MS_U|Mouse Cursor Up|
188|KC_MS_DOWN|KC_MS_D|Mouse Cursor Down|
189|KC_MS_LEFT|KC_MS_L|Mouse Cursor Left|
190|KC_MS_RIGHT|KC_MS_R|Mouse Cursor Right|
191|KC_MS_BTN1|KC_BTN1|Mouse Button 1|
192|KC_MS_BTN2|KC_BTN2|Mouse Button 2|
193|KC_MS_BTN3|KC_BTN3|Mouse Button 3|
194|KC_MS_BTN4|KC_BTN4|Mouse Button 4|
195|KC_MS_BTN5|KC_BTN5|Mouse Button 5|
196|KC_MS_WH_UP|KC_WH_U|Mouse Wheel Up|
197|KC_MS_WH_DOWN|KC_WH_D|Mouse Wheel Down|
198|KC_MS_WH_LEFT|KC_WH_L|Mouse Wheel Left|
199|KC_MS_WH_RIGHT|KC_WH_R|Mouse Wheel Right|
200|KC_MS_ACCEL0|KC_ACL0|Mouse Acceleration 0|
201|KC_MS_ACCEL1|KC_ACL1|Mouse Acceleration 1|
202|KC_MS_ACCEL2|KC_ACL2|Mouse Acceleration 2|
203
204## Magic Keys
205
206The following keys can be used to turn on and off various "Magic" features. These include Boot Magic (holding certain keys down while plugging the keyboard in) and the Magic Key.
207
208|Long Name|Short Name|Description|
209|---------|----------|-----------|
210|MAGIC_SWAP_CONTROL_CAPSLOCK||Swap Capslock and Control|
211|MAGIC_CAPSLOCK_TO_CONTROL||Change Capslock to Control|
212|MAGIC_SWAP_ALT_GUI||Swap ALT and GUI|
213|MAGIC_SWAP_LALT_LGUI||Swap LALT and LGUI|
214|MAGIC_SWAP_RALT_RGUI||Swap RALT and RGUI|
215|MAGIC_NO_GUI||Disable off the GUI key|
216|MAGIC_SWAP_GRAVE_ESC||Swap the GRAVE (~ `) and Esc keys|
217|MAGIC_SWAP_BACKSLASH_BACKSPACE||Swap Backslash and Backspace|
218|MAGIC_UNSWAP_CONTROL_CAPSLOCK||Disable the Control/Caps Swap|
219|MAGIC_UNCAPSLOCK_TO_CONTROL||Turn Capslock back into Capslock|
220|MAGIC_UNSWAP_ALT_GUI||Turn the ALT/GUI swap off|
221|MAGIC_UNSWAP_LALT_LGUI||Turn the LALT/LGUI swap off|
222|MAGIC_UNSWAP_RALT_RGUI||Turn the RALT/RGUI swap off|
223|MAGIC_UNNO_GUI||Enable the GUI key|
224|MAGIC_UNSWAP_GRAVE_ESC||Turn the GRAVE/ESC swap off|
225|MAGIC_UNSWAP_BACKSLASH_BACKSPACE||Turn the Backslash/Backspace swap off|
226|MAGIC_HOST_NKRO||Turn NKRO on|
227|MAGIC_UNHOST_NKRO||Turn NKRO off|
228|MAGIC_TOGGLE_NKRO||Toggle NKRO on or off|
diff --git a/docs/Keymap-examples.md b/docs/Keymap-examples.md
new file mode 100644
index 000000000..094011931
--- /dev/null
+++ b/docs/Keymap-examples.md
@@ -0,0 +1,37 @@
1# Share your keymap idea here!
2https://github.com/tmk/tmk_keyboard/issues/265
3
4---
5
6## Reverse-shifted for numbers
7With pressing Shift and '1' key you get **1** while with just '1' key you get **!**.
8- https://geekhack.org/index.php?topic=41989.msg1959718#msg1959718
9
10
11## KBT Pure layout
12Keymap code on Alps64
13https://github.com/thisisshi/tmk_keyboard/blob/15fe63e8d181a8a95988dcc71929f0024df55caa/keyboard/alps64/keymap_pure.c
14
15and guide.
16https://github.com/thisisshi/tmk_keyboard/blob/77ac0805ade565fb23657e3644c920ada71edccf/keyboard/alps64/Guide.md
17
18## Prevent stuck modifiers
19
20Consider the following scenario:
21
221. Layer 0 has a key defined as Shift.
232. The same key is defined on layer 1 as the letter A.
243. User presses Shift.
254. User switches to layer 1 for whatever reason.
265. User releases Shift, or rather the letter A.
276. User switches back to layer 0.
28
29Shift was actually never released and is still considered pressed.
30
31If such situation bothers you add this to your `config.h`:
32
33 #define PREVENT_STUCK_MODIFIERS
34
35This option uses 5 bytes of memory per every 8 keys on the keyboard
36rounded up (5 bits per key). For example on Planck (48 keys) it uses
37(48/8)\*5 = 30 bytes.
diff --git a/docs/Keymap.md b/docs/Keymap.md
new file mode 100644
index 000000000..53b17f401
--- /dev/null
+++ b/docs/Keymap.md
@@ -0,0 +1,222 @@
1# Keymap Overview
2
3QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `KEYMAP()` macro to help you create this array of arrays.
4
5
6## Keymap and layers
7In 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.
8
9For 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**.
10
11Respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence.
12
13 Keymap: 32 Layers Layer: action code matrix
14 ----------------- ---------------------
15 stack of layers array_of_action_code[row][column]
16 ____________ precedence _______________________
17 / / | high / ESC / F1 / F2 / F3 ....
18 31 /___________// | /-----/-----/-----/-----
19 30 /___________// | / TAB / Q / W / E ....
20 29 /___________/ | /-----/-----/-----/-----
21 : _:_:_:_:_:__ | : /LCtrl/ A / S / D ....
22 : / : : : : : / | : / : : : :
23 2 /___________// | 2 `--------------------------
24 1 /___________// | 1 `--------------------------
25 0 /___________/ V low 0 `--------------------------
26
27
28Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history.
29
30### Keymap layer status
31Keymap layer has its state in two 32 bit parameters:
32
33* **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred.
34* **`layer_state`** () has current on/off status of the layer on its each bit.
35
36Keymap 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.
37Keymap 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`.
38To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
39
40 Initial state of Keymap Change base layout
41 ----------------------- ------------------
42
43 31 31
44 30 30
45 29 29
46 : :
47 : : ____________
48 2 ____________ 2 / /
49 1 / / ,->1 /___________/
50 ,->0 /___________/ | 0
51 | |
52 `--- default_layer = 0 `--- default_layer = 1
53 layer_state = 0x00000001 layer_state = 0x00000002
54
55On the other hand, you shall change `layer_state` to overlay base layer with some layers for feature such as navigation keys, function key(F1-F12), media keys or special actions.
56
57 Overlay feature layer
58 --------------------- bit|status
59 ____________ ---+------
60 31 / / 31 | 0
61 30 /___________// -----> 30 | 1
62 29 /___________/ -----> 29 | 1
63 : : | :
64 : ____________ : | :
65 2 / / 2 | 0
66 ,->1 /___________/ -----> 1 | 1
67 | 0 0 | 0
68 | +
69 `--- default_layer = 1 |
70 layer_state = 0x60000002 <-'
71
72
73
74### Layer Precedence and Transparency
75Note 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.
76
77You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer.
78Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead.
79
80## Anatomy Of A `keymap.c`
81
82For this example we will walk through the [default Clueboard keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/default/keymap.c). You'll find it helpful to open that file in another browser window so you can look at everything in context.
83
84There are 3 main sections of a `keymap.c` file you'll want to concern yourself with:
85
86* [The Definitions](#definitions)
87* [The Layer/Keymap Datastructure](#layers-and-keymaps)
88* [Custom Functions](#custom-functions), if any
89
90### Definitions
91
92At the top of the file you'll find this:
93
94 #include "clueboard.h"
95
96 // Helpful defines
97 #define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
98 #define _______ KC_TRNS
99
100 // Each layer gets a name for readability.
101 // The underscores don't mean anything - you can
102 // have a layer called STUFF or any other name.
103 // Layer names don't all need to be of the same
104 // length, and you can also skip them entirely
105 // and just use numbers.
106 #define _BL 0
107 #define _FL 1
108 #define _CL 2
109
110These are some handy definitions we can use when building our keymap and our custom function. The `GRAVE_MODS` definition will be used later in our custom function. The `_______` define makes it easier to see what keys a layer is overriding, while the `_BL`, `_FL`, and `_CL` defines make it easier to refer to each of our layers.
111
112### Layers and Keymaps
113
114The main part of this file is the `keymaps[]` definition. This is where you list your layers and the contents of those layers. This part of the file begins with this definition:
115
116 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
117
118After this you'll find a list of KEYMAP() macros. A KEYMAP() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer.
119
120`keymaps[][MATRIX_ROWS][MATRIX_COLS]` in QMK holds the 16 bit action code (sometimes referred as the quantum keycode) in it. For the keycode representing typical keys, its high byte is 0 and its low byte is the USB HID usage ID for keyboard.
121
122> TMK from which QMK was forked uses `const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]` instead and holds the 8 bit keycode. Some keycode values are reserved to induce execution of certain action codes via the `fn_actions[]` array.
123
124#### Base Layer
125
126Here is an example of the Clueboard's base layer:
127
128 /* Keymap _BL: Base Layer (Default Layer)
129 */
130 [_BL] = KEYMAP(
131 F(0), 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_GRV, KC_BSPC, KC_PGUP, \
132 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_PGDN, \
133 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
134 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_RO, KC_RSFT, KC_UP, \
135 KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
136
137Some interesting things to note about this:
138
139* From a C source point of view it's only a single array, but we have embedded whitespace to more easily visualize where each key is on the physical device.
140* Plain keyboard scancodes are prefixed with KC_, while "special" keys are not.
141* The upper left key activates custom function 0 (`F(0)`)
142* The "Fn" key is defined with `MO(_FL)`, which moves to the `_FL` layer while that key is being held down.
143
144#### Function Overlay Layer
145
146Our function layer is, from a code point of view, no different from the base layer. Conceptually, however, you will build that layer as an overlay, not a replacement. For many people this distinction does not matter, but as you build more complicated layering setups it matters more and more.
147
148 [_FL] = KEYMAP(
149 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, BL_STEP, \
150 _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \
151 _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
152 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \
153 _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END),
154
155Some interesting things to note:
156
157* We have used our `_______` definition to turn `KC_TRNS` into `_______`. This makes it easier to spot the keys that have changed on this layer.
158* While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer.
159
160### Custom Functions
161
162At the bottom of the file we've defined a single custom function. This function defines a key that sends `KC_ESC` when pressed without modifiers and `KC_GRAVE` when modifiers are held. There are a couple pieces that need to be in place for this to work, and we will go over both of them.
163
164#### `fn_actions[]`
165
166We define the `fn_actions[]` array to point to custom functions. `F(N)` in a keymap will call element N of that array. For the Clueboard's that looks like this:
167
168 const uint16_t PROGMEM fn_actions[] = {
169 [0] = ACTION_FUNCTION(0), // Calls action_function()
170 };
171
172In this case we've instructed QMK to call the `ACTION_FUNCTION` callback, which we will define in the next section.
173
174> This `fn_actions[]` interface is mostly for backward compatibility. In QMK, you don't need to use `fn_actions[]`. You can directly use `ACTION_FUNCTION(N)` or any other action code value itself normally generated by the macro in `keymaps[][MATRIX_ROWS][MATRIX_COLS]`. N in `F(N)` can only be 0 to 31. Use of the action code directly in `keymaps` unlocks this limitation.
175
176#### `action_function()`
177
178To actually handle the keypress event we define an `action_function()`. This function will be called when the key is pressed, and then again when the key is released. We have to handle both situations within our code, as well as determining whether to send/release `KC_ESC` or `KC_GRAVE`.
179
180 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
181 static uint8_t mods_pressed;
182
183 switch (id) {
184 case 0:
185 /* Handle the combined Grave/Esc key
186 */
187 mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
188
189 if (record->event.pressed) {
190 /* The key is being pressed.
191 */
192 if (mods_pressed) {
193 add_key(KC_GRV);
194 send_keyboard_report();
195 } else {
196 add_key(KC_ESC);
197 send_keyboard_report();
198 }
199 } else {
200 /* The key is being released.
201 */
202 if (mods_pressed) {
203 del_key(KC_GRV);
204 send_keyboard_report();
205 } else {
206 del_key(KC_ESC);
207 send_keyboard_report();
208 }
209 }
210 break;
211 }
212 }
213
214# Nitty Gritty Details
215
216This should have given you a basic overview for creating your own keymap. For more details see the following resources:
217
218* https://github.com/qmk/qmk_firmware/wiki/Keycodes
219* https://github.com/qmk/qmk_firmware/wiki/FAQ-Keymap
220* https://github.com/qmk/qmk_firmware/wiki/Keymap-examples
221
222We are actively working to improve these docs. If you have suggestions for how they could be made better please [file an issue](https://github.com/qmk/qmk_firmware/issues/new)! \ No newline at end of file
diff --git a/docs/Kiibohd.asciidoc b/docs/Kiibohd.asciidoc
new file mode 100644
index 000000000..4a7ee64d8
--- /dev/null
+++ b/docs/Kiibohd.asciidoc
@@ -0,0 +1,29 @@
1== KLL vs TMK
21. **Shift** = Memontary
31. Latch = One shot
41. Lock = Toggle
5
6## KLL terminology
7### Fall-through
8When a key is undefined on a particular layer, the key
9definition on the previously stacked layer will be used. Eventually
10the key definition will be set to using the default layer. If the None
11keyword is used, then the fall-through will stop and no action will
12take place.
13###Latch
14When referring to keyboards, a key function that is only enabled
15until the release of the next keypress.
16###Lock
17When referring to keyboards, a key function that is enabled until
18that key is pressed again (e.g. Caps Lock).
19### NKRO
20N-Key Rollover is the capability to press N number of keys at the
21same time on a keyboard and have them all register on the OS simultaneously.
22### Scan Code
23Row x Column code or native protocol code used by the keyboard.
24### Shift
25When referring to keyboards, a key function that is enabled while
26that key is held.
27### USB Code
28Keyboard Press/Release codes as defined by the USB HID
29Spec. \ No newline at end of file
diff --git a/docs/Leader-Key.md b/docs/Leader-Key.md
new file mode 100644
index 000000000..bf4d5456d
--- /dev/null
+++ b/docs/Leader-Key.md
@@ -0,0 +1,37 @@
1# The Leader key: A new kind of modifier
2
3If you've ever used Vim, you know what a Leader key is. If not, you're about to discover a wonderful concept. :) Instead of hitting Alt+Shift+W for example (holding down three keys at the same time), what if you could hit a _sequence_ of keys instead? So you'd hit our special modifier (the Leader key), followed by W and then C (just a rapid succession of keys), and something would happen.
4
5That's what `KC_LEAD` does. Here's an example:
6
71. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `KC_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else.
82. Include the line `#define LEADER_TIMEOUT 300` somewhere in your keymap.c file, probably near the top. The 300 there is 300ms -- that's how long you have for the sequence of keys following the leader. You can tweak this value for comfort, of course.
93. Within your `matrix_scan_user` function, do something like this:
10
11```
12LEADER_EXTERNS();
13
14void matrix_scan_user(void) {
15 LEADER_DICTIONARY() {
16 leading = false;
17 leader_end();
18
19 SEQ_ONE_KEY(KC_F) {
20 register_code(KC_S);
21 unregister_code(KC_S);
22 }
23 SEQ_TWO_KEYS(KC_A, KC_S) {
24 register_code(KC_H);
25 unregister_code(KC_H);
26 }
27 SEQ_THREE_KEYS(KC_A, KC_S, KC_D) {
28 register_code(KC_LGUI);
29 register_code(KC_S);
30 unregister_code(KC_S);
31 unregister_code(KC_LGUI);
32 }
33 }
34}
35```
36
37As you can see, you have three function. you can use - `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS` and `SEQ_THREE_KEYS` for longer sequences. Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously. \ No newline at end of file
diff --git a/docs/License-Clarification-Details.md b/docs/License-Clarification-Details.md
new file mode 100644
index 000000000..77ee688bb
--- /dev/null
+++ b/docs/License-Clarification-Details.md
@@ -0,0 +1,1272 @@
1# Details
2
3This page contains details that are no longer relevant to the License Clarification effort.
4
5## Small Contributions
6
7Smaller contributions that don't need to sign off on the license change.
8
9Username | # Lines | Files |
10---------|---------|-------|
11@AGausmann | 3 | quantum/process_keycode/process_midi.c |
12@Chipairon | 2 | quantum/keymap_extras/keymap_spanish.h |
13@coderkun | 5 | quantum/process_keycode/process_unicode.c |
14@fernandodeperto | 3 | quantum/keymap_extras/keymap_nordic.h |
15@jeebak | 8 | quantum/audio/audio_pwm.c |
16@Keller-Laminar | 1 | quantum/keymap_extras/keymap_dvorak.h |
17kevin at letord.fr | 1 | quantum/keymap_extras/keymap_french.h |
18@ofpies | 3 | quantum/config_common.h<br>quantum/quantum.c |
19@MagicianVivi | 2 | quantum/keymap_extras/keymap_bepo.h |
20@NoahAndrews | 1 | quantum/template/template.h |
21@robertdale | 6 | quantum/process_keycode/process_music.c |
22@scott-t-wilson | 3 | quantum/rgblight.c<br>quantum/rgblight.h |
23@skullydazed | 2 | quantum/rgblight.c |
24@yoyoerx | 6 | quantum/matrix.c<br>quantum/template/template.c |
25
26# Single Author Files
27
28These are the single author files that still need to have their license clarified.
29
30* quantum/dynamic_macro.h: @Vifon
31* quantum/pincontrol.h: @wez
32* quantum/keymap_extras/keymap_canadian_multilingual.h: @DidierLoiseau
33* quantum/keymap_extras/keymap_jp.h: @h-youhei
34* quantum/keymap_extras/keymap_unicode_cyrillic.h: @kuel
35* quantum/keymap_extras/keymap_russian.h: @kuel
36
37# Multi Author Files
38
39Each file listed below has more than one author and needs to have copyright resolved. The number of lines contributed by each author is shown as determined by:
40
41```git blame <file> | cut -f 2 -d '(' | cut -f 1 -d '2' | sort | uniq -c | sed 's/^ */* /'```
42
43## quantum/config_common.h
44
45* 24 Eric Tang
46* 2 Fred Sundvik
47* 58 Jack Humbert
48* 1 ofples
49
50## quantum/keycode_config.h
51
52* 5 IBNobody
53* 20 Jack Humbert
54* 1 fredizzimo
55
56## quantum/keymap.h
57
58* 39 Jack Humbert
59* 6 Wilba6582
60* 8 fredizzimo
61
62## quantum/keymap_common.c
63
64* 1 Fred Sundvik
65* 162 Jack Humbert
66* 11 Wilba6582
67* 3 fredizzimo
68
69## quantum/light_ws2812.c
70
71* 163 Jack Humbert
72* 168 Yang Liu
73
74## quantum/light_ws2812.h
75
76* 11 Jack Humbert
77* 70 Yang Liu
78
79## quantum/matrix.c
80
81* 3 Erez Zukerman
82* 15 Eric Tang
83* 239 IBNobody
84* 152 Jack Humbert
85* 2 fredizzimo
86* 2 yoyoerx
87
88## quantum/quantum.c
89
90* 38 Erez Zukerman
91* 96 Eric Tang
92* 49 Gergely Nagy
93* 68 IBNobody
94* 4 Jack & Erez
95* 561 Jack Humbert
96* 2 Ofer Plesser
97* 14 Pavlos Vinieratos
98* 2 Priyadi Iman Nurcahyo
99* 12 Smilliam
100* 52 TerryMathews
101* 12 Wojciech Siewierski
102
103## quantum/quantum.h
104
105* 23 Erez Zukerman
106* 4 Eric Tang
107* 1 Fred Sundvik
108* 3 Gergely Nagy
109* 86 Jack Humbert
110* 2 Pavlos Vinieratos
111* 5 fredizzimo
112
113## quantum/quantum_keycodes.h
114
115* 2 Erez Zukerman
116* 2 Jack Humbert
117* 313 Wilba6582
118
119## quantum/rgblight.c
120
121* 13 Erez Zukerman
122* 5 Eric Tang
123* 39 Fred Sundvik
124* 101 Jack Humbert
125* 311 Jordi Orlando
126* 1 Scott Wilson
127* 147 Yang Liu
128* 2 skullY
129
130## quantum/rgblight.h
131
132* 3 Erez Zukerman
133* 2 Eric Tang
134* 6 Fred Sundvik
135* 12 Jack Humbert
136* 2 Scott Wilson
137* 80 Yang Liu
138
139## quantum/api/api_sysex.c
140
141* 44 Fred Sundvik
142* 13 Jack Humbert
143
144## quantum/audio/audio.c
145
146* 318 IBNobody
147* 164 Jack Humbert
148
149## quantum/audio/audio.h
150
151* 15 IBNobody
152* 76 Jack Humbert
153
154## quantum/audio/audio_pwm.c
155
156* 642 IBNobody
157* 1 Jack Humbert
158
159## quantum/audio/song_list.h
160
161* 101 IBNobody
162* 16 Jack Humbert
163* 8 JeeBak Kim
164
165## quantum/audio/voices.c
166
167* 24 IBNobody
168* 256 Jack Humbert
169
170## quantum/audio/voices.h
171
172* 3 IBNobody
173* 32 Jack Humbert
174
175## quantum/keymap_extras/keymap_bepo.h
176
177* 308 Didier Loiseau
178* 1 Jack Humbert
179* 2 Vivien Alger
180
181## quantum/keymap_extras/keymap_colemak.h
182
183* 31 Erez Zukerman
184* 44 Jack Humbert
185
186## quantum/keymap_extras/keymap_dvorak.h
187
188* 69 Jack Humbert
189* 15 Jonathan A. Kollasch
190* 1 Keller-Laminar
191
192## quantum/keymap_extras/keymap_fr_ch.h
193
194* 1 Jack Humbert
195* 1 Jonathan A. Kollasch
196* 96 Vincent Pochet
197
198## quantum/keymap_extras/keymap_french.h
199
200* 80 Jack Humbert
201* 2 Jonathan A. Kollasch
202* 1 Kévin Letord
203
204## quantum/keymap_extras/keymap_french_osx.h
205
206* 1 Jack Humbert
207* 76 Sébastien Pérochon
208
209## quantum/keymap_extras/keymap_german.h
210
211* 1 Jack Humbert
212* 1 Jonathan A. Kollasch
213* 58 Matthias Schmitt
214* 39 plgruener
215
216## quantum/keymap_extras/keymap_german_ch.h
217
218* 1 Jack Humbert
219* 1 Jonathan A. Kollasch
220* 100 heartsekai
221
222## quantum/keymap_extras/keymap_german_osx.h
223
224* 1 Jack Humbert
225* 96 Stephan Bösebeck
226
227## quantum/keymap_extras/keymap_neo2.h
228
229* 2 Jack Humbert
230* 42 Matthias Schmitt
231* 19 plgruener
232
233## quantum/keymap_extras/keymap_nordic.h
234
235* 1 Andreas Lindhé
236* 1 Erez Zukerman
237* 3 Fernando Mendonca
238* 53 Jack Humbert
239* 1 Jonathan A. Kollasch
240
241## quantum/keymap_extras/keymap_norwegian.h
242
243* 1 Andreas Lindhé
244* 40 joar
245
246## quantum/keymap_extras/keymap_plover.h
247
248* 1 Jack Humbert
249* 31 James ‘Twey’ Kay
250
251## quantum/keymap_extras/keymap_spanish.h
252
253* 59 Jack Humbert
254* 1 Jonathan A. Kollasch
255* 2 Rubén Díaz-Jorge
256
257## quantum/keymap_extras/keymap_uk.h
258
259* 34 Jack Humbert
260* 2 Jonathan A. Kollasch
261
262## quantum/process_keycode/process_midi.c
263
264* 3 Adam Gausmann
265* 65 Jack Humbert
266
267## quantum/process_keycode/process_music.c
268
269* 180 Jack Humbert
270* 6 Robert Dale
271
272## quantum/process_keycode/process_tap_dance.c
273
274* 90 Gergely Nagy
275* 38 Jack Humbert
276* 8 Pavlos Vinieratos
277
278## quantum/process_keycode/process_tap_dance.h
279
280* 22 Gergely Nagy
281* 41 Jack Humbert
282* 9 Pavlos Vinieratos
283
284## quantum/process_keycode/process_unicode.c
285
286* 176 Gergely Nagy
287* 24 Jack Humbert
288* 84 Priyadi Iman Nurcahyo
289* 5 coderkun
290
291## quantum/process_keycode/process_unicode.h
292
293* 40 Gergely Nagy
294* 117 Jack Humbert
295* 10 Priyadi Iman Nurcahyo
296
297## quantum/template/config.h
298
299* 9 Eric Tang
300* 78 IBNobody
301* 75 Jack Humbert
302
303## quantum/template/template.c
304
305* 9 Damien Pollet
306* 7 IBNobody
307* 8 Jack Humbert
308* 4 yoyoerx
309
310## quantum/template/template.h
311
312* 2 Damien Pollet
313* 16 Jack Humbert
314* 1 Noah Andrews
315
316# All Single Author Files
317
318These files have only a single author and so clarifying licensing should be pretty straightforward.
319
320* quantum/analog.c: Jack Humbert
321* quantum/analog.h: Jack Humbert
322* quantum/api.h: Jack Humbert
323* quantum/keycode_config.c: Jack Humbert
324* quantum/pincontrol.h: Wez Furlong
325* quantum/api/api_sysex.h: Jack Humbert
326* quantum/audio/luts.c: IBNobody
327* quantum/audio/luts.h: IBNobody
328* quantum/audio/musical_notes.h: Jack Humbert
329* quantum/audio/wave.h: Jack Humbert
330* quantum/keymap_extras/keymap_br_abnt2.h: Potiguar Faga
331* quantum/keymap_extras/keymap_dvp.h: Artyom Mironov
332* quantum/keymap_extras/keymap_jp.h: h-youhei
333* quantum/keymap_extras/keymap_unicode_cyrillic.h: kuel
334* quantum/process_keycode/process_chording.c: Jack Humbert
335* quantum/process_keycode/process_chording.h: Jack Humbert
336* quantum/process_keycode/process_leader.c: Jack Humbert
337* quantum/process_keycode/process_leader.h: Jack Humbert
338* quantum/process_keycode/process_midi.h: Jack Humbert
339* quantum/process_keycode/process_music.h: Jack Humbert
340* quantum/process_keycode/process_printer.c: Jack Humbert
341* quantum/process_keycode/process_printer.h: Jack Humbert
342* quantum/process_keycode/process_printer_bb.c: Jack Humbert
343* quantum/serial_link/LICENSE: Fred Sundvik
344* quantum/serial_link/protocol/frame_router.c: Fred Sundvik
345* quantum/serial_link/protocol/frame_router.h: Fred Sundvik
346* quantum/serial_link/protocol/frame_validator.c: Fred Sundvik
347* quantum/serial_link/protocol/frame_validator.h: Fred Sundvik
348* quantum/serial_link/protocol/physical.h: Fred Sundvik
349* quantum/serial_link/protocol/triple_buffered_object.c: Fred Sundvik
350* quantum/serial_link/protocol/triple_buffered_object.h: Fred Sundvik
351* quantum/serial_link/system/serial_link.c: Fred Sundvik
352* quantum/serial_link/system/serial_link.h: Fred Sundvik
353* quantum/serial_link/tests/byte_stuffer_tests.cpp: Fred Sundvik
354* quantum/serial_link/tests/frame_router_tests.cpp: Fred Sundvik
355* quantum/serial_link/tests/frame_validator_tests.cpp: Fred Sundvik
356* quantum/serial_link/tests/Makefile: Fred Sundvik
357* quantum/serial_link/tests/transport_tests.cpp: Fred Sundvik
358* quantum/serial_link/tests/triple_buffered_object_tests.cpp: Fred Sundvik
359* quantum/template/rules.mk: Fred Sundvik
360* quantum/template/keymaps/default/config.h: Jack Humbert
361* quantum/template/keymaps/default/Makefile: Jack Humbert
362* quantum/template/keymaps/default/readme.md: Jack Humbert
363* quantum/tools/eeprom_reset.hex: Jack Humbert
364* quantum/tools/readme.md: Jack Humbert
365* quantum/visualizer/lcd_backlight.c: Fred Sundvik
366* quantum/visualizer/lcd_backlight.h: Fred Sundvik
367* quantum/visualizer/led_test.h: Fred Sundvik
368* quantum/visualizer/LICENSE.md: Fred Sundvik
369* quantum/visualizer/readme.md: Fred Sundvik
370* quantum/visualizer/example_integration/callbacks.c: Fred Sundvik
371* quantum/visualizer/example_integration/gfxconf.h: Fred Sundvik
372* quantum/visualizer/example_integration/lcd_backlight_hal.c: Fred Sundvik
373* quantum/visualizer/example_integration/visualizer_user.c: Fred Sundvik
374
375# All Files
376
377## quantum/analog.c
378
379* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
380
381## quantum/analog.h
382
383* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
384
385## quantum/api.c
386
387* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert
388* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert
389
390## quantum/api.h
391
392* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert
393
394## quantum/config_common.h
395
396* 35a81f5b8b081e1607a7c04489b01f551c3213cc Mon Oct 26 16:32:37 2015 -0400 Jack Humbert
397* aaa758f1d3f97dda39879f2b055ad2da9680adfe Mon May 23 20:42:21 2016 -0700 Eric Tang
398* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
399* 705c775a4a433249081321cea0c2def2627817dc Sun Aug 21 22:05:55 2016 -0500 IBNobody
400* 936a26d04ffa12801031c058f27e221174e3fabd Thu Aug 25 00:15:41 2016 -0500 IBNobody
401* 6390033e8688550826a4bd3004a2e76568600657 Mon Nov 21 20:14:16 2016 -0500 Jack Humbert
402* 03d6e165bb0baf9d0093250d3c3c0771290df4d6 Fri Nov 25 09:17:40 2016 +0200 ofples
403* 0c9d66eb59add717397ba83d508577073412ce86 Fri Nov 25 09:20:41 2016 +0200 ofples
404* de1df639535817e17f1c01f07e7a629cec478526 Sat Nov 26 13:55:41 2016 +0700 Priyadi Iman Nurcahyo
405* 17acde94ee2695ab69ea336742c904d649dce17c Sat Nov 26 14:02:38 2016 +0700 Priyadi Iman Nurcahyo
406* d9d67e7b7686fdcbc7269a76d2a54c42325bdd03 Sat Nov 26 15:26:02 2016 +0700 Priyadi Iman Nurcahyo
407* f2214ce1cb6cfe7a0efabe870a2c00fb8451ee80 Sat Nov 26 15:57:48 2016 +0700 Priyadi Iman Nurcahyo
408* 6e0f994950435aa5867e7b7ce780186d881d74ac Mon Nov 28 23:51:07 2016 -0500 Jack Humbert
409* dd685eceb2045371d38f24d454f1ab08ca7416f4 Thu Dec 29 12:13:30 2016 +0200 Fred Sundvik
410
411## quantum/dynamic_macro.h
412
413* 39e8e61258b51a2c33a94dd877e983f0b1dae0c1 Thu Aug 18 01:37:13 2016 +0200 Wojciech Siewierski
414* 70f32842e5d94f14d05c1f9adcb1b1144a25a132 Sun Oct 9 12:52:39 2016 +0200 Wojciech Siewierski
415
416## quantum/keycode_config.c
417
418* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
419
420## quantum/keycode_config.h
421
422* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
423* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo
424* 558f3ec1eb325caf706efc15e2fab26121aba442 Tue Sep 6 23:19:01 2016 -0500 IBNobody
425
426## quantum/keymap.h
427
428* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
429* 76076db72545bbb649f11394a12721f61579527f Mon Jun 20 22:36:36 2016 -0400 Jack & Erez
430* 1a0bac8bccf0e156d2f3c5f14a7214f9677b6370 Tue Jun 21 17:42:29 2016 -0400 Jack Humbert
431* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
432* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
433* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo
434* 50c686587ed49d8079ba1b11d45ceb6a55d6cd4b Thu Jul 7 23:34:33 2016 -0400 TerryMathews
435* e692ebf86a962e90c51302e7b17a953ea2858f79 Fri Aug 12 20:38:26 2016 +0900 shela
436* 558f3ec1eb325caf706efc15e2fab26121aba442 Tue Sep 6 23:19:01 2016 -0500 IBNobody
437* 1048a588c750e27ff0f900cd6aaf670e034086d0 Fri Oct 7 17:15:11 2016 +0200 npoirey
438* 5b2e455d3b71bfb90754930d1f22d3e8ce98b927 Mon Oct 10 00:46:20 2016 +0700 Priyadi Iman Nurcahyo
439* e27a754b70434de88a37c4a572e4ca5f7730ff58 Wed Oct 12 22:18:27 2016 -0400 Jack & Erez
440* 52d7f7d2770a35adf0b0b0c803e05ae8719f539f Sun Oct 16 15:49:45 2016 -0400 Jack Humbert
441* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert
442* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert
443* 01038ab54ca6c2858ea9e856c717a1129ffe4156 Fri Dec 23 21:51:11 2016 +0200 Ofer Plesser
444* d8a608f3ff4cb4d73cd57be500fd9881e230099d Thu Dec 29 18:28:48 2016 +1100 Wilba6582
445
446## quantum/keymap_common.c
447
448* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
449* 35a81f5b8b081e1607a7c04489b01f551c3213cc Mon Oct 26 16:32:37 2015 -0400 Jack Humbert
450* cc1c32671eb1eb43a87e55ac4ffa60b15115e48d Mon Oct 26 20:02:25 2015 -0400 Jack Humbert
451* d9f08e6177271594fa573993d9f4dbc2d98c7416 Tue Oct 27 22:00:52 2015 -0400 Jack Humbert
452* 18da1e6801335b0d9515ab72e9236a01d629915f Tue Oct 27 23:06:18 2015 -0400 Jack Humbert
453* d3db8d62f6fc6a7dee43978ddc8356579b502b37 Wed Oct 28 04:07:15 2015 +0200 Erez Zukerman
454* 7d6716beded4a60cd9de24e95d8ec60694692b6f Fri Jan 29 23:27:36 2016 -0500 Jack Humbert
455* 65b41e2e59e274354e57ed36cad097823f111f1a Sun Feb 7 11:48:28 2016 +0100 Wojciech Siewierski
456* 47dcec29456106828b83fe5b85fa7a7427ddc710 Sun Jan 3 17:49:28 2016 -0500 Chris Gerber
457* 1d13aa933bbb57bf0c1fe0196981b81233c3df97 Mon Mar 28 19:45:20 2016 -0500 IBNobody
458* 3755ef5ddbdad9f25a53fee951c3eb78035b52c3 Wed Apr 13 20:57:51 2016 -0500 IBNobody
459* ee2ee7f4f049dda385a9db7dddd8e7e91681315b Fri Apr 15 13:44:07 2016 -0400 Jack Humbert
460* 9cfc74c35b940884618b0fe1e6fd25c570e1c974 Thu Apr 7 15:21:06 2016 +0300 Erez Zukerman
461* ab19ebd08a8b955775e6fa94cdf6b8d128d8b43c Sat Apr 16 18:51:58 2016 -0400 Jack Humbert
462* c83aa16f1d614c1c10f7597a67ffb9f2ae871951 Sat Apr 16 20:26:02 2016 -0400 Jack Humbert
463* 41cc35425ab32c9a9492006da8b667d01d32dfa6 Sat Apr 16 21:31:40 2016 -0400 Jack Humbert
464* 8bbd064cf52a76508589579f19595607a1f3af21 Sat Apr 16 23:07:50 2016 -0400 Jack Humbert
465* 45f10b4c4b308226fa1568277654a13853a03ab4 Sat Apr 16 22:10:18 2016 -0500 IBNobody
466* e7b9959819e709d7df2e96a94bdaf36e4e9e23e3 Sat Apr 16 23:15:40 2016 -0400 Jack Humbert
467* a67d425f4d5278595e7ab785a0f246b83fb1a09f Sun Apr 17 01:00:39 2016 -0400 Jack Humbert
468* d5b72e7bde5ede25f7d5699b50b7d9eb6f31ba92 Sun Apr 17 12:54:32 2016 -0500 IBNobody
469* 3103ea542f0039637a1a266df79a97a7a13fa6b4 Sun Apr 17 12:55:19 2016 -0500 IBNobody
470* 23231fa577f7c6c585124226a83f21a7668e62dd Sun Apr 17 14:16:03 2016 -0500 IBNobody
471* 5c98ad59606ee95b82c27bf2525383a9ec88542b Sun Apr 17 20:14:37 2016 -0500 IBNobody
472* e49712b5593b887c8af18aeb7196513f1c7b7bcf Mon Apr 18 21:01:48 2016 -0400 Jack Humbert
473* 620ac4b260fa663d12b11a0b15ac50379523c125 Thu Apr 21 19:35:18 2016 -0700 Eric Tang
474* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
475* 41b3e399b1d43db9574c6016951d92974b3d93e7 Thu May 5 21:50:51 2016 -0400 Jack Humbert
476* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman
477* fde477a927edc6b4207a6968d44aeed021e8b300 Sun May 15 00:51:06 2016 -0400 Jack Humbert
478* b732b79b49b098dba8e14493c745075f336747d8 Wed May 18 23:47:16 2016 -0400 Jack Humbert
479* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert
480* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
481* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo
482* 9870082a06386eba8c0c5f22da90d0256ef6244b Thu Jul 7 19:48:39 2016 +0300 Fred Sundvik
483* 8b94e26d7c3b30cc57d710a11e5651d15e8e3b20 Sun Jul 24 22:07:43 2016 -0400 Jack Humbert
484* d8a608f3ff4cb4d73cd57be500fd9881e230099d Thu Dec 29 18:28:48 2016 +1100 Wilba6582
485
486## quantum/light_ws2812.c
487
488* ba9ac457b2159097ecfd9848c5171c52e3a68260 Sun Jan 24 17:05:47 2016 -0800 Yang Liu
489* 57e08eb8badc5db2fb44d2df684f32ea48cce411 Thu Jul 7 11:33:32 2016 -0400 Jack Humbert
490* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert
491* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert
492* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert
493* 530dd3377e4d409a7ca2fee7e47b60b735ebc0fa Tue Nov 15 13:18:10 2016 -0500 Jack Humbert
494* 3774a7fcdab5544fc787f4c200be05fcd417e31f Thu Nov 17 17:42:14 2016 -0500 Jack Humbert
495
496## quantum/light_ws2812.h
497
498* ba9ac457b2159097ecfd9848c5171c52e3a68260 Sun Jan 24 17:05:47 2016 -0800 Yang Liu
499* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert
500* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert
501* 664c0a036b3d7c3ed39f4a7a78d97f4a9cc7d20c Mon Nov 21 19:50:55 2016 -0500 Jack Humbert
502* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert
503
504## quantum/matrix.c
505
506* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
507* 35a81f5b8b081e1607a7c04489b01f551c3213cc Mon Oct 26 16:32:37 2015 -0400 Jack Humbert
508* 641859df84bf40025b2c14319d1a168a435562e2 Thu Mar 10 11:28:34 2016 -0500 yoyoerx
509* 684793360cdb08ac1e50a6d27e1796fadd527adb Mon May 9 00:36:23 2016 -0400 Jack Humbert
510* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman
511* aaa758f1d3f97dda39879f2b055ad2da9680adfe Mon May 23 20:42:21 2016 -0700 Eric Tang
512* 1ae6011cef2230826a9e6db6c5b638677bc640b7 Tue May 24 08:44:40 2016 -0700 Eric Tang
513* de57799530d3184722532f93d156364067d8fcd5 Sat May 28 11:56:06 2016 -0400 Jack Humbert
514* 008c8d54a0a1a1e908d372d0fe9edb45a2d491e5 Fri Jun 17 22:09:59 2016 -0400 Jack Humbert
515* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
516* 215c2119af5281072d5a6efb0308408793cadd08 Wed Jun 29 16:21:41 2016 -0400 Jack Humbert
517* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo
518* 8e88d55bfd7c88cb15845e0c6415e4e892532861 Mon Jul 4 11:45:58 2016 -0400 Jack Humbert
519* 3577e26fd9916ceab58779ec6323d43da54eb3b5 Wed Jul 6 00:24:31 2016 -0400 Jack Humbert
520* 17170ba76d3c94edcf1ab263520238fdb0384774 Sun Oct 23 23:00:43 2016 -0500 IBNobody
521* 508eddf8ba8548d3f71e1c09a404839beb49f45c Fri Oct 28 14:21:38 2016 -0500 IBNobody
522* 4c6960835c0a6e29670dabdc27117d7d3c7f99f5 Fri Oct 28 16:24:20 2016 -0500 IBNobody
523* 32f88c07173b795c6981c779057dceba00aeb1cb Sat Oct 29 10:39:03 2016 -0500 IBNobody
524* f4030289744fc6dc82dd85c955070c0845813cc5 Sat Oct 29 16:12:58 2016 -0500 IBNobody
525* a06115df19a74d39b08758472b221e630c3680d3 Fri Nov 18 23:20:07 2016 -0500 Jack Humbert
526
527## quantum/pincontrol.h
528
529* 8485bb34d2e291db5b6c81f892850da1cdca37ba Sun Nov 27 22:43:11 2016 -0800 Wez Furlong
530
531## quantum/quantum.c
532
533* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman
534* 15719f3574c6274ee0f3ec87431927c5a523aa3e Sun May 15 00:40:59 2016 -0400 Jack Humbert
535* bf5c2ccee5497523c214dae7aacdc27fdbb0f235 Sun May 15 00:47:25 2016 -0400 Jack Humbert
536* fde477a927edc6b4207a6968d44aeed021e8b300 Sun May 15 00:51:06 2016 -0400 Jack Humbert
537* 0428214b905e5f8b3bed721885957ce249ba4991 Wed May 18 23:14:00 2016 -0400 Jack Humbert
538* b732b79b49b098dba8e14493c745075f336747d8 Wed May 18 23:47:16 2016 -0400 Jack Humbert
539* 0275d444d77c9d85d2189b09d8813fb76dc4d566 Thu May 19 15:36:28 2016 +0300 purpleP
540* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert
541* 1237025963484d70bbe5185a790bec6544653ccc Tue May 24 23:27:59 2016 -0400 Erez Zukerman
542* 8bc69afc633d3e199e3ac0a5bf39e4d255f2ce4a Tue May 24 23:48:46 2016 -0400 Erez Zukerman
543* 17977a7e24ddab6ca101341b33c8fe7ad13e68f5 Sat May 28 15:22:30 2016 -0400 Jack Humbert
544* 1c9f33c06a6ef18c9c21e5841180af5ae554c34b Wed Jun 1 22:49:55 2016 -0400 Jack Humbert
545* 4635b4453335b61df11008fa907eef221db5912b Wed Jun 1 23:00:55 2016 -0400 Jack Humbert
546* 794aed37a0da5a277a07e7fa86263e0852fa9f6d Fri Jun 3 12:48:40 2016 -0700 Eric Tang
547* b70248fa2144d297504eedbc80a76dfdc40d9f1f Fri Jun 17 21:42:59 2016 -0400 Jack Humbert
548* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
549* 76076db72545bbb649f11394a12721f61579527f Mon Jun 20 22:36:36 2016 -0400 Jack & Erez
550* 98f0807359cfa78d25442b91ff4c5bbfc5679661 Tue Jun 21 22:55:54 2016 -0400 Jack Humbert
551* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
552* b68b722325e1f0f68387e161365fa8e31c79b7b2 Thu Jun 23 23:14:21 2016 -0400 Jack Humbert
553* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
554* 197f152dee834a737cd820f2a95d1ade98be4898 Wed Jun 29 18:29:20 2016 -0400 Jack Humbert
555* 60fd885a6e540509baa2193932e15caeaeb8f4c5 Wed Jun 29 18:35:29 2016 -0400 Jack Humbert
556* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo
557* 1412076df68ac00f9a00173977d2826603c12ddf Mon Jul 4 19:56:08 2016 -0700 Smilliam
558* 6b0c9cc905c0985f96a80306cf5fe0d6724b28fc Mon Jul 4 19:58:26 2016 -0700 Smilliam
559* a4bf46f9b1d0a0be0cecb2cd0f0d941aa7c71bd3 Wed Jul 6 22:48:19 2016 -0400 Jack Humbert
560* 50c686587ed49d8079ba1b11d45ceb6a55d6cd4b Thu Jul 7 23:34:33 2016 -0400 TerryMathews
561* f7a86822266603b8ffd21e9f89ec1de8d4950791 Fri Jul 8 03:32:28 2016 -0400 TerryMathews
562* b12fe6abb25db1feca6a7649097a8d1cb67a063f Sun Jul 10 19:04:01 2016 -0700 Smilliam
563* a998a48673372e409991066d7d2d9ba282f79d59 Mon Jul 11 09:14:43 2016 -0400 Jack Humbert
564* a28a6e5b79c819e5f9323f62686498eca3ef399f Wed Jul 13 16:38:02 2016 +0200 Pavlos Vinieratos
565* 857aa5bef6a74f8785a7039feea5286c07bf7067 Sat Aug 13 11:14:42 2016 +0200 Gergely Nagy
566* 644c8c79271db8cf1bd934b9a80a0215585e46e7 Thu Aug 18 01:34:05 2016 +0200 Wojciech Siewierski
567* 0d28787c5cf2173d12f57b397515f91cffaa820a Thu Aug 18 11:29:53 2016 +0200 Gergely Nagy
568* e571d4656cd283ce8d793fe3dd2ac176b84b0bf5 Tue Sep 6 18:02:43 2016 -0500 IBNobody
569* 558f3ec1eb325caf706efc15e2fab26121aba442 Tue Sep 6 23:19:01 2016 -0500 IBNobody
570* 5b2e455d3b71bfb90754930d1f22d3e8ce98b927 Mon Oct 10 00:46:20 2016 +0700 Priyadi Iman Nurcahyo
571* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert
572* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert
573* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert
574* ffa5b1e7ea6697acf9ebfcade1149031642f7870 Sat Nov 19 11:32:09 2016 +0100 Gergely Nagy
575* 74a1f00713d1407fb1d2e20d58da93919ab0c221 Sat Nov 19 18:19:18 2016 +0100 Gergely Nagy
576* 664c0a036b3d7c3ed39f4a7a78d97f4a9cc7d20c Mon Nov 21 19:50:55 2016 -0500 Jack Humbert
577* 450a8fb5b61de8166fe21eb4f57e1c00514afe32 Mon Nov 21 20:17:45 2016 -0500 Jack Humbert
578* cefa8468fb5f28bd67a0c02d371a4aef0964e20c Wed Nov 23 20:16:38 2016 -0500 Jack Humbert
579* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert
580* 01038ab54ca6c2858ea9e856c717a1129ffe4156 Fri Dec 23 21:51:11 2016 +0200 Ofer Plesser
581
582## quantum/quantum.h
583
584* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman
585* fde477a927edc6b4207a6968d44aeed021e8b300 Sun May 15 00:51:06 2016 -0400 Jack Humbert
586* 0428214b905e5f8b3bed721885957ce249ba4991 Wed May 18 23:14:00 2016 -0400 Jack Humbert
587* b732b79b49b098dba8e14493c745075f336747d8 Wed May 18 23:47:16 2016 -0400 Jack Humbert
588* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert
589* de57799530d3184722532f93d156364067d8fcd5 Sat May 28 11:56:06 2016 -0400 Jack Humbert
590* 17977a7e24ddab6ca101341b33c8fe7ad13e68f5 Sat May 28 15:22:30 2016 -0400 Jack Humbert
591* 1c9f33c06a6ef18c9c21e5841180af5ae554c34b Wed Jun 1 22:49:55 2016 -0400 Jack Humbert
592* 794aed37a0da5a277a07e7fa86263e0852fa9f6d Fri Jun 3 12:48:40 2016 -0700 Eric Tang
593* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
594* 98f0807359cfa78d25442b91ff4c5bbfc5679661 Tue Jun 21 22:55:54 2016 -0400 Jack Humbert
595* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
596* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
597* 197f152dee834a737cd820f2a95d1ade98be4898 Wed Jun 29 18:29:20 2016 -0400 Jack Humbert
598* 8125cdb88ce1201fcfd16ed4c5313222ef4c230c Wed Jun 29 18:36:52 2016 -0400 Jack Humbert
599* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo
600* a28a6e5b79c819e5f9323f62686498eca3ef399f Wed Jul 13 16:38:02 2016 +0200 Pavlos Vinieratos
601* e01b4c3fd9a7b66276ffd22dcac25d569d7bb7ff Sat Jul 9 00:41:15 2016 +0300 Fred Sundvik
602* 0d28787c5cf2173d12f57b397515f91cffaa820a Thu Aug 18 11:29:53 2016 +0200 Gergely Nagy
603* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert
604* 664c0a036b3d7c3ed39f4a7a78d97f4a9cc7d20c Mon Nov 21 19:50:55 2016 -0500 Jack Humbert
605* cefa8468fb5f28bd67a0c02d371a4aef0964e20c Wed Nov 23 20:16:38 2016 -0500 Jack Humbert
606* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert
607
608## quantum/quantum_keycodes.h
609
610* d8a608f3ff4cb4d73cd57be500fd9881e230099d Thu Dec 29 18:28:48 2016 +1100 Wilba6582
611* 8459bb97c1e8bcb9ccce55a1ed849d373bd7706c Wed Jan 11 21:57:41 2017 -0500 Erez Zukerman
612* 3717cf5864d6505e406b5eb75f315e6dc2392912 Thu Jan 12 07:38:07 2017 -0500 Erez Zukerman
613* 7288e5ab9c005a7b035d91e68358aa2b6a12420c Fri Jan 13 14:04:51 2017 -0500 Jack Humbert
614
615## quantum/rgblight.c
616
617* ba9ac457b2159097ecfd9848c5171c52e3a68260 Sun Jan 24 17:05:47 2016 -0800 Yang Liu
618* 2647c7cd84820a833b85e41ea86caf76b36e6ee1 Sun Jan 24 17:19:33 2016 -0800 Yang Liu
619* 97f8f378761506914b69d4fd2d5661bfcae28295 Sun Apr 10 21:16:49 2016 -0700 skullY
620* 620ac4b260fa663d12b11a0b15ac50379523c125 Thu Apr 21 19:35:18 2016 -0700 Eric Tang
621* c37d52d2137acf5739c481cc0c8917ad6fd77161 Tue Apr 26 13:48:36 2016 -0400 Jack Humbert
622* e024c11f7a849a38e478cda9fb9939a838cfa2e0 Tue Apr 26 13:50:04 2016 -0400 Jack Humbert
623* 80c87054193b9243670aeb85adefbe1aa6c0fda0 Tue Jun 21 12:53:21 2016 -0400 Jack Humbert
624* 57e08eb8badc5db2fb44d2df684f32ea48cce411 Thu Jul 7 11:33:32 2016 -0400 Jack Humbert
625* 3a860c4bc210857f03ef9fae5043d6d5736d140d Tue Jul 26 14:43:45 2016 -0500 Jordi Orlando
626* 899c88cd8bf024792760fcf3ee8be6fed13fb315 Tue Jul 26 14:46:30 2016 -0500 Jordi Orlando
627* ea2d2f5d5841791745c93ef27cd1528a7fd69c97 Tue Jul 26 15:31:22 2016 -0500 Jordi Orlando
628* b8679bbe045a2285d6ab6bbc420121b26f516b9a Wed Oct 5 20:41:33 2016 -0400 Jack Humbert
629* 9b0e21f87f446935f29254bb623c2cfe29472b6e Sun Oct 9 19:26:16 2016 +0300 Fred Sundvik
630* 92a3a96849aee708753a6623b0db228023e3baf8 Sun Oct 9 19:47:05 2016 +0300 Fred Sundvik
631* ffae9d84c5279b463da112ee15568d536649b819 Sun Oct 9 19:53:41 2016 +0300 Fred Sundvik
632* 03b6fcdaf034392e27752a9bd2c11de06a166e39 Mon Oct 10 00:20:24 2016 -0400 Jack Humbert
633* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert
634* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert
635* 3774a7fcdab5544fc787f4c200be05fcd417e31f Thu Nov 17 17:42:14 2016 -0500 Jack Humbert
636* 285c5a91f23e972d9c579184283443111186329d Thu Nov 17 20:56:36 2016 -0500 Erez Zukerman
637* 2e23689b8e3222982082c1f5a4f8ce7686f9658b Wed Nov 23 18:52:02 2016 -0500 Jack Humbert
638* 4094544d41450617bc21ab58646603b8964eae0e Tue Nov 29 09:23:16 2016 -0500 Erez Zukerman
639* cae269b08b642b07ee06dec7120a784a3c3d7aab Fri Dec 23 10:29:19 2016 -0500 Jack Humbert
640* 748181dccddb8c9fa52a776f4fcd904ddca9aa31 Wed Dec 28 16:29:02 2016 -0500 Scott Wilson
641* b8e74c378b1f118178edf0634d9fa7f0f9dd5e08 Thu Dec 29 09:32:02 2016 -0500 Scott Wilson
642
643## quantum/rgblight.h
644
645* ba9ac457b2159097ecfd9848c5171c52e3a68260 Sun Jan 24 17:05:47 2016 -0800 Yang Liu
646* 2647c7cd84820a833b85e41ea86caf76b36e6ee1 Sun Jan 24 17:19:33 2016 -0800 Yang Liu
647* 620ac4b260fa663d12b11a0b15ac50379523c125 Thu Apr 21 19:35:18 2016 -0700 Eric Tang
648* 80c87054193b9243670aeb85adefbe1aa6c0fda0 Tue Jun 21 12:53:21 2016 -0400 Jack Humbert
649* 57e08eb8badc5db2fb44d2df684f32ea48cce411 Thu Jul 7 11:33:32 2016 -0400 Jack Humbert
650* b8679bbe045a2285d6ab6bbc420121b26f516b9a Wed Oct 5 20:41:33 2016 -0400 Jack Humbert
651* 9b0e21f87f446935f29254bb623c2cfe29472b6e Sun Oct 9 19:26:16 2016 +0300 Fred Sundvik
652* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert
653* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert
654* 3774a7fcdab5544fc787f4c200be05fcd417e31f Thu Nov 17 17:42:14 2016 -0500 Jack Humbert
655* 285c5a91f23e972d9c579184283443111186329d Thu Nov 17 20:56:36 2016 -0500 Erez Zukerman
656* 2e23689b8e3222982082c1f5a4f8ce7686f9658b Wed Nov 23 18:52:02 2016 -0500 Jack Humbert
657* 4094544d41450617bc21ab58646603b8964eae0e Tue Nov 29 09:23:16 2016 -0500 Erez Zukerman
658* cae269b08b642b07ee06dec7120a784a3c3d7aab Fri Dec 23 10:29:19 2016 -0500 Jack Humbert
659* 748181dccddb8c9fa52a776f4fcd904ddca9aa31 Wed Dec 28 16:29:02 2016 -0500 Scott Wilson
660
661## quantum/variable_trace.c
662
663* f519b94be7086852f2afe4ec248786b47968f7ff Sun Nov 6 21:57:26 2016 +0200 Fred Sundvik
664* a377017c95b826d83ac7a46ef176d39a58294b44 Sun Nov 6 22:11:24 2016 +0200 Fred Sundvik
665
666## quantum/variable_trace.h
667
668* a377017c95b826d83ac7a46ef176d39a58294b44 Sun Nov 6 22:11:24 2016 +0200 Fred Sundvik
669* 0ba3e523a7c124e4ce54dfd043dc32e72ad3233b Sun Nov 6 22:44:43 2016 +0200 Fred Sundvik
670
671## quantum/version.h
672
673* None None None
674
675## quantum/api/api_sysex.c
676
677* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert
678* dd685eceb2045371d38f24d454f1ab08ca7416f4 Thu Dec 29 12:13:30 2016 +0200 Fred Sundvik
679
680## quantum/api/api_sysex.h
681
682* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert
683
684## quantum/audio/audio.c
685
686* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
687* 620ac4b260fa663d12b11a0b15ac50379523c125 Thu Apr 21 19:35:18 2016 -0700 Eric Tang
688* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
689* 3f02637f4dd765803671c2611191beb096d60b36 Mon May 9 13:17:15 2016 -0400 Jack Humbert
690* 15719f3574c6274ee0f3ec87431927c5a523aa3e Sun May 15 00:40:59 2016 -0400 Jack Humbert
691* 0428214b905e5f8b3bed721885957ce249ba4991 Wed May 18 23:14:00 2016 -0400 Jack Humbert
692* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert
693* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
694* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert
695
696## quantum/audio/audio.h
697
698* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
699* 082a0f313d8c842a5de7bae30ec8a3597e35880b Fri Apr 22 00:01:38 2016 -0500 IBNobody
700* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
701* 3f02637f4dd765803671c2611191beb096d60b36 Mon May 9 13:17:15 2016 -0400 Jack Humbert
702* 15719f3574c6274ee0f3ec87431927c5a523aa3e Sun May 15 00:40:59 2016 -0400 Jack Humbert
703* 0428214b905e5f8b3bed721885957ce249ba4991 Wed May 18 23:14:00 2016 -0400 Jack Humbert
704* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert
705* 215c2119af5281072d5a6efb0308408793cadd08 Wed Jun 29 16:21:41 2016 -0400 Jack Humbert
706
707## quantum/audio/audio_pwm.c
708
709* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
710* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
711
712## quantum/audio/luts.c
713
714* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
715
716## quantum/audio/luts.h
717
718* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
719
720## quantum/audio/musical_notes.h
721
722* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
723
724## quantum/audio/song_list.h
725
726* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
727* 7d0345ef25b5e1924f1e98c76d78607778e0b17d Sat Jul 30 01:52:33 2016 -0700 JeeBak Kim
728
729## quantum/audio/voices.c
730
731* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
732* e89b806b850ad1b5484176664288b71b0131683e Thu Apr 21 00:40:00 2016 -0400 Jack Humbert
733* 9828aba2a12f03fccbc1095bc8e4918ae58fa31b Thu Apr 21 18:14:25 2016 -0400 Jack Humbert
734* 7b3f212500210ae85063b043952b5b3ef6988ad6 Thu Apr 21 23:10:47 2016 -0400 Jack Humbert
735* 082a0f313d8c842a5de7bae30ec8a3597e35880b Fri Apr 22 00:01:38 2016 -0500 IBNobody
736* b1900c8dde2a68e87aaabd84280a99bf6658ea9f Fri Apr 22 01:02:50 2016 -0400 Jack Humbert
737* a8086126fecbdce1c192036cf1011329d406949d Fri Apr 22 01:04:13 2016 -0400 Jack Humbert
738* a718c53fe77f0b3b4361c850531eee5f23e3e13d Fri Apr 22 11:58:29 2016 -0400 Jack Humbert
739* e7b6bb641c0636c01e3781fe51865fdb20014eeb Mon Apr 25 00:59:47 2016 -0400 Jack Humbert
740* 140b97a1cd226432a8ec647004943698e3d87f0b Tue Apr 26 01:16:47 2016 -0400 Jack Humbert
741* 66e0323881a5a3da65e14daeec41a1e9cfbda431 Fri Apr 29 12:42:55 2016 -0400 Jack Humbert
742* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
743* 0edfe55bfe4afd037918ff73e49552a28f39a5ca Mon Dec 12 15:39:07 2016 -0500 Jack Humbert
744* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert
745* 438a5d685bb7b726ff59109ce4229eca6303cd8e Tue Dec 20 19:38:22 2016 -0500 Jack Humbert
746* 2fa36e38cf28f07ad4a4d74722486921fa7b8706 Wed Dec 21 00:22:32 2016 -0500 Jack Humbert
747
748## quantum/audio/voices.h
749
750* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
751* e89b806b850ad1b5484176664288b71b0131683e Thu Apr 21 00:40:00 2016 -0400 Jack Humbert
752* 9828aba2a12f03fccbc1095bc8e4918ae58fa31b Thu Apr 21 18:14:25 2016 -0400 Jack Humbert
753* 7b3f212500210ae85063b043952b5b3ef6988ad6 Thu Apr 21 23:10:47 2016 -0400 Jack Humbert
754* 082a0f313d8c842a5de7bae30ec8a3597e35880b Fri Apr 22 00:01:38 2016 -0500 IBNobody
755* b1900c8dde2a68e87aaabd84280a99bf6658ea9f Fri Apr 22 01:02:50 2016 -0400 Jack Humbert
756* a8086126fecbdce1c192036cf1011329d406949d Fri Apr 22 01:04:13 2016 -0400 Jack Humbert
757* a718c53fe77f0b3b4361c850531eee5f23e3e13d Fri Apr 22 11:58:29 2016 -0400 Jack Humbert
758* e7b6bb641c0636c01e3781fe51865fdb20014eeb Mon Apr 25 00:59:47 2016 -0400 Jack Humbert
759* 140b97a1cd226432a8ec647004943698e3d87f0b Tue Apr 26 01:16:47 2016 -0400 Jack Humbert
760* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
761* 0edfe55bfe4afd037918ff73e49552a28f39a5ca Mon Dec 12 15:39:07 2016 -0500 Jack Humbert
762* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert
763* 438a5d685bb7b726ff59109ce4229eca6303cd8e Tue Dec 20 19:38:22 2016 -0500 Jack Humbert
764
765## quantum/audio/wave.h
766
767* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
768
769## quantum/keymap_extras/keymap_bepo.h
770
771* 7c33f8493fb4ecd664390232c8de856158f9fcae Sun Feb 7 19:29:49 2016 +0100 Didier Loiseau
772* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
773* 7b4d30ee50aa534a973473c715924964991739f0 Sun Jul 24 10:57:49 2016 +0200 Vivien Alger
774
775## quantum/keymap_extras/keymap_br_abnt2.h
776
777* 7aa31ad338325477199f752ac3e344a6ab9b27d0 Tue Nov 8 13:32:04 2016 -0200 Potiguar Faga
778
779## quantum/keymap_extras/keymap_canadian_multilingual.h
780
781* a7cef2ca0a2322448d02008337013936b1d550ec Wed Feb 17 21:45:38 2016 +0100 Didier Loiseau
782* 7840e69bfaee1d67de273c235b532d6f20c905a9 Thu Feb 18 00:47:23 2016 +0100 Didier Loiseau
783* 911222892ecb1c01551e0abdfbe98ed1dbf82139 Fri Feb 26 00:55:39 2016 +0100 Didier Loiseau
784* 3a91ddb0745ae0f52007984793ea1b48abb2098c Tue Mar 1 22:59:38 2016 +0100 Didier Loiseau
785* aa5eb49edd993e2abe3adf814e030fcdda4a3596 Wed Mar 2 00:22:41 2016 +0100 Didier Loiseau
786* 1aeb59335f2fe67613df25308a630ca453975ac0 Sun Sep 11 02:19:55 2016 +0200 Didier Loiseau
787
788## quantum/keymap_extras/keymap_colemak.h
789
790* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
791* 39915b1748cefd99f841fa03b7f6e7c20439fbcf Thu Oct 29 15:12:51 2015 -0400 Jack Humbert
792* 3c683aa9f23288ddada760fb49abcc5fa7324f5e Fri Feb 5 16:28:24 2016 +0200 Erez Zukerman
793* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
794
795## quantum/keymap_extras/keymap_dvorak.h
796
797* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
798* 233af3a41c69d456583bfcfd897233b9c117caa6 Mon Feb 22 13:06:26 2016 -0500 Keller-Laminar
799* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
800* 4278d8861526ed285d9d00badcdc8c121454be60 Thu Jul 14 11:32:43 2016 -0500 Jonathan A. Kollasch
801* f0021c9cb9e30d47d5a3ab5ec75e59e626c3d244 Mon Sep 19 14:25:44 2016 -0500 Jonathan A. Kollasch
802
803## quantum/keymap_extras/keymap_dvp.h
804
805* 6e003b1e3fa844cfde0069004e755aae7a9539f3 Wed Oct 19 23:45:55 2016 +0300 Artyom Mironov
806
807## quantum/keymap_extras/keymap_fr_ch.h
808
809* 1934e8a270820ff6f08c95f4399b26162623e4e0 Sat Feb 20 14:01:28 2016 +0100 Vincent Pochet
810* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
811* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
812
813## quantum/keymap_extras/keymap_french.h
814
815* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
816* 4a19cc054dc7aeb0a35613d608143bf51fa791cc Sat Feb 27 15:22:54 2016 +0100 Kévin Letord
817* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
818* 010dd1308420e25b327fa4d5d6b13f67a849408b Thu Jul 14 11:04:25 2016 -0500 Jonathan A. Kollasch
819* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
820
821## quantum/keymap_extras/keymap_french_osx.h
822
823* 48eff6dd89672c6c71afd8a3d1cdc5d35b0bf768 Tue Jan 5 10:49:36 2016 +0100 Sébastien Pérochon
824* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
825
826## quantum/keymap_extras/keymap_german.h
827
828* 3dbcad51d1217b32c3c17917c2646fa7a9a9165b Sat Dec 19 01:22:12 2015 +0100 Matthias Schmitt
829* da09312dd56e3b085fb217cc7cc2abf06f401992 Tue Jan 19 20:04:08 2016 +0100 plgruener
830* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
831* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
832
833## quantum/keymap_extras/keymap_german_ch.h
834
835* 465aabe11dbd673fb4c68ecbffbfb062273def1a Wed May 18 21:22:04 2016 +0200 heartsekai
836* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
837* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
838
839## quantum/keymap_extras/keymap_german_osx.h
840
841* e44c30f2030dd4c481a6e38e9392f147be7b0ae2 Fri Jan 15 15:55:00 2016 +0100 Stephan Bösebeck
842* bfc6eca44aeb3ad22a1c37206005dcfe617431cd Mon Mar 14 13:35:34 2016 +0100 Daniel Kriesten
843* dbd4ab3457dd001ab4bbcec14315047b815f7dfe Thu Mar 31 23:15:59 2016 +0200 Stephan Bösebeck
844* 6d40f7c5060f608068b0c4fc90871687c70b4f05 Sun Apr 17 22:19:47 2016 +0200 Stephan Bösebeck
845* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
846* 1a0bac8bccf0e156d2f3c5f14a7214f9677b6370 Tue Jun 21 17:42:29 2016 -0400 Jack Humbert
847
848## quantum/keymap_extras/keymap_jp.h
849
850* 2febf9b9f7d610fc2eca666a842272cb90a87919 Tue Nov 22 20:40:12 2016 +0900 h-youhei
851
852## quantum/keymap_extras/keymap_neo2.h
853
854* 7b7870bae178c80138be5c587238fdedeb837df9 Sat Dec 19 01:41:23 2015 +0100 Matthias Schmitt
855* 4ca43225011ac94bd0a7976baf7f84059274dfbf Fri Feb 19 21:04:30 2016 +0100 plgruener
856* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
857* e329729d3a11b5798f4e2b9f65ac9bc2dcc84a9e Tue Jun 21 18:32:28 2016 -0400 Jack Humbert
858
859## quantum/keymap_extras/keymap_nordic.h
860
861* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
862* c29ad125a7a58d5a2ced0a619165204136da9019 Fri Feb 5 01:50:54 2016 +0100 Fernando Mendonca
863* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
864* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
865* 283ebbe14298fe75128765fa42c46f02534fb761 Mon Jul 25 12:50:27 2016 +0200 Andreas Lindhé
866* 555e41d9e5f8d393637898e2c77c64066b648245 Fri Dec 2 13:03:51 2016 -0500 Erez Zukerman
867
868## quantum/keymap_extras/keymap_norwegian.h
869
870* e329729d3a11b5798f4e2b9f65ac9bc2dcc84a9e Tue Jun 21 18:32:28 2016 -0400 Jack Humbert
871* b6fa762234fb5a3590d0ff91ffdf5aa3ae322c8f Mon Jul 25 11:29:54 2016 +0200 Andreas Lindhé
872
873## quantum/keymap_extras/keymap_plover.h
874
875* 7ccfaf750d08bdb3a25ef2869cac251b7cd4d3ad Sat Apr 23 18:49:10 2016 +0100 James ‘Twey’ Kay
876* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
877
878## quantum/keymap_extras/keymap_russian.h
879
880* c5ee24a6c3ea39e9725dfc276c92d5bce726ca78 Sun Aug 7 11:01:12 2016 -0500 kuel
881* 2a0121a78643b1dc774d82352f8c9e246010803e Sun Aug 7 11:07:38 2016 -0500 kuel
882
883## quantum/keymap_extras/keymap_spanish.h
884
885* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
886* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
887* 132c04746910f7230b63ed33717c4ed65599ed1b Sat Jul 2 10:26:04 2016 +0200 Rubén Díaz-Jorge
888* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
889
890## quantum/keymap_extras/keymap_uk.h
891
892* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
893* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
894* 010dd1308420e25b327fa4d5d6b13f67a849408b Thu Jul 14 11:04:25 2016 -0500 Jonathan A. Kollasch
895* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
896
897## quantum/keymap_extras/keymap_unicode_cyrillic.h
898
899* c5ee24a6c3ea39e9725dfc276c92d5bce726ca78 Sun Aug 7 11:01:12 2016 -0500 kuel
900
901## quantum/process_keycode/process_chording.c
902
903* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
904
905## quantum/process_keycode/process_chording.h
906
907* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
908
909## quantum/process_keycode/process_leader.c
910
911* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
912
913## quantum/process_keycode/process_leader.h
914
915* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
916
917## quantum/process_keycode/process_midi.c
918
919* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
920* 8b94e26d7c3b30cc57d710a11e5651d15e8e3b20 Sun Jul 24 22:07:43 2016 -0400 Jack Humbert
921* 8d99140d1b80bf497b2198138d3f481e93b0fbab Thu Sep 29 14:46:10 2016 -0500 Adam Gausmann
922
923## quantum/process_keycode/process_midi.h
924
925* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
926
927## quantum/process_keycode/process_music.c
928
929* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
930* 3ea738e450e9326b0d3ee4192da881cffb4c13c1 Sun Jul 24 10:00:39 2016 -0400 Robert Dale
931* ae95834f5af7404c04e6fe3446019046278d814b Mon Dec 12 16:06:41 2016 -0500 Jack Humbert
932* 273faa4d9cd5a84207548f83ba550c9efee90933 Fri Dec 23 20:59:00 2016 -0500 Jack Humbert
933* 841d7e6a1d74b1fc45575ed551132ec27353ebf3 Mon Jan 23 13:55:24 2017 -0500 Jack Humbert
934
935## quantum/process_keycode/process_music.h
936
937* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
938
939## quantum/process_keycode/process_printer.c
940
941* a889b899e2cf52b3b7807d8a7ad39f12e0761a10 Sun Oct 16 16:03:56 2016 -0400 Jack Humbert
942
943## quantum/process_keycode/process_printer.h
944
945* a889b899e2cf52b3b7807d8a7ad39f12e0761a10 Sun Oct 16 16:03:56 2016 -0400 Jack Humbert
946
947## quantum/process_keycode/process_printer_bb.c
948
949* a889b899e2cf52b3b7807d8a7ad39f12e0761a10 Sun Oct 16 16:03:56 2016 -0400 Jack Humbert
950
951## quantum/process_keycode/process_tap_dance.c
952
953* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
954* 1a7e954f9fc4d250ba1ae46e3bfc168aca2b5cce Wed Jul 13 00:20:28 2016 +0200 Pavlos Vinieratos
955* f3b56701ed7e6c622dc48e429780124ba5fde172 Wed Jul 13 16:47:45 2016 +0200 Pavlos Vinieratos
956* d3091faf363afc8fef73ddf4948f872439b0e827 Fri Jul 15 23:54:08 2016 +0200 Pavlos Vinieratos
957* dda2fd6ff3984ed96f8275c661b47a0484f9ee18 Mon Jul 18 23:34:02 2016 +0200 Pavlos Vinieratos
958* d5daec2a58019ebdb9804787e0f786e4fc3c05b9 Tue Jul 19 18:00:59 2016 +0200 Pavlos Vinieratos
959* 4e6a8627d8ebd7af942f68142d1a959d60361d90 Tue Jul 19 18:02:13 2016 +0200 Pavlos Vinieratos
960* 70e42489dec375e558d8e81ed5ebfb69b4f3dbd9 Wed Jul 20 10:22:52 2016 +0200 Gergely Nagy
961* ce8cc9219fca5dde077f1142d03d011b38d27479 Wed Jul 20 11:34:45 2016 +0200 Gergely Nagy
962* 44e16ffc80620b61eaa17aedcfdd8233d9c99bd9 Wed Jul 20 11:49:59 2016 +0200 Gergely Nagy
963* b21e8b97acb722bfa7b85831cfd010716ed77962 Wed Jul 27 08:42:09 2016 +0200 Gergely Nagy
964* d78058cc75a9b05a6885991506d5f807ebb2a9f9 Wed Aug 17 10:28:08 2016 +0200 Gergely Nagy
965* 29f64d7a93d941167c6c6e95f893ab84586b2205 Wed Aug 17 13:04:50 2016 +0200 Gergely Nagy
966* 0d28787c5cf2173d12f57b397515f91cffaa820a Thu Aug 18 11:29:53 2016 +0200 Gergely Nagy
967* acda2b793f69c6e0e9b9667e9ebe8a0325eb5ecd Thu Sep 1 08:32:47 2016 +0200 Gergely Nagy
968* e1f131db8e59c6ed3471906d3a62457d593f51af Wed Sep 21 10:11:42 2016 +0200 Pavlos Vinieratos
969
970## quantum/process_keycode/process_tap_dance.h
971
972* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
973* f3b56701ed7e6c622dc48e429780124ba5fde172 Wed Jul 13 16:47:45 2016 +0200 Pavlos Vinieratos
974* d3091faf363afc8fef73ddf4948f872439b0e827 Fri Jul 15 23:54:08 2016 +0200 Pavlos Vinieratos
975* 70e42489dec375e558d8e81ed5ebfb69b4f3dbd9 Wed Jul 20 10:22:52 2016 +0200 Gergely Nagy
976* ce8cc9219fca5dde077f1142d03d011b38d27479 Wed Jul 20 11:34:45 2016 +0200 Gergely Nagy
977* b21e8b97acb722bfa7b85831cfd010716ed77962 Wed Jul 27 08:42:09 2016 +0200 Gergely Nagy
978* 29f64d7a93d941167c6c6e95f893ab84586b2205 Wed Aug 17 13:04:50 2016 +0200 Gergely Nagy
979* 0edc82f0300924394324e2f3c4d2f8f0008439db Wed Sep 21 11:29:34 2016 +0200 Pavlos Vinieratos
980* cda4b534fa4921c2d8f9884aa6a144333e7b07c4 Wed Sep 21 11:29:43 2016 +0200 Pavlos Vinieratos
981
982## quantum/process_keycode/process_unicode.c
983
984* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
985* 8bdf745909bc2581491acce11225f56a85bc8f24 Sat Aug 13 10:33:47 2016 +0200 Gergely Nagy
986* 63e5782d2cdf0ee282ad434c773463d9da9db6b3 Sat Aug 13 10:43:22 2016 +0200 Gergely Nagy
987* fa06a163607e8c6c4bd0968c2de96a9a298b777c Sat Aug 13 10:46:38 2016 +0200 Gergely Nagy
988* 0b6861827faea747345ea38202d64c8004ab128c Sat Aug 13 11:11:22 2016 +0200 Gergely Nagy
989* 857aa5bef6a74f8785a7039feea5286c07bf7067 Sat Aug 13 11:14:42 2016 +0200 Gergely Nagy
990* 234dd276cf03be6fd6961473e9d9c8f35deec682 Sun Aug 14 10:37:51 2016 +0200 Gergely Nagy
991* a312cbf712764277e0dbbbb99410c2f6fc6c7484 Sun Aug 14 14:34:52 2016 +0200 Gergely Nagy
992* 43d08629cf275d0b32281ffe8785258fff226b49 Mon Aug 15 10:02:05 2016 +0200 Gergely Nagy
993* e8845f0daf8dc7a7674dc5420cc5a684bbbea09b Mon Aug 15 10:07:13 2016 +0200 Gergely Nagy
994* dffdeb50b79d3c623e2ed9fd1c1d82d6d0ae7bf0 Sun Aug 21 20:25:19 2016 +0200 coderkun
995* 81594c7883deefedbcd317c72c1b1f1d32e65cd7 Sun Aug 21 21:02:18 2016 +0200 coderkun
996* a058ae40e268b34ba5db45f5fd5d557d50fa5437 Wed Aug 24 15:39:23 2016 +0200 Gergely Nagy
997* c9ea236fc35d350c0ff33de0af84d3dee7d0eb95 Wed Aug 31 08:21:52 2016 +0200 Gergely Nagy
998* a3f5a4cf5839fe29dd37400d72c5e353812002f8 Sun Oct 2 10:35:09 2016 +0200 coderkun
999* 5b2e455d3b71bfb90754930d1f22d3e8ce98b927 Mon Oct 10 00:46:20 2016 +0700 Priyadi Iman Nurcahyo
1000* e7d5dc89f2890007d776f6b613dc9deb473cff22 Sun Oct 23 05:36:26 2016 +0700 Priyadi Iman Nurcahyo
1001* 4a666c201007eacf13a9031e3c9b156e2e04afe6 Sun Oct 23 19:15:33 2016 +0700 Priyadi Iman Nurcahyo
1002* 8d60354d5a116b6cb1fc32eac7461eb125543c7d Wed Oct 26 00:48:44 2016 -0400 Jack Humbert
1003* 30b80a23f3cafd846937b37b249f2df4411e1f5a Mon Jan 9 02:59:10 2017 +0700 Priyadi Iman Nurcahyo
1004
1005## quantum/process_keycode/process_unicode.h
1006
1007* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
1008* 63e5782d2cdf0ee282ad434c773463d9da9db6b3 Sat Aug 13 10:43:22 2016 +0200 Gergely Nagy
1009* fa06a163607e8c6c4bd0968c2de96a9a298b777c Sat Aug 13 10:46:38 2016 +0200 Gergely Nagy
1010* 857aa5bef6a74f8785a7039feea5286c07bf7067 Sat Aug 13 11:14:42 2016 +0200 Gergely Nagy
1011* 234dd276cf03be6fd6961473e9d9c8f35deec682 Sun Aug 14 10:37:51 2016 +0200 Gergely Nagy
1012* a312cbf712764277e0dbbbb99410c2f6fc6c7484 Sun Aug 14 14:34:52 2016 +0200 Gergely Nagy
1013* 43d08629cf275d0b32281ffe8785258fff226b49 Mon Aug 15 10:02:05 2016 +0200 Gergely Nagy
1014* e8845f0daf8dc7a7674dc5420cc5a684bbbea09b Mon Aug 15 10:07:13 2016 +0200 Gergely Nagy
1015* a058ae40e268b34ba5db45f5fd5d557d50fa5437 Wed Aug 24 15:39:23 2016 +0200 Gergely Nagy
1016* c9ea236fc35d350c0ff33de0af84d3dee7d0eb95 Wed Aug 31 08:21:52 2016 +0200 Gergely Nagy
1017* 5b2e455d3b71bfb90754930d1f22d3e8ce98b927 Mon Oct 10 00:46:20 2016 +0700 Priyadi Iman Nurcahyo
1018* 4a666c201007eacf13a9031e3c9b156e2e04afe6 Sun Oct 23 19:15:33 2016 +0700 Priyadi Iman Nurcahyo
1019* 6fee7e178f7c949213a124d78de60bc30267d367 Sat Nov 26 23:53:15 2016 +0700 Priyadi Iman Nurcahyo
1020
1021## quantum/serial_link/LICENSE
1022
1023* 639cdd363e35c13fe331939d0972aa4db5f5198d Tue Jul 5 23:27:47 2016 +0300 Fred Sundvik
1024
1025## quantum/serial_link/README.md
1026
1027* 639cdd363e35c13fe331939d0972aa4db5f5198d Tue Jul 5 23:27:47 2016 +0300 Fred Sundvik
1028* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1029
1030## quantum/serial_link/protocol/byte_stuffer.c
1031
1032* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1033* 0a11460175d6a838c71343c19eb4ce4699936247 Wed Aug 24 22:23:17 2016 +0300 Fred Sundvik
1034
1035## quantum/serial_link/protocol/byte_stuffer.h
1036
1037* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1038* 0a11460175d6a838c71343c19eb4ce4699936247 Wed Aug 24 22:23:17 2016 +0300 Fred Sundvik
1039
1040## quantum/serial_link/protocol/frame_router.c
1041
1042* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1043
1044## quantum/serial_link/protocol/frame_router.h
1045
1046* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1047
1048## quantum/serial_link/protocol/frame_validator.c
1049
1050* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1051
1052## quantum/serial_link/protocol/frame_validator.h
1053
1054* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1055
1056## quantum/serial_link/protocol/physical.h
1057
1058* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1059
1060## quantum/serial_link/protocol/transport.c
1061
1062* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1063* bcdf9ab76bf3723e6015d4255d53e7c1e7259b61 Sat Aug 27 14:18:49 2016 +0300 Fred Sundvik
1064
1065## quantum/serial_link/protocol/transport.h
1066
1067* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1068* bcdf9ab76bf3723e6015d4255d53e7c1e7259b61 Sat Aug 27 14:18:49 2016 +0300 Fred Sundvik
1069
1070## quantum/serial_link/protocol/triple_buffered_object.c
1071
1072* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1073
1074## quantum/serial_link/protocol/triple_buffered_object.h
1075
1076* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1077
1078## quantum/serial_link/system/serial_link.c
1079
1080* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1081
1082## quantum/serial_link/system/serial_link.h
1083
1084* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1085
1086## quantum/serial_link/tests/byte_stuffer_tests.cpp
1087
1088* 0a11460175d6a838c71343c19eb4ce4699936247 Wed Aug 24 22:23:17 2016 +0300 Fred Sundvik
1089
1090## quantum/serial_link/tests/frame_router_tests.cpp
1091
1092* cdd0913bcc63334fa20f1a7bd46bdce4d4f2843b Sat Aug 27 13:43:46 2016 +0300 Fred Sundvik
1093
1094## quantum/serial_link/tests/frame_validator_tests.cpp
1095
1096* b3eba797af74ace19b9f2e762bdd33d9449e3f94 Sat Aug 27 13:54:16 2016 +0300 Fred Sundvik
1097
1098## quantum/serial_link/tests/Makefile
1099
1100* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
1101
1102## quantum/serial_link/tests/rules.mk
1103
1104* 0a11460175d6a838c71343c19eb4ce4699936247 Wed Aug 24 22:23:17 2016 +0300 Fred Sundvik
1105* cdd0913bcc63334fa20f1a7bd46bdce4d4f2843b Sat Aug 27 13:43:46 2016 +0300 Fred Sundvik
1106* b3eba797af74ace19b9f2e762bdd33d9449e3f94 Sat Aug 27 13:54:16 2016 +0300 Fred Sundvik
1107* bcdf9ab76bf3723e6015d4255d53e7c1e7259b61 Sat Aug 27 14:18:49 2016 +0300 Fred Sundvik
1108* ffb0a126f5b2484eda7f6b1c62ea61924eec6521 Sat Aug 27 14:25:52 2016 +0300 Fred Sundvik
1109
1110## quantum/serial_link/tests/testlist.mk
1111
1112* 6d7cd639a5e4503f00162c7cfa4bc7302b82c71c Sun Aug 21 16:29:54 2016 +0300 Fred Sundvik
1113* ffb0a126f5b2484eda7f6b1c62ea61924eec6521 Sat Aug 27 14:25:52 2016 +0300 Fred Sundvik
1114
1115## quantum/serial_link/tests/transport_tests.cpp
1116
1117* bcdf9ab76bf3723e6015d4255d53e7c1e7259b61 Sat Aug 27 14:18:49 2016 +0300 Fred Sundvik
1118
1119## quantum/serial_link/tests/triple_buffered_object_tests.cpp
1120
1121* ffb0a126f5b2484eda7f6b1c62ea61924eec6521 Sat Aug 27 14:25:52 2016 +0300 Fred Sundvik
1122
1123## quantum/template/config.h
1124
1125* 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b Tue Oct 27 14:33:18 2015 -0400 Jack Humbert
1126* 24f2698fba0055128eb90fbde793e3c84900df69 Sat Jan 23 20:45:52 2016 -0500 Jack Humbert
1127* 577971ab07a49405e1dcd8e5f75b3ecb87e710b9 Mon Mar 28 00:03:21 2016 -0500 IBNobody
1128* 1d13aa933bbb57bf0c1fe0196981b81233c3df97 Mon Mar 28 19:45:20 2016 -0500 IBNobody
1129* aaa758f1d3f97dda39879f2b055ad2da9680adfe Mon May 23 20:42:21 2016 -0700 Eric Tang
1130* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
1131
1132## quantum/template/Makefile
1133
1134* 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b Tue Oct 27 14:33:18 2015 -0400 Jack Humbert
1135* 6485c7d7dae01c499a7e1f27e7956f12ce0f6901 Thu Nov 5 12:07:03 2015 -0500 Jack Humbert
1136* 24f2698fba0055128eb90fbde793e3c84900df69 Sat Jan 23 20:45:52 2016 -0500 Jack Humbert
1137* 577971ab07a49405e1dcd8e5f75b3ecb87e710b9 Mon Mar 28 00:03:21 2016 -0500 IBNobody
1138* 0656f2fa10e25e160617c3e5d14cfbae35dd9c8d Fri Apr 29 22:19:40 2016 -0400 Jack Humbert
1139* 38987d4c1589d2d457459f42e179be24b712be30 Sat May 28 12:05:17 2016 -0400 Jack Humbert
1140* d9e4dad0a828a8a904f44dda090a4d6d08fe2948 Sat Jun 11 13:31:31 2016 -0400 Jack Humbert
1141* a8375fa15a6ca9285eb15ae89bcda898349e06f8 Tue Jun 21 10:21:43 2016 -0400 Jack Humbert
1142* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
1143* ab4d7adbb96fa034fd20364247d615f527661594 Fri Aug 19 09:06:28 2016 +0300 Fred Sundvik
1144
1145## quantum/template/readme.md
1146
1147* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
1148* 1f5838a28679975f689e35471a35720ed5c7e7c5 Sat Aug 27 23:29:37 2016 +0300 Fred Sundvik
1149
1150## quantum/template/rules.mk
1151
1152* ab4d7adbb96fa034fd20364247d615f527661594 Fri Aug 19 09:06:28 2016 +0300 Fred Sundvik
1153
1154## quantum/template/template.c
1155
1156* 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b Tue Oct 27 14:33:18 2015 -0400 Jack Humbert
1157* 641859df84bf40025b2c14319d1a168a435562e2 Thu Mar 10 11:28:34 2016 -0500 yoyoerx
1158* eba9a7d74db0be548cddc107f0370dabf43b017f Tue Mar 15 23:52:51 2016 -0500 IBNobody
1159* ec62d9e85cab5cf166241b0536120d005fa7c898 Tue Mar 22 20:39:05 2016 -0500 IBNobody
1160* 3d56ec052ed485d4b717da930c4024b4a3f792e0 Tue Mar 22 21:06:22 2016 -0500 IBNobody
1161* 2181be029e01d9cf46ae3cadcdf25f5bca02c631 Mon Mar 28 16:13:37 2016 +0200 Damien Pollet
1162* 0656f2fa10e25e160617c3e5d14cfbae35dd9c8d Fri Apr 29 22:19:40 2016 -0400 Jack Humbert
1163* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman
1164* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
1165* 589df84d6cd19ad7d776cc19bcddade1cd178ddc Thu Jul 7 09:58:44 2016 -0400 Jack Humbert
1166* c1dfb636ef61159456bdb24f4fee3f27e5babbeb Thu Jul 7 12:22:10 2016 -0400 Jack Humbert
1167
1168## quantum/template/template.h
1169
1170* 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b Tue Oct 27 14:33:18 2015 -0400 Jack Humbert
1171* 24f2698fba0055128eb90fbde793e3c84900df69 Sat Jan 23 20:45:52 2016 -0500 Jack Humbert
1172* ee1b94045e5bebda517119cb1853b0ab3fd0f499 Fri Mar 4 10:53:58 2016 -0500 Noah Andrews
1173* 641859df84bf40025b2c14319d1a168a435562e2 Thu Mar 10 11:28:34 2016 -0500 yoyoerx
1174* eba9a7d74db0be548cddc107f0370dabf43b017f Tue Mar 15 23:52:51 2016 -0500 IBNobody
1175* ec62d9e85cab5cf166241b0536120d005fa7c898 Tue Mar 22 20:39:05 2016 -0500 IBNobody
1176* 2181be029e01d9cf46ae3cadcdf25f5bca02c631 Mon Mar 28 16:13:37 2016 +0200 Damien Pollet
1177* 0656f2fa10e25e160617c3e5d14cfbae35dd9c8d Fri Apr 29 22:19:40 2016 -0400 Jack Humbert
1178* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman
1179* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
1180* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
1181
1182## quantum/template/keymaps/default/config.h
1183
1184* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
1185
1186## quantum/template/keymaps/default/keymap.c
1187
1188* d9e4dad0a828a8a904f44dda090a4d6d08fe2948 Sat Jun 11 13:31:31 2016 -0400 Jack Humbert
1189* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
1190
1191## quantum/template/keymaps/default/Makefile
1192
1193* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
1194
1195## quantum/template/keymaps/default/readme.md
1196
1197* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
1198
1199## quantum/tools/eeprom_reset.hex
1200
1201* 0b0ec82427aff54481103559066213056b6d7598 Sat Apr 16 00:01:22 2016 -0400 Jack Humbert
1202
1203## quantum/tools/readme.md
1204
1205* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
1206
1207## quantum/visualizer/lcd_backlight.c
1208
1209* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
1210
1211## quantum/visualizer/lcd_backlight.h
1212
1213* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
1214
1215## quantum/visualizer/led_test.c
1216
1217* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik
1218* 07d0d5cbe48d7afaf0bc8c9916d40179ec51cb42 Thu Jul 7 12:46:10 2016 +0300 Fred Sundvik
1219
1220## quantum/visualizer/led_test.h
1221
1222* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik
1223
1224## quantum/visualizer/LICENSE.md
1225
1226* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
1227
1228## quantum/visualizer/readme.md
1229
1230* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
1231
1232## quantum/visualizer/visualizer.c
1233
1234* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
1235* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik
1236* 70797bb8f21c72cba15b314b2d0a6684bfedc369 Thu Jul 7 00:20:20 2016 +0300 Fred Sundvik
1237* 7229751ba9d402b2a6c9dc1b7b29385b5162fe41 Thu Jul 7 14:01:20 2016 +0300 Fred Sundvik
1238* dae7c9bfb3325412c542fbbe4342c9c8e0fc1904 Thu Jul 7 14:12:56 2016 +0300 Fred Sundvik
1239* 9eb8d05246fba4f46c04b8fa1884b8f2d2ee0664 Tue Jan 17 21:47:07 2017 -0500 SjB
1240
1241## quantum/visualizer/visualizer.h
1242
1243* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
1244* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik
1245* 70797bb8f21c72cba15b314b2d0a6684bfedc369 Thu Jul 7 00:20:20 2016 +0300 Fred Sundvik
1246* 9eb8d05246fba4f46c04b8fa1884b8f2d2ee0664 Tue Jan 17 21:47:07 2017 -0500 SjB
1247
1248## quantum/visualizer/visualizer.mk
1249
1250* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
1251* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik
1252* 70797bb8f21c72cba15b314b2d0a6684bfedc369 Thu Jul 7 00:20:20 2016 +0300 Fred Sundvik
1253* 07d0d5cbe48d7afaf0bc8c9916d40179ec51cb42 Thu Jul 7 12:46:10 2016 +0300 Fred Sundvik
1254* 7229751ba9d402b2a6c9dc1b7b29385b5162fe41 Thu Jul 7 14:01:20 2016 +0300 Fred Sundvik
1255* aaac254ebce2005272e7385488b5690bbbe6d7c8 Thu Jul 7 14:29:53 2016 +0300 Fred Sundvik
1256* caedec92d2c22480313c43a364408fb920c55364 Thu Jul 7 14:42:16 2016 +0300 Fred Sundvik
1257
1258## quantum/visualizer/example_integration/callbacks.c
1259
1260* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
1261
1262## quantum/visualizer/example_integration/gfxconf.h
1263
1264* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
1265
1266## quantum/visualizer/example_integration/lcd_backlight_hal.c
1267
1268* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
1269
1270## quantum/visualizer/example_integration/visualizer_user.c
1271
1272* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik \ No newline at end of file
diff --git a/docs/License-Clarification.md b/docs/License-Clarification.md
new file mode 100644
index 000000000..cf30619b9
--- /dev/null
+++ b/docs/License-Clarification.md
@@ -0,0 +1,38 @@
1# Overview
2
3As raised in #1038 and other issues, the licensing status of QMK is not clear. In an effort to remove ambiguity and to clarify the licensing status of the quantum code we are identifying the providence of our source code files and clarifying what license applies to each one.
4
5# Signoff
6
7This section documents the people who need to sign off on applying the GPL to one or more of their contributions. If your name appears below and you consent to applying the GPL to your contributions, please put today's date in the last field of your row. Please stick to the following date format: 2017 Jan 28
8
9Username | Files | Sign Off Date |
10---------|-------|---------------|
11@0xdec | quantum/rgblight.c | 2017 Jan 29 |
12@algernon | quantum/quantum.c<br>quantum/quantum.h<br>quantum/process_keycode/process_tap_dance.c<br>quantum/process_keycode/process_tap_dance.h<br>quantum/process_keycode/process_unicode.c<br>quantum/process_keycode/process_unicode.h | 2017 Jan 29 |
13@cdlm | quantum/template/template.c<br>quantum/template/template.h | 2017 Feb 03 |
14@DidierLoiseau | quantum/keymap_extras/keymap_canadian_multilingual.h<br>quantum/keymap_extras/keymap_bepo.h |2017 Jan 29 |
15@eltang | quantum/config_common.h<br>quantum/matrix.c<br>quantum/quantum.c<br>quantum/quantum.h<br>quantum/rgblight.c<br>quantum/rgblight.h<br>quantum/template/config.h | 2017 Feb 28 |
16@ezuk | quantum/matrix.c<br>quantum/quantum.c<br>quantum/quantum.h<br>quantum/quantum_keycodes.h<br>quantum/rgblight.c<br>quantum/rgblight.h<br>quantum/keymap_extras/keymap_colemak.h<br>quantum/keymap_extras/keymap_nordic.h | 2017 Jan 31 |
17@fredizzimo | quantum/config_common.h<br>quantum/keycode_config.h<br>quantum/keymap.h<br>quantum/keymap_common.c<br>quantum/keymap_common.c<br>quantum/matrix.c<br>quantum/quantum.h<br>quantum/rgblight.c<br>quantum/rgblight.h<br>quantum/api/api_sysex.c | 2017 Jan 29 |
18@h-youhei | quantum/keymap_extras/keymap_jp.h | 2017 Jan 28 |
19@heartsekai | quantum/keymap_extras/keymap_german_ch.h | 2017 Jan 29 |
20@IBnobody | quantum/keycode_config.h<br>quantum/matrix.c<br>quantum/quantum.c<br>quantum/audio/audio.c<br>quantum/audio/audio.h<br>quantum/audio/audio_pwm.c<br>quantum/audio/audio_pwm.c<br>quantum/audio/voices.c<br>quantum/audio/voices.h<br>quantum/template/config.h<br>quantum/template/template.c | 2017 Jan 30 |
21@jackhumbert | quantum/config_common.h<br>quantum/keycode_config.h<br>quantum/keymap.h<br>quantum/keymap_common.c<br>quantum/light_ws2812.c<br>quantum/light_ws2812.h<br>quantum/matrix.c<br>quantum/quantum.c<br>quantum/quantum.h<br>quantum/quantum_keycodes.h<br>quantum/rgblight.c<br>quantum/rgblight.h<br>quantum/api/api_sysex.c<br>quantum/audio/audio.c<br>quantum/audio/audio.h<br>quantum/audio/audio_pwm.c<br>quantum/audio/audio_pwm.c<br>quantum/audio/voices.c<br>quantum/audio/voices.h<br>quantum/keymap_extras/keymap_colemak.h<br>quantum/keymap_extras/keymap_dvorak.h<br>quantum/keymap_extras/keymap_fr_ch.h<br>quantum/keymap_extras/keymap_french.h<br>quantum/keymap_extras/keymap_french_osx.h<br>quantum/keymap_extras/keymap_german.h<br>quantum/keymap_extras/keymap_german_ch.h<br>quantum/keymap_extras/keymap_german_osx.h<br>quantum/keymap_extras/keymap_neo2.h<br>quantum/keymap_extras/keymap_nordic.h<br>quantum/keymap_extras/keymap_plover.h<br>quantum/keymap_extras/keymap_spanish.h<br>quantum/keymap_extras/keymap_uk.h<br>quantum/process_keycode/process_midi.c<br>quantum/process_keycode/process_music.c<br>quantum/process_keycode/process_tap_dance.c<br>quantum/process_keycode/process_tap_dance.h<br>quantum/process_keycode/process_unicode.c<br>quantum/process_keycode/process_unicode.h<br>quantum/template/config.h<br>quantum/template/template.c<br>quantum/template/template.h | 2017-01-29 |
22@jakllsch | quantum/keymap_extras/keymap_dvorak.h<br>quantum/keymap_extras/keymap_fr_ch.h<br>quantum/keymap_extras/keymap_french.h<br>quantum/keymap_extras/keymap_german.h<br>quantum/keymap_extras/keymap_german_ch.h<br>quantum/keymap_extras/keymap_nordic.h<br>quantum/keymap_extras/keymap_spanish.h<br>quantum/keymap_extras/keymap_uk.h | 2017 Jan 29 |
23kuel | quantum/keymap_extras/keymap_unicode_cyrillic.h<br>quantum/keymap_extras/keymap_russian.h | |
24@lindhe | quantum/keymap_extras/keymap_nordic.h<br>quantum/keymap_extras/keymap_norwegian.h | 2017 Jan 30 |
25@matzebond | quantum/keymap_extras/keymap_german.h<br>quantum/keymap_extras/keymap_neo2.h | 2017 Jan 30 |
26@plgruener | quantum/keymap_extras/keymap_german.h<br>quantum/keymap_extras/keymap_neo2.h | 2017 Jan 30 |
27@priyadi | quantum/quantum.c<br>quantum/process_keycode/process_unicode.c<br>quantum/process_keycode/process_unicode.h | 2017 Jan 31 |
28@pvinis | quantum/quantum.c<br>quantum/quantum.h<br>quantum/process_keycode/process_tap_dance.c<br>quantum/process_keycode/process_tap_dance.h | 2017 Jan 29 |
29@Smilliam | quantum/quantum.c | 2017 Feb 25 |
30@sperochon | quantum/keymap_extras/keymap_french_osx.h | 2017 Jan 30 |
31stephan . bosebeck at holidayinsider.com | quantum/keymap_extras/keymap_german_osx.h | 2017 Feb 15 |
32@TerryMathews | quantum/quantum.c | 2017 Jan 29 |
33@Twey | quantum/keymap_extras/keymap_plover.h | |
34@Vifon | quantum/dynamic_macro.h<br>quantum/quantum.c | 2017 Feb 09 |
35@vincent-pochet | quantum/keymap_extras/keymap_fr_ch.h | 2017 Feb 09 |
36@wez | quantum/dynamic_macro.h | 2017 Jan 29 |
37@Wilba6582 | quantum/keymap.h<br>quantum/keymap_common.c<br>quantum/quantum_keycodes.h | 2017 Feb 15 |
38@yangliu | quantum/light_ws2812.c<br>quantum/light_ws2812.h<br>quantum/rgblight.c<br>quantum/rgblight.h | 2017 Jan 30 | \ No newline at end of file
diff --git a/docs/Macros.md b/docs/Macros.md
new file mode 100644
index 000000000..994d01928
--- /dev/null
+++ b/docs/Macros.md
@@ -0,0 +1,215 @@
1# Macro shortcuts: Send a whole string when pressing just one key
2
3Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymap_default.c).
4
5```c
6const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is.
7{
8 switch(id) {
9 case 0: // this would trigger when you hit a key mapped as M(0)
10 if (record->event.pressed) {
11 return MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END ); // this sends the string 'hello' when the macro executes
12 }
13 break;
14 }
15 return MACRO_NONE;
16};
17```
18A macro can include the following commands:
19
20* I() change interval of stroke in milliseconds.
21* D() press key.
22* U() release key.
23* T() type key(press and release).
24* W() wait (milliseconds).
25* END end mark.
26
27So above you can see the stroke interval changed to 255ms between each keystroke, then a bunch of keys being typed, waits a while, then the macro ends.
28
29Note: Using macros to have your keyboard send passwords for you is possible, but a bad idea.
30
31## Advanced macro functions
32
33To get more control over the keys/actions your keyboard takes, the following functions are available to you in the `action_get_macro` function block:
34
35* `record->event.pressed`
36
37This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
38
39```c
40if (record->event.pressed) {
41 // on keydown
42} else {
43 // on keyup
44}
45```
46
47* `register_code(<kc>);`
48
49This sends the `<kc>` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`.
50
51* `unregister_code(<kc>);`
52
53Parallel to `register_code` function, this sends the `<kc>` keyup event to the computer. If you don't use this, the key will be held down until it's sent.
54
55* `layer_on(<n>);`
56
57This will turn on the layer `<n>` - the higher layer number will always take priority. Make sure you have `KC_TRNS` for the key you're pressing on the layer you're switching to, or you'll get stick there unless you have another plan.
58
59* `layer_off(<n>);`
60
61This will turn off the layer `<n>`.
62
63* `clear_keyboard();`
64
65This will clear all mods and keys currently pressed.
66
67* `clear_mods();`
68
69This will clear all mods currently pressed.
70
71* `clear_keyboard_but_mods();`
72
73This will clear all keys besides the mods currently pressed.
74
75* `update_tri_layer(layer_1, layer_2, layer_3);`
76
77If the user attempts to activate layer 1 AND layer 2 at the same time (for example, by hitting their respective layer keys), layer 3 will be activated. Layers 1 and 2 will _also_ be activated, for the purposes of fallbacks (so a given key will fall back from 3 to 2, to 1 -- and only then to 0).
78
79### Naming your macros
80
81If you have a bunch of macros you want to refer to from your keymap, while keeping the keymap easily readable, you can just name them like so:
82
83```
84#define AUD_OFF M(6)
85#define AUD_ON M(7)
86#define MUS_OFF M(8)
87#define MUS_ON M(9)
88#define VC_IN M(10)
89#define VC_DE M(11)
90#define PLOVER M(12)
91#define EXT_PLV M(13)
92```
93
94As was done on the [Planck default keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/default/keymap.c#L33-L40)
95
96#### Timer functionality
97
98It's possible to start timers and read values for time-specific events - here's an example:
99
100```c
101static uint16_t key_timer;
102key_timer = timer_read();
103if (timer_elapsed(key_timer) < 100) {
104 // do something if less than 100ms have passed
105} else {
106 // do something if 100ms or more have passed
107}
108```
109
110It's best to declare the `static uint16_t key_timer;` outside of the macro block (top of file, etc).
111
112### Example: Single-key copy/paste (hold to copy, tap to paste)
113
114With QMK, it's easy to make one key do two things, as long as one of those things is being a modifier. :) So if you want a key to act as Ctrl when held and send the letter R when tapped, that's easy: `CTL_T(KC_R)`. But what do you do when you want that key to send Ctrl-V (paste) when tapped, and Ctrl-C (copy) when held?
115
116Here's what you do:
117
118
119```
120static uint16_t key_timer;
121
122const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
123{
124 switch(id) {
125 case 0: {
126 if (record->event.pressed) {
127 key_timer = timer_read(); // if the key is being pressed, we start the timer.
128 }
129 else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
130 if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap.
131 return MACRO( D(LCTL), T(C), U(LCTL), END );
132 }
133 else {
134 return MACRO( D(LCTL), T(V), U(LCTL), END );
135 }
136 }
137 break;
138 }
139 }
140 return MACRO_NONE;
141};
142```
143
144And then, to assign this macro to a key on your keyboard layout, you just use `M(0)` on the key you want to press for copy/paste.
145
146# Dynamic macros: record and replay macros in runtime
147
148In addition to the static macros described above, you may enable the dynamic macros which you may record while writing. They are forgotten as soon as the keyboard is unplugged. Only two such macros may be stored at the same time, with the total length of 64 keypresses (by default).
149
150To enable them, first add a new element to the `planck_keycodes` enum — `DYNAMIC_MACRO_RANGE`:
151
152 enum planck_keycodes {
153 QWERTY = SAFE_RANGE,
154 COLEMAK,
155 DVORAK,
156 PLOVER,
157 LOWER,
158 RAISE,
159 BACKLIT,
160 EXT_PLV,
161 DYNAMIC_MACRO_RANGE,
162 };
163
164It must be the last element because `dynamic_macros.h` will add some more keycodes after it.
165
166Below it include the `dynamic_macro.h` header:
167
168 #include "dynamic_macro.h"`
169
170Add the following keys to your keymap:
171
172- `DYN_REC_START1` — start recording the macro 1,
173- `DYN_REC_START2` — start recording the macro 2,
174- `DYN_MACRO_PLAY1` — replay the macro 1,
175- `DYN_MACRO_PLAY2` — replay the macro 2,
176- `DYN_REC_STOP` — finish the macro that is currently being recorded.
177
178Add the following code to the very beginning of your `process_record_user()` function:
179
180 if (!process_record_dynamic_macro(keycode, record)) {
181 return false;
182 }
183
184That should be everything necessary. To start recording the macro, press either `DYN_REC_START1` or `DYN_REC_START2`. To finish the recording, press the `DYN_REC_STOP` layer button. To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`.
185
186Note that it's possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again.
187
188For users of the earlier versions of dynamic macros: It is still possible to finish the macro recording using just the layer modifier used to access the dynamic macro keys, without a dedicated `DYN_REC_STOP` key. If you want this behavior back, use the following snippet instead of the one above:
189
190 uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
191 if (!process_record_dynamic_macro(macro_kc, record)) {
192 return false;
193 }
194
195If the LED-s start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 128; please read the comments for it in the header).
196
197For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header.
198
199# Sending strings
200Some people want to have a password or some text on a key. This is possible without having to do every key individually using `SEND_STRING("<text>");`. Note the caps, because `send_string("<text>");` does something else. For example:
201```c
202const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is.
203{
204 switch(id) {
205 case 0: // this would trigger when you hit a key mapped as M(0)
206 if (record->event.pressed) {
207 SEND_STRING("QMK is the best thing ever!"); // This would type "QMK is the best thing ever!" (without quotation marks).
208 return false; // This is false because it has to return something.
209 }
210 break;
211 }
212 return MACRO_NONE;
213};
214```
215If you'd want it to press enter as well, just replace `return false;` with `return MACRO( T(ENT), END );`.
diff --git a/docs/Make-Instructions.md b/docs/Make-Instructions.md
new file mode 100644
index 000000000..825632035
--- /dev/null
+++ b/docs/Make-Instructions.md
@@ -0,0 +1,167 @@
1# More detailed make instruction
2
3The full syntax of the `make` command is the following, but parts of the command can be left out if you run it from other directories than the `root` (as you might already have noticed by reading the simple instructions).
4
5`<keyboard>-<subproject>-<keymap>-<target>`, where:
6
7* `<keyboard>` is the name of the keyboard, for example `planck`
8 * Use `allkb` to compile all keyboards
9* `<subproject>` is the name of the subproject (revision or sub-model of the keyboard). For example, for Ergodox it can be `ez` or `infinity`, and for Planck `rev3` or `rev4`.
10 * If the keyboard doesn't have any subprojects, it can be left out
11 * To compile the default subproject, you can leave it out, or specify `defaultsp`
12 * Use `allsp` to compile all subprojects
13* `<keymap>` is the name of the keymap, for example `algernon`
14 * Use `allkm` to compile all keymaps
15* `<target>` will be explained in more detail below.
16
17**Note:** When you leave some parts of the command out, you should also remove the dash (`-`).
18
19As mentioned above, there are some shortcuts, when you are in a:
20
21* `keyboard` folder, the command will automatically fill the `<keyboard>` part. So you only need to type `<subproject>-<keymap>-<target>`
22* `subproject` folder, it will fill in both `<keyboard>` and `<subproject>`
23* `keymap` folder, then `<keyboard>` and `<keymap>` will be filled in. If you need to specify the `<subproject>` use the following syntax `<subproject>-<target>`
24 * Note in order to support this shortcut, the keymap needs its own Makefile (see the example [here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_makefile_example.mk))
25* `keymap` folder of a `subproject`, then everything except the `<target>` will be filled in
26
27The `<target>` means the following
28* If no target is given, then it's the same as `all` below
29* `all` compiles the keyboard and generates a `<keyboard>_<keymap>.hex` file in whichever folder you run `make` from. These files are ignored by git, so don't worry about deleting them when committing/creating pull requests.
30* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for Infinity keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. **Note** that some operating systems needs root access for these commands to work, so in that case you need to run for example `sudo make dfu`.
31* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
32
33Some other targets are supported but, but not important enough to be documented here. Check the source code of the make files for more information.
34
35You can also add extra options at the end of the make command line, after the target
36
37* `make COLOR=false` - turns off color output
38* `make SILENT=true` - turns off output besides errors/warnings
39* `make VERBOSE=true` - outputs all of the gcc stuff (not interesting, unless you need to debug)
40* `make EXTRAFLAGS=-E` - Preprocess the code without doing any compiling (useful if you are trying to debug #define commands)
41
42The make command itself also has some additional options, type `make --help` for more information. The most useful is probably `-jx`, which specifies that you want to compile using more than one CPU, the `x` represents the number of CPUs that you want to use. Setting that can greatly reduce the compile times, especially if you are compiling many keyboards/keymaps. I usually set it to one less than the number of CPUs that I have, so that I have some left for doing other things while it's compiling. Note that not all operating systems and make versions supports that option.
43
44Here are some examples commands
45
46* `make allkb-allsp-allkm` builds everything (all keyboards, all subprojects, all keymaps). Running just `make` from the `root` will also run this.
47* `make` from within a `keyboard` directory, is the same as `make keyboard-allsp-allkm`, which compiles all subprojects and keymaps of the keyboard. **NOTE** that this behaviour has changed. Previously it compiled just the default keymap.
48* `make ergodox-infinity-algernon-clean` will clean the build output of the Ergodox Infinity keyboard. This example uses the full syntax and can be run from any folder with a `Makefile`
49* `make dfu COLOR=false` from within a keymap folder, builds and uploads the keymap, but without color output.
50
51## The `Makefile`
52
53There are 5 different `make` and `Makefile` locations:
54
55* root (`/`)
56* keyboard (`/keyboards/<keyboard>/`)
57* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
58* subproject (`/keyboards/<keyboard>/<subproject>`)
59* subproject keymap (`/keyboards/<keyboard>/<subproject>/keymaps/<keymap>`)
60
61The root contains the code used to automatically figure out which keymap or keymaps to compile based on your current directory and commandline arguments. It's considered stable, and shouldn't be modified. The keyboard one will contain the MCU set-up and default settings for your keyboard, and shouldn't be modified unless you are the producer of that keyboard. The keymap Makefile can be modified by users, and is optional. It is included automatically if it exists. You can see an example [here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_makefile_example.mk) - the last few lines are the most important. The settings you set here will override any defaults set in the keyboard Makefile. **The file is required if you want to run `make` in the keymap folder.**
62
63For keyboards and subprojects, the make files are split in two parts `Makefile` and `rules.mk`. All settings can be found in the `rules.mk` file, while the `Makefile` is just there for support and including the root `Makefile`. Keymaps contain just one `Makefile` for simplicity.
64
65### Makefile options
66
67Set these variables to `no` to disable them, and `yes` to enable them.
68
69`BOOTMAGIC_ENABLE`
70
71This allows you to hold a key and the salt key (space by default) and have access to a various EEPROM settings that persist over power loss. It's advised you keep this disabled, as the settings are often changed by accident, and produce confusing results that makes it difficult to debug. It's one of the more common problems encountered in help sessions.
72
73Consumes about 1000 bytes.
74
75`MOUSEKEY_ENABLE`
76
77This gives you control over cursor movements and clicks via keycodes/custom functions.
78
79`EXTRAKEY_ENABLE`
80
81This allows you to use the system and audio control key codes.
82
83`CONSOLE_ENABLE`
84
85This allows you to print messages that can be read using [`hid_listen`](https://www.pjrc.com/teensy/hid_listen.html).
86
87By default, all debug (*dprint*) print (*print*, *xprintf*), and user print (*uprint*) messages will be enabled. This will eat up a significant portion of the flash and may make the keyboard .hex file too big to program.
88
89To disable debug messages (*dprint*) and reduce the .hex file size, include `#define NO_DEBUG` in your `config.h` file.
90
91To disable print messages (*print*, *xprintf*) and user print messages (*uprint*) and reduce the .hex file size, include `#define NO_PRINT` in your `config.h` file.
92
93To disable print messages (*print*, *xprintf*) and **KEEP** user print messages (*uprint*), include `#define USER_PRINT` in your `config.h` file.
94
95To see the text, open `hid_listen` and enjoy looking at your printed messages.
96
97**NOTE:** Do not include *uprint* messages in anything other than your keymap code. It must not be used within the QMK system framework. Otherwise, you will bloat other people's .hex files.
98
99Consumes about 400 bytes.
100
101`COMMAND_ENABLE`
102
103This enables magic commands, typically fired with the default magic key combo `LSHIFT+RSHIFT+KEY`. Magic commands include turning on debugging messages (`MAGIC+D`) or temporarily toggling NKRO (`MAGIC+N`).
104
105`SLEEP_LED_ENABLE`
106
107Enables your LED to breath while your computer is sleeping. Timer1 is being used here. This feature is largely unused and untested, and needs updating/abstracting.
108
109`NKRO_ENABLE`
110
111This allows the keyboard to tell the host OS that up to 248 keys are held down at once (default without NKRO is 6). NKRO is off by default, even if `NKRO_ENABLE` is set. NKRO can be forced by adding `#define FORCE_NKRO` to your config.h or by binding `MAGIC_TOGGLE_NKRO` to a key and then hitting the key.
112
113`BACKLIGHT_ENABLE`
114
115This enables your backlight on Timer1 and ports B5, B6, or B7 (for now). You can specify your port by putting this in your `config.h`:
116
117 #define BACKLIGHT_PIN B7
118
119`MIDI_ENABLE`
120
121This enables MIDI sending and receiving with your keyboard. To enter MIDI send mode, you can use the keycode `MI_ON`, and `MI_OFF` to turn it off. This is a largely untested feature, but more information can be found in the `quantum/quantum.c` file.
122
123`UNICODE_ENABLE`
124
125This allows you to send unicode symbols via `UC(<unicode>)` in your keymap. Only codes up to 0x7FFF are currently supported.
126
127`UNICODEMAP_ENABLE`
128
129This allows sending unicode symbols using `X(<unicode>)` in your keymap. Codes
130up to 0xFFFFFFFF are supported, including emojis. You will need to maintain
131a separate mapping table in your keymap file.
132
133Known limitations:
134- Under Mac OS, only codes up to 0xFFFF are supported.
135- Under Linux ibus, only codes up to 0xFFFFF are supported (but anything important is still under this limit for now).
136
137Characters out of range supported by the OS will be ignored.
138
139`BLUETOOTH_ENABLE`
140
141This allows you to interface with a Bluefruit EZ-key to send keycodes wirelessly. It uses the D2 and D3 pins.
142
143`AUDIO_ENABLE`
144
145This allows you output audio on the C6 pin (needs abstracting). See the [audio section](#audio-output-from-a-speaker) for more information.
146
147`FAUXCLICKY_ENABLE`
148
149Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue switches. By default, uses the C6 pin, same as AUDIO_ENABLE.
150
151`VARIABLE_TRACE`
152
153Use this to debug changes to variable values, see the [tracing variables](#tracing-variables) section for more information.
154
155`API_SYSEX_ENABLE`
156
157This enables using the Quantum SYSEX API to send strings (somewhere?)
158
159This consumes about 5390 bytes.
160
161### Customizing Makefile options on a per-keymap basis
162
163If your keymap directory has a file called `Makefile` (note the filename), any Makefile options you set in that file will take precedence over other Makefile options for your particular keyboard.
164
165So let's say your keyboard's makefile has `BACKLIGHT_ENABLE = yes` (or maybe doesn't even list the `BACKLIGHT_ENABLE` option, which would cause it to be off). You want your particular keymap to not have the debug console, so you make a file called `Makefile` and specify `BACKLIGHT_ENABLE = no`.
166
167You can use the `doc/keymap_makefile_example.md` as a template/starting point.
diff --git a/docs/Memory-write-error,-use-debug-for-more-info.md b/docs/Memory-write-error,-use-debug-for-more-info.md
new file mode 100644
index 000000000..adef2601f
--- /dev/null
+++ b/docs/Memory-write-error,-use-debug-for-more-info.md
@@ -0,0 +1,21 @@
1In rare circumstances, your keyboard/device can become unwritable, and `dfu-programmer` will give you an error like this:
2
3 Erasing flash... Success
4 Checking memory from 0x0 to 0x6FFF... Empty.
5 Checking memory from 0x0 to 0x607F... Empty.
6 0% 100% Programming 0x6080 bytes...
7 [ X ERROR
8 Memory write error, use debug for more info.
9
10Currently the only way to solve this is to [reprogram the chip via ISP](https://www.reddit.com/r/olkb/comments/4rjzen/flashing_error_on_mac_os_x/d52rj8o/). This requires another device to be hooked up to a couple of exposed pins on the PCB. There is a guide on how to do this [here](https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader), and [this is where things are on the Planck PCB](http://imgur.com/lvbxbHt).
11
12An example command to flash the board once things are hooked up is:
13
14 avrdude -c usbtiny -p m32u4 -U flash:w:planck_default_rev4.hex
15
16Research is still being done on why this happens, but here are some cases:
17
18* [`make -f Makefile.rn42 dfu` and not the dfu-programmer commands worked for @tybenz](https://github.com/tmk/tmk_keyboard/issues/316) - also see [the hhkb keyboard on tmk](https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hhkb)
19* [Doing a force erase works here](https://geekhack.org/index.php?topic=12047.msg1520147#msg1520147)
20* [`dfu-programmer atmega32u4 erase --force` works here as well](https://forum.fhem.de/index.php?topic=29777.0) [DE]
21* [Unresolved, but some data dumps](https://github.com/dfu-programmer/dfu-programmer/issues/29) \ No newline at end of file
diff --git a/docs/Modding-your-keyboard.md b/docs/Modding-your-keyboard.md
new file mode 100644
index 000000000..2429570f5
--- /dev/null
+++ b/docs/Modding-your-keyboard.md
@@ -0,0 +1,388 @@
1
2## Audio output from a speaker
3
4Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any keyboard that allows access to the C6 port, you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
5
6The audio code lives in [quantum/audio/audio.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/audio.h) and in the other files in the audio directory. It's enabled by default on the Planck [stock keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/default/keymap.c). Here are the important bits:
7
8```
9#include "audio.h"
10```
11
12Then, lower down the file:
13
14```
15float tone_startup[][2] = {
16 ED_NOTE(_E7 ),
17 E__NOTE(_CS7),
18 E__NOTE(_E6 ),
19 E__NOTE(_A6 ),
20 M__NOTE(_CS7, 20)
21};
22```
23
24This is how you write a song. Each of these lines is a note, so we have a little ditty composed of five notes here.
25
26Then, we have this chunk:
27
28```
29float tone_qwerty[][2] = SONG(QWERTY_SOUND);
30float tone_dvorak[][2] = SONG(DVORAK_SOUND);
31float tone_colemak[][2] = SONG(COLEMAK_SOUND);
32float tone_plover[][2] = SONG(PLOVER_SOUND);
33float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
34
35float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
36float goodbye[][2] = SONG(GOODBYE_SOUND);
37```
38
39Wherein we bind predefined songs (from [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h)) into named variables. This is one optimization that helps save on memory: These songs only take up memory when you reference them in your keymap, because they're essentially all preprocessor directives.
40
41So now you have something called `tone_plover` for example. How do you make it play the Plover tune, then? If you look further down the keymap, you'll see this:
42
43```
44PLAY_NOTE_ARRAY(tone_plover, false, 0); // Signature is: Song name, repeat, rest style
45```
46
47This is inside one of the macros. So when that macro executes, your keyboard plays that particular chime.
48
49"Rest style" in the method signature above (the last parameter) specifies if there's a rest (a moment of silence) between the notes.
50
51## Music mode
52
53The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode.
54
55Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things.
56
57Keycodes available:
58
59* `MU_ON` - Turn music mode on
60* `MU_OFF` - Turn music mode off
61* `MU_TOG` - Toggle music mode
62
63In music mode, the following keycodes work differently, and don't pass through:
64
65* `LCTL` - start a recording
66* `LALT` - stop recording/stop playing
67* `LGUI` - play recording
68* `KC_UP` - speed-up playback
69* `KC_DOWN` - slow-down playback
70
71## MIDI functionalty
72
73This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
74
75## Bluetooth functionality
76
77This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will.
78
79## RGB Under Glow Mod
80
81![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg)
82
83Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY).
84
85For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring the VCC, GND, and DI, you can enable the underglow in your Makefile.
86
87 RGBLIGHT_ENABLE = yes
88
89In order to use the underglow animation functions, you need to have `#define RGBLIGHT_ANIMATIONS` in your `config.h`.
90
91Please add the following options into your config.h, and set them up according your hardware configuration. These settings are for the `F4` pin by default:
92
93 #define RGB_DI_PIN F4 // The pin your RGB strip is wired to
94 #define RGBLIGHT_ANIMATIONS // Require for fancier stuff (not compatible with audio)
95 #define RGBLED_NUM 14 // Number of LEDs
96 #define RGBLIGHT_HUE_STEP 10
97 #define RGBLIGHT_SAT_STEP 17
98 #define RGBLIGHT_VAL_STEP 17
99
100You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to.
101
102The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. For details, please check this keymap. `keyboards/planck/keymaps/yang/keymap.c`
103
104### WS2812 Wiring
105
106![WS2812 Wiring](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/WS2812-wiring.jpg)
107
108Please note the USB port can only supply a limited amount of power to the keyboard (500mA by standard, however, modern computer and most usb hubs can provide 700+mA.). According to the data of NeoPixel from Adafruit, 30 WS2812 LEDs require a 5V 1A power supply, LEDs used in this mod should not more than 20.
109
110## PS/2 Mouse Support
111
112Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.
113
114To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest from a Thinkpad keyboard), identify the function of each pin of the module, and make the necessary circuitry between controller and Trackpoint module. For more information, please refer to [Trackpoint Hardware](https://deskthority.net/wiki/TrackPoint_Hardware) page on Deskthority Wiki.
115
116There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).
117
118### Busywait version
119
120Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
121
122In rules.mk:
123
124```
125PS2_MOUSE_ENABLE = yes
126PS2_USE_BUSYWAIT = yes
127```
128
129In your keyboard config.h:
130
131```
132#ifdef PS2_USE_BUSYWAIT
133# define PS2_CLOCK_PORT PORTD
134# define PS2_CLOCK_PIN PIND
135# define PS2_CLOCK_DDR DDRD
136# define PS2_CLOCK_BIT 1
137# define PS2_DATA_PORT PORTD
138# define PS2_DATA_PIN PIND
139# define PS2_DATA_DDR DDRD
140# define PS2_DATA_BIT 2
141#endif
142```
143
144### Interrupt version
145
146The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data.
147
148In rules.mk:
149
150```
151PS2_MOUSE_ENABLE = yes
152PS2_USE_INT = yes
153```
154
155In your keyboard config.h:
156
157```
158#ifdef PS2_USE_INT
159#define PS2_CLOCK_PORT PORTD
160#define PS2_CLOCK_PIN PIND
161#define PS2_CLOCK_DDR DDRD
162#define PS2_CLOCK_BIT 2
163#define PS2_DATA_PORT PORTD
164#define PS2_DATA_PIN PIND
165#define PS2_DATA_DDR DDRD
166#define PS2_DATA_BIT 5
167
168#define PS2_INT_INIT() do { \
169 EICRA |= ((1<<ISC21) | \
170 (0<<ISC20)); \
171} while (0)
172#define PS2_INT_ON() do { \
173 EIMSK |= (1<<INT2); \
174} while (0)
175#define PS2_INT_OFF() do { \
176 EIMSK &= ~(1<<INT2); \
177} while (0)
178#define PS2_INT_VECT INT2_vect
179#endif
180```
181
182### USART version
183
184To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version.
185
186In rules.mk:
187
188```
189PS2_MOUSE_ENABLE = yes
190PS2_USE_USART = yes
191```
192
193In your keyboard config.h:
194
195```
196#ifdef PS2_USE_USART
197#define PS2_CLOCK_PORT PORTD
198#define PS2_CLOCK_PIN PIND
199#define PS2_CLOCK_DDR DDRD
200#define PS2_CLOCK_BIT 5
201#define PS2_DATA_PORT PORTD
202#define PS2_DATA_PIN PIND
203#define PS2_DATA_DDR DDRD
204#define PS2_DATA_BIT 2
205
206/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
207/* set DDR of CLOCK as input to be slave */
208#define PS2_USART_INIT() do { \
209 PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
210 PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
211 UCSR1C = ((1 << UMSEL10) | \
212 (3 << UPM10) | \
213 (0 << USBS1) | \
214 (3 << UCSZ10) | \
215 (0 << UCPOL1)); \
216 UCSR1A = 0; \
217 UBRR1H = 0; \
218 UBRR1L = 0; \
219} while (0)
220#define PS2_USART_RX_INT_ON() do { \
221 UCSR1B = ((1 << RXCIE1) | \
222 (1 << RXEN1)); \
223} while (0)
224#define PS2_USART_RX_POLL_ON() do { \
225 UCSR1B = (1 << RXEN1); \
226} while (0)
227#define PS2_USART_OFF() do { \
228 UCSR1C = 0; \
229 UCSR1B &= ~((1 << RXEN1) | \
230 (1 << TXEN1)); \
231} while (0)
232#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
233#define PS2_USART_RX_DATA UDR1
234#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
235#define PS2_USART_RX_VECT USART1_RX_vect
236#endif
237```
238
239### Additional Settings
240
241#### PS/2 mouse features
242
243These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/
244
245```
246/* Use remote mode instead of the default stream mode (see link) */
247#define PS2_MOUSE_USE_REMOTE_MODE
248
249/* Enable the scrollwheel or scroll gesture on your mouse or touchpad */
250#define PS2_MOUSE_ENABLE_SCROLLING
251
252/* Some mice will need a scroll mask to be configured. The default is 0xFF. */
253#define PS2_MOUSE_SCROLL_MASK 0x0F
254
255/* Applies a transformation to the movement before sending to the host (see link) */
256#define PS2_MOUSE_USE_2_1_SCALING
257
258/* The time to wait after initializing the ps2 host */
259#define PS2_MOUSE_INIT_DELAY 1000 /* Default */
260```
261
262You can also call the following functions from ps2_mouse.h
263
264```
265void ps2_mouse_disable_data_reporting(void);
266
267void ps2_mouse_enable_data_reporting(void);
268
269void ps2_mouse_set_remote_mode(void);
270
271void ps2_mouse_set_stream_mode(void);
272
273void ps2_mouse_set_scaling_2_1(void);
274
275void ps2_mouse_set_scaling_1_1(void);
276
277void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
278
279void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
280```
281
282#### Fine control
283
284Use the following defines to change the sensitivity and speed of the mouse.
285Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads).
286
287```
288#define PS2_MOUSE_X_MULTIPLIER 3
289#define PS2_MOUSE_Y_MULTIPLIER 3
290#define PS2_MOUSE_V_MULTIPLIER 1
291```
292
293#### Scroll button
294
295If you're using a trackpoint, you will likely want to be able to use it for scrolling.
296Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
297To enable the feature, you must set a scroll button mask as follows:
298
299```
300#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BUTTON_MIDDLE) /* Default */
301```
302
303To disable the scroll button feature:
304
305```
306#define PS2_MOUSE_SCROLL_BTN_MASK 0
307```
308
309The available buttons are:
310
311```
312#define PS2_MOUSE_BTN_LEFT 0
313#define PS2_MOUSE_BTN_RIGHT 1
314#define PS2_MOUSE_BTN_MIDDLE 2
315```
316
317You can also combine buttons in the mask by `|`ing them together.
318
319Once you've configured your scroll button mask, you must configure the scroll button send interval.
320This is the interval before which if the scroll buttons were released they would be sent to the host.
321After this interval, they will cause the mouse to scroll and will not be sent.
322
323```
324#define PS2_MOUSE_SCROLL_BTN_SEND 300 /* Default */
325```
326
327To disable sending the scroll buttons:
328```
329#define PS2_MOUSE_SCROLL_BTN_SEND 0
330```
331
332Fine control over the scrolling is supported with the following defines:
333
334```
335#define PS2_MOUSE_SCROLL_DIVISOR_H 2
336#define PS2_MOUSE_SCROLL_DIVISOR_V 2
337```
338
339#### Debug settings
340
341To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
342
343```
344/* To debug the mouse reports */
345#define PS2_MOUSE_DEBUG_HID
346#define PS2_MOUSE_DEBUG_RAW
347```
348
349## Safety Considerations
350
351You probably don't want to "brick" your keyboard, making it impossible
352to rewrite firmware onto it. Here are some of the parameters to show
353what things are (and likely aren't) too risky.
354
355- If your keyboard map does not include RESET, then, to get into DFU
356 mode, you will need to press the reset button on the PCB, which
357 requires unscrewing the bottom.
358- Messing with tmk_core / common files might make the keyboard
359 inoperable
360- Too large a .hex file is trouble; `make dfu` will erase the block,
361 test the size (oops, wrong order!), which errors out, failing to
362 flash the keyboard, leaving it in DFU mode.
363 - To this end, note that the maximum .hex file size on Planck is
364 7000h (28672 decimal)
365
366```
367Linking: .build/planck_rev4_cbbrowne.elf [OK]
368Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK]
369
370Size after:
371 text data bss dec hex filename
372 0 22396 0 22396 577c planck_rev4_cbbrowne.hex
373```
374
375 - The above file is of size 22396/577ch, which is less than
376 28672/7000h
377 - As long as you have a suitable alternative .hex file around, you
378 can retry, loading that one
379 - Some of the options you might specify in your keyboard's Makefile
380 consume extra memory; watch out for BOOTMAGIC_ENABLE,
381 MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE
382- DFU tools do /not/ allow you to write into the bootloader (unless
383 you throw in extra fruitsalad of options), so there is little risk
384 there.
385- EEPROM has around a 100000 write cycle. You shouldn't rewrite the
386 firmware repeatedly and continually; that'll burn the EEPROM
387 eventually.
388
diff --git a/docs/Mouse-keys.md b/docs/Mouse-keys.md
new file mode 100644
index 000000000..16e920fdb
--- /dev/null
+++ b/docs/Mouse-keys.md
@@ -0,0 +1,17 @@
1# Can I increase the speed of the mouse keys?
2
3**Q:** The default speed for controlling the mouse with the keyboard is slow. I've tried increasing the mouse's sensitivity at work using xset m and it worked, although sometimes it changes by itself for some reason. At home, on Arch Linux, this does not change ti. I've looked through the forums and resolved to use libinput using xinput but using that I only manage to change the speed of the mouse using the actual mouse. The speed of the mouse using the keyboard controls remained unchanged.
4Is there perhaps something I can input in the keymap.c to change the sensitivity? Or some other surefire way of increasing the speed?
5Thanks!
6
7**A:** In your keymap's config.h:
8
9```
10#define MOUSEKEY_INTERVAL 20
11#define MOUSEKEY_DELAY 0
12#define MOUSEKEY_TIME_TO_MAX 60
13#define MOUSEKEY_MAX_SPEED 7
14#define MOUSEKEY_WHEEL_DELAY 0
15```
16
17Tweak away. A lower interval or higher max speed will effectively make the mouse move faster. Time-to-max controls acceleration. (See [this Reddit thread for the original discussion](https://www.reddit.com/r/ErgoDoxEZ/comments/61fwr2/a_reliable_way_to_increase_the_speed_of_the_mouse/)). \ No newline at end of file
diff --git a/docs/Other-Projects.md b/docs/Other-Projects.md
new file mode 100644
index 000000000..163c7c1cf
--- /dev/null
+++ b/docs/Other-Projects.md
@@ -0,0 +1,62 @@
1Keyboard Firmware Projects other than TMK
2================================
3## PJRC USB Keyboard/Mouse Example[USB][PJRC][Teensy][AVR]
4- <http://www.pjrc.com/teensy/usb_keyboard.html>
5- <http://www.pjrc.com/teensy/usb_mouse.html>
6
7## kbupgrade[USB][V-USB][AVR]
8- <http://github.com/rhomann/kbupgrade>
9- <http://geekhack.org/showwiki.php?title=Island:8406>
10
11## c64key[USB][V-USB][AVR]
12- <http://symlink.dk/projects/c64key/>
13
14## rump[USB][V-USB][AVR]
15- <http://mg8.org/rump/>
16- <http://github.com/clee/rump>
17
18## dulcimer[USB][V-USB][AVR]
19- <http://www.schatenseite.de/dulcimer.html>
20
21## humblehacker-keyboard[USB][LUFA][AVR][Ergo]
22- <http://github.com/humblehacker>
23- <http://www.humblehacker.com/keyboard/>
24- <http://geekhack.org/showwiki.php?title=Island:6292>
25
26## ps2avr[PS/2][AVR]
27- <http://sourceforge.net/projects/ps2avr/>
28
29## ErgoDox[Ergo][Split][USB][AVR]
30- <http://geekhack.org/index.php?topic=22780.0>
31- <https://github.com/benblazak/ergodox-firmware>
32- <https://github.com/cub-uanic/tmk_keyboard>
33
34## Suka's keyboard collection[Ergo][Split][3DPrinting][USB][AVR]
35- <http://deskthority.net/workshop-f7/my-diy-keyboard-collection-or-how-i-became-a-kb-geek-t2534.html>
36- <https://github.com/frobiac/adnw>
37
38## bpiphany's AVR-Keyboard[PJRC][AVR][USB]
39- <https://github.com/BathroomEpiphanies/AVR-Keyboard>
40- <http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions>
41- <http://deskthority.net/wiki/Phantom>
42
43## USB-USB keyboard remapper[converter][USB-USB][AVR][Arduino]
44- <http://forum.colemak.com/viewtopic.php?pid=10837>
45- <https://github.com/darkytoothpaste/keymapper>
46
47## USB-USB converter threads[converter][USB-USB]
48- <http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html>
49- <http://geekhack.org/index.php?topic=19458.0>
50
51## kbdbabel.org[converter][vintage][protocol][8051]
52Great resource of vintage keyboard protocol information and code
53
54- <http://www.kbdbabel.org/>
55
56## Haata's kiibohd Controller[converter][vintage][protocol][AVR][PJRC][Cortex]
57A lots of vintage keyboard protocol supports
58
59- <https://github.com/kiibohd/controller>
60
61## Kinesis ergonomic keyboard firmware replacement[V-USB][LUFA][Ergo]
62- <https://github.com/chrisandreae/kinesis-firmware>
diff --git a/doc/PCB_GUIDE.md b/docs/PCB_GUIDE.md
index 16de71114..16de71114 100644
--- a/doc/PCB_GUIDE.md
+++ b/docs/PCB_GUIDE.md
diff --git a/doc/POWER.txt b/docs/POWER.txt
index 0abbbe48e..0abbbe48e 100644
--- a/doc/POWER.txt
+++ b/docs/POWER.txt
diff --git a/docs/Porting-Your-Keyboard-to-QMK-(ARM-and-other-ChibiOS-CPUs).md b/docs/Porting-Your-Keyboard-to-QMK-(ARM-and-other-ChibiOS-CPUs).md
new file mode 100644
index 000000000..436c73cb7
--- /dev/null
+++ b/docs/Porting-Your-Keyboard-to-QMK-(ARM-and-other-ChibiOS-CPUs).md
@@ -0,0 +1,70 @@
1Setting up your ARM based PCB is a little more involved than an Atmel MCU, but is easy enough. Start by using `util/new_project.sh <keyboard>` to create a new project:
2
3```
4$ util/new_project.sh simontester
5######################################################
6# /keyboards/simontester project created. To start
7# working on things, cd into keyboards/simontester
8######################################################
9```
10
11
12
13# END OF NEW ARM DOC, OLD ATMEL DOC FOLLOWS
14
15## `/keyboards/<keyboard>/config.h`
16
17The `USB Device descriptor parameter` block contains parameters are used to uniquely identify your keyboard, but they don't really matter to the machine.
18
19Your `MATRIX_ROWS` and `MATRIX_COLS` are the numbers of rows and cols in your keyboard matrix - this may be different than the number of actual rows and columns on your keyboard. There are some tricks you can pull to increase the number of keys in a given matrix, but most keyboards are pretty straight-forward.
20
21The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each row/column. Your schematic (if you have one) will have this information on it, and the values will vary depending on your setup. This is one of the most important things to double-check in getting your keyboard setup correctly.
22
23For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect.
24
25`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
26
27`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
28
29`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number.
30
31## `/keyboards/<keyboard>/Makefile`
32
33The values at the top likely won't need to be changed, since most boards use the `atmega32u4` chip. The `BOOTLOADER_SIZE` will need to be adjusted based on your MCU type. It's defaulted to the Teensy, since that's the most common controller. Below is quoted from the `Makefile`.
34
35```
36# Boot Section Size in *bytes*
37# Teensy halfKay 512
38# Teensy++ halfKay 1024
39# Atmel DFU loader 4096
40# LUFA bootloader 4096
41# USBaspLoader 2048
42OPT_DEFS += -DBOOTLOADER_SIZE=512
43```
44
45At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](#makefile-options).
46
47## `/keyboards/<keyboard>/readme.md`
48
49This is where you'll describe your keyboard - please write as much as you can about it! Talking about default functionality/features is useful here. Feel free to link to external pages/sites if necessary. Images can be included here as well. This file will be rendered into a webpage at qmk.fm/keyboards/<keyboard>/.
50
51## `/keyboards/<keyboard>/<keyboard>.c`
52
53This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](#custom-quantum-functions-for-keyboards-and-keymaps)
54
55## `/keyboards/<keyboard>/<keyboard>.h`
56
57Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accomodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design:
58
59```
60#define KEYMAP( \
61 k00, k01, k02, \
62 k10, k11 \
63) \
64{ \
65 { k00, k01, k02 }, \
66 { k10, KC_NO, k11 }, \
67}
68```
69
70Each of the `kxx` variables needs to be unique, and usually follows the format `k<row><col>`. You can place `KC_NO` where your dead keys are in your matrix.
diff --git a/docs/Porting-your-keyboard-to-QMK.md b/docs/Porting-your-keyboard-to-QMK.md
new file mode 100644
index 000000000..6f291a432
--- /dev/null
+++ b/docs/Porting-your-keyboard-to-QMK.md
@@ -0,0 +1,59 @@
1If your keyboard is running an Atmega chip (atmega32u4 and others), it's pretty easy to get things setup for compiling your own firmware to flash onto your board. There is a `/util/new_project.sh <keyboard>` script to help get you started - you can simply pass your keyboard's name into the script, and all of the necessary files will be created. The components of each are described below.
2
3## `/keyboards/<keyboard>/config.h`
4
5The `USB Device descriptor parameter` block contains parameters are used to uniquely identify your keyboard, but they don't really matter to the machine.
6
7Your `MATRIX_ROWS` and `MATRIX_COLS` are the numbers of rows and cols in your keyboard matrix - this may be different than the number of actual rows and columns on your keyboard. There are some tricks you can pull to increase the number of keys in a given matrix, but most keyboards are pretty straight-forward.
8
9The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each row/column. Your schematic (if you have one) will have this information on it, and the values will vary depending on your setup. This is one of the most important things to double-check in getting your keyboard setup correctly.
10
11For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect.
12
13`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
14
15`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
16
17`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number.
18
19## `/keyboards/<keyboard>/Makefile`
20
21The values at the top likely won't need to be changed, since most boards use the `atmega32u4` chip. The `BOOTLOADER_SIZE` will need to be adjusted based on your MCU type. It's defaulted to the Teensy, since that's the most common controller. Below is quoted from the `Makefile`.
22
23```
24# Boot Section Size in *bytes*
25# Teensy halfKay 512
26# Teensy++ halfKay 1024
27# Atmel DFU loader 4096
28# LUFA bootloader 4096
29# USBaspLoader 2048
30OPT_DEFS += -DBOOTLOADER_SIZE=512
31```
32
33At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](#makefile-options).
34
35## `/keyboards/<keyboard>/readme.md`
36
37This is where you'll describe your keyboard - please write as much as you can about it! Talking about default functionality/features is useful here. Feel free to link to external pages/sites if necessary. Images can be included here as well. This file will be rendered into a webpage at qmk.fm/keyboards/<keyboard>/.
38
39## `/keyboards/<keyboard>/<keyboard>.c`
40
41This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](#custom-quantum-functions-for-keyboards-and-keymaps)
42
43## `/keyboards/<keyboard>/<keyboard>.h`
44
45Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accomodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design:
46
47```
48#define KEYMAP( \
49 k00, k01, k02, \
50 k10, k11 \
51) \
52{ \
53 { k00, k01, k02 }, \
54 { k10, KC_NO, k11 }, \
55}
56```
57
58Each of the `kxx` variables needs to be unique, and usually follows the format `k<row><col>`. You can place `KC_NO` where your dead keys are in your matrix.
59
diff --git a/docs/Previously-Asked-Questions.asciidoc b/docs/Previously-Asked-Questions.asciidoc
new file mode 100644
index 000000000..36af1f203
--- /dev/null
+++ b/docs/Previously-Asked-Questions.asciidoc
@@ -0,0 +1,14 @@
1= Previously Asked Questions
2:toc:
3:toc-placement: preamble
4
5toc::[]
6
7= Question thread
8http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177-270.html
9
10= Questions
11== Columns beyond 16(uint16_t) cannot be read
12* https://github.com/tmk/tmk_keyboard/wiki/FAQ#cant-read-comlumn-of-matrix-beyond-16
13* http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177-270.html#p247051
14* http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
diff --git a/docs/QMK-Overview.md b/docs/QMK-Overview.md
new file mode 100644
index 000000000..f595bd237
--- /dev/null
+++ b/docs/QMK-Overview.md
@@ -0,0 +1,75 @@
1# QMK Overview
2
3This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a UNIX shell, but does not assume you are familiar with C or with compiling using make.
4
5# Basic QMK structure
6
7QMK is a fork of @tmk's [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
8
9## Keyboard project structure
10
11Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure:
12
13* `keymaps/`: Different keymaps that can be built
14* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`.
15* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
16
17### Keymap structure
18
19In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen.
20
21* `config.h`: the options to configure your keymap
22* `keymap.c`: all of your keymap code, required
23* `Makefile`: the features of QMK that are enabled, required to run `make` in your keymap folder
24* `readme.md`: a description of your keymap, how others might use it, and explanations of features
25* Other files: Some people choose to include an image depicting the layout, and other files that help people to use or understand a particular keymap.
26
27# The `make` command
28
29The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys). It it recommended that you always run make from within the `root` folder.
30
31**NOTE:** To abort a make command press `Ctrl-c`
32
33For more details on the QMK build process see [Make Instructions](/Make-Instructions.md).
34
35### Simple instructions for building and uploading a keyboard
36
37**Most keyboards have more specific instructions in the keyboard specific readme.md file, so please check that first**
38
391. Enter the `root` folder
402. Run `make <keyboard>-<subproject>-<keymap>-<programmer>`
41
42In the above commands, replace:
43
44* `<keyboard>` with the name of your keyboard
45* `<keymap>` with the name of your keymap
46* `<subproject>` with the name of the subproject (revision or sub-model of your keyboard). For example, for Ergodox it can be `ez` or `infinity`, and for Planck `rev3` or `rev4`.
47 * If the keyboard doesn't have a subproject, or if you are happy with the default (defined in `rules.mk` file of the `keyboard` folder), you can leave it out. But remember to also remove the dash (`-`) from the command.
48* `<programmer>` The programmer to use. Most keyboards use `dfu`, but some use `teensy`. Infinity keyboards use `dfu-util`. Check the readme file in the keyboard folder to find out which programmer to use.
49 * If you don't add `-<programmer` to the command line, the firmware will be still be compiled into a hex file, but the upload will be skipped.
50
51**NOTE:** Some operating systems will refuse to program unless you run the make command as root for example `sudo make clueboard-default-dfu`
52
53## Make Examples
54
55* Build all Clueboard keymaps: `make clueboard`
56* Build the default Planck keymap: `make planck-rev4-default`
57* Build and flash your ergodox-ez: `make ergodox-ez-default-teensy`
58
59# The `config.h` file
60
61There are 2 `config.h` locations:
62
63* keyboard (`/keyboards/<keyboard>/`)
64* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
65
66The keyboard `config.h` is included only if the keymap one doesn't exist. The format to use for your custom one [is here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_config_h_example.h). If you want to override a setting from the parent `config.h` file, you need to do this:
67
68```c
69#undef MY_SETTING
70#define MY_SETTING 4
71```
72
73For a value of `4` for this imaginary setting. So we `undef` it first, then `define` it.
74
75You can then override any settings, rather than having to copy and paste the whole thing. \ No newline at end of file
diff --git a/docs/Report-Descriptor.md b/docs/Report-Descriptor.md
new file mode 100644
index 000000000..fd5e96c67
--- /dev/null
+++ b/docs/Report-Descriptor.md
@@ -0,0 +1 @@
# Get Report Descriptor with lsusb \ No newline at end of file
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md
new file mode 100644
index 000000000..99845a7b6
--- /dev/null
+++ b/docs/SUMMARY.md
@@ -0,0 +1,26 @@
1
2### Getting started
3* [Introduction](/Home.md)
4* [QMK Overview](/QMK-Overview.md)
5* [Build Environment Setup](/Build-Environment-Setup.md)
6
7### Making a keymap
8* [Keymap overview](/Keymap.md)
9* [Keycodes](/Keycodes.md)
10* [Layer switching](/Key-Functions.md)
11* [Leader Key](/Leader-Key.md)
12* [Macros](/Macros.md)
13* [Space Cadet](/Space-Cadet-Shift.md)
14* [Tap Dance](/Tap-Dance.md)
15* [Mouse keys](/Mouse-keys.md)
16* [FAQ: Creating a Keymap](/FAQ-Keymap.md)
17* [FAQ: Compiling QMK](/FAQ-Build.md)
18
19### For hardware makers and modders
20* [Modding your keyboard](/Modding-your-keyboard.md)
21* [Porting your keyboard to QMK](/Porting-your-keyboard-to-QMK.md)
22* [Adding features to QMK](/Adding-features-to-QMK.md)
23
24### Other topics
25* [General FAQ](/FAQ.md)
26* [Differences from TMK](/Differences-from-TMK.md)
diff --git a/docs/Space-Cadet-Shift.md b/docs/Space-Cadet-Shift.md
new file mode 100644
index 000000000..a1ec256de
--- /dev/null
+++ b/docs/Space-Cadet-Shift.md
@@ -0,0 +1,24 @@
1## Space Cadet Shift: The future, built in
2
3Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds.
4
5To use it, use `KC_LSPO` (Left Shift, Parens Open) for your left Shift on your keymap, and `KC_RSPC` (Right Shift, Parens Close) for your right Shift.
6
7It's defaulted to work on US keyboards, but if your layout uses different keys for parenthesis, you can define those in your `config.h` like this:
8
9 #define LSPO_KEY KC_9
10 #define RSPC_KEY KC_0
11
12You can also choose between different rollover behaviors of the shift keys by defining:
13
14 #define DISABLE_SPACE_CADET_ROLLOVER
15
16in your `config.h`. Disabling rollover allows you to use the opposite shift key to cancel the space cadet state in the event of an erroneous press instead of emitting a pair of parentheses when the keys are released.
17
18The only other thing you're going to want to do is create a `Makefile` in your keymap directory and set the following:
19
20```
21COMMAND_ENABLE = no # Commands for debug and configuration
22```
23
24This is just to keep the keyboard from going into command mode when you hold both Shift keys at the same time.
diff --git a/docs/TMK-Based-Projects.md b/docs/TMK-Based-Projects.md
new file mode 100644
index 000000000..0597b04c3
--- /dev/null
+++ b/docs/TMK-Based-Projects.md
@@ -0,0 +1,34 @@
1## TMK based projects
2Add your project here!
3See https://github.com/tmk/tmk_keyboard/issues/173
4
5### keyboards
6**S60-X**: [DIY 60% keyboard](https://www.massdrop.com/buy/sentraq-60-diy-keyboard-kit?mode=guest_open) designed by [VinnyCordeiro](https://github.com/VinnyCordeiro) for Sentraq:
7- https://github.com/VinnyCordeiro/tmk_keyboard
8
9**Octagon V1**: Korean custom keyboard designed by Duck.
10- https://github.com/xauser/tmk_keyboard/tree/xauser
11
12**Compact L3**: Custom keyboard designed by LifeZone and LeeKu.
13- https://github.com/xauser/tmk_keyboard/tree/xauser
14
15**KMAC, 1,2 and Happy**: Custom keyboard designed by kbdmania.
16- https://github.com/ageaenes/tmk_keyboard
17
18**P60**: [DIY wired 60% keyboard](https://imgur.com/a/zwsDN) by [p3lim](https://github.com/p3lim).
19- https://github.com/p3lim/keyboard_firmware
20
21**Nerd, Kitten Paw, Lightsaber, Phantom, Lightpad, Ergodox** on [xauser](https://github.com/xauser)'s repository
22- https://github.com/xauser/tmk_keyboard/tree/xauser
23
24**ErgoDox** on [cub-unanic](https://github.com/cub-uanic)'s repository
25- https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox
26
27**Atreus** by [technomancy](https://atreus.technomancy.us)
28- https://github.com/technomancy/tmk_keyboard/tree/atreus/keyboard/atreus
29
30**[mcdox](https://github.com/DavidMcEwan/mcdox)**
31- https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox
32
33
34### converters \ No newline at end of file
diff --git a/docs/TMK-Own-Projects.md b/docs/TMK-Own-Projects.md
new file mode 100644
index 000000000..fb5b2c990
--- /dev/null
+++ b/docs/TMK-Own-Projects.md
@@ -0,0 +1,69 @@
1## TMK own projects by hasu
2Located in [tmk_keyboard](https://github.com/tmk/tmk_keyboard/tree/master/) repository.
3
4### converter
5* [ps2_usb] - [PS/2 keyboard to USB][GH_ps2]
6* [adb_usb] - [ADB keyboard to USB][GH_adb]
7* [m0110_usb] - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110]
8* [terminal_usb] - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal]
9* [news_usb] - [Sony NEWS keyboard to USB][GH_news]
10* [x68k_usb] - [Sharp X68000 keyboard to USB][GH_x68k]
11* [sun_usb] - [Sun] to USB(type4, 5 and 3?)
12* [pc98_usb] - [PC98] to USB
13* [usb_usb] - USB to USB(experimental)
14* [ascii_usb] - ASCII(Serial console terminal) to USB
15* [ibm4704_usb] - [IBM 4704 keyboard Converter][GH_ibm4704]
16
17### keyboard
18* [hhkb] - [Happy Hacking Keyboard pro][GH_hhkb]
19* [gh60] - [GH60][GH60_diy] DIY 60% keyboard [prototype][GH60_proto]
20* [hbkb] - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod)
21* [hid_liber] - [HID liberation][HID_liber] controller (by alaricljs)
22* [phantom] - [Phantom] keyboard (by Tranquilite)
23* [IIgs_Standard] - Apple [IIGS] keyboard mod(by JeffreySung)
24* [macway] - [Compact keyboard mod][GH_macway] [retired]
25* [KMAC] - Korean custom keyboard
26* [Lightsaber] - Korean custom keyboard
27
28[ps2_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/ps2_usb/
29[adb_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb/
30[m0110_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/m0110_usb
31[terminal_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/terminal_usb/
32[news_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/news_usb/
33[x68k_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/x68k_usb/
34[sun_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/sun_usb/
35[pc98_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/pc98_usb/
36[usb_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb/
37[ascii_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/ascii_usb/
38[ibm4704_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/ibm4704_usb
39[hhkb]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hhkb/
40[gh60]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/gh60/
41[hbkb]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hbkb/
42[hid_liber]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hid_liber/
43[phantom]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/phantom/
44[IIgs_Standard]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/IIgs/
45[macway]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/macway/
46[KMAC]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/kmac/
47[Lightsaber]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/lightsaber/
48
49[GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930
50[GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047
51[GH_ps2]: http://geekhack.org/showwiki.php?title=Island:14618
52[GH_adb]: http://geekhack.org/showwiki.php?title=Island:14290
53[GH_hhkb_bt]: http://geekhack.org/showwiki.php?title=Island:20851
54[GH_m0110]: http://geekhack.org/showwiki.php?title=Island:24965
55[GH_news]: http://geekhack.org/showwiki.php?title=Island:25759
56[GH_terminal]: http://geekhack.org/showwiki.php?title=Island:27272
57[GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060
58[GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483
59[GH_ibm4704]: http://geekhack.org/index.php?topic=54706.0
60[HID_liber]: http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions
61[Phantom]: http://geekhack.org/index.php?topic=26742
62[GH60_diy]: http://geekhack.org/index.php?topic=34959
63[GH60_proto]: http://geekhack.org/index.php?topic=37570.0
64[PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801
65[Sun]: http://en.wikipedia.org/wiki/Sun-3
66[IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS
67
68
69See other [[TMK Based Projects]] \ No newline at end of file
diff --git a/doc/TMK_README.md b/docs/TMK_README.md
index e3438eda2..e3438eda2 100644
--- a/doc/TMK_README.md
+++ b/docs/TMK_README.md
diff --git a/docs/Tap-Dance.md b/docs/Tap-Dance.md
new file mode 100644
index 000000000..25827a648
--- /dev/null
+++ b/docs/Tap-Dance.md
@@ -0,0 +1,144 @@
1# Tap Dance: A single key can do 3, 5, or 100 different things
2
3Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature:
4
5With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter.
6
7To make it clear how this is different from `ACTION_FUNCTION_TAP`, lets explore a certain setup! We want one key to send `Space` on single tap, but `Enter` on double-tap.
8
9With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be send first. Thus, `SPC a` will result in `a SPC` being sent, if they are typed within `TAPPING_TERM`. With the tap dance feature, that'll come out as `SPC a`, correctly.
10
11The implementation hooks into two parts of the system, to achieve this: into `process_record_quantum()`, and the matrix scan. We need the latter to be able to time out a tap sequence even when a key is not being pressed, so `SPC` alone will time out and register after `TAPPING_TERM` time.
12
13But lets start with how to use it, first!
14
15First, you will need `TAP_DANCE_ENABLE=yes` in your `Makefile`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array.
16
17This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are three possible options:
18
19* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held.
20* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action.
21* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets.
22
23The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.
24
25And that's the bulk of it!
26
27And now, on to the explanation of how it works!
28
29The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and the timer.
30
31This means that you have `TAPPING_TERM` time to tap the key again, you do not have to input all the taps within that timeframe. This allows for longer tap counts, with minimal impact on responsiveness.
32
33Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-dance keys.
34
35For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros.
36
37### Examples
38
39Here's a simple example for a single definition:
40
411. In your `makefile`, add `TAP_DANCE_ENABLE = yes`
422. In your `config.h` (which you can copy from `qmk_firmware/keyboards/planck/config.h` to your keymap directory), add `#define TAPPING_TERM 200`
433. In your `keymap.c` file, define the variables and definitions, then add to your keymap:
44
45```c
46//Tap Dance Declarations
47enum {
48 TD_ESC_CAPS = 0
49};
50
51//Tap Dance Definitions
52qk_tap_dance_action_t tap_dance_actions[] = {
53 //Tap once for Esc, twice for Caps Lock
54 [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS)
55// Other declarations would go here, separated by commas, if you have them
56};
57
58//In Layer declaration, add tap dance item in place of a key code
59TD(TD_ESC_CAPS)
60```
61
62Here's a more complex example involving custom actions:
63
64```c
65enum {
66 CT_SE = 0,
67 CT_CLN,
68 CT_EGG,
69 CT_FLSH,
70};
71
72/* Have the above three on the keymap, TD(CT_SE), etc... */
73
74void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
75 if (state->count == 1) {
76 register_code (KC_RSFT);
77 register_code (KC_SCLN);
78 } else {
79 register_code (KC_SCLN);
80 }
81}
82
83void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) {
84 if (state->count == 1) {
85 unregister_code (KC_RSFT);
86 unregister_code (KC_SCLN);
87 } else {
88 unregister_code (KC_SCLN);
89 }
90}
91
92void dance_egg (qk_tap_dance_state_t *state, void *user_data) {
93 if (state->count >= 100) {
94 SEND_STRING ("Safety dance!");
95 reset_tap_dance (state);
96 }
97}
98
99// on each tap, light up one led, from right to left
100// on the forth tap, turn them off from right to left
101void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
102 switch (state->count) {
103 case 1:
104 ergodox_right_led_3_on();
105 break;
106 case 2:
107 ergodox_right_led_2_on();
108 break;
109 case 3:
110 ergodox_right_led_1_on();
111 break;
112 case 4:
113 ergodox_right_led_3_off();
114 _delay_ms(50);
115 ergodox_right_led_2_off();
116 _delay_ms(50);
117 ergodox_right_led_1_off();
118 }
119}
120
121// on the fourth tap, set the keyboard on flash state
122void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
123 if (state->count >= 4) {
124 reset_keyboard();
125 reset_tap_dance(state);
126 }
127}
128
129// if the flash state didnt happen, then turn off leds, left to right
130void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
131 ergodox_right_led_1_off();
132 _delay_ms(50);
133 ergodox_right_led_2_off();
134 _delay_ms(50);
135 ergodox_right_led_3_off();
136}
137
138qk_tap_dance_action_t tap_dance_actions[] = {
139 [CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT)
140 ,[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset)
141 ,[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg)
142 ,[CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset)
143};
144```
diff --git a/docs/Test-for-ASCIIDOC.asciidoc b/docs/Test-for-ASCIIDOC.asciidoc
new file mode 100644
index 000000000..ce57d2781
--- /dev/null
+++ b/docs/Test-for-ASCIIDOC.asciidoc
@@ -0,0 +1,17 @@
1
2
3
4.Makefile
5[source,Makefile]
6----
7# Build Options
8# comment out to disable the options.
9#
10BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
11MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
12EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
13CONSOLE_ENABLE = yes # Console for debug(+400)
14COMMAND_ENABLE = yes # Commands for debug and configuration
15#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
16NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
17---- \ No newline at end of file
diff --git a/docs/USB-HID.md b/docs/USB-HID.md
new file mode 100644
index 000000000..1d0c45869
--- /dev/null
+++ b/docs/USB-HID.md
@@ -0,0 +1,11 @@
1# Getting Report Descriptor
2```
3 $ cd /sys/bus/usb/drivers/usbhid
4 $ ls
5 1-1.3.4:1.0 1-1.3.4:1.2 bind new_id uevent
6 1-1.3.4:1.1 1-1.3.4:1.3 module remove_id unbind
7 $ echo -n 1-1.4\:1.0 | sudo tee unbind
8 $ sudo lsusb -vvv -d 046d:c01d
9 $ echo -n 1-1.4\:1.0 | sudo tee bind
10```
11
diff --git a/doc/USB_NKRO.txt b/docs/USB_NKRO.txt
index d9f1d1229..d9f1d1229 100644
--- a/doc/USB_NKRO.txt
+++ b/docs/USB_NKRO.txt
diff --git a/docs/Unicode-and-additional-language-support.md b/docs/Unicode-and-additional-language-support.md
new file mode 100644
index 000000000..562dae4b5
--- /dev/null
+++ b/docs/Unicode-and-additional-language-support.md
@@ -0,0 +1,54 @@
1## Unicode support
2
3There are three Unicode keymap definition method available in QMK:
4
5### UNICODE_ENABLE
6
7Supports Unicode input up to 0xFFFF. The keycode function is `UC(n)` in
8keymap file, where *n* is a 4 digit hexadecimal.
9
10### UNICODEMAP_ENABLE
11
12Supports Unicode up to 0xFFFFFFFF. You need to maintain a separate mapping
13table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file.
14The keycode function is `X(n)` where *n* is the array index of the mapping
15table.
16
17### UCIS_ENABLE
18
19TBD
20
21Unicode input in QMK works by inputing a sequence of characters to the OS,
22sort of like macro. Unfortunately, each OS has different ideas on how Unicode is inputted.
23
24This is the current list of Unicode input method in QMK:
25
26* UC_OSX: MacOS Unicode Hex Input support. Works only up to 0xFFFF. Disabled by default. To enable: go to System Preferences -> Keyboard -> Input Sources, and enable Unicode Hex.
27* UC_LNX: Unicode input method under Linux. Works up to 0xFFFFF. Should work almost anywhere on ibus enabled distros. Without ibus, this works under GTK apps, but rarely anywhere else.
28* UC_WIN: (not recommended) Windows built-in Unicode input. To enable: create registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad`, set its value to 1, and reboot. This method is not recommended because of reliability and compatibility issue, use WinCompose method below instead.
29* UC_WINC: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows.
30
31## Additional language support
32
33In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware.
34
35## International Characters on Windows
36
37[AutoHotkey](https://autohotkey.com) allows Windows users to create custom hotkeys among others.
38
39The method does not require Unicode support in the keyboard itself but depends instead of AutoHotkey running in the background.
40
41First you need to select a modifier combination that is not in use by any of your programs.
42CtrlAltWin is not used very widely and should therefore be perfect for this.
43There is a macro defined for a mod-tab combo `LCAG_T`.
44Add this mod-tab combo to a key on your keyboard, e.g.: `LCAG_T(KC_TAB)`.
45This makes the key behave like a tab key if pressed and released immediately but changes it to the modifier if used with another key.
46
47In the default script of AutoHotkey you can define custom hotkeys.
48
49 <^<!<#a::Send, ä
50 <^<!<#<+a::Send, Ä
51
52The hotkeys above are for the combination CtrlAltGui and CtrlAltGuiShift plus the letter a.
53AutoHotkey inserts the Text right of `Send, ` when this combination is pressed.
54
diff --git a/docs/Unit-testing.md b/docs/Unit-testing.md
new file mode 100644
index 000000000..3eac62509
--- /dev/null
+++ b/docs/Unit-testing.md
@@ -0,0 +1,68 @@
1# Unit Testing
2
3If you are new to unit testing, then you can find many good resources on internet. However most of it is scattered around in small pieces here and there, and there's also many different opinions, so I won't give any recommendations.
4
5Instead I recommend these two books, explaining two different styles of Unit Testing in detail.
6
7* "Test Driven Development: By Example: Kent Beck"
8* "Growing Object-Oriented Software, Guided By Tests: Steve Freeman, Nat Pryce"
9
10If you prefer videos there are Uncle Bob's [Clean Coders Videos](https://cleancoders.com/), which unfortunately cost quite a bit, especially if you want to watch many of them. But James Shore has a free [Let's Play](http://www.jamesshore.com/Blog/Lets-Play) video series.
11
12## Google Test and Google Mock
13It's possible to Unit Test your code using [Google Test](https://github.com/google/googletest). The Google Test framework also includes another component for writing testing mocks and stubs, called "Google Mock". For information how to write the actual tests, please refer to the documentation on that site.
14
15## Use of C++
16
17Note that Google Test and therefore any test has to be written in C++, even if the rest of the QMK codebases is written in C. This should hopefully not be a problem even if you don't know any C++, since there's quite clear documentation and examples of the required C++ features, and you can write the rest of the test code almost as you would write normal C. Note that some compiler errors which you might get can look quite scary, but just read carefully what it says, and you should be ok.
18
19One thing to remember, is that you have to append `extern "C"` around all of your C file includes.
20
21## Adding tests for new or existing features
22
23If you want to unit test some feature, then take a look at the existing serial_link tests, in the `quantum/serial_link/tests folder`, and follow the steps below to create a similar structure.
24
251. If it doesn't already exist, add a test subfolder to the folder containing the feature.
262. Create a `testlist.mk` and a `rules.mk` file in that folder.
273. Include those files from the root folder `testlist.mk`and `build_test.mk` respectively.
284. Add a new name for your testgroup to the `testlist.mk` file. Each group defined there will be a separate executable. And that's how you can support mocking out different parts. Note that it's worth adding some common prefix, just like it's done for the serial_link tests. The reason for that is that the make command allows substring filtering, so this way you can easily run a subset of the tests.
295. Define the source files and required options in the `rules.mk` file.
30 * `_SRC` for source files
31 * `_DEFS` for additional defines
32 * `_INC` for additional include folders
336. Write the tests in a new cpp file inside the test folder you created. That file has to be one of the files included from the `rules.mk` file.
34
35Note how there's several different tests, each mocking out a separate part. Also note that each of them only compiles the very minimum that's needed for the tests. It's recommend that you try to do the same. For a relevant video check out [Matt Hargett "Advanced Unit Testing in C & C++](https://www.youtube.com/watch?v=Wmy6g-aVgZI)
36
37## Running the tests
38
39To run all the tests in the codebase, type `make test`. You can also run test matching a substring by typing `make test-matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
40
41## Debugging the tests
42
43If there are problems with the tests, you can find the executable in the `./build/test` folder. You should be able to run those with GDB or a similar debugger.
44
45## Full Integration tests
46
47It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing.
48
49In that model you would emulate the input, and expect a certain output from the emulated keyboard.
50
51# Tracing variables
52
53Sometimes you might wonder why a variable gets changed and where, and this can be quite tricky to track down without having a debugger. It's of course possible to manually add print statements to track it, but you can also enable the variable trace feature. This works for both for variables that are changed by the code, and when the variable is changed by some memory corruption.
54
55To take the feature into use add `VARIABLE_TRACE=x` to the end of you make command. `x` represents the number of variables you want to trace, which is usually 1.
56
57Then at a suitable place in the code, call `ADD_TRACED_VARIABLE`, to begin the tracing. For example to trace all the layer changes, you can do this
58```c
59void matrix_init_user(void) {
60 ADD_TRACED_VARIABLE("layer", &layer_state, sizeof(layer_state));
61}
62```
63
64This will add a traced variable named "layer" (the name is just for your information), which tracks the memory location of `layer_state`. It tracks 4 bytes (the size of `layer_state`), so any modification to the variable will be reported. By default you can not specify a size bigger than 4, but you can change it by adding `MAX_VARIABLE_TRACE_SIZE=x` to the end of the make command line.
65
66In order to actually detect changes to the variables you should call `VERIFY_TRACED_VARIABLES` around the code that you think that modifies the variable. If a variable is modified it will tell you between which two `VERIFY_TRACED_VARIABLES` calls the modification happened. You can then add more calls to track it down further. I don't recommend spamming the codebase with calls. It's better to start with a few, and then keep adding them in a binary search fashion. You can also delete the ones you don't need, as each call need to store the file name and line number in the ROM, so you can run out of memory if you add too many calls.
67
68Also remember to delete all the tracing code once you have found the bug, as you wouldn't want to create a pull request with tracing code. \ No newline at end of file
diff --git a/doc/VAGRANT_GUIDE.md b/docs/VAGRANT_GUIDE.md
index 439e78da7..439e78da7 100644
--- a/doc/VAGRANT_GUIDE.md
+++ b/docs/VAGRANT_GUIDE.md
diff --git a/docs/_Sidebar.md b/docs/_Sidebar.md
new file mode 100644
index 000000000..f82c44c3e
--- /dev/null
+++ b/docs/_Sidebar.md
@@ -0,0 +1,21 @@
1* [Wiki Home](/qmk/qmk_firmware/wiki)
2* Getting started
3 * [QMK Overview](QMK-Overview)
4 * [Build Environment Setup](Build-Environment-Setup)
5* [Overview for keymap creators](Keymap)
6 * [Keycodes](Keycodes)
7 * [Layer switching](Key-Functions)
8 * [Leader Key](Leader-Key)
9 * [Macros](Macros)
10 * [Space Cadet](Space-Cadet-Shift)
11 * [Tap Dance](Tap-Dance)
12 * [Mouse keys](Mouse-keys)
13 * [FAQ: Creating a Keymap](FAQ-Keymap)
14 * [FAQ: Compiling QMK](FAQ-Build)
15* For hardware makers and modders
16 * [Modding your keyboard](Modding-your-keyboard)
17 * [Porting your keyboard to QMK](Porting-your-keyboard-to-QMK)
18 * [Adding features to QMK](Adding-features-to-QMK)
19* [General FAQ](FAQ)
20
21
diff --git a/doc/basic_how_keyboards_work.md b/docs/basic_how_keyboards_work.md
index 73c3f5c5f..73c3f5c5f 100644
--- a/doc/basic_how_keyboards_work.md
+++ b/docs/basic_how_keyboards_work.md
diff --git a/doc/build_old.md b/docs/build_old.md
index 5c2d57d02..5c2d57d02 100644
--- a/doc/build_old.md
+++ b/docs/build_old.md
diff --git a/docs/gitbook/images/favicon.ico b/docs/gitbook/images/favicon.ico
new file mode 100644
index 000000000..bd9e65bce
--- /dev/null
+++ b/docs/gitbook/images/favicon.ico
Binary files differ
diff --git a/docs/gitbook/images/favicon.png b/docs/gitbook/images/favicon.png
new file mode 100644
index 000000000..0f3343db0
--- /dev/null
+++ b/docs/gitbook/images/favicon.png
Binary files differ
diff --git a/doc/keycode.txt b/docs/keycode.txt
index 687406fda..3ecf4242e 100644
--- a/doc/keycode.txt
+++ b/docs/keycode.txt
@@ -78,25 +78,25 @@ KC_F9 42 Keyboard F9
78KC_F10 43 Keyboard F10 78KC_F10 43 Keyboard F10
79KC_F11 44 Keyboard F11 79KC_F11 44 Keyboard F11
80KC_F12 45 Keyboard F12 80KC_F12 45 Keyboard F12
81KC_PSCREEN KC_PSCR 46 Keyboard PrintScreen1 81KC_PSCREEN KC_PSCR 46 Keyboard PrintScreen
82KC_SCKLOCK KC_SLCK 47 Keyboard Scroll Lock11 82KC_SCROLLLOCK KC_SLCK 47 Keyboard Scroll Lock
83KC_PAUSE KC_PAUS 48 Keyboard Pause1 83KC_PAUSE KC_PAUS 48 Keyboard Pause
84KC_INSERT KC_INS 49 Keyboard Insert1 84KC_INSERT KC_INS 49 Keyboard Insert
85KC_HOME 4A Keyboard Home1 85KC_HOME 4A Keyboard Home
86KC_PGUP 4B Keyboard PageUp1 86KC_PGUP 4B Keyboard PageUp
87KC_DELETE KC_DEL 4C Keyboard Delete Forward 87KC_DELETE KC_DEL 4C Keyboard Delete Forward
88KC_END 4D Keyboard End1 88KC_END 4D Keyboard End
89KC_PGDOWN KC_PGDN 4E Keyboard PageDown1 89KC_PGDOWN KC_PGDN 4E Keyboard PageDown
90KC_RIGHT KC_RGHT 4F Keyboard RightArrow1 90KC_RIGHT KC_RGHT 4F Keyboard RightArrow
91KC_LEFT 50 Keyboard LeftArrow1 91KC_LEFT 50 Keyboard LeftArrow
92KC_DOWN 51 Keyboard DownArrow1 92KC_DOWN 51 Keyboard DownArrow
93KC_UP 52 Keyboard UpArrow1 93KC_UP 52 Keyboard UpArrow
94KC_NUMLOCK KC_NLCK 53 Keypad Num Lock and Clear11 94KC_NUMLOCK KC_NLCK 53 Keypad Num Lock and Clear
95KC_KP_SLASH KC_PSLS 54 Keypad / 95KC_KP_SLASH KC_PSLS 54 Keypad /
96KC_KP_ASTERISK KC_PAST 55 Keypad * 96KC_KP_ASTERISK KC_PAST 55 Keypad *
97KC_KP_MINUS KC_PMNS 56 Keypad - 97KC_KP_MINUS KC_PMNS 56 Keypad -
98KC_KP_PLUS KC_PPLS 57 Keypad + 98KC_KP_PLUS KC_PPLS 57 Keypad +
99KC_KP_ENTER KC_PENT 58 Keypad ENTER5 99KC_KP_ENTER KC_PENT 58 Keypad ENTER
100KC_KP_1 KC_P1 59 Keypad 1 and End 100KC_KP_1 KC_P1 59 Keypad 1 and End
101KC_KP_2 KC_P2 5A Keypad 2 and Down Arrow 101KC_KP_2 KC_P2 5A Keypad 2 and Down Arrow
102KC_KP_3 KC_P3 5B Keypad 3 and PageDn 102KC_KP_3 KC_P3 5B Keypad 3 and PageDn
@@ -109,8 +109,8 @@ KC_KP_9 KC_P9 61 Keypad 9 and PageUp
109KC_KP_0 KC_P0 62 Keypad 0 and Insert 109KC_KP_0 KC_P0 62 Keypad 0 and Insert
110KC_KP_DOT KC_PDOT 63 Keypad . and Delete 110KC_KP_DOT KC_PDOT 63 Keypad . and Delete
111KC_NONUS_BSLASH KC_NUBS 64 Keyboard Non-US \ and | 111KC_NONUS_BSLASH KC_NUBS 64 Keyboard Non-US \ and |
112KC_APPLICATION KC_APP 65 Keyboard Application10 112KC_APPLICATION KC_APP 65 Keyboard Application
113KC_POWER 66 Keyboard Power9 113KC_POWER 66 Keyboard Power
114KC_KP_EQUAL KC_PEQL 67 Keypad = 114KC_KP_EQUAL KC_PEQL 67 Keypad =
115KC_F13 68 Keyboard F13 115KC_F13 68 Keyboard F13
116KC_F14 69 Keyboard F14 116KC_F14 69 Keyboard F14
@@ -138,12 +138,12 @@ KC_FIND 7E Keyboard Find
138KC__MUTE 7F Keyboard Mute 138KC__MUTE 7F Keyboard Mute
139KC__VOLUP 80 Keyboard Volume Up 139KC__VOLUP 80 Keyboard Volume Up
140KC__VOLDOWN 81 Keyboard Volume Down 140KC__VOLDOWN 81 Keyboard Volume Down
141KC_LOCKING_CAPS 82 Keyboard Locking Caps Lock12 141KC_LOCKING_CAPS 82 Keyboard Locking Caps Lock
142KC_LOCKING_NUM 83 Keyboard Locking Num Lock12 142KC_LOCKING_NUM 83 Keyboard Locking Num Lock
143KC_LOCKING_SCROLL 84 Keyboard Locking Scroll Lock12 143KC_LOCKING_SCROLL 84 Keyboard Locking Scroll Lock
144KC_KP_COMMA KC_PCMM 85 Keypad Comma27 144KC_KP_COMMA KC_PCMM 85 Keypad Comma
145KC_KP_EQUAL_AS400 86 Keypad Equal Sign29 145KC_KP_EQUAL_AS400 86 Keypad Equal Sign
146KC_INT1 KC_RO 87 Keyboard International115,28 146KC_INT1 KC_RO 87 Keyboard International115
147KC_INT2 KC_KANA 88 Keyboard International216 147KC_INT2 KC_KANA 88 Keyboard International216
148KC_INT3 KC_JYEN 89 Keyboard International317 148KC_INT3 KC_JYEN 89 Keyboard International317
149KC_INT4 KC_HENK 8A Keyboard International418 149KC_INT4 KC_HENK 8A Keyboard International418
@@ -161,8 +161,8 @@ KC_LANG6 95 Keyboard LANG68
161KC_LANG7 96 Keyboard LANG78 161KC_LANG7 96 Keyboard LANG78
162KC_LANG8 97 Keyboard LANG88 162KC_LANG8 97 Keyboard LANG88
163KC_LANG9 98 Keyboard LANG98 163KC_LANG9 98 Keyboard LANG98
164KC_ALT_ERASE 99 Keyboard Alternate Erase7 164KC_ALT_ERASE 99 Keyboard Alternate Erase
165KC_SYSREQ 9A Keyboard SysReq/Attention1 165KC_SYSREQ 9A Keyboard SysReq/Attention
166KC_CANCEL 9B Keyboard Cancel 166KC_CANCEL 9B Keyboard Cancel
167KC_CLEAR 9C Keyboard Clear 167KC_CLEAR 9C Keyboard Clear
168KC_PRIOR 9D Keyboard Prior 168KC_PRIOR 9D Keyboard Prior
diff --git a/doc/keymap_config_h_example.h b/docs/keymap_config_h_example.h
index 8893d122e..8893d122e 100644
--- a/doc/keymap_config_h_example.h
+++ b/docs/keymap_config_h_example.h
diff --git a/doc/keymap_makefile_example.mk b/docs/keymap_makefile_example.mk
index f4671a9d1..f4671a9d1 100644
--- a/doc/keymap_makefile_example.mk
+++ b/docs/keymap_makefile_example.mk
diff --git a/doc/keymap.md b/docs/keymap_old.md
index 3ea138ea8..3ea138ea8 100644
--- a/doc/keymap.md
+++ b/docs/keymap_old.md
diff --git a/docs/mbed-cortex-porting.md b/docs/mbed-cortex-porting.md
new file mode 100644
index 000000000..b4b1314e6
--- /dev/null
+++ b/docs/mbed-cortex-porting.md
@@ -0,0 +1,36 @@
1## supported projects
2### PS/2 converter
3Confirmed it works on NXP LPC11U35.
4- http://developer.mbed.org/platforms/TG-LPC11U35-501/
5
6### Infinity keyboard
7It runs on Freescale MK20DX128.
8
9
10
11## compile error: cstddef
12Experienced this with arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2 on ubuntu 14.04.
13
14And resolved with 4.9.3 installed from:
15- https://launchpad.net/gcc-arm-embedded
16- https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded
17
18```
19$ make -f Makefile.mbed
20mkdir -p build/.
21arm-none-eabi-g++ -include config_mbed.h -mcpu=cortex-m0 -mthumb -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fshort-wchar -fno-builtin -MMD -MP -DNDEBUG -Os -DTARGET_LPC11U35_401 -DTARGET_M0 -DTARGET_NXP -DTARGET_LPC11UXX -DTOOLCHAIN_GCC_ARM -DTOOLCHAIN_GCC -D__CORTEX_M0 -DARM_MATH_CM0 -DMBED_BUILD_TIMESTAMP=1399108688.49 -D__MBED__=1 -std=gnu++98 -I. -I../../mbed-sdk/libraries/mbed/targets -I../../mbed-sdk/libraries/mbed/targets/cmsis -I../../mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP -I../../mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX -I../../mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM -I../../mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11U35_501 -I../../mbed-sdk/libraries/mbed/targets/hal -I../../mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP -I../../mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX -I../../mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_MCU_LPC11U35_501 -I../../mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_MCU_LPC11U35_501/TARGET_LPC11U35_501 -I../../mbed-sdk/libraries/mbed -I../../mbed-sdk/libraries/mbed/hal -I../../mbed-sdk/libraries/mbed/api -I../../mbed-sdk/libraries/mbed/common -I../../mbed-sdk/libraries/USBDevice -I../../mbed-sdk/libraries/USBDevice/USBHID -I../../mbed-sdk/libraries/USBDevice/USBDevice -I../../mbed-sdk/libraries/USBDevice/USBAudio -I../../mbed-sdk/libraries/USBDevice/USBSerial -I../../mbed-sdk/libraries/USBDevice/USBMSD -I../../mbed-sdk/libraries/USBDevice/USBMIDI -I../../protocol/mbed -I../../common -I../../protocol -o build/./main.o main.cpp
22In file included from ../../mbed-sdk/libraries/mbed/api/mbed.h:21:0,
23 from main.cpp:1:
24../../mbed-sdk/libraries/mbed/api/platform.h:25:19: fatal error: cstddef: No such file or directory
25 #include <cstddef>
26 ^
27compilation terminated.
28make: *** [build/./main.o] Error 1
29
30[13:13] noname@desk:/mnt/old_root/home/noname/tmp/tmk_keyboard/converter/ps2_usb
31$ arm-none-eabi-gcc --version
32arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2
33Copyright (C) 2013 Free Software Foundation, Inc.
34This is free software; see the source for copying conditions. There is NO
35warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36``` \ No newline at end of file
diff --git a/doc/other_projects.md b/docs/other_projects.md
index bf980b0a9..bf980b0a9 100644
--- a/doc/other_projects.md
+++ b/docs/other_projects.md
diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c
index d10bfe3bf..c324078dd 100644
--- a/keyboards/atomic/keymaps/pvc/keymap.c
+++ b/keyboards/atomic/keymaps/pvc/keymap.c
@@ -255,7 +255,7 @@ float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
255 255
256#endif /* AUDIO_ENABLE */ 256#endif /* AUDIO_ENABLE */
257 257
258void persistant_default_layer_set(uint16_t default_layer) 258void persistent_default_layer_set(uint16_t default_layer)
259{ 259{
260 eeconfig_update_default_layer(default_layer); 260 eeconfig_update_default_layer(default_layer);
261 default_layer_set(default_layer); 261 default_layer_set(default_layer);
@@ -366,7 +366,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
366 case MACRO_QWERTY: 366 case MACRO_QWERTY:
367 if (record->event.pressed) 367 if (record->event.pressed)
368 { 368 {
369 persistant_default_layer_set(1UL<<LAYER_QWERTY); 369 persistent_default_layer_set(1UL<<LAYER_QWERTY);
370 } 370 }
371 break; 371 break;
372 372
diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png
deleted file mode 100644
index 1d5bd78db..000000000
--- a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png
deleted file mode 100644
index cf4db3e2c..000000000
--- a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png
deleted file mode 100644
index 30e5621e4..000000000
--- a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png
deleted file mode 100644
index 95f8be5e0..000000000
--- a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png
deleted file mode 100644
index 3c445f90c..000000000
--- a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/atreus/keymaps/replicaJunction/readme.md b/keyboards/atreus/keymaps/replicaJunction/readme.md
index 6ac3cb00a..6a330bdbf 100644
--- a/keyboards/atreus/keymaps/replicaJunction/readme.md
+++ b/keyboards/atreus/keymaps/replicaJunction/readme.md
@@ -10,7 +10,7 @@ I won't claim that this layout is perfect for everyone. It does make several sig
10 10
11## Base Layer ## 11## Base Layer ##
12 12
13![Atreus base layout](atreus-replica-base.png) 13![Atreus base layout](http://imgur.com/YbOjS7O)
14 14
15The letters on this layout are arranged in the [Colemak Mod-DH layout](https://colemakmods.github.io/mod-dh/). 15The letters on this layout are arranged in the [Colemak Mod-DH layout](https://colemakmods.github.io/mod-dh/).
16 16
@@ -22,7 +22,7 @@ In addition to the Shift keys, there are three dual-purpose keys: Ctrl (Delete),
22 22
23## Extend Layer ## 23## Extend Layer ##
24 24
25![Atreus extend layer](atreus-replica-extend.png) 25![Atreus extend layer](http://imgur.com/WiKkMQw)
26 26
27This layout is designed primarily for keyboard navigation. Arrow keys are easily accessible under the right hand (a welcome change from the original Atreus layout, which places them under the left hand), along with Home/End and PgUp/PgDn. 27This layout is designed primarily for keyboard navigation. Arrow keys are easily accessible under the right hand (a welcome change from the original Atreus layout, which places them under the left hand), along with Home/End and PgUp/PgDn.
28 28
@@ -34,7 +34,7 @@ The Space key exists to prevent going from this layer directly into the Number l
34 34
35## Number and Symbol Layer ## 35## Number and Symbol Layer ##
36 36
37![Atreus number and symbol layer](atreus-replica-num.png) 37![Atreus number and symbol layer](http://imgur.com/gfTXcjC)
38 38
39This layer provides the only way of accessing number keys on this keyboard, since it's too small for its own number row. Note that even though they are laid out in the number pad fashion, they send the "regular" number keystrokes. Games and programs that specifically use NumPad keys are not supported in this layout at the moment. 39This layer provides the only way of accessing number keys on this keyboard, since it's too small for its own number row. Note that even though they are laid out in the number pad fashion, they send the "regular" number keystrokes. Games and programs that specifically use NumPad keys are not supported in this layout at the moment.
40 40
@@ -42,7 +42,7 @@ This layer also provides plenty of symbol shortcuts. Most of these can be access
42 42
43## Function Layer ## 43## Function Layer ##
44 44
45![Atreus function layer](atreus-replica-function.png) 45![Atreus function layer](http://imgur.com/m5x0MxZ)
46 46
47Function keys (F1-F12) are on this layer. Their layout in groups of four comes from Jeremy's Atreus layout in this repository. I'd been using 1-9 in a numpad layout, then adding 10-12 on the side...I suppose it took seeing someone else do it this way for me to realize how much more sense it makes. 47Function keys (F1-F12) are on this layer. Their layout in groups of four comes from Jeremy's Atreus layout in this repository. I'd been using 1-9 in a numpad layout, then adding 10-12 on the side...I suppose it took seeing someone else do it this way for me to realize how much more sense it makes.
48 48
@@ -52,7 +52,7 @@ Finally, the reset key is on this layer, as well as toggles from Colemak to QWER
52 52
53## Gaming Layer ## 53## Gaming Layer ##
54 54
55![Atreus gaming layer](atreus-replica-game.png) 55![Atreus gaming layer](http://imgur.com/4S5AO4E)
56 56
57This is a small layer developed to allow some simple gameplay without a mouse. This layer is a toggle (from the Number layer), so it is designed to stay on while in use. 57This is a small layer developed to allow some simple gameplay without a mouse. This layer is a toggle (from the Number layer), so it is designed to stay on while in use.
58 58
diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c
index ed943eb66..347445ef6 100644
--- a/keyboards/atreus/keymaps/xyverz/keymap.c
+++ b/keyboards/atreus/keymaps/xyverz/keymap.c
@@ -168,7 +168,7 @@ const uint16_t PROGMEM fn_actions[] = {
168 168
169}; 169};
170 170
171void persistant_default_layer_set(uint16_t default_layer) { 171void persistent_default_layer_set(uint16_t default_layer) {
172 eeconfig_update_default_layer(default_layer); 172 eeconfig_update_default_layer(default_layer);
173 default_layer_set(default_layer); 173 default_layer_set(default_layer);
174} 174}
@@ -177,25 +177,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
177 switch (keycode) { 177 switch (keycode) {
178 case QWERTY: 178 case QWERTY:
179 if (record->event.pressed) { 179 if (record->event.pressed) {
180 persistant_default_layer_set(1UL<<_QWERTY); 180 persistent_default_layer_set(1UL<<_QWERTY);
181 } 181 }
182 return false; 182 return false;
183 break; 183 break;
184 case COLEMAK: 184 case COLEMAK:
185 if (record->event.pressed) { 185 if (record->event.pressed) {
186 persistant_default_layer_set(1UL<<_COLEMAK); 186 persistent_default_layer_set(1UL<<_COLEMAK);
187 } 187 }
188 return false; 188 return false;
189 break; 189 break;
190 case DVORAK: 190 case DVORAK:
191 if (record->event.pressed) { 191 if (record->event.pressed) {
192 persistant_default_layer_set(1UL<<_DVORAK); 192 persistent_default_layer_set(1UL<<_DVORAK);
193 } 193 }
194 return false; 194 return false;
195 break; 195 break;
196 case DVORMAC: 196 case DVORMAC:
197 if (record->event.pressed) { 197 if (record->event.pressed) {
198 persistant_default_layer_set(1UL<<_DVORMAC); 198 persistent_default_layer_set(1UL<<_DVORMAC);
199 } 199 }
200 return false; 200 return false;
201 break; 201 break;
diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md
index 7bb5da9fc..e65bf5de1 100644
--- a/keyboards/atreus62/keymaps/mneme/README.md
+++ b/keyboards/atreus62/keymaps/mneme/README.md
@@ -21,7 +21,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym
21 21
22## Base layer 22## Base layer
23 23
24![Base layer](img/base.png) 24![Base layer](http://imgur.com/zTYxnE0)
25 25
26 26
27* The number row doubles as a function row. Short presses produces numbers, long presses produces Fxx 27* The number row doubles as a function row. Short presses produces numbers, long presses produces Fxx
@@ -40,14 +40,14 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym
40 40
41## Nav layer 41## Nav layer
42 42
43![Nav layer](img/fun.png) 43![Nav layer](http://imgur.com/cbMWVDC)
44 44
45Basic navigation on the right hand and modifiers close 45Basic navigation on the right hand and modifiers close
46by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. 46by for the left. The latter because I tend to use `ctrl+arrows` quite a lot.
47 47
48## Sym layer 48## Sym layer
49 49
50![Sym layer](img/sym.png) 50![Sym layer](http://imgur.com/n2jmqFU)
51 51
52* Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could. 52* Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could.
53 53
diff --git a/keyboards/atreus62/keymaps/mneme/img/base.png b/keyboards/atreus62/keymaps/mneme/img/base.png
deleted file mode 100644
index 3e77a5183..000000000
--- a/keyboards/atreus62/keymaps/mneme/img/base.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/atreus62/keymaps/mneme/img/fun.png b/keyboards/atreus62/keymaps/mneme/img/fun.png
deleted file mode 100644
index 961a19724..000000000
--- a/keyboards/atreus62/keymaps/mneme/img/fun.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/atreus62/keymaps/mneme/img/sym.png b/keyboards/atreus62/keymaps/mneme/img/sym.png
deleted file mode 100644
index 5e2c80335..000000000
--- a/keyboards/atreus62/keymaps/mneme/img/sym.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c
index 7b7c69f57..67e66584a 100644
--- a/keyboards/atreus62/keymaps/xyverz/keymap.c
+++ b/keyboards/atreus62/keymaps/xyverz/keymap.c
@@ -119,7 +119,7 @@ const uint16_t PROGMEM fn_actions[] = {
119 119
120}; 120};
121 121
122void persistant_default_layer_set(uint16_t default_layer) { 122void persistent_default_layer_set(uint16_t default_layer) {
123 eeconfig_update_default_layer(default_layer); 123 eeconfig_update_default_layer(default_layer);
124 default_layer_set(default_layer); 124 default_layer_set(default_layer);
125} 125}
@@ -128,25 +128,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
128 switch (keycode) { 128 switch (keycode) {
129 case QWERTY: 129 case QWERTY:
130 if (record->event.pressed) { 130 if (record->event.pressed) {
131 persistant_default_layer_set(1UL<<_QWERTY); 131 persistent_default_layer_set(1UL<<_QWERTY);
132 } 132 }
133 return false; 133 return false;
134 break; 134 break;
135 case COLEMAK: 135 case COLEMAK:
136 if (record->event.pressed) { 136 if (record->event.pressed) {
137 persistant_default_layer_set(1UL<<_COLEMAK); 137 persistent_default_layer_set(1UL<<_COLEMAK);
138 } 138 }
139 return false; 139 return false;
140 break; 140 break;
141 case DVORAK: 141 case DVORAK:
142 if (record->event.pressed) { 142 if (record->event.pressed) {
143 persistant_default_layer_set(1UL<<_DVORAK); 143 persistent_default_layer_set(1UL<<_DVORAK);
144 } 144 }
145 return false; 145 return false;
146 break; 146 break;
147 case WOW: 147 case WOW:
148 if (record->event.pressed) { 148 if (record->event.pressed) {
149 persistant_default_layer_set(1UL<<_WOW); 149 persistent_default_layer_set(1UL<<_WOW);
150 } 150 }
151 return false; 151 return false;
152 break; 152 break;
diff --git a/keyboards/clueboard/keymaps/caps_fn/layout.png b/keyboards/clueboard/keymaps/caps_fn/layout.png
deleted file mode 100644
index a5bd57adb..000000000
--- a/keyboards/clueboard/keymaps/caps_fn/layout.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/caps_fn/readme.md b/keyboards/clueboard/keymaps/caps_fn/readme.md
index 74ad01fca..47a530a80 100644
--- a/keyboards/clueboard/keymaps/caps_fn/readme.md
+++ b/keyboards/clueboard/keymaps/caps_fn/readme.md
@@ -1,13 +1,4 @@
1``` 1![Clueboard Layout Image](http://i.imgur.com/kGADucy.png)
2 ___ _____ _ _ _ __ __ _ __
3|__ \ / ____| | | | | | / / / /(_) / /
4 ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
5 |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
6 |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
7 (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
8```
9
10![Clueboard Layout Image](layout.png)
11 2
12# Caps Fn Layout 3# Caps Fn Layout
13 4
diff --git a/keyboards/clueboard/keymaps/default/layout.png b/keyboards/clueboard/keymaps/default/layout.png
deleted file mode 100644
index cd318163e..000000000
--- a/keyboards/clueboard/keymaps/default/layout.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/default/readme.md b/keyboards/clueboard/keymaps/default/readme.md
index cede17ee1..019131aeb 100644
--- a/keyboards/clueboard/keymaps/default/readme.md
+++ b/keyboards/clueboard/keymaps/default/readme.md
@@ -1,13 +1,4 @@
1``` 1![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png)
2 ___ _____ _ _ _ __ __ _ __
3|__ \ / ____| | | | | | / / / /(_) / /
4 ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
5 |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
6 |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
7 (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
8```
9
10![Clueboard Layout Image](layout.png)
11 2
12# Default Clueboard Layout 3# Default Clueboard Layout
13 4
diff --git a/keyboards/clueboard/keymaps/jokrik/keymap.c b/keyboards/clueboard/keymaps/jokrik/keymap.c
new file mode 100644
index 000000000..acde4d9e1
--- /dev/null
+++ b/keyboards/clueboard/keymaps/jokrik/keymap.c
@@ -0,0 +1,86 @@
1#include "clueboard.h"
2
3// Helpful defines
4#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
5#define _______ KC_TRNS
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 _BL 0
12#define _FL 1
13#define _CL 2
14
15const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
16 /* Keymap _BL: Base Layer (Default Layer)
17 */
18[_BL] = KEYMAP(
19 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PSCR, \
20 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PAUS, \
21 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_NUHS, KC_ENT, \
22 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_RO, KC_RSFT, KC_UP, \
23 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC,KC_SPC, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
24
25 /* Keymap _FL: Function Layer
26 */
27[_FL] = KEYMAP(
28 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_INS, KC_DEL, BL_STEP, \
29 _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \
30 _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
31 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \
32 _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END),
33
34 /* Keymap _CL: Control layer
35 */
36[_CL] = KEYMAP(
37 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
38 _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \
39 _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
40 MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \
41 _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, MO(_FL), _______, RGB_HUD, RGB_SAD, RGB_HUI),
42};
43
44/* This is a list of user defined functions. F(N) corresponds to item N
45 of this list.
46 */
47const uint16_t PROGMEM fn_actions[] = {
48 [0] = ACTION_FUNCTION(0), // Calls action_function()
49};
50
51void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
52 static uint8_t mods_pressed;
53 static bool mod_flag;
54
55 switch (id) {
56 case 0:
57 /* Handle the combined Grave/Esc key
58 */
59 mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
60
61 if (record->event.pressed) {
62 /* The key is being pressed.
63 */
64 if (mods_pressed) {
65 mod_flag = true;
66 add_key(KC_GRV);
67 send_keyboard_report();
68 } else {
69 add_key(KC_ESC);
70 send_keyboard_report();
71 }
72 } else {
73 /* The key is being released.
74 */
75 if (mod_flag) {
76 mod_flag = false;
77 del_key(KC_GRV);
78 send_keyboard_report();
79 } else {
80 del_key(KC_ESC);
81 send_keyboard_report();
82 }
83 }
84 break;
85 }
86}
diff --git a/keyboards/clueboard/keymaps/jokrik/readme.md b/keyboards/clueboard/keymaps/jokrik/readme.md
new file mode 100644
index 000000000..a845e65f1
--- /dev/null
+++ b/keyboards/clueboard/keymaps/jokrik/readme.md
@@ -0,0 +1,2 @@
1# Jokrik's Clueboard Layout
2
diff --git a/keyboards/clueboard/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/keymaps/mac_optimized/keymap.c
index 7ea02d27e..e72733092 100644
--- a/keyboards/clueboard/keymaps/mac_optimized/keymap.c
+++ b/keyboards/clueboard/keymaps/mac_optimized/keymap.c
@@ -50,35 +50,28 @@ const uint16_t PROGMEM fn_actions[] = {
50 50
51void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { 51void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
52 static uint8_t mods_pressed; 52 static uint8_t mods_pressed;
53 static bool mod_flag;
54 53
55 switch (id) { 54 switch (id) {
56 case 0: 55 case 0:
57 /* Handle the combined Grave/Esc key 56 /* Handle the combined Grave/Esc key
58 */ 57 */
59 mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
60
61 if (record->event.pressed) { 58 if (record->event.pressed) {
62 /* The key is being pressed. 59 /* The key is being pressed.
63 */ 60 */
61 mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
64 if (mods_pressed) { 62 if (mods_pressed) {
65 mod_flag = true; 63 register_code(KC_GRV);
66 add_key(KC_GRV);
67 send_keyboard_report();
68 } else { 64 } else {
69 add_key(KC_ESC); 65 register_code(KC_ESC);
70 send_keyboard_report();
71 } 66 }
72 } else { 67 } else {
73 /* The key is being released. 68 /* The key is being released.
74 */ 69 */
75 if (mod_flag) { 70 if (mods_pressed) {
76 mod_flag = false; 71 mods_pressed = false;
77 del_key(KC_GRV); 72 unregister_code(KC_GRV);
78 send_keyboard_report();
79 } else { 73 } else {
80 del_key(KC_ESC); 74 unregister_code(KC_ESC);
81 send_keyboard_report();
82 } 75 }
83 } 76 }
84 break; 77 break;
diff --git a/keyboards/clueboard/keymaps/mac_optimized/layout.png b/keyboards/clueboard/keymaps/mac_optimized/layout.png
deleted file mode 100644
index e84ba54ea..000000000
--- a/keyboards/clueboard/keymaps/mac_optimized/layout.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/mac_optimized/readme.md b/keyboards/clueboard/keymaps/mac_optimized/readme.md
index 940e09125..282da369d 100644
--- a/keyboards/clueboard/keymaps/mac_optimized/readme.md
+++ b/keyboards/clueboard/keymaps/mac_optimized/readme.md
@@ -1,13 +1,4 @@
1``` 1![Clueboard Layout Image](http://i.imgur.com/7oZCsHF.png)
2 ___ _____ _ _ _ __ __ _ __
3|__ \ / ____| | | | | | / / / /(_) / /
4 ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
5 |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
6 |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
7 (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
8```
9
10![Clueboard Layout Image](layout.png)
11 2
12# Default Clueboard Layout for Mac 3# Default Clueboard Layout for Mac
13 4
diff --git a/keyboards/clueboard/keymaps/magicmonty/Makefile b/keyboards/clueboard/keymaps/magicmonty/Makefile
new file mode 100644
index 000000000..1ae727708
--- /dev/null
+++ b/keyboards/clueboard/keymaps/magicmonty/Makefile
@@ -0,0 +1,2 @@
1MOUSEKEY_ENABLE = yes
2EXTRAKEY_ENABLE = yes
diff --git a/keyboards/clueboard/keymaps/magicmonty/keymap.c b/keyboards/clueboard/keymaps/magicmonty/keymap.c
new file mode 100644
index 000000000..6ca843aab
--- /dev/null
+++ b/keyboards/clueboard/keymaps/magicmonty/keymap.c
@@ -0,0 +1,157 @@
1#include "clueboard.h"
2
3// Helpful defines
4#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
5#define _______ KC_TRNS
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 _BL 0
12#define _FL 1
13#define _ME 2
14#define _CL 3
15#define _ML 4
16
17const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
18 /* Keymap _BL: Base Layer (Default Layer)
19 */
20 [_BL] = KEYMAP(
21 F(0), 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, \
22 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, \
23 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_NUHS, KC_ENT, \
24 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, \
25 KC_LCTL, KC_LGUI, KC_LALT, _______, LT(_ML, KC_SPC),LT(_ML, KC_SPC), _______, KC_RALT, MO(_ME), MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
26
27 /* Keymap _FL: Function Layer
28 */
29 [_FL] = KEYMAP(
30 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, _______, _______, BL_STEP, \
31 _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,_______, KC_PAUS, _______, _______, _______, _______, \
32 MO(_FL), _______, MO(_CL),_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RGHT, _______, _______, _______, _______, \
33 _______, _______, _______,_______,_______,_______,_______,_______,MO(_ME),_______, _______, _______, _______, _______, KC_PGUP, \
34 _______, _______, _______,_______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END),
35
36 /* Keymap _ME: Media layer
37 */
38 [_ME] = KEYMAP(
39 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \
40 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_VOLD, \
41 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
42 MO(_FL), _______, _______,_______,_______,_______,_______,_______,MO(_ME),_______, _______, _______, _______, MO(_FL), _______, \
43 _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, KC_MPRV, KC_MPLY,KC_MNXT),
44
45 /* Keymap _CL: Control layer
46 */
47 [_CL] = KEYMAP(
48 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
49 _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \
50 _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
51 MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \
52 _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI),
53
54 /* Keymap _ML: Mouse layer
55 */
56 [_ML] = KEYMAP(
57 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, \
58 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, \
59 _______, _______, KC_BTN3,KC_BTN2,KC_BTN1,_______,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R, _______, _______, _______, _______, \
60 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MS_U, \
61 _______, _______, _______,_______, LT(_ML, KC_SPC),LT(_ML, KC_SPC), _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_MS_L, KC_MS_D,KC_MS_R),
62};
63
64/* This is a list of user defined functions. F(N) corresponds to item N
65 of this list.
66 */
67const uint16_t PROGMEM fn_actions[] = {
68 [0] = ACTION_FUNCTION(0), // Calls action_function()
69};
70
71void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
72 static uint8_t mods_pressed;
73 static bool mod_flag;
74
75 switch (id) {
76 case 0:
77 /* Handle the combined Grave/Esc key
78 */
79 mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
80
81 if (record->event.pressed) {
82 /* The key is being pressed.
83 */
84 if (mods_pressed) {
85 mod_flag = true;
86 add_key(KC_GRV);
87 send_keyboard_report();
88 } else {
89 add_key(KC_ESC);
90 send_keyboard_report();
91 }
92 } else {
93 /* The key is being released.
94 */
95 if (mod_flag) {
96 mod_flag = false;
97 del_key(KC_GRV);
98 send_keyboard_report();
99 } else {
100 del_key(KC_ESC);
101 send_keyboard_report();
102 }
103 }
104 break;
105 }
106}
107
108enum layer_id {
109 LAYER_BASE,
110 LAYER_FUNCTION,
111 LAYER_MEDIA,
112 LAYER_CONTROL,
113 LAYER_MOUSE
114};
115
116void clueboard_set_led(uint8_t id) {
117 switch (id) {
118 case LAYER_BASE:
119 rgblight_sethsv_noeeprom(346, 0, 255);
120 break;
121 case LAYER_FUNCTION:
122 rgblight_sethsv_noeeprom(46, 255, 255);
123 break;
124 case LAYER_MEDIA:
125 rgblight_sethsv_noeeprom(86, 255, 255);
126 break;
127 case LAYER_CONTROL:
128 rgblight_sethsv_noeeprom(346, 255, 255);
129 break;
130 case LAYER_MOUSE:
131 rgblight_sethsv_noeeprom(206, 255, 255);
132 break;
133 }
134};
135
136void matrix_scan_user(void) {
137 rgblight_config_t rgblight_config;
138 rgblight_config.raw = eeconfig_read_rgblight();
139
140 if (!rgblight_config.enable || rgblight_config.mode != 1) { return; }
141
142 uint32_t layer = layer_state;
143
144 if (layer & (1<<_FL)) {
145 if (layer & (1<<_ME)) {
146 clueboard_set_led(LAYER_MEDIA);
147 } else if (layer & (1<<_CL)) {
148 clueboard_set_led(LAYER_CONTROL);
149 } else {
150 clueboard_set_led(LAYER_FUNCTION);
151 }
152 } else if (layer & (1<<_ML)) {
153 clueboard_set_led(LAYER_MOUSE);
154 } else {
155 clueboard_set_led(LAYER_BASE);
156 }
157};
diff --git a/keyboards/clueboard/keymaps/magicmonty/readme.md b/keyboards/clueboard/keymaps/magicmonty/readme.md
new file mode 100644
index 000000000..2959172df
--- /dev/null
+++ b/keyboards/clueboard/keymaps/magicmonty/readme.md
@@ -0,0 +1,23 @@
1![Clueboard Layout Image](http://i.imgur.com/ngg4EAY.png)
2
3# MouseKeys Layout
4
5This layout is a combination of the `mouse_keys` and the `win_optimized` layouts.
6This layout is optimized for an ISO layout.
7
8It adds a mouse layer. When you hold down the spacebar the arrow keys
9will move your mouse cursor. You can click using the 3 mods to the left of the
10arrow keys, or the 3 keys under your primary fingers on the home row.
11The Left, Down, Up and Right for the mouse movement are also VIM-Like on the HJKL keys
12
13The CapsLock is disabled and works as Function key.
14
15There is also a separate media layer with Volume/Play controls
16
17The different layers are signalled throug setting of the underlight:
18
19- Base layer: White
20- Function layer: Yellow
21- Media layer: Green
22- Mouse layer: Blue
23- Control layer: Red
diff --git a/keyboards/clueboard/keymaps/maximised/layout.png b/keyboards/clueboard/keymaps/maximised/layout.png
deleted file mode 100644
index bdc5d7623..000000000
--- a/keyboards/clueboard/keymaps/maximised/layout.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/maximised/readme.md b/keyboards/clueboard/keymaps/maximised/readme.md
index b95d1750f..fc82e6879 100644
--- a/keyboards/clueboard/keymaps/maximised/readme.md
+++ b/keyboards/clueboard/keymaps/maximised/readme.md
@@ -1,13 +1,4 @@
1``` 1![Clueboard Layout Image](http://i.imgur.com/7oZCsHF.png)
2 ___ _____ _ _ _ __ __ _ __
3|__ \ / ____| | | | | | / / / /(_) / /
4 ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
5 |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
6 |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
7 (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
8```
9
10![Clueboard Layout Image](layout.png)
11 2
12# Maximised Clueboard Layout 3# Maximised Clueboard Layout
13 4
diff --git a/keyboards/clueboard/keymaps/mouse_keys/layout.png b/keyboards/clueboard/keymaps/mouse_keys/layout.png
deleted file mode 100644
index 52e5c4581..000000000
--- a/keyboards/clueboard/keymaps/mouse_keys/layout.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/mouse_keys/readme.md b/keyboards/clueboard/keymaps/mouse_keys/readme.md
index 97ac6dfa2..7fb038205 100644
--- a/keyboards/clueboard/keymaps/mouse_keys/readme.md
+++ b/keyboards/clueboard/keymaps/mouse_keys/readme.md
@@ -1,12 +1,3 @@
1```
2 ___ _____ _ _ _ __ __ _ __
3|__ \ / ____| | | | | | / / / /(_) / /
4 ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
5 |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
6 |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
7 (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
8```
9
10![Clueboard Layout Image](layout.png) 1![Clueboard Layout Image](layout.png)
11 2
12# MouseKeys Layout 3# MouseKeys Layout
diff --git a/keyboards/clueboard/keymaps/serubin/layout-base.png b/keyboards/clueboard/keymaps/serubin/layout-base.png
deleted file mode 100644
index 8dcdc0643..000000000
--- a/keyboards/clueboard/keymaps/serubin/layout-base.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/serubin/layout-fn.png b/keyboards/clueboard/keymaps/serubin/layout-fn.png
deleted file mode 100644
index 3cff46a72..000000000
--- a/keyboards/clueboard/keymaps/serubin/layout-fn.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/serubin/layout-media.png b/keyboards/clueboard/keymaps/serubin/layout-media.png
deleted file mode 100644
index 753cb64fa..000000000
--- a/keyboards/clueboard/keymaps/serubin/layout-media.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/serubin/readme.md b/keyboards/clueboard/keymaps/serubin/readme.md
index e39adbb16..78eef5352 100644
--- a/keyboards/clueboard/keymaps/serubin/readme.md
+++ b/keyboards/clueboard/keymaps/serubin/readme.md
@@ -1,23 +1,14 @@
1```
2 ___ _____ _ _ _ __ __ _ __
3|__ \ / ____| | | | | | / / / /(_) / /
4 ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
5 |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
6 |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
7 (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
8```
9
10# Serubin's Clueboard Layout 1# Serubin's Clueboard Layout
11 2
12This is the layout based on the clueboard default, modified for development on Mac, PC, and Windows. This layout also handles media and volume keys on all the previously listed platforms. Most importantly, Capslock has been replaced by a dual function Esc/Ctrl key. This is particularly handy for use in Vim. 3This is the layout based on the clueboard default, modified for development on Mac, PC, and Windows. This layout also handles media and volume keys on all the previously listed platforms. Most importantly, Capslock has been replaced by a dual function Esc/Ctrl key. This is particularly handy for use in Vim.
13 4
14#### Base Layer 5#### Base Layer
15![Base Layout Image](layout-base.png) 6![Base Layout Image](http://i.imgur.com/qL78n1y.png)
16 7
17#### Fn Layer 8#### Fn Layer
18![Fn Layout Image](layout-fn.png) 9![Fn Layout Image](http://i.imgur.com/QuwxePw.png)
19 10
20#### Media Layer 11#### Media Layer
21![Media Layer Image](layout-media.png) 12![Media Layer Image](http://i.imgur.com/oOfWXMf.png)
22 13
23 14
diff --git a/keyboards/clueboard/keymaps/shift_fn/keymap.c b/keyboards/clueboard/keymaps/shift_fn/keymap.c
index fdec37a54..83ae1d615 100644
--- a/keyboards/clueboard/keymaps/shift_fn/keymap.c
+++ b/keyboards/clueboard/keymaps/shift_fn/keymap.c
@@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 /* Keymap _FL: Function Layer 25 /* Keymap _FL: Function Layer
26 */ 26 */
27[_FL] = KEYMAP( 27[_FL] = KEYMAP(
28 S(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, S(KC_GRV), KC_DEL, BL_STEP, \ 28 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, S(KC_GRV), KC_DEL, BL_STEP, \
29 S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ 29 S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \
30 S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ 30 S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \
31 MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ 31 MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \
diff --git a/keyboards/clueboard/keymaps/shift_fn/layout.png b/keyboards/clueboard/keymaps/shift_fn/layout.png
deleted file mode 100644
index 66d85410c..000000000
--- a/keyboards/clueboard/keymaps/shift_fn/layout.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/shift_fn/readme.md b/keyboards/clueboard/keymaps/shift_fn/readme.md
index 369f556f8..4bd920ad4 100644
--- a/keyboards/clueboard/keymaps/shift_fn/readme.md
+++ b/keyboards/clueboard/keymaps/shift_fn/readme.md
@@ -1,14 +1,3 @@
1```
2 ___ _____ _ _ _ __ __ _ __
3|__ \ / ____| | | | | | / / / /(_) / /
4 ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
5 |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
6 |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
7 (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
8```
9
10![Clueboard Layout Image](layout.png)
11
12# Shift Fn Clueboard Layout 1# Shift Fn Clueboard Layout
13 2
14This is an experimental layout. It makes the left shift key a dual roll key. 3This is an experimental layout. It makes the left shift key a dual roll key.
diff --git a/keyboards/clueboard/keymaps/skully/keymap.c b/keyboards/clueboard/keymaps/skully/keymap.c
index df7757a92..47dee8e6d 100644
--- a/keyboards/clueboard/keymaps/skully/keymap.c
+++ b/keyboards/clueboard/keymaps/skully/keymap.c
@@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 /* Keymap _FL: Function Layer 25 /* Keymap _FL: Function Layer
26 */ 26 */
27[_FL] = KEYMAP( 27[_FL] = KEYMAP(
28 S(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, S(KC_GRV), KC_DEL, BL_STEP, \ 28 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, S(KC_GRV), KC_DEL, BL_STEP, \
29 S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ 29 S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \
30 S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ 30 S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \
31 MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ 31 MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \
diff --git a/keyboards/clueboard/keymaps/skully/layout.png b/keyboards/clueboard/keymaps/skully/layout.png
deleted file mode 100644
index 64854aaef..000000000
--- a/keyboards/clueboard/keymaps/skully/layout.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/skully/readme.md b/keyboards/clueboard/keymaps/skully/readme.md
index 08255dfbc..b9ad1b09a 100644
--- a/keyboards/clueboard/keymaps/skully/readme.md
+++ b/keyboards/clueboard/keymaps/skully/readme.md
@@ -1,16 +1,11 @@
1``` 1![Clueboard Layout Image](http://i.imgur.com/VaoGn3M.png)
2 ___ _____ _ _ _ __ __ _ __
3|__ \ / ____| | | | | | / / / /(_) / /
4 ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
5 |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
6 |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
7 (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
8```
9
10![Clueboard Layout Image](layout.png)
11 2
12# skullY's Clueboard Layout 3# skullY's Clueboard Layout
13 4
14This layout is what I (@skullydazed) use on my personal Clueboards. I mostly use it for programming, CAD, and general typing. 5This layout is what I (@skullydazed) use on my personal Clueboards. I mostly use it for programming, CAD, and general typing.
15 6
16The most notable change from the default layout is putting Ctrl on the Capslock key. I also swap Alt and Cmd because I mostly use a Mac day to day. 7I've made the following changes from the default layout:
8
9* shift_fn on left shift
10* Change capslock to control
11* Swap Alt and Cmd
diff --git a/keyboards/clueboard/keymaps/smt/keymap.c b/keyboards/clueboard/keymaps/smt/keymap.c
index 732086fb5..f097afaa8 100644
--- a/keyboards/clueboard/keymaps/smt/keymap.c
+++ b/keyboards/clueboard/keymaps/smt/keymap.c
@@ -151,7 +151,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
151 } 151 }
152} 152}
153 153
154void persistant_default_layer_set(uint16_t default_layer) { 154void persistent_default_layer_set(uint16_t default_layer) {
155 eeconfig_update_default_layer(default_layer); 155 eeconfig_update_default_layer(default_layer);
156 default_layer_set(default_layer); 156 default_layer_set(default_layer);
157} 157}
@@ -160,19 +160,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
160 switch (keycode) { 160 switch (keycode) {
161 case QWERTY: 161 case QWERTY:
162 if (record->event.pressed) { 162 if (record->event.pressed) {
163 persistant_default_layer_set(1UL<<_QWERTY); 163 persistent_default_layer_set(1UL<<_QWERTY);
164 } 164 }
165 return false; 165 return false;
166 break; 166 break;
167 case COLEMAK: 167 case COLEMAK:
168 if (record->event.pressed) { 168 if (record->event.pressed) {
169 persistant_default_layer_set(1UL<<_COLEMAK); 169 persistent_default_layer_set(1UL<<_COLEMAK);
170 } 170 }
171 return false; 171 return false;
172 break; 172 break;
173 case DVORAK: 173 case DVORAK:
174 if (record->event.pressed) { 174 if (record->event.pressed) {
175 persistant_default_layer_set(1UL<<_DVORAK); 175 persistent_default_layer_set(1UL<<_DVORAK);
176 } 176 }
177 return false; 177 return false;
178 break; 178 break;
diff --git a/keyboards/clueboard/keymaps/smt/layout.png b/keyboards/clueboard/keymaps/smt/layout.png
deleted file mode 100644
index 6c27277a9..000000000
--- a/keyboards/clueboard/keymaps/smt/layout.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/smt/readme.md b/keyboards/clueboard/keymaps/smt/readme.md
index 6a8b3edb4..7fc0f0248 100644
--- a/keyboards/clueboard/keymaps/smt/readme.md
+++ b/keyboards/clueboard/keymaps/smt/readme.md
@@ -1,15 +1,6 @@
1```
2 ___ _____ _ _ _ __ __ _ __
3|__ \ / ____| | | | | | / / / /(_) / /
4 ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
5 |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
6 |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
7 (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
8```
9
10# smt Clueboard Layout (HHKB variant) 1# smt Clueboard Layout (HHKB variant)
11 2
12![Clueboard Layout Image](layout.png) 3![Clueboard Layout Image](http://i.imgur.com/Ll5gGte.png)
13 4
14This is smt's HHKB variant layout, based on the default layout that comes 5This is smt's HHKB variant layout, based on the default layout that comes
15flashed on every Clueboard. The primary differences from the default are: 6flashed on every Clueboard. The primary differences from the default are:
diff --git a/keyboards/clueboard/keymaps/unix_optimized/layout.png b/keyboards/clueboard/keymaps/unix_optimized/layout.png
deleted file mode 100644
index ea7d30e35..000000000
--- a/keyboards/clueboard/keymaps/unix_optimized/layout.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/unix_optimized/readme.md b/keyboards/clueboard/keymaps/unix_optimized/readme.md
index 3510e138b..9e6d0e902 100644
--- a/keyboards/clueboard/keymaps/unix_optimized/readme.md
+++ b/keyboards/clueboard/keymaps/unix_optimized/readme.md
@@ -1,13 +1,4 @@
1``` 1![Clueboard Layout Image](http://i.imgur.com/BnWlOht.png)
2 ___ _____ _ _ _ __ __ _ __
3|__ \ / ____| | | | | | / / / /(_) / /
4 ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
5 |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
6 |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
7 (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
8```
9
10![Clueboard Layout Image](layout.png)
11 2
12# Default Clueboard Layout 3# Default Clueboard Layout
13 4
diff --git a/keyboards/clueboard/keymaps/win_optimized/layout.png b/keyboards/clueboard/keymaps/win_optimized/layout.png
deleted file mode 100644
index 7d8c82da7..000000000
--- a/keyboards/clueboard/keymaps/win_optimized/layout.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/clueboard/keymaps/win_optimized/readme.md b/keyboards/clueboard/keymaps/win_optimized/readme.md
index cede17ee1..703a37be0 100644
--- a/keyboards/clueboard/keymaps/win_optimized/readme.md
+++ b/keyboards/clueboard/keymaps/win_optimized/readme.md
@@ -1,13 +1,4 @@
1``` 1![Clueboard Layout Image](http://i.imgur.com/fsqOqZo.png)
2 ___ _____ _ _ _ __ __ _ __
3|__ \ / ____| | | | | | / / / /(_) / /
4 ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
5 |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
6 |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
7 (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
8```
9
10![Clueboard Layout Image](layout.png)
11 2
12# Default Clueboard Layout 3# Default Clueboard Layout
13 4
diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c
index 592f7654b..47a5181dd 100644
--- a/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c
+++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c
@@ -256,7 +256,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
256 */ 256 */
257}; 257};
258 258
259void persistant_default_layer_set(uint16_t default_layer) { 259void persistent_default_layer_set(uint16_t default_layer) {
260 eeconfig_update_default_layer(default_layer); 260 eeconfig_update_default_layer(default_layer);
261 default_layer_set(default_layer); 261 default_layer_set(default_layer);
262} 262}
@@ -266,25 +266,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
266 /* layout switcher */ 266 /* layout switcher */
267 case LAY_QWE: 267 case LAY_QWE:
268 if (record->event.pressed) { 268 if (record->event.pressed) {
269 persistant_default_layer_set(1UL<<QWE); 269 persistent_default_layer_set(1UL<<QWE);
270 } 270 }
271 return false; 271 return false;
272 break; 272 break;
273 case LAY_COL: 273 case LAY_COL:
274 if (record->event.pressed) { 274 if (record->event.pressed) {
275 persistant_default_layer_set(1UL<<COL); 275 persistent_default_layer_set(1UL<<COL);
276 } 276 }
277 return false; 277 return false;
278 break; 278 break;
279 case LAY_WOR: 279 case LAY_WOR:
280 if (record->event.pressed) { 280 if (record->event.pressed) {
281 persistant_default_layer_set(1UL<<WOR); 281 persistent_default_layer_set(1UL<<WOR);
282 } 282 }
283 return false; 283 return false;
284 break; 284 break;
285 case LAY_DVO: 285 case LAY_DVO:
286 if (record->event.pressed) { 286 if (record->event.pressed) {
287 persistant_default_layer_set(1UL<<DVO); 287 persistent_default_layer_set(1UL<<DVO);
288 } 288 }
289 return false; 289 return false;
290 break; 290 break;
diff --git a/keyboards/M10A/Makefile b/keyboards/dk60/Makefile
index 4e2a6f00f..4e2a6f00f 100644
--- a/keyboards/M10A/Makefile
+++ b/keyboards/dk60/Makefile
diff --git a/keyboards/dk60/config.h b/keyboards/dk60/config.h
new file mode 100644
index 000000000..9c5232ef0
--- /dev/null
+++ b/keyboards/dk60/config.h
@@ -0,0 +1,55 @@
1/*
2Copyright 2017 Damien Broqua <contact@darkou.fr>
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 0x0003
27 #define MANUFACTURER DARKOU
28 #define PRODUCT DK60
29 #define DESCRIPTION QMK keyboard firmware for DK60 support
30
31 /* key matrix size */
32 #define MATRIX_ROWS 5
33 #define MATRIX_COLS 13
34
35 // ROWS: Top to bottom, COLS: Left to right
36 #define MATRIX_ROW_PINS { B6, B4, D7, D6, D4 }
37 #define MATRIX_COL_PINS { B0, B3, B2, B1, D3, D5, B5, B7, C6, C7, D0, D1, D2 }
38 #define UNUSED_PINS
39
40 /* COL2ROW or ROW2COL */
41 #define DIODE_DIRECTION COL2ROW
42
43 /* Set 0 if debouncing isn't needed */
44 #define DEBOUNCING_DELAY 5
45
46 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
47 #define LOCKING_SUPPORT_ENABLE
48 /* Locking resynchronize hack */
49 #define LOCKING_RESYNC_ENABLE
50
51 /* key combination for command */
52 #define IS_COMMAND() ( \
53 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
54 )
55#endif
diff --git a/keyboards/dk60/dk60.c b/keyboards/dk60/dk60.c
new file mode 100644
index 000000000..93aeb33b4
--- /dev/null
+++ b/keyboards/dk60/dk60.c
@@ -0,0 +1,34 @@
1#include "dk60.h"
2
3void dk60_blink_all_leds(void)
4{
5 dk60_led_all_off();
6 dk60_led_all_on();
7 _delay_ms(500);
8 dk60_led_all_off();
9}
10
11void matrix_init_kb(void) {
12 led_init_ports();
13 dk60_blink_all_leds();
14
15 matrix_init_user();
16}
17
18void led_init_ports(void) {
19 // * Set our LED pins as output
20 DDRE |= (1<<6);
21 DDRF |= (1<<0);
22}
23
24void led_set_kb(uint8_t usb_led) {
25 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
26 // Turn capslock on
27 dk60_caps_led_on();
28 } else {
29 // Turn capslock off
30 dk60_caps_led_off();
31 }
32
33 led_set_user(usb_led);
34}
diff --git a/keyboards/dk60/dk60.h b/keyboards/dk60/dk60.h
new file mode 100644
index 000000000..4b9159919
--- /dev/null
+++ b/keyboards/dk60/dk60.h
@@ -0,0 +1,41 @@
1#ifndef DK60_H
2 #define DK60_H
3
4 #include "quantum.h"
5 #include <util/delay.h>
6
7 inline void dk60_caps_led_on(void) { PORTE |= (1<<6); }
8 inline void dk60_esc_led_on(void) { PORTF |= (1<<0); }
9
10 inline void dk60_caps_led_off(void) { PORTE &= ~(1<<6); }
11 inline void dk60_esc_led_off(void) { PORTF &= ~(1<<0); }
12
13 inline void dk60_led_all_on(void)
14 {
15 dk60_caps_led_on();
16 dk60_esc_led_on();
17 }
18
19 inline void dk60_led_all_off(void)
20 {
21 dk60_caps_led_off();
22 dk60_esc_led_off();
23 }
24
25 #define ___ KC_NO
26
27 #define KEYMAP( \
28 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K4B, K4A, \
29 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K4C, \
30 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
31 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
32 K41, K42, K45, K48, K49 \
33 ) { \
34 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \
35 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \
36 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \
37 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \
38 { ___, K41, K42, ___, ___, K45, ___, ___, K48, K49, K4A, K4B, K4C } \
39 }
40
41#endif
diff --git a/keyboards/dk60/keymaps/default/keymap.c b/keyboards/dk60/keymaps/default/keymap.c
new file mode 100644
index 000000000..a6a3b83f0
--- /dev/null
+++ b/keyboards/dk60/keymaps/default/keymap.c
@@ -0,0 +1,80 @@
1#include "dk60.h"
2#include "action_layer.h"
3
4enum planck_layers {
5 _QWERTY,
6 _FN,
7 _DVORAK,
8 _LOWER,
9 _RAISE,
10 _PLOVER,
11 _ADJUST
12};
13
14enum planck_keycodes {
15 QWERTY = SAFE_RANGE,
16 FN
17};
18
19// Fillers to make layering more clear
20#define ______ KC_TRNS
21
22const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
23/* Qwerty gui/alt/space/alt/gui
24 * ,-----------------------------------------------------------------------------------------.
25 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
26 * |-----------------------------------------------------------------------------------------+
27 * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
28 * |-----------------------------------------------------------------------------------------+
29 * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
30 * |-----------------------------------------------------------------------------------------+
31 * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
32 * |-----------------------------------------------------------------------------------------+
33 * |LGUI | LAlt | Space | RAlt |RGUI |
34 * `-----------------------------------------------------------------'
35 */
36 [_QWERTY] = KEYMAP( /* Basic QWERTY */
37 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, \
38 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, \
39 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, \
40 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN, \
41 KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI \
42 ),
43
44/* FN Layer
45 * ,-----------------------------------------------------------------------------------------.
46 * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
47 * |-----------------------------------------------------------------------------------------+
48 * | CAPS | | | | | | | | Psc | Slck| Paus| Up | | |
49 * |-----------------------------------------------------------------------------------------+
50 * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
51 * |-----------------------------------------------------------------------------------------+
52 * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
53 * |-----------------------------------------------------------------------------------------+
54 * | | | | Stop | |
55 * `-----------------------------------------------------------------'
56 */
57 [_FN] = KEYMAP( /* Layer 1 */
58 ______, 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, \
59 KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
60 ______, KC_VOLD,KC_VOLU,KC_MUTE,______, ______, KC_PAST,KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, \
61 ______, KC_MPRV,KC_MPLY,KC_MNXT,______, ______, KC_PPLS,KC_PMNS,KC_END, KC_PGDN, KC_DOWN, ______, ______, \
62 ______, ______, ______, KC_MSTP, ______ \
63 )
64};
65
66bool process_record_user(uint16_t keycode, keyrecord_t *record) {
67 switch (keycode) {
68 case FN:
69 if (record->event.pressed) {
70 layer_on(_FN);
71 dk60_esc_led_on();
72 } else {
73 layer_off(_FN);
74 dk60_esc_led_off();
75 }
76 return false;
77 break;
78 }
79 return true;
80}
diff --git a/keyboards/dk60/readme.md b/keyboards/dk60/readme.md
new file mode 100644
index 000000000..544b5b0d1
--- /dev/null
+++ b/keyboards/dk60/readme.md
@@ -0,0 +1,8 @@
1DK60 keyboard firmware
2======================
3
4Another 60% keyboard with different HHKB layout
5
6More information here: https://github.com/Dbroqua/DK60
7
8Open Hardware project!
diff --git a/keyboards/dk60/rules.mk b/keyboards/dk60/rules.mk
new file mode 100644
index 000000000..36c6bed17
--- /dev/null
+++ b/keyboards/dk60/rules.mk
@@ -0,0 +1,21 @@
1MCU = atmega32u4
2F_CPU = 16000000
3ARCH = AVR8
4F_USB = $(F_CPU)
5OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
6OPT_DEFS += -DBOOTLOADER_SIZE=4096
7
8BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
9MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
10EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
11# CONSOLE_ENABLE ?= yes # Console for debug(+400)
12# COMMAND_ENABLE ?= yes # Commands for debug and configuration
13KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
14NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
15RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality (+4870)
16BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality (+1150)
17MIDI_ENABLE ?= no # MIDI controls
18AUDIO_ENABLE ?= no
19UNICODE_ENABLE ?= yes # Unicode
20BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
21SLEEP_LED_ENABLE ?= yes
diff --git a/keyboards/ergodox/config.h b/keyboards/ergodox/config.h
index 994a8c643..2091999bb 100644
--- a/keyboards/ergodox/config.h
+++ b/keyboards/ergodox/config.h
@@ -3,8 +3,8 @@
3 3
4#define MOUSEKEY_INTERVAL 20 4#define MOUSEKEY_INTERVAL 20
5#define MOUSEKEY_DELAY 0 5#define MOUSEKEY_DELAY 0
6#define MOUSEKEY_TIME_TO_MAX 5 6#define MOUSEKEY_TIME_TO_MAX 60
7#define MOUSEKEY_MAX_SPEED 2 7#define MOUSEKEY_MAX_SPEED 7
8#define MOUSEKEY_WHEEL_DELAY 0 8#define MOUSEKEY_WHEEL_DELAY 0
9 9
10#define TAPPING_TOGGLE 1 10#define TAPPING_TOGGLE 1
diff --git a/keyboards/ergodox/ez/config.h b/keyboards/ergodox/ez/config.h
index aa17c3e8d..cc8aa3d40 100644
--- a/keyboards/ergodox/ez/config.h
+++ b/keyboards/ergodox/ez/config.h
@@ -60,6 +60,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
60/* Set 0 if debouncing isn't needed */ 60/* Set 0 if debouncing isn't needed */
61#define DEBOUNCE 15 61#define DEBOUNCE 15
62 62
63#define PREVENT_STUCK_MODIFIERS
64
63#define USB_MAX_POWER_CONSUMPTION 500 65#define USB_MAX_POWER_CONSUMPTION 500
64 66
65/* 67/*
diff --git a/keyboards/ergodox/keymaps/333fred/Makefile b/keyboards/ergodox/keymaps/333fred/Makefile
new file mode 100644
index 000000000..87985bda1
--- /dev/null
+++ b/keyboards/ergodox/keymaps/333fred/Makefile
@@ -0,0 +1,12 @@
1SUBPROJECT_DEFAULT = infinity
2LCD_BACKLIGHT_ENABLE = yes
3LCD_ENABLE = yes
4LED_ENABLE = yes
5BACKLIGHT_ENABLE = yes
6NKRO_ENABLE = yes
7TAP_DANCE_ENABLE = yes
8
9ifndef QUANTUM_DIR
10 include ../../../../Makefile
11endif
12
diff --git a/keyboards/ergodox/keymaps/333fred/README.md b/keyboards/ergodox/keymaps/333fred/README.md
new file mode 100644
index 000000000..af8042d85
--- /dev/null
+++ b/keyboards/ergodox/keymaps/333fred/README.md
@@ -0,0 +1,122 @@
1## Layout
2
3### Keymap 0: Basic layer
4```
5,--------------------------------------------------. ,--------------------------------------------------.
6| ` | 1 | 2 | 3 | 4 | 5 | = | | L1 | 6 | 7 | 8 | 9 | 0 | - |
7|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
8| TAB | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | \ |
9|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
10| Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L |; / : | ' |
11|--------+------+------+------+------+------| L1 | |TT(3) |------+------+------+------+------+--------|
12| LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
13`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
14 |LCTRL | F4 | F5 | LGUI | LALT | | Left | Down | Up | Right| RGUI |
15 `----------------------------------' `----------------------------------'
16 ,-------------. ,-------------.
17 | Home | End | | Alt |Ctrl/Esc|
18 ,------|------|------| |------+--------+------.
19 | | | PgUp | | PgDn | | |
20 | Bcksp|OSL(2)|------| |------| Ent |Space |
21 | | | Del | |OSL(2)| | |
22 `--------------------' `----------------------'
23```
24* Double-click `;` to get a `:`
25* Press-and-hold `f` to go to the movement layer
26
27### Keymap 1: Code Layer
28```
29,--------------------------------------------------. ,--------------------------------------------------.
30| | | | | | | | | | | | | | | |
31|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
32| | | | | | | F10 | | F11 | | | | | | |
33|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
34| | | | | | |------| |------| | | | | | |
35|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
36| | | | | | | | | | | | | | | |
37`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
38 | | | | | | | | | | | |
39 `----------------------------------' `----------------------------------'
40 ,-------------. ,---------------.
41 |Format| | | Test | DTest |
42 ,------|------|------| |------+--------+------.
43 | | |Refact| | | | |
44 | | |------| |------| | |
45 | | | | | | | |
46 `--------------------' `----------------------'
47```
48* Format - Visual Studio Format. Sends `CTRL + K, CTRL + D`
49* Refact - Visual Studio Refactor. Sends `CTRL + R, R`
50* Test - Visual Studio Run Test. Sends `CTRL + R, T`
51* DTest - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T`
52
53### Keymap 2: Symbol Layer
54```
55,---------------------------------------------------. ,--------------------------------------------------.
56|Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
57|---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
58| | ! | @ | ( | ) | | | | | | Up | 7 | 8 | 9 | * | F12 |
59|---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
60| | # | $ | { | } | ` |------| |------| Down | 4 | 5 | 6 | + | |
61|---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
62| | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
63`---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
64 | EPRM | | | | | | 0 | 0 | . | = | |
65 `-----------------------------------' `----------------------------------'
66 ,-------------. ,-------------.
67 | | Caps | | | |
68 ,------|------|------| |------+------+------.
69 | | |APscr | | | | |
70 | | |------| |------| | |
71 | | | PScr | | | | |
72 `--------------------' `--------------------'
73```
74* APscr - Take a printscreen of the current app. Sends `Alt + Print Screen`
75
76### Keymap 3: Media and Mouse Keys
77```
78,--------------------------------------------------. ,--------------------------------------------------.
79| | | | | | | | | | | | | | | |
80|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
81| | | | MsUp | | | | | | | | | | | |
82|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
83| | |MsLeft|MsDown|MsRght| |------| |------| | | | | | |
84|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
85| | | | | | | | | | | | | | | |
86`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
87 | | | | Lclk | Rclk | | | | | | |
88 `----------------------------------' `----------------------------------'
89 ,-------------. ,-------------.
90 | | | | Vol+ | |
91 ,------|------|------| |------+------+------.
92 | | | | | Vol- | | |
93 | | |------| |------| PL/PS| Next |
94 | | | | | Back | | |
95 `--------------------' `--------------------'
96```
97
98### Keymap 4: Movement
99```
100,--------------------------------------------------. ,--------------------------------------------------.
101| | | | | | | | | | | | | | | |
102|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
103| | | | | | | | | | | | | | | |
104|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
105| |DLeft |DRight|LShift| | |------| |------| Left | Down | Up | Right| | |
106|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
107| |KOpen |KType | | | | | | | | | | | | |
108`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
109 | | | | | | | | | | | |
110 `----------------------------------' `----------------------------------'
111 ,-------------. ,-------------.
112 | | | | | |
113 ,------|------|------| |------+------+------.
114 | | | | | | | |
115 | | CTRL |------| |------| | |
116 | | | | | | | |
117 `--------------------' `--------------------'
118```
119* DLeft - Move to the left Desktop. Sends `Ctrl + Win + Left Arrow`
120* DRight - Move to the right Desktop. Sends `Ctrl + Win + Right Arrow`
121* KOpen - Opens KeePass. Sends `Ctrl + Alt + k`
122* KType - Autotypes KeePass password. Sends `Ctrl + Alt + a`
diff --git a/keyboards/ergodox/keymaps/333fred/keymap.c b/keyboards/ergodox/keymaps/333fred/keymap.c
new file mode 100644
index 000000000..070ad1f72
--- /dev/null
+++ b/keyboards/ergodox/keymaps/333fred/keymap.c
@@ -0,0 +1,361 @@
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 CODE 1 // code layer
8#define SYMB 2 // symbols
9#define MDIA 3 // media keys
10#define MOVE 4 // movement layer
11
12enum custom_keycodes {
13 PLACEHOLDER = SAFE_RANGE, // can always be here
14 EPRM,
15 VRSN,
16};
17
18enum custom_macros {
19 VERSION,
20 EEPROM,
21
22 // Windows macros
23 DLEFT,
24 DRIGHT,
25 PSCREEN_APP,
26
27 // VS Macros
28 REFACTOR,
29 TEST,
30 DEBUG_TEST,
31 FORMAT,
32
33 // KeePass macros
34 KEEPASS_OPEN,
35 KEEPASS_TYPE,
36};
37
38// Tap Dance Definitions
39enum tap_dance_custom_keys {
40 TD_SEMICOLON_COLON = 0
41};
42
43qk_tap_dance_action_t tap_dance_actions[] = {
44 [TD_SEMICOLON_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLON)
45};
46
47// NOTE: Cells marked with ACCESS must remain transparent, they're the keys that actually get to that layer
48
49const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
50/* Keymap 0: Basic layer
51 *
52 * ,--------------------------------------------------. ,--------------------------------------------------.
53 * | ` | 1 | 2 | 3 | 4 | 5 | = | | L1 | 6 | 7 | 8 | 9 | 0 | - |
54 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
55 * | TAB | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | \ |
56 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
57 * | Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L |; / : | ' |
58 * |--------+------+------+------+------+------| L1 | |MO(3) |------+------+------+------+------+--------|
59 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
60 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
61 * |LCTRL | F4 | F5 | LGUI | LALT | | Left | Down | Up | Right| RGUI |
62 * `----------------------------------' `----------------------------------'
63 * ,-------------. ,-------------.
64 * | Home | End | | Alt |Ctrl/Esc|
65 * ,------|------|------| |------+--------+------.
66 * | | | PgUp | | PgDn | | |
67 * | Bcksp|OSL(2)|------| |------| Ent |Space |
68 * | | | Del | |OSL(2)| | |
69 * `--------------------' `----------------------'
70 */
71// If it accepts an argument (i.e, is a function), it doesn't need KC_.
72// Otherwise, it needs KC_*
73[BASE] = KEYMAP( // layer 0 : default
74 // left hand
75 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL,
76 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
77 KC_ESC, KC_A, KC_S, KC_D, LT(MOVE, KC_F),KC_G,
78 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(CODE),
79 KC_LCTRL, KC_F4, KC_F5, KC_LGUI,KC_LALT,
80 KC_HOME, KC_END,
81 KC_PGUP,
82 KC_BSPC,OSL(SYMB),KC_DEL,
83 // right hand
84 TG(CODE), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
85 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
86 KC_H, KC_J, KC_K, KC_L, TD(TD_SEMICOLON_COLON),KC_QUOT,
87 MO(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
88 KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_RGUI,
89 KC_RALT, CTL_T(KC_ESC),
90 KC_PGDN,
91 OSL(SYMB),KC_ENT, KC_SPC
92 ),
93/* Keymap 1: Code Layer
94 *
95 * ,--------------------------------------------------. ,--------------------------------------------------.
96 * | | | | | | | | |ACCESS| | | | | | |
97 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
98 * | | | | | | | F10 | | F11 | | | | | | |
99 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
100 * | | | | | | |------| |------| | | | | | |
101 * |--------+------+------+------+------+------|ACCESS| | |------+------+------+------+------+--------|
102 * | | | | | | | | | | | | | | | |
103 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
104 * | | | | | | | | | | | |
105 * `----------------------------------' `----------------------------------'
106 * ,-------------. ,---------------.
107 * |Format| | | Test | DTest |
108 * ,------|------|------| |------+--------+------.
109 * | | |Refact| | | | |
110 * | | |------| |------| | |
111 * | | | | | | | |
112 * `--------------------' `----------------------'
113 */
114// If it accepts an argument (i.e, is a function), it doesn't need KC_.
115// Otherwise, it needs KC_*
116[CODE] = KEYMAP( // layer 1 : code
117 // left hand
118 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
119 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F10,
120 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
121 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
122 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
123 M(FORMAT), KC_TRNS,
124 M(REFACTOR),
125 KC_TRNS, KC_TRNS, KC_TRNS,
126 // right hand
127
128 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
129 KC_F11, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
130 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
131 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
132 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
133 M(TEST), M(DEBUG_TEST),
134 KC_TRNS,
135 KC_TRNS, KC_TRNS, KC_TRNS
136 ),
137/* Keymap 2: Symbol Layer
138 *
139 * ,---------------------------------------------------. ,--------------------------------------------------.
140 * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
141 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
142 * | | ! | @ | ( | ) | | |ACCESS| |ACCESS| Up | 7 | 8 | 9 | * | F12 |
143 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
144 * | | # | $ | { | } | ` |------| |------| Down | 4 | 5 | 6 | + | |
145 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
146 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
147 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
148 * | EPRM | | | | | | 0 | 0 | . | = | |
149 * `-----------------------------------' `----------------------------------'
150 * ,-------------. ,-------------.
151 * | | Caps | | | |
152 * ,------|------|------| |------+------+------.
153 * | | |APScr | | | | |
154 * | |ACCESS|------| |------| | |
155 * | | | PScr | |ACCESS| | |
156 * `--------------------' `--------------------'
157 */
158// SYMBOLS
159[SYMB] = KEYMAP(
160 // left hand
161 VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
162 KC_TRNS,KC_EXLM,KC_AT, KC_LPRN,KC_RPRN,KC_PIPE,KC_TRNS,
163 KC_TRNS,KC_HASH,KC_DLR, KC_LCBR,KC_RCBR,KC_GRV,
164 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
165 EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
166 KC_TRNS,KC_CAPS,
167 M(PSCREEN_APP),
168 KC_TRNS,KC_TRNS,KC_PSCR,
169 // right hand
170 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
171 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
172 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
173 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
174 KC_0, KC_0, KC_DOT, KC_EQL, KC_TRNS,
175 KC_TRNS, KC_TRNS,
176 KC_TRNS,
177 KC_TRNS, KC_TRNS, KC_TRNS
178),
179/* Keymap 3: Media and mouse keys
180 *
181 * ,--------------------------------------------------. ,--------------------------------------------------.
182 * | | | | | | | | | | | | | | | |
183 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
184 * | | | | MsUp | | | | | | | | | | | |
185 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
186 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | |
187 * |--------+------+------+------+------+------| | |ACCESS|------+------+------+------+------+--------|
188 * | | | | | | | | | | | | | | | |
189 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
190 * | | | | Lclk | Rclk | | | | | | |
191 * `----------------------------------' `----------------------------------'
192 * ,-------------. ,-------------.
193 * | | | | Vol+ | |
194 * ,------|------|------| |------+------+------.
195 * | | | | | Vol- | | |
196 * | | |------| |------| PL/PS| Next |
197 * | | | | | Back | | |
198 * `--------------------' `--------------------'
199 */
200// MEDIA AND MOUSE
201[MDIA] = KEYMAP(
202 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
203 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
204 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
205 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
206 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
207 KC_TRNS, KC_TRNS,
208 KC_TRNS,
209 KC_TRNS, KC_TRNS, KC_TRNS,
210 // right hand
211 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
212 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
213 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
214 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
215 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
216 KC_VOLU, KC_TRNS,
217 KC_VOLD,
218 KC_MPRV, KC_MPLY, KC_MNXT
219),
220/* Keymap 4: Movement
221 *
222 * ,--------------------------------------------------. ,--------------------------------------------------.
223 * | | | | | | | | | | | | | | | |
224 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
225 * | | | | | | | | | | | | | | | |
226 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
227 * | |DLeft |DRight|LShift|ACCESS| |------| |------| Left | Down | Up | Right| | |
228 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
229 * | |KOpen |KType | | | | | | | | | | | | |
230 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
231 * | | | | | | | | | | | |
232 * `----------------------------------' `----------------------------------'
233 * ,-------------. ,-------------.
234 * | | | | | |
235 * ,------|------|------| |------+------+------.
236 * | | | | | | | |
237 * | | CTRL |------| |------| | |
238 * | | | | | | | |
239 * `--------------------' `--------------------'
240 */
241// MEDIA AND MOUSE
242[MOVE] = KEYMAP(
243 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
244 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
245 KC_TRNS, M(DLEFT), M(DRIGHT), KC_LSFT, KC_TRNS, KC_TRNS,
246 KC_TRNS, M(KEEPASS_OPEN),M(KEEPASS_TYPE),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
247 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
248 KC_TRNS, KC_TRNS,
249 KC_TRNS,
250 KC_TRNS, KC_LCTRL,KC_TRNS,
251 // right hand
252 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
253 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
254 KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_TRNS,
255 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
256 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
257 KC_TRNS, KC_TRNS,
258 KC_TRNS,
259 KC_TRNS, KC_TRNS, KC_TRNS
260
261)
262};
263
264const uint16_t PROGMEM fn_actions[] = {
265 [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
266};
267
268const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
269{
270 // MACRODOWN only works in this function
271 switch(id) {
272 case VERSION:
273 if (record->event.pressed) {
274 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
275 }
276 break;
277 case EEPROM:
278 if (record->event.pressed) { // For resetting EEPROM
279 eeconfig_init();
280 }
281 break;
282 case DLEFT:
283 if (record->event.pressed) { // Windows move desktop left
284 return MACRO(D(LCTL), D(LGUI), T(LEFT), U(LGUI), U(LCTL), END);
285 }
286 break;
287 case DRIGHT:
288 if (record->event.pressed) { // Windows move desktop right
289 return MACRO(D(LCTL), D(LGUI), T(RIGHT), U(LGUI), U(LCTL), END);
290 }
291 break;
292 case PSCREEN_APP:
293 if (record->event.pressed) {
294 return MACRO(D(LALT), T(PSCR), U(LALT));
295 }
296 break;
297 case REFACTOR:
298 if (record->event.pressed) { // VS Refactor CTRL+R, R
299 return MACRO(D(LCTL), T(R), U(LCTL), T(R), END);
300 }
301 break;
302 case TEST:
303 if (record->event.pressed) { // VS Run Tests CTRL+R, T
304 return MACRO(D(LCTL), T(R), U(LCTL), T(T), END);
305 }
306 break;
307 case DEBUG_TEST:
308 if (record->event.pressed) { // VS Debug Tests CTRL+R, CTRL+T
309 return MACRO(D(LCTL), T(R), T(T), U(LCTL), END);
310 }
311 break;
312 case FORMAT:
313 if (record->event.pressed) { // VS Format Document, CTRL+K, CTRL+D
314 return MACRO(D(LCTL), T(K), T(D), U(LCTL), END);
315 }
316 break;
317 case KEEPASS_OPEN:
318 if (record->event.pressed) { // Keepass open application
319 return MACRO(D(LCTL), D(LALT), T(K), U(LALT), U(LCTL), END);
320 }
321 break;
322 case KEEPASS_TYPE:
323 if (record->event.pressed) { // Keepass autotype
324 return MACRO(D(LCTL), D(LALT), T(A), U(LALT), U(LCTL), END);
325 }
326 break;
327 }
328 return MACRO_NONE;
329};
330
331bool process_record_user(uint16_t keycode, keyrecord_t *record) {
332 switch (keycode) {
333 // dynamically generate these.
334 case EPRM:
335 if (record->event.pressed) {
336 eeconfig_init();
337 }
338 return false;
339 break;
340 case VRSN:
341 if (record->event.pressed) {
342 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
343 }
344 return false;
345 break;
346 }
347 return true;
348}
349
350// Runs just one time when the keyboard initializes.
351void matrix_init_user(void) {
352
353};
354
355
356// Runs constantly in the background, in a loop.
357void matrix_scan_user(void) {
358 ergodox_board_led_on();
359 ergodox_led_all_on();
360};
361
diff --git a/keyboards/ergodox/keymaps/333fred/visualizer.c b/keyboards/ergodox/keymaps/333fred/visualizer.c
new file mode 100644
index 000000000..2a30562ae
--- /dev/null
+++ b/keyboards/ergodox/keymaps/333fred/visualizer.c
@@ -0,0 +1,33 @@
1/*
2Note: this is a modified copy of ../default/visualizer.c, originally licensed GPL.
3*/
4
5#include "simple_visualizer.h"
6
7// This function should be implemented by the keymap visualizer
8// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing
9// that the simple_visualizer assumes that you are updating
10// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is
11// stopped. This can be done by either double buffering it or by using constant strings
12static void get_visualizer_layer_and_color(visualizer_state_t* state) {
13 uint8_t saturation = 60;
14 if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) {
15 saturation = 255;
16 }
17 if (state->status.layer & 0x10) {
18 state->target_lcd_color = LCD_COLOR(140, 100, 60);
19 state->layer_text = "Movement";
20 } else if (state->status.layer & 0x8) {
21 state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF);
22 state->layer_text = "Media";
23 } else if (state->status.layer & 0x4) {
24 state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF);
25 state->layer_text = "Symbol";
26 } else if (state->status.layer & 0x2) {
27 state->target_lcd_color = LCD_COLOR(216, 90, 0xFF);
28 state->layer_text = "Code";
29 } else {
30 state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF);
31 state->layer_text = "Default";
32 }
33}
diff --git a/keyboards/ergodox/keymaps/adam/config.h b/keyboards/ergodox/keymaps/adam/config.h
new file mode 100644
index 000000000..b3910bc45
--- /dev/null
+++ b/keyboards/ergodox/keymaps/adam/config.h
@@ -0,0 +1,6 @@
1#include "../../config.h"
2
3#undef TAPPING_TERM
4#define TAPPING_TERM 300 //At 500 some bad logic takes hold
5#define PREVENT_STUCK_MODIFIERS
6#define IGNORE_MOD_TAP_INTERRUPT
diff --git a/keyboards/ergodox/keymaps/adam/keymap.c b/keyboards/ergodox/keymaps/adam/keymap.c
new file mode 100644
index 000000000..432f0fb26
--- /dev/null
+++ b/keyboards/ergodox/keymaps/adam/keymap.c
@@ -0,0 +1,174 @@
1#include "ergodox.h"
2#include "debug.h"
3#include "action_layer.h"
4#include "version.h"
5
6
7#define BASE 0 // default layer
8#define FLOCK 1 // symbols arrows and F keys on F held down
9#define JLOCK 2 // same as Flock but with fall thru J and mapped to J held down
10#define CAPLOCK 3 //caps on until space / enter / esc
11#define SFLOCK 11 // symbols arrows and F keys on F held down
12#define SJLOCK 12 // same as Flock but with fall thru J and mapped to J held down
13
14#define _______ KC_TRNS
15#define XXXXXXX KC_NO
16
17// Sends macro when key is tapped, presses mod when key is held
18#define tap_mod_macro(record, mod, macro) ( ((record)->event.pressed) ? \
19 ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? MACRO(D(mod), END) : MACRO_NONE ) : \
20 ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (macro) : MACRO(U(mod), END) ) )
21
22#define tap_mod_shift(record, mod, macro) ( ((record)->event.pressed) ? \
23 ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? MACRO(D(mod), END) : MACRO_NONE ) : \
24 ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (MACRO( D(LSFT), T(LBRC), U(LSFT), END)) : MACRO(U(mod), END) ) )
25
26const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
27/* Layout
28 *
29 * ,--------------------------------------------------. ,--------------------------------------------------.
30 * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
31 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
32 * | | Q | W | E | R | T | | | | Y | U | I | O | P | |
33 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
34 * | | A | S | D | F | G |------| |------| H | J | K | L |; | |
35 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
36 * | | Z | X | C | V | B | | | | N | M | , | . | | |
37 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
38 * | | | | | | | | | | | |
39 * `----------------------------------' `----------------------------------'
40 * ,-------------. ,-------------.
41 * | | | | | |
42 * ,------|------|------| |------+--------+------.
43 * | | | | | | | |
44 * | | |------| |------| | |
45 * | | | | | | | |
46 * `--------------------' `----------------------'
47 */
48 [BASE] = KEYMAP(
49 // left hand
50 GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS,
51 _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB,
52 _______, SFT_T(KC_A), ALT_T(KC_S), CTL_T(KC_D), F(FLOCK), GUI_T(KC_G),
53 _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC,
54 _______, _______, _______, _______ ,_______,
55 _______, _______,
56 _______,
57 KC_SPC, _______, _______ ,
58
59 // right hand
60 KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
61 KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, _______,
62 GUI_T(KC_H), F(JLOCK), CTL_T(KC_K), ALT_T(KC_L), SFT_T(KC_SCLN), _______,
63 KC_DELETE, KC_N, KC_M, KC_COMM,KC_DOT, KC_QUOT, _______,
64 _______, _______,_______,_______, _______,
65 _______, _______,
66 _______,
67 _______,_______, KC_ENT
68 ),
69 [FLOCK] = KEYMAP(
70 // left hand
71 XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
72 XXXXXXX,KC_LBRC,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,
73 XXXXXXX,S(KC_LBRC),XXXXXXX, XXXXXXX,_______,XXXXXXX,
74 XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,TO(CAPLOCK),XXXXXXX,
75 XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,
76 XXXXXXX,XXXXXXX,
77 XXXXXXX,
78 KC_ESC,XXXXXXX,XXXXXXX,
79 // right hand
80 KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX,
81 XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, XXXXXXX, KC_RBRC, XXXXXXX,
82 KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, S(KC_RBRC), XXXXXXX,
83 XXXXXXX, XXXXXXX, KC_END, KC_PGDOWN, KC_QUES, KC_SLSH, XXXXXXX,
84 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
85 XXXXXXX, XXXXXXX,
86 XXXXXXX,
87 XXXXXXX, XXXXXXX, XXXXXXX
88 ),
89 [JLOCK] = KEYMAP(
90 // left hand
91 XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
92 XXXXXXX,KC_LBRC,KC_GRV, KC_TILD,XXXXXXX,XXXXXXX,XXXXXXX,
93 XXXXXXX,S(KC_LBRC),XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,
94 XXXXXXX,KC_BSLS,KC_PIPE,XXXXXXX,XXXXXXX,TO(CAPLOCK),XXXXXXX,
95 XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,
96 XXXXXXX,XXXXXXX,
97 XXXXXXX,
98 KC_ESC,XXXXXXX,XXXXXXX,
99 // right hand
100 KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX,
101 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RBRC, XXXXXXX,
102 XXXXXXX, _______, XXXXXXX, XXXXXXX, S(KC_RBRC), XXXXXXX,
103 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
104 XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
105 XXXXXXX, XXXXXXX,
106 XXXXXXX,
107 XXXXXXX, XXXXXXX, XXXXXXX
108 ),
109 [CAPLOCK] = KEYMAP(
110 // left hand
111 TO(BASE), _______, _______, _______, _______, _______, _______,
112 _______, S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), _______,
113 // _______, SFT_T(S(KC_A)), ALT_T(KC_S), CTL_T(KC_D), F(FLOCK), GUI_T(KC_G),
114 _______, S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G),
115 _______, S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), _______,
116 _______, _______, _______, _______ ,_______,
117 _______, _______,
118 _______,
119 TO(BASE), _______, _______ ,
120
121 // right hand
122 _______, _______, _______, _______, _______, _______, _______,
123 _______, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P), _______,
124 S(KC_H), S(KC_J), S(KC_K), S(KC_L), S(KC_SCLN), _______,
125 _______, S(KC_N), S(KC_M), S(KC_COMM),S(KC_DOT), S(KC_QUOT), _______,
126 _______, _______,_______,_______, _______,
127 _______, _______,
128 _______,
129 _______,_______, TO(BASE)
130 )
131};
132
133const uint16_t PROGMEM fn_actions[] = {
134 [1] = ACTION_LAYER_TAP_KEY(FLOCK,KC_F),
135 [2] = ACTION_LAYER_TAP_KEY(JLOCK,KC_J),
136 [11] = ACTION_LAYER_TAP_KEY(FLOCK,LSFT(KC_F)),
137 [12] = ACTION_LAYER_TAP_KEY(JLOCK,LSFT(KC_J))
138};
139
140const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
141{
142 // MACRODOWN only works in this function
143 switch(id) {
144 case 0:
145 if (record->event.pressed) {
146 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
147 }
148 break;
149 }
150
151 return MACRO_NONE;
152};
153
154// Runs just one time when the keyboard initializes.
155void matrix_init_user(void) {
156
157};
158
159
160// Runs constantly in the background, in a loop.
161void matrix_scan_user(void) {
162 uint8_t layer = biton32(layer_state);
163
164 switch (layer) {
165 // TODO: Make this relevant to the ErgoDox EZ.
166 case 1:
167 break;
168 case 2:
169 break;
170 default:
171 // none
172 break;
173 }
174};
diff --git a/keyboards/ergodox/keymaps/adam/readme.md b/keyboards/ergodox/keymaps/adam/readme.md
new file mode 100644
index 000000000..9d03df5d5
--- /dev/null
+++ b/keyboards/ergodox/keymaps/adam/readme.md
@@ -0,0 +1,3 @@
1# Adam's ErgoDox
2
3Currently only really uses keys available on Let's Split, for ease of switching
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer_swe/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer_swe/keymap.c
new file mode 100644
index 000000000..8d65f7c7a
--- /dev/null
+++ b/keyboards/ergodox/keymaps/dvorak_programmer_swe/keymap.c
@@ -0,0 +1,331 @@
1#include "ergodox.h"
2#include "debug.h"
3#include "action_layer.h"
4#include "version.h"
5#include "keymap_nordic.h"
6#include "keymap_norwegian.h"
7
8#define BASE 0 // default layer
9#define SYMB 1 // symbols
10#define MDIA 2 // mouse keys
11#define DEVL 3 // dev keys
12
13#define MACRO_PUBLIC 10
14#define MACRO_PRIVATE 11
15#define MACRO_PROT 12
16
17#define MACRO_SHARED 13
18#define MACRO_CONST 14
19#define MACRO_DIM 15
20#define MACRO_STRING 16
21#define MACRO_INT 17
22#define MACRO_DEC 18
23#define MACRO_BOOL 19
24
25#define MACRO_RETURN 20
26#define MACRO_NOTHING 21
27#define MACRO_TODO 22
28
29#define MACRO_SAVE 24
30#define MACRO_BUILD 25
31#define MACRO_DEBUG 26
32
33
34
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36/* Keymap 0: Basic layer
37 *
38 * ,--------------------------------------------------. ,--------------------------------------------------.
39 * | L3 | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ |
40 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
41 * | Del | - | , | . | P | Y | LT1 | | LT1 | F | G | C | R | L | Å |
42 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
43 * | WIN | A | O | E | U | I |------| |------| D | H | T | N | S | Ä |
44 * |--------+------+------+------+------+------| LT2 | | LT2 |------+------+------+------+------+--------|
45 * | LShift | Ö | Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift |
46 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
47 * | CTRL | L1 |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
48 * `----------------------------------' `----------------------------------'
49 * ,-------------. ,-------------.
50 * | App | LGui | | Alt |Ctrl/Esc|
51 * ,------|------|------| |------+--------+------.
52 * | | | Home | | PgUp | | |
53 * | Space|Backsp|------| |------| Tab |Enter |
54 * | |ace | End | | PgDn | | |
55 * `--------------------' `----------------------'
56 */
57// If it accepts an argument (i.e, is a function), it doesn't need KC_.
58// Otherwise, it needs KC_*
59[BASE] = KEYMAP( // layer 0 : default
60 // left hand
61 MO(DEVL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
62 KC_DELT, NO_MINS, KC_COMM, KC_DOT, KC_P, KC_Y, TG(SYMB),
63 KC_LGUI, KC_A, KC_O, KC_E, KC_U, KC_I,
64 KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(MDIA),
65 CTL_T(KC_NO), MO(SYMB), LALT(KC_LSFT), KC_LEFT,KC_RGHT,
66 ALT_T(KC_APP), KC_LGUI,
67 KC_HOME,
68 KC_SPC,KC_BSPC,KC_END,
69 // right hand
70 KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLASH,
71 TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, NO_AM,
72 KC_D, KC_H, KC_T, KC_N, KC_S, NO_AE,
73 TG(MDIA),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT,
74 KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
75 KC_LALT, CTL_T(KC_ESC),
76 KC_PGUP,
77 KC_PGDN,KC_TAB, KC_ENT
78 ),
79/* Keymap 1: Symbol Layer
80 *
81 * ,--------------------------------------------------. ,--------------------------------------------------.
82 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
83 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
84 * | | @ | { | } | [ | ] | | | | < | 7 | 8 | 9 | * | F12 |
85 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
86 * | | # | ( | ) | \ | / |------| |------| > | 4 | 5 | 6 | + | |
87 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
88 * | | | UND | CUT | COP | PAS | | | | ? | 1 | 2 | 3 | % | |
89 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
90 * | | | | | | | . | 0 | = | | |
91 * `----------------------------------' `----------------------------------'
92 * ,-------------. ,-------------.
93 * | | | | | |
94 * ,------|------|------| |------+------+------.
95 * | | | | | | | |
96 * | | |------| |------| | |
97 * | | | | | | | |
98 * `--------------------' `--------------------'
99 */
100// SYMBOLS
101[SYMB] = KEYMAP(
102 // left hand
103 M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
104 KC_TRNS, NO_AT, ALGR(KC_7), ALGR(KC_0), NO_LBRC, NO_RBRC, KC_TRNS,
105 KC_TRNS, KC_HASH, NO_LPRN, NO_RPRN, ALGR(KC_MINS), NO_SLSH,
106 KC_TRNS, KC_TRNS, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_TRNS,
107 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
108 KC_TRNS,KC_TRNS,
109 KC_TRNS,
110 KC_TRNS,KC_TRNS,KC_TRNS,
111 // right hand
112 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
113 KC_TRNS, NO_LESS, KC_7, KC_8, KC_9, KC_KP_ASTERISK, KC_F12,
114 LSFT(NO_LESS), KC_4, KC_5, KC_6, KC_KP_PLUS, KC_TRNS,
115 KC_TRNS, NO_QUES, KC_1, KC_2, KC_3, LSFT(KC_5), KC_TRNS,
116 KC_DOT,KC_0, LSFT(KC_0), KC_TRNS, KC_TRNS,
117 KC_TRNS, KC_TRNS,
118 KC_TRNS,
119 KC_TRNS, KC_TRNS, KC_TRNS
120),
121/* Keymap 2: Media and mouse keys
122 *
123 * ,--------------------------------------------------. ,--------------------------------------------------.
124 * | | | | | | | | | | | | | | | |
125 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
126 * | | | | MsUp | | | | | | | | | | | |
127 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
128 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | |
129 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
130 * | | | | | | | | | | | | | | | |
131 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
132 * | | | | Lclk | Rclk | | | | | | |
133 * `----------------------------------' `----------------------------------'
134 * ,-------------. ,-------------.
135 * | | | | | |
136 * ,------|------|------| |------+------+------.
137 * | | | | | | | |
138 * | | |------| |------| | |
139 * | | | | | | | |
140 * `--------------------' `--------------------'
141 */
142// MEDIA AND MOUSE
143[MDIA] = KEYMAP(
144 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
145 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
146 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
147 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
148 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
149 KC_TRNS, KC_TRNS,
150 KC_TRNS,
151 KC_TRNS, KC_TRNS, KC_TRNS,
152 // right hand
153 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
154 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
155 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
156 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
157 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
158 KC_TRNS, KC_TRNS,
159 KC_TRNS,
160 KC_TRNS, KC_TRNS, KC_TRNS
161),
162/* Keymap 3: Developer keys in vb.net
163 * shortened in layout beneth, for example int-> integer
164 *
165 * ,--------------------------------------------------. ,--------------------------------------------------.
166 * | | | | | | | | | | | | | | | |
167 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
168 * | | Save |Build |Debug | | | | | | bool | int |string| dec | Todo | |
169 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
170 * | | | | | | |------| |------| priv | publ |shared| prot | | |
171 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
172 * | | | | | | | | | | const| dim |return|nothin| | |
173 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
174 * | | | | | | | | | | | |
175 * `----------------------------------' `----------------------------------'
176 * ,-------------. ,-------------.
177 * | | | | | |
178 * ,------|------|------| |------+------+------.
179 * | | | | | | | |
180 * | | |------| |------| | |
181 * | | | | | | | |
182 * `--------------------' `--------------------'
183 */
184// MEDIA AND MOUSE
185[DEVL] = KEYMAP(
186 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
187 KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_TRNS, KC_TRNS, KC_TRNS,
188 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
189 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
190 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
191 KC_TRNS, KC_TRNS,
192 KC_TRNS,
193 KC_TRNS, KC_TRNS, KC_TRNS,
194 // right hand
195 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
196 KC_TRNS, M(MACRO_BOOL), M(MACRO_INT), M(MACRO_STRING), M(MACRO_DEC), M(MACRO_TODO), KC_TRNS,
197 M(MACRO_PRIVATE), M(MACRO_PUBLIC), M(MACRO_SHARED), M(MACRO_PROT), KC_TRNS, KC_TRNS,
198 KC_TRNS, M(MACRO_CONST), M(MACRO_DIM), M(MACRO_RETURN), M(MACRO_NOTHING), KC_TRNS, KC_TRNS,
199 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
200 KC_TRNS, KC_TRNS,
201 KC_TRNS,
202 KC_TRNS, KC_TRNS, KC_TRNS
203),
204};
205
206const uint16_t PROGMEM fn_actions[] = {
207 [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
208};
209
210const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
211{
212 // MACRODOWN only works in this function
213 switch(id) {
214 case 0:
215 if (record->event.pressed) {
216 register_code(KC_RSFT);
217 } else {
218 unregister_code(KC_RSFT);
219 }
220 break;
221 case MACRO_PUBLIC:
222 if (record->event.pressed) {
223 return MACRO( T(P), T(U), T(B), T(L), T(I), T(C), T(SPACE),END);
224 }
225 break;
226 case MACRO_PRIVATE:
227 if (record->event.pressed) {
228 return MACRO( T(P), T(R), T(I), T(V), T(A), T(T), T(E), T(SPACE),END);
229 }
230 break;
231 case MACRO_PROT:
232 if (record->event.pressed) {
233 return MACRO( T(P), T(R), T(O), T(T), T(E), T(C), T(T), T(E), T(D), T(SPACE),END);
234 }
235 break;
236 case MACRO_SHARED:
237 if (record->event.pressed) {
238 return MACRO( T(S), T(H), T(A), T(R), T(E), T(D), T(SPACE), END);
239 }
240 break;
241 case MACRO_CONST:
242 if (record->event.pressed) {
243 return MACRO( T(C), T(O), T(N), T(S), T(T), T(SPACE), END);
244 }
245 break;
246 case MACRO_DIM:
247 if (record->event.pressed) {
248 return MACRO( T(D), T(I), T(M), T(SPACE), END);
249 }
250 break;
251 case MACRO_STRING:
252 if (record->event.pressed) {
253 return MACRO( T(S), T(T), T(R), T(I), T(N), T(G), T(SPACE), END);
254 }
255 break;
256 case MACRO_BOOL:
257 if (record->event.pressed) {
258 return MACRO( T(B), T(O), T(O), T(L), T(E), T(A), T(N), T(SPACE), END);
259 }
260 break;
261 case MACRO_INT:
262 if (record->event.pressed) {
263 return MACRO( T(I), T(N), T(T), T(SPACE), END);
264 }
265 break;
266 case MACRO_DEC:
267 if (record->event.pressed) {
268 return MACRO( T(D), T(E), T(C), T(I), T(M), T(A), T(L), T(SPACE), END);
269 }
270 break;
271 case MACRO_RETURN:
272 if (record->event.pressed) {
273 return MACRO( T(R), T(E), T(T), T(U),T(R),T(N), T(SPACE), END);
274 }
275 break;
276 case MACRO_NOTHING:
277 if (record->event.pressed) {
278 return MACRO( T(N), T(O), T(T), T(H), T(I), T(N), T(G), T(SPACE), END);
279 }
280 case MACRO_TODO:
281 if (record->event.pressed) {
282 return MACRO( KC_BSLASH, D(LSHIFT) ,T(T), T(O), T(D), T(O), KC_DOT, U(LSHIFT), T(SPACE),END);
283 }
284 break;
285 case MACRO_SAVE:
286 if (record->event.pressed) {
287 return MACRO( D(LCTL) ,T(S), U(LCTL),END);
288 }
289 break;
290 case MACRO_BUILD:
291 if (record->event.pressed) {
292 return MACRO( D(LCTL), D(LSHIFT) ,T(B), U(LSHIFT), U(LCTL),END);
293 }
294 break;
295 case MACRO_DEBUG:
296 if (record->event.pressed) {
297 return MACRO( KC_F5 ,END);
298 }
299 break;
300 }
301 return MACRO_NONE;
302};
303
304// Runs just one time when the keyboard initializes.
305void matrix_init_user(void) {
306
307};
308
309// Runs constantly in the background, in a loop.
310void matrix_scan_user(void) {
311
312 uint8_t layer = biton32(layer_state);
313
314 ergodox_board_led_off();
315 ergodox_right_led_1_off();
316 ergodox_right_led_2_off();
317 ergodox_right_led_3_off();
318 switch (layer) {
319 // TODO: Make this relevant to the ErgoDox EZ.
320 case 1:
321 ergodox_right_led_1_on();
322 break;
323 case 2:
324 ergodox_right_led_2_on();
325 break;
326 default:
327 // none
328 break;
329 }
330
331};
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer_swe/readme.md b/keyboards/ergodox/keymaps/dvorak_programmer_swe/readme.md
new file mode 100644
index 000000000..552fa0e3a
--- /dev/null
+++ b/keyboards/ergodox/keymaps/dvorak_programmer_swe/readme.md
@@ -0,0 +1,28 @@
1# ErgoDox EZ Dvorak Programmer SWEDISH
2
3Dvorak layout adjusted for a suitable programmer layout and swedish special characters added:
4
5* åäö characters added
6* Layout for common vb.net keywords
7* Common Visual Studio commands like Save, Build, Debug
8
9TODO:
10
11* (Layer 4 is qwerty (for easier gaming & less fortunate keyboard users)) Like this idea, will add it later on
12
13Known issues:
14
15* Keymap 2 modifier has not gotten its place yet..
16* Print screen, where?
17
18
19## Changelog
20
21* 2017-05-16
22 * Initial release
23
24# Author
25Christian Westerlund
26cwesterlund @ github
27
28Thanks to the author of keymap csharp_dev for inspiration! \ No newline at end of file
diff --git a/keyboards/ergodox/keymaps/xyverz/keymap.c b/keyboards/ergodox/keymaps/xyverz/keymap.c
index ec909ec53..b186c70ba 100644
--- a/keyboards/ergodox/keymaps/xyverz/keymap.c
+++ b/keyboards/ergodox/keymaps/xyverz/keymap.c
@@ -254,7 +254,7 @@ const uint16_t PROGMEM fn_actions[] = {
254 254
255}; 255};
256 256
257void persistant_default_layer_set(uint16_t default_layer) { 257void persistent_default_layer_set(uint16_t default_layer) {
258 eeconfig_update_default_layer(default_layer); 258 eeconfig_update_default_layer(default_layer);
259 default_layer_set(default_layer); 259 default_layer_set(default_layer);
260} 260}
@@ -265,17 +265,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
265 switch(id) { 265 switch(id) {
266 case _DV: 266 case _DV:
267 if (record->event.pressed) { 267 if (record->event.pressed) {
268 persistant_default_layer_set(1UL<<_DV); 268 persistent_default_layer_set(1UL<<_DV);
269 } 269 }
270 break; 270 break;
271 case _QW: 271 case _QW:
272 if (record->event.pressed) { 272 if (record->event.pressed) {
273 persistant_default_layer_set(1UL<<_QW); 273 persistent_default_layer_set(1UL<<_QW);
274 } 274 }
275 break; 275 break;
276 case _CM: 276 case _CM:
277 if (record->event.pressed) { 277 if (record->event.pressed) {
278 persistant_default_layer_set(1UL<<_CM); 278 persistent_default_layer_set(1UL<<_CM);
279 } 279 }
280 break; 280 break;
281 } 281 }
diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md
index 3d6fb455a..90ede90ae 100644
--- a/keyboards/ergodox/readme.md
+++ b/keyboards/ergodox/readme.md
@@ -78,7 +78,6 @@ Linux page]. Some distributions provide a binary, maybe called
78To flash the firmware: 78To flash the firmware:
79 79
80 - Build the firmware with `make keymapname`, for example `make default` 80 - Build the firmware with `make keymapname`, for example `make default`
81
82 - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. 81 - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g.
83 `ergodox_ez_default.hex` 82 `ergodox_ez_default.hex`
84 83
diff --git a/keyboards/frosty_flake/keymaps/nikchi/Makefile b/keyboards/frosty_flake/keymaps/nikchi/Makefile
new file mode 100644
index 000000000..ad86e82d2
--- /dev/null
+++ b/keyboards/frosty_flake/keymaps/nikchi/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 = 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
15UNICODEMAP_ENABLE = yes # unicodemap
16BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
17RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
18SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
19TAP_DANCE_ENABLE = yes
20
21ifndef QUANTUM_DIR
22 include ../../../../Makefile
23endif
diff --git a/keyboards/frosty_flake/keymaps/nikchi/config.h b/keyboards/frosty_flake/keymaps/nikchi/config.h
new file mode 100644
index 000000000..3f7852643
--- /dev/null
+++ b/keyboards/frosty_flake/keymaps/nikchi/config.h
@@ -0,0 +1,23 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6#define TAPPING_TERM 200
7#define LEADER_TIMEOUT 800
8
9#define DISABLE_SPACE_CADET_ROLLOVER
10
11#define UNICODE_TYPE_DELAY 0
12
13#define LSPO_KEY KC_9
14#define RSPC_KEY KC_0
15
16#define MOUSEKEY_INTERVAL 20
17#define MOUSEKEY_DELAY 0
18#define MOUSEKEY_TIME_TO_MAX 60
19#define MOUSEKEY_MAX_SPEED 7
20#define MOUSEKEY_WHEEL_DELAY 0
21// place overrides here
22
23#endif
diff --git a/keyboards/frosty_flake/keymaps/nikchi/keymap.c b/keyboards/frosty_flake/keymaps/nikchi/keymap.c
new file mode 100644
index 000000000..fbabb482a
--- /dev/null
+++ b/keyboards/frosty_flake/keymaps/nikchi/keymap.c
@@ -0,0 +1,241 @@
1#include "frosty_flake.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4#include "process_unicode.h"
5#include "process_unicodemap.h"
6#include "quantum.h"
7
8#define _______ KC_TRNS
9#define EMOJIBLOCK 5
10
11
12//declarations for tap dancing emojis
13void register_hex32(uint32_t hex);
14void cycleEmojis(qk_tap_dance_state_t *state, void *user_data);
15void cycleAnimals(qk_tap_dance_state_t *state, void *user_data);
16void cycleHands(qk_tap_dance_state_t *state, void *user_data);
17void cycleMemes(qk_tap_dance_state_t *state, void *user_data);
18
19void tap(uint16_t keycode){
20 register_code(keycode);
21 unregister_code(keycode);
22};
23
24//Tap Dance Declarations
25enum taps{
26 TD_CTCPS = 0,
27 EMOJIS,
28 ANIMAL,
29 HAND,
30 MEMES
31};
32
33enum unicode_name { // split every five emojis
34 THINK = 1, // thinking face 🤔
35 GRIN, // grinning face 😊
36 SMRK, // smirk 😏
37 WEARY, // good shit 😩
38 UNAMU, // unamused 😒
39
40 SNEK, // snke 🐍
41 PENGUIN, // 🐧
42 DRAGON, // 🐉
43 MONKEY, // 🐒
44 CHICK, // 🐥
45
46 OKOK, // 👌
47 EFFU, // 🖕
48 INUP, // 👆
49 THUP, // 👍
50 THDN, // 👎
51
52 BBB, // dat B 🅱
53 POO, // poop 💩
54 HUNDR, // 100 💯
55 EGGPL, // EGGPLANT 🍆
56 WATER, // wet 💦
57
58 LIT // fire 🔥
59
60};
61
62enum my_macros {
63 NEWDESK = 0,
64 LEFTDESK,
65 RIGHTDESK,
66 CLOSEDESK
67};
68
69
70// Tap Dance Definitions
71qk_tap_dance_action_t tap_dance_actions[] = {
72 // Tap once for CTRL, twice for Caps Lock
73 [TD_CTCPS] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_CAPS),
74 [EMOJIS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleEmojis, NULL, NULL, 800),
75 [ANIMAL] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleAnimals, NULL, NULL, 800),
76 [HAND] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleHands, NULL, NULL, 800),
77 [MEMES] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleMemes, NULL, NULL, 800)
78// Other declarations would go here, separated by commas, if you have them
79};
80
81// macros
82const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
83 switch(id) {
84 case NEWDESK: // this would trigger when you hit a key mapped as M(0)
85 if (record->event.pressed) {
86 return MACRO( I(1), D(LGUI), D(LCTL), D(D), U(LGUI), U(LCTL), U(D), END ); // NEW DESKTOP
87 }
88 break;
89 case LEFTDESK: // this would trigger when you hit a key mapped as M(0)
90 if (record->event.pressed) {
91 return MACRO( I(1), D(LGUI), D(LCTL), D(LEFT), U(LGUI), U(LCTL), U(LEFT), END ); // LEFT DESKTOP
92 }
93 break;
94 case RIGHTDESK: // this would trigger when you hit a key mapped as M(0)
95 if (record->event.pressed) {
96 return MACRO( I(1), D(LGUI), D(LCTL), D(RGHT), U(LGUI), U(LCTL), U(RGHT), END ); // RIGHT DESKTOP
97 }
98 break;
99 case CLOSEDESK: // this would trigger when you hit a key mapped as M(0)
100 if (record->event.pressed) {
101 return MACRO( I(1), D(LGUI), D(LCTL), D(F4), U(LGUI), U(LCTL), U(F4), END ); // CLOSE DESKTOP
102 }
103 break;
104 }
105 return MACRO_NONE;
106};
107
108// emojis in unicode
109const uint32_t PROGMEM unicode_map[] = {
110 [THINK] = 0x1F914,
111 [GRIN] = 0x1F600,
112 [BBB] = 0x1F171,
113 [POO] = 0x1F4A9,
114 [HUNDR] = 0x1F4AF,
115 [SMRK] = 0x1F60F,
116 [WEARY] = 0x1F629,
117 [EGGPL] = 0x1F346,
118 [WATER] = 0x1F4A6,
119 [LIT] = 0x1F525,
120 [UNAMU] = 0x1F612,
121 [SNEK] = 0x1F40D,
122 [PENGUIN] = 0x1F427,
123 [MONKEY] = 0x1F412,
124 [CHICK] = 0x1F425,
125 [DRAGON] = 0x1F409,
126 [OKOK] = 0x1F44C,
127 [EFFU] = 0x1F595,
128 [INUP] = 0x1F446,
129 [THDN] = 0x1F44E,
130 [THUP] = 0x1F44D
131 };
132// Layouts
133const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
134[0] = KEYMAP(\
135 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, \
136 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, \
137 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, \
138 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, KC_P4, KC_P5, KC_P6, \
139 KC_LSPO,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSPC, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
140 TD(TD_CTCPS),KC_LGUI,KC_LALT, KC_SPC, KC_LEAD,KC_RGUI, KC_APP,MO(1) , KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT),
141[1] = KEYMAP(\
142 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, \
143 TD(EMOJIS),TD(ANIMAL),TD(HAND),TD(MEMES),X(WEARY),X(UNAMU), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
144 KC_TAB, KC_Q, M(0), KC_E, KC_R,X(EGGPL),X(WATER), KC_U, KC_I, KC_O, KC_P, KC_UP ,KC_RBRC,KC_BSLS, KC_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \
145 KC_LCTL, M(1), M(3), M(2), KC_F, X(LIT), X(SNEK), KC_J, KC_K, KC_L,KC_LEFT,KC_RGHT, KC_ENT, KC_P4, KC_P5, KC_P6, \
146 KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, X(HUNDR), X(BBB), X(POO), KC_M,KC_COMM, KC_DOT,KC_DOWN, KC_RSFT, KC_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \
147 KC_BTN1,KC_BTN3,KC_BTN2, KC_SPC, KC_RALT,KC_RGUI, TG(2),_______ , KC_MS_L,KC_MS_D,KC_MS_R, KC_P0,KC_PDOT),
148[2] = KEYMAP(\
149 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, \
150 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_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
151 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_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \
152 KC_LCTL, KC_D, 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, \
153 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_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \
154 KC_BTN1,KC_BTN3,KC_BTN2, KC_SPC, KC_RALT,KC_RGUI, _______, _______, KC_MS_L,KC_MS_D,KC_MS_R, KC_P0,KC_PDOT),
155};
156
157LEADER_EXTERNS();
158
159void matrix_scan_user(void) {
160 LEADER_DICTIONARY() {
161 leading = false;
162 leader_end();
163
164 SEQ_TWO_KEYS(KC_A, KC_A) { // select all and copy
165 register_code(KC_LCTL);
166 tap(KC_A);
167 tap(KC_C);
168 unregister_code(KC_LCTL);
169 }
170 SEQ_THREE_KEYS(KC_L,KC_I,KC_T) { // 🔥🔥
171 unicode_input_start();
172 register_hex32(pgm_read_dword(&unicode_map[LIT]));
173 unicode_input_finish();
174 }
175
176 }
177}
178
179void matrix_init_user(void) {
180 _delay_ms(500);
181 set_unicode_input_mode(UC_WINC);
182};
183
184
185void cycleEmojis(qk_tap_dance_state_t *state, void *user_data) {
186 if(state->count == 1) {
187 unicode_input_start();
188 register_hex32(pgm_read_dword(&unicode_map[state->count]));
189 unicode_input_finish();
190 }
191 else if(state->count <= EMOJIBLOCK) {
192 tap(KC_BSPC);
193 unicode_input_start();
194 register_hex32(pgm_read_dword(&unicode_map[state->count]));
195 unicode_input_finish();
196 }
197};
198
199void cycleAnimals(qk_tap_dance_state_t *state, void *user_data) {
200 if(state->count == 1) {
201 unicode_input_start();
202 register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
203 unicode_input_finish();
204 }
205 else if(state->count <= EMOJIBLOCK) {
206 tap(KC_BSPC);
207 unicode_input_start();
208 register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
209 unicode_input_finish();
210 }
211};
212
213void cycleHands(qk_tap_dance_state_t *state, void *user_data) {
214 if(state->count == 1) {
215 unicode_input_start();
216 register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
217 unicode_input_finish();
218 }
219 else if(state->count <= EMOJIBLOCK) {
220 tap(KC_BSPC);
221 unicode_input_start();
222 register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
223 unicode_input_finish();
224 }
225};
226
227void cycleMemes(qk_tap_dance_state_t *state, void *user_data) {
228 if(state->count == 1) {
229 unicode_input_start();
230 register_hex32(pgm_read_dword(&unicode_map[state->count+15]));
231 unicode_input_finish();
232 }
233 else if(state->count <= EMOJIBLOCK) {
234 tap(KC_BSPC);
235 unicode_input_start();
236 register_hex32(pgm_read_dword(&unicode_map[state->count+15]));
237 unicode_input_finish();
238 }
239};
240
241
diff --git a/keyboards/frosty_flake/keymaps/nikchi/readme.md b/keyboards/frosty_flake/keymaps/nikchi/readme.md
new file mode 100644
index 000000000..0b01f9dbf
--- /dev/null
+++ b/keyboards/frosty_flake/keymaps/nikchi/readme.md
@@ -0,0 +1,24 @@
1# The Nikchi's keymap for frosty_flake
2
3### FEATURING
4-SPACE CADET
5-Caps Lock is now LCTRL
6-LCTRL is Tap(LCTRL, Caps Lock)
7
8### LEADER KEY - RALT
9COMBOS
10-a,a => Select All, Copy
11
12
13
14### FN REBINDS for Windows
15```
16 [W] [New Desktop]
17[A][S][D] [Left Desk][Delete Desk][Right Desk]
18
19[Ins][Hom][PUp] [RW][PP][FF]
20[Del][End][PDn] [MU][VD][VU]
21
22Arrows are Mouskeys, left three mods are clicks
23
24``` \ No newline at end of file
diff --git a/keyboards/frosty_flake/keymaps/nikchi/variableTapDance.md b/keyboards/frosty_flake/keymaps/nikchi/variableTapDance.md
new file mode 100644
index 000000000..b2e504139
--- /dev/null
+++ b/keyboards/frosty_flake/keymaps/nikchi/variableTapDance.md
@@ -0,0 +1,9 @@
1# Tap Dancing to different beats.
2Tap Dance is constrained normally by `TAPPING_TERM` defined in your keyboard's config.h This proves to be challenging to work with when sometimes you just need more time to tap out your dance, or even a different "beat".
3
4
5
6- `ACTION_TAP_DANCE_FN_ADVANCED_TIME(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, tap_specific_tapping_term)` : This works the same as `ACTION_TAP_DANCE_FN_ADVANCED` just with the extra `tap_specific_tapping_term` arguement at the end. This way you can set a specific tap dance to have a longer or shorter tap in between your taps, giving you more, or less, time in between each tap.
7
8
9`tap_specific_tapping_term` should be the same type and range of values that one would put into the `TAPPING_TERM` definition in the config.h file.
diff --git a/keyboards/frosty_flake/rules.mk b/keyboards/frosty_flake/rules.mk
index dd2f4b6ee..f878533fe 100644
--- a/keyboards/frosty_flake/rules.mk
+++ b/keyboards/frosty_flake/rules.mk
@@ -54,8 +54,8 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) 54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) 55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) 56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
57CONSOLE_ENABLE ?= yes # Console for debug(+400) 57CONSOLE_ENABLE ?= no # Console for debug(+400)
58COMMAND_ENABLE ?= yes # Commands for debug and configuration 58COMMAND_ENABLE ?= no # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 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 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 61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
diff --git a/keyboards/gh60/keymaps/xyverz/keymap.c b/keyboards/gh60/keymaps/xyverz/keymap.c
index e83a7f5a3..6d1d8ab27 100644
--- a/keyboards/gh60/keymaps/xyverz/keymap.c
+++ b/keyboards/gh60/keymaps/xyverz/keymap.c
@@ -121,7 +121,7 @@ const uint16_t PROGMEM fn_actions[] = {
121 121
122}; 122};
123 123
124void persistant_default_layer_set(uint16_t default_layer) { 124void persistent_default_layer_set(uint16_t default_layer) {
125 eeconfig_update_default_layer(default_layer); 125 eeconfig_update_default_layer(default_layer);
126 default_layer_set(default_layer); 126 default_layer_set(default_layer);
127} 127}
@@ -131,17 +131,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
131 switch(id) { 131 switch(id) {
132 case _DV: 132 case _DV:
133 if (record->event.pressed) { 133 if (record->event.pressed) {
134 persistant_default_layer_set(1UL<<_DV); 134 persistent_default_layer_set(1UL<<_DV);
135 } 135 }
136 break; 136 break;
137 case _QW: 137 case _QW:
138 if (record->event.pressed) { 138 if (record->event.pressed) {
139 persistant_default_layer_set(1UL<<_QW); 139 persistent_default_layer_set(1UL<<_QW);
140 } 140 }
141 break; 141 break;
142 case _CM: 142 case _CM:
143 if (record->event.pressed) { 143 if (record->event.pressed) {
144 persistant_default_layer_set(1UL<<_CM); 144 persistent_default_layer_set(1UL<<_CM);
145 } 145 }
146 break; 146 break;
147 } 147 }
diff --git a/keyboards/gherkin/Makefile b/keyboards/gherkin/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/gherkin/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif
diff --git a/keyboards/gherkin/README.md b/keyboards/gherkin/README.md
new file mode 100644
index 000000000..0a3d6fabe
--- /dev/null
+++ b/keyboards/gherkin/README.md
@@ -0,0 +1,12 @@
1
2About
3------
4
5First pass at adding support for the gherkin keyboard. Compiles but completely
6untested. Intended to kick-start development.
7
8* [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html)
9* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gherkin)
10
11Credit to JadedC for the initial work.
12
diff --git a/keyboards/gherkin/config.h b/keyboards/gherkin/config.h
new file mode 100644
index 000000000..27919efbb
--- /dev/null
+++ b/keyboards/gherkin/config.h
@@ -0,0 +1,58 @@
1#ifndef CONFIG_H
2#define CONFIG_H
3
4#include "config_common.h"
5
6/* USB Device descriptor parameter */
7#define VENDOR_ID 0xFEED
8#define PRODUCT_ID 0x6060
9#define DEVICE_VER 0x0001
10#define MANUFACTURER qmkbuilder
11#define PRODUCT keyboard
12#define DESCRIPTION Keyboard
13
14/* key matrix size */
15#define MATRIX_ROWS 5
16#define MATRIX_COLS 6
17
18/* key matrix pins */
19#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 }
20#define MATRIX_COL_PINS { B4, E6, D7, C6, D4, D0 }
21#define UNUSED_PINS
22
23/* COL2ROW or ROW2COL */
24#define DIODE_DIRECTION COL2ROW
25
26/* number of backlight levels */
27#define BACKLIGHT_PIN B5
28#ifdef BACKLIGHT_PIN
29#define BACKLIGHT_LEVELS 3
30#endif
31
32/* Set 0 if debouncing isn't needed */
33#define DEBOUNCING_DELAY 5
34
35/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
36#define LOCKING_SUPPORT_ENABLE
37
38/* Locking resynchronize hack */
39#define LOCKING_RESYNC_ENABLE
40
41/* key combination for command */
42#define IS_COMMAND() ( \
43 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
44)
45
46/* prevent stuck modifiers */
47#define PREVENT_STUCK_MODIFIERS
48
49
50#ifdef RGB_DI_PIN
51#define RGBLIGHT_ANIMATIONS
52#define RGBLED_NUM 0
53#define RGBLIGHT_HUE_STEP 8
54#define RGBLIGHT_SAT_STEP 8
55#define RGBLIGHT_VAL_STEP 8
56#endif
57
58#endif \ No newline at end of file
diff --git a/keyboards/gherkin/gherkin.c b/keyboards/gherkin/gherkin.c
new file mode 100644
index 000000000..2952d842c
--- /dev/null
+++ b/keyboards/gherkin/gherkin.c
@@ -0,0 +1 @@
#include "gherkin.h"
diff --git a/keyboards/gherkin/gherkin.h b/keyboards/gherkin/gherkin.h
new file mode 100644
index 000000000..ebb2303ac
--- /dev/null
+++ b/keyboards/gherkin/gherkin.h
@@ -0,0 +1,18 @@
1#ifndef GHERKIN_H
2#define GHERKIN_H
3
4#include "quantum.h"
5
6#define KEYMAP( \
7 K00, K01, K02, K03, K04, K05, K10, K11, K12, K13 , \
8 K14, K15, K20, K21, K22, K23, K24, K25, K30, K31 , \
9 K32, K33, K34, K35, K40, K41, K42, K43, K44, K45 \
10) { \
11 { K00, K01, K02, K03, K04, K05 }, \
12 { K10, K11, K12, K13, K14, K15 }, \
13 { K20, K21, K22, K23, K24, K25 }, \
14 { K30, K31, K32, K33, K34, K35 }, \
15 { K40, K41, K42, K43, K44, K45 } \
16}
17
18#endif
diff --git a/keyboards/gherkin/keymaps/default/keymap.c b/keyboards/gherkin/keymaps/default/keymap.c
new file mode 100644
index 000000000..718504676
--- /dev/null
+++ b/keyboards/gherkin/keymaps/default/keymap.c
@@ -0,0 +1,171 @@
1#include "gherkin.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4
5 KEYMAP(
6 LT(1, KC_Q), KC_W, KC_E, KC_R, KC_T, KC_Y,
7 KC_U, KC_I, KC_O, KC_P, KC_A, KC_S,
8 KC_D, KC_F, KC_G, KC_H, KC_J, KC_K,
9 KC_L, KC_ESC, KC_Z, KC_X, KC_C, KC_V,
10 KC_BSPC, KC_SPC, KC_B, KC_N, KC_M, KC_ENT),
11
12 KEYMAP(
13 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
14 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
15 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
16 KC_TRNS, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
17 KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, BL_DEC),
18
19 KEYMAP(
20 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
21 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
22 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
23 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
24 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
25
26 KEYMAP(
27 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
28 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
29 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
30 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
31 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
32
33 KEYMAP(
34 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
35 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
36 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
37 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
38 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
39
40 KEYMAP(
41 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
42 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
43 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
44 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
45 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
46
47 KEYMAP(
48 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,
50 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
51 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
52 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
53
54 KEYMAP(
55 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,
57 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
58 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),
60
61 KEYMAP(
62 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
63 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
64 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
65 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
66 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
67
68 KEYMAP(
69 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
70 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
71 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
72 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
73 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
74
75 KEYMAP(
76 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
77 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
78 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
79 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
80 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
81
82 KEYMAP(
83 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
84 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
85 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
86 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
87 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
88
89 KEYMAP(
90 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
91 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
92 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
93 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
94 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
95
96 KEYMAP(
97 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
98 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
99 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
100 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
101 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
102
103 KEYMAP(
104 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
105 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
106 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
107 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
108 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
109
110 KEYMAP(
111 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
112 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
113 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
114 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
115 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
116
117};
118
119const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
120 keyevent_t event = record->event;
121 (void)event;
122
123 switch (id) {
124
125 }
126 return MACRO_NONE;
127}
128
129void matrix_init_user(void) {
130}
131
132void matrix_scan_user(void) {
133}
134
135bool process_record_user(uint16_t keycode, keyrecord_t *record) {
136 return true;
137}
138
139void led_set_user(uint8_t usb_led) {
140
141 if (usb_led & (1 << USB_LED_NUM_LOCK)) {
142 DDRD |= (1 << 5); PORTD &= ~(1 << 5);
143 } else {
144 DDRD &= ~(1 << 5); PORTD &= ~(1 << 5);
145 }
146
147 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
148 DDRB |= (1 << 0); PORTB &= ~(1 << 0);
149 } else {
150 DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
151 }
152
153 if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
154
155 } else {
156
157 }
158
159 if (usb_led & (1 << USB_LED_COMPOSE)) {
160
161 } else {
162
163 }
164
165 if (usb_led & (1 << USB_LED_KANA)) {
166
167 } else {
168
169 }
170
171}
diff --git a/keyboards/gherkin/rules.mk b/keyboards/gherkin/rules.mk
new file mode 100644
index 000000000..0e7a40727
--- /dev/null
+++ b/keyboards/gherkin/rules.mk
@@ -0,0 +1,56 @@
1# MCU name
2MCU = atmega32u4
3
4# Processor frequency.
5# This will define a symbol, F_CPU, in all source code files equal to the
6# processor frequency in Hz. You can then use this symbol in your source code to
7# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
8# automatically to create a 32-bit value in your source code.
9#
10# This will be an integer division of F_USB below, as it is sourced by
11# F_USB after it has run through any CPU prescalers. Note that this value
12# does not *change* the processor frequency - it should merely be updated to
13# reflect the processor speed set externally so that the code can use accurate
14# software delays.
15F_CPU = 16000000
16
17#
18# LUFA specific
19#
20# Target architecture (see library "Board Types" documentation).
21ARCH = AVR8
22
23# Input clock frequency.
24# This will define a symbol, F_USB, in all source code files equal to the
25# input clock frequency (before any prescaling is performed) in Hz. This value may
26# differ from F_CPU if prescaling is used on the latter, and is required as the
27# raw input clock is fed directly to the PLL sections of the AVR for high speed
28# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
29# at the end, this will be done automatically to create a 32-bit value in your
30# source code.
31#
32# If no clock division is performed on the input clock inside the AVR (via the
33# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
34F_USB = $(F_CPU)
35
36# Interrupt driven control endpoint task(+60)
37OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
38
39
40# Boot Section Size in *bytes*
41OPT_DEFS += -DBOOTLOADER_SIZE=4096
42
43
44# Build Options
45# comment out to disable the options.
46#
47BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
48MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
49EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
50CONSOLE_ENABLE ?= no # Console for debug(+400)
51COMMAND_ENABLE ?= no # Commands for debug and configuration
52SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
53NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
54BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
55AUDIO_ENABLE ?= no
56RGBLIGHT_ENABLE ?= no \ No newline at end of file
diff --git a/keyboards/handwired/atreus50/keymaps/default/keymap.c b/keyboards/handwired/atreus50/keymaps/default/keymap.c
index 77cf942c3..739fb2685 100644
--- a/keyboards/handwired/atreus50/keymaps/default/keymap.c
+++ b/keyboards/handwired/atreus50/keymaps/default/keymap.c
@@ -147,7 +147,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
147float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); 147float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
148#endif 148#endif
149 149
150void persistant_default_layer_set(uint16_t default_layer) { 150void persistent_default_layer_set(uint16_t default_layer) {
151 eeconfig_update_default_layer(default_layer); 151 eeconfig_update_default_layer(default_layer);
152 default_layer_set(default_layer); 152 default_layer_set(default_layer);
153} 153}
@@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
159 #ifdef AUDIO_ENABLE 159 #ifdef AUDIO_ENABLE
160 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 160 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
161 #endif 161 #endif
162 persistant_default_layer_set(1UL<<_QWERTY); 162 persistent_default_layer_set(1UL<<_QWERTY);
163 } 163 }
164 return false; 164 return false;
165 break; 165 break;
@@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
168 #ifdef AUDIO_ENABLE 168 #ifdef AUDIO_ENABLE
169 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 169 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
170 #endif 170 #endif
171 persistant_default_layer_set(1UL<<_COLEMAK); 171 persistent_default_layer_set(1UL<<_COLEMAK);
172 } 172 }
173 return false; 173 return false;
174 break; 174 break;
@@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
177 #ifdef AUDIO_ENABLE 177 #ifdef AUDIO_ENABLE
178 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 178 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
179 #endif 179 #endif
180 persistant_default_layer_set(1UL<<_DVORAK); 180 persistent_default_layer_set(1UL<<_DVORAK);
181 } 181 }
182 return false; 182 return false;
183 break; 183 break;
diff --git a/keyboards/handwired/magicforce68/README.md b/keyboards/handwired/magicforce68/README.md
index 4f0ccecf9..2877169ef 100644
--- a/keyboards/handwired/magicforce68/README.md
+++ b/keyboards/handwired/magicforce68/README.md
@@ -5,7 +5,7 @@ This firmware is for a Magicforce 68 that's had its PCB removed and is handwired
5 5
6## Wiring Layout 6## Wiring Layout
7 7
8![Wiring Layout](wiring-layout.png) 8![Wiring Layout](http://imgur.com/NmTCv5u)
9 9
10## Pinout 10## Pinout
11 11
diff --git a/keyboards/handwired/magicforce68/wiring-layout.png b/keyboards/handwired/magicforce68/wiring-layout.png
deleted file mode 100644
index 816b10b2b..000000000
--- a/keyboards/handwired/magicforce68/wiring-layout.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/handwired/ortho5x13/keymaps/default/keymap.c b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c
index c1262a83d..971099747 100644
--- a/keyboards/handwired/ortho5x13/keymaps/default/keymap.c
+++ b/keyboards/handwired/ortho5x13/keymaps/default/keymap.c
@@ -186,7 +186,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
186float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); 186float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
187#endif 187#endif
188 188
189void persistant_default_layer_set(uint16_t default_layer) { 189void persistent_default_layer_set(uint16_t default_layer) {
190 eeconfig_update_default_layer(default_layer); 190 eeconfig_update_default_layer(default_layer);
191 default_layer_set(default_layer); 191 default_layer_set(default_layer);
192} 192}
@@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
198 #ifdef AUDIO_ENABLE 198 #ifdef AUDIO_ENABLE
199 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 199 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
200 #endif 200 #endif
201 persistant_default_layer_set(1UL<<_QWERTY); 201 persistent_default_layer_set(1UL<<_QWERTY);
202 } 202 }
203 return false; 203 return false;
204 break; 204 break;
@@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
207 #ifdef AUDIO_ENABLE 207 #ifdef AUDIO_ENABLE
208 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 208 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
209 #endif 209 #endif
210 persistant_default_layer_set(1UL<<_COLEMAK); 210 persistent_default_layer_set(1UL<<_COLEMAK);
211 } 211 }
212 return false; 212 return false;
213 break; 213 break;
@@ -216,7 +216,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
216 #ifdef AUDIO_ENABLE 216 #ifdef AUDIO_ENABLE
217 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 217 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
218 #endif 218 #endif
219 persistant_default_layer_set(1UL<<_DVORAK); 219 persistent_default_layer_set(1UL<<_DVORAK);
220 } 220 }
221 return false; 221 return false;
222 break; 222 break;
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
index d562c7bbf..763fa5a27 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
@@ -955,7 +955,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
955 955
956}; 956};
957 957
958void persistant_default_layer_set(uint16_t default_layer) { 958void persistent_default_layer_set(uint16_t default_layer) {
959 eeconfig_update_default_layer(default_layer); 959 eeconfig_update_default_layer(default_layer);
960 default_layer_set(default_layer); 960 default_layer_set(default_layer);
961#ifdef RGBSPS_ENABLE 961#ifdef RGBSPS_ENABLE
@@ -1134,14 +1134,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
1134 // layout switchers 1134 // layout switchers
1135 case QWERTY: 1135 case QWERTY:
1136 if (record->event.pressed) { 1136 if (record->event.pressed) {
1137 persistant_default_layer_set(1UL<<_QWERTY); 1137 persistent_default_layer_set(1UL<<_QWERTY);
1138 } 1138 }
1139 return false; 1139 return false;
1140 break; 1140 break;
1141#ifdef LAYOUT_DVORAK 1141#ifdef LAYOUT_DVORAK
1142 case DVORAK: 1142 case DVORAK:
1143 if (record->event.pressed) { 1143 if (record->event.pressed) {
1144 persistant_default_layer_set(1UL<<_DVORAK); 1144 persistent_default_layer_set(1UL<<_DVORAK);
1145 } 1145 }
1146 return false; 1146 return false;
1147 break; 1147 break;
@@ -1149,7 +1149,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
1149#ifdef LAYOUT_COLEMAK 1149#ifdef LAYOUT_COLEMAK
1150 case COLEMAK: 1150 case COLEMAK:
1151 if (record->event.pressed) { 1151 if (record->event.pressed) {
1152 persistant_default_layer_set(1UL<<_COLEMAK); 1152 persistent_default_layer_set(1UL<<_COLEMAK);
1153 } 1153 }
1154 return false; 1154 return false;
1155 break; 1155 break;
@@ -1157,7 +1157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
1157#ifdef LAYOUT_WORKMAN 1157#ifdef LAYOUT_WORKMAN
1158 case WORKMAN: 1158 case WORKMAN:
1159 if (record->event.pressed) { 1159 if (record->event.pressed) {
1160 persistant_default_layer_set(1UL<<_WORKMAN); 1160 persistent_default_layer_set(1UL<<_WORKMAN);
1161 } 1161 }
1162 return false; 1162 return false;
1163 break; 1163 break;
@@ -1165,7 +1165,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
1165#ifdef LAYOUT_NORMAN 1165#ifdef LAYOUT_NORMAN
1166 case NORMAN: 1166 case NORMAN:
1167 if (record->event.pressed) { 1167 if (record->event.pressed) {
1168 persistant_default_layer_set(1UL<<_NORMAN); 1168 persistent_default_layer_set(1UL<<_NORMAN);
1169 } 1169 }
1170 return false; 1170 return false;
1171 break; 1171 break;
diff --git a/keyboards/handwired/trackpoint/Makefile b/keyboards/handwired/trackpoint/Makefile
new file mode 100644
index 000000000..191c6bb66
--- /dev/null
+++ b/keyboards/handwired/trackpoint/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/handwired/trackpoint/README.md b/keyboards/handwired/trackpoint/README.md
new file mode 100644
index 000000000..bbfcaab0c
--- /dev/null
+++ b/keyboards/handwired/trackpoint/README.md
@@ -0,0 +1,10 @@
1# IBM Trackpoint demonstration
2
3This is just a simple demo to show how to integrate IBM Trackpoint in QMK.
4
5Wiring used in the demonstration:
6![Wiring example](http://imgur.com/8ghG2U8)
7
8Some documentation:
9* [How to wire IBM Trackpoint](https://github.com/alonswartz/trackpoint)
10* [QMK documentation](https://docs.qmk.fm/)
diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h
new file mode 100644
index 000000000..7558c03bf
--- /dev/null
+++ b/keyboards/handwired/trackpoint/config.h
@@ -0,0 +1,75 @@
1#ifndef CONFIG_H
2 #define CONFIG_H
3
4 #include "config_common.h"
5
6 #define VENDOR_ID 0x1234
7 #define PRODUCT_ID 0x5678
8 #define DEVICE_VER 0x0001
9 #define MANUFACTURER QMK
10 #define PRODUCT TRACKPOINT-DEMO
11 #define DESCRIPTION Simple demonstration for IBM Trackpoint integration
12
13 #define MATRIX_ROWS 1
14 #define MATRIX_COLS 3
15
16 #ifdef PS2_USE_USART
17 #define PS2_CLOCK_PORT PORTD
18 #define PS2_CLOCK_PIN PIND
19 #define PS2_CLOCK_DDR DDRD
20 #define PS2_CLOCK_BIT 5
21 #define PS2_DATA_PORT PORTD
22 #define PS2_DATA_PIN PIND
23 #define PS2_DATA_DDR DDRD
24 #define PS2_DATA_BIT 2
25
26 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
27 /* set DDR of CLOCK as input to be slave */
28 #define PS2_USART_INIT() do { \
29 PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
30 PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
31 UCSR1C = ((1 << UMSEL10) | \
32 (3 << UPM10) | \
33 (0 << USBS1) | \
34 (3 << UCSZ10) | \
35 (0 << UCPOL1)); \
36 UCSR1A = 0; \
37 UBRR1H = 0; \
38 UBRR1L = 0; \
39 } while (0)
40 #define PS2_USART_RX_INT_ON() do { \
41 UCSR1B = ((1 << RXCIE1) | \
42 (1 << RXEN1)); \
43 } while (0)
44 #define PS2_USART_RX_POLL_ON() do { \
45 UCSR1B = (1 << RXEN1); \
46 } while (0)
47 #define PS2_USART_OFF() do { \
48 UCSR1C = 0; \
49 UCSR1B &= ~((1 << RXEN1) | \
50 (1 << TXEN1)); \
51 } while (0)
52 #define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
53 #define PS2_USART_RX_DATA UDR1
54 #define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
55 #define PS2_USART_RX_VECT USART1_RX_vect
56 #endif
57
58 #define MATRIX_COL_PINS { F1, F4, F5 }
59 #define MATRIX_ROW_PINS { F0 }
60 #define UNUSED_PINS
61
62 /* COL2ROW or ROW2COL */
63 #define DIODE_DIRECTION COL2ROW
64
65 #define DEBOUNCING_DELAY 5
66
67 #define LOCKING_SUPPORT_ENABLE
68 #define LOCKING_RESYNC_ENABLE
69
70 /* key combination for command */
71 #define IS_COMMAND() ( \
72 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
73 )
74
75#endif
diff --git a/keyboards/handwired/trackpoint/keymaps/default/keymap.c b/keyboards/handwired/trackpoint/keymaps/default/keymap.c
new file mode 100644
index 000000000..22e46d98a
--- /dev/null
+++ b/keyboards/handwired/trackpoint/keymaps/default/keymap.c
@@ -0,0 +1,7 @@
1#include "trackpoint.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4 [0] = KEYMAP(
5 KC_BTN1, KC_BTN3, KC_BTN2 \
6 )
7};
diff --git a/keyboards/handwired/trackpoint/rules.mk b/keyboards/handwired/trackpoint/rules.mk
new file mode 100644
index 000000000..0609dd304
--- /dev/null
+++ b/keyboards/handwired/trackpoint/rules.mk
@@ -0,0 +1,25 @@
1MCU = atmega32u4
2F_CPU = 16000000
3ARCH = AVR8
4F_USB = $(F_CPU)
5OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
6OPT_DEFS += -DBOOTLOADER_SIZE=512
7BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
8MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
9EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
10CONSOLE_ENABLE ?= yes # Console for debug(+400)
11COMMAND_ENABLE ?= yes # Commands for debug and configuration
12SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
13NKRO_ENABLE ?= no # USB Nkey Rollover
14BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
15MIDI_ENABLE ?= no # MIDI controls
16UNICODE_ENABLE ?= no # Unicode
17BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
18AUDIO_ENABLE ?= no # Audio output on port C6
19
20PS2_MOUSE_ENABLE ?= yes
21PS2_USE_USART ?= yes
22
23ifndef QUANTUM_DIR
24 include ../../Makefile
25endif
diff --git a/keyboards/handwired/trackpoint/trackpoint.c b/keyboards/handwired/trackpoint/trackpoint.c
new file mode 100644
index 000000000..124995a64
--- /dev/null
+++ b/keyboards/handwired/trackpoint/trackpoint.c
@@ -0,0 +1,5 @@
1#include "trackpoint.h"
2
3void matrix_init_kb(void) {
4
5}
diff --git a/keyboards/handwired/trackpoint/trackpoint.h b/keyboards/handwired/trackpoint/trackpoint.h
new file mode 100644
index 000000000..b5d73d7db
--- /dev/null
+++ b/keyboards/handwired/trackpoint/trackpoint.h
@@ -0,0 +1,13 @@
1#ifndef TRACKPOINT_H
2#define TRACKPOINT_H
3
4#include "quantum.h"
5
6#define KEYMAP( \
7 k00, k01, k02 \
8) \
9{ \
10 { k00, k01, k02} \
11}
12
13#endif
diff --git a/keyboards/hhkb/keymaps/smt/keymap.c b/keyboards/hhkb/keymaps/smt/keymap.c
index a7ea54de8..484df851a 100644
--- a/keyboards/hhkb/keymaps/smt/keymap.c
+++ b/keyboards/hhkb/keymaps/smt/keymap.c
@@ -146,7 +146,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
146 return MACRO_NONE; 146 return MACRO_NONE;
147}; 147};
148 148
149void persistant_default_layer_set(uint16_t default_layer) { 149void persistent_default_layer_set(uint16_t default_layer) {
150 eeconfig_update_default_layer(default_layer); 150 eeconfig_update_default_layer(default_layer);
151 default_layer_set(default_layer); 151 default_layer_set(default_layer);
152} 152}
@@ -155,19 +155,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
155 switch (keycode) { 155 switch (keycode) {
156 case QWERTY: 156 case QWERTY:
157 if (record->event.pressed) { 157 if (record->event.pressed) {
158 persistant_default_layer_set(1UL<<_QWERTY); 158 persistent_default_layer_set(1UL<<_QWERTY);
159 } 159 }
160 return false; 160 return false;
161 break; 161 break;
162 case COLEMAK: 162 case COLEMAK:
163 if (record->event.pressed) { 163 if (record->event.pressed) {
164 persistant_default_layer_set(1UL<<_COLEMAK); 164 persistent_default_layer_set(1UL<<_COLEMAK);
165 } 165 }
166 return false; 166 return false;
167 break; 167 break;
168 case DVORAK: 168 case DVORAK:
169 if (record->event.pressed) { 169 if (record->event.pressed) {
170 persistant_default_layer_set(1UL<<_DVORAK); 170 persistent_default_layer_set(1UL<<_DVORAK);
171 } 171 }
172 return false; 172 return false;
173 break; 173 break;
diff --git a/keyboards/jd45/keymaps/jeebak/keymap.c b/keyboards/jd45/keymaps/jeebak/keymap.c
index 8d26cbde1..0da114a1e 100644
--- a/keyboards/jd45/keymaps/jeebak/keymap.c
+++ b/keyboards/jd45/keymaps/jeebak/keymap.c
@@ -283,7 +283,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
283/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/ 283/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
284}; 284};
285 285
286void persistant_default_layer_set(uint16_t default_layer) { 286void persistent_default_layer_set(uint16_t default_layer) {
287 eeconfig_update_default_layer(default_layer); 287 eeconfig_update_default_layer(default_layer);
288 default_layer_set(default_layer); 288 default_layer_set(default_layer);
289} 289}
diff --git a/keyboards/jd45/keymaps/jeebak/readme.md b/keyboards/jd45/keymaps/jeebak/readme.md
index 2e45a46d9..216519614 100644
--- a/keyboards/jd45/keymaps/jeebak/readme.md
+++ b/keyboards/jd45/keymaps/jeebak/readme.md
@@ -8,7 +8,7 @@ needed, they will be mapped to home row keys. The `keymap.c` file will contain
8the exact changes. The diagrams in this README shows the highlights of the 8the exact changes. The diagrams in this README shows the highlights of the
9changes from the default mappings. 9changes from the default mappings.
10 10
11I also decided to change all calls to `persistant_default_layer_set()` to 11I also decided to change all calls to `persistent_default_layer_set()` to
12`default_layer_set()` since this is my personal perference. 12`default_layer_set()` since this is my personal perference.
13 13
14## Macros 14## Macros
diff --git a/keyboards/kc60/keymaps/stanleylai/base_layer.png b/keyboards/kc60/keymaps/stanleylai/base_layer.png
deleted file mode 100644
index 97235c6af..000000000
--- a/keyboards/kc60/keymaps/stanleylai/base_layer.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/kc60/keymaps/stanleylai/rgb_layer.png b/keyboards/kc60/keymaps/stanleylai/rgb_layer.png
deleted file mode 100644
index 2bba028bb..000000000
--- a/keyboards/kc60/keymaps/stanleylai/rgb_layer.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/kc60/keymaps/workman-dead/kc60-wm-dead.png b/keyboards/kc60/keymaps/workman-dead/kc60-wm-dead.png
deleted file mode 100644
index cc6a630a5..000000000
--- a/keyboards/kc60/keymaps/workman-dead/kc60-wm-dead.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/kc60/keymaps/workman-dead/readme.md b/keyboards/kc60/keymaps/workman-dead/readme.md
index f1fcdc960..7b4f543f7 100644
--- a/keyboards/kc60/keymaps/workman-dead/readme.md
+++ b/keyboards/kc60/keymaps/workman-dead/readme.md
@@ -1,7 +1,7 @@
1# Workman dead with spacefn (kc60 @ QMK) 1# Workman dead with spacefn (kc60 @ QMK)
2 2
3## Layout reference 3## Layout reference
4![workman dead with spacefn](./kc60-wm-dead.png) 4![workman dead with spacefn](http://imgur.com/Ep8gePQ)
5 5
6## Build 6## Build
7 7
diff --git a/keyboards/kinesis/keymaps/xyverz/keymap.c b/keyboards/kinesis/keymaps/xyverz/keymap.c
index 62f47773c..fa181e039 100644
--- a/keyboards/kinesis/keymaps/xyverz/keymap.c
+++ b/keyboards/kinesis/keymaps/xyverz/keymap.c
@@ -269,7 +269,7 @@ const uint16_t PROGMEM fn_actions[] = {
269 269
270}; 270};
271 271
272void persistant_default_layer_set(uint16_t default_layer) { 272void persistent_default_layer_set(uint16_t default_layer) {
273 eeconfig_update_default_layer(default_layer); 273 eeconfig_update_default_layer(default_layer);
274 default_layer_set(default_layer); 274 default_layer_set(default_layer);
275} 275}
@@ -279,17 +279,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
279 switch(id) { 279 switch(id) {
280 case _DV: 280 case _DV:
281 if (record->event.pressed) { 281 if (record->event.pressed) {
282 persistant_default_layer_set(1UL<<_DV); 282 persistent_default_layer_set(1UL<<_DV);
283 } 283 }
284 break; 284 break;
285 case _QW: 285 case _QW:
286 if (record->event.pressed) { 286 if (record->event.pressed) {
287 persistant_default_layer_set(1UL<<_QW); 287 persistent_default_layer_set(1UL<<_QW);
288 } 288 }
289 break; 289 break;
290 case _CM: 290 case _CM:
291 if (record->event.pressed) { 291 if (record->event.pressed) {
292 persistant_default_layer_set(1UL<<_CM); 292 persistent_default_layer_set(1UL<<_CM);
293 } 293 }
294 break; 294 break;
295 } 295 }
diff --git a/keyboards/kmac/Makefile b/keyboards/kmac/Makefile
new file mode 100644
index 000000000..840dc9a28
--- /dev/null
+++ b/keyboards/kmac/Makefile
@@ -0,0 +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
16ifndef MAKEFILE_INCLUDED
17 include ../../Makefile
18endif
diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h
new file mode 100644
index 000000000..5c164bfc1
--- /dev/null
+++ b/keyboards/kmac/config.h
@@ -0,0 +1,178 @@
1/*
2Copyright 2017 Mathias Andersson <wraul@dbox.se>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6050
26#define DEVICE_VER 0x0104
27#define MANUFACTURER KBDMania
28#define PRODUCT KMAC
29#define DESCRIPTION QMK keyboard firmware for KMAC
30
31/* key matrix size */
32#define MATRIX_ROWS 6
33#define MATRIX_COLS 17
34
35/*
36 * Keyboard Matrix Assignments
37 * The KMAC uses demultiplexers for the cols, they are only included here as documentation.
38 * See matrix.c for more details.
39*/
40#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, B7 }
41#define MATRIX_COL_PINS { C6, B6, F0, F1, C7, B5 }
42#define UNUSED_PINS
43
44/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
45#define DIODE_DIRECTION CUSTOM_MATRIX
46
47/* number of backlight levels */
48#define BACKLIGHT_LEVELS 3
49// #define BACKLIGHT_PIN B7
50// #define BACKLIGHT_BREATHING
51
52/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
53#define DEBOUNCING_DELAY 5
54
55/* define if matrix has ghost (lacks anti-ghosting diodes) */
56//#define MATRIX_HAS_GHOST
57
58/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
59#define LOCKING_SUPPORT_ENABLE
60/* Locking resynchronize hack */
61#define LOCKING_RESYNC_ENABLE
62
63/*
64 * Force NKRO
65 *
66 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
67 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
68 * makefile for this to work.)
69 *
70 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
71 * until the next keyboard reset.
72 *
73 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
74 * fully operational during normal computer usage.
75 *
76 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
77 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
78 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
79 * power-up.
80 *
81 */
82//#define FORCE_NKRO
83
84/*
85 * Magic Key Options
86 *
87 * Magic keys are hotkey commands that allow control over firmware functions of
88 * the keyboard. They are best used in combination with the HID Listen program,
89 * found here: https://www.pjrc.com/teensy/hid_listen.html
90 *
91 * The options below allow the magic key functionality to be changed. This is
92 * useful if your keyboard/keypad is missing keys and you want magic key support.
93 *
94 */
95
96/* key combination for magic key command */
97#define IS_COMMAND() ( \
98 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
99)
100
101/* control how magic key switches layers */
102//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
103//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
104//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
105
106/* override magic key keymap */
107//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
108//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
110//#define MAGIC_KEY_HELP1 H
111//#define MAGIC_KEY_HELP2 SLASH
112//#define MAGIC_KEY_DEBUG D
113//#define MAGIC_KEY_DEBUG_MATRIX X
114//#define MAGIC_KEY_DEBUG_KBD K
115//#define MAGIC_KEY_DEBUG_MOUSE M
116//#define MAGIC_KEY_VERSION V
117//#define MAGIC_KEY_STATUS S
118//#define MAGIC_KEY_CONSOLE C
119//#define MAGIC_KEY_LAYER0_ALT1 ESC
120//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
121//#define MAGIC_KEY_LAYER0 0
122//#define MAGIC_KEY_LAYER1 1
123//#define MAGIC_KEY_LAYER2 2
124//#define MAGIC_KEY_LAYER3 3
125//#define MAGIC_KEY_LAYER4 4
126//#define MAGIC_KEY_LAYER5 5
127//#define MAGIC_KEY_LAYER6 6
128//#define MAGIC_KEY_LAYER7 7
129//#define MAGIC_KEY_LAYER8 8
130//#define MAGIC_KEY_LAYER9 9
131//#define MAGIC_KEY_BOOTLOADER PAUSE
132//#define MAGIC_KEY_LOCK CAPS
133//#define MAGIC_KEY_EEPROM E
134//#define MAGIC_KEY_NKRO N
135//#define MAGIC_KEY_SLEEP_LED Z
136
137/*
138 * Feature disable options
139 * These options are also useful to firmware size reduction.
140 */
141
142/* disable debug print */
143//#define NO_DEBUG
144
145/* disable print */
146//#define NO_PRINT
147
148/* disable action features */
149//#define NO_ACTION_LAYER
150//#define NO_ACTION_TAPPING
151//#define NO_ACTION_ONESHOT
152//#define NO_ACTION_MACRO
153//#define NO_ACTION_FUNCTION
154
155/*
156 * MIDI options
157 */
158
159/* Prevent use of disabled MIDI features in the keymap */
160//#define MIDI_ENABLE_STRICT 1
161
162/* enable basic MIDI features:
163 - MIDI notes can be sent when in Music mode is on
164*/
165//#define MIDI_BASIC
166
167/* enable advanced MIDI features:
168 - MIDI notes can be added to the keymap
169 - Octave shift and transpose
170 - Virtual sustain, portamento, and modulation wheel
171 - etc.
172*/
173//#define MIDI_ADVANCED
174
175/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
176//#define MIDI_TONE_KEYCODE_OCTAVES 1
177
178#endif
diff --git a/keyboards/kmac/keymaps/default/Makefile b/keyboards/kmac/keymaps/default/Makefile
new file mode 100644
index 000000000..a8a44889d
--- /dev/null
+++ b/keyboards/kmac/keymaps/default/Makefile
@@ -0,0 +1,37 @@
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
18# change to "no" to disable the options, or define them in the Makefile in
19# the appropriate keymap folder that will get included automatically
20#
21BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
22MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
23EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
24CONSOLE_ENABLE = yes # Console for debug(+400)
25COMMAND_ENABLE = yes # Commands for debug and configuration
26NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
27BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
28MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
29AUDIO_ENABLE = no # Audio output on port C6
30UNICODE_ENABLE = no # Unicode
31BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
32RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
33SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
34
35ifndef QUANTUM_DIR
36 include ../../../../Makefile
37endif
diff --git a/keyboards/kmac/keymaps/default/config.h b/keyboards/kmac/keymaps/default/config.h
new file mode 100644
index 000000000..a3828f7d5
--- /dev/null
+++ b/keyboards/kmac/keymaps/default/config.h
@@ -0,0 +1,24 @@
1/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
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#ifndef CONFIG_USER_H
18#define CONFIG_USER_H
19
20#include "../../config.h"
21
22// place overrides here
23
24#endif
diff --git a/keyboards/kmac/keymaps/default/keymap.c b/keyboards/kmac/keymaps/default/keymap.c
new file mode 100644
index 000000000..3553e8492
--- /dev/null
+++ b/keyboards/kmac/keymaps/default/keymap.c
@@ -0,0 +1,97 @@
1/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
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#include "kmac.h"
17
18// Helpful defines
19#define _______ KC_TRNS
20
21// Each layer gets a name for readability, which is then used in the keymap matrix below.
22// The underscores don't mean anything - you can have a layer called STUFF or any other name.
23// Layer names don't all need to be of the same length, obviously, and you can also skip them
24// entirely and just use numbers.
25#define _BL 0
26#define _FL 1
27
28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29 [_BL] = KEYMAP(
30 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_BRK, \
31 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, \
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, KC_DEL, KC_END, KC_PGDN, \
33 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, \
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, KC_UP, \
35 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
36 ),
37 [_FL] = KEYMAP(
38 BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, \
39 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
40 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
41 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
42 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
43 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
44 ),
45};
46
47const uint16_t PROGMEM fn_actions[] = {
48
49};
50
51const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
52{
53 // MACRODOWN only works in this function
54 switch(id) {
55 case 0:
56 if (record->event.pressed) {
57 SEND_STRING("The");
58 return false;
59 }
60 break;
61 case 1:
62 if (record->event.pressed) {
63 SEND_STRING("Custom");
64 return false;
65 }
66 break;
67 case 2:
68 if (record->event.pressed) {
69 SEND_STRING("Keyboard");
70 return false;
71 }
72 break;
73 case 3:
74 if (record->event.pressed) {
75 return MACRO( D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END );
76 }
77 break;
78 }
79 return MACRO_NONE;
80};
81
82
83void matrix_init_user(void) {
84
85}
86
87void matrix_scan_user(void) {
88
89}
90
91bool process_record_user(uint16_t keycode, keyrecord_t *record) {
92 return true;
93}
94
95void led_set_user(uint8_t usb_led) {
96
97}
diff --git a/keyboards/kmac/keymaps/default/readme.md b/keyboards/kmac/keymaps/default/readme.md
new file mode 100644
index 000000000..d384e0d6a
--- /dev/null
+++ b/keyboards/kmac/keymaps/default/readme.md
@@ -0,0 +1,56 @@
1# Keymap for the winkey version of KMAC
2
3This is the default keymap for the winkey version of the PCB. It implements the same features as the official default KMAC firmware.
4
5See [keymap.c](keymap.c) for details.
6
7## Layers
8
9The keymap have two layers. To access the functions on the second layer, hold down caps lock and press the corresponding key.
10
11### Layer 1: Default Layer
12 ,---. ,---------------. ,---------------. ,---------------. ,-----------.
13 |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
14 `---' `---------------' `---------------' `---------------' `-----------'
15 ,-----------------------------------------------------------. ,-----------.
16 |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU|
17 |-----------------------------------------------------------| |-----------|
18 |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD|
19 |-----------------------------------------------------------| '-----------'
20 |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
21 |-----------------------------------------------------------| ,---.
22 |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
23 |-----------------------------------------------------------| ,-----------.
24 |Ctl|Gui|Alt| Space |Alt|Gui|Fn |Ctl| |Lef|Dow|Rig|
25 `-----------------------------------------------------------' `-----------'
26
27### Layer 2: Function Layer
28 ,---. ,---------------. ,---------------. ,---------------. ,-----------.
29 |Led| |M1 |M2 |M3 |M4 | |M5 |M6 |M7 |M8 | |M9 |M10|M11|M12| | | | |
30 `---' `---------------' `---------------' `---------------' `-----------'
31 ,-----------------------------------------------------------. ,-----------.
32 | | | | | | | | | | | | | | | | | | |
33 |-----------------------------------------------------------| |-----------|
34 | | | | | | | | | | | | | | | | | | |
35 |-----------------------------------------------------------| '-----------'
36 | | | | | | | | | | | | | |
37 |-----------------------------------------------------------| ,---.
38 | | | | | | | | | | | | | | |
39 |-----------------------------------------------------------| ,-----------.
40 | | | | | | | | | | | | |
41 `-----------------------------------------------------------' `-----------'
42
43## Macros
44
45These are mostly useless and serve more like examples I guess.
46
47| Macro | Action |
48|:-----:| -------------------------------------- |
49| 1 | Types `The` |
50| 2 | Types `Custom` |
51| 3 | Types `Keyboard` |
52| 4 | Inputs `<Ctrl+c>` `<Right>` `<Ctrl+v>` |
53
54## Building
55
56To build the firmware with the default keymap, run `make default`.
diff --git a/keyboards/kmac/keymaps/winkeyless/Makefile b/keyboards/kmac/keymaps/winkeyless/Makefile
new file mode 100644
index 000000000..a8a44889d
--- /dev/null
+++ b/keyboards/kmac/keymaps/winkeyless/Makefile
@@ -0,0 +1,37 @@
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
18# change to "no" to disable the options, or define them in the Makefile in
19# the appropriate keymap folder that will get included automatically
20#
21BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
22MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
23EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
24CONSOLE_ENABLE = yes # Console for debug(+400)
25COMMAND_ENABLE = yes # Commands for debug and configuration
26NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
27BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
28MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
29AUDIO_ENABLE = no # Audio output on port C6
30UNICODE_ENABLE = no # Unicode
31BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
32RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
33SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
34
35ifndef QUANTUM_DIR
36 include ../../../../Makefile
37endif
diff --git a/keyboards/kmac/keymaps/winkeyless/config.h b/keyboards/kmac/keymaps/winkeyless/config.h
new file mode 100644
index 000000000..a3828f7d5
--- /dev/null
+++ b/keyboards/kmac/keymaps/winkeyless/config.h
@@ -0,0 +1,24 @@
1/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
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#ifndef CONFIG_USER_H
18#define CONFIG_USER_H
19
20#include "../../config.h"
21
22// place overrides here
23
24#endif
diff --git a/keyboards/kmac/keymaps/winkeyless/keymap.c b/keyboards/kmac/keymaps/winkeyless/keymap.c
new file mode 100644
index 000000000..f986dec27
--- /dev/null
+++ b/keyboards/kmac/keymaps/winkeyless/keymap.c
@@ -0,0 +1,97 @@
1/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
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#include "kmac.h"
17
18// Helpful defines
19#define _______ KC_TRNS
20
21// Each layer gets a name for readability, which is then used in the keymap matrix below.
22// The underscores don't mean anything - you can have a layer called STUFF or any other name.
23// Layer names don't all need to be of the same length, obviously, and you can also skip them
24// entirely and just use numbers.
25#define _BL 0
26#define _FL 1
27
28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29 [_BL] = KEYMAP_WINKEYLESS(
30 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_BRK, \
31 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, \
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, KC_DEL, KC_END, KC_PGDN, \
33 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, \
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, KC_UP, \
35 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
36 ),
37 [_FL] = KEYMAP_WINKEYLESS(
38 BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, \
39 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
40 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
41 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
42 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
43 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
44 ),
45};
46
47const uint16_t PROGMEM fn_actions[] = {
48
49};
50
51const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
52{
53 // MACRODOWN only works in this function
54 switch(id) {
55 case 0:
56 if (record->event.pressed) {
57 SEND_STRING("The");
58 return false;
59 }
60 break;
61 case 1:
62 if (record->event.pressed) {
63 SEND_STRING("Custom");
64 return false;
65 }
66 break;
67 case 2:
68 if (record->event.pressed) {
69 SEND_STRING("Keyboard");
70 return false;
71 }
72 break;
73 case 3:
74 if (record->event.pressed) {
75 return MACRO( D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END );
76 }
77 break;
78 }
79 return MACRO_NONE;
80};
81
82
83void matrix_init_user(void) {
84
85}
86
87void matrix_scan_user(void) {
88
89}
90
91bool process_record_user(uint16_t keycode, keyrecord_t *record) {
92 return true;
93}
94
95void led_set_user(uint8_t usb_led) {
96
97}
diff --git a/keyboards/kmac/keymaps/winkeyless/readme.md b/keyboards/kmac/keymaps/winkeyless/readme.md
new file mode 100644
index 000000000..b921f7b0f
--- /dev/null
+++ b/keyboards/kmac/keymaps/winkeyless/readme.md
@@ -0,0 +1,57 @@
1# Keymap for the winkeyless version of KMAC
2
3This is the default keymap for the winkeyless version of the PCB. It implements the same features as the official default KMAC firmware.
4
5
6See [keymap.c](keymap.c) for details.
7
8## Layers
9
10The keymap have two layers. To access the functions on the second layer, hold down caps lock and press the corresponding key.
11
12### Layer 1: Default Layer
13 ,---. ,---------------. ,---------------. ,---------------. ,-----------.
14 |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
15 `---' `---------------' `---------------' `---------------' `-----------'
16 ,-----------------------------------------------------------. ,-----------.
17 |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU|
18 |-----------------------------------------------------------| |-----------|
19 |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD|
20 |-----------------------------------------------------------| '-----------'
21 |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
22 |-----------------------------------------------------------| ,---.
23 |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
24 |-----------------------------------------------------------| ,-----------.
25 |Ctl|Gui|Alt| Space |Alt|Fn |Ctl| |Lef|Dow|Rig|
26 `-----------------------------------------------------------' `-----------'
27
28### Layer 2: Function Layer
29 ,---. ,---------------. ,---------------. ,---------------. ,-----------.
30 |Led| |M1 |M2 |M3 |M4 | |M5 |M6 |M7 |M8 | |M9 |M10|M11|M12| | | | |
31 `---' `---------------' `---------------' `---------------' `-----------'
32 ,-----------------------------------------------------------. ,-----------.
33 | | | | | | | | | | | | | | | | | | |
34 |-----------------------------------------------------------| |-----------|
35 | | | | | | | | | | | | | | | | | | |
36 |-----------------------------------------------------------| '-----------'
37 | | | | | | | | | | | | | |
38 |-----------------------------------------------------------| ,---.
39 | | | | | | | | | | | | | | |
40 |-----------------------------------------------------------| ,-----------.
41 | | | | | | | | | | | |
42 `-----------------------------------------------------------' `-----------'
43
44## Macros
45
46These are mostly useless and serve more like examples I guess.
47
48| Macro | Action |
49|:-----:| -------------------------------------- |
50| 1 | Types `The` |
51| 2 | Types `Custom` |
52| 3 | Types `Keyboard` |
53| 4 | Inputs `<Ctrl+c>` `<Right>` `<Ctrl+v>` |
54
55## Building
56
57To build the firmware with the keymap for the winkeyless version, run `make winkeyless`.
diff --git a/keyboards/kmac/kmac.c b/keyboards/kmac/kmac.c
new file mode 100644
index 000000000..34647e81a
--- /dev/null
+++ b/keyboards/kmac/kmac.c
@@ -0,0 +1,109 @@
1/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
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#include "kmac.h"
17
18void matrix_init_kb(void) {
19 // put your keyboard start-up code here
20 // runs once when the firmware starts up
21 led_init_ports();
22 matrix_init_user();
23}
24
25void matrix_scan_kb(void) {
26 // put your looping keyboard code here
27 // runs every cycle (a lot)
28
29 matrix_scan_user();
30}
31
32bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
33 // put your per-action keyboard code here
34 // runs for every action, just before processing by the firmware
35
36 return process_record_user(keycode, record);
37}
38
39void led_init_ports(void) {
40 DDRB |= (1<<0); // OUT
41 DDRE |= (1<<6); // OUT
42}
43
44/* LED pin configuration
45 * Scroll Lock: Low PE6
46 * Caps Lock: Low PB0
47 */
48void led_set_kb(uint8_t usb_led) {
49 if (usb_led & (1<<USB_LED_CAPS_LOCK))
50 {
51 PORTB &= ~(1<<0); // LO
52 }
53 else
54 {
55 PORTB |= (1<<0); // HI
56 }
57
58 if (usb_led & (1<<USB_LED_SCROLL_LOCK))
59 {
60 PORTE &= ~(1<<6); // LO
61 }
62 else
63 {
64 PORTE |= (1<<6); // HI
65 }
66
67 led_set_user(usb_led);
68}
69
70void backlight_init_ports(void) {
71 DDRB |= (1<<1) | (1<<2) | (1<<3) | (1<<4); // OUT
72 DDRD |= (1<<7); // OUT
73}
74
75/* Backlight pin configuration
76 * F-row: High PB1
77 * W: Low PB4
78 * A: Low PB2
79 * S: Low PB3
80 * D: Low PD7
81 */
82void backlight_set(uint8_t level)
83{
84 // F-row
85 if(level & (1<<0))
86 {
87 PORTB |= (1<<1); // HI
88 }
89 else
90 {
91 PORTB &= ~(1<<1); // LO
92 }
93
94 // WASD
95 if(level & (1<<1))
96 {
97 PORTB &= ~(1<<4); // LO
98 PORTB &= ~(1<<2); // LO
99 PORTB &= ~(1<<3); // LO
100 PORTD &= ~(1<<7); // LO
101 }
102 else
103 {
104 PORTB |= (1<<4); // HI
105 PORTB |= (1<<2); // HI
106 PORTB |= (1<<3); // HI
107 PORTD |= (1<<7); // HI
108 }
109}
diff --git a/keyboards/kmac/kmac.h b/keyboards/kmac/kmac.h
new file mode 100644
index 000000000..1d9d8e36b
--- /dev/null
+++ b/keyboards/kmac/kmac.h
@@ -0,0 +1,56 @@
1/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
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#ifndef KMAC_H
17#define KMAC_H
18
19#include "quantum.h"
20
21// Keymap for the winkey version of the PCB.
22#define KEYMAP( \
23 K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
24 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
25 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \
26 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
27 K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4F, \
28 K50, K51, K52, K55, K58, K5A, K5C, K5D, K5E, K5F, K5G \
29) { \
30/* 0 1 2 3 4 5 6 7 8 9 A B C D E F G */ \
31/* 0 */ { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \
32/* 1 */ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \
33/* 2 */ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \
34/* 3 */ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO, KC_NO, KC_NO }, \
35/* 4 */ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, KC_NO, KC_NO, K4D, KC_NO, K4F, KC_NO }, \
36/* 5 */ { K50, K51, K52, KC_NO, KC_NO, K55, KC_NO, KC_NO, K58, KC_NO, K5A, KC_NO, K5C, K5D, K5E, K5F, K5G } \
37}
38
39// Keymap for the winkeyless version of the PCB.
40#define KEYMAP_WINKEYLESS( \
41 K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
42 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
43 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \
44 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
45 K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4F, \
46 K50, K51, K52, K55, K58, K5A, K5D, K5E, K5F, K5G \
47) KEYMAP( \
48 K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
49 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
50 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \
51 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
52 K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4F, \
53 K50, K51, K52, K55, K58, K5A, KC_NO, K5D, K5E, K5F, K5G \
54)
55
56#endif
diff --git a/keyboards/kmac/matrix.c b/keyboards/kmac/matrix.c
new file mode 100644
index 000000000..bab638bdf
--- /dev/null
+++ b/keyboards/kmac/matrix.c
@@ -0,0 +1,311 @@
1/*
2Copyright 2017 Mathias Andersson <wraul@dbox.se>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include <stdint.h>
18#include <stdbool.h>
19#if defined(__AVR__)
20#include <avr/io.h>
21#endif
22#include "wait.h"
23#include "print.h"
24#include "debug.h"
25#include "util.h"
26#include "matrix.h"
27#include "timer.h"
28
29
30/* Set 0 if debouncing isn't needed */
31#ifndef DEBOUNCING_DELAY
32# define DEBOUNCING_DELAY 5
33#endif
34
35#define COL_SHIFTER ((uint32_t)1)
36
37static uint16_t debouncing_time;
38static bool debouncing = false;
39
40
41static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
42
43/* matrix state(1:on, 0:off) */
44static matrix_row_t matrix[MATRIX_ROWS];
45static matrix_row_t matrix_debouncing[MATRIX_ROWS];
46
47static void init_rows(void);
48static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
49static void unselect_cols(void);
50static void select_col(uint8_t col);
51
52inline
53uint8_t matrix_rows(void) {
54 return MATRIX_ROWS;
55}
56
57inline
58uint8_t matrix_cols(void) {
59 return MATRIX_COLS;
60}
61
62void matrix_init(void) {
63 unselect_cols();
64 init_rows();
65
66 // initialize matrix state: all keys off
67 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
68 matrix[i] = 0;
69 matrix_debouncing[i] = 0;
70 }
71
72 matrix_init_quantum();
73}
74
75uint8_t matrix_scan(void)
76{
77 // Set col, read rows
78 for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
79 bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col);
80 if (matrix_changed) {
81 debouncing = true;
82 debouncing_time = timer_read();
83 }
84 }
85
86 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
87 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
88 matrix[i] = matrix_debouncing[i];
89 }
90 debouncing = false;
91 }
92
93 matrix_scan_quantum();
94 return 1;
95}
96
97inline
98bool matrix_is_on(uint8_t row, uint8_t col)
99{
100 return (matrix[row] & ((matrix_row_t)1<col));
101}
102
103inline
104matrix_row_t matrix_get_row(uint8_t row)
105{
106 return matrix[row];
107}
108
109void matrix_print(void)
110{
111 print("\nr/c 0123456789ABCDEFGHIJKLMNOPQRSTUV\n");
112
113 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
114 phex(row); print(": ");
115 print_bin_reverse32(matrix_get_row(row));
116 print("\n");
117 }
118}
119
120uint8_t matrix_key_count(void)
121{
122 uint8_t count = 0;
123 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
124 count += bitpop32(matrix[i]);
125 }
126 return count;
127}
128
129static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
130{
131 bool matrix_changed = false;
132
133 // Select col and wait for col selecton to stabilize
134 select_col(current_col);
135 wait_us(30);
136
137 // For each row...
138 for(uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++)
139 {
140 // Store last value of row prior to reading
141 matrix_row_t last_row_value = current_matrix[row_index];
142
143 // Check row pin state
144 // Use the otherwise unused row: 3, col: 0 for caps lock
145 if (row_index == 3 && current_col == 0) {
146 // Pin E2 uses active low
147 if ((_SFR_IO8(E2 >> 4) & _BV(E2 & 0xF)) == 0)
148 {
149 // Pin LO, set col bit
150 current_matrix[row_index] |= (COL_SHIFTER << current_col);
151 }
152 else
153 {
154 // Pin HI, clear col bit
155 current_matrix[row_index] &= ~(COL_SHIFTER << current_col);
156 }
157 }
158 else {
159 if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)))
160 {
161 // Pin HI, set col bit
162 current_matrix[row_index] |= (COL_SHIFTER << current_col);
163 }
164 else
165 {
166 // Pin LO, clear col bit
167 current_matrix[row_index] &= ~(COL_SHIFTER << current_col);
168 }
169 }
170
171 // Determine if the matrix changed state
172 if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
173 {
174 matrix_changed = true;
175 }
176 }
177
178 // Unselect cols
179 unselect_cols();
180
181 return matrix_changed;
182}
183
184/* Row pin configuration
185 * row: 0 1 2 3 4 5
186 * pin: D0 D1 D2 D3 D5 B7
187 *
188 * Caps lock uses its own pin E2
189 */
190static void init_rows(void)
191{
192 DDRD &= ~((1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<5)); // IN
193 PORTD &= ~((1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<5)); // LO
194 DDRB &= ~(1<<7); // IN
195 PORTB &= ~(1<<7); // LO
196
197 DDRE &= ~(1<<2); // IN
198 PORTE |= (1<<2); // HI
199}
200
201/* Columns 0 - 15
202 * These columns uses two 74HC237D 3 to 8 bit demultiplexers.
203 * col / pin: PC6 PB6 PF0 PF1 PC7
204 * 0: 1 0 0 0 0
205 * 1: 1 0 1 0 0
206 * 2: 1 0 0 1 0
207 * 3: 1 0 1 1 0
208 * 4: 1 0 0 0 1
209 * 5: 1 0 1 0 1
210 * 6: 1 0 0 1 1
211 * 7: 1 0 1 1 1
212 * 8: 0 1 0 0 0
213 * 9: 0 1 1 0 0
214 * 10: 0 1 0 1 0
215 * 11: 0 1 1 1 0
216 * 12: 0 1 0 0 1
217 * 13: 0 1 1 0 1
218 * 14: 0 1 0 1 1
219 * 15: 0 1 1 1 1
220 *
221 * col: 16
222 * pin: PB5
223 */
224static void unselect_cols(void)
225{
226 DDRB |= (1<<5) | (1<<6); // OUT
227 PORTB &= ~((1<<5) | (1<<6)); // LO
228
229 DDRC |= (1<<6) | (1<<7); // OUT
230 PORTC &= ~((1<<6) | (1<<7)); // LO
231
232 DDRF |= (1<<0) | (1<<1); // OUT
233 PORTF &= ~((1<<0) | (1<<1)); // LO
234}
235
236static void select_col(uint8_t col)
237{
238 switch (col) {
239 case 0:
240 PORTC |= (1<<6); // HI
241 break;
242 case 1:
243 PORTC |= (1<<6); // HI
244 PORTF |= (1<<0); // HI
245 break;
246 case 2:
247 PORTC |= (1<<6); // HI
248 PORTF |= (1<<1); // HI
249 break;
250 case 3:
251 PORTC |= (1<<6); // HI
252 PORTF |= (1<<0) | (1<<1); // HI
253 break;
254 case 4:
255 PORTC |= (1<<6); // HI
256 PORTC |= (1<<7); // HI
257 break;
258 case 5:
259 PORTC |= (1<<6); // HI
260 PORTF |= (1<<0); // HI
261 PORTC |= (1<<7); // HI
262 break;
263 case 6:
264 PORTC |= (1<<6); // HI
265 PORTF |= (1<<1); // HI
266 PORTC |= (1<<7); // HI
267 break;
268 case 7:
269 PORTC |= (1<<6); // HI
270 PORTF |= (1<<0) | (1<<1); // HI
271 PORTC |= (1<<7); // HI
272 break;
273 case 8:
274 PORTB |= (1<<6); // HI
275 break;
276 case 9:
277 PORTB |= (1<<6); // HI
278 PORTF |= (1<<0); // HI
279 break;
280 case 10:
281 PORTB |= (1<<6); // HI
282 PORTF |= (1<<1); // HI
283 break;
284 case 11:
285 PORTB |= (1<<6); // HI
286 PORTF |= (1<<0) | (1<<1); // HI
287 break;
288 case 12:
289 PORTB |= (1<<6); // HI
290 PORTC |= (1<<7); // HI
291 break;
292 case 13:
293 PORTB |= (1<<6); // HI
294 PORTF |= (1<<0); // HI
295 PORTC |= (1<<7); // HI
296 break;
297 case 14:
298 PORTB |= (1<<6); // HI
299 PORTF |= (1<<1); // HI
300 PORTC |= (1<<7); // HI
301 break;
302 case 15:
303 PORTB |= (1<<6); // HI
304 PORTF |= (1<<0) | (1<<1); // HI
305 PORTC |= (1<<7); // HI
306 break;
307 case 16:
308 PORTB |= (1<<5); // HI
309 break;
310 }
311}
diff --git a/keyboards/kmac/readme.md b/keyboards/kmac/readme.md
new file mode 100644
index 000000000..e7d97778f
--- /dev/null
+++ b/keyboards/kmac/readme.md
@@ -0,0 +1,45 @@
1KMAC keyboard firmware
2======================
3
4A Korean custom keyboard designed by Byungho Kim and the KBDMania community.
5
6## Supported models
7
8All the tenkeyless models should be supported.
9
10## Bootloader
11
12The PCB is hardwired to run the bootloader if the key at the `Caps Lock` position is held down when connecting the keyboard.
13
14It is also possible to use Boot Magic and Command to access the bootloader.
15
16## Quantum MK Firmware
17
18For the full Quantum feature list, see the [documentation](https://docs.qmk.fm).
19
20## Building
21
22The KMAC are available with two different PCB layouts, a winkey version and a winkeyless version. A default keymap are provided for each versions of the PCB.
23
24Depending on which PCB and keymap you would like to use, you will have to compile the firmware slightly differently. All of the commands should be run in the [keyboards/kmac](/keyboards/kmac) folder.
25
26### Winkey keymap
27
28The [default keymap](keymaps/default) are designed for the winkey version of the PCB.
29
30### Winkeyless Keymap
31
32A [keymap](keymaps/winkeyless) for the winkeyless version of the PCB are also provided.
33
34### Custom keymaps
35
36To define your own keymap, copy one of the [existing keymap](keymaps) folders and give it the name of your keymap. Then check the [keymap documentation](https://docs.qmk.fm/Keymap.html) for details on how to modify the keymap.
37
38To make it easy to define keymaps for the different versions of the PCB two macros are provided.
39
40| PCB | Macro |
41| -------------- | --------------------- |
42| Winkey PCB | `KEYMAP()` |
43| Winkeyless PCB | `KEYMAP_WINKEYLESS()` |
44
45To build the firmware with a custom keymap, run `make <keymap name>`
diff --git a/keyboards/kmac/rules.mk b/keyboards/kmac/rules.mk
new file mode 100644
index 000000000..54c9aa256
--- /dev/null
+++ b/keyboards/kmac/rules.mk
@@ -0,0 +1,72 @@
1# Project specific files
2SRC = matrix.c
3
4# MCU name
5#MCU = at90usb1287
6MCU = atmega32u4
7
8# Processor frequency.
9# This will define a symbol, F_CPU, in all source code files equal to the
10# processor frequency in Hz. You can then use this symbol in your source code to
11# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
12# automatically to create a 32-bit value in your source code.
13#
14# This will be an integer division of F_USB below, as it is sourced by
15# F_USB after it has run through any CPU prescalers. Note that this value
16# does not *change* the processor frequency - it should merely be updated to
17# reflect the processor speed set externally so that the code can use accurate
18# software delays.
19F_CPU = 8000000
20
21
22#
23# LUFA specific
24#
25# Target architecture (see library "Board Types" documentation).
26ARCH = AVR8
27
28# Input clock frequency.
29# This will define a symbol, F_USB, in all source code files equal to the
30# input clock frequency (before any prescaling is performed) in Hz. This value may
31# differ from F_CPU if prescaling is used on the latter, and is required as the
32# raw input clock is fed directly to the PLL sections of the AVR for high speed
33# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
34# at the end, this will be done automatically to create a 32-bit value in your
35# source code.
36#
37# If no clock division is performed on the input clock inside the AVR (via the
38# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
39F_USB = $(F_CPU)
40
41# Interrupt driven control endpoint task(+60)
42OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
43
44
45# Boot Section Size in *bytes*
46# Teensy halfKay 512
47# Teensy++ halfKay 1024
48# Atmel DFU loader 4096
49# LUFA bootloader 4096
50# USBaspLoader 2048
51OPT_DEFS += -DBOOTLOADER_SIZE=4096
52
53
54# Build Options
55# change yes to no to disable
56#
57BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
58MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
59EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
60CONSOLE_ENABLE ?= yes # Console for debug(+400)
61COMMAND_ENABLE ?= yes # Commands for debug and configuration
62CUSTOM_MATRIX ?= yes # Custom matrix file
63# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
64SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
65# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
66NKRO_ENABLE ?= yes # USB Nkey Rollover
67BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
68MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
69UNICODE_ENABLE ?= no # Unicode
70BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
71AUDIO_ENABLE ?= no # Audio output on port C6
72FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
diff --git a/keyboards/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c
index 493ebcd3f..274f917e2 100644
--- a/keyboards/lets_split/keymaps/OLED_sample/keymap.c
+++ b/keyboards/lets_split/keymaps/OLED_sample/keymap.c
@@ -186,7 +186,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
186bool TOG_STATUS = false; 186bool TOG_STATUS = false;
187int RGB_current_mode; 187int RGB_current_mode;
188 188
189void persistant_default_layer_set(uint16_t default_layer) { 189void persistent_default_layer_set(uint16_t default_layer) {
190 eeconfig_update_default_layer(default_layer); 190 eeconfig_update_default_layer(default_layer);
191 default_layer_set(default_layer); 191 default_layer_set(default_layer);
192} 192}
@@ -208,7 +208,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
208 #ifdef AUDIO_ENABLE 208 #ifdef AUDIO_ENABLE
209 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 209 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
210 #endif 210 #endif
211 persistant_default_layer_set(1UL<<_QWERTY); 211 persistent_default_layer_set(1UL<<_QWERTY);
212 } 212 }
213 return false; 213 return false;
214 break; 214 break;
@@ -217,7 +217,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
217 #ifdef AUDIO_ENABLE 217 #ifdef AUDIO_ENABLE
218 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 218 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
219 #endif 219 #endif
220 persistant_default_layer_set(1UL<<_COLEMAK); 220 persistent_default_layer_set(1UL<<_COLEMAK);
221 } 221 }
222 return false; 222 return false;
223 break; 223 break;
@@ -226,7 +226,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
226 #ifdef AUDIO_ENABLE 226 #ifdef AUDIO_ENABLE
227 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 227 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
228 #endif 228 #endif
229 persistant_default_layer_set(1UL<<_DVORAK); 229 persistent_default_layer_set(1UL<<_DVORAK);
230 } 230 }
231 return false; 231 return false;
232 break; 232 break;
diff --git a/keyboards/lets_split/keymaps/adam/config.h b/keyboards/lets_split/keymaps/adam/config.h
new file mode 100644
index 000000000..177dd22d7
--- /dev/null
+++ b/keyboards/lets_split/keymaps/adam/config.h
@@ -0,0 +1,43 @@
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
38
39#undef TAPPING_TERM
40#define TAPPING_TERM 200 //At 500 some bad logic takes hold
41#define PREVENT_STUCK_MODIFIERS
42#define IGNORE_MOD_TAP_INTERRUPT
43#define PERMISSIVE_HOLD
diff --git a/keyboards/lets_split/keymaps/adam/keymap.c b/keyboards/lets_split/keymaps/adam/keymap.c
new file mode 100644
index 000000000..8aca73256
--- /dev/null
+++ b/keyboards/lets_split/keymaps/adam/keymap.c
@@ -0,0 +1,79 @@
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 BASE 0 // default layer
12#define FLOCK 1 // symbols arrows and F keys on F held down
13#define JLOCK 2 // same as Flock but with fall thru J and mapped to J held down
14
15// Fillers to make layering more clear
16#define _______ KC_TRNS
17#define XXXXXXX KC_NO
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20
21/* Qwerty
22 * ,-----------------------------------------------------------------------------------.
23 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
24 * |------+------+------+------+------+-------------+------+------+------+------+------|
25 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
26 * |------+------+------+------+------+------|------+------+------+------+------+------|
27 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
28 * |------+------+------+------+------+------+------+------+------+------+------+------|
29 * | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right |
30 * `-----------------------------------------------------------------------------------'
31 */
32[BASE] = KEYMAP ( \
33 TD(1), KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, \
34 KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, \
35 SFT_T(KC_A), ALT_T(KC_S),CTL_T(KC_D), F(FLOCK), GUI_T(KC_G), KC_BSPC, KC_DELETE, GUI_T(KC_H), F(JLOCK), CTL_T(KC_K), ALT_T(KC_L), SFT_T(KC_SCLN), \
36 KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOTE
37),
38[FLOCK] = KEYMAP ( \
39 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \
40 KC_LBRC, KC_GRV, KC_TILDE, S(KC_1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, XXXXXXX, KC_RBRC, \
41 S(KC_LBRC), _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, S(KC_RBRC), \
42 KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, KC_ESC, XXXXXXX, KC_END, KC_PGDOWN, KC_QUES, KC_SLASH \
43),
44[JLOCK] = KEYMAP ( \
45 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \
46 KC_LBRC, KC_GRV, KC_TILDE, S(KC_1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, XXXXXXX, KC_RBRC, \
47 S(KC_LBRC), _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_LEFT, _______, KC_UP, KC_RIGHT, S(KC_RBRC), \
48 KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, KC_ESC, XXXXXXX, KC_END, KC_PGDOWN, KC_QUES, KC_SLASH \
49)
50};
51
52const uint16_t PROGMEM fn_actions[] = {
53 [FLOCK] = ACTION_LAYER_TAP_KEY(FLOCK,KC_F),
54 [JLOCK] = ACTION_LAYER_TAP_KEY(JLOCK,KC_J)
55};
56#ifdef TAP_DANCE_ENABLE
57void tap_1(qk_tap_dance_state_t *state, void *user_data) {
58 switch (state->count) {
59 case 1:
60 register_code (KC_1);
61 unregister_code (KC_1);
62 break;
63 case 2:
64 register_code (KC_ESC);
65 unregister_code (KC_ESC);
66 break;
67 case 3:
68 register_code (KC_LSFT);
69 register_code (KC_1);
70 unregister_code (KC_1);
71 unregister_code (KC_LSFT);
72 }
73}
74
75qk_tap_dance_action_t tap_dance_actions[] = {
76 [0] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_ESC),
77 [1] = ACTION_TAP_DANCE_FN(tap_1)
78};
79#endif
diff --git a/keyboards/lets_split/keymaps/adam/makefile b/keyboards/lets_split/keymaps/adam/makefile
new file mode 100644
index 000000000..e5ddcae8d
--- /dev/null
+++ b/keyboards/lets_split/keymaps/adam/makefile
@@ -0,0 +1 @@
TAP_DANCE_ENABLE = yes
diff --git a/keyboards/lets_split/keymaps/hexwire/keymap.c b/keyboards/lets_split/keymaps/hexwire/keymap.c
index fcf3cde75..1ef65c52b 100644
--- a/keyboards/lets_split/keymaps/hexwire/keymap.c
+++ b/keyboards/lets_split/keymaps/hexwire/keymap.c
@@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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 //|----+----+----+----+----+----| |----+----+----+----+----+----|
70 X0 , A , O , E , U , I , D , H , R , N , S ,SLSH, 70 X0 , A , O , E , U , I , D , H , T , N , S ,SLSH,
71 //|----+----+----+----+----+----| |----+----+----+----+----+----| 71 //|----+----+----+----+----+----| |----+----+----+----+----+----|
72 LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 , 72 LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
73 //|----+----+----+----+----+----| |----+----+----+----+----+----| 73 //|----+----+----+----+----+----| |----+----+----+----+----+----|
@@ -138,7 +138,7 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
138float tone_colemak[][2] = SONG(COLEMAK_SOUND); 138float tone_colemak[][2] = SONG(COLEMAK_SOUND);
139#endif 139#endif
140 140
141void persistant_default_layer_set(uint16_t default_layer) { 141void persistent_default_layer_set(uint16_t default_layer) {
142 eeconfig_update_default_layer(default_layer); 142 eeconfig_update_default_layer(default_layer);
143 default_layer_set(default_layer); 143 default_layer_set(default_layer);
144} 144}
@@ -150,7 +150,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
150 #ifdef AUDIO_ENABLE 150 #ifdef AUDIO_ENABLE
151 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 151 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
152 #endif 152 #endif
153 persistant_default_layer_set(1UL<<_QWERTY); 153 persistent_default_layer_set(1UL<<_QWERTY);
154 } 154 }
155 return false; 155 return false;
156 break; 156 break;
@@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
159 #ifdef AUDIO_ENABLE 159 #ifdef AUDIO_ENABLE
160 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 160 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
161 #endif 161 #endif
162 persistant_default_layer_set(1UL<<_COLEMAK); 162 persistent_default_layer_set(1UL<<_COLEMAK);
163 } 163 }
164 return false; 164 return false;
165 break; 165 break;
@@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
168 #ifdef AUDIO_ENABLE 168 #ifdef AUDIO_ENABLE
169 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 169 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
170 #endif 170 #endif
171 persistant_default_layer_set(1UL<<_DVORAK); 171 persistent_default_layer_set(1UL<<_DVORAK);
172 } 172 }
173 return false; 173 return false;
174 break; 174 break;
diff --git a/keyboards/lets_split/keymaps/i2c/keymap.c b/keyboards/lets_split/keymaps/i2c/keymap.c
index 0d2d94b67..936312b2e 100644
--- a/keyboards/lets_split/keymaps/i2c/keymap.c
+++ b/keyboards/lets_split/keymaps/i2c/keymap.c
@@ -147,7 +147,7 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
147float tone_colemak[][2] = SONG(COLEMAK_SOUND); 147float tone_colemak[][2] = SONG(COLEMAK_SOUND);
148#endif 148#endif
149 149
150void persistant_default_layer_set(uint16_t default_layer) { 150void persistent_default_layer_set(uint16_t default_layer) {
151 eeconfig_update_default_layer(default_layer); 151 eeconfig_update_default_layer(default_layer);
152 default_layer_set(default_layer); 152 default_layer_set(default_layer);
153} 153}
@@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
159 #ifdef AUDIO_ENABLE 159 #ifdef AUDIO_ENABLE
160 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 160 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
161 #endif 161 #endif
162 persistant_default_layer_set(1UL<<_QWERTY); 162 persistent_default_layer_set(1UL<<_QWERTY);
163 } 163 }
164 return false; 164 return false;
165 break; 165 break;
@@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
168 #ifdef AUDIO_ENABLE 168 #ifdef AUDIO_ENABLE
169 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 169 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
170 #endif 170 #endif
171 persistant_default_layer_set(1UL<<_COLEMAK); 171 persistent_default_layer_set(1UL<<_COLEMAK);
172 } 172 }
173 return false; 173 return false;
174 break; 174 break;
@@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
177 #ifdef AUDIO_ENABLE 177 #ifdef AUDIO_ENABLE
178 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 178 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
179 #endif 179 #endif
180 persistant_default_layer_set(1UL<<_DVORAK); 180 persistent_default_layer_set(1UL<<_DVORAK);
181 } 181 }
182 return false; 182 return false;
183 break; 183 break;
diff --git a/keyboards/lets_split/keymaps/serial/keymap.c b/keyboards/lets_split/keymaps/serial/keymap.c
index 0d2d94b67..936312b2e 100644
--- a/keyboards/lets_split/keymaps/serial/keymap.c
+++ b/keyboards/lets_split/keymaps/serial/keymap.c
@@ -147,7 +147,7 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
147float tone_colemak[][2] = SONG(COLEMAK_SOUND); 147float tone_colemak[][2] = SONG(COLEMAK_SOUND);
148#endif 148#endif
149 149
150void persistant_default_layer_set(uint16_t default_layer) { 150void persistent_default_layer_set(uint16_t default_layer) {
151 eeconfig_update_default_layer(default_layer); 151 eeconfig_update_default_layer(default_layer);
152 default_layer_set(default_layer); 152 default_layer_set(default_layer);
153} 153}
@@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
159 #ifdef AUDIO_ENABLE 159 #ifdef AUDIO_ENABLE
160 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 160 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
161 #endif 161 #endif
162 persistant_default_layer_set(1UL<<_QWERTY); 162 persistent_default_layer_set(1UL<<_QWERTY);
163 } 163 }
164 return false; 164 return false;
165 break; 165 break;
@@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
168 #ifdef AUDIO_ENABLE 168 #ifdef AUDIO_ENABLE
169 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 169 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
170 #endif 170 #endif
171 persistant_default_layer_set(1UL<<_COLEMAK); 171 persistent_default_layer_set(1UL<<_COLEMAK);
172 } 172 }
173 return false; 173 return false;
174 break; 174 break;
@@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
177 #ifdef AUDIO_ENABLE 177 #ifdef AUDIO_ENABLE
178 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 178 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
179 #endif 179 #endif
180 persistant_default_layer_set(1UL<<_DVORAK); 180 persistent_default_layer_set(1UL<<_DVORAK);
181 } 181 }
182 return false; 182 return false;
183 break; 183 break;
diff --git a/keyboards/lets_split/keymaps/smt/keymap.c b/keyboards/lets_split/keymaps/smt/keymap.c
index c4bdb7ebc..18d409f08 100644
--- a/keyboards/lets_split/keymaps/smt/keymap.c
+++ b/keyboards/lets_split/keymaps/smt/keymap.c
@@ -152,7 +152,7 @@ float tone_dvorak[][2] = SONG(DVORAK_SOUND);
152float tone_colemak[][2] = SONG(COLEMAK_SOUND); 152float tone_colemak[][2] = SONG(COLEMAK_SOUND);
153#endif 153#endif
154 154
155void persistant_default_layer_set(uint16_t default_layer) { 155void persistent_default_layer_set(uint16_t default_layer) {
156 eeconfig_update_default_layer(default_layer); 156 eeconfig_update_default_layer(default_layer);
157 default_layer_set(default_layer); 157 default_layer_set(default_layer);
158} 158}
@@ -164,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
164 #ifdef AUDIO_ENABLE 164 #ifdef AUDIO_ENABLE
165 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 165 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
166 #endif 166 #endif
167 persistant_default_layer_set(1UL<<_QWERTY); 167 persistent_default_layer_set(1UL<<_QWERTY);
168 } 168 }
169 return false; 169 return false;
170 break; 170 break;
@@ -173,7 +173,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
173 #ifdef AUDIO_ENABLE 173 #ifdef AUDIO_ENABLE
174 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 174 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
175 #endif 175 #endif
176 persistant_default_layer_set(1UL<<_COLEMAK); 176 persistent_default_layer_set(1UL<<_COLEMAK);
177 } 177 }
178 return false; 178 return false;
179 break; 179 break;
@@ -182,7 +182,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
182 #ifdef AUDIO_ENABLE 182 #ifdef AUDIO_ENABLE
183 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 183 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
184 #endif 184 #endif
185 persistant_default_layer_set(1UL<<_DVORAK); 185 persistent_default_layer_set(1UL<<_DVORAK);
186 } 186 }
187 return false; 187 return false;
188 break; 188 break;
diff --git a/keyboards/lets_split/keymaps/xyverz/keymap.c b/keyboards/lets_split/keymaps/xyverz/keymap.c
index 216e94696..45edf78c8 100644
--- a/keyboards/lets_split/keymaps/xyverz/keymap.c
+++ b/keyboards/lets_split/keymaps/xyverz/keymap.c
@@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
141 141
142}; 142};
143 143
144void persistant_default_layer_set(uint16_t default_layer) { 144void persistent_default_layer_set(uint16_t default_layer) {
145 eeconfig_update_default_layer(default_layer); 145 eeconfig_update_default_layer(default_layer);
146 default_layer_set(default_layer); 146 default_layer_set(default_layer);
147} 147}
@@ -150,19 +150,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
150 switch (keycode) { 150 switch (keycode) {
151 case QWERTY: 151 case QWERTY:
152 if (record->event.pressed) { 152 if (record->event.pressed) {
153 persistant_default_layer_set(1UL<<_QWERTY); 153 persistent_default_layer_set(1UL<<_QWERTY);
154 } 154 }
155 return false; 155 return false;
156 break; 156 break;
157 case COLEMAK: 157 case COLEMAK:
158 if (record->event.pressed) { 158 if (record->event.pressed) {
159 persistant_default_layer_set(1UL<<_COLEMAK); 159 persistent_default_layer_set(1UL<<_COLEMAK);
160 } 160 }
161 return false; 161 return false;
162 break; 162 break;
163 case DVORAK: 163 case DVORAK:
164 if (record->event.pressed) { 164 if (record->event.pressed) {
165 persistant_default_layer_set(1UL<<_DVORAK); 165 persistent_default_layer_set(1UL<<_DVORAK);
166 } 166 }
167 return false; 167 return false;
168 break; 168 break;
diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk
index 79860ea35..43eff99e7 100644
--- a/keyboards/lets_split/rules.mk
+++ b/keyboards/lets_split/rules.mk
@@ -78,7 +78,7 @@ CUSTOM_MATRIX = yes
78avrdude: build 78avrdude: build
79 ls /dev/tty* > /tmp/1; \ 79 ls /dev/tty* > /tmp/1; \
80 echo "Reset your Pro Micro now"; \ 80 echo "Reset your Pro Micro now"; \
81 while [[ -z $$USB ]]; do \ 81 while [ -z $$USB ]; do \
82 sleep 1; \ 82 sleep 1; \
83 ls /dev/tty* > /tmp/2; \ 83 ls /dev/tty* > /tmp/2; \
84 USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ 84 USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
diff --git a/keyboards/m10a/Makefile b/keyboards/m10a/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/m10a/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/M10A/config.h b/keyboards/m10a/config.h
index f052ab629..f052ab629 100644
--- a/keyboards/M10A/config.h
+++ b/keyboards/m10a/config.h
diff --git a/keyboards/M10A/keymaps/default/Makefile b/keyboards/m10a/keymaps/default/Makefile
index 457a3d01d..457a3d01d 100644
--- a/keyboards/M10A/keymaps/default/Makefile
+++ b/keyboards/m10a/keymaps/default/Makefile
diff --git a/keyboards/M10A/keymaps/default/keymap.c b/keyboards/m10a/keymaps/default/keymap.c
index 75abeb5b7..97434a461 100644
--- a/keyboards/M10A/keymaps/default/keymap.c
+++ b/keyboards/m10a/keymaps/default/keymap.c
@@ -1,7 +1,7 @@
1// This is the canonical layout file for the Quantum project. If you want to add another keyboard, 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. 2// this is the style you want to emulate.
3 3
4#include "M10A.h" 4#include "m10a.h"
5#include "action_layer.h" 5#include "action_layer.h"
6#include "eeconfig.h" 6#include "eeconfig.h"
7 7
diff --git a/keyboards/M10A/M10A.c b/keyboards/m10a/m10a.c
index 9a3bd15e1..9cc7f069a 100644
--- a/keyboards/M10A/M10A.c
+++ b/keyboards/m10a/m10a.c
@@ -1,4 +1,4 @@
1#include "M10A.h" 1#include "m10a.h"
2 2
3void matrix_init_kb(void) { 3void matrix_init_kb(void) {
4 matrix_init_user(); 4 matrix_init_user();
diff --git a/keyboards/M10A/M10A.h b/keyboards/m10a/m10a.h
index 6ec334fb3..6ec334fb3 100644
--- a/keyboards/M10A/M10A.h
+++ b/keyboards/m10a/m10a.h
diff --git a/keyboards/M10A/rules.mk b/keyboards/m10a/rules.mk
index f5a785dbc..f5a785dbc 100644
--- a/keyboards/M10A/rules.mk
+++ b/keyboards/m10a/rules.mk
diff --git a/keyboards/mechmini/Makefile b/keyboards/mechmini/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/mechmini/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif
diff --git a/keyboards/mechmini/README.md b/keyboards/mechmini/README.md
new file mode 100644
index 000000000..72743319f
--- /dev/null
+++ b/keyboards/mechmini/README.md
@@ -0,0 +1,56 @@
1mechmini keyboard firmware
2==========================
3
4This is a port of the QMK firmware for boards that are based on the
5ps2avrGB firmware, like the [ps2avrGB
6keyboard](https://www.keyclack.com/product/gb-ps2avrgb/) or the ones sold
7by [Winkeyless](http://winkeyless.kr/product/ps2avrgb-parts/).
8
9Note that this is a complete replacement for the firmware, so you won't be
10using Bootmapper Client to change any keyboard settings, since not all the
11USB report options are supported.
12
13
14## Installing
15
16First, install the requirements. These commands are for OSX, but all you
17need is the AVR toolchain and `bootloadHID` for flashing:
18
19```
20$ brew cask install crosspack-avr
21$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
22```
23
24In order to use the `./program` script, which can reboot the board into
25the bootloader, you'll need Python 2 with PyUSB installed:
26
27```
28$ pip install pyusb
29```
30
31Then, with the keyboard plugged in, simply run this command from the
32`qmk_firmware` directory:
33
34```
35$ make mechmini-program
36```
37
38If you prefer, you can just build it and flash the firmware directly with
39`bootloadHID` if you boot the board while holding down `L_Ctrl` to keep it
40in the bootloader:
41
42```
43$ make mechmini
44$ bootloadHID -r mechmini_default.hex
45```
46
47## Troubleshooting
48
49From my experience, it's really hard to brick these boards. But these
50tricks have been useful when it got stuck in a weird scenario.
51
521. Try plugging the board in while pressing `L_Ctrl`. This will force it
53 to boot only the bootloader without loading the firmware. Once this is
54 done, just reflash the board with the original firmware.
552. Sometimes USB hubs can act weird, so try connecting the board directly
56 to your computer or plugging/unplugging the USB hub.
diff --git a/keyboards/mechmini/config.h b/keyboards/mechmini/config.h
new file mode 100644
index 000000000..ecd50ca29
--- /dev/null
+++ b/keyboards/mechmini/config.h
@@ -0,0 +1,38 @@
1/*
2Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#define VENDOR_ID 0x20A0
22#define PRODUCT_ID 0x422D
23// TODO: share these strings with usbconfig.h
24// Edit usbconfig.h to change these.
25#define MANUFACTURER winkeyless.kr
26#define PRODUCT mechmini
27
28/* matrix size */
29#define MATRIX_ROWS 8
30#define MATRIX_COLS 15
31
32#define NO_UART 1
33#define BOOTLOADHID_BOOTLOADER 1
34
35/* key combination for command */
36#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
37
38#endif
diff --git a/keyboards/mechmini/keymaps/default/keymap.c b/keyboards/mechmini/keymaps/default/keymap.c
new file mode 100644
index 000000000..786132f7b
--- /dev/null
+++ b/keyboards/mechmini/keymaps/default/keymap.c
@@ -0,0 +1,28 @@
1/*
2This program is free software: you can redistribute it and/or modify
3it under the terms of the GNU General Public License as published by
4the Free Software Foundation, either version 2 of the License, or
5(at your option) any later version.
6
7This program is distributed in the hope that it will be useful,
8but WITHOUT ANY WARRANTY; without even the implied warranty of
9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10GNU General Public License for more details.
11
12You should have received a copy of the GNU General Public License
13along with this program. If not, see <http://www.gnu.org/licenses/>.
14*/
15
16#include "mechmini.h"
17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 KEYMAP(
20 TAB, Q, W, E, R, T, Y, U, I, O, P, BSLS,
21 LCTL, A, S, D, F, G, H, J, K, L, SCLN,
22 LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH,
23 GRV, LALT, LGUI, SPC, ENT, RGUI, RALT, RCTL
24 )
25};
26
27const uint16_t PROGMEM fn_actions[] = {
28};
diff --git a/keyboards/mechmini/matrix.c b/keyboards/mechmini/matrix.c
new file mode 100644
index 000000000..beaa54c40
--- /dev/null
+++ b/keyboards/mechmini/matrix.c
@@ -0,0 +1,104 @@
1/*
2Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include <avr/io.h>
19#include <util/delay.h>
20
21#include "matrix.h"
22
23#ifndef DEBOUNCE
24# define DEBOUNCE 5
25#endif
26
27static uint8_t debouncing = DEBOUNCE;
28
29static matrix_row_t matrix[MATRIX_ROWS];
30static matrix_row_t matrix_debouncing[MATRIX_ROWS];
31
32void matrix_init(void) {
33 // all outputs for rows high
34 DDRB = 0xFF;
35 PORTB = 0xFF;
36 // all inputs for columns
37 DDRA = 0x00;
38 DDRC &= ~(0x111111<<2);
39 DDRD &= ~(1<<PIND7);
40 // all columns are pulled-up
41 PORTA = 0xFF;
42 PORTC |= (0b111111<<2);
43 PORTD |= (1<<PIND7);
44
45 // initialize matrix state: all keys off
46 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
47 matrix[row] = 0x00;
48 matrix_debouncing[row] = 0x00;
49 }
50}
51
52void matrix_set_row_status(uint8_t row) {
53 DDRB = (1 << row);
54 PORTB = ~(1 << row);
55}
56
57uint8_t bit_reverse(uint8_t x) {
58 x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
59 x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
60 x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
61 return x;
62}
63
64uint8_t matrix_scan(void) {
65 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
66 matrix_set_row_status(row);
67 _delay_us(5);
68
69 matrix_row_t cols = (
70 // cols 0..7, PORTA 0 -> 7
71 (~PINA) & 0xFF
72 ) | (
73 // cols 8..13, PORTC 7 -> 0
74 bit_reverse((~PINC) & 0xFF) << 8
75 ) | (
76 // col 14, PORTD 7
77 ((~PIND) & (1 << PIND7)) << 7
78 );
79
80 if (matrix_debouncing[row] != cols) {
81 matrix_debouncing[row] = cols;
82 debouncing = DEBOUNCE;
83 }
84 }
85
86 if (debouncing) {
87 if (--debouncing) {
88 _delay_ms(1);
89 } else {
90 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
91 matrix[i] = matrix_debouncing[i];
92 }
93 }
94 }
95
96 return 1;
97}
98
99inline matrix_row_t matrix_get_row(uint8_t row) {
100 return matrix[row];
101}
102
103void matrix_print(void) {
104}
diff --git a/keyboards/mechmini/mechmini.c b/keyboards/mechmini/mechmini.c
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/mechmini/mechmini.c
diff --git a/keyboards/mechmini/mechmini.h b/keyboards/mechmini/mechmini.h
new file mode 100644
index 000000000..4dc1e8887
--- /dev/null
+++ b/keyboards/mechmini/mechmini.h
@@ -0,0 +1,41 @@
1/*
2Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef KEYMAP_COMMON_H
19#define KEYMAP_COMMON_H
20
21#include "keycode.h"
22#include "action.h"
23
24#define KEYMAP( \
25 K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, \
26 K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, \
27 K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, \
28 K00, K10, K20, K56, K57, KB0, KC0, K66 \
29) \
30{ \
31 { KC_##K00, KC_##K10, KC_##K20, KC_##K56, KC_NO, KC_NO, KC_##K57, KC_NO, KC_##KB0, KC_##KC0, KC_##K66, KC_NO, KC_NO, KC_NO, KC_NO }, \
32 { KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_##K46, KC_##KE6, KC_##KE7, KC_##K47, KC_##KA1, KC_NO, KC_NO, KC_NO, KC_NO }, \
33 { KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_##K36, KC_##KD6, KC_##KD7, KC_##K37, KC_##KA2, KC_NO, KC_NO, KC_NO, KC_NO }, \
34 { KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_##K26, KC_##KC6, KC_##KC7, KC_##K27, KC_##KA3, KC_##KB3, KC_NO, KC_NO, KC_NO }, \
35 { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
36 { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
37 { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
38 { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
39}
40
41#endif
diff --git a/keyboards/mechmini/program b/keyboards/mechmini/program
new file mode 100644
index 000000000..a88d9cd9b
--- /dev/null
+++ b/keyboards/mechmini/program
@@ -0,0 +1,74 @@
1#!/usr/bin/env python
2# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
3#
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation, either version 2 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17from __future__ import print_function
18
19import os
20import sys
21import time
22import usb
23
24if len(sys.argv) < 2:
25 print('Usage: %s <firmware.hex>' % sys.argv[0])
26 sys.exit(1)
27
28print('Searching for ps2avrGB... ', end='')
29
30dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D)
31if dev is None:
32 raise ValueError('Device not found')
33
34print('Found', end='\n\n')
35
36print('Device Information:')
37print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
38print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
39print('Manufacturer: %s' % (dev.iManufacturer))
40print('Serial: %s' % (dev.iSerialNumber))
41print('Product: %s' % (dev.iProduct), end='\n\n')
42
43print('Transferring control to bootloader... ', end='')
44
45dev.set_configuration()
46
47request_type = usb.util.build_request_type(
48 usb.util.CTRL_OUT,
49 usb.util.CTRL_TYPE_CLASS,
50 usb.util.CTRL_RECIPIENT_DEVICE)
51
52USBRQ_HID_SET_REPORT = 0x09
53HID_REPORT_OPTION = 0x0301
54
55
56try:
57 dev.ctrl_transfer(
58 request_type,
59 USBRQ_HID_SET_REPORT,
60 HID_REPORT_OPTION,
61 0,
62 [0, 0, 0xFF] + [0] * 5
63 )
64except usb.core.USBError:
65 # for some reason I keep getting USBError, but it works!
66 pass
67
68# wait a bit until bootloader starts up
69time.sleep(2)
70
71print('OK')
72print('Programming...')
73if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0:
74 print('\nDone!')
diff --git a/keyboards/mechmini/rules.mk b/keyboards/mechmini/rules.mk
new file mode 100644
index 000000000..26dfe36d0
--- /dev/null
+++ b/keyboards/mechmini/rules.mk
@@ -0,0 +1,43 @@
1# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
2#
3# This program is free software: you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation, either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16# MCU name
17MCU = atmega32a
18PROTOCOL = VUSB
19
20# unsupported features for now
21NO_UART = yes
22NO_SUSPEND_POWER_DOWN = yes
23BACKLIGHT_ENABLE = no
24
25# processor frequency
26F_CPU = 12000000
27
28# build options
29BOOTMAGIC_ENABLE = yes
30MOUSEKEY_ENABLE = yes
31EXTRAKEY_ENABLE = yes
32CONSOLE_ENABLE = yes
33COMMAND_ENABLE = yes
34
35OPT_DEFS = -DDEBUG_LEVEL=0
36OPT_DEFS += -DBOOTLOADER_SIZE=2048
37
38# custom matrix setup
39CUSTOM_MATRIX = yes
40SRC = matrix.c
41
42# programming options
43PROGRAM_CMD = ./keyboards/mechmini/program $(TARGET).hex
diff --git a/keyboards/mechmini/usbconfig.h b/keyboards/mechmini/usbconfig.h
new file mode 100644
index 000000000..d2d848fcd
--- /dev/null
+++ b/keyboards/mechmini/usbconfig.h
@@ -0,0 +1,396 @@
1/* Name: usbconfig.h
2 * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
3 * Author: Christian Starkjohann
4 * Creation Date: 2005-04-01
5 * Tabsize: 4
6 * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
7 * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
8 * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
9 */
10
11#ifndef __usbconfig_h_included__
12#define __usbconfig_h_included__
13
14#include "config.h"
15
16/*
17General Description:
18This file is an example configuration (with inline documentation) for the USB
19driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is
20also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may
21wire the lines to any other port, as long as D+ is also wired to INT0 (or any
22other hardware interrupt, as long as it is the highest level interrupt, see
23section at the end of this file).
24*/
25
26/* ---------------------------- Hardware Config ---------------------------- */
27
28#define USB_CFG_IOPORTNAME D
29/* This is the port where the USB bus is connected. When you configure it to
30 * "B", the registers PORTB, PINB and DDRB will be used.
31 */
32#define USB_CFG_DMINUS_BIT 3
33/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
34 * This may be any bit in the port.
35 */
36#define USB_CFG_DPLUS_BIT 2
37/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
38 * This may be any bit in the port. Please note that D+ must also be connected
39 * to interrupt pin INT0! [You can also use other interrupts, see section
40 * "Optional MCU Description" below, or you can connect D- to the interrupt, as
41 * it is required if you use the USB_COUNT_SOF feature. If you use D- for the
42 * interrupt, the USB interrupt will also be triggered at Start-Of-Frame
43 * markers every millisecond.]
44 */
45#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
46/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000,
47 * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code
48 * require no crystal, they tolerate +/- 1% deviation from the nominal
49 * frequency. All other rates require a precision of 2000 ppm and thus a
50 * crystal!
51 * Since F_CPU should be defined to your actual clock rate anyway, you should
52 * not need to modify this setting.
53 */
54#define USB_CFG_CHECK_CRC 0
55/* Define this to 1 if you want that the driver checks integrity of incoming
56 * data packets (CRC checks). CRC checks cost quite a bit of code size and are
57 * currently only available for 18 MHz crystal clock. You must choose
58 * USB_CFG_CLOCK_KHZ = 18000 if you enable this option.
59 */
60
61/* ----------------------- Optional Hardware Config ------------------------ */
62
63/* #define USB_CFG_PULLUP_IOPORTNAME D */
64/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
65 * V+, you can connect and disconnect the device from firmware by calling
66 * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
67 * This constant defines the port on which the pullup resistor is connected.
68 */
69/* #define USB_CFG_PULLUP_BIT 4 */
70/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
71 * above) where the 1.5k pullup resistor is connected. See description
72 * above for details.
73 */
74
75/* --------------------------- Functional Range ---------------------------- */
76
77#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
78/* Define this to 1 if you want to compile a version with two endpoints: The
79 * default control endpoint 0 and an interrupt-in endpoint (any other endpoint
80 * number).
81 */
82#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
83/* Define this to 1 if you want to compile a version with three endpoints: The
84 * default control endpoint 0, an interrupt-in endpoint 3 (or the number
85 * configured below) and a catch-all default interrupt-in endpoint as above.
86 * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
87 */
88#define USB_CFG_EP3_NUMBER 3
89/* If the so-called endpoint 3 is used, it can now be configured to any other
90 * endpoint number (except 0) with this macro. Default if undefined is 3.
91 */
92/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */
93/* The above macro defines the startup condition for data toggling on the
94 * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
95 * Since the token is toggled BEFORE sending any data, the first packet is
96 * sent with the oposite value of this configuration!
97 */
98#define USB_CFG_IMPLEMENT_HALT 0
99/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
100 * for endpoint 1 (interrupt endpoint). Although you may not need this feature,
101 * it is required by the standard. We have made it a config option because it
102 * bloats the code considerably.
103 */
104#define USB_CFG_SUPPRESS_INTR_CODE 0
105/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
106 * want to send any data over them. If this macro is defined to 1, functions
107 * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
108 * you need the interrupt-in endpoints in order to comply to an interface
109 * (e.g. HID), but never want to send any data. This option saves a couple
110 * of bytes in flash memory and the transmit buffers in RAM.
111 */
112#define USB_CFG_INTR_POLL_INTERVAL 1
113/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
114 * interval. The value is in milliseconds and must not be less than 10 ms for
115 * low speed devices.
116 */
117#define USB_CFG_IS_SELF_POWERED 0
118/* Define this to 1 if the device has its own power supply. Set it to 0 if the
119 * device is powered from the USB bus.
120 */
121#define USB_CFG_MAX_BUS_POWER 500
122/* Set this variable to the maximum USB bus power consumption of your device.
123 * The value is in milliamperes. [It will be divided by two since USB
124 * communicates power requirements in units of 2 mA.]
125 */
126#define USB_CFG_IMPLEMENT_FN_WRITE 1
127/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
128 * transfers. Set it to 0 if you don't need it and want to save a couple of
129 * bytes.
130 */
131#define USB_CFG_IMPLEMENT_FN_READ 0
132/* Set this to 1 if you need to send control replies which are generated
133 * "on the fly" when usbFunctionRead() is called. If you only want to send
134 * data from a static buffer, set it to 0 and return the data from
135 * usbFunctionSetup(). This saves a couple of bytes.
136 */
137#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0
138/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
139 * You must implement the function usbFunctionWriteOut() which receives all
140 * interrupt/bulk data sent to any endpoint other than 0. The endpoint number
141 * can be found in 'usbRxToken'.
142 */
143#define USB_CFG_HAVE_FLOWCONTROL 0
144/* Define this to 1 if you want flowcontrol over USB data. See the definition
145 * of the macros usbDisableAllRequests() and usbEnableAllRequests() in
146 * usbdrv.h.
147 */
148#define USB_CFG_DRIVER_FLASH_PAGE 0
149/* If the device has more than 64 kBytes of flash, define this to the 64 k page
150 * where the driver's constants (descriptors) are located. Or in other words:
151 * Define this to 1 for boot loaders on the ATMega128.
152 */
153#define USB_CFG_LONG_TRANSFERS 0
154/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
155 * in a single control-in or control-out transfer. Note that the capability
156 * for long transfers increases the driver size.
157 */
158/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
159/* This macro is a hook if you want to do unconventional things. If it is
160 * defined, it's inserted at the beginning of received message processing.
161 * If you eat the received message and don't want default processing to
162 * proceed, do a return after doing your things. One possible application
163 * (besides debugging) is to flash a status LED on each packet.
164 */
165/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */
166/* This macro is a hook if you need to know when an USB RESET occurs. It has
167 * one parameter which distinguishes between the start of RESET state and its
168 * end.
169 */
170/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */
171/* This macro (if defined) is executed when a USB SET_ADDRESS request was
172 * received.
173 */
174#define USB_COUNT_SOF 1
175/* define this macro to 1 if you need the global variable "usbSofCount" which
176 * counts SOF packets. This feature requires that the hardware interrupt is
177 * connected to D- instead of D+.
178 */
179/* #ifdef __ASSEMBLER__
180 * macro myAssemblerMacro
181 * in YL, TCNT0
182 * sts timer0Snapshot, YL
183 * endm
184 * #endif
185 * #define USB_SOF_HOOK myAssemblerMacro
186 * This macro (if defined) is executed in the assembler module when a
187 * Start Of Frame condition is detected. It is recommended to define it to
188 * the name of an assembler macro which is defined here as well so that more
189 * than one assembler instruction can be used. The macro may use the register
190 * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
191 * immediately after an SOF pulse may be lost and must be retried by the host.
192 * What can you do with this hook? Since the SOF signal occurs exactly every
193 * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
194 * designs running on the internal RC oscillator.
195 * Please note that Start Of Frame detection works only if D- is wired to the
196 * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
197 */
198#define USB_CFG_CHECK_DATA_TOGGLING 0
199/* define this macro to 1 if you want to filter out duplicate data packets
200 * sent by the host. Duplicates occur only as a consequence of communication
201 * errors, when the host does not receive an ACK. Please note that you need to
202 * implement the filtering yourself in usbFunctionWriteOut() and
203 * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
204 * for each control- and out-endpoint to check for duplicate packets.
205 */
206#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
207/* define this macro to 1 if you want the function usbMeasureFrameLength()
208 * compiled in. This function can be used to calibrate the AVR's RC oscillator.
209 */
210#define USB_USE_FAST_CRC 0
211/* The assembler module has two implementations for the CRC algorithm. One is
212 * faster, the other is smaller. This CRC routine is only used for transmitted
213 * messages where timing is not critical. The faster routine needs 31 cycles
214 * per byte while the smaller one needs 61 to 69 cycles. The faster routine
215 * may be worth the 32 bytes bigger code size if you transmit lots of data and
216 * run the AVR close to its limit.
217 */
218
219/* -------------------------- Device Description --------------------------- */
220
221#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF)
222/* USB vendor ID for the device, low byte first. If you have registered your
223 * own Vendor ID, define it here. Otherwise you may use one of obdev's free
224 * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
225 * *** IMPORTANT NOTE ***
226 * This template uses obdev's shared VID/PID pair for Vendor Class devices
227 * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
228 * the implications!
229 */
230#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF)
231/* This is the ID of the product, low byte first. It is interpreted in the
232 * scope of the vendor ID. If you have registered your own VID with usb.org
233 * or if you have licensed a PID from somebody else, define it here. Otherwise
234 * you may use one of obdev's free shared VID/PID pairs. See the file
235 * USB-IDs-for-free.txt for details!
236 * *** IMPORTANT NOTE ***
237 * This template uses obdev's shared VID/PID pair for Vendor Class devices
238 * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
239 * the implications!
240 */
241#define USB_CFG_DEVICE_VERSION 0x00, 0x02
242/* Version number of the device: Minor number first, then major number.
243 */
244#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r'
245#define USB_CFG_VENDOR_NAME_LEN 13
246/* These two values define the vendor name returned by the USB device. The name
247 * must be given as a list of characters under single quotes. The characters
248 * are interpreted as Unicode (UTF-16) entities.
249 * If you don't want a vendor name string, undefine these macros.
250 * ALWAYS define a vendor name containing your Internet domain name if you use
251 * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
252 * details.
253 */
254#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B'
255#define USB_CFG_DEVICE_NAME_LEN 8
256/* Same as above for the device name. If you don't want a device name, undefine
257 * the macros. See the file USB-IDs-for-free.txt before you assign a name if
258 * you use a shared VID/PID.
259 */
260/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */
261/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */
262/* Same as above for the serial number. If you don't want a serial number,
263 * undefine the macros.
264 * It may be useful to provide the serial number through other means than at
265 * compile time. See the section about descriptor properties below for how
266 * to fine tune control over USB descriptors such as the string descriptor
267 * for the serial number.
268 */
269#define USB_CFG_DEVICE_CLASS 0
270#define USB_CFG_DEVICE_SUBCLASS 0
271/* See USB specification if you want to conform to an existing device class.
272 * Class 0xff is "vendor specific".
273 */
274#define USB_CFG_INTERFACE_CLASS 3 /* HID */
275#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */
276#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */
277/* See USB specification if you want to conform to an existing device class or
278 * protocol. The following classes must be set at interface level:
279 * HID class is 3, no subclass and protocol required (but may be useful!)
280 * CDC class is 2, use subclass 2 and protocol 1 for ACM
281 */
282#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0
283/* Define this to the length of the HID report descriptor, if you implement
284 * an HID device. Otherwise don't define it or define it to 0.
285 * If you use this define, you must add a PROGMEM character array named
286 * "usbHidReportDescriptor" to your code which contains the report descriptor.
287 * Don't forget to keep the array and this define in sync!
288 */
289
290/* #define USB_PUBLIC static */
291/* Use the define above if you #include usbdrv.c instead of linking against it.
292 * This technique saves a couple of bytes in flash memory.
293 */
294
295/* ------------------- Fine Control over USB Descriptors ------------------- */
296/* If you don't want to use the driver's default USB descriptors, you can
297 * provide our own. These can be provided as (1) fixed length static data in
298 * flash memory, (2) fixed length static data in RAM or (3) dynamically at
299 * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
300 * information about this function.
301 * Descriptor handling is configured through the descriptor's properties. If
302 * no properties are defined or if they are 0, the default descriptor is used.
303 * Possible properties are:
304 * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
305 * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
306 * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
307 * you want RAM pointers.
308 * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
309 * in static memory is in RAM, not in flash memory.
310 * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
311 * the driver must know the descriptor's length. The descriptor itself is
312 * found at the address of a well known identifier (see below).
313 * List of static descriptor names (must be declared PROGMEM if in flash):
314 * char usbDescriptorDevice[];
315 * char usbDescriptorConfiguration[];
316 * char usbDescriptorHidReport[];
317 * char usbDescriptorString0[];
318 * int usbDescriptorStringVendor[];
319 * int usbDescriptorStringDevice[];
320 * int usbDescriptorStringSerialNumber[];
321 * Other descriptors can't be provided statically, they must be provided
322 * dynamically at runtime.
323 *
324 * Descriptor properties are or-ed or added together, e.g.:
325 * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
326 *
327 * The following descriptors are defined:
328 * USB_CFG_DESCR_PROPS_DEVICE
329 * USB_CFG_DESCR_PROPS_CONFIGURATION
330 * USB_CFG_DESCR_PROPS_STRINGS
331 * USB_CFG_DESCR_PROPS_STRING_0
332 * USB_CFG_DESCR_PROPS_STRING_VENDOR
333 * USB_CFG_DESCR_PROPS_STRING_PRODUCT
334 * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
335 * USB_CFG_DESCR_PROPS_HID
336 * USB_CFG_DESCR_PROPS_HID_REPORT
337 * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
338 *
339 * Note about string descriptors: String descriptors are not just strings, they
340 * are Unicode strings prefixed with a 2 byte header. Example:
341 * int serialNumberDescriptor[] = {
342 * USB_STRING_DESCRIPTOR_HEADER(6),
343 * 'S', 'e', 'r', 'i', 'a', 'l'
344 * };
345 */
346
347#define USB_CFG_DESCR_PROPS_DEVICE 0
348#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC
349//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
350#define USB_CFG_DESCR_PROPS_STRINGS 0
351#define USB_CFG_DESCR_PROPS_STRING_0 0
352#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
353#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
354#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
355#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
356//#define USB_CFG_DESCR_PROPS_HID 0
357#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
358//#define USB_CFG_DESCR_PROPS_HID_REPORT 0
359#define USB_CFG_DESCR_PROPS_UNKNOWN 0
360
361#define usbMsgPtr_t unsigned short
362/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
363 * a scalar type here because gcc generates slightly shorter code for scalar
364 * arithmetics than for pointer arithmetics. Remove this define for backward
365 * type compatibility or define it to an 8 bit type if you use data in RAM only
366 * and all RAM is below 256 bytes (tiny memory model in IAR CC).
367 */
368
369/* ----------------------- Optional MCU Description ------------------------ */
370
371/* The following configurations have working defaults in usbdrv.h. You
372 * usually don't need to set them explicitly. Only if you want to run
373 * the driver on a device which is not yet supported or with a compiler
374 * which is not fully supported (such as IAR C) or if you use a differnt
375 * interrupt than INT0, you may have to define some of these.
376 */
377/* #define USB_INTR_CFG MCUCR */
378/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */
379/* #define USB_INTR_CFG_CLR 0 */
380/* #define USB_INTR_ENABLE GIMSK */
381/* #define USB_INTR_ENABLE_BIT INT0 */
382/* #define USB_INTR_PENDING GIFR */
383/* #define USB_INTR_PENDING_BIT INTF0 */
384/* #define USB_INTR_VECTOR INT0_vect */
385
386/* Set INT1 for D- falling edge to count SOF */
387/* #define USB_INTR_CFG EICRA */
388#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10))
389/* #define USB_INTR_CFG_CLR 0 */
390/* #define USB_INTR_ENABLE EIMSK */
391#define USB_INTR_ENABLE_BIT INT1
392/* #define USB_INTR_PENDING EIFR */
393#define USB_INTR_PENDING_BIT INTF1
394#define USB_INTR_VECTOR INT1_vect
395
396#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/nyquist/Makefile b/keyboards/nyquist/Makefile
new file mode 100644
index 000000000..0c519b323
--- /dev/null
+++ b/keyboards/nyquist/Makefile
@@ -0,0 +1,5 @@
1SUBPROJECT_DEFAULT = rev1
2
3ifndef MAKEFILE_INCLUDED
4 include ../../Makefile
5endif
diff --git a/keyboards/nyquist/config.h b/keyboards/nyquist/config.h
new file mode 100644
index 000000000..55500df79
--- /dev/null
+++ b/keyboards/nyquist/config.h
@@ -0,0 +1,27 @@
1/*
2Copyright 2017 Danny Nguyen <danny@hexwire.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#ifdef SUBPROJECT_rev1
24 #include "rev1/config.h"
25#endif
26
27#endif // CONFIG_H
diff --git a/keyboards/nyquist/i2c.c b/keyboards/nyquist/i2c.c
new file mode 100644
index 000000000..084c890c4
--- /dev/null
+++ b/keyboards/nyquist/i2c.c
@@ -0,0 +1,162 @@
1#include <util/twi.h>
2#include <avr/io.h>
3#include <stdlib.h>
4#include <avr/interrupt.h>
5#include <util/twi.h>
6#include <stdbool.h>
7#include "i2c.h"
8
9#ifdef USE_I2C
10
11// Limits the amount of we wait for any one i2c transaction.
12// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
13// 9 bits, a single transaction will take around 90μs to complete.
14//
15// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit
16// poll loop takes at least 8 clock cycles to execute
17#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
18
19#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
20
21volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
22
23static volatile uint8_t slave_buffer_pos;
24static volatile bool slave_has_register_set = false;
25
26// Wait for an i2c operation to finish
27inline static
28void i2c_delay(void) {
29 uint16_t lim = 0;
30 while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
31 lim++;
32
33 // easier way, but will wait slightly longer
34 // _delay_us(100);
35}
36
37// Setup twi to run at 100kHz
38void i2c_master_init(void) {
39 // no prescaler
40 TWSR = 0;
41 // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.
42 // Check datasheets for more info.
43 TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
44}
45
46// Start a transaction with the given i2c slave address. The direction of the
47// transfer is set with I2C_READ and I2C_WRITE.
48// returns: 0 => success
49// 1 => error
50uint8_t i2c_master_start(uint8_t address) {
51 TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);
52
53 i2c_delay();
54
55 // check that we started successfully
56 if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
57 return 1;
58
59 TWDR = address;
60 TWCR = (1<<TWINT) | (1<<TWEN);
61
62 i2c_delay();
63
64 if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
65 return 1; // slave did not acknowledge
66 else
67 return 0; // success
68}
69
70
71// Finish the i2c transaction.
72void i2c_master_stop(void) {
73 TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
74
75 uint16_t lim = 0;
76 while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)
77 lim++;
78}
79
80// Write one byte to the i2c slave.
81// returns 0 => slave ACK
82// 1 => slave NACK
83uint8_t i2c_master_write(uint8_t data) {
84 TWDR = data;
85 TWCR = (1<<TWINT) | (1<<TWEN);
86
87 i2c_delay();
88
89 // check if the slave acknowledged us
90 return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
91}
92
93// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,
94// if ack=0 the acknowledge bit is not set.
95// returns: byte read from i2c device
96uint8_t i2c_master_read(int ack) {
97 TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);
98
99 i2c_delay();
100 return TWDR;
101}
102
103void i2c_reset_state(void) {
104 TWCR = 0;
105}
106
107void i2c_slave_init(uint8_t address) {
108 TWAR = address << 0; // slave i2c address
109 // TWEN - twi enable
110 // TWEA - enable address acknowledgement
111 // TWINT - twi interrupt flag
112 // TWIE - enable the twi interrupt
113 TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
114}
115
116ISR(TWI_vect);
117
118ISR(TWI_vect) {
119 uint8_t ack = 1;
120 switch(TW_STATUS) {
121 case TW_SR_SLA_ACK:
122 // this device has been addressed as a slave receiver
123 slave_has_register_set = false;
124 break;
125
126 case TW_SR_DATA_ACK:
127 // this device has received data as a slave receiver
128 // The first byte that we receive in this transaction sets the location
129 // of the read/write location of the slaves memory that it exposes over
130 // i2c. After that, bytes will be written at slave_buffer_pos, incrementing
131 // slave_buffer_pos after each write.
132 if(!slave_has_register_set) {
133 slave_buffer_pos = TWDR;
134 // don't acknowledge the master if this memory loctaion is out of bounds
135 if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {
136 ack = 0;
137 slave_buffer_pos = 0;
138 }
139 slave_has_register_set = true;
140 } else {
141 i2c_slave_buffer[slave_buffer_pos] = TWDR;
142 BUFFER_POS_INC();
143 }
144 break;
145
146 case TW_ST_SLA_ACK:
147 case TW_ST_DATA_ACK:
148 // master has addressed this device as a slave transmitter and is
149 // requesting data.
150 TWDR = i2c_slave_buffer[slave_buffer_pos];
151 BUFFER_POS_INC();
152 break;
153
154 case TW_BUS_ERROR: // something went wrong, reset twi state
155 TWCR = 0;
156 default:
157 break;
158 }
159 // Reset everything, so we are ready for the next TWI interrupt
160 TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
161}
162#endif
diff --git a/keyboards/nyquist/i2c.h b/keyboards/nyquist/i2c.h
new file mode 100644
index 000000000..43e596988
--- /dev/null
+++ b/keyboards/nyquist/i2c.h
@@ -0,0 +1,49 @@
1#ifndef I2C_H
2#define I2C_H
3
4#include <stdint.h>
5
6#ifndef F_CPU
7#define F_CPU 16000000UL
8#endif
9
10#define I2C_READ 1
11#define I2C_WRITE 0
12
13#define I2C_ACK 1
14#define I2C_NACK 0
15
16#define SLAVE_BUFFER_SIZE 0x10
17
18// i2c SCL clock frequency
19#define SCL_CLOCK 100000L
20
21extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
22
23void i2c_master_init(void);
24uint8_t i2c_master_start(uint8_t address);
25void i2c_master_stop(void);
26uint8_t i2c_master_write(uint8_t data);
27uint8_t i2c_master_read(int);
28void i2c_reset_state(void);
29void i2c_slave_init(uint8_t address);
30
31
32static inline unsigned char i2c_start_read(unsigned char addr) {
33 return i2c_master_start((addr << 1) | I2C_READ);
34}
35
36static inline unsigned char i2c_start_write(unsigned char addr) {
37 return i2c_master_start((addr << 1) | I2C_WRITE);
38}
39
40// from SSD1306 scrips
41extern unsigned char i2c_rep_start(unsigned char addr);
42extern void i2c_start_wait(unsigned char addr);
43extern unsigned char i2c_readAck(void);
44extern unsigned char i2c_readNak(void);
45extern unsigned char i2c_read(unsigned char ack);
46
47#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
48
49#endif
diff --git a/keyboards/nyquist/keymaps/hexwire/Makefile b/keyboards/nyquist/keymaps/hexwire/Makefile
new file mode 100644
index 000000000..1e5761278
--- /dev/null
+++ b/keyboards/nyquist/keymaps/hexwire/Makefile
@@ -0,0 +1,5 @@
1RGBLIGHT_ENABLE = yes
2
3ifndef QUANTUM_DIR
4 include ../../../../Makefile
5endif
diff --git a/keyboards/nyquist/keymaps/hexwire/README.md b/keyboards/nyquist/keymaps/hexwire/README.md
new file mode 100644
index 000000000..3ce3f6af3
--- /dev/null
+++ b/keyboards/nyquist/keymaps/hexwire/README.md
@@ -0,0 +1,116 @@
1Hexwire's Nyquist Layout
2============================
3
4### Changes from default layout
5
6- Main layer
7 - The right space bar key has been changed to backspace, as I only hit space with my left thumb
8 - Backtick is at the lower right and also serves goes to the 3rd function layer when held
9 - Enter key acts as shift when held
10 - Escape key acts as control when held
11 - Minus key at upper right
12- Lower layer
13 - Numbers are on the lower layer, to make it easier to use a numpad on the right hand
14 - Arrow keys
15 - Straight and curly brackets in the middle two columns
16 - Screenshot keys for MacOS
17- Upper layer
18 - Symbols are on the upper layer
19 - Media keys
20 - Page Up/Down, Home/End
21- 3rd function layer
22 - Function keys
23
24## Layouts
25
26### QWERTY
27
28```
29,----+----+----+----+----+----. ,----+----+----+----+----+----.
30|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC|
31|----+----+----+----+----+----| |----+----+----+----+----+----|
32|TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS|
33|----+----+----+----+----+----| |----+----+----+----+----+----|
34| X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT|
35|----+----+----+----+----+----| |----+----+----+----+----+----|
36|LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 |
37|----+----+----+----+----+----| |----+----+----+----+----+----|
38| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
39`----+----+----+----+----+----' `----+----+----+----+----+----'
40```
41
42### Colemak
43```
44,----+----+----+----+----+----. ,----+----+----+----+----+----.
45|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC|
46|----+----+----+----+----+----| |----+----+----+----+----+----|
47|TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS|
48|----+----+----+----+----+----| |----+----+----+----+----+----|
49| X0 , A , R , S , T , D , H , N , E , I , O ,QUOT|
50|----+----+----+----+----+----| |----+----+----+----+----+----|
51|LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 |
52|----+----+----+----+----+----| |----+----+----+----+----+----|
53| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
54`----+----+----+----+----+----' `----+----+----+----+----+----'
55```
56
57### Dvorak
58```
59,----+----+----+----+----+----. ,----+----+----+----+----+----.
60|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC|
61|----+----+----+----+----+----| |----+----+----+----+----+----|
62|TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS|
63|----+----+----+----+----+----| |----+----+----+----+----+----|
64| X0 , A , O , E , U , I , D , H , T , N , S ,SLSH|
65|----+----+----+----+----+----| |----+----+----+----+----+----|
66|LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 |
67|----+----+----+----+----+----| |----+----+----+----+----+----|
68| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
69`----+----+----+----+----+----' `----+----+----+----+----+----'
70```
71
72### Lower
73```
74,----+----+----+----+----+----. ,----+----+----+----+----+----.
75|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC|
76|----+----+----+----+----+----| |----+----+----+----+----+----|
77| , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , |
78|----+----+----+----+----+----| |----+----+----+----+----+----|
79|DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE|
80|----+----+----+----+----+----| |----+----+----+----+----+----|
81| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, |
82|----+----+----+----+----+----| |----+----+----+----+----+----|
83| , , , , , , DEL , , P0 ,PDOT, , |
84`----+----+----+----+----+----' `----+----+----+----+----+----'
85```
86
87### Raise
88```
89,----+----+----+----+----+----. ,----+----+----+----+----+----.
90|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC|
91|----+----+----+----+----+----| |----+----+----+----+----+----|
92| ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, |
93|----+----+----+----+----+----| |----+----+----+----+----+----|
94|DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS|
95|----+----+----+----+----+----| |----+----+----+----+----+----|
96|MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , |
97|----+----+----+----+----+----| |----+----+----+----+----+----|
98| , , , , , , , , , , , |
99`----+----+----+----+----+----' `----+----+----+----+----+----'
100```
101
102### 3rd function layer
103
104```
105,----+----+----+----+----+----. ,----+----+----+----+----+----.
106|F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 |
107|----+----+----+----+----+----| |----+----+----+----+----+----|
108| , , , , , , , , , , , |
109|----+----+----+----+----+----| |----+----+----+----+----+----|
110| , , , , , , , , , , , |
111|----+----+----+----+----+----| |----+----+----+----+----+----|
112| , , , , , , , , , , , |
113|----+----+----+----+----+----| |----+----+----+----+----+----|
114| , , , , , , , , , , , |
115`----+----+----+----+----+----' `----+----+----+----+----+----'
116```
diff --git a/keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md b/keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md
new file mode 100644
index 000000000..9a7633a52
--- /dev/null
+++ b/keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md
@@ -0,0 +1,20 @@
1# Let's Split RGB Underglow
2
3## Master
4
5### Pro Micro
6- Red: LED +5V -> Pro Micro VCC
7- Green: LED Din -> Pro Micro TX0
8- Black: LED GND -> Pro Micro GND
9
10### TRRS
11- Red: LED +5V -> PCB VCC
12- Green: LED Do -> PCB Extra Data
13- Black: LED GND -> PCB GND
14
15## Slave
16
17### TRRS
18- Red: LED +5V -> PCB VCC
19- Green: LED Din -> PCB Extra Data
20- Black: LED GND -> PCB GND
diff --git a/keyboards/nyquist/keymaps/hexwire/config.h b/keyboards/nyquist/keymaps/hexwire/config.h
new file mode 100644
index 000000000..9da7ff6b6
--- /dev/null
+++ b/keyboards/nyquist/keymaps/hexwire/config.h
@@ -0,0 +1,31 @@
1/*
2Copyright 2017 Danny Nguyen <danny@hexwire.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#define USE_SERIAL
19
20#define TAPPING_TERM 150
21
22#ifdef SUBPROJECT_rev1
23 #include "../../rev1/config.h"
24#endif
25
26#undef RGBLED_NUM
27#define RGBLIGHT_ANIMATIONS
28#define RGBLED_NUM 8
29#define RGBLIGHT_HUE_STEP 8
30#define RGBLIGHT_SAT_STEP 8
31#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/nyquist/keymaps/hexwire/keymap.c b/keyboards/nyquist/keymaps/hexwire/keymap.c
new file mode 100644
index 000000000..803d257a9
--- /dev/null
+++ b/keyboards/nyquist/keymaps/hexwire/keymap.c
@@ -0,0 +1,218 @@
1#include "nyquist.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7#define _QWERTY 0
8#define _COLEMAK 1
9#define _DVORAK 2
10#define _LOWER 3
11#define _RAISE 4
12#define _FN3 5
13#define _FN4 6
14#define _ADJUST 16
15
16enum custom_keycodes {
17 QWERTY = SAFE_RANGE,
18 COLEMAK,
19 DVORAK,
20 LOWER,
21 RAISE,
22 FN3,
23 FN4,
24 ADJUST,
25};
26
27#define KC_ KC_TRNS
28#define _______ KC_TRNS
29
30#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
31#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
32#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
33#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
34#define KC_X0 MT(MOD_LCTL, KC_ESC)
35#define KC_X1 LOWER
36#define KC_X2 RAISE
37#define KC_X3 LT(_FN3, KC_GRV)
38#define KC_X4 MT(MOD_LSFT, KC_ENT)
39
40const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
41
42 [_QWERTY] = KC_KEYMAP(
43 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
44 ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
45 //|----+----+----+----+----+----| |----+----+----+----+----+----|
46 TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
47 //|----+----+----+----+----+----| |----+----+----+----+----+----|
48 X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
49 //|----+----+----+----+----+----| |----+----+----+----+----+----|
50 LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
51 //|----+----+----+----+----+----| |----+----+----+----+----+----|
52 X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
53 //`----+----+----+----+----+----' `----+----+----+----+----+----'
54 ),
55
56 [_COLEMAK] = KC_KEYMAP(
57 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
58 ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
59 //|----+----+----+----+----+----| |----+----+----+----+----+----|
60 TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
61 //|----+----+----+----+----+----| |----+----+----+----+----+----|
62 X0 , A , R , S , T , D , H , N , E , I , O ,QUOT,
63 //|----+----+----+----+----+----| |----+----+----+----+----+----|
64 LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
65 //|----+----+----+----+----+----| |----+----+----+----+----+----|
66 X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
67 //`----+----+----+----+----+----' `----+----+----+----+----+----'
68 ),
69
70 [_DVORAK] = KC_KEYMAP(
71 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
72 ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
73 //|----+----+----+----+----+----| |----+----+----+----+----+----|
74 TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
75 //|----+----+----+----+----+----| |----+----+----+----+----+----|
76 X0 , A , O , E , U , I , D , H , T , N , S ,SLSH,
77 //|----+----+----+----+----+----| |----+----+----+----+----+----|
78 LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
79 //|----+----+----+----+----+----| |----+----+----+----+----+----|
80 X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
81 //`----+----+----+----+----+----' `----+----+----+----+----+----'
82 ),
83
84 [_LOWER] = KC_KEYMAP(
85 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
86 TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
87 //|----+----+----+----+----+----| |----+----+----+----+----+----|
88 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
89 //|----+----+----+----+----+----| |----+----+----+----+----+----|
90 DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
91 //|----+----+----+----+----+----| |----+----+----+----+----+----|
92 ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, ,
93 //|----+----+----+----+----+----| |----+----+----+----+----+----|
94 , , , , , , DEL , , P0 ,PDOT, ,
95 //`----+----+----+----+----+----' `----+----+----+----+----+----'
96 ),
97
98 [_RAISE] = KC_KEYMAP(
99 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
100 TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
101 //|----+----+----+----+----+----| |----+----+----+----+----+----|
102 ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
103 //|----+----+----+----+----+----| |----+----+----+----+----+----|
104 DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
105 //|----+----+----+----+----+----| |----+----+----+----+----+----|
106 MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , ,
107 //|----+----+----+----+----+----| |----+----+----+----+----+----|
108 , , , , , , , , , , ,
109 //`----+----+----+----+----+----' `----+----+----+----+----+----'
110 ),
111
112 [_FN3] = KC_KEYMAP(
113 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
114 F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
115 //|----+----+----+----+----+----| |----+----+----+----+----+----|
116 , , , , , , , , , , , ,
117 //|----+----+----+----+----+----| |----+----+----+----+----+----|
118 , , , , , , , , , , , ,
119 //|----+----+----+----+----+----| |----+----+----+----+----+----|
120 , , , , , , , , , , , ,
121 //|----+----+----+----+----+----| |----+----+----+----+----+----|
122 , , , , , , , , , , ,
123 //`----+----+----+----+----+----' `----+----+----+----+----+----'
124 ),
125
126/* Adjust (Lower + Raise)
127 * ,-----------------------------------------------------------------------------------.
128 * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | |
129 * |------+------+------+------+------+-------------+------+------+------+------+------|
130 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
131 * |------+------+------+------+------+------|------+------+------+------+------+------|
132 * | | | | | | | | | | | | |
133 * |------+------+------+------+------+------+------+------+------+------+------+------|
134 * | | | | | | | | | | | |
135 * `-----------------------------------------------------------------------------------'
136 */
137 [_ADJUST] = KEYMAP( \
138 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
139 _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \
140 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
141 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
142 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
143 )
144
145
146};
147
148#ifdef AUDIO_ENABLE
149float tone_qwerty[][2] = SONG(QWERTY_SOUND);
150float tone_dvorak[][2] = SONG(DVORAK_SOUND);
151float tone_colemak[][2] = SONG(COLEMAK_SOUND);
152#endif
153
154void persistent_default_layer_set(uint16_t default_layer) {
155 eeconfig_update_default_layer(default_layer);
156 default_layer_set(default_layer);
157}
158
159bool process_record_user(uint16_t keycode, keyrecord_t *record) {
160 switch (keycode) {
161 case QWERTY:
162 if (record->event.pressed) {
163 #ifdef AUDIO_ENABLE
164 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
165 #endif
166 persistent_default_layer_set(1UL<<_QWERTY);
167 }
168 return false;
169 break;
170 case COLEMAK:
171 if (record->event.pressed) {
172 #ifdef AUDIO_ENABLE
173 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
174 #endif
175 persistent_default_layer_set(1UL<<_COLEMAK);
176 }
177 return false;
178 break;
179 case DVORAK:
180 if (record->event.pressed) {
181 #ifdef AUDIO_ENABLE
182 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
183 #endif
184 persistent_default_layer_set(1UL<<_DVORAK);
185 }
186 return false;
187 break;
188 case LOWER:
189 if (record->event.pressed) {
190 layer_on(_LOWER);
191 update_tri_layer(_LOWER, _RAISE, _ADJUST);
192 } else {
193 layer_off(_LOWER);
194 update_tri_layer(_LOWER, _RAISE, _ADJUST);
195 }
196 return false;
197 break;
198 case RAISE:
199 if (record->event.pressed) {
200 layer_on(_RAISE);
201 update_tri_layer(_LOWER, _RAISE, _ADJUST);
202 } else {
203 layer_off(_RAISE);
204 update_tri_layer(_LOWER, _RAISE, _ADJUST);
205 }
206 return false;
207 break;
208 case ADJUST:
209 if (record->event.pressed) {
210 layer_on(_ADJUST);
211 } else {
212 layer_off(_ADJUST);
213 }
214 return false;
215 break;
216 }
217 return true;
218}
diff --git a/keyboards/nyquist/keymaps/hexwire/keymap_converter.py b/keyboards/nyquist/keymaps/hexwire/keymap_converter.py
new file mode 100755
index 000000000..683f64da4
--- /dev/null
+++ b/keyboards/nyquist/keymaps/hexwire/keymap_converter.py
@@ -0,0 +1,39 @@
1#!/usr/bin/env python
2
3import re
4
5class KeymapConverter:
6
7 def __init__(self, filename):
8 self.filename = filename
9
10 def read_keymaps(self):
11 with open(self.filename) as f:
12 lines = f.readlines()
13
14 mode = 0
15 for line in lines:
16 line = line[:-1]
17 if mode == 0:
18 if "KC_KEYMAP" in line:
19 matches = re.match(r'.*\[(.*)\] = .*', line)
20 if matches:
21 layer_name = matches.group(1)
22 layer_name = layer_name[1:].capitalize()
23 print '###', layer_name
24 print '```'
25 mode = 1
26 elif mode == 1:
27 if "//" in line:
28 print line[4:]
29 elif ")" in line:
30 mode = 0
31 print '```'
32 print
33 elif line[-1] == ',':
34 print "|" + line[5:-1] + "|"
35 else:
36 print "|" + line[5:] + "|"
37
38converter = KeymapConverter('keymap.c')
39converter.read_keymaps()
diff --git a/keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb b/keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb
new file mode 100755
index 000000000..7285b008a
--- /dev/null
+++ b/keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb
@@ -0,0 +1,40 @@
1#!/usr/bin/env ruby
2
3class KeymapConverter
4
5 def initialize(filename)
6 @filename = filename
7 @mode = :search
8 end
9
10 def read_keymaps
11 lines = IO.readlines(@filename)
12 lines.each { |line| parse_line line[0..-2] }
13 end
14
15 def parse_line(line)
16 case @mode
17 when :search
18 if line =~ /KC_KEYMAP/
19 puts "### #{line}"
20 puts "```"
21 @mode = :parse
22 end
23 when :parse
24 if line =~ /\)/
25 @mode = :search
26 puts "```\n\n"
27 else
28 line = line[4..-1]
29 line.sub!(/(,)^-/m, "|")
30 line.sub!(/( {4})/, " |")
31
32 puts line
33 end
34 end
35 end
36
37end
38
39converter = KeymapConverter.new('keymap.c')
40converter.read_keymaps
diff --git a/keyboards/nyquist/keymaps/i2c/config.h b/keyboards/nyquist/keymaps/i2c/config.h
new file mode 100644
index 000000000..dc279f6e6
--- /dev/null
+++ b/keyboards/nyquist/keymaps/i2c/config.h
@@ -0,0 +1,26 @@
1/*
2Copyright 2017 Danny Nguyen <danny@hexwire.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#define USE_I2C
19
20#define MASTER_LEFT
21// #define _MASTER_RIGHT
22// #define EE_HANDS
23
24#ifdef SUBPROJECT_rev1
25 #include "../../rev1/config.h"
26#endif
diff --git a/keyboards/nyquist/keymaps/i2c/keymap.c b/keyboards/nyquist/keymaps/i2c/keymap.c
new file mode 100644
index 000000000..aa4b6800c
--- /dev/null
+++ b/keyboards/nyquist/keymaps/i2c/keymap.c
@@ -0,0 +1,231 @@
1#include "nyquist.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _QWERTY 0
12#define _COLEMAK 1
13#define _DVORAK 2
14#define _LOWER 3
15#define _RAISE 4
16#define _ADJUST 16
17
18enum custom_keycodes {
19 QWERTY = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE,
24 ADJUST,
25};
26
27// Fillers to make layering more clear
28#define _______ KC_TRNS
29#define XXXXXXX KC_NO
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33/* Qwerty
34 * ,-----------------------------------------------------------------------------------.
35 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
36 * |------+------+------+------+------+------+------+------+------+------+------+------|
37 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
38 * |------+------+------+------+------+-------------+------+------+------+------+------|
39 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
40 * |------+------+------+------+------+------|------+------+------+------+------+------|
41 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
42 * |------+------+------+------+------+------+------+------+------+------+------+------|
43 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
44 * `-----------------------------------------------------------------------------------'
45 */
46[_QWERTY] = KEYMAP( \
47 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
48 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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
50 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
51 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
52),
53
54/* Colemak
55 * ,-----------------------------------------------------------------------------------.
56 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
57 * |------+------+------+------+------+------+------+------+------+------+------+------|
58 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
59 * |------+------+------+------+------+-------------+------+------+------+------+------|
60 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
61 * |------+------+------+------+------+------|------+------+------+------+------+------|
62 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
63 * |------+------+------+------+------+------+------+------+------+------+------+------|
64 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
65 * `-----------------------------------------------------------------------------------'
66 */
67[_COLEMAK] = KEYMAP( \
68 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_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_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 , \
72 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
73),
74
75/* Dvorak
76 * ,-----------------------------------------------------------------------------------.
77 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
78 * |------+------+------+------+------+------+------+------+------+------+------+------|
79 * | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
80 * |------+------+------+------+------+-------------+------+------+------+------+------|
81 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
82 * |------+------+------+------+------+------|------+------+------+------+------+------|
83 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
84 * |------+------+------+------+------+------+------+------+------+------+------+------|
85 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
86 * `-----------------------------------------------------------------------------------'
87 */
88[_DVORAK] = KEYMAP( \
89 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
90 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
91 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
92 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
93 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
94),
95
96/* Lower
97 * ,-----------------------------------------------------------------------------------.
98 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
99 * |------+------+------+------+------+-------------+------+------+------+------+------|
100 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
101 * |------+------+------+------+------+-------------+------+------+------+------+------|
102 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
103 * |------+------+------+------+------+------|------+------+------+------+------+------|
104 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
105 * |------+------+------+------+------+------+------+------+------+------+------+------|
106 * | | | | | | | | Next | Vol- | Vol+ | Play |
107 * `-----------------------------------------------------------------------------------'
108 */
109[_LOWER] = KEYMAP( \
110 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
111 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
113 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
114 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
115),
116
117/* Raise
118 * ,-----------------------------------------------------------------------------------.
119 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
120 * |------+------+------+------+------+-------------+------+------+------+------+------|
121 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
122 * |------+------+------+------+------+-------------+------+------+------+------+------|
123 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
124 * |------+------+------+------+------+------|------+------+------+------+------+------|
125 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
126 * |------+------+------+------+------+------+------+------+------+------+------+------|
127 * | | | | | | | | Next | Vol- | Vol+ | Play |
128 * `-----------------------------------------------------------------------------------'
129 */
130[_RAISE] = KEYMAP( \
131 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, KC_DEL, \
133 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
134 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
135 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
136),
137
138/* Adjust (Lower + Raise)
139 * ,-----------------------------------------------------------------------------------.
140 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
141 * |------+------+------+------+------+------+------+------+------+------+------+------|
142 * | | Reset| | | | | | | | | | Del |
143 * |------+------+------+------+------+-------------+------+------+------+------+------|
144 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
145 * |------+------+------+------+------+------|------+------+------+------+------+------|
146 * | | | | | | | | | | | | |
147 * |------+------+------+------+------+------+------+------+------+------+------+------|
148 * | | | | | | | | | | | |
149 * `-----------------------------------------------------------------------------------'
150 */
151[_ADJUST] = KEYMAP( \
152 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 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
154 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
155 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
156 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
157)
158
159};
160
161#ifdef AUDIO_ENABLE
162float tone_qwerty[][2] = SONG(QWERTY_SOUND);
163float tone_dvorak[][2] = SONG(DVORAK_SOUND);
164float tone_colemak[][2] = SONG(COLEMAK_SOUND);
165#endif
166
167void persistent_default_layer_set(uint16_t default_layer) {
168 eeconfig_update_default_layer(default_layer);
169 default_layer_set(default_layer);
170}
171
172bool process_record_user(uint16_t keycode, keyrecord_t *record) {
173 switch (keycode) {
174 case QWERTY:
175 if (record->event.pressed) {
176 #ifdef AUDIO_ENABLE
177 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
178 #endif
179 persistent_default_layer_set(1UL<<_QWERTY);
180 }
181 return false;
182 break;
183 case COLEMAK:
184 if (record->event.pressed) {
185 #ifdef AUDIO_ENABLE
186 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
187 #endif
188 persistent_default_layer_set(1UL<<_COLEMAK);
189 }
190 return false;
191 break;
192 case DVORAK:
193 if (record->event.pressed) {
194 #ifdef AUDIO_ENABLE
195 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
196 #endif
197 persistent_default_layer_set(1UL<<_DVORAK);
198 }
199 return false;
200 break;
201 case LOWER:
202 if (record->event.pressed) {
203 layer_on(_LOWER);
204 update_tri_layer(_LOWER, _RAISE, _ADJUST);
205 } else {
206 layer_off(_LOWER);
207 update_tri_layer(_LOWER, _RAISE, _ADJUST);
208 }
209 return false;
210 break;
211 case RAISE:
212 if (record->event.pressed) {
213 layer_on(_RAISE);
214 update_tri_layer(_LOWER, _RAISE, _ADJUST);
215 } else {
216 layer_off(_RAISE);
217 update_tri_layer(_LOWER, _RAISE, _ADJUST);
218 }
219 return false;
220 break;
221 case ADJUST:
222 if (record->event.pressed) {
223 layer_on(_ADJUST);
224 } else {
225 layer_off(_ADJUST);
226 }
227 return false;
228 break;
229 }
230 return true;
231} \ No newline at end of file
diff --git a/keyboards/nyquist/keymaps/serial/config.h b/keyboards/nyquist/keymaps/serial/config.h
new file mode 100644
index 000000000..ff79b6fb9
--- /dev/null
+++ b/keyboards/nyquist/keymaps/serial/config.h
@@ -0,0 +1,26 @@
1/*
2Copyright 2017 Danny Nguyen <danny@hexwire.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#define USE_SERIAL
19
20#define MASTER_LEFT
21// #define _MASTER_RIGHT
22// #define EE_HANDS
23
24#ifdef SUBPROJECT_rev1
25 #include "../../rev1/config.h"
26#endif
diff --git a/keyboards/nyquist/keymaps/serial/keymap.c b/keyboards/nyquist/keymaps/serial/keymap.c
new file mode 100644
index 000000000..dcb68a6e0
--- /dev/null
+++ b/keyboards/nyquist/keymaps/serial/keymap.c
@@ -0,0 +1,232 @@
1#include "nyquist.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _QWERTY 0
12#define _COLEMAK 1
13#define _DVORAK 2
14#define _LOWER 3
15#define _RAISE 4
16#define _ADJUST 16
17
18enum custom_keycodes {
19 QWERTY = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE,
24 ADJUST,
25};
26
27// Fillers to make layering more clear
28#define _______ KC_TRNS
29#define XXXXXXX KC_NO
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33/* Qwerty
34 * ,-----------------------------------------------------------------------------------.
35 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
36 * |------+------+------+------+------+------+------+------+------+------+------+------|
37 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
38 * |------+------+------+------+------+-------------+------+------+------+------+------|
39 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
40 * |------+------+------+------+------+------|------+------+------+------+------+------|
41 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
42 * |------+------+------+------+------+------+------+------+------+------+------+------|
43 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
44 * `-----------------------------------------------------------------------------------'
45 */
46[_QWERTY] = KEYMAP( \
47 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
48 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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
50 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
51 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
52),
53
54/* Colemak
55 * ,-----------------------------------------------------------------------------------.
56 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
57 * |------+------+------+------+------+------+------+------+------+------+------+------|
58 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
59 * |------+------+------+------+------+-------------+------+------+------+------+------|
60 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
61 * |------+------+------+------+------+------|------+------+------+------+------+------|
62 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
63 * |------+------+------+------+------+------+------+------+------+------+------+------|
64 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
65 * `-----------------------------------------------------------------------------------'
66 */
67[_COLEMAK] = KEYMAP( \
68 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_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_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 , \
72 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
73),
74
75/* Dvorak
76 * ,-----------------------------------------------------------------------------------.
77 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
78 * |------+------+------+------+------+------+------+------+------+------+------+------|
79 * | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
80 * |------+------+------+------+------+-------------+------+------+------+------+------|
81 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
82 * |------+------+------+------+------+------|------+------+------+------+------+------|
83 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
84 * |------+------+------+------+------+------+------+------+------+------+------+------|
85 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
86 * `-----------------------------------------------------------------------------------'
87 */
88[_DVORAK] = KEYMAP( \
89 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
90 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
91 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
92 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
93 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
94),
95
96/* Lower
97 * ,-----------------------------------------------------------------------------------.
98 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
99 * |------+------+------+------+------+-------------+------+------+------+------+------|
100 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
101 * |------+------+------+------+------+-------------+------+------+------+------+------|
102 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
103 * |------+------+------+------+------+------|------+------+------+------+------+------|
104 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
105 * |------+------+------+------+------+------+------+------+------+------+------+------|
106 * | | | | | | | | Next | Vol- | Vol+ | Play |
107 * `-----------------------------------------------------------------------------------'
108 */
109[_LOWER] = KEYMAP( \
110 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
111 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
113 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
114 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
115),
116
117/* Raise
118 * ,-----------------------------------------------------------------------------------.
119 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
120 * |------+------+------+------+------+-------------+------+------+------+------+------|
121 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
122 * |------+------+------+------+------+-------------+------+------+------+------+------|
123 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
124 * |------+------+------+------+------+------|------+------+------+------+------+------|
125 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
126 * |------+------+------+------+------+------+------+------+------+------+------+------|
127 * | | | | | | | | Next | Vol- | Vol+ | Play |
128 * `-----------------------------------------------------------------------------------'
129 */
130[_RAISE] = KEYMAP( \
131 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, KC_DEL, \
133 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
134 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
135 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
136),
137
138/* Adjust (Lower + Raise)
139 * ,-----------------------------------------------------------------------------------.
140 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
141 * |------+------+------+------+------+------+------+------+------+------+------+------|
142 * | | Reset| | | | | | | | | | Del |
143 * |------+------+------+------+------+-------------+------+------+------+------+------|
144 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
145 * |------+------+------+------+------+------|------+------+------+------+------+------|
146 * | | | | | | | | | | | | |
147 * |------+------+------+------+------+------+------+------+------+------+------+------|
148 * | | | | | | | | | | | |
149 * `-----------------------------------------------------------------------------------'
150 */
151[_ADJUST] = KEYMAP( \
152 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 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
154 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
155 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
156 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
157)
158
159
160};
161
162#ifdef AUDIO_ENABLE
163float tone_qwerty[][2] = SONG(QWERTY_SOUND);
164float tone_dvorak[][2] = SONG(DVORAK_SOUND);
165float tone_colemak[][2] = SONG(COLEMAK_SOUND);
166#endif
167
168void persistent_default_layer_set(uint16_t default_layer) {
169 eeconfig_update_default_layer(default_layer);
170 default_layer_set(default_layer);
171}
172
173bool process_record_user(uint16_t keycode, keyrecord_t *record) {
174 switch (keycode) {
175 case QWERTY:
176 if (record->event.pressed) {
177 #ifdef AUDIO_ENABLE
178 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
179 #endif
180 persistent_default_layer_set(1UL<<_QWERTY);
181 }
182 return false;
183 break;
184 case COLEMAK:
185 if (record->event.pressed) {
186 #ifdef AUDIO_ENABLE
187 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
188 #endif
189 persistent_default_layer_set(1UL<<_COLEMAK);
190 }
191 return false;
192 break;
193 case DVORAK:
194 if (record->event.pressed) {
195 #ifdef AUDIO_ENABLE
196 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
197 #endif
198 persistent_default_layer_set(1UL<<_DVORAK);
199 }
200 return false;
201 break;
202 case LOWER:
203 if (record->event.pressed) {
204 layer_on(_LOWER);
205 update_tri_layer(_LOWER, _RAISE, _ADJUST);
206 } else {
207 layer_off(_LOWER);
208 update_tri_layer(_LOWER, _RAISE, _ADJUST);
209 }
210 return false;
211 break;
212 case RAISE:
213 if (record->event.pressed) {
214 layer_on(_RAISE);
215 update_tri_layer(_LOWER, _RAISE, _ADJUST);
216 } else {
217 layer_off(_RAISE);
218 update_tri_layer(_LOWER, _RAISE, _ADJUST);
219 }
220 return false;
221 break;
222 case ADJUST:
223 if (record->event.pressed) {
224 layer_on(_ADJUST);
225 } else {
226 layer_off(_ADJUST);
227 }
228 return false;
229 break;
230 }
231 return true;
232} \ No newline at end of file
diff --git a/keyboards/nyquist/matrix.c b/keyboards/nyquist/matrix.c
new file mode 100644
index 000000000..dcb94c67c
--- /dev/null
+++ b/keyboards/nyquist/matrix.c
@@ -0,0 +1,316 @@
1/*
2Copyright 2017 Danny Nguyen <danny@hexwire.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 * scan matrix
20 */
21#include <stdint.h>
22#include <stdbool.h>
23#include <avr/io.h>
24#include <avr/wdt.h>
25#include <avr/interrupt.h>
26#include <util/delay.h>
27#include "print.h"
28#include "debug.h"
29#include "util.h"
30#include "matrix.h"
31#include "split_util.h"
32#include "pro_micro.h"
33#include "config.h"
34
35#ifdef USE_I2C
36# include "i2c.h"
37#else // USE_SERIAL
38# include "serial.h"
39#endif
40
41#ifndef DEBOUNCE
42# define DEBOUNCE 5
43#endif
44
45#define ERROR_DISCONNECT_COUNT 5
46
47static uint8_t debouncing = DEBOUNCE;
48static const int ROWS_PER_HAND = MATRIX_ROWS/2;
49static uint8_t error_count = 0;
50
51static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
52static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
53
54/* matrix state(1:on, 0:off) */
55static matrix_row_t matrix[MATRIX_ROWS];
56static matrix_row_t matrix_debouncing[MATRIX_ROWS];
57
58static matrix_row_t read_cols(void);
59static void init_cols(void);
60static void unselect_rows(void);
61static void select_row(uint8_t row);
62
63__attribute__ ((weak))
64void matrix_init_quantum(void) {
65 matrix_init_kb();
66}
67
68__attribute__ ((weak))
69void matrix_scan_quantum(void) {
70 matrix_scan_kb();
71}
72
73__attribute__ ((weak))
74void matrix_init_kb(void) {
75 matrix_init_user();
76}
77
78__attribute__ ((weak))
79void matrix_scan_kb(void) {
80 matrix_scan_user();
81}
82
83__attribute__ ((weak))
84void matrix_init_user(void) {
85}
86
87__attribute__ ((weak))
88void matrix_scan_user(void) {
89}
90
91inline
92uint8_t matrix_rows(void)
93{
94 return MATRIX_ROWS;
95}
96
97inline
98uint8_t matrix_cols(void)
99{
100 return MATRIX_COLS;
101}
102
103void matrix_init(void)
104{
105 debug_enable = true;
106 debug_matrix = true;
107 debug_mouse = true;
108 // initialize row and col
109 unselect_rows();
110 init_cols();
111
112 TX_RX_LED_INIT;
113
114 // initialize matrix state: all keys off
115 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
116 matrix[i] = 0;
117 matrix_debouncing[i] = 0;
118 }
119
120 matrix_init_quantum();
121}
122
123uint8_t _matrix_scan(void)
124{
125 // Right hand is stored after the left in the matirx so, we need to offset it
126 int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
127
128 for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
129 select_row(i);
130 _delay_us(30); // without this wait read unstable value.
131 matrix_row_t cols = read_cols();
132 if (matrix_debouncing[i+offset] != cols) {
133 matrix_debouncing[i+offset] = cols;
134 debouncing = DEBOUNCE;
135 }
136 unselect_rows();
137 }
138
139 if (debouncing) {
140 if (--debouncing) {
141 _delay_ms(1);
142 } else {
143 for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
144 matrix[i+offset] = matrix_debouncing[i+offset];
145 }
146 }
147 }
148
149 return 1;
150}
151
152#ifdef USE_I2C
153
154// Get rows from other half over i2c
155int i2c_transaction(void) {
156 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
157
158 int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
159 if (err) goto i2c_error;
160
161 // start of matrix stored at 0x00
162 err = i2c_master_write(0x00);
163 if (err) goto i2c_error;
164
165 // Start read
166 err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
167 if (err) goto i2c_error;
168
169 if (!err) {
170 int i;
171 for (i = 0; i < ROWS_PER_HAND-1; ++i) {
172 matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
173 }
174 matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
175 i2c_master_stop();
176 } else {
177i2c_error: // the cable is disconnceted, or something else went wrong
178 i2c_reset_state();
179 return err;
180 }
181
182 return 0;
183}
184
185#else // USE_SERIAL
186
187int serial_transaction(void) {
188 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
189
190 if (serial_update_buffers()) {
191 return 1;
192 }
193
194 for (int i = 0; i < ROWS_PER_HAND; ++i) {
195 matrix[slaveOffset+i] = serial_slave_buffer[i];
196 }
197 return 0;
198}
199#endif
200
201uint8_t matrix_scan(void)
202{
203 int ret = _matrix_scan();
204
205
206
207#ifdef USE_I2C
208 if( i2c_transaction() ) {
209#else // USE_SERIAL
210 if( serial_transaction() ) {
211#endif
212 // turn on the indicator led when halves are disconnected
213 TXLED1;
214
215 error_count++;
216
217 if (error_count > ERROR_DISCONNECT_COUNT) {
218 // reset other half if disconnected
219 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
220 for (int i = 0; i < ROWS_PER_HAND; ++i) {
221 matrix[slaveOffset+i] = 0;
222 }
223 }
224 } else {
225 // turn off the indicator led on no error
226 TXLED0;
227 error_count = 0;
228 }
229 matrix_scan_quantum();
230 return ret;
231}
232
233void matrix_slave_scan(void) {
234 _matrix_scan();
235
236 int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2);
237
238#ifdef USE_I2C
239 for (int i = 0; i < ROWS_PER_HAND; ++i) {
240 /* i2c_slave_buffer[i] = matrix[offset+i]; */
241 i2c_slave_buffer[i] = matrix[offset+i];
242 }
243#else // USE_SERIAL
244 for (int i = 0; i < ROWS_PER_HAND; ++i) {
245 serial_slave_buffer[i] = matrix[offset+i];
246 }
247#endif
248}
249
250bool matrix_is_modified(void)
251{
252 if (debouncing) return false;
253 return true;
254}
255
256inline
257bool matrix_is_on(uint8_t row, uint8_t col)
258{
259 return (matrix[row] & ((matrix_row_t)1<<col));
260}
261
262inline
263matrix_row_t matrix_get_row(uint8_t row)
264{
265 return matrix[row];
266}
267
268void matrix_print(void)
269{
270 print("\nr/c 0123456789ABCDEF\n");
271 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
272 phex(row); print(": ");
273 pbin_reverse16(matrix_get_row(row));
274 print("\n");
275 }
276}
277
278uint8_t matrix_key_count(void)
279{
280 uint8_t count = 0;
281 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
282 count += bitpop16(matrix[i]);
283 }
284 return count;
285}
286
287static void init_cols(void)
288{
289 for(int x = 0; x < MATRIX_COLS; x++) {
290 _SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF);
291 _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF);
292 }
293}
294
295static matrix_row_t read_cols(void)
296{
297 matrix_row_t result = 0;
298 for(int x = 0; x < MATRIX_COLS; x++) {
299 result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
300 }
301 return result;
302}
303
304static void unselect_rows(void)
305{
306 for(int x = 0; x < ROWS_PER_HAND; x++) {
307 _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF);
308 _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
309 }
310}
311
312static void select_row(uint8_t row)
313{
314 _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF);
315 _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF);
316}
diff --git a/keyboards/nyquist/nyquist.c b/keyboards/nyquist/nyquist.c
new file mode 100644
index 000000000..2face09d4
--- /dev/null
+++ b/keyboards/nyquist/nyquist.c
@@ -0,0 +1 @@
#include "nyquist.h"
diff --git a/keyboards/nyquist/nyquist.h b/keyboards/nyquist/nyquist.h
new file mode 100644
index 000000000..e8cccecf5
--- /dev/null
+++ b/keyboards/nyquist/nyquist.h
@@ -0,0 +1,26 @@
1#ifndef NYQUIST_H
2#define NYQUIST_H
3
4#ifdef SUBPROJECT_rev1
5 #include "rev1.h"
6#endif
7
8// Used to create a keymap using only KC_ prefixed keys
9#define KC_KEYMAP( \
10 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
11 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
12 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
13 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
14 L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
15 ) \
16 KEYMAP( \
17 KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
18 KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
19 KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
20 KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
21 KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
22 )
23
24#include "quantum.h"
25
26#endif \ No newline at end of file
diff --git a/keyboards/nyquist/pro_micro.h b/keyboards/nyquist/pro_micro.h
new file mode 100644
index 000000000..f9e7ed75d
--- /dev/null
+++ b/keyboards/nyquist/pro_micro.h
@@ -0,0 +1,362 @@
1/*
2 pins_arduino.h - Pin definition functions for Arduino
3 Part of Arduino - http://www.arduino.cc/
4
5 Copyright (c) 2007 David A. Mellis
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General
18 Public License along with this library; if not, write to the
19 Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20 Boston, MA 02111-1307 USA
21
22 $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
23*/
24
25#ifndef Pins_Arduino_h
26#define Pins_Arduino_h
27
28#include <avr/pgmspace.h>
29
30// Workaround for wrong definitions in "iom32u4.h".
31// This should be fixed in the AVR toolchain.
32#undef UHCON
33#undef UHINT
34#undef UHIEN
35#undef UHADDR
36#undef UHFNUM
37#undef UHFNUML
38#undef UHFNUMH
39#undef UHFLEN
40#undef UPINRQX
41#undef UPINTX
42#undef UPNUM
43#undef UPRST
44#undef UPCONX
45#undef UPCFG0X
46#undef UPCFG1X
47#undef UPSTAX
48#undef UPCFG2X
49#undef UPIENX
50#undef UPDATX
51#undef TCCR2A
52#undef WGM20
53#undef WGM21
54#undef COM2B0
55#undef COM2B1
56#undef COM2A0
57#undef COM2A1
58#undef TCCR2B
59#undef CS20
60#undef CS21
61#undef CS22
62#undef WGM22
63#undef FOC2B
64#undef FOC2A
65#undef TCNT2
66#undef TCNT2_0
67#undef TCNT2_1
68#undef TCNT2_2
69#undef TCNT2_3
70#undef TCNT2_4
71#undef TCNT2_5
72#undef TCNT2_6
73#undef TCNT2_7
74#undef OCR2A
75#undef OCR2_0
76#undef OCR2_1
77#undef OCR2_2
78#undef OCR2_3
79#undef OCR2_4
80#undef OCR2_5
81#undef OCR2_6
82#undef OCR2_7
83#undef OCR2B
84#undef OCR2_0
85#undef OCR2_1
86#undef OCR2_2
87#undef OCR2_3
88#undef OCR2_4
89#undef OCR2_5
90#undef OCR2_6
91#undef OCR2_7
92
93#define NUM_DIGITAL_PINS 30
94#define NUM_ANALOG_INPUTS 12
95
96#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
97#define TXLED0 PORTD |= (1<<5)
98#define TXLED1 PORTD &= ~(1<<5)
99#define RXLED0 PORTB |= (1<<0)
100#define RXLED1 PORTB &= ~(1<<0)
101
102static const uint8_t SDA = 2;
103static const uint8_t SCL = 3;
104#define LED_BUILTIN 13
105
106// Map SPI port to 'new' pins D14..D17
107static const uint8_t SS = 17;
108static const uint8_t MOSI = 16;
109static const uint8_t MISO = 14;
110static const uint8_t SCK = 15;
111
112// Mapping of analog pins as digital I/O
113// A6-A11 share with digital pins
114static const uint8_t ADC0 = 18;
115static const uint8_t ADC1 = 19;
116static const uint8_t ADC2 = 20;
117static const uint8_t ADC3 = 21;
118static const uint8_t ADC4 = 22;
119static const uint8_t ADC5 = 23;
120static const uint8_t ADC6 = 24; // D4
121static const uint8_t ADC7 = 25; // D6
122static const uint8_t ADC8 = 26; // D8
123static const uint8_t ADC9 = 27; // D9
124static const uint8_t ADC10 = 28; // D10
125static const uint8_t ADC11 = 29; // D12
126
127#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
128#define digitalPinToPCICRbit(p) 0
129#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
130#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))
131
132// __AVR_ATmega32U4__ has an unusual mapping of pins to channels
133extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
134#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
135
136#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
137
138#ifdef ARDUINO_MAIN
139
140// On the Arduino board, digital pins are also used
141// for the analog output (software PWM). Analog input
142// pins are a separate set.
143
144// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
145//
146// D0 PD2 RXD1/INT2
147// D1 PD3 TXD1/INT3
148// D2 PD1 SDA SDA/INT1
149// D3# PD0 PWM8/SCL OC0B/SCL/INT0
150// D4 A6 PD4 ADC8
151// D5# PC6 ??? OC3A/#OC4A
152// D6# A7 PD7 FastPWM #OC4D/ADC10
153// D7 PE6 INT6/AIN0
154//
155// D8 A8 PB4 ADC11/PCINT4
156// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
157// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
158// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7
159// D12 A11 PD6 T1/#OC4D/ADC9
160// D13# PC7 PWM10 CLK0/OC4A
161//
162// A0 D18 PF7 ADC7
163// A1 D19 PF6 ADC6
164// A2 D20 PF5 ADC5
165// A3 D21 PF4 ADC4
166// A4 D22 PF1 ADC1
167// A5 D23 PF0 ADC0
168//
169// New pins D14..D17 to map SPI port to digital pins
170//
171// MISO D14 PB3 MISO,PCINT3
172// SCK D15 PB1 SCK,PCINT1
173// MOSI D16 PB2 MOSI,PCINT2
174// SS D17 PB0 RXLED,SS/PCINT0
175//
176// Connected LEDs on board for TX and RX
177// TXLED D24 PD5 XCK1
178// RXLED D17 PB0
179// HWB PE2 HWB
180
181// these arrays map port names (e.g. port B) to the
182// appropriate addresses for various functions (e.g. reading
183// and writing)
184const uint16_t PROGMEM port_to_mode_PGM[] = {
185 NOT_A_PORT,
186 NOT_A_PORT,
187 (uint16_t) &DDRB,
188 (uint16_t) &DDRC,
189 (uint16_t) &DDRD,
190 (uint16_t) &DDRE,
191 (uint16_t) &DDRF,
192};
193
194const uint16_t PROGMEM port_to_output_PGM[] = {
195 NOT_A_PORT,
196 NOT_A_PORT,
197 (uint16_t) &PORTB,
198 (uint16_t) &PORTC,
199 (uint16_t) &PORTD,
200 (uint16_t) &PORTE,
201 (uint16_t) &PORTF,
202};
203
204const uint16_t PROGMEM port_to_input_PGM[] = {
205 NOT_A_PORT,
206 NOT_A_PORT,
207 (uint16_t) &PINB,
208 (uint16_t) &PINC,
209 (uint16_t) &PIND,
210 (uint16_t) &PINE,
211 (uint16_t) &PINF,
212};
213
214const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
215 PD, // D0 - PD2
216 PD, // D1 - PD3
217 PD, // D2 - PD1
218 PD, // D3 - PD0
219 PD, // D4 - PD4
220 PC, // D5 - PC6
221 PD, // D6 - PD7
222 PE, // D7 - PE6
223
224 PB, // D8 - PB4
225 PB, // D9 - PB5
226 PB, // D10 - PB6
227 PB, // D11 - PB7
228 PD, // D12 - PD6
229 PC, // D13 - PC7
230
231 PB, // D14 - MISO - PB3
232 PB, // D15 - SCK - PB1
233 PB, // D16 - MOSI - PB2
234 PB, // D17 - SS - PB0
235
236 PF, // D18 - A0 - PF7
237 PF, // D19 - A1 - PF6
238 PF, // D20 - A2 - PF5
239 PF, // D21 - A3 - PF4
240 PF, // D22 - A4 - PF1
241 PF, // D23 - A5 - PF0
242
243 PD, // D24 - PD5
244 PD, // D25 / D6 - A7 - PD7
245 PB, // D26 / D8 - A8 - PB4
246 PB, // D27 / D9 - A9 - PB5
247 PB, // D28 / D10 - A10 - PB6
248 PD, // D29 / D12 - A11 - PD6
249};
250
251const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
252 _BV(2), // D0 - PD2
253 _BV(3), // D1 - PD3
254 _BV(1), // D2 - PD1
255 _BV(0), // D3 - PD0
256 _BV(4), // D4 - PD4
257 _BV(6), // D5 - PC6
258 _BV(7), // D6 - PD7
259 _BV(6), // D7 - PE6
260
261 _BV(4), // D8 - PB4
262 _BV(5), // D9 - PB5
263 _BV(6), // D10 - PB6
264 _BV(7), // D11 - PB7
265 _BV(6), // D12 - PD6
266 _BV(7), // D13 - PC7
267
268 _BV(3), // D14 - MISO - PB3
269 _BV(1), // D15 - SCK - PB1
270 _BV(2), // D16 - MOSI - PB2
271 _BV(0), // D17 - SS - PB0
272
273 _BV(7), // D18 - A0 - PF7
274 _BV(6), // D19 - A1 - PF6
275 _BV(5), // D20 - A2 - PF5
276 _BV(4), // D21 - A3 - PF4
277 _BV(1), // D22 - A4 - PF1
278 _BV(0), // D23 - A5 - PF0
279
280 _BV(5), // D24 - PD5
281 _BV(7), // D25 / D6 - A7 - PD7
282 _BV(4), // D26 / D8 - A8 - PB4
283 _BV(5), // D27 / D9 - A9 - PB5
284 _BV(6), // D28 / D10 - A10 - PB6
285 _BV(6), // D29 / D12 - A11 - PD6
286};
287
288const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
289 NOT_ON_TIMER,
290 NOT_ON_TIMER,
291 NOT_ON_TIMER,
292 TIMER0B, /* 3 */
293 NOT_ON_TIMER,
294 TIMER3A, /* 5 */
295 TIMER4D, /* 6 */
296 NOT_ON_TIMER,
297
298 NOT_ON_TIMER,
299 TIMER1A, /* 9 */
300 TIMER1B, /* 10 */
301 TIMER0A, /* 11 */
302
303 NOT_ON_TIMER,
304 TIMER4A, /* 13 */
305
306 NOT_ON_TIMER,
307 NOT_ON_TIMER,
308 NOT_ON_TIMER,
309 NOT_ON_TIMER,
310 NOT_ON_TIMER,
311 NOT_ON_TIMER,
312
313 NOT_ON_TIMER,
314 NOT_ON_TIMER,
315 NOT_ON_TIMER,
316 NOT_ON_TIMER,
317 NOT_ON_TIMER,
318 NOT_ON_TIMER,
319 NOT_ON_TIMER,
320 NOT_ON_TIMER,
321 NOT_ON_TIMER,
322 NOT_ON_TIMER,
323};
324
325const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
326 7, // A0 PF7 ADC7
327 6, // A1 PF6 ADC6
328 5, // A2 PF5 ADC5
329 4, // A3 PF4 ADC4
330 1, // A4 PF1 ADC1
331 0, // A5 PF0 ADC0
332 8, // A6 D4 PD4 ADC8
333 10, // A7 D6 PD7 ADC10
334 11, // A8 D8 PB4 ADC11
335 12, // A9 D9 PB5 ADC12
336 13, // A10 D10 PB6 ADC13
337 9 // A11 D12 PD6 ADC9
338};
339
340#endif /* ARDUINO_MAIN */
341
342// These serial port names are intended to allow libraries and architecture-neutral
343// sketches to automatically default to the correct port name for a particular type
344// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
345// the first hardware serial port whose RX/TX pins are not dedicated to another use.
346//
347// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
348//
349// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
350//
351// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
352//
353// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
354//
355// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
356// pins are NOT connected to anything by default.
357#define SERIAL_PORT_MONITOR Serial
358#define SERIAL_PORT_USBVIRTUAL Serial
359#define SERIAL_PORT_HARDWARE Serial1
360#define SERIAL_PORT_HARDWARE_OPEN Serial1
361
362#endif /* Pins_Arduino_h */
diff --git a/keyboards/nyquist/readme.md b/keyboards/nyquist/readme.md
new file mode 100644
index 000000000..c70bf0257
--- /dev/null
+++ b/keyboards/nyquist/readme.md
@@ -0,0 +1,167 @@
1The Nyquist Keyboard
2====================
3
4The Nyquist is a 60% split ortholinear board by [Keebio](https://keeb.io). It has been designed in a similar manner to the Let's Split v2 by /u/wootpatoot. Each half of the keyboard is arranged in a 5x6 grid. There is an option to use a 2u key with PCB mounted MX stablizers, in place of the two innermost 1u keys on the bottom row.
5
6
7## Build Guide
8
9Since the design is very similar to the Let's Split v2, the build guide for that can be used while the build guide for the Nyquist is being fully developed. A 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)
10
11There is additional information there about flashing and adding RGB underglow.
12
13## First Time Setup
14
15Download or clone the whole firmware and navigate to the keyboards/nyquist directory. Once your development environment is setup, you'll be able to generate the default .hex using:
16
17```
18$ make serial
19```
20
21You will see a lot of output and if everything worked correctly you will see the built hex file:
22
23```
24nyquist_rev1_serial.hex
25```
26
27If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so:
28
29
30```
31$ make YOUR_KEYMAP_NAME
32```
33
34If everything worked correctly you will see a file:
35
36```
37nyquist_rev1_YOUR_KEYMAP_NAME.hex
38```
39
40For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md.
41
42Features
43--------
44
45For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md).
46
47Some features supported by the firmware:
48
49* Either half can connect to the computer via USB, or both halves can be used
50 independently.
51* You only need 3 wires to connect the two halves. Two for VCC and GND and one
52 for serial communication.
53* Optional support for I2C connection between the two halves if for some
54 reason you require a faster connection between the two halves. Note this
55 requires an extra wire between halves and pull-up resistors on the data lines.
56
57### 2u Support
58In place of the two innermost 1u keys on the bottom row, a single 2u key can be used. If you choose to use this option, then in your keymap, set the innermost key on the bottom row to what you want the 2u key to be. For example, if using the 2u key on the left half of the board, set the keycode for the lower right key.
59
60Required Hardware
61-----------------
62
63Apart from diodes and key switches for the keyboard matrix in each half, you
64will need:
65
66* 2 Arduino Pro Micro's. You can find theses on aliexpress for ≈3.50USD each.
67* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable
68
69Alternatively, you can use any sort of cable and socket that has at least 3
70wires. If you want to use I2C to communicate between halves, you will need a
71cable with at least 4 wires and 2x 4.7kΩ pull-up resistors
72
73Optional Hardware
74-----------------
75
76A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`.
77
78Wiring
79------
80
81The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e.
82PD0 on the ATmega32u4) between the two Pro Micros.
83
84Then wire your key matrix to any of the remaining 17 IO pins of the pro micro
85and modify the `matrix.c` accordingly.
86
87The wiring for serial:
88
89![serial wiring](http://imgur.com/BnCGU1Y)
90
91The wiring for i2c:
92
93![i2c wiring](http://imgur.com/5eiArDA)
94
95The pull-up resistors may be placed on either half. It is also possible
96to use 4 resistors and have the pull-ups in both halves, but this is
97unnecessary in simple use cases.
98
99Flashing
100-------
101From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing.
102Example: `make rev1-serial-avrdude`
103
104
105Choosing which board to plug the USB cable into (choosing Master)
106--------
107Because the two boards are identical, the firmware has logic to differentiate the left and right board.
108
109It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable.
110
111The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side.
112
113The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra.
114
115### Setting the left hand as master
116If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set.
117
118### Setting the right hand as master
119If you always plug the usb cable into the right board, add an extra flag to your `config.h`
120```
121 #define MASTER_RIGHT
122```
123
124### Setting EE_hands to use either hands as master
125If you define `EE_HANDS` in your `config.h`, you will need to set the
126EEPROM for the left and right halves.
127
128The EEPROM is used to store whether the
129half is left handed or right handed. This makes it so that the same firmware
130file will run on both hands instead of having to flash left and right handed
131versions of the firmware to each half. To flash the EEPROM file for the left
132half run:
133```
134avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep
135// or the equivalent in dfu-programmer
136
137```
138and similarly for right half
139```
140avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep
141// or the equivalent in dfu-programmer
142```
143
144NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`)
145
146After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash.
147
148Note that you need to program both halves, but you have the option of using
149different keymaps for each half. You could program the left half with a QWERTY
150layout and the right half with a Colemak layout using bootmagic's default layout option.
151Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the
152right half is connected.
153
154
155Notes on Using Pro Micro 3.3V
156-----------------------------
157
158Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects
159the frequency on the 3.3V board.
160
161Also, if the slave board is producing weird characters in certain columns,
162update the following line in `matrix.c` to the following:
163
164```
165// _delay_us(30); // without this wait read unstable value.
166_delay_us(300); // without this wait read unstable value.
167```
diff --git a/keyboards/nyquist/rev1/Makefile b/keyboards/nyquist/rev1/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/nyquist/rev1/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/nyquist/rev1/config.h b/keyboards/nyquist/rev1/config.h
new file mode 100644
index 000000000..c2907cf5d
--- /dev/null
+++ b/keyboards/nyquist/rev1/config.h
@@ -0,0 +1,89 @@
1/*
2Copyright 2017 Danny Nguyen <danny@hexwire.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 0xCEEB
25#define PRODUCT_ID 0x1156
26#define DEVICE_VER 0x0100
27#define MANUFACTURER Keebio
28#define PRODUCT The Nyquist Keyboard
29#define DESCRIPTION Split 60 percent ortholinear keyboard
30
31/* key matrix size */
32// Rows are doubled-up
33#define MATRIX_ROWS 10
34#define MATRIX_COLS 6
35
36// wiring of each half
37#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 }
38#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
39
40#define CATERINA_BOOTLOADER
41
42/* COL2ROW or ROW2COL */
43#define DIODE_DIRECTION COL2ROW
44
45/* define if matrix has ghost */
46//#define MATRIX_HAS_GHOST
47
48/* number of backlight levels */
49// #define BACKLIGHT_LEVELS 3
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/* Locking resynchronize hack */
57#define LOCKING_RESYNC_ENABLE
58
59/* key combination for command */
60#define IS_COMMAND() ( \
61 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
62)
63
64/* ws2812 RGB LED */
65#define RGB_DI_PIN D3
66#define RGBLIGHT_TIMER
67#define RGBLED_NUM 16 // Number of LEDs
68#define ws2812_PORTREG PORTD
69#define ws2812_DDRREG DDRD
70
71/*
72 * Feature disable options
73 * These options are also useful to firmware size reduction.
74 */
75
76/* disable debug print */
77// #define NO_DEBUG
78
79/* disable print */
80// #define NO_PRINT
81
82/* disable action features */
83//#define NO_ACTION_LAYER
84//#define NO_ACTION_TAPPING
85//#define NO_ACTION_ONESHOT
86//#define NO_ACTION_MACRO
87//#define NO_ACTION_FUNCTION
88
89#endif
diff --git a/keyboards/nyquist/rev1/rev1.c b/keyboards/nyquist/rev1/rev1.c
new file mode 100644
index 000000000..fc984e18c
--- /dev/null
+++ b/keyboards/nyquist/rev1/rev1.c
@@ -0,0 +1,39 @@
1#include "nyquist.h"
2
3#ifdef AUDIO_ENABLE
4 float tone_startup[][2] = SONG(STARTUP_SOUND);
5 float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
6#endif
7
8#ifdef SSD1306OLED
9void led_set_kb(uint8_t usb_led) {
10 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
11 led_set_user(usb_led);
12}
13#endif
14
15void matrix_init_kb(void) {
16
17 #ifdef AUDIO_ENABLE
18 _delay_ms(20); // gets rid of tick
19 PLAY_NOTE_ARRAY(tone_startup, false, 0);
20 #endif
21
22 // // green led on
23 // DDRD |= (1<<5);
24 // PORTD &= ~(1<<5);
25
26 // // orange led on
27 // DDRB |= (1<<0);
28 // PORTB &= ~(1<<0);
29
30 matrix_init_user();
31};
32
33void shutdown_user(void) {
34 #ifdef AUDIO_ENABLE
35 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
36 _delay_ms(150);
37 stop_all_notes();
38 #endif
39}
diff --git a/keyboards/nyquist/rev1/rev1.h b/keyboards/nyquist/rev1/rev1.h
new file mode 100644
index 000000000..f2d0ece79
--- /dev/null
+++ b/keyboards/nyquist/rev1/rev1.h
@@ -0,0 +1,66 @@
1#ifndef REV1_H
2#define REV1_H
3
4#include "../nyquist.h"
5
6//void promicro_bootloader_jmp(bool program);
7#include "quantum.h"
8
9
10#ifdef USE_I2C
11#include <stddef.h>
12#ifdef __AVR__
13 #include <avr/io.h>
14 #include <avr/interrupt.h>
15#endif
16#endif
17
18//void promicro_bootloader_jmp(bool program);
19
20#ifndef FLIP_HALF
21// Standard Keymap
22// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
23#define KEYMAP( \
24 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
25 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
26 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
27 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
28 L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
29 ) \
30 { \
31 { L00, L01, L02, L03, L04, L05 }, \
32 { L10, L11, L12, L13, L14, L15 }, \
33 { L20, L21, L22, L23, L24, L25 }, \
34 { L30, L31, L32, L33, L34, L35 }, \
35 { L40, L41, L42, L43, L44, L45 }, \
36 { R05, R04, R03, R02, R01, R00 }, \
37 { R15, R14, R13, R12, R11, R10 }, \
38 { R25, R24, R23, R22, R21, R20 }, \
39 { R35, R34, R33, R32, R31, R30 }, \
40 { R45, R44, R43, R42, R41, R40 } \
41 }
42#else
43// Keymap with right side flipped
44// (TRRS jack on both halves are to the right)
45#define KEYMAP( \
46 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
47 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
48 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
49 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
50 L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
51 ) \
52 { \
53 { L00, L01, L02, L03, L04, L05 }, \
54 { L10, L11, L12, L13, L14, L15 }, \
55 { L20, L21, L22, L23, L24, L25 }, \
56 { L30, L31, L32, L33, L34, L35 }, \
57 { L40, L41, L42, L43, L44, L45 }, \
58 { R00, R01, R02, R03, R04, R05 }, \
59 { R10, R11, R12, R13, R14, R15 }, \
60 { R20, R21, R22, R23, R24, R25 }, \
61 { R30, R31, R32, R33, R34, R35 }, \
62 { R40, R41, R42, R43, R44, R45 } \
63 }
64#endif
65
66#endif
diff --git a/keyboards/nyquist/rev1/rules.mk b/keyboards/nyquist/rev1/rules.mk
new file mode 100644
index 000000000..80a942d06
--- /dev/null
+++ b/keyboards/nyquist/rev1/rules.mk
@@ -0,0 +1,5 @@
1BACKLIGHT_ENABLE = no
2
3ifndef QUANTUM_DIR
4 include ../../../Makefile
5endif
diff --git a/keyboards/nyquist/rules.mk b/keyboards/nyquist/rules.mk
new file mode 100644
index 000000000..0efa78550
--- /dev/null
+++ b/keyboards/nyquist/rules.mk
@@ -0,0 +1,87 @@
1SRC += matrix.c \
2 i2c.c \
3 split_util.c \
4 serial.c
5
6# MCU name
7#MCU = at90usb1287
8MCU = atmega32u4
9
10# Processor frequency.
11# This will define a symbol, F_CPU, in all source code files equal to the
12# processor frequency in Hz. You can then use this symbol in your source code to
13# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
14# automatically to create a 32-bit value in your source code.
15#
16# This will be an integer division of F_USB below, as it is sourced by
17# F_USB after it has run through any CPU prescalers. Note that this value
18# does not *change* the processor frequency - it should merely be updated to
19# reflect the processor speed set externally so that the code can use accurate
20# software delays.
21F_CPU = 16000000
22
23#
24# LUFA specific
25#
26# Target architecture (see library "Board Types" documentation).
27ARCH = AVR8
28
29# Input clock frequency.
30# This will define a symbol, F_USB, in all source code files equal to the
31# input clock frequency (before any prescaling is performed) in Hz. This value may
32# differ from F_CPU if prescaling is used on the latter, and is required as the
33# raw input clock is fed directly to the PLL sections of the AVR for high speed
34# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
35# at the end, this will be done automatically to create a 32-bit value in your
36# source code.
37#
38# If no clock division is performed on the input clock inside the AVR (via the
39# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
40F_USB = $(F_CPU)
41
42# Interrupt driven control endpoint task(+60)
43OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
44
45
46# Boot Section Size in *bytes*
47# Teensy halfKay 512
48# Teensy++ halfKay 1024
49# Atmel DFU loader 4096
50# LUFA bootloader 4096
51# USBaspLoader 2048
52OPT_DEFS += -DBOOTLOADER_SIZE=4096
53
54# Build Options
55# change to "no" to disable the options, or define them in the Makefile in
56# the appropriate keymap folder that will get included automatically
57#
58BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
59MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
60EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
61CONSOLE_ENABLE ?= no # Console for debug(+400)
62COMMAND_ENABLE ?= yes # Commands for debug and configuration
63NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
64BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
65MIDI_ENABLE ?= no # MIDI controls
66AUDIO_ENABLE ?= no # Audio output on port C6
67UNICODE_ENABLE ?= no # Unicode
68BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
69RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
70SUBPROJECT_rev1 ?= yes
71USE_I2C ?= yes
72# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
73SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
74
75CUSTOM_MATRIX = yes
76
77avrdude: build
78 ls /dev/tty* > /tmp/1; \
79 echo "Reset your Pro Micro now"; \
80 while [[ -z $$USB ]]; do \
81 sleep 1; \
82 ls /dev/tty* > /tmp/2; \
83 USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
84 done; \
85 avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
86
87.PHONY: avrdude
diff --git a/keyboards/nyquist/serial.c b/keyboards/nyquist/serial.c
new file mode 100644
index 000000000..6faed09ce
--- /dev/null
+++ b/keyboards/nyquist/serial.c
@@ -0,0 +1,228 @@
1/*
2 * WARNING: be careful changing this code, it is very timing dependent
3 */
4
5#ifndef F_CPU
6#define F_CPU 16000000
7#endif
8
9#include <avr/io.h>
10#include <avr/interrupt.h>
11#include <util/delay.h>
12#include <stdbool.h>
13#include "serial.h"
14
15#ifdef USE_SERIAL
16
17// Serial pulse period in microseconds. Its probably a bad idea to lower this
18// value.
19#define SERIAL_DELAY 24
20
21uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
22uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
23
24#define SLAVE_DATA_CORRUPT (1<<0)
25volatile uint8_t status = 0;
26
27inline static
28void serial_delay(void) {
29 _delay_us(SERIAL_DELAY);
30}
31
32inline static
33void serial_output(void) {
34 SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
35}
36
37// make the serial pin an input with pull-up resistor
38inline static
39void serial_input(void) {
40 SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
41 SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
42}
43
44inline static
45uint8_t serial_read_pin(void) {
46 return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
47}
48
49inline static
50void serial_low(void) {
51 SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
52}
53
54inline static
55void serial_high(void) {
56 SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
57}
58
59void serial_master_init(void) {
60 serial_output();
61 serial_high();
62}
63
64void serial_slave_init(void) {
65 serial_input();
66
67 // Enable INT0
68 EIMSK |= _BV(INT0);
69 // Trigger on falling edge of INT0
70 EICRA &= ~(_BV(ISC00) | _BV(ISC01));
71}
72
73// Used by the master to synchronize timing with the slave.
74static
75void sync_recv(void) {
76 serial_input();
77 // This shouldn't hang if the slave disconnects because the
78 // serial line will float to high if the slave does disconnect.
79 while (!serial_read_pin());
80 serial_delay();
81}
82
83// Used by the slave to send a synchronization signal to the master.
84static
85void sync_send(void) {
86 serial_output();
87
88 serial_low();
89 serial_delay();
90
91 serial_high();
92}
93
94// Reads a byte from the serial line
95static
96uint8_t serial_read_byte(void) {
97 uint8_t byte = 0;
98 serial_input();
99 for ( uint8_t i = 0; i < 8; ++i) {
100 byte = (byte << 1) | serial_read_pin();
101 serial_delay();
102 _delay_us(1);
103 }
104
105 return byte;
106}
107
108// Sends a byte with MSB ordering
109static
110void serial_write_byte(uint8_t data) {
111 uint8_t b = 8;
112 serial_output();
113 while( b-- ) {
114 if(data & (1 << b)) {
115 serial_high();
116 } else {
117 serial_low();
118 }
119 serial_delay();
120 }
121}
122
123// interrupt handle to be used by the slave device
124ISR(SERIAL_PIN_INTERRUPT) {
125 sync_send();
126
127 uint8_t checksum = 0;
128 for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
129 serial_write_byte(serial_slave_buffer[i]);
130 sync_send();
131 checksum += serial_slave_buffer[i];
132 }
133 serial_write_byte(checksum);
134 sync_send();
135
136 // wait for the sync to finish sending
137 serial_delay();
138
139 // read the middle of pulses
140 _delay_us(SERIAL_DELAY/2);
141
142 uint8_t checksum_computed = 0;
143 for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
144 serial_master_buffer[i] = serial_read_byte();
145 sync_send();
146 checksum_computed += serial_master_buffer[i];
147 }
148 uint8_t checksum_received = serial_read_byte();
149 sync_send();
150
151 serial_input(); // end transaction
152
153 if ( checksum_computed != checksum_received ) {
154 status |= SLAVE_DATA_CORRUPT;
155 } else {
156 status &= ~SLAVE_DATA_CORRUPT;
157 }
158}
159
160inline
161bool serial_slave_DATA_CORRUPT(void) {
162 return status & SLAVE_DATA_CORRUPT;
163}
164
165// Copies the serial_slave_buffer to the master and sends the
166// serial_master_buffer to the slave.
167//
168// Returns:
169// 0 => no error
170// 1 => slave did not respond
171int serial_update_buffers(void) {
172 // this code is very time dependent, so we need to disable interrupts
173 cli();
174
175 // signal to the slave that we want to start a transaction
176 serial_output();
177 serial_low();
178 _delay_us(1);
179
180 // wait for the slaves response
181 serial_input();
182 serial_high();
183 _delay_us(SERIAL_DELAY);
184
185 // check if the slave is present
186 if (serial_read_pin()) {
187 // slave failed to pull the line low, assume not present
188 sei();
189 return 1;
190 }
191
192 // if the slave is present syncronize with it
193 sync_recv();
194
195 uint8_t checksum_computed = 0;
196 // receive data from the slave
197 for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
198 serial_slave_buffer[i] = serial_read_byte();
199 sync_recv();
200 checksum_computed += serial_slave_buffer[i];
201 }
202 uint8_t checksum_received = serial_read_byte();
203 sync_recv();
204
205 if (checksum_computed != checksum_received) {
206 sei();
207 return 1;
208 }
209
210 uint8_t checksum = 0;
211 // send data to the slave
212 for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
213 serial_write_byte(serial_master_buffer[i]);
214 sync_recv();
215 checksum += serial_master_buffer[i];
216 }
217 serial_write_byte(checksum);
218 sync_recv();
219
220 // always, release the line when not in use
221 serial_output();
222 serial_high();
223
224 sei();
225 return 0;
226}
227
228#endif
diff --git a/keyboards/nyquist/serial.h b/keyboards/nyquist/serial.h
new file mode 100644
index 000000000..15fe4db7b
--- /dev/null
+++ b/keyboards/nyquist/serial.h
@@ -0,0 +1,26 @@
1#ifndef MY_SERIAL_H
2#define MY_SERIAL_H
3
4#include "config.h"
5#include <stdbool.h>
6
7/* TODO: some defines for interrupt setup */
8#define SERIAL_PIN_DDR DDRD
9#define SERIAL_PIN_PORT PORTD
10#define SERIAL_PIN_INPUT PIND
11#define SERIAL_PIN_MASK _BV(PD0)
12#define SERIAL_PIN_INTERRUPT INT0_vect
13
14#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
15#define SERIAL_MASTER_BUFFER_LENGTH 1
16
17// Buffers for master - slave communication
18extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
19extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
20
21void serial_master_init(void);
22void serial_slave_init(void);
23int serial_update_buffers(void);
24bool serial_slave_data_corrupt(void);
25
26#endif
diff --git a/keyboards/nyquist/split_util.c b/keyboards/nyquist/split_util.c
new file mode 100644
index 000000000..39639c3b4
--- /dev/null
+++ b/keyboards/nyquist/split_util.c
@@ -0,0 +1,84 @@
1#include <avr/io.h>
2#include <avr/wdt.h>
3#include <avr/power.h>
4#include <avr/interrupt.h>
5#include <util/delay.h>
6#include <avr/eeprom.h>
7#include "split_util.h"
8#include "matrix.h"
9#include "keyboard.h"
10#include "config.h"
11
12#ifdef USE_I2C
13# include "i2c.h"
14#else
15# include "serial.h"
16#endif
17
18volatile bool isLeftHand = true;
19
20static void setup_handedness(void) {
21 #ifdef EE_HANDS
22 isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
23 #else
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)
26 isLeftHand = !has_usb();
27 #else
28 isLeftHand = has_usb();
29 #endif
30 #endif
31}
32
33static void keyboard_master_setup(void) {
34#ifdef USE_I2C
35 i2c_master_init();
36#ifdef SSD1306OLED
37 matrix_master_OLED_init ();
38#endif
39#else
40 serial_master_init();
41#endif
42}
43
44static void keyboard_slave_setup(void) {
45#ifdef USE_I2C
46 i2c_slave_init(SLAVE_I2C_ADDRESS);
47#else
48 serial_slave_init();
49#endif
50}
51
52bool has_usb(void) {
53 USBCON |= (1 << OTGPADE); //enables VBUS pad
54 _delay_us(5);
55 return (USBSTA & (1<<VBUS)); //checks state of VBUS
56}
57
58void split_keyboard_setup(void) {
59 setup_handedness();
60
61 if (has_usb()) {
62 keyboard_master_setup();
63 } else {
64 keyboard_slave_setup();
65 }
66 sei();
67}
68
69void keyboard_slave_loop(void) {
70 matrix_init();
71
72 while (1) {
73 matrix_slave_scan();
74 }
75}
76
77// this code runs before the usb and keyboard is initialized
78void matrix_setup(void) {
79 split_keyboard_setup();
80
81 if (!has_usb()) {
82 keyboard_slave_loop();
83 }
84}
diff --git a/keyboards/nyquist/split_util.h b/keyboards/nyquist/split_util.h
new file mode 100644
index 000000000..3ae76c209
--- /dev/null
+++ b/keyboards/nyquist/split_util.h
@@ -0,0 +1,24 @@
1#ifndef SPLIT_KEYBOARD_UTIL_H
2#define SPLIT_KEYBOARD_UTIL_H
3
4#include <stdbool.h>
5
6#ifdef EE_HANDS
7 #define EECONFIG_BOOTMAGIC_END (uint8_t *)10
8 #define EECONFIG_HANDEDNESS EECONFIG_BOOTMAGIC_END
9#endif
10
11#define SLAVE_I2C_ADDRESS 0x32
12
13extern volatile bool isLeftHand;
14
15// slave version of matix scan, defined in matrix.c
16void matrix_slave_scan(void);
17
18void split_keyboard_setup(void);
19bool has_usb(void);
20void keyboard_slave_loop(void);
21
22void matrix_master_OLED_init (void);
23
24#endif
diff --git a/keyboards/phantom/keymaps/xyverz/keymap.c b/keyboards/phantom/keymaps/xyverz/keymap.c
index 4a1522638..621271f9f 100644
--- a/keyboards/phantom/keymaps/xyverz/keymap.c
+++ b/keyboards/phantom/keymaps/xyverz/keymap.c
@@ -76,7 +76,7 @@ const uint16_t PROGMEM fn_actions[] = {
76 76
77}; 77};
78 78
79void persistant_default_layer_set(uint16_t default_layer) { 79void persistent_default_layer_set(uint16_t default_layer) {
80 eeconfig_update_default_layer(default_layer); 80 eeconfig_update_default_layer(default_layer);
81 default_layer_set(default_layer); 81 default_layer_set(default_layer);
82} 82}
@@ -86,17 +86,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
86 switch(id) { 86 switch(id) {
87 case _DV: 87 case _DV:
88 if (record->event.pressed) { 88 if (record->event.pressed) {
89 persistant_default_layer_set(1UL<<_DV); 89 persistent_default_layer_set(1UL<<_DV);
90 } 90 }
91 break; 91 break;
92 case _QW: 92 case _QW:
93 if (record->event.pressed) { 93 if (record->event.pressed) {
94 persistant_default_layer_set(1UL<<_QW); 94 persistent_default_layer_set(1UL<<_QW);
95 } 95 }
96 break; 96 break;
97 case _CM: 97 case _CM:
98 if (record->event.pressed) { 98 if (record->event.pressed) {
99 persistant_default_layer_set(1UL<<_CM); 99 persistent_default_layer_set(1UL<<_CM);
100 } 100 }
101 break; 101 break;
102 } 102 }
diff --git a/keyboards/planck/keymaps/ab/keyboard-layout.json b/keyboards/planck/keymaps/ab/keyboard-layout.json
index 4e631a348..29ca73fb6 100644
--- a/keyboards/planck/keymaps/ab/keyboard-layout.json
+++ b/keyboards/planck/keymaps/ab/keyboard-layout.json
@@ -57,12 +57,12 @@
57 { 57 {
58 "f": 3 58 "f": 3
59 }, 59 },
60 "\n{\n\n\n\n\n\n\n\nH", 60 "\\\n\n\n\n\n\n\n\n\nH",
61 { 61 {
62 "c": "#c4bcbc", 62 "c": "#c4bcbc",
63 "f": 3 63 "f": 3
64 }, 64 },
65 "\n}\n\n\n\n\n\n\n\nJ", 65 "|\n\n\n\n\n\n\n\n\nJ",
66 { 66 {
67 "c": "#cccccc", 67 "c": "#cccccc",
68 "a": 7, 68 "a": 7,
@@ -79,13 +79,13 @@
79 }, 79 },
80 ";\n\n:", 80 ";\n\n:",
81 { 81 {
82 "a": 7,
83 "f": 3 82 "f": 3
84 }, 83 },
85 "Enter" 84 "'\n\n\""
86 ], 85 ],
87 [ 86 [
88 { 87 {
88 "a": 7,
89 "f": 3 89 "f": 3
90 }, 90 },
91 "Shift", 91 "Shift",
@@ -104,6 +104,22 @@
104 { 104 {
105 "a": 4, 105 "a": 4,
106 "fa": [ 106 "fa": [
107 2,
108 2,
109 0,
110 2,
111 0,
112 0,
113 0,
114 0,
115 0,
116 2
117 ]
118 },
119 "\n[\n\n\n\n\n\n\n\nV",
120 "\n]\n\n\n\n\n\n\n\nB",
121 {
122 "fa": [
107 0, 123 0,
108 2, 124 2,
109 0, 125 0,
@@ -116,10 +132,8 @@
116 2 132 2
117 ] 133 ]
118 }, 134 },
119 "\\\n[\n\n\n\n\n\n\n\nV", 135 "`\n{\n\n\n\n\n\n\n\nN",
120 "|\n]\n\n\n\n\n\n\n\nB", 136 "~\n}\n\n\n\n\n\n\n\nM",
121 "`\n'\n\n\n\n\n\n\n\nN",
122 "~\n\"\n\n\n\n\n\n\n\nM",
123 { 137 {
124 "a": 6 138 "a": 6
125 }, 139 },
@@ -129,7 +143,7 @@
129 { 143 {
130 "a": 7 144 "a": 7
131 }, 145 },
132 "Shift\n\n\n\nEnter" 146 "Shift"
133 ], 147 ],
134 [ 148 [
135 { 149 {
diff --git a/keyboards/planck/keymaps/ab/keyboard-layout.png b/keyboards/planck/keymaps/ab/keyboard-layout.png
index dcdbb726d..70e4c2bd4 100644
--- a/keyboards/planck/keymaps/ab/keyboard-layout.png
+++ b/keyboards/planck/keymaps/ab/keyboard-layout.png
Binary files differ
diff --git a/keyboards/planck/keymaps/ab/keymap.c b/keyboards/planck/keymaps/ab/keymap.c
index 8e1d28a65..71512773b 100644
--- a/keyboards/planck/keymaps/ab/keymap.c
+++ b/keyboards/planck/keymaps/ab/keymap.c
@@ -56,20 +56,20 @@ const uint16_t PROGMEM fn_actions[] = {
56const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 56const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
57[_QWERTY] = { /* QWERTY */ 57[_QWERTY] = { /* QWERTY */
58 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, 58 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
59 {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, 59 {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
60 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, 60 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT},
61 {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} 61 {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
62}, 62},
63[_LOWER] = { /* LOWER */ 63[_LOWER] = { /* LOWER */
64 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL}, 64 {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL},
65 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, 65 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
66 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, 66 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
67 {BL, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} 67 {BL, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
68}, 68},
69[_RAISE] = { /* RAISE */ 69[_RAISE] = { /* RAISE */
70 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, 70 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
71 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS}, 71 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
72 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS}, 72 {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
73 {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, EM_UNDO, KC_VOLD, KC_VOLU, KC_MUTE} 73 {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, EM_UNDO, KC_VOLD, KC_VOLU, KC_MUTE}
74}, 74},
75[_CUSTOM] = { /* CUSTOM */ 75[_CUSTOM] = { /* CUSTOM */
@@ -80,8 +80,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
80} 80}
81}; 81};
82 82
83// Set a layer persistantly. 83// Set a layer persistently.
84void persistant_default_layer_set(uint16_t default_layer) { 84void persistent_default_layer_set(uint16_t default_layer) {
85 eeconfig_update_default_layer(default_layer); 85 eeconfig_update_default_layer(default_layer);
86 default_layer_set(default_layer); 86 default_layer_set(default_layer);
87} 87}
diff --git a/keyboards/planck/keymaps/ab/readme.md b/keyboards/planck/keymaps/ab/readme.md
index d6280f074..94f930500 100644
--- a/keyboards/planck/keymaps/ab/readme.md
+++ b/keyboards/planck/keymaps/ab/readme.md
@@ -4,7 +4,7 @@ A practical keymap that emulates standard QWERTY keyboard for Planck. Once you g
4![Layout](keyboard-layout.png "Practical Keymap") 4![Layout](keyboard-layout.png "Practical Keymap")
5![Photo](keyboard-photo.jpg "Planck Keyboard") 5![Photo](keyboard-photo.jpg "Planck Keyboard")
6 6
7* Online keyboard layout editor: http://goo.gl/mlLAFZ 7* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/bda299020baaafe6a2a4a82e615e3cfc
8 8
9# Programming Instructions: 9# Programming Instructions:
10Enter into programming mode and run the following command. 10Enter into programming mode and run the following command.
diff --git a/keyboards/planck/keymaps/dbroqua/keymap.c b/keyboards/planck/keymaps/dbroqua/keymap.c
index 33929cb3a..975017161 100644
--- a/keyboards/planck/keymaps/dbroqua/keymap.c
+++ b/keyboards/planck/keymaps/dbroqua/keymap.c
@@ -149,7 +149,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
149#endif 149#endif
150 150
151 151
152void persistant_default_layer_set(uint16_t default_layer) { 152void persistent_default_layer_set(uint16_t default_layer) {
153 eeconfig_update_default_layer(default_layer); 153 eeconfig_update_default_layer(default_layer);
154 default_layer_set(default_layer); 154 default_layer_set(default_layer);
155} 155}
@@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
161 #ifdef AUDIO_ENABLE 161 #ifdef AUDIO_ENABLE
162 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 162 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
163 #endif 163 #endif
164 persistant_default_layer_set(1UL<<_QWERTY); 164 persistent_default_layer_set(1UL<<_QWERTY);
165 } 165 }
166 return false; 166 return false;
167 break; 167 break;
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c
index d149019fe..61275cb26 100644
--- a/keyboards/planck/keymaps/default/keymap.c
+++ b/keyboards/planck/keymaps/default/keymap.c
@@ -186,7 +186,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
186#endif 186#endif
187 187
188 188
189void persistant_default_layer_set(uint16_t default_layer) { 189void persistent_default_layer_set(uint16_t default_layer) {
190 eeconfig_update_default_layer(default_layer); 190 eeconfig_update_default_layer(default_layer);
191 default_layer_set(default_layer); 191 default_layer_set(default_layer);
192} 192}
@@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
198 #ifdef AUDIO_ENABLE 198 #ifdef AUDIO_ENABLE
199 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 199 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
200 #endif 200 #endif
201 persistant_default_layer_set(1UL<<_QWERTY); 201 persistent_default_layer_set(1UL<<_QWERTY);
202 } 202 }
203 return false; 203 return false;
204 break; 204 break;
@@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
207 #ifdef AUDIO_ENABLE 207 #ifdef AUDIO_ENABLE
208 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 208 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
209 #endif 209 #endif
210 persistant_default_layer_set(1UL<<_COLEMAK); 210 persistent_default_layer_set(1UL<<_COLEMAK);
211 } 211 }
212 return false; 212 return false;
213 break; 213 break;
@@ -216,7 +216,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
216 #ifdef AUDIO_ENABLE 216 #ifdef AUDIO_ENABLE
217 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 217 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
218 #endif 218 #endif
219 persistant_default_layer_set(1UL<<_DVORAK); 219 persistent_default_layer_set(1UL<<_DVORAK);
220 } 220 }
221 return false; 221 return false;
222 break; 222 break;
diff --git a/keyboards/planck/keymaps/dshields/Makefile b/keyboards/planck/keymaps/dshields/Makefile
index 9e18a3542..57144283e 100644
--- a/keyboards/planck/keymaps/dshields/Makefile
+++ b/keyboards/planck/keymaps/dshields/Makefile
@@ -4,6 +4,7 @@ endif
4 4
5MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 5MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
6COMMAND_ENABLE = yes # Commands for debug and configuration 6COMMAND_ENABLE = yes # Commands for debug and configuration
7CONSOLE_ENABLE = yes # Console for debug(+400)
7BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality 8BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
8# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 9# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
9SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 10SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/keymaps/dshields/config.h b/keyboards/planck/keymaps/dshields/config.h
index 4d5be0a26..5f2810287 100644
--- a/keyboards/planck/keymaps/dshields/config.h
+++ b/keyboards/planck/keymaps/dshields/config.h
@@ -6,26 +6,47 @@
6#define _______ KC_TRNS 6#define _______ KC_TRNS
7#define XXXXXXX KC_NO 7#define XXXXXXX KC_NO
8 8
9#define ONESHOT_TAP_TOGGLE 2 9#define USB_MAX_POWER_CONSUMPTION 100
10#define ONESHOT_TIMEOUT 500 10#define ONESHOT_TAP_TOGGLE 2
11#define ONESHOT_TIMEOUT 500
11 12
12#define MOUSEKEY_INTERVAL 20 13#define MOUSEKEY_INTERVAL 20
13#define MOUSEKEY_DELAY 0 14#define MOUSEKEY_DELAY 0
14#define MOUSEKEY_TIME_TO_MAX 60 15#define MOUSEKEY_TIME_TO_MAX 40
15#define MOUSEKEY_MAX_SPEED 7 16#define MOUSEKEY_MAX_SPEED 7
16#define MOUSEKEY_WHEEL_DELAY 0 17#define MOUSEKEY_WHEEL_DELAY 0
17 18
19// dynamic macro keys
18#define DM_PLAY DYN_MACRO_PLAY1 20#define DM_PLAY DYN_MACRO_PLAY1
19#define DM_STRT DYN_REC_START1 21#define DM_STRT DYN_REC_START1
20#define DM_STOP DYN_REC_STOP 22#define DM_STOP DYN_REC_STOP
21 23
24// one-shot layer keys
22#define OSL_RSE OSL(RSE) 25#define OSL_RSE OSL(RSE)
23#define OSL_LWR OSL(LWR) 26#define OSL_LWR OSL(LWR)
24#define OSL_FUN OSL(FUN) 27#define OSL_FUN OSL(FUN)
25 28
29// one-shot modifier keys
26#define OSM_CTL OSM(MOD_LCTL) 30#define OSM_CTL OSM(MOD_LCTL)
27#define OSM_ALT OSM(MOD_LALT) 31#define OSM_ALT OSM(MOD_LALT)
28#define OSM_SFT OSM(MOD_LSFT) 32#define OSM_SFT OSM(MOD_LSFT)
29 33
34// tap dance keys
35#define TD_SCLN TD(TDK_SCLN)
36#define TD_COMM TD(TDK_COMM)
37#define TD_DOT TD(TDK_DOT)
38#define TD_SLSH TD(TDK_SLSH)
39
40#define ACTION_TAP_DANCE_FN_KEYCODE(user_fn, kc) { \
41 .fn = { NULL, user_fn, NULL }, \
42 .user_data = (void *)&((qk_tap_dance_pair_t) { kc, 0 }) \
43}
44
45#define ACTION_TAP_DANCE_FN_KEYCODE2(user_fn, kc1, kc2) { \
46 .fn = { NULL, user_fn, NULL }, \
47 .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }) \
48}
49
50
30#endif 51#endif
31 52
diff --git a/keyboards/planck/keymaps/dshields/keymap.c b/keyboards/planck/keymaps/dshields/keymap.c
index ed7621c77..09bdc3e40 100644
--- a/keyboards/planck/keymaps/dshields/keymap.c
+++ b/keyboards/planck/keymaps/dshields/keymap.c
@@ -8,7 +8,7 @@ extern keymap_config_t keymap_config;
8 8
9enum planck_layers { DEF, LWR, RSE, FUN }; 9enum planck_layers { DEF, LWR, RSE, FUN };
10enum planck_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE }; 10enum planck_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE };
11enum tap_dance_keys { TD_SCLN }; 11enum tap_dance_keys { TDK_SCLN, TDK_COMM, TDK_DOT, TDK_SLSH };
12 12
13#include "dynamic_macro.h" 13#include "dynamic_macro.h"
14 14
@@ -26,8 +26,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26 */ 26 */
27 [DEF] = { 27 [DEF] = {
28 {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P}, 28 {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P},
29 {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, TD(TD_SCLN)}, 29 {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, TD_SCLN},
30 {KC_Z, KC_X, KC_C, KC_V, KC_B, OSM_SFT, DM_PLAY, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, 30 {KC_Z, KC_X, KC_C, KC_V, KC_B, OSM_SFT, DM_PLAY, KC_N, KC_M, TD_COMM, TD_DOT, TD_SLSH},
31 {OSM_CTL, KC_LGUI, OSM_ALT, OSL_FUN, OSL_LWR, KC_SPC, KC_SPC, OSL_RSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} 31 {OSM_CTL, KC_LGUI, OSM_ALT, OSL_FUN, OSL_LWR, KC_SPC, KC_SPC, OSL_RSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
32 }, 32 },
33 /* Lower 33 /* Lower
@@ -42,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
42 * `-----------------------------------------------------------------------------------' 42 * `-----------------------------------------------------------------------------------'
43 */ 43 */
44 [LWR] = { 44 [LWR] = {
45 {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, 45 {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
46 {S(KC_GRV), _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, S(KC_LBRC), S(KC_RBRC)}, 46 {KC_TILD, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, KC_LCBR, KC_RCBR},
47 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, S(KC_QUOT), S(KC_BSLS)}, 47 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DQUO, KC_PIPE},
48 {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} 48 {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
49 }, 49 },
50 /* Raise 50 /* Raise
51 * ,-----------------------------------------------------------------------------------. 51 * ,-----------------------------------------------------------------------------------.
@@ -59,10 +59,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
59 * `-----------------------------------------------------------------------------------' 59 * `-----------------------------------------------------------------------------------'
60 */ 60 */
61 [RSE] = { 61 [RSE] = {
62 {KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0}, 62 {KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0},
63 {KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC}, 63 {KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC},
64 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_BSLS}, 64 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_BSLS},
65 {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} 65 {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
66 }, 66 },
67 /* Function 67 /* Function
68 * ,-----------------------------------------------------------------------------------. 68 * ,-----------------------------------------------------------------------------------.
@@ -84,8 +84,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
84 84
85}; 85};
86 86
87void tap(uint16_t keycode) {
88 register_code16(keycode);
89 unregister_code16(keycode);
90};
91
92void tap_dance_triple(qk_tap_dance_state_t *state, void *user_data) {
93 qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data;
94 uint16_t keycode = pair->kc1;
95
96 switch(state->count) {
97 case 2:
98 register_code(KC_LSFT);
99 tap(keycode);
100 unregister_code(KC_LSFT);
101 break;
102 case 3:
103 if (pair->kc2) {
104 keycode = pair->kc2;
105 }
106 tap(keycode);
107 tap(keycode);
108 break;
109 default:
110 tap(keycode);
111 break;
112 }
113}
114
87qk_tap_dance_action_t tap_dance_actions[] = { 115qk_tap_dance_action_t tap_dance_actions[] = {
88 [TD_SCLN] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, S(KC_SCLN)) // once for semi-colon, twice for colon 116 [TDK_SCLN] = ACTION_TAP_DANCE_FN_KEYCODE2(tap_dance_triple, KC_SCLN, KC_COLN),
117 [TDK_COMM] = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_COMM),
118 [TDK_DOT] = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_DOT),
119 [TDK_SLSH] = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_SLSH)
89}; 120};
90 121
91bool process_record_user(uint16_t keycode, keyrecord_t *record) { 122bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c
index a24ad9d48..feb962331 100644
--- a/keyboards/planck/keymaps/espynn/keymap.c
+++ b/keyboards/planck/keymaps/espynn/keymap.c
@@ -88,8 +88,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
88} 88}
89}; 89};
90 90
91// Set a layer persistantly. 91// Set a layer persistently.
92void persistant_default_layer_set(uint16_t default_layer) { 92void persistent_default_layer_set(uint16_t default_layer) {
93 eeconfig_update_default_layer(default_layer); 93 eeconfig_update_default_layer(default_layer);
94 default_layer_set(default_layer); 94 default_layer_set(default_layer);
95} 95}
diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c
index 569dbcc8a..17fad784e 100644
--- a/keyboards/planck/keymaps/experimental/keymap.c
+++ b/keyboards/planck/keymaps/experimental/keymap.c
@@ -204,7 +204,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
204 204
205 205
206 206
207void persistant_default_layer_set(uint16_t default_layer) { 207void persistent_default_layer_set(uint16_t default_layer) {
208 eeconfig_update_default_layer(default_layer); 208 eeconfig_update_default_layer(default_layer);
209 default_layer_set(default_layer); 209 default_layer_set(default_layer);
210} 210}
@@ -217,7 +217,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
217 #ifdef AUDIO_ENABLE 217 #ifdef AUDIO_ENABLE
218 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 218 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
219 #endif 219 #endif
220 persistant_default_layer_set(1UL<<_QWERTY); 220 persistent_default_layer_set(1UL<<_QWERTY);
221 } 221 }
222 break; 222 break;
223 return false; 223 return false;
@@ -226,7 +226,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
226 #ifdef AUDIO_ENABLE 226 #ifdef AUDIO_ENABLE
227 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 227 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
228 #endif 228 #endif
229 persistant_default_layer_set(1UL<<_COLEMAK); 229 persistent_default_layer_set(1UL<<_COLEMAK);
230 } 230 }
231 break; 231 break;
232 return false; 232 return false;
@@ -235,7 +235,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
235 #ifdef AUDIO_ENABLE 235 #ifdef AUDIO_ENABLE
236 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 236 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
237 #endif 237 #endif
238 persistant_default_layer_set(1UL<<_DVORAK); 238 persistent_default_layer_set(1UL<<_DVORAK);
239 } 239 }
240 break; 240 break;
241 return false; 241 return false;
diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c
index 503976fa2..6a649f2c8 100644
--- a/keyboards/planck/keymaps/impossible/keymap.c
+++ b/keyboards/planck/keymaps/impossible/keymap.c
@@ -164,7 +164,7 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
164#endif 164#endif
165 165
166 166
167void persistant_default_layer_set(uint16_t default_layer) { 167void persistent_default_layer_set(uint16_t default_layer) {
168 eeconfig_update_default_layer(default_layer); 168 eeconfig_update_default_layer(default_layer);
169 default_layer_set(default_layer); 169 default_layer_set(default_layer);
170} 170}
@@ -176,7 +176,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
176 #ifdef AUDIO_ENABLE 176 #ifdef AUDIO_ENABLE
177 PLAY_NOTE_ARRAY(tone_workman, false, 0); 177 PLAY_NOTE_ARRAY(tone_workman, false, 0);
178 #endif 178 #endif
179 persistant_default_layer_set(1UL<<_WORKMAN); 179 persistent_default_layer_set(1UL<<_WORKMAN);
180 } 180 }
181 return false; 181 return false;
182 break; 182 break;
@@ -185,7 +185,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
185 #ifdef AUDIO_ENABLE 185 #ifdef AUDIO_ENABLE
186 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 186 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
187 #endif 187 #endif
188 persistant_default_layer_set(1UL<<_QWERTY); 188 persistent_default_layer_set(1UL<<_QWERTY);
189 } 189 }
190 return false; 190 return false;
191 break; 191 break;
@@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
200 keymap_config.raw = eeconfig_read_keymap(); 200 keymap_config.raw = eeconfig_read_keymap();
201 keymap_config.nkro = 1; 201 keymap_config.nkro = 1;
202 eeconfig_update_keymap(keymap_config.raw); 202 eeconfig_update_keymap(keymap_config.raw);
203 persistant_default_layer_set(1UL<<_PLOVER); 203 persistent_default_layer_set(1UL<<_PLOVER);
204 } 204 }
205 return false; 205 return false;
206 break; 206 break;
diff --git a/keyboards/planck/keymaps/jeebak/keymap.c b/keyboards/planck/keymaps/jeebak/keymap.c
index cb7ccb588..7b9a68113 100644
--- a/keyboards/planck/keymaps/jeebak/keymap.c
+++ b/keyboards/planck/keymaps/jeebak/keymap.c
@@ -270,7 +270,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
270#endif 270#endif
271 271
272 272
273void persistant_default_layer_set(uint16_t default_layer) { 273void persistent_default_layer_set(uint16_t default_layer) {
274 eeconfig_update_default_layer(default_layer); 274 eeconfig_update_default_layer(default_layer);
275 default_layer_set(default_layer); 275 default_layer_set(default_layer);
276} 276}
diff --git a/keyboards/planck/keymaps/jeebak/readme.md b/keyboards/planck/keymaps/jeebak/readme.md
index e1dd1dca5..7c4bf908c 100644
--- a/keyboards/planck/keymaps/jeebak/readme.md
+++ b/keyboards/planck/keymaps/jeebak/readme.md
@@ -6,7 +6,7 @@ needed, they will be mapped to home row keys. The `keymap.c` file will contain
6the exact changes. The diagrams in this README shows the highlights of the 6the exact changes. The diagrams in this README shows the highlights of the
7changes from the default mappings. 7changes from the default mappings.
8 8
9I also decided to change all calls to `persistant_default_layer_set()` to 9I also decided to change all calls to `persistent_default_layer_set()` to
10`default_layer_set()` since this is my personal perference. 10`default_layer_set()` since this is my personal perference.
11 11
12## Macros 12## Macros
diff --git a/keyboards/planck/keymaps/jhenahan/keymap.c b/keyboards/planck/keymaps/jhenahan/keymap.c
index 2bda4b695..bf9735be8 100644
--- a/keyboards/planck/keymaps/jhenahan/keymap.c
+++ b/keyboards/planck/keymaps/jhenahan/keymap.c
@@ -183,7 +183,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
183#endif 183#endif
184 184
185 185
186void persistant_default_layer_set(uint16_t default_layer) { 186void persistent_default_layer_set(uint16_t default_layer) {
187 eeconfig_update_default_layer(default_layer); 187 eeconfig_update_default_layer(default_layer);
188 default_layer_set(default_layer); 188 default_layer_set(default_layer);
189} 189}
@@ -195,7 +195,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
195 #ifdef AUDIO_ENABLE 195 #ifdef AUDIO_ENABLE
196 PLAY_NOTE_ARRAY(tone_workman, false, 0); 196 PLAY_NOTE_ARRAY(tone_workman, false, 0);
197 #endif 197 #endif
198 persistant_default_layer_set(1UL<<_WORKMAN); 198 persistent_default_layer_set(1UL<<_WORKMAN);
199 } 199 }
200 return false; 200 return false;
201 break; 201 break;
@@ -212,7 +212,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
212 #ifdef AUDIO_ENABLE 212 #ifdef AUDIO_ENABLE
213 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 213 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
214 #endif 214 #endif
215 persistant_default_layer_set(1UL<<_QWERTY); 215 persistent_default_layer_set(1UL<<_QWERTY);
216 } 216 }
217 return false; 217 return false;
218 break; 218 break;
diff --git a/keyboards/planck/keymaps/johannes/Makefile b/keyboards/planck/keymaps/johannes/Makefile
new file mode 100644
index 000000000..0c0632da0
--- /dev/null
+++ b/keyboards/planck/keymaps/johannes/Makefile
@@ -0,0 +1,25 @@
1
2
3# Build Options
4# change to "no" to disable the options, or define them in the Makefile in
5# the appropriate keymap folder that will get included automatically
6#
7BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
8MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
9EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
10CONSOLE_ENABLE = no # Console for debug(+400)
11COMMAND_ENABLE = no # Commands for debug and configuration
12NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
13BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
14MIDI_ENABLE = no # MIDI controls
15AUDIO_ENABLE = no # Audio output on port C6
16UNICODE_ENABLE = no # Unicode
17BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
18RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
19
20# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
21SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
22
23ifndef QUANTUM_DIR
24 include ../../../../Makefile
25endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/johannes/keymap.c b/keyboards/planck/keymaps/johannes/keymap.c
new file mode 100644
index 000000000..a3376518b
--- /dev/null
+++ b/keyboards/planck/keymaps/johannes/keymap.c
@@ -0,0 +1,99 @@
1#include "planck.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
8// Fillers to make layering more clear
9#define _______ KC_TRNS
10#define XXXXXXX KC_NO
11#define QWERTY 0
12#define LOWER 1
13#define RAISE 2
14#define FUNCTION 3
15
16const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
17
18/* Qwerty
19 * ,-----------------------------------------------------------------------------------.
20 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
21 * |------+------+------+------+------+-------------+------+------+------+------+------|
22 * | Esc | A | S | D | F | G | H | J | K | L | ; | ' |
23 * |------+------+------+------+------+------|------+------+------+------+------+------|
24 * | Ctrl | Z | X | C | V | B | N | M | , | . | / |Enter |
25 * |------+------+------+------+------+------+------+------+------+------+------+------|
26 * | | alt |play/p| super|shift | Space|Raise | lower| alt | altgr| |fn |
27 * `-----------------------------------------------------------------------------------'
28 */
29[QWERTY] = {
30 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
31 {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
32 {KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
33 {_______, KC_LALT, LT(FUNCTION, KC_MPLY), KC_LGUI, KC_LSHIFT, KC_SPC, MO(RAISE), MO(LOWER), KC_LALT, KC_RALT, XXXXXXX, MO(FUNCTION)}
34},
35
36/* Lower
37 * ,-----------------------------------------------------------------------------------.
38 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
39 * |------+------+------+------+------+-------------+------+------+------+------+------|
40 * | | | { | } | + | | | Å | Ä | Ö | _ | |
41 * |------+------+------+------+------+------|------+------+------+------+------+------|
42 * | | | | | | | | | | | \ | |
43 * |------+------+------+------+------+------+------+------+------+------+------+------|
44 * | | | | | | | | | | | |
45 * `-----------------------------------------------------------------------------------'
46 */
47[LOWER] = {
48 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
49 {_______, _______, KC_LCBR, KC_RCBR, KC_PLUS, _______, _______, RALT(KC_W), RALT(KC_Q), RALT(KC_P), KC_UNDS, _______},
50 {_______, _______, _______, _______, _______, _______, _______,_______, _______,_______, KC_BSLS, _______},
51 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
52},
53
54/* Raise
55 * ,-----------------------------------------------------------------------------------.
56 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | del |
57 * |------+------+------+------+------+-------------+------+------+------+------+------|
58 * | | | [ | ] | = | | left| down| up | right| - | |
59 * |------+------+------+------+------+------|------+------+------+------+------+------|
60 * | | | | | | | | | | | | | |
61 * |------+------+------+------+------+------+------+------+------+------+------+------|
62 * | | | | | | | | | | | |
63 * `-----------------------------------------------------------------------------------'
64 */
65[RAISE] = {
66 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
67 {_______, _______, KC_LBRC, KC_RBRC, KC_EQL, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_MINS, _______},
68 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, _______},
69 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
70},
71
72/* Fn
73 * ,-----------------------------------------------------------------------------------.
74 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 '
75 * |------+------+------+------+------+-------------+------+------+------+------+------|
76 * | | | | | | | prev | vol.d| vo.up| next | | |
77 * |------+------+------+------+------+------|------+------+------+------+------+------|
78 * | | | | | | | mute | | | | | |
79 * |------+------+------+------+------+------+------+------+------+------+------+------|
80 * | | | | | CAPS | | | | | | | |
81 * `-----------------------------------------------------------------------------------'
82 */
83[FUNCTION] = {
84 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
85 {_______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_NEXT_TRACK, _______, _______},
86 {_______, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, _______, _______, _______, _______},
87 {_______, _______, _______, _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______}
88},
89
90};
91
92const uint16_t PROGMEM fn_actions[] = {
93
94};
95
96const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
97{
98 return MACRO_NONE;
99};
diff --git a/keyboards/planck/keymaps/johannes/planck-layout.png b/keyboards/planck/keymaps/johannes/planck-layout.png
new file mode 100644
index 000000000..e863b802c
--- /dev/null
+++ b/keyboards/planck/keymaps/johannes/planck-layout.png
Binary files differ
diff --git a/keyboards/planck/keymaps/johannes/readme.md b/keyboards/planck/keymaps/johannes/readme.md
new file mode 100644
index 000000000..bbb7accf8
--- /dev/null
+++ b/keyboards/planck/keymaps/johannes/readme.md
@@ -0,0 +1,6 @@
1# Planck layout for Swedish programmer
2I.e. easy access to special keys and åäö.
3
4![layout](planck-layout.png)
5
6[KBLE link](http://www.keyboard-layout-editor.com/#/gists/dc01cc2225899308a05ba3ef0031548b)
diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c
index e371e5b70..f9fa7318a 100644
--- a/keyboards/planck/keymaps/khord/keymap.c
+++ b/keyboards/planck/keymaps/khord/keymap.c
@@ -213,7 +213,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
213#endif 213#endif
214 214
215 215
216void persistant_default_layer_set(uint16_t default_layer) { 216void persistent_default_layer_set(uint16_t default_layer) {
217 eeconfig_update_default_layer(default_layer); 217 eeconfig_update_default_layer(default_layer);
218 default_layer_set(default_layer); 218 default_layer_set(default_layer);
219} 219}
@@ -251,7 +251,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
251 #ifdef AUDIO_ENABLE 251 #ifdef AUDIO_ENABLE
252 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 252 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
253 #endif 253 #endif
254 persistant_default_layer_set(1UL<<_QWERTY); 254 persistent_default_layer_set(1UL<<_QWERTY);
255 } 255 }
256 return false; 256 return false;
257 break; 257 break;
@@ -260,7 +260,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
260 #ifdef AUDIO_ENABLE 260 #ifdef AUDIO_ENABLE
261 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 261 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
262 #endif 262 #endif
263 persistant_default_layer_set(1UL<<_COLEMAK); 263 persistent_default_layer_set(1UL<<_COLEMAK);
264 } 264 }
265 return false; 265 return false;
266 break; 266 break;
@@ -269,7 +269,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
269 #ifdef AUDIO_ENABLE 269 #ifdef AUDIO_ENABLE
270 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 270 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
271 #endif 271 #endif
272 persistant_default_layer_set(1UL<<_DVORAK); 272 persistent_default_layer_set(1UL<<_DVORAK);
273 } 273 }
274 return false; 274 return false;
275 break; 275 break;
diff --git a/keyboards/planck/keymaps/originerd/Makefile b/keyboards/planck/keymaps/originerd/Makefile
new file mode 100644
index 000000000..457a3d01d
--- /dev/null
+++ b/keyboards/planck/keymaps/originerd/Makefile
@@ -0,0 +1,3 @@
1ifndef QUANTUM_DIR
2 include ../../../../Makefile
3endif
diff --git a/keyboards/planck/keymaps/originerd/keymap.c b/keyboards/planck/keymaps/originerd/keymap.c
new file mode 100644
index 000000000..fb919835b
--- /dev/null
+++ b/keyboards/planck/keymaps/originerd/keymap.c
@@ -0,0 +1,195 @@
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
18enum planck_layers {
19 _NERD,
20 _LOWER,
21 _RAISE,
22 _ADJUST
23};
24
25enum planck_keycodes {
26 NERD = SAFE_RANGE,
27 LOWER,
28 RAISE
29};
30
31// Fillers to make layering more clear
32#define _______ KC_TRNS
33#define XXXXXXX KC_NO
34
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36
37/* NERD
38 * ,-----------------------------------------------------------------------------------.
39 * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
40 * |------+------+------+------+------+-------------+------+------+------+------+------|
41 * | Tab | A | S | D | F | G | H | J | K | L | ; |Enter |
42 * |------+------+------+------+------+------|------+------+------+------+------+------|
43 * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift |
44 * |------+------+------+------+------+------+------+------+------+------+------+------|
45 * | DEL | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
46 * `-----------------------------------------------------------------------------------'
47 */
48[_NERD] = {
49 {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
50 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT },
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},
52 {KC_DEL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
53},
54
55
56/* Lower
57 * ,-----------------------------------------------------------------------------------.
58 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
59 * |------+------+------+------+------+-------------+------+------+------+------+------|
60 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | \ |
61 * |------+------+------+------+------+------|------+------+------+------+------+------|
62 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
63 * |------+------+------+------+------+------+------+------+------+------+------+------|
64 * | | | | | | | | Next | Vol- | Vol+ | Play |
65 * `-----------------------------------------------------------------------------------'
66 */
67[_LOWER] = {
68 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
69 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS},
70 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______},
71 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
72},
73
74/* Raise
75 * ,-----------------------------------------------------------------------------------.
76 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
77 * |------+------+------+------+------+-------------+------+------+------+------+------|
78 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | ' |
79 * |------+------+------+------+------+------|------+------+------+------+------+------|
80 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
81 * |------+------+------+------+------+------+------+------+------+------+------+------|
82 * | | | | | | | | Next | Vol- | Vol+ | Play |
83 * `-----------------------------------------------------------------------------------'
84 */
85[_RAISE] = {
86 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
87 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT},
88 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______},
89 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
90},
91
92
93/* Adjust (Lower + Raise)
94 * ,-----------------------------------------------------------------------------------.
95 * | | Reset| | | | | | | | | | Del |
96 * |------+------+------+------+------+-------------+------+------+------+------+------|
97 * | | | |Aud on|Audoff|AGnorm|AGswap| NERD | | | | |
98 * |------+------+------+------+------+------|------+------+------+------+------+------|
99 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
100 * |------+------+------+------+------+------+------+------+------+------+------+------|
101 * | | | | | | | | | | | |
102 * `-----------------------------------------------------------------------------------'
103 */
104[_ADJUST] = {
105 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
106 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, NERD, _______, _______, _______, _______},
107 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
108 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
109}
110
111
112};
113
114#ifdef AUDIO_ENABLE
115
116float tone_startup[][2] = SONG(STARTUP_SOUND);
117float tone_nerd[][2] = SONG(QWERTY_SOUND);
118float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
119
120float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
121#endif
122
123
124void persistent_default_layer_set(uint16_t default_layer) {
125 eeconfig_update_default_layer(default_layer);
126 default_layer_set(default_layer);
127}
128
129bool process_record_user(uint16_t keycode, keyrecord_t *record) {
130 switch (keycode) {
131 case NERD:
132 if (record->event.pressed) {
133 #ifdef AUDIO_ENABLE
134 PLAY_NOTE_ARRAY(tone_nerd, false, 0);
135 #endif
136 persistent_default_layer_set(1UL<<_NERD);
137 }
138 return false;
139 break;
140 case LOWER:
141 if (record->event.pressed) {
142 layer_on(_LOWER);
143 update_tri_layer(_LOWER, _RAISE, _ADJUST);
144 } else {
145 layer_off(_LOWER);
146 update_tri_layer(_LOWER, _RAISE, _ADJUST);
147 }
148 return false;
149 break;
150 case RAISE:
151 if (record->event.pressed) {
152 layer_on(_RAISE);
153 update_tri_layer(_LOWER, _RAISE, _ADJUST);
154 } else {
155 layer_off(_RAISE);
156 update_tri_layer(_LOWER, _RAISE, _ADJUST);
157 }
158 return false;
159 break;
160 }
161 return true;
162}
163
164void matrix_init_user(void) {
165 #ifdef AUDIO_ENABLE
166 startup_user();
167 #endif
168}
169
170#ifdef AUDIO_ENABLE
171
172void startup_user()
173{
174 _delay_ms(20); // gets rid of tick
175 PLAY_NOTE_ARRAY(tone_startup, false, 0);
176}
177
178void shutdown_user()
179{
180 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
181 _delay_ms(150);
182 stop_all_notes();
183}
184
185void music_on_user(void)
186{
187 music_scale_user();
188}
189
190void music_scale_user(void)
191{
192 PLAY_NOTE_ARRAY(music_scale, false, 0);
193}
194
195#endif
diff --git a/keyboards/planck/keymaps/originerd/readme.md b/keyboards/planck/keymaps/originerd/readme.md
new file mode 100644
index 000000000..6b627006e
--- /dev/null
+++ b/keyboards/planck/keymaps/originerd/readme.md
@@ -0,0 +1,58 @@
1# The Originerd Planck Layout
2- MIT Layout
3
4## Nerd - Qwerty
5
6```
7,-----------------------------------------------------------------------------------.
8| Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
9|------+------+------+------+------+-------------+------+------+------+------+------|
10| Tab | A | S | D | F | G | H | J | K | L | ; |Enter |
11|------+------+------+------+------+------|------+------+------+------+------+------|
12| Shift| Z | X | C | V | B | N | M | , | . | / |Shift |
13|------+------+------+------+------+------+------+------+------+------+------+------|
14| DEL | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
15`-----------------------------------------------------------------------------------'
16```
17
18## Lower
19
20```
21,-----------------------------------------------------------------------------------.
22| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
23|------+------+------+------+------+-------------+------+------+------+------+------|
24| Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | \ |
25|------+------+------+------+------+------|------+------+------+------+------+------|
26| | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
27|------+------+------+------+------+------+------+------+------+------+------+------|
28| | | | | | | | Next | Vol- | Vol+ | Play |
29`-----------------------------------------------------------------------------------'
30```
31
32## Upper Layer
33
34```
35,-----------------------------------------------------------------------------------.
36| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
37|------+------+------+------+------+-------------+------+------+------+------+------|
38| Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | ' |
39|------+------+------+------+------+------|------+------+------+------+------+------|
40| | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
41|------+------+------+------+------+------+------+------+------+------+------+------|
42| | | | | | | | Next | Vol- | Vol+ | Play |
43`-----------------------------------------------------------------------------------'
44```
45
46## Adjust
47
48```
49,-----------------------------------------------------------------------------------.
50| | Reset| | | | | | | | | | Del |
51|------+------+------+------+------+-------------+------+------+------+------+------|
52| | | |Aud on|Audoff|AGnorm|AGswap| NERD | | | | |
53|------+------+------+------+------+------|------+------+------+------+------+------|
54| |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
55|------+------+------+------+------+------+------+------+------+------+------+------|
56| | | | | | | | | | | |
57`-----------------------------------------------------------------------------------'
58```
diff --git a/keyboards/planck/keymaps/pete/keymap.c b/keyboards/planck/keymaps/pete/keymap.c
index 38275b403..d991bece1 100644
--- a/keyboards/planck/keymaps/pete/keymap.c
+++ b/keyboards/planck/keymaps/pete/keymap.c
@@ -143,7 +143,7 @@ float goodbye[][2] = SONG(GOODBYE_SOUND);
143#endif 143#endif
144 144
145 145
146void persistant_default_layer_set(uint16_t default_layer) { 146void persistent_default_layer_set(uint16_t default_layer) {
147 eeconfig_update_default_layer(default_layer); 147 eeconfig_update_default_layer(default_layer);
148 default_layer_set(default_layer); 148 default_layer_set(default_layer);
149} 149}
@@ -156,7 +156,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
156 #ifdef AUDIO_ENABLE 156 #ifdef AUDIO_ENABLE
157 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 157 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
158 #endif 158 #endif
159 persistant_default_layer_set(1UL<<_QWERTY); 159 persistent_default_layer_set(1UL<<_QWERTY);
160 } 160 }
161 break; 161 break;
162 case _COLEMAK: 162 case _COLEMAK:
@@ -164,7 +164,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
164 #ifdef AUDIO_ENABLE 164 #ifdef AUDIO_ENABLE
165 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 165 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
166 #endif 166 #endif
167 persistant_default_layer_set(1UL<<_COLEMAK); 167 persistent_default_layer_set(1UL<<_COLEMAK);
168 } 168 }
169 break; 169 break;
170 case _DVORAK: 170 case _DVORAK:
@@ -172,7 +172,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
172 #ifdef AUDIO_ENABLE 172 #ifdef AUDIO_ENABLE
173 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 173 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
174 #endif 174 #endif
175 persistant_default_layer_set(1UL<<_DVORAK); 175 persistent_default_layer_set(1UL<<_DVORAK);
176 } 176 }
177 break; 177 break;
178 case _LOWER: 178 case _LOWER:
diff --git a/keyboards/planck/keymaps/premek/keymap.c b/keyboards/planck/keymaps/premek/keymap.c
index 9b212ab25..0eb35a9f8 100644
--- a/keyboards/planck/keymaps/premek/keymap.c
+++ b/keyboards/planck/keymaps/premek/keymap.c
@@ -100,7 +100,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
100#endif 100#endif
101 101
102 102
103void persistant_default_layer_set(uint16_t default_layer) { 103void persistent_default_layer_set(uint16_t default_layer) {
104 eeconfig_update_default_layer(default_layer); 104 eeconfig_update_default_layer(default_layer);
105 default_layer_set(default_layer); 105 default_layer_set(default_layer);
106} 106}
@@ -112,7 +112,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
112 #ifdef AUDIO_ENABLE 112 #ifdef AUDIO_ENABLE
113 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 113 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
114 #endif 114 #endif
115 persistant_default_layer_set(1UL<<_QWERTY); 115 persistent_default_layer_set(1UL<<_QWERTY);
116 } 116 }
117 return false; 117 return false;
118 break; 118 break;
@@ -121,7 +121,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
121 #ifdef AUDIO_ENABLE 121 #ifdef AUDIO_ENABLE
122 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 122 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
123 #endif 123 #endif
124 persistant_default_layer_set(1UL<<_COLEMAK); 124 persistent_default_layer_set(1UL<<_COLEMAK);
125 } 125 }
126 return false; 126 return false;
127 break; 127 break;
@@ -130,7 +130,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
130 #ifdef AUDIO_ENABLE 130 #ifdef AUDIO_ENABLE
131 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 131 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
132 #endif 132 #endif
133 persistant_default_layer_set(1UL<<_DVORAK); 133 persistent_default_layer_set(1UL<<_DVORAK);
134 } 134 }
135 return false; 135 return false;
136 break; 136 break;
diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c
index 6ad95832d..741e8e650 100644
--- a/keyboards/planck/keymaps/pvc/keymap.c
+++ b/keyboards/planck/keymaps/pvc/keymap.c
@@ -233,7 +233,7 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
233 233
234#endif /* AUDIO_ENABLE */ 234#endif /* AUDIO_ENABLE */
235 235
236void persistant_default_layer_set(uint16_t default_layer) 236void persistent_default_layer_set(uint16_t default_layer)
237{ 237{
238 eeconfig_update_default_layer(default_layer); 238 eeconfig_update_default_layer(default_layer);
239 default_layer_set(default_layer); 239 default_layer_set(default_layer);
@@ -344,7 +344,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
344 case MACRO_QWERTY: 344 case MACRO_QWERTY:
345 if (record->event.pressed) 345 if (record->event.pressed)
346 { 346 {
347 persistant_default_layer_set(1UL<<LAYER_QWERTY); 347 persistent_default_layer_set(1UL<<LAYER_QWERTY);
348 } 348 }
349 break; 349 break;
350 350
diff --git a/keyboards/planck/keymaps/sgoodwin/keymap.c b/keyboards/planck/keymaps/sgoodwin/keymap.c
index 4d5d3d7ef..bf8249cc8 100644
--- a/keyboards/planck/keymaps/sgoodwin/keymap.c
+++ b/keyboards/planck/keymaps/sgoodwin/keymap.c
@@ -139,7 +139,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
139#endif 139#endif
140 140
141 141
142void persistant_default_layer_set(uint16_t default_layer) { 142void persistent_default_layer_set(uint16_t default_layer) {
143 eeconfig_update_default_layer(default_layer); 143 eeconfig_update_default_layer(default_layer);
144 default_layer_set(default_layer); 144 default_layer_set(default_layer);
145} 145}
@@ -151,7 +151,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
151 #ifdef AUDIO_ENABLE 151 #ifdef AUDIO_ENABLE
152 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 152 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
153 #endif 153 #endif
154 persistant_default_layer_set(1UL<<_QWERTY); 154 persistent_default_layer_set(1UL<<_QWERTY);
155 } 155 }
156 return false; 156 return false;
157 break; 157 break;
@@ -160,7 +160,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
160 #ifdef AUDIO_ENABLE 160 #ifdef AUDIO_ENABLE
161 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 161 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
162 #endif 162 #endif
163 persistant_default_layer_set(1UL<<_COLEMAK); 163 persistent_default_layer_set(1UL<<_COLEMAK);
164 } 164 }
165 return false; 165 return false;
166 break; 166 break;
diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c
index 708f699da..8cf24d472 100644
--- a/keyboards/planck/keymaps/smt/keymap.c
+++ b/keyboards/planck/keymaps/smt/keymap.c
@@ -162,7 +162,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
162#endif 162#endif
163 163
164 164
165void persistant_default_layer_set(uint16_t default_layer) { 165void persistent_default_layer_set(uint16_t default_layer) {
166 eeconfig_update_default_layer(default_layer); 166 eeconfig_update_default_layer(default_layer);
167 default_layer_set(default_layer); 167 default_layer_set(default_layer);
168} 168}
@@ -174,7 +174,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
174 #ifdef AUDIO_ENABLE 174 #ifdef AUDIO_ENABLE
175 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 175 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
176 #endif 176 #endif
177 persistant_default_layer_set(1UL<<_QWERTY); 177 persistent_default_layer_set(1UL<<_QWERTY);
178 } 178 }
179 return false; 179 return false;
180 break; 180 break;
@@ -183,7 +183,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
183 #ifdef AUDIO_ENABLE 183 #ifdef AUDIO_ENABLE
184 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 184 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
185 #endif 185 #endif
186 persistant_default_layer_set(1UL<<_COLEMAK); 186 persistent_default_layer_set(1UL<<_COLEMAK);
187 } 187 }
188 return false; 188 return false;
189 break; 189 break;
@@ -192,7 +192,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
192 #ifdef AUDIO_ENABLE 192 #ifdef AUDIO_ENABLE
193 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 193 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
194 #endif 194 #endif
195 persistant_default_layer_set(1UL<<_DVORAK); 195 persistent_default_layer_set(1UL<<_DVORAK);
196 } 196 }
197 return false; 197 return false;
198 break; 198 break;
diff --git a/keyboards/planck/keymaps/thermal_printer/keymap.c b/keyboards/planck/keymaps/thermal_printer/keymap.c
index e88059731..c047d56b3 100644
--- a/keyboards/planck/keymaps/thermal_printer/keymap.c
+++ b/keyboards/planck/keymaps/thermal_printer/keymap.c
@@ -183,7 +183,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
183#endif 183#endif
184 184
185 185
186void persistant_default_layer_set(uint16_t default_layer) { 186void persistent_default_layer_set(uint16_t default_layer) {
187 eeconfig_update_default_layer(default_layer); 187 eeconfig_update_default_layer(default_layer);
188 default_layer_set(default_layer); 188 default_layer_set(default_layer);
189} 189}
@@ -195,7 +195,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
195 #ifdef AUDIO_ENABLE 195 #ifdef AUDIO_ENABLE
196 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 196 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
197 #endif 197 #endif
198 persistant_default_layer_set(1UL<<_QWERTY); 198 persistent_default_layer_set(1UL<<_QWERTY);
199 } 199 }
200 return false; 200 return false;
201 break; 201 break;
@@ -204,7 +204,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
204 #ifdef AUDIO_ENABLE 204 #ifdef AUDIO_ENABLE
205 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 205 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
206 #endif 206 #endif
207 persistant_default_layer_set(1UL<<_COLEMAK); 207 persistent_default_layer_set(1UL<<_COLEMAK);
208 } 208 }
209 return false; 209 return false;
210 break; 210 break;
@@ -213,7 +213,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
213 #ifdef AUDIO_ENABLE 213 #ifdef AUDIO_ENABLE
214 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 214 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
215 #endif 215 #endif
216 persistant_default_layer_set(1UL<<_DVORAK); 216 persistent_default_layer_set(1UL<<_DVORAK);
217 } 217 }
218 return false; 218 return false;
219 break; 219 break;
diff --git a/keyboards/planck/keymaps/unicode/keymap.c b/keyboards/planck/keymaps/unicode/keymap.c
index 1b4ca8ed7..51b980e08 100644
--- a/keyboards/planck/keymaps/unicode/keymap.c
+++ b/keyboards/planck/keymaps/unicode/keymap.c
@@ -209,7 +209,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
209 209
210 210
211 211
212void persistant_default_layer_set(uint16_t default_layer) { 212void persistent_default_layer_set(uint16_t default_layer) {
213 eeconfig_update_default_layer(default_layer); 213 eeconfig_update_default_layer(default_layer);
214 default_layer_set(default_layer); 214 default_layer_set(default_layer);
215} 215}
@@ -222,7 +222,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
222 #ifdef AUDIO_ENABLE 222 #ifdef AUDIO_ENABLE
223 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 223 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
224 #endif 224 #endif
225 persistant_default_layer_set(1UL<<_QWERTY); 225 persistent_default_layer_set(1UL<<_QWERTY);
226 } 226 }
227 break; 227 break;
228 case _COLEMAK: 228 case _COLEMAK:
@@ -230,7 +230,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
230 #ifdef AUDIO_ENABLE 230 #ifdef AUDIO_ENABLE
231 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 231 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
232 #endif 232 #endif
233 persistant_default_layer_set(1UL<<_COLEMAK); 233 persistent_default_layer_set(1UL<<_COLEMAK);
234 } 234 }
235 break; 235 break;
236 case _DVORAK: 236 case _DVORAK:
@@ -238,7 +238,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
238 #ifdef AUDIO_ENABLE 238 #ifdef AUDIO_ENABLE
239 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 239 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
240 #endif 240 #endif
241 persistant_default_layer_set(1UL<<_DVORAK); 241 persistent_default_layer_set(1UL<<_DVORAK);
242 } 242 }
243 break; 243 break;
244 case _LOWER: 244 case _LOWER:
diff --git a/keyboards/planck/keymaps/xyverz/keymap.c b/keyboards/planck/keymaps/xyverz/keymap.c
index 329bb043a..c60c6e719 100644
--- a/keyboards/planck/keymaps/xyverz/keymap.c
+++ b/keyboards/planck/keymaps/xyverz/keymap.c
@@ -159,7 +159,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
159#endif 159#endif
160 160
161 161
162void persistant_default_layer_set(uint16_t default_layer) { 162void persistent_default_layer_set(uint16_t default_layer) {
163 eeconfig_update_default_layer(default_layer); 163 eeconfig_update_default_layer(default_layer);
164 default_layer_set(default_layer); 164 default_layer_set(default_layer);
165} 165}
@@ -171,7 +171,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
171 #ifdef AUDIO_ENABLE 171 #ifdef AUDIO_ENABLE
172 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 172 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
173 #endif 173 #endif
174 persistant_default_layer_set(1UL<<_QWERTY); 174 persistent_default_layer_set(1UL<<_QWERTY);
175 } 175 }
176 return false; 176 return false;
177 break; 177 break;
@@ -180,7 +180,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
180 #ifdef AUDIO_ENABLE 180 #ifdef AUDIO_ENABLE
181 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 181 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
182 #endif 182 #endif
183 persistant_default_layer_set(1UL<<_COLEMAK); 183 persistent_default_layer_set(1UL<<_COLEMAK);
184 } 184 }
185 return false; 185 return false;
186 break; 186 break;
@@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
189 #ifdef AUDIO_ENABLE 189 #ifdef AUDIO_ENABLE
190 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 190 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
191 #endif 191 #endif
192 persistant_default_layer_set(1UL<<_DVORAK); 192 persistent_default_layer_set(1UL<<_DVORAK);
193 } 193 }
194 return false; 194 return false;
195 break; 195 break;
diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c
index 2c47b2289..0b1dd7619 100644
--- a/keyboards/planck/keymaps/zach/zach_common_functions.c
+++ b/keyboards/planck/keymaps/zach/zach_common_functions.c
@@ -16,7 +16,7 @@ void tap(uint16_t keycode){
16 unregister_code(keycode); 16 unregister_code(keycode);
17}; 17};
18 18
19void persistant_default_layer_set(uint16_t default_layer){ 19void persistent_default_layer_set(uint16_t default_layer){
20 eeconfig_update_default_layer(default_layer); 20 eeconfig_update_default_layer(default_layer);
21 default_layer_set(default_layer); 21 default_layer_set(default_layer);
22}; 22};
@@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
200 switch (keycode) { 200 switch (keycode) {
201 case COLEMAK: 201 case COLEMAK:
202 if(record->event.pressed){ 202 if(record->event.pressed){
203 persistant_default_layer_set(1UL<<_COLEMAK); 203 persistent_default_layer_set(1UL<<_COLEMAK);
204 #ifdef AUDIO_ENABLE 204 #ifdef AUDIO_ENABLE
205 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 205 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
206 #endif 206 #endif
@@ -209,7 +209,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
209 break; 209 break;
210 case SWCOLE: 210 case SWCOLE:
211 if(record->event.pressed){ 211 if(record->event.pressed){
212 persistant_default_layer_set(1UL<<_SWCOLE); 212 persistent_default_layer_set(1UL<<_SWCOLE);
213 #ifdef AUDIO_ENABLE 213 #ifdef AUDIO_ENABLE
214 PLAY_NOTE_ARRAY(tone_swcole, false, 0); 214 PLAY_NOTE_ARRAY(tone_swcole, false, 0);
215 #endif 215 #endif
diff --git a/keyboards/preonic/keymaps/0xdec/keymap.c b/keyboards/preonic/keymaps/0xdec/keymap.c
index 6c4b8a6fa..2f06c8c31 100644
--- a/keyboards/preonic/keymaps/0xdec/keymap.c
+++ b/keyboards/preonic/keymaps/0xdec/keymap.c
@@ -134,7 +134,7 @@ void matrix_init_user(void) {
134 #endif 134 #endif
135} 135}
136 136
137void persistant_default_layer_set(uint16_t default_layer) { 137void persistent_default_layer_set(uint16_t default_layer) {
138 eeconfig_update_default_layer(default_layer); 138 eeconfig_update_default_layer(default_layer);
139 default_layer_set(default_layer); 139 default_layer_set(default_layer);
140} 140}
@@ -146,7 +146,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
146 #ifdef AUDIO_ENABLE 146 #ifdef AUDIO_ENABLE
147 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 147 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
148 #endif 148 #endif
149 persistant_default_layer_set(1UL<<_COLEMAK); 149 persistent_default_layer_set(1UL<<_COLEMAK);
150 } 150 }
151 break; 151 break;
152 case GAME: 152 case GAME:
@@ -154,7 +154,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
154 #ifdef AUDIO_ENABLE 154 #ifdef AUDIO_ENABLE
155 PLAY_NOTE_ARRAY(tone_game, false, STACCATO); 155 PLAY_NOTE_ARRAY(tone_game, false, STACCATO);
156 #endif 156 #endif
157 persistant_default_layer_set(1UL<<_GAME); 157 persistent_default_layer_set(1UL<<_GAME);
158 } 158 }
159 break; 159 break;
160 case RAISE: 160 case RAISE:
diff --git a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c
index a500a3649..7b5be0734 100644
--- a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c
+++ b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c
@@ -225,7 +225,7 @@ float tone_colemak[][2] = SONG(COLEMAK_SOUND);
225float goodbye[][2] = SONG(GOODBYE_SOUND); 225float goodbye[][2] = SONG(GOODBYE_SOUND);
226#endif 226#endif
227 227
228void persistant_default_layer_set(uint16_t default_layer) { 228void persistent_default_layer_set(uint16_t default_layer) {
229 eeconfig_update_default_layer(default_layer); 229 eeconfig_update_default_layer(default_layer);
230 default_layer_set(default_layer); 230 default_layer_set(default_layer);
231} 231}
@@ -238,7 +238,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
238 #ifdef AUDIO_ENABLE 238 #ifdef AUDIO_ENABLE
239 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 239 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
240 #endif 240 #endif
241 persistant_default_layer_set(1UL<<_QWERTY); 241 persistent_default_layer_set(1UL<<_QWERTY);
242 } 242 }
243 break; 243 break;
244 case _COLEMAK: 244 case _COLEMAK:
@@ -246,7 +246,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
246 #ifdef AUDIO_ENABLE 246 #ifdef AUDIO_ENABLE
247 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 247 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
248 #endif 248 #endif
249 persistant_default_layer_set(1UL<<_COLEMAK); 249 persistent_default_layer_set(1UL<<_COLEMAK);
250 } 250 }
251 break; 251 break;
252 case _DVORAK: 252 case _DVORAK:
@@ -254,7 +254,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
254 #ifdef AUDIO_ENABLE 254 #ifdef AUDIO_ENABLE
255 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 255 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
256 #endif 256 #endif
257 persistant_default_layer_set(1UL<<_DVORAK); 257 persistent_default_layer_set(1UL<<_DVORAK);
258 } 258 }
259 break; 259 break;
260 case _GAME: 260 case _GAME:
@@ -262,7 +262,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
262 #ifdef AUDIO_ENABLE 262 #ifdef AUDIO_ENABLE
263 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 263 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
264 #endif 264 #endif
265 persistant_default_layer_set(1UL<<_GAME); 265 persistent_default_layer_set(1UL<<_GAME);
266 } 266 }
267 break; 267 break;
268 case _NUMPAD: 268 case _NUMPAD:
@@ -270,7 +270,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
270 #ifdef AUDIO_ENABLE 270 #ifdef AUDIO_ENABLE
271 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 271 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
272 #endif 272 #endif
273 persistant_default_layer_set(1UL<<_NUMPAD); 273 persistent_default_layer_set(1UL<<_NUMPAD);
274 } 274 }
275 break; 275 break;
276 case _ARROW: 276 case _ARROW:
@@ -278,7 +278,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
278 #ifdef AUDIO_ENABLE 278 #ifdef AUDIO_ENABLE
279 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 279 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
280 #endif 280 #endif
281 persistant_default_layer_set(1UL<<_LOWER); 281 persistent_default_layer_set(1UL<<_LOWER);
282 } 282 }
283 break; 283 break;
284 case _LOWER: 284 case _LOWER:
diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c
index 3313af945..2516a726b 100644
--- a/keyboards/preonic/keymaps/default/keymap.c
+++ b/keyboards/preonic/keymaps/default/keymap.c
@@ -180,7 +180,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
180float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); 180float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
181#endif 181#endif
182 182
183void persistant_default_layer_set(uint16_t default_layer) { 183void persistent_default_layer_set(uint16_t default_layer) {
184 eeconfig_update_default_layer(default_layer); 184 eeconfig_update_default_layer(default_layer);
185 default_layer_set(default_layer); 185 default_layer_set(default_layer);
186} 186}
@@ -192,7 +192,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
192 #ifdef AUDIO_ENABLE 192 #ifdef AUDIO_ENABLE
193 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 193 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
194 #endif 194 #endif
195 persistant_default_layer_set(1UL<<_QWERTY); 195 persistent_default_layer_set(1UL<<_QWERTY);
196 } 196 }
197 return false; 197 return false;
198 break; 198 break;
@@ -201,7 +201,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
201 #ifdef AUDIO_ENABLE 201 #ifdef AUDIO_ENABLE
202 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 202 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
203 #endif 203 #endif
204 persistant_default_layer_set(1UL<<_COLEMAK); 204 persistent_default_layer_set(1UL<<_COLEMAK);
205 } 205 }
206 return false; 206 return false;
207 break; 207 break;
@@ -210,7 +210,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
210 #ifdef AUDIO_ENABLE 210 #ifdef AUDIO_ENABLE
211 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 211 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
212 #endif 212 #endif
213 persistant_default_layer_set(1UL<<_DVORAK); 213 persistent_default_layer_set(1UL<<_DVORAK);
214 } 214 }
215 return false; 215 return false;
216 break; 216 break;
diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c
index 72ccc86cd..09f465de1 100644
--- a/keyboards/preonic/keymaps/jacwib/keymap.c
+++ b/keyboards/preonic/keymaps/jacwib/keymap.c
@@ -196,7 +196,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
196float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); 196float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
197#endif 197#endif
198 198
199void persistant_default_layer_set(uint16_t default_layer) { 199void persistent_default_layer_set(uint16_t default_layer) {
200 eeconfig_update_default_layer(default_layer); 200 eeconfig_update_default_layer(default_layer);
201 default_layer_set(default_layer); 201 default_layer_set(default_layer);
202} 202}
@@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
205 switch (keycode) { 205 switch (keycode) {
206 case QWERTY: 206 case QWERTY:
207 if (record->event.pressed) { 207 if (record->event.pressed) {
208 persistant_default_layer_set(1UL<<_QWERTY); 208 persistent_default_layer_set(1UL<<_QWERTY);
209 } 209 }
210 return false; 210 return false;
211 break; 211 break;
@@ -231,7 +231,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
231 break; 231 break;
232 case MQWERTY: 232 case MQWERTY:
233 if (record->event.pressed) { 233 if (record->event.pressed) {
234 persistant_default_layer_set(1UL<<_MQWERTY); 234 persistent_default_layer_set(1UL<<_MQWERTY);
235 } 235 }
236 return false; 236 return false;
237 break; 237 break;
diff --git a/keyboards/preonic/keymaps/kinesis/keymap.c b/keyboards/preonic/keymaps/kinesis/keymap.c
index 9691be91d..214f51a46 100644
--- a/keyboards/preonic/keymaps/kinesis/keymap.c
+++ b/keyboards/preonic/keymaps/kinesis/keymap.c
@@ -82,7 +82,7 @@ float tone_startup[][2] = {
82float tone_goodbye[][2] = SONG(GOODBYE_SOUND); 82float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
83float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); 83float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
84 84
85void persistant_default_layer_set(uint16_t default_layer) { 85void persistent_default_layer_set(uint16_t default_layer) {
86 eeconfig_update_default_layer(default_layer); 86 eeconfig_update_default_layer(default_layer);
87 default_layer_set(default_layer); 87 default_layer_set(default_layer);
88} 88}
diff --git a/keyboards/preonic/keymaps/nikchi/Makefile b/keyboards/preonic/keymaps/nikchi/Makefile
new file mode 100644
index 000000000..3d4659ceb
--- /dev/null
+++ b/keyboards/preonic/keymaps/nikchi/Makefile
@@ -0,0 +1,3 @@
1ifndef QUANTUM_DIR
2 include ../../../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/nikchi/config.h b/keyboards/preonic/keymaps/nikchi/config.h
new file mode 100644
index 000000000..4c6158199
--- /dev/null
+++ b/keyboards/preonic/keymaps/nikchi/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/nikchi/keymap.c b/keyboards/preonic/keymaps/nikchi/keymap.c
new file mode 100644
index 000000000..249dd1e64
--- /dev/null
+++ b/keyboards/preonic/keymaps/nikchi/keymap.c
@@ -0,0 +1,221 @@
1#include "preonic.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4#ifdef AUDIO_ENABLE
5 #include "audio.h"
6#endif
7
8// Each layer gets a name for readability, which is then used in the keymap matrix below.
9// The underscores don't mean anything - you can have a layer called STUFF or any other name.
10// Layer names don't all need to be of the same length, obviously, and you can also skip them
11// entirely and just use numbers.
12
13enum preonic_layers {
14 _QWERTY,
15 _COLEMAK,
16 _DVORAK,
17 _LOWER,
18 _RAISE,
19 _ADJUST
20};
21
22enum preonic_keycodes {
23 QWERTY = SAFE_RANGE,
24 LOWER,
25 RAISE,
26 BACKLIT
27};
28
29// Fillers to make layering more clear
30#define _______ KC_TRNS
31#define XXXXXXX KC_NO
32
33const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
34
35/* Qwerty
36 * ,-----------------------------------------------------------------------------------.
37 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
38 * |------+------+------+------+------+------+------+------+------+------+------+------|
39 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
40 * |------+------+------+------+------+-------------+------+------+------+------+------|
41 * | CTRL | A | S | D | F | G | H | J | K | L | ; | " |
42 * |------+------+------+------+------+------|------+------+------+------+------+------|
43 * | Lower| Z | X | C | V | B | N | M | , | . | / |Raise |
44 * |------+------+------+------+------+------+------+------+------+------+------+------|
45 * | Brite| Ctrl | Alt | GUI |BKSP |SHIFT |ENTER |SPC | Left | Down | Up |Right |
46 * `-----------------------------------------------------------------------------------'
47 */
48[_QWERTY] = {
49 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
50 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL},
51 {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
52 {LOWER , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RAISE },
53 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_LSFT, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
54},
55
56/* Lower
57 * ,-----------------------------------------------------------------------------------.
58 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
59 * |------+------+------+------+------+-------------+------+------+------+------+------|
60 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
61 * |------+------+------+------+------+-------------+------+------+------+------+------|
62 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
63 * |------+------+------+------+------+------|------+------+------+------+------+------|
64 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
65 * |------+------+------+------+------+------+------+------+------+------+------+------|
66 * | | | | | | | | Next | Vol- | Vol+ | Play |
67 * `-----------------------------------------------------------------------------------'
68 */
69[_LOWER] = {
70 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
71 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
72 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
73 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
74 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
75},
76
77/* Raise
78 * ,-----------------------------------------------------------------------------------.
79 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
80 * |------+------+------+------+------+------+------+------+------+------+------+------|
81 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
82 * |------+------+------+------+------+-------------+------+------+------+------+------|
83 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
84 * |------+------+------+------+------+------|------+------+------+------+------+------|
85 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
86 * |------+------+------+------+------+------+------+------+------+------+------+------|
87 * | | | | | | | | Next | Vol- | Vol+ | Play |
88 * `-----------------------------------------------------------------------------------'
89 */
90[_RAISE] = {
91 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
92 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
93 {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
94 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______},
95 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
96},
97
98/* Adjust (Lower + Raise)
99 * ,-----------------------------------------------------------------------------------.
100 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
101 * |------+------+------+------+------+------+------+------+------+------+------+------|
102 * | | Reset| | | | | | | | | | Del |
103 * |------+------+------+------+------+-------------+------+------+------+------+------|
104 * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
105 * |------+------+------+------+------+------|------+------+------+------+------+------|
106 * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
107 * |------+------+------+------+------+------+------+------+------+------+------+------|
108 * | | | | | | | | | | | |
109 * `-----------------------------------------------------------------------------------'
110 */
111[_ADJUST] = {
112 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
113 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
114 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______},
115 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
116 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
117}
118
119
120};
121
122#ifdef AUDIO_ENABLE
123float tone_startup[][2] = {
124 {NOTE_B5, 20},
125 {NOTE_B6, 8},
126 {NOTE_DS6, 20},
127 {NOTE_B6, 8}
128};
129
130float tone_qwerty[][2] = SONG(QWERTY_SOUND);
131float tone_dvorak[][2] = SONG(DVORAK_SOUND);
132float tone_colemak[][2] = SONG(COLEMAK_SOUND);
133
134float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
135
136float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
137#endif
138
139void persistent_default_layer_set(uint16_t default_layer) {
140 eeconfig_update_default_layer(default_layer);
141 default_layer_set(default_layer);
142}
143
144bool process_record_user(uint16_t keycode, keyrecord_t *record) {
145 switch (keycode) {
146 case QWERTY:
147 if (record->event.pressed) {
148 #ifdef AUDIO_ENABLE
149 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
150 #endif
151 persistent_default_layer_set(1UL<<_QWERTY);
152 }
153 return false;
154 break;
155 case LOWER:
156 if (record->event.pressed) {
157 layer_on(_LOWER);
158 update_tri_layer(_LOWER, _RAISE, _ADJUST);
159 } else {
160 layer_off(_LOWER);
161 update_tri_layer(_LOWER, _RAISE, _ADJUST);
162 }
163 return false;
164 break;
165 case RAISE:
166 if (record->event.pressed) {
167 layer_on(_RAISE);
168 update_tri_layer(_LOWER, _RAISE, _ADJUST);
169 } else {
170 layer_off(_RAISE);
171 update_tri_layer(_LOWER, _RAISE, _ADJUST);
172 }
173 return false;
174 break;
175 case BACKLIT:
176 if (record->event.pressed) {
177 register_code(KC_RSFT);
178 #ifdef BACKLIGHT_ENABLE
179 backlight_step();
180 #endif
181 } else {
182 unregister_code(KC_RSFT);
183 }
184 return false;
185 break;
186 }
187 return true;
188};
189
190void matrix_init_user(void) {
191 #ifdef AUDIO_ENABLE
192 startup_user();
193 #endif
194}
195
196#ifdef AUDIO_ENABLE
197
198void startup_user()
199{
200 _delay_ms(20); // gets rid of tick
201 PLAY_NOTE_ARRAY(tone_startup, false, 0);
202}
203
204void shutdown_user()
205{
206 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
207 _delay_ms(150);
208 stop_all_notes();
209}
210
211void music_on_user(void)
212{
213 music_scale_user();
214}
215
216void music_scale_user(void)
217{
218 PLAY_NOTE_ARRAY(music_scale, false, 0);
219}
220
221#endif
diff --git a/keyboards/preonic/keymaps/nikchi/readme.md b/keyboards/preonic/keymaps/nikchi/readme.md
new file mode 100644
index 000000000..e911968dd
--- /dev/null
+++ b/keyboards/preonic/keymaps/nikchi/readme.md
@@ -0,0 +1 @@
# The default Preonic layout - largely based on the Planck's \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c
index a10deb750..5972e918c 100644
--- a/keyboards/preonic/keymaps/smt/keymap.c
+++ b/keyboards/preonic/keymaps/smt/keymap.c
@@ -183,7 +183,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
183float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); 183float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
184#endif 184#endif
185 185
186void persistant_default_layer_set(uint16_t default_layer) { 186void persistent_default_layer_set(uint16_t default_layer) {
187 eeconfig_update_default_layer(default_layer); 187 eeconfig_update_default_layer(default_layer);
188 default_layer_set(default_layer); 188 default_layer_set(default_layer);
189} 189}
@@ -195,7 +195,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
195 #ifdef AUDIO_ENABLE 195 #ifdef AUDIO_ENABLE
196 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 196 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
197 #endif 197 #endif
198 persistant_default_layer_set(1UL<<_QWERTY); 198 persistent_default_layer_set(1UL<<_QWERTY);
199 } 199 }
200 return false; 200 return false;
201 break; 201 break;
@@ -204,7 +204,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
204 #ifdef AUDIO_ENABLE 204 #ifdef AUDIO_ENABLE
205 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 205 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
206 #endif 206 #endif
207 persistant_default_layer_set(1UL<<_COLEMAK); 207 persistent_default_layer_set(1UL<<_COLEMAK);
208 } 208 }
209 return false; 209 return false;
210 break; 210 break;
@@ -213,7 +213,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
213 #ifdef AUDIO_ENABLE 213 #ifdef AUDIO_ENABLE
214 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 214 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
215 #endif 215 #endif
216 persistant_default_layer_set(1UL<<_DVORAK); 216 persistent_default_layer_set(1UL<<_DVORAK);
217 } 217 }
218 return false; 218 return false;
219 break; 219 break;
diff --git a/keyboards/preonic/keymaps/xyverz/keymap.c b/keyboards/preonic/keymaps/xyverz/keymap.c
index c8457cda1..1275aa18f 100644
--- a/keyboards/preonic/keymaps/xyverz/keymap.c
+++ b/keyboards/preonic/keymaps/xyverz/keymap.c
@@ -177,7 +177,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
177float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); 177float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
178#endif 178#endif
179 179
180void persistant_default_layer_set(uint16_t default_layer) { 180void persistent_default_layer_set(uint16_t default_layer) {
181 eeconfig_update_default_layer(default_layer); 181 eeconfig_update_default_layer(default_layer);
182 default_layer_set(default_layer); 182 default_layer_set(default_layer);
183} 183}
@@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
189 #ifdef AUDIO_ENABLE 189 #ifdef AUDIO_ENABLE
190 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 190 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
191 #endif 191 #endif
192 persistant_default_layer_set(1UL<<_QWERTY); 192 persistent_default_layer_set(1UL<<_QWERTY);
193 } 193 }
194 return false; 194 return false;
195 break; 195 break;
@@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
198 #ifdef AUDIO_ENABLE 198 #ifdef AUDIO_ENABLE
199 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 199 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
200 #endif 200 #endif
201 persistant_default_layer_set(1UL<<_COLEMAK); 201 persistent_default_layer_set(1UL<<_COLEMAK);
202 } 202 }
203 return false; 203 return false;
204 break; 204 break;
@@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
207 #ifdef AUDIO_ENABLE 207 #ifdef AUDIO_ENABLE
208 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 208 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
209 #endif 209 #endif
210 persistant_default_layer_set(1UL<<_DVORAK); 210 persistent_default_layer_set(1UL<<_DVORAK);
211 } 211 }
212 return false; 212 return false;
213 break; 213 break;
diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c
index 2c47b2289..0b1dd7619 100644
--- a/keyboards/preonic/keymaps/zach/zach_common_functions.c
+++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c
@@ -16,7 +16,7 @@ void tap(uint16_t keycode){
16 unregister_code(keycode); 16 unregister_code(keycode);
17}; 17};
18 18
19void persistant_default_layer_set(uint16_t default_layer){ 19void persistent_default_layer_set(uint16_t default_layer){
20 eeconfig_update_default_layer(default_layer); 20 eeconfig_update_default_layer(default_layer);
21 default_layer_set(default_layer); 21 default_layer_set(default_layer);
22}; 22};
@@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
200 switch (keycode) { 200 switch (keycode) {
201 case COLEMAK: 201 case COLEMAK:
202 if(record->event.pressed){ 202 if(record->event.pressed){
203 persistant_default_layer_set(1UL<<_COLEMAK); 203 persistent_default_layer_set(1UL<<_COLEMAK);
204 #ifdef AUDIO_ENABLE 204 #ifdef AUDIO_ENABLE
205 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 205 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
206 #endif 206 #endif
@@ -209,7 +209,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
209 break; 209 break;
210 case SWCOLE: 210 case SWCOLE:
211 if(record->event.pressed){ 211 if(record->event.pressed){
212 persistant_default_layer_set(1UL<<_SWCOLE); 212 persistent_default_layer_set(1UL<<_SWCOLE);
213 #ifdef AUDIO_ENABLE 213 #ifdef AUDIO_ENABLE
214 PLAY_NOTE_ARRAY(tone_swcole, false, 0); 214 PLAY_NOTE_ARRAY(tone_swcole, false, 0);
215 #endif 215 #endif
diff --git a/keyboards/readme.md b/keyboards/readme.md
index 5b7b28207..4fa2a74de 100644
--- a/keyboards/readme.md
+++ b/keyboards/readme.md
@@ -45,6 +45,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not
45* [JD45](/keyboards/jd45) &mdash; Another Geekhack community project, designed by jdcarpe. 45* [JD45](/keyboards/jd45) &mdash; Another Geekhack community project, designed by jdcarpe.
46* [KC60](/keyboards/kc60) &mdash; A programmable Chinese-made keyboard, lost in the mists of time. 46* [KC60](/keyboards/kc60) &mdash; A programmable Chinese-made keyboard, lost in the mists of time.
47* [Kinesis Advantage](/keyboards/kinesis) &mdash; Contoured ergonomic keyboard by Kinesis Computer Ergonomics. 47* [Kinesis Advantage](/keyboards/kinesis) &mdash; Contoured ergonomic keyboard by Kinesis Computer Ergonomics.
48* [KMAC](/keyboards/kmac) &mdash; Korean custom keyboard.
48* [The Kitten Paw](/keyboards/kitten_paw) &mdash; A replacement controller (2016 revision) for the Filco Majestouch by [Bathroom Epiphanies](https://github.com/BathroomEpiphanies). 49* [The Kitten Paw](/keyboards/kitten_paw) &mdash; A replacement controller (2016 revision) for the Filco Majestouch by [Bathroom Epiphanies](https://github.com/BathroomEpiphanies).
49* [Lets Split](/keyboards/lets_split) - Split ortholinear 40% keyboard. 50* [Lets Split](/keyboards/lets_split) - Split ortholinear 40% keyboard.
50* [Phantom](/keyboards/phantom) &mdash; A tenkeyless kit by Teel, also from Geekhack. 51* [Phantom](/keyboards/phantom) &mdash; A tenkeyless kit by Teel, also from Geekhack.
diff --git a/keyboards/roadkit/keymaps/default/keymap.c b/keyboards/roadkit/keymaps/default/keymap.c
index 3fc18915a..048e80748 100644
--- a/keyboards/roadkit/keymaps/default/keymap.c
+++ b/keyboards/roadkit/keymaps/default/keymap.c
@@ -31,7 +31,7 @@ const uint16_t PROGMEM fn_actions[] = {
31 31
32}; 32};
33 33
34void persistant_default_layer_set(uint16_t default_layer) { 34void persistent_default_layer_set(uint16_t default_layer) {
35 eeconfig_update_default_layer(default_layer); 35 eeconfig_update_default_layer(default_layer);
36 default_layer_set(default_layer); 36 default_layer_set(default_layer);
37} 37}
@@ -41,7 +41,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
41 switch(id) { 41 switch(id) {
42 case _NP: 42 case _NP:
43 if (record->event.pressed) { 43 if (record->event.pressed) {
44 persistant_default_layer_set(1UL<<_NP); 44 persistent_default_layer_set(1UL<<_NP);
45 } 45 }
46 break; 46 break;
47 } 47 }
diff --git a/keyboards/roadkit/keymaps/singles/keymap.c b/keyboards/roadkit/keymaps/singles/keymap.c
index 5ee7a752b..1c6aa7883 100644
--- a/keyboards/roadkit/keymaps/singles/keymap.c
+++ b/keyboards/roadkit/keymaps/singles/keymap.c
@@ -38,7 +38,7 @@ const uint16_t PROGMEM fn_actions[] = {
38 38
39}; 39};
40 40
41void persistant_default_layer_set(uint16_t default_layer) { 41void persistent_default_layer_set(uint16_t default_layer) {
42 eeconfig_update_default_layer(default_layer); 42 eeconfig_update_default_layer(default_layer);
43 default_layer_set(default_layer); 43 default_layer_set(default_layer);
44} 44}
@@ -48,12 +48,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
48 switch(id) { 48 switch(id) {
49 case _L1: 49 case _L1:
50 if (record->event.pressed) { 50 if (record->event.pressed) {
51 persistant_default_layer_set(1UL<<_L1); 51 persistent_default_layer_set(1UL<<_L1);
52 } 52 }
53 break; 53 break;
54 case _NP: 54 case _NP:
55 if (record->event.pressed) { 55 if (record->event.pressed) {
56 persistant_default_layer_set(1UL<<_NP); 56 persistent_default_layer_set(1UL<<_NP);
57 } 57 }
58 break; 58 break;
59 } 59 }
diff --git a/keyboards/satan/keymaps/colemak/Makefile b/keyboards/satan/keymaps/colemak/Makefile
new file mode 100644
index 000000000..2a7ff2779
--- /dev/null
+++ b/keyboards/satan/keymaps/colemak/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 = 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/satan/keymaps/colemak/keymap.c b/keyboards/satan/keymaps/colemak/keymap.c
new file mode 100644
index 000000000..ffb0d10c0
--- /dev/null
+++ b/keyboards/satan/keymaps/colemak/keymap.c
@@ -0,0 +1,98 @@
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 _BL 0
12#define _FL 1
13
14#define _______ KC_TRNS
15
16const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
17 /* Keymap _BL: (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 * |CAPS | 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 |Alt |Gui |FN |Ctrl |
28 * `-----------------------------------------------------------'
29 */
30[_BL] = KEYMAP_ANSI(
31 F(0), 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, \
32 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, \
33 KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,KC_QUOT, KC_ENT, \
34 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \
35 KC_LCTL, MO(_FL), KC_LGUI, KC_SPC, KC_RALT,KC_RGUI, MO(_FL),KC_RCTL),
36
37 /* Keymap _FL: Function Layer
38 * ,-----------------------------------------------------------.
39 * | | | | | | | | | | | | | | RESET|
40 * |-----------------------------------------------------------|
41 * | | | | | | | | | | | |BL-|BL+|BL |
42 * |--------------------------------------------ΩΩ---------------|
43 * | | | | | | | | | | | | |
44 * |-----------------------------------------------------------|
45 * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | |
46 * |-----------------------------------------------------------|
47 * | | | | | | | | |
48 * `-----------------------------------------------------------'
49 */
50[_FL] = KEYMAP_ANSI(
51 #ifdef RGBLIGHT_ENABLE
52 KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \
53 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG, \
54 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
55 _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______, \
56 _______,_______,_______, _______, _______,_______,_______, _______),
57 #else
58 KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \
59 _______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, BL_DEC, BL_INC,BL_TOGG, \
60 KC_DEL, KC_VOLD,KC_MUTE,KC_VOLU,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,_______,_______, \
61 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
62 _______,_______,_______, _______, _______,_______,_______,_______),
63 #endif
64};
65
66enum function_id {
67 SHIFT_ESC,
68};
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/satan/keymaps/colemak/readme.md b/keyboards/satan/keymaps/colemak/readme.md
new file mode 100644
index 000000000..59bd4d124
--- /dev/null
+++ b/keyboards/satan/keymaps/colemak/readme.md
@@ -0,0 +1 @@
# Colemak layout for GH60 Satan
diff --git a/keyboards/satan/keymaps/smt/keymap.c b/keyboards/satan/keymaps/smt/keymap.c
index d90849914..bf919da87 100644
--- a/keyboards/satan/keymaps/smt/keymap.c
+++ b/keyboards/satan/keymaps/smt/keymap.c
@@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
111 ) 111 )
112}; 112};
113 113
114void persistant_default_layer_set(uint16_t default_layer) { 114void persistent_default_layer_set(uint16_t default_layer) {
115 eeconfig_update_default_layer(default_layer); 115 eeconfig_update_default_layer(default_layer);
116 default_layer_set(default_layer); 116 default_layer_set(default_layer);
117} 117}
@@ -120,19 +120,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
120 switch (keycode) { 120 switch (keycode) {
121 case QWERTY: 121 case QWERTY:
122 if (record->event.pressed) { 122 if (record->event.pressed) {
123 persistant_default_layer_set(1UL<<_QWERTY); 123 persistent_default_layer_set(1UL<<_QWERTY);
124 } 124 }
125 return false; 125 return false;
126 break; 126 break;
127 case COLEMAK: 127 case COLEMAK:
128 if (record->event.pressed) { 128 if (record->event.pressed) {
129 persistant_default_layer_set(1UL<<_COLEMAK); 129 persistent_default_layer_set(1UL<<_COLEMAK);
130 } 130 }
131 return false; 131 return false;
132 break; 132 break;
133 case DVORAK: 133 case DVORAK:
134 if (record->event.pressed) { 134 if (record->event.pressed) {
135 persistant_default_layer_set(1UL<<_DVORAK); 135 persistent_default_layer_set(1UL<<_DVORAK);
136 } 136 }
137 return false; 137 return false;
138 break; 138 break;
diff --git a/keyboards/subatomic/keymaps/default/keymap.c b/keyboards/subatomic/keymaps/default/keymap.c
index 628ade9b6..f4aa50eba 100644
--- a/keyboards/subatomic/keymaps/default/keymap.c
+++ b/keyboards/subatomic/keymaps/default/keymap.c
@@ -177,7 +177,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
177float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); 177float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
178#endif 178#endif
179 179
180void persistant_default_layer_set(uint16_t default_layer) { 180void persistent_default_layer_set(uint16_t default_layer) {
181 eeconfig_update_default_layer(default_layer); 181 eeconfig_update_default_layer(default_layer);
182 default_layer_set(default_layer); 182 default_layer_set(default_layer);
183} 183}
@@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
189 #ifdef AUDIO_ENABLE 189 #ifdef AUDIO_ENABLE
190 PLAY_NOTE_ARRAY(tone_qwerty, false, 0); 190 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
191 #endif 191 #endif
192 persistant_default_layer_set(1UL<<_QWERTY); 192 persistent_default_layer_set(1UL<<_QWERTY);
193 } 193 }
194 return false; 194 return false;
195 break; 195 break;
@@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
198 #ifdef AUDIO_ENABLE 198 #ifdef AUDIO_ENABLE
199 PLAY_NOTE_ARRAY(tone_colemak, false, 0); 199 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
200 #endif 200 #endif
201 persistant_default_layer_set(1UL<<_COLEMAK); 201 persistent_default_layer_set(1UL<<_COLEMAK);
202 } 202 }
203 return false; 203 return false;
204 break; 204 break;
@@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
207 #ifdef AUDIO_ENABLE 207 #ifdef AUDIO_ENABLE
208 PLAY_NOTE_ARRAY(tone_dvorak, false, 0); 208 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
209 #endif 209 #endif
210 persistant_default_layer_set(1UL<<_DVORAK); 210 persistent_default_layer_set(1UL<<_DVORAK);
211 } 211 }
212 return false; 212 return false;
213 break; 213 break;
diff --git a/keyboards/tv44/keymaps/default/keymap.c b/keyboards/tv44/keymaps/default/keymap.c
index b9fe33a7c..b4a32d6f6 100644
--- a/keyboards/tv44/keymaps/default/keymap.c
+++ b/keyboards/tv44/keymaps/default/keymap.c
@@ -69,7 +69,7 @@ const uint16_t PROGMEM fn_actions[] = {
69 69
70}; 70};
71 71
72void persistant_default_layer_set(uint16_t default_layer) { 72void persistent_default_layer_set(uint16_t default_layer) {
73 eeconfig_update_default_layer(default_layer); 73 eeconfig_update_default_layer(default_layer);
74 default_layer_set(default_layer); 74 default_layer_set(default_layer);
75} 75}
@@ -79,17 +79,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
79 switch(id) { 79 switch(id) {
80 case _DV: 80 case _DV:
81 if (record->event.pressed) { 81 if (record->event.pressed) {
82 persistant_default_layer_set(1UL<<_DV); 82 persistent_default_layer_set(1UL<<_DV);
83 } 83 }
84 break; 84 break;
85 case _QW: 85 case _QW:
86 if (record->event.pressed) { 86 if (record->event.pressed) {
87 persistant_default_layer_set(1UL<<_QW); 87 persistent_default_layer_set(1UL<<_QW);
88 } 88 }
89 break; 89 break;
90 case _CM: 90 case _CM:
91 if (record->event.pressed) { 91 if (record->event.pressed) {
92 persistant_default_layer_set(1UL<<_CM); 92 persistent_default_layer_set(1UL<<_CM);
93 } 93 }
94 break; 94 break;
95 } 95 }
diff --git a/keyboards/tv44/keymaps/jeebak/keymap.c b/keyboards/tv44/keymaps/jeebak/keymap.c
index 1bb1015c3..0d0c07164 100644
--- a/keyboards/tv44/keymaps/jeebak/keymap.c
+++ b/keyboards/tv44/keymaps/jeebak/keymap.c
@@ -285,7 +285,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
285/*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/ 285/*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/
286}; 286};
287 287
288void persistant_default_layer_set(uint16_t default_layer) { 288void persistent_default_layer_set(uint16_t default_layer) {
289 eeconfig_update_default_layer(default_layer); 289 eeconfig_update_default_layer(default_layer);
290 default_layer_set(default_layer); 290 default_layer_set(default_layer);
291} 291}
diff --git a/keyboards/tv44/keymaps/jeebak/readme.md b/keyboards/tv44/keymaps/jeebak/readme.md
index 43d20958a..f781d5555 100644
--- a/keyboards/tv44/keymaps/jeebak/readme.md
+++ b/keyboards/tv44/keymaps/jeebak/readme.md
@@ -8,7 +8,7 @@ needed, they will be mapped to home row keys. The `keymap.c` file will contain
8the exact changes. The diagrams in this README shows the highlights of the 8the exact changes. The diagrams in this README shows the highlights of the
9changes from the default mappings. 9changes from the default mappings.
10 10
11I also decided to change all calls to `persistant_default_layer_set()` to 11I also decided to change all calls to `persistent_default_layer_set()` to
12`default_layer_set()` since this is my personal perference. 12`default_layer_set()` since this is my personal perference.
13 13
14## Macros 14## Macros
diff --git a/keyboards/tv44/keymaps/smt/keymap.c b/keyboards/tv44/keymaps/smt/keymap.c
index 532e74de0..dfd624466 100644
--- a/keyboards/tv44/keymaps/smt/keymap.c
+++ b/keyboards/tv44/keymaps/smt/keymap.c
@@ -171,7 +171,7 @@ ALT_T(BACKLIT), _______ , _______ , KC_MPLY , KC_MNXT , _____
171/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/ 171/*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
172}; 172};
173 173
174void persistant_default_layer_set(uint16_t default_layer) { 174void persistent_default_layer_set(uint16_t default_layer) {
175 eeconfig_update_default_layer(default_layer); 175 eeconfig_update_default_layer(default_layer);
176 default_layer_set(default_layer); 176 default_layer_set(default_layer);
177} 177}
@@ -180,19 +180,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
180 switch (keycode) { 180 switch (keycode) {
181 case QWERTY: 181 case QWERTY:
182 if (record->event.pressed) { 182 if (record->event.pressed) {
183 persistant_default_layer_set(1UL<<_QWERTY); 183 persistent_default_layer_set(1UL<<_QWERTY);
184 } 184 }
185 return false; 185 return false;
186 break; 186 break;
187 case COLEMAK: 187 case COLEMAK:
188 if (record->event.pressed) { 188 if (record->event.pressed) {
189 persistant_default_layer_set(1UL<<_COLEMAK); 189 persistent_default_layer_set(1UL<<_COLEMAK);
190 } 190 }
191 return false; 191 return false;
192 break; 192 break;
193 case DVORAK: 193 case DVORAK:
194 if (record->event.pressed) { 194 if (record->event.pressed) {
195 persistant_default_layer_set(1UL<<_DVORAK); 195 persistent_default_layer_set(1UL<<_DVORAK);
196 } 196 }
197 return false; 197 return false;
198 break; 198 break;
diff --git a/keyboards/tv44/keymaps/xyverz/keymap.c b/keyboards/tv44/keymaps/xyverz/keymap.c
index 3ff16de35..d710d8024 100644
--- a/keyboards/tv44/keymaps/xyverz/keymap.c
+++ b/keyboards/tv44/keymaps/xyverz/keymap.c
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
71 } 71 }
72}; 72};
73 73
74void persistant_default_layer_set(uint16_t default_layer) { 74void persistent_default_layer_set(uint16_t default_layer) {
75 eeconfig_update_default_layer(default_layer); 75 eeconfig_update_default_layer(default_layer);
76 default_layer_set(default_layer); 76 default_layer_set(default_layer);
77} 77}
@@ -80,19 +80,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
80 switch (keycode) { 80 switch (keycode) {
81 case QWERTY: 81 case QWERTY:
82 if (record->event.pressed) { 82 if (record->event.pressed) {
83 persistant_default_layer_set(1UL<<_QWERTY); 83 persistent_default_layer_set(1UL<<_QWERTY);
84 } 84 }
85 return false; 85 return false;
86 break; 86 break;
87 case COLEMAK: 87 case COLEMAK:
88 if (record->event.pressed) { 88 if (record->event.pressed) {
89 persistant_default_layer_set(1UL<<_COLEMAK); 89 persistent_default_layer_set(1UL<<_COLEMAK);
90 } 90 }
91 return false; 91 return false;
92 break; 92 break;
93 case DVORAK: 93 case DVORAK:
94 if (record->event.pressed) { 94 if (record->event.pressed) {
95 persistant_default_layer_set(1UL<<_DVORAK); 95 persistent_default_layer_set(1UL<<_DVORAK);
96 } 96 }
97 return false; 97 return false;
98 break; 98 break;
diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c
index 3282761c0..15ce68897 100644
--- a/keyboards/vision_division/keymaps/default/keymap.c
+++ b/keyboards/vision_division/keymaps/default/keymap.c
@@ -299,7 +299,7 @@ float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
299 299
300#endif /* AUDIO_ENABLE */ 300#endif /* AUDIO_ENABLE */
301 301
302void persistant_default_layer_set(uint16_t default_layer) 302void persistent_default_layer_set(uint16_t default_layer)
303{ 303{
304 eeconfig_update_default_layer(default_layer); 304 eeconfig_update_default_layer(default_layer);
305 default_layer_set(default_layer); 305 default_layer_set(default_layer);
@@ -427,7 +427,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
427 case MACRO_QWERTY: 427 case MACRO_QWERTY:
428 if (record->event.pressed) 428 if (record->event.pressed)
429 { 429 {
430 persistant_default_layer_set(1UL<<LAYER_QWERTY); 430 persistent_default_layer_set(1UL<<LAYER_QWERTY);
431 } 431 }
432 break; 432 break;
433 433
diff --git a/quantum/dynamic_macro.h b/quantum/dynamic_macro.h
index f242405de..045ee95b5 100644
--- a/quantum/dynamic_macro.h
+++ b/quantum/dynamic_macro.h
@@ -274,6 +274,10 @@ bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t *record)
274 macro_id = 0; 274 macro_id = 0;
275 } 275 }
276 return false; 276 return false;
277 case DYN_MACRO_PLAY1:
278 case DYN_MACRO_PLAY2:
279 dprintln("dynamic macro: ignoring macro play key while recording");
280 return false;
277 default: 281 default:
278 /* Store the key in the macro buffer and process it normally. */ 282 /* Store the key in the macro buffer and process it normally. */
279 switch (macro_id) { 283 switch (macro_id) {
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index b807ec3c3..4fd45810b 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -127,14 +127,22 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
127 return true; 127 return true;
128} 128}
129 129
130
131
130void matrix_scan_tap_dance () { 132void matrix_scan_tap_dance () {
131 if (highest_td == -1) 133 if (highest_td == -1)
132 return; 134 return;
135 uint16_t tap_user_defined;
133 136
134for (int i = 0; i <= highest_td; i++) { 137for (uint8_t i = 0; i <= highest_td; i++) {
135 qk_tap_dance_action_t *action = &tap_dance_actions[i]; 138 qk_tap_dance_action_t *action = &tap_dance_actions[i];
136 139 if(action->custom_tapping_term > 0 ) {
137 if (action->state.count && timer_elapsed (action->state.timer) > TAPPING_TERM) { 140 tap_user_defined = action->custom_tapping_term;
141 }
142 else{
143 tap_user_defined = TAPPING_TERM;
144 }
145 if (action->state.count && timer_elapsed (action->state.timer) > tap_user_defined) {
138 process_tap_dance_action_on_dance_finished (action); 146 process_tap_dance_action_on_dance_finished (action);
139 reset_tap_dance (&action->state); 147 reset_tap_dance (&action->state);
140 } 148 }
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h
index 330809f83..f42c154a0 100644
--- a/quantum/process_keycode/process_tap_dance.h
+++ b/quantum/process_keycode/process_tap_dance.h
@@ -44,6 +44,7 @@ typedef struct
44 qk_tap_dance_user_fn_t on_reset; 44 qk_tap_dance_user_fn_t on_reset;
45 } fn; 45 } fn;
46 qk_tap_dance_state_t state; 46 qk_tap_dance_state_t state;
47 uint16_t custom_tapping_term;
47 void *user_data; 48 void *user_data;
48} qk_tap_dance_action_t; 49} qk_tap_dance_action_t;
49 50
@@ -68,6 +69,12 @@ typedef struct
68 .user_data = NULL, \ 69 .user_data = NULL, \
69 } 70 }
70 71
72#define ACTION_TAP_DANCE_FN_ADVANCED_TIME(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, tap_specific_tapping_term) { \
73 .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \
74 .user_data = NULL, \
75 .custom_tapping_term = tap_specific_tapping_term, \
76 }
77
71extern qk_tap_dance_action_t tap_dance_actions[]; 78extern qk_tap_dance_action_t tap_dance_actions[];
72 79
73/* To be used internally */ 80/* To be used internally */
diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c
index 0227fbdd7..75f35112b 100644
--- a/quantum/process_keycode/process_unicodemap.c
+++ b/quantum/process_keycode/process_unicodemap.c
@@ -49,7 +49,7 @@ bool process_unicode_map(uint16_t keycode, keyrecord_t *record) {
49 if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { 49 if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) {
50 const uint32_t* map = unicode_map; 50 const uint32_t* map = unicode_map;
51 uint16_t index = keycode - QK_UNICODE_MAP; 51 uint16_t index = keycode - QK_UNICODE_MAP;
52 uint32_t code = pgm_read_dword_far(&map[index]); 52 uint32_t code = pgm_read_dword(&map[index]);
53 if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) { 53 if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) {
54 // Convert to UTF-16 surrogate pair 54 // Convert to UTF-16 surrogate pair
55 code -= 0x10000; 55 code -= 0x10000;
diff --git a/readme.md b/readme.md
index f7bf14b6a..6cdce7240 100644
--- a/readme.md
+++ b/readme.md
@@ -1,18 +1,21 @@
1# Quantum Mechanical Keyboard Firmware 1# Quantum Mechanical Keyboard Firmware
2 2
3[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) [![Gitter](https://badges.gitter.im/qmk/qmk_firmware.svg)](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) 3[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware)
4[![Gitter](https://img.shields.io/gitter/room/qmk/qmk_firmware.js.svg)](https://gitter.im/qmk/qmk_firmware)
5[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm)
6[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)
7[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/)
4 8
5This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). 9This is a keyboard firmware based on the [tmk\_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR and ARM controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/).
6 10
7## Official website (currently under construction with the move to the wiki) 11## Official website
8 12
9For an easy-to-read version of this document and the repository, check out [http://qmk.fm](http://qmk.fm). Nicely formatted keyboard and keymap listings are also available there, along with the ability to download .hex files instead of having to setup a build environment and compile them. 13[http://qmk.fm](http://qmk.fm) is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK.
10 14
11## Included Keyboards 15## Supported Keyboards
12 16
13* [Planck](/keyboards/planck/) 17* [Planck](/keyboards/planck/)
14* [Preonic](/keyboards/preonic/) 18* [Preonic](/keyboards/preonic/)
15* [Atomic](/keyboards/atomic/)
16* [ErgoDox EZ](/keyboards/ergodox/) 19* [ErgoDox EZ](/keyboards/ergodox/)
17* [Clueboard](/keyboards/clueboard/) 20* [Clueboard](/keyboards/clueboard/)
18* [Cluepad](/keyboards/cluepad/) 21* [Cluepad](/keyboards/cluepad/)
@@ -21,19 +24,8 @@ The project also includes community support for [lots of other keyboards](/keybo
21 24
22## Maintainers 25## Maintainers
23 26
24QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). This repo used to be a fork of [TMK](https://github.com/tmk/tmk_keyboard), and we are incredibly grateful for his founding contributions to the firmware. We've had to break the fork due to purely technical reasons - it simply became too different over time, and we've had to start refactoring some of the basic bits and pieces. We are huge fans of TMK and Hasu :) 27QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), and the Clueboard by [Zach White](https://github.com/skullydazed).
25 28
26This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/qmk/qmk_firmware/issues/new). 29## Documentation
27 30
28The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), and the Clueboard by [Zach White](https://github.com/skullydazed). 31[https://docs.qmk.fm](https://docs.qmk.fm) is hosted on [Gitbook](https://www.gitbook.com/book/qmk/firmware/details) and [Github](/docs/) (they are synced). You can request changes by making a fork and [pull request](https://github.com/qmk/qmk_firmware/pulls), or by clicking the "suggest an edit" link on any page of the Docs.
29
30## Documentation roadmap
31
32This is not a tiny project. While this is the main readme, there are many other files you might want to consult. Here are some points of interest:
33
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, 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:
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.
39* The [TMK documentation](doc/TMK_README.md). QMK is based on TMK, and this explains how it works internally.
diff --git a/secrets.tar.enc b/secrets.tar.enc
new file mode 100644
index 000000000..03fdf41c8
--- /dev/null
+++ b/secrets.tar.enc
Binary files differ
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index 3e0bd7dbc..edec2acb4 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -95,27 +95,35 @@ endif
95 95
96ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) 96ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
97 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE 97 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
98 TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
98endif 99endif
99 100
100ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) 101ifeq ($(strip $(BLUETOOTH)), AdafruitBLE)
101 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE 102 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
102 TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_BLE 103 TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_BLE
104 TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
103endif 105endif
104 106
105ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) 107ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey)
106 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE 108 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
107 TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_EZKEY 109 TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_EZKEY
110 TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
108endif 111endif
109 112
110ifeq ($(strip $(BLUETOOTH)), RN42) 113ifeq ($(strip $(BLUETOOTH)), RN42)
111 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE 114 TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
112 TMK_COMMON_DEFS += -DMODULE_RN42 115 TMK_COMMON_DEFS += -DMODULE_RN42
116 TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
113endif 117endif
114 118
115ifeq ($(strip $(ONEHAND_ENABLE)), yes) 119ifeq ($(strip $(ONEHAND_ENABLE)), yes)
116 TMK_COMMON_DEFS += -DONEHAND_ENABLE 120 TMK_COMMON_DEFS += -DONEHAND_ENABLE
117endif 121endif
118 122
123ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes)
124 TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
125endif
126
119ifeq ($(strip $(KEYMAP_SECTION_ENABLE)), yes) 127ifeq ($(strip $(KEYMAP_SECTION_ENABLE)), yes)
120 TMK_COMMON_DEFS += -DKEYMAP_SECTION_ENABLE 128 TMK_COMMON_DEFS += -DKEYMAP_SECTION_ENABLE
121 129
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index 8640dfab3..cffc0b9eb 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
26#include "action_macro.h" 26#include "action_macro.h"
27#include "action_util.h" 27#include "action_util.h"
28#include "action.h" 28#include "action.h"
29#include "wait.h"
29 30
30#ifdef DEBUG_ACTION 31#ifdef DEBUG_ACTION
31#include "debug.h" 32#include "debug.h"
@@ -33,6 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
33#include "nodebug.h" 34#include "nodebug.h"
34#endif 35#endif
35 36
37int tp_buttons;
38
36#ifdef FAUXCLICKY_ENABLE 39#ifdef FAUXCLICKY_ENABLE
37#include <fauxclicky.h> 40#include <fauxclicky.h>
38#endif 41#endif
@@ -310,9 +313,35 @@ void process_action(keyrecord_t *record, action_t action)
310 /* Mouse key */ 313 /* Mouse key */
311 case ACT_MOUSEKEY: 314 case ACT_MOUSEKEY:
312 if (event.pressed) { 315 if (event.pressed) {
316 switch (action.key.code) {
317 case KC_MS_BTN1:
318 tp_buttons |= (1<<0);
319 break;
320 case KC_MS_BTN2:
321 tp_buttons |= (1<<1);
322 break;
323 case KC_MS_BTN3:
324 tp_buttons |= (1<<2);
325 break;
326 default:
327 break;
328 }
313 mousekey_on(action.key.code); 329 mousekey_on(action.key.code);
314 mousekey_send(); 330 mousekey_send();
315 } else { 331 } else {
332 switch (action.key.code) {
333 case KC_MS_BTN1:
334 tp_buttons &= ~(1<<0);
335 break;
336 case KC_MS_BTN2:
337 tp_buttons &= ~(1<<1);
338 break;
339 case KC_MS_BTN3:
340 tp_buttons &= ~(1<<2);
341 break;
342 default:
343 break;
344 }
316 mousekey_off(action.key.code); 345 mousekey_off(action.key.code);
317 mousekey_send(); 346 mousekey_send();
318 } 347 }
@@ -438,6 +467,9 @@ void process_action(keyrecord_t *record, action_t action)
438 } else { 467 } else {
439 if (tap_count > 0) { 468 if (tap_count > 0) {
440 dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n"); 469 dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n");
470 if (action.layer_tap.code == KC_CAPS) {
471 wait_ms(80);
472 }
441 unregister_code(action.layer_tap.code); 473 unregister_code(action.layer_tap.code);
442 } else { 474 } else {
443 dprint("KEYMAP_TAP_KEY: No tap: Off on release\n"); 475 dprint("KEYMAP_TAP_KEY: No tap: Off on release\n");
diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c
index bd9a69ae0..531a3ca34 100644
--- a/tmk_core/common/action_tapping.c
+++ b/tmk_core/common/action_tapping.c
@@ -96,7 +96,7 @@ bool process_tapping(keyrecord_t *keyp)
96 // enqueue 96 // enqueue
97 return false; 97 return false;
98 } 98 }
99#if TAPPING_TERM >= 500 99#if TAPPING_TERM >= 500 || defined PERMISSIVE_HOLD
100 /* Process a key typed within TAPPING_TERM 100 /* Process a key typed within TAPPING_TERM
101 * This can register the key before settlement of tapping, 101 * This can register the key before settlement of tapping,
102 * useful for long TAPPING_TERM but may prevent fast typing. 102 * useful for long TAPPING_TERM but may prevent fast typing.
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index eac1f1dd8..97a8f1cd8 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -61,23 +61,51 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
61# include "visualizer/visualizer.h" 61# include "visualizer/visualizer.h"
62#endif 62#endif
63 63
64#ifdef MATRIX_HAS_GHOST
65extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
66static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata){
67 matrix_row_t out = 0;
68 for (uint8_t col = 0; col < MATRIX_COLS; col++) {
69 //read each key in the row data and check if the keymap defines it as a real key
70 if (pgm_read_byte(&keymaps[0][row][col]) && (rowdata & (1<<col))){
71 //this creates new row data, if a key is defined in the keymap, it will be set here
72 out |= 1<<col;
73 }
74 }
75 return out;
76}
64 77
78static inline bool popcount_more_than_one(matrix_row_t rowdata)
79{
80 rowdata &= rowdata-1; //if there are less than two bits (keys) set, rowdata will become zero
81 return rowdata;
82}
65 83
66#ifdef MATRIX_HAS_GHOST 84static inline bool has_ghost_in_row(uint8_t row, matrix_row_t rowdata)
67static bool has_ghost_in_row(uint8_t row)
68{ 85{
69 matrix_row_t matrix_row = matrix_get_row(row); 86 /* No ghost exists when less than 2 keys are down on the row.
70 // No ghost exists when less than 2 keys are down on the row 87 If there are "active" blanks in the matrix, the key can't be pressed by the user,
71 if (((matrix_row - 1) & matrix_row) == 0) 88 there is no doubt as to which keys are really being pressed.
89 The ghosts will be ignored, they are KC_NO. */
90 rowdata = get_real_keys(row, rowdata);
91 if ((popcount_more_than_one(rowdata)) == 0){
72 return false; 92 return false;
73 93 }
74 // Ghost occurs when the row shares column line with other row 94 /* Ghost occurs when the row shares a column line with other row,
95 and two columns are read on each row. Blanks in the matrix don't matter,
96 so they are filtered out.
97 If there are two or more real keys pressed and they match columns with
98 at least two of another row's real keys, the row will be ignored. Keep in mind,
99 we are checking one row at a time, not all of them at once.
100 */
75 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 101 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
76 if (i != row && (matrix_get_row(i) & matrix_row)) 102 if (i != row && popcount_more_than_one(get_real_keys(i, matrix_get_row(i)) & rowdata)){
77 return true; 103 return true;
104 }
78 } 105 }
79 return false; 106 return false;
80} 107}
108
81#endif 109#endif
82 110
83__attribute__ ((weak)) 111__attribute__ ((weak))
@@ -127,7 +155,7 @@ void keyboard_task(void)
127{ 155{
128 static matrix_row_t matrix_prev[MATRIX_ROWS]; 156 static matrix_row_t matrix_prev[MATRIX_ROWS];
129#ifdef MATRIX_HAS_GHOST 157#ifdef MATRIX_HAS_GHOST
130 static matrix_row_t matrix_ghost[MATRIX_ROWS]; 158 // static matrix_row_t matrix_ghost[MATRIX_ROWS];
131#endif 159#endif
132 static uint8_t led_status = 0; 160 static uint8_t led_status = 0;
133 matrix_row_t matrix_row = 0; 161 matrix_row_t matrix_row = 0;
@@ -139,18 +167,18 @@ void keyboard_task(void)
139 matrix_change = matrix_row ^ matrix_prev[r]; 167 matrix_change = matrix_row ^ matrix_prev[r];
140 if (matrix_change) { 168 if (matrix_change) {
141#ifdef MATRIX_HAS_GHOST 169#ifdef MATRIX_HAS_GHOST
142 if (has_ghost_in_row(r)) { 170 if (has_ghost_in_row(r, matrix_row)) {
143 /* Keep track of whether ghosted status has changed for 171 /* Keep track of whether ghosted status has changed for
144 * debugging. But don't update matrix_prev until un-ghosted, or 172 * debugging. But don't update matrix_prev until un-ghosted, or
145 * the last key would be lost. 173 * the last key would be lost.
146 */ 174 */
147 if (debug_matrix && matrix_ghost[r] != matrix_row) { 175 //if (debug_matrix && matrix_ghost[r] != matrix_row) {
148 matrix_print(); 176 // matrix_print();
149 } 177 //}
150 matrix_ghost[r] = matrix_row; 178 //matrix_ghost[r] = matrix_row;
151 continue; 179 continue;
152 } 180 }
153 matrix_ghost[r] = matrix_row; 181 //matrix_ghost[r] = matrix_row;
154#endif 182#endif
155 if (debug_matrix) matrix_print(); 183 if (debug_matrix) matrix_print();
156 for (uint8_t c = 0; c < MATRIX_COLS; c++) { 184 for (uint8_t c = 0; c < MATRIX_COLS; c++) {
diff --git a/tmk_core/common/keyboard.h b/tmk_core/common/keyboard.h
index 7738251b6..f17003c2f 100644
--- a/tmk_core/common/keyboard.h
+++ b/tmk_core/common/keyboard.h
@@ -57,7 +57,6 @@ static inline bool IS_RELEASED(keyevent_t event) { return (!IS_NOEVENT(event) &&
57 .time = (timer_read() | 1) \ 57 .time = (timer_read() | 1) \
58} 58}
59 59
60
61/* it runs once at early stage of startup before keyboard_init. */ 60/* it runs once at early stage of startup before keyboard_init. */
62void keyboard_setup(void); 61void keyboard_setup(void);
63/* it runs once after initializing host side protocol, debug and MCU peripherals. */ 62/* it runs once after initializing host side protocol, debug and MCU peripherals. */
diff --git a/tmk_core/protocol/lufa/adafruit_ble.cpp b/tmk_core/protocol/lufa/adafruit_ble.cpp
index fd6edd42c..bee6bb2c1 100644
--- a/tmk_core/protocol/lufa/adafruit_ble.cpp
+++ b/tmk_core/protocol/lufa/adafruit_ble.cpp
@@ -87,6 +87,7 @@ struct queue_item {
87 uint16_t consumer; 87 uint16_t consumer;
88 struct __attribute__((packed)) { 88 struct __attribute__((packed)) {
89 int8_t x, y, scroll, pan; 89 int8_t x, y, scroll, pan;
90 uint8_t buttons;
90 } mousemove; 91 } mousemove;
91 }; 92 };
92}; 93};
@@ -699,6 +700,22 @@ static bool process_queue_item(struct queue_item *item, uint16_t timeout) {
699 strcpy_P(fmtbuf, PSTR("AT+BLEHIDMOUSEMOVE=%d,%d,%d,%d")); 700 strcpy_P(fmtbuf, PSTR("AT+BLEHIDMOUSEMOVE=%d,%d,%d,%d"));
700 snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->mousemove.x, 701 snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->mousemove.x,
701 item->mousemove.y, item->mousemove.scroll, item->mousemove.pan); 702 item->mousemove.y, item->mousemove.scroll, item->mousemove.pan);
703 if (!at_command(cmdbuf, NULL, 0, true, timeout)) {
704 return false;
705 }
706 strcpy_P(cmdbuf, PSTR("AT+BLEHIDMOUSEBUTTON="));
707 if (item->mousemove.buttons & MOUSE_BTN1) {
708 strcat(cmdbuf, "L");
709 }
710 if (item->mousemove.buttons & MOUSE_BTN2) {
711 strcat(cmdbuf, "R");
712 }
713 if (item->mousemove.buttons & MOUSE_BTN3) {
714 strcat(cmdbuf, "M");
715 }
716 if (item->mousemove.buttons == 0) {
717 strcat(cmdbuf, "0");
718 }
702 return at_command(cmdbuf, NULL, 0, true, timeout); 719 return at_command(cmdbuf, NULL, 0, true, timeout);
703#endif 720#endif
704 default: 721 default:
@@ -757,7 +774,7 @@ bool adafruit_ble_send_consumer_key(uint16_t keycode, int hold_duration) {
757 774
758#ifdef MOUSE_ENABLE 775#ifdef MOUSE_ENABLE
759bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll, 776bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll,
760 int8_t pan) { 777 int8_t pan, uint8_t buttons) {
761 struct queue_item item; 778 struct queue_item item;
762 779
763 item.queue_type = QTMouseMove; 780 item.queue_type = QTMouseMove;
@@ -765,6 +782,7 @@ bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll,
765 item.mousemove.y = y; 782 item.mousemove.y = y;
766 item.mousemove.scroll = scroll; 783 item.mousemove.scroll = scroll;
767 item.mousemove.pan = pan; 784 item.mousemove.pan = pan;
785 item.mousemove.buttons = buttons;
768 786
769 while (!send_buf.enqueue(item)) { 787 while (!send_buf.enqueue(item)) {
770 send_buf_send_one(); 788 send_buf_send_one();
diff --git a/tmk_core/protocol/lufa/adafruit_ble.h b/tmk_core/protocol/lufa/adafruit_ble.h
index b3bab3ca0..036b7d14e 100644
--- a/tmk_core/protocol/lufa/adafruit_ble.h
+++ b/tmk_core/protocol/lufa/adafruit_ble.h
@@ -43,7 +43,7 @@ extern bool adafruit_ble_send_consumer_key(uint16_t keycode, int hold_duration);
43 * The parameters are signed and indicate positive of negative direction 43 * The parameters are signed and indicate positive of negative direction
44 * change. */ 44 * change. */
45extern bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll, 45extern bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll,
46 int8_t pan); 46 int8_t pan, uint8_t buttons);
47#endif 47#endif
48 48
49/* Compute battery voltage by reading an analog pin. 49/* Compute battery voltage by reading an analog pin.
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c
index ae6129d1a..e3f8724e8 100644
--- a/tmk_core/protocol/lufa/lufa.c
+++ b/tmk_core/protocol/lufa/lufa.c
@@ -669,7 +669,7 @@ static void send_mouse(report_mouse_t *report)
669 if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { 669 if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
670 #ifdef MODULE_ADAFRUIT_BLE 670 #ifdef MODULE_ADAFRUIT_BLE
671 // FIXME: mouse buttons 671 // FIXME: mouse buttons
672 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, report->buttons);
673 #else 673 #else
674 bluefruit_serial_send(0xFD); 674 bluefruit_serial_send(0xFD);
675 bluefruit_serial_send(0x00); 675 bluefruit_serial_send(0x00);
@@ -1180,7 +1180,7 @@ int main(void)
1180 1180
1181 print("Keyboard start.\n"); 1181 print("Keyboard start.\n");
1182 while (1) { 1182 while (1) {
1183 #if !defined(BLUETOOTH_ENABLE) 1183 #if !defined(NO_USB_STARTUP_CHECK)
1184 while (USB_DeviceState == DEVICE_STATE_Suspended) { 1184 while (USB_DeviceState == DEVICE_STATE_Suspended) {
1185 print("[s]"); 1185 print("[s]");
1186 suspend_power_down(); 1186 suspend_power_down();
diff --git a/tmk_core/protocol/ps2_mouse.c b/tmk_core/protocol/ps2_mouse.c
index d9ccbecb4..4ed3cae1f 100644
--- a/tmk_core/protocol/ps2_mouse.c
+++ b/tmk_core/protocol/ps2_mouse.c
@@ -72,12 +72,13 @@ void ps2_mouse_init_user(void) {
72 72
73void ps2_mouse_task(void) { 73void ps2_mouse_task(void) {
74 static uint8_t buttons_prev = 0; 74 static uint8_t buttons_prev = 0;
75 extern int tp_buttons;
75 76
76 /* receives packet from mouse */ 77 /* receives packet from mouse */
77 uint8_t rcv; 78 uint8_t rcv;
78 rcv = ps2_host_send(PS2_MOUSE_READ_DATA); 79 rcv = ps2_host_send(PS2_MOUSE_READ_DATA);
79 if (rcv == PS2_ACK) { 80 if (rcv == PS2_ACK) {
80 mouse_report.buttons = ps2_host_recv_response(); 81 mouse_report.buttons = ps2_host_recv_response() | tp_buttons;
81 mouse_report.x = ps2_host_recv_response() * PS2_MOUSE_X_MULTIPLIER; 82 mouse_report.x = ps2_host_recv_response() * PS2_MOUSE_X_MULTIPLIER;
82 mouse_report.y = ps2_host_recv_response() * PS2_MOUSE_Y_MULTIPLIER; 83 mouse_report.y = ps2_host_recv_response() * PS2_MOUSE_Y_MULTIPLIER;
83#ifdef PS2_MOUSE_ENABLE_SCROLLING 84#ifdef PS2_MOUSE_ENABLE_SCROLLING
@@ -106,34 +107,34 @@ void ps2_mouse_task(void) {
106#endif 107#endif
107 host_mouse_send(&mouse_report); 108 host_mouse_send(&mouse_report);
108 } 109 }
109 110
110 ps2_mouse_clear_report(&mouse_report); 111 ps2_mouse_clear_report(&mouse_report);
111} 112}
112 113
113void ps2_mouse_disable_data_reporting(void) { 114void ps2_mouse_disable_data_reporting(void) {
114 PS2_MOUSE_SEND(PS2_MOUSE_DISABLE_DATA_REPORTING, "ps2 mouse disable data reporting"); 115 PS2_MOUSE_SEND(PS2_MOUSE_DISABLE_DATA_REPORTING, "ps2 mouse disable data reporting");
115} 116}
116 117
117void ps2_mouse_enable_data_reporting(void) { 118void ps2_mouse_enable_data_reporting(void) {
118 PS2_MOUSE_SEND(PS2_MOUSE_ENABLE_DATA_REPORTING, "ps2 mouse enable data reporting"); 119 PS2_MOUSE_SEND(PS2_MOUSE_ENABLE_DATA_REPORTING, "ps2 mouse enable data reporting");
119} 120}
120 121
121void ps2_mouse_set_remote_mode(void) { 122void ps2_mouse_set_remote_mode(void) {
122 PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_REMOTE_MODE, "ps2 mouse set remote mode"); 123 PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_REMOTE_MODE, "ps2 mouse set remote mode");
123 ps2_mouse_mode = PS2_MOUSE_REMOTE_MODE; 124 ps2_mouse_mode = PS2_MOUSE_REMOTE_MODE;
124} 125}
125 126
126void ps2_mouse_set_stream_mode(void) { 127void ps2_mouse_set_stream_mode(void) {
127 PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_STREAM_MODE, "ps2 mouse set stream mode"); 128 PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_STREAM_MODE, "ps2 mouse set stream mode");
128 ps2_mouse_mode = PS2_MOUSE_STREAM_MODE; 129 ps2_mouse_mode = PS2_MOUSE_STREAM_MODE;
129} 130}
130 131
131void ps2_mouse_set_scaling_2_1(void) { 132void ps2_mouse_set_scaling_2_1(void) {
132 PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_SCALING_2_1, "ps2 mouse set scaling 2:1"); 133 PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_SCALING_2_1, "ps2 mouse set scaling 2:1");
133} 134}
134 135
135void ps2_mouse_set_scaling_1_1(void) { 136void ps2_mouse_set_scaling_1_1(void) {
136 PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_SCALING_1_1, "ps2 mouse set scaling 1:1"); 137 PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_SCALING_1_1, "ps2 mouse set scaling 1:1");
137} 138}
138 139
139void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution) { 140void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution) {
@@ -204,9 +205,9 @@ static inline void ps2_mouse_enable_scrolling(void) {
204#define PRESS_SCROLL_BUTTONS mouse_report->buttons |= (PS2_MOUSE_SCROLL_BTN_MASK) 205#define PRESS_SCROLL_BUTTONS mouse_report->buttons |= (PS2_MOUSE_SCROLL_BTN_MASK)
205#define RELEASE_SCROLL_BUTTONS mouse_report->buttons &= ~(PS2_MOUSE_SCROLL_BTN_MASK) 206#define RELEASE_SCROLL_BUTTONS mouse_report->buttons &= ~(PS2_MOUSE_SCROLL_BTN_MASK)
206static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report) { 207static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report) {
207 static enum { 208 static enum {
208 SCROLL_NONE, 209 SCROLL_NONE,
209 SCROLL_BTN, 210 SCROLL_BTN,
210 SCROLL_SENT, 211 SCROLL_SENT,
211 } scroll_state = SCROLL_NONE; 212 } scroll_state = SCROLL_NONE;
212 static uint16_t scroll_button_time = 0; 213 static uint16_t scroll_button_time = 0;
@@ -228,10 +229,10 @@ static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report) {
228 mouse_report->y = 0; 229 mouse_report->y = 0;
229 } 230 }
230 } else if (0 == (PS2_MOUSE_SCROLL_BTN_MASK & mouse_report->buttons)) { 231 } else if (0 == (PS2_MOUSE_SCROLL_BTN_MASK & mouse_report->buttons)) {
231 // None of the scroll buttons are pressed 232 // None of the scroll buttons are pressed
232 233
233#if PS2_MOUSE_SCROLL_BTN_SEND 234#if PS2_MOUSE_SCROLL_BTN_SEND
234 if (scroll_state == SCROLL_BTN 235 if (scroll_state == SCROLL_BTN
235 && timer_elapsed(scroll_button_time) < PS2_MOUSE_SCROLL_BTN_SEND) { 236 && timer_elapsed(scroll_button_time) < PS2_MOUSE_SCROLL_BTN_SEND) {
236 PRESS_SCROLL_BUTTONS; 237 PRESS_SCROLL_BUTTONS;
237 host_mouse_send(mouse_report); 238 host_mouse_send(mouse_report);
diff --git a/util/activate_wsl.sh b/util/activate_wsl.sh
new file mode 100644
index 000000000..e2312b56d
--- /dev/null
+++ b/util/activate_wsl.sh
@@ -0,0 +1,17 @@
1#!/bin/bash
2
3function export_variables {
4 local util_dir=~/qmk_utils
5 local download_dir=$util_dir/wsl_downloaded
6
7 export DFU_PROGRAMMER=$download_dir/dfu-programmer/dfu-programmer.exe
8 export DFU_UTIL=$download_dir/dfu-util-0.9-win64/dfu-util.exe
9 export TEENSY_LOADER_CLI=$download_dir/teensy_loader_cli.exe
10 export BATCHISP=batchisp.exe
11}
12
13export_variables
14
15
16
17
diff --git a/util/drivers.txt b/util/drivers.txt
new file mode 100644
index 000000000..d21a748f0
--- /dev/null
+++ b/util/drivers.txt
@@ -0,0 +1,46 @@
1# The format is
2# driver,desc,vid,pid,guid
3# Use a comma as a separator without spaces
4# Driver can be one of winusb,libusb,libusbk
5# Use Windows Powershell and type [guid]::NewGuid() to generate guids
6winusb,Kiibohd DFU Bootloader,1C11,B007,aa5a3f86-b81e-4416-89ad-0c1ea1ed63af
7libusb,ATxmega16C4,03EB,2FD8,23266ee7-5423-4cc4-993b-034571c43a90
8libusb,ATxmega32C4,03EB,2FD9,d4b62886-2ac8-4534-aa24-eae0a2c3ce43
9libusb,ATxmega64C3,03EB,2FD6,08467ca7-9b5a-41d2-8d8a-4a26d0b5285b
10libusb,ATxmega128C3,03EB,2FD7,1ca69799-6d95-46cf-be69-5b3d0eb915e6
11libusb,ATxmega256C3,03EB,2FDA,216ddc8b-6c67-4cc0-b934-482829a483a0
12libusb,ATxmega384C3,03EB,2FDB,0e4e3347-6025-4d49-ba80-2375ea690c28
13libusb,ATxmega64A1U,03EB,2FE8,2553d8fa-7de1-44a6-bdbf-57be8bb37e28
14libusb,ATxmega128A1U,03EB,2FED,6d9fd0ff-755d-4e29-bd29-df0a9a7544b9
15libusb,ATxmega64A4U,03EB,2FDD,bcf5e7c3-44a1-4fd1-971f-9ef9843f6291
16libusb,ATxmega128A4U,03EB,2FDE,3f976bb6-36ca-44cc-a728-844bc1d0d168
17libusb,ATxmega64B3,03EB,2FDF,de280c81-c12a-4ca7-bf34-566151786418
18libusb,ATxmega128B3,03EB,2FE0,2ad1ffeb-eb83-4e78-b34a-d5633771991f
19libusb,ATxmega64B1,03EB,2FE1,002874a6-7fc7-413b-9ac4-2b52c5a230bd
20libusb,ATxmega128B1,03EB,2FEA,60ea9d08-2ae6-4434-b743-ce6f73537136
21libusb,ATxmega256A3BU,03EB,2FE2,5949bd0a-8bd4-417b-b1c5-7d249836bf0d
22libusb,ATxmega16A4U,03EB,2FE3,cc3172b0-e86a-4758-914e-951bca6ca7f5
23libusb,ATxmega32A4U,03EB,2FE4,f44c515f-7d17-4612-a532-ee620afb22b2
24libusb,ATxmega64A4U,03EB,2FE5,c1af4f1c-045f-40c9-893a-3ad4adb2e67d
25libusb,ATxmega128A3U,03EB,2FE6,26f275f0-d6b2-46d8-8334-e4de66996c74
26libusb,ATxmega192A3U,03EB,2FE7,b7b50d98-0429-4235-8f08-5466e4f83ed4
27libusb,UC3,03EB,2FDC,972d9af7-d71b-44c7-a895-9340b362f545
28libusb,ATUC3,03EB,2FE9,d5855d0a-f82e-4df5-9c14-2b0b1dcb65bd
29libusb,AT32UC3C,03EB,2FEB,1eeb52aa-fd24-47fd-8a76-056446d1a54f
30libusb,ATxmega256A3U,03EB,2FEC,198fa8ea-3157-4863-b9a8-a3f6fe027367
31libusb,ATmega8U2,03EB,2FEE,14018055-46f4-4c62-aa03-e8fafeedaf72
32libusb,ATmega16U2,03EB,2FEF,007274da-b75f-492e-a288-8fc0aff8339f
33libusb,ATmega32U2,03EB,2FF0,ddc2c572-cb6e-4f61-a6cc-1a5de941f063
34libusb,AT32UC3A3,03EB,2FF1,8b614283-36c0-46a2-890d-65f61b5b6201
35libusb,ATmega32U6,03EB,2FF2,a207dd90-2814-4418-b5b7-4b708fdf1bfd
36libusb,ATmega16U4,03EB,2FF3,3180d426-bf93-4578-a693-2efbc337da8e
37libusb,ATmega32U4,03EB,2FF4,5f9726fd-f9de-487a-9fbd-8b3524a7a56a
38libusb,AT32UC3B,03EB,2FF6,ef90068a-277a-44db-805a-9b83a6beb29a
39libusb,AT90USB82,03EB,2FF7,062fa2ab-f9d8-4a0d-83c1-df0521cfd0f6
40libusb,AT32UC3A,03EB,2FF8,24080a67-3874-4fb8-8808-fb4cc297c466
41libusb,AT90USB64,03EB,2FF9,c6a708ad-e97d-43cd-b04a-3180d737a71b
42libusb,AT90USB162,03EB,2FFA,de67bff5-6e39-4e9c-8dfe-de7fce113716
43libusb,AT90USB128,03EB,2FFB,fd217df3-59d0-440a-a8f3-4c0c8c84daa3
44libusb,AT89C5130,03EB,2FFD,31b69a56-9ac0-4fab-a3ae-cd7bb7021ec5
45libusb,AT8XC5122,03EB,2FFE,395a6118-8568-41b2-913a-d16912722342
46libusb,AT89C5132,03EB,2FFF,266ca4bc-5e59-4a7b-82dc-6e8732373d40 \ No newline at end of file
diff --git a/util/ergodox_ez.html b/util/ergodox_ez.html
deleted file mode 100644
index 8e9286607..000000000
--- a/util/ergodox_ez.html
+++ /dev/null
@@ -1 +0,0 @@
1<html><head><meta http-equiv="refresh" content="0; url=http://qmk.fm/keyboards/ergodox/" /></head></html> \ No newline at end of file
diff --git a/util/travis_build.sh b/util/travis_build.sh
index 6bafd1941..5b0951c6e 100644
--- a/util/travis_build.sh
+++ b/util/travis_build.sh
@@ -5,7 +5,7 @@ TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}"
5 5
6if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then 6if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
7 exit_code=0 7 exit_code=0
8 NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) 8 NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l)
9 if [[ $NEFM -gt 0 ]] ; then 9 if [[ $NEFM -gt 0 ]] ; then
10 echo "Making all keymaps for all keyboards" 10 echo "Making all keymaps for all keyboards"
11 make all-keyboards AUTOGEN="true" 11 make all-keyboards AUTOGEN="true"
diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh
index 58334cb1f..4e08be120 100644
--- a/util/travis_compiled_push.sh
+++ b/util/travis_compiled_push.sh
@@ -4,11 +4,19 @@ set -o errexit -o nounset
4 4
5rev=$(git rev-parse --short HEAD) 5rev=$(git rev-parse --short HEAD)
6 6
7git config --global user.name "Travis CI"
8git config --global user.email "jack.humb+travis.ci@gmail.com"
9
10if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then 7if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then
11 8
9git config --global user.name "QMK Bot"
10git config --global user.email "hello@qmk.fm"
11
12openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d
13tar xvf secrets.tar
14
15chmod 600 id_rsa_qmk_firmware
16chmod 600 qmk.fm
17eval `ssh-agent -s`
18ssh-add id_rsa_qmk_firmware
19
12increment_version () 20increment_version ()
13{ 21{
14 declare -a part=( ${1//\./ } ) 22 declare -a part=( ${1//\./ } )
@@ -17,14 +25,14 @@ increment_version ()
17 echo -e "${new// /.}" 25 echo -e "${new// /.}"
18} 26}
19 27
20NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) 28NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l)
21if [[ $NEFM -gt 0 ]] ; then 29if [[ $NEFM -gt 0 ]] ; then
22 echo "Essential files modified." 30 echo "Essential files modified."
23 git fetch --tags 31 git fetch --tags
24 lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1) 32 lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1)
25 newtag=$(increment_version $lasttag) 33 newtag=$(increment_version $lasttag)
26 git tag $newtag 34 git tag $newtag
27 git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware 35 git push --tags git@github.com:qmk/qmk_firmware.git
28else 36else
29 echo "No essential files modified." 37 echo "No essential files modified."
30fi 38fi
@@ -33,22 +41,24 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
33 41
34 make ergodox-ez AUTOGEN=true 42 make ergodox-ez AUTOGEN=true
35 43
36 find . -name ".build" | xargs rm -rf
37 cd .. 44 cd ..
38 git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git 45 git clone git@github.com:qmk/qmk.fm.git
39 cd qmk.fm 46 cd qmk.fm
40 git submodule update --init --recursive 47 ssh-add ../qmk_firmware/qmk.fm
48 #git submodule update --init --recursive
41 #rm -rf keyboard 49 #rm -rf keyboard
42 #rm -rf keyboards 50 #rm -rf keyboards
43 yes | cp -rf ../qmk_firmware/keyboards . 51 #yes | cp -rf ../qmk_firmware/keyboards .
44 #mkdir keyboards/ergodox_ez/ 52 #mkdir keyboards/ergodox_ez/
45 cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html 53 #cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html
46 cp ../qmk_firmware/readme.md qmk_readme.md 54 #cp ../qmk_firmware/readme.md qmk_readme.md
47 ./generate.sh 55 #./generate.sh
56 rm -f _compiled/*.hex
57 for file in ../qmk_firmware/keyboards/*/keymaps/*/*.hex; do mv -v "$file" "_compiled/${file##*/}"; done
48 58
49 git add -A 59 git add -A
50 git commit -m "generated from qmk/qmk_firmware@${rev}" 60 git commit -m "generated from qmk/qmk_firmware@${rev}"
51 git push 61 git push git@github.com:qmk/qmk.fm.git
52 62
53fi 63fi
54 64
diff --git a/util/wsl_install.sh b/util/wsl_install.sh
new file mode 100644
index 000000000..8999da8a4
--- /dev/null
+++ b/util/wsl_install.sh
@@ -0,0 +1,159 @@
1#!/bin/bash
2
3download_dir=wsl_downloaded
4
5function install_utils {
6 rm -f -r $download_dir
7 mkdir $download_dir
8
9 pushd $download_dir
10
11 echo "Installing dfu-programmer"
12 wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip'
13 unzip -d dfu-programmer dfu-programmer-win-0.7.2.zip
14
15 echo "Installing dfu-util"
16 wget 'http://dfu-util.sourceforge.net/releases/dfu-util-0.9-win64.zip'
17 unzip dfu-util-0.9-win64.zip
18
19 echo "Installing teensy_loader_cli"
20 wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip'
21 unzip teensy_loader_cli_windows.zip
22
23 echo "Installing Atmel Flip"
24 wget 'http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe'
25 mv Flip\ Installer\ \-\ 3.4.7.112.exe FlipInstaller.exe
26
27 echo "Downloading the QMK driver installer"
28 wget -qO- https://api.github.com/repos/qmk/qmk_driver_installer/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | wget -i -
29
30 rm -f *.zip
31
32 popd > /dev/null
33}
34
35function install_drivers {
36 pushd $download_dir
37 cmd.exe /C qmk_driver_installer.exe $1 $2 ../drivers.txt
38 popd > /dev/null
39}
40
41dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
42
43if [[ $dir != /mnt/* ]];
44then
45 echo
46 echo "You need to clone the qmk_firmware repository outside the linux filesystem."
47 echo "Otherwise the windows executables can't be run."
48 exit 1
49fi
50
51pushd "$dir"
52
53while true; do
54 echo
55 echo "Do you want to install all toolchain dependencies needed for compiling QMK?"
56 echo "This will run install_dependencies.sh, which calls apt-get upgrade."
57 echo "If you don't want that, you can install the dependencies manually."
58 read -p "(Y/N) " res
59 case $res in
60 [Yy]* ) sudo ./install_dependencies.sh; break;;
61 [Nn]* ) break;;
62 * ) echo "Invalid answer";;
63 esac
64done
65
66echo "Installing dependencies needed for the installation (unzip, wget)"
67echo "This will ask for the sudo password"
68sudo apt-get install unzip wget
69
70
71if [ ! -d "$download_dir" ]; then
72 install_utils
73else
74 while true; do
75 echo
76 read -p "The utils seem to already be downloaded, do you want to re-download them and update to the newest version (Y/N) " res
77 case $res in
78 [Yy]* ) install_utils; break;;
79 [Nn]* ) break;;
80 * ) echo "Invalid answer";;
81 esac
82 done
83fi
84
85while true; do
86 echo
87 read -p "Flip need to be installed if you want to use that for programming, do you want to install it now? (Y/N) " res
88 case $res in
89 [Yy]* ) cmd.exe /c $download_dir\\FlipInstaller.exe; break;;
90 [Nn]* ) break;;
91 * ) echo "Invalid answer";;
92 esac
93done
94
95
96while true; do
97 echo
98 echo "Which USB drivers do you want to install?"
99 echo "(A)all - All supported drivers will be installed"
100 echo "(C)onnected - Only drivers for connected keyboards (in bootloader/flashing mode) will be installed"
101 echo "(F)force - Like all, but will also override existing drivers for connected keyboards"
102 echo "(N)one - No drivers will be installed, flashing your keyboard will most likely not work"
103 read -p "(A/C/F/N)? " res
104 case $res in
105 [Aa]* ) install_drivers --all; break;;
106 [Cc]* ) install_drivers; break;;
107 [Ff]* ) install_drivers --all --force; break;;
108 [Nn]* ) break;;
109 * ) echo "Invalid answer";;
110 esac
111done
112
113echo
114echo "Creating a softlink to the utils directory as ~/qmk_utils."
115echo "This is needed so that the the make system can find all utils it need."
116read -p "Press any key to continue (ctrl-c to abort)"
117ln -sfn "$dir" ~/qmk_utils
118
119if grep "^source ~/qmk_utils/activate_wsl.sh$" ~/.bashrc
120then
121 echo
122 echo "The line source ~/qmk_utils/activate_wsl.sh is already added to your /.bashrc"
123 echo "Not adding it twice"
124else
125 while true; do
126 echo
127 echo "Do you want to add 'source ~/qmk_utils/activate_wsl.sh' to the end of you .bashrc file?"
128 echo "Without this make won't find the needed utils, so if you don't want to do it automatically,"
129 echo "then you have to do it manually."
130 read -p "(Y/N)? " res
131 case $res in
132 [Yy]* ) echo "source ~/qmk_utils/activate_wsl.sh" >> ~/.bashrc; break;;
133 [Nn]* ) break;;
134 * ) echo "Invalid answer";;
135 esac
136 done
137fi
138
139while true; do
140 echo
141 echo "Do you want to add a symlink to the QMK repository in your home directory for convenience?"
142 echo "This will create a folder 'qmk_firmware' in your home directory."
143 echo "In the future you can use this folder instead of the full path on your windows file system"
144 read -p "(Y/N)? " res
145 case $res in
146 [Yy]* ) ln -sfn "$dir/.." ~/qmk_firmware; break;;
147 [Nn]* ) break;;
148 * ) echo "Invalid answer";;
149 esac
150done
151
152echo
153echo "******************************************************************************"
154echo "Installation completed!"
155echo "You need to open a new batch command prompt for all the utils to work properly"
156echo "******************************************************************************"
157
158popd > /dev/null
159