]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge pull request #1382 from binaryplease/handwired_binaryplease
authorJack Humbert <jack.humb@gmail.com>
Sat, 10 Jun 2017 01:09:52 +0000 (21:09 -0400)
committerGitHub <noreply@github.com>
Sat, 10 Jun 2017 01:09:52 +0000 (21:09 -0400)
Handwired binaryplease

341 files changed:
.gitignore
Dockerfile
book.json [new file with mode: 0644]
doc/BUILD_GUIDE.md [deleted file]
doc/CYGWIN_GUIDE.md [deleted file]
doc/FUSE.txt [deleted file]
doc/HAND_WIRE.md [deleted file]
doc/PCB_GUIDE.md [deleted file]
doc/POWER.txt [deleted file]
doc/TMK_README.md [deleted file]
doc/USB_NKRO.txt [deleted file]
doc/VAGRANT_GUIDE.md [deleted file]
doc/basic_how_keyboards_work.md [deleted file]
doc/build_old.md [deleted file]
doc/keycode.txt [deleted file]
doc/keymap.md [deleted file]
doc/keymap_config_h_example.h [deleted file]
doc/keymap_makefile_example.mk [deleted file]
doc/other_projects.md [deleted file]
docs/Adding-features-to-QMK.md [new file with mode: 0644]
docs/BUILD_GUIDE.md [new file with mode: 0644]
docs/Becoming-a-QMK-Collaborator.md [new file with mode: 0644]
docs/Build-Environment-Setup.md [new file with mode: 0644]
docs/CYGWIN_GUIDE.md [new file with mode: 0644]
docs/Compatible-Microcontrollers.md [new file with mode: 0644]
docs/Custom-Quantum-Functions.md [new file with mode: 0644]
docs/Differences-from-TMK.md [new file with mode: 0644]
docs/Eclipse.md [new file with mode: 0644]
docs/Embedding.md [new file with mode: 0644]
docs/FAQ-Build.md [new file with mode: 0644]
docs/FAQ-Keymap.md [new file with mode: 0644]
docs/FAQ.md [new file with mode: 0644]
docs/FUSE.txt [new file with mode: 0644]
docs/Git-subtree.md [new file with mode: 0644]
docs/HAND_WIRE.md [new file with mode: 0644]
docs/HHKB-Alt-controller.md [new file with mode: 0644]
docs/Home.md [new file with mode: 0644]
docs/Key-Functions.md [new file with mode: 0644]
docs/Keycodes.md [new file with mode: 0644]
docs/Keymap-examples.md [new file with mode: 0644]
docs/Keymap.md [new file with mode: 0644]
docs/Kiibohd.asciidoc [new file with mode: 0644]
docs/Leader-Key.md [new file with mode: 0644]
docs/License-Clarification-Details.md [new file with mode: 0644]
docs/License-Clarification.md [new file with mode: 0644]
docs/Macros.md [new file with mode: 0644]
docs/Make-Instructions.md [new file with mode: 0644]
docs/Memory-write-error,-use-debug-for-more-info.md [new file with mode: 0644]
docs/Modding-your-keyboard.md [new file with mode: 0644]
docs/Mouse-keys.md [new file with mode: 0644]
docs/Other-Projects.md [new file with mode: 0644]
docs/PCB_GUIDE.md [new file with mode: 0644]
docs/POWER.txt [new file with mode: 0644]
docs/Porting-Your-Keyboard-to-QMK-(ARM-and-other-ChibiOS-CPUs).md [new file with mode: 0644]
docs/Porting-your-keyboard-to-QMK.md [new file with mode: 0644]
docs/Previously-Asked-Questions.asciidoc [new file with mode: 0644]
docs/QMK-Overview.md [new file with mode: 0644]
docs/Report-Descriptor.md [new file with mode: 0644]
docs/SUMMARY.md [new file with mode: 0644]
docs/Space-Cadet-Shift.md [new file with mode: 0644]
docs/TMK-Based-Projects.md [new file with mode: 0644]
docs/TMK-Own-Projects.md [new file with mode: 0644]
docs/TMK_README.md [new file with mode: 0644]
docs/Tap-Dance.md [new file with mode: 0644]
docs/Test-for-ASCIIDOC.asciidoc [new file with mode: 0644]
docs/USB-HID.md [new file with mode: 0644]
docs/USB_NKRO.txt [new file with mode: 0644]
docs/Unicode-and-additional-language-support.md [new file with mode: 0644]
docs/Unit-testing.md [new file with mode: 0644]
docs/VAGRANT_GUIDE.md [new file with mode: 0644]
docs/_Sidebar.md [new file with mode: 0644]
docs/basic_how_keyboards_work.md [new file with mode: 0644]
docs/build_old.md [new file with mode: 0644]
docs/gitbook/images/favicon.ico [new file with mode: 0644]
docs/gitbook/images/favicon.png [new file with mode: 0644]
docs/keycode.txt [new file with mode: 0644]
docs/keymap_config_h_example.h [new file with mode: 0644]
docs/keymap_makefile_example.mk [new file with mode: 0644]
docs/keymap_old.md [new file with mode: 0644]
docs/mbed-cortex-porting.md [new file with mode: 0644]
docs/other_projects.md [new file with mode: 0644]
keyboards/M10A/M10A.c [deleted file]
keyboards/M10A/M10A.h [deleted file]
keyboards/M10A/Makefile [deleted file]
keyboards/M10A/config.h [deleted file]
keyboards/M10A/keymaps/default/Makefile [deleted file]
keyboards/M10A/keymaps/default/keymap.c [deleted file]
keyboards/M10A/rules.mk [deleted file]
keyboards/atomic/keymaps/pvc/keymap.c
keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png [deleted file]
keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png [deleted file]
keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png [deleted file]
keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png [deleted file]
keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png [deleted file]
keyboards/atreus/keymaps/replicaJunction/readme.md
keyboards/atreus/keymaps/xyverz/keymap.c
keyboards/atreus62/keymaps/mneme/README.md
keyboards/atreus62/keymaps/mneme/img/base.png [deleted file]
keyboards/atreus62/keymaps/mneme/img/fun.png [deleted file]
keyboards/atreus62/keymaps/mneme/img/sym.png [deleted file]
keyboards/atreus62/keymaps/xyverz/keymap.c
keyboards/clueboard/keymaps/caps_fn/layout.png [deleted file]
keyboards/clueboard/keymaps/caps_fn/readme.md
keyboards/clueboard/keymaps/default/layout.png [deleted file]
keyboards/clueboard/keymaps/default/readme.md
keyboards/clueboard/keymaps/jokrik/keymap.c [new file with mode: 0644]
keyboards/clueboard/keymaps/jokrik/readme.md [new file with mode: 0644]
keyboards/clueboard/keymaps/mac_optimized/keymap.c
keyboards/clueboard/keymaps/mac_optimized/layout.png [deleted file]
keyboards/clueboard/keymaps/mac_optimized/readme.md
keyboards/clueboard/keymaps/magicmonty/Makefile [new file with mode: 0644]
keyboards/clueboard/keymaps/magicmonty/keymap.c [new file with mode: 0644]
keyboards/clueboard/keymaps/magicmonty/readme.md [new file with mode: 0644]
keyboards/clueboard/keymaps/maximised/layout.png [deleted file]
keyboards/clueboard/keymaps/maximised/readme.md
keyboards/clueboard/keymaps/mouse_keys/layout.png [deleted file]
keyboards/clueboard/keymaps/mouse_keys/readme.md
keyboards/clueboard/keymaps/serubin/layout-base.png [deleted file]
keyboards/clueboard/keymaps/serubin/layout-fn.png [deleted file]
keyboards/clueboard/keymaps/serubin/layout-media.png [deleted file]
keyboards/clueboard/keymaps/serubin/readme.md
keyboards/clueboard/keymaps/shift_fn/keymap.c
keyboards/clueboard/keymaps/shift_fn/layout.png [deleted file]
keyboards/clueboard/keymaps/shift_fn/readme.md
keyboards/clueboard/keymaps/skully/keymap.c
keyboards/clueboard/keymaps/skully/layout.png [deleted file]
keyboards/clueboard/keymaps/skully/readme.md
keyboards/clueboard/keymaps/smt/keymap.c
keyboards/clueboard/keymaps/smt/layout.png [deleted file]
keyboards/clueboard/keymaps/smt/readme.md
keyboards/clueboard/keymaps/unix_optimized/layout.png [deleted file]
keyboards/clueboard/keymaps/unix_optimized/readme.md
keyboards/clueboard/keymaps/win_optimized/layout.png [deleted file]
keyboards/clueboard/keymaps/win_optimized/readme.md
keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c
keyboards/dk60/Makefile [new file with mode: 0644]
keyboards/dk60/config.h [new file with mode: 0644]
keyboards/dk60/dk60.c [new file with mode: 0644]
keyboards/dk60/dk60.h [new file with mode: 0644]
keyboards/dk60/keymaps/default/keymap.c [new file with mode: 0644]
keyboards/dk60/readme.md [new file with mode: 0644]
keyboards/dk60/rules.mk [new file with mode: 0644]
keyboards/ergodox/config.h
keyboards/ergodox/ez/config.h
keyboards/ergodox/keymaps/333fred/Makefile [new file with mode: 0644]
keyboards/ergodox/keymaps/333fred/README.md [new file with mode: 0644]
keyboards/ergodox/keymaps/333fred/keymap.c [new file with mode: 0644]
keyboards/ergodox/keymaps/333fred/visualizer.c [new file with mode: 0644]
keyboards/ergodox/keymaps/adam/config.h [new file with mode: 0644]
keyboards/ergodox/keymaps/adam/keymap.c [new file with mode: 0644]
keyboards/ergodox/keymaps/adam/readme.md [new file with mode: 0644]
keyboards/ergodox/keymaps/dvorak_programmer_swe/keymap.c [new file with mode: 0644]
keyboards/ergodox/keymaps/dvorak_programmer_swe/readme.md [new file with mode: 0644]
keyboards/ergodox/keymaps/xyverz/keymap.c
keyboards/ergodox/readme.md
keyboards/frosty_flake/keymaps/nikchi/Makefile [new file with mode: 0644]
keyboards/frosty_flake/keymaps/nikchi/config.h [new file with mode: 0644]
keyboards/frosty_flake/keymaps/nikchi/keymap.c [new file with mode: 0644]
keyboards/frosty_flake/keymaps/nikchi/readme.md [new file with mode: 0644]
keyboards/frosty_flake/keymaps/nikchi/variableTapDance.md [new file with mode: 0644]
keyboards/frosty_flake/rules.mk
keyboards/gh60/keymaps/xyverz/keymap.c
keyboards/gherkin/Makefile [new file with mode: 0644]
keyboards/gherkin/README.md [new file with mode: 0644]
keyboards/gherkin/config.h [new file with mode: 0644]
keyboards/gherkin/gherkin.c [new file with mode: 0644]
keyboards/gherkin/gherkin.h [new file with mode: 0644]
keyboards/gherkin/keymaps/default/keymap.c [new file with mode: 0644]
keyboards/gherkin/rules.mk [new file with mode: 0644]
keyboards/handwired/atreus50/keymaps/default/keymap.c
keyboards/handwired/magicforce68/README.md
keyboards/handwired/magicforce68/wiring-layout.png [deleted file]
keyboards/handwired/ortho5x13/keymaps/default/keymap.c
keyboards/handwired/promethium/keymaps/priyadi/keymap.c
keyboards/handwired/trackpoint/Makefile [new file with mode: 0644]
keyboards/handwired/trackpoint/README.md [new file with mode: 0644]
keyboards/handwired/trackpoint/config.h [new file with mode: 0644]
keyboards/handwired/trackpoint/keymaps/default/keymap.c [new file with mode: 0644]
keyboards/handwired/trackpoint/rules.mk [new file with mode: 0644]
keyboards/handwired/trackpoint/trackpoint.c [new file with mode: 0644]
keyboards/handwired/trackpoint/trackpoint.h [new file with mode: 0644]
keyboards/hhkb/keymaps/smt/keymap.c
keyboards/jd45/keymaps/jeebak/keymap.c
keyboards/jd45/keymaps/jeebak/readme.md
keyboards/kc60/keymaps/stanleylai/base_layer.png [deleted file]
keyboards/kc60/keymaps/stanleylai/rgb_layer.png [deleted file]
keyboards/kc60/keymaps/workman-dead/kc60-wm-dead.png [deleted file]
keyboards/kc60/keymaps/workman-dead/readme.md
keyboards/kinesis/keymaps/xyverz/keymap.c
keyboards/kmac/Makefile [new file with mode: 0644]
keyboards/kmac/config.h [new file with mode: 0644]
keyboards/kmac/keymaps/default/Makefile [new file with mode: 0644]
keyboards/kmac/keymaps/default/config.h [new file with mode: 0644]
keyboards/kmac/keymaps/default/keymap.c [new file with mode: 0644]
keyboards/kmac/keymaps/default/readme.md [new file with mode: 0644]
keyboards/kmac/keymaps/winkeyless/Makefile [new file with mode: 0644]
keyboards/kmac/keymaps/winkeyless/config.h [new file with mode: 0644]
keyboards/kmac/keymaps/winkeyless/keymap.c [new file with mode: 0644]
keyboards/kmac/keymaps/winkeyless/readme.md [new file with mode: 0644]
keyboards/kmac/kmac.c [new file with mode: 0644]
keyboards/kmac/kmac.h [new file with mode: 0644]
keyboards/kmac/matrix.c [new file with mode: 0644]
keyboards/kmac/readme.md [new file with mode: 0644]
keyboards/kmac/rules.mk [new file with mode: 0644]
keyboards/lets_split/keymaps/OLED_sample/keymap.c
keyboards/lets_split/keymaps/adam/config.h [new file with mode: 0644]
keyboards/lets_split/keymaps/adam/keymap.c [new file with mode: 0644]
keyboards/lets_split/keymaps/adam/makefile [new file with mode: 0644]
keyboards/lets_split/keymaps/hexwire/keymap.c
keyboards/lets_split/keymaps/i2c/keymap.c
keyboards/lets_split/keymaps/serial/keymap.c
keyboards/lets_split/keymaps/smt/keymap.c
keyboards/lets_split/keymaps/xyverz/keymap.c
keyboards/lets_split/rules.mk
keyboards/m10a/Makefile [new file with mode: 0644]
keyboards/m10a/config.h [new file with mode: 0644]
keyboards/m10a/keymaps/default/Makefile [new file with mode: 0644]
keyboards/m10a/keymaps/default/keymap.c [new file with mode: 0644]
keyboards/m10a/m10a.c [new file with mode: 0644]
keyboards/m10a/m10a.h [new file with mode: 0644]
keyboards/m10a/rules.mk [new file with mode: 0644]
keyboards/mechmini/Makefile [new file with mode: 0644]
keyboards/mechmini/README.md [new file with mode: 0644]
keyboards/mechmini/config.h [new file with mode: 0644]
keyboards/mechmini/keymaps/default/keymap.c [new file with mode: 0644]
keyboards/mechmini/matrix.c [new file with mode: 0644]
keyboards/mechmini/mechmini.c [new file with mode: 0644]
keyboards/mechmini/mechmini.h [new file with mode: 0644]
keyboards/mechmini/program [new file with mode: 0644]
keyboards/mechmini/rules.mk [new file with mode: 0644]
keyboards/mechmini/usbconfig.h [new file with mode: 0644]
keyboards/nyquist/Makefile [new file with mode: 0644]
keyboards/nyquist/config.h [new file with mode: 0644]
keyboards/nyquist/i2c.c [new file with mode: 0644]
keyboards/nyquist/i2c.h [new file with mode: 0644]
keyboards/nyquist/keymaps/hexwire/Makefile [new file with mode: 0644]
keyboards/nyquist/keymaps/hexwire/README.md [new file with mode: 0644]
keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md [new file with mode: 0644]
keyboards/nyquist/keymaps/hexwire/config.h [new file with mode: 0644]
keyboards/nyquist/keymaps/hexwire/keymap.c [new file with mode: 0644]
keyboards/nyquist/keymaps/hexwire/keymap_converter.py [new file with mode: 0755]
keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb [new file with mode: 0755]
keyboards/nyquist/keymaps/i2c/config.h [new file with mode: 0644]
keyboards/nyquist/keymaps/i2c/keymap.c [new file with mode: 0644]
keyboards/nyquist/keymaps/serial/config.h [new file with mode: 0644]
keyboards/nyquist/keymaps/serial/keymap.c [new file with mode: 0644]
keyboards/nyquist/matrix.c [new file with mode: 0644]
keyboards/nyquist/nyquist.c [new file with mode: 0644]
keyboards/nyquist/nyquist.h [new file with mode: 0644]
keyboards/nyquist/pro_micro.h [new file with mode: 0644]
keyboards/nyquist/readme.md [new file with mode: 0644]
keyboards/nyquist/rev1/Makefile [new file with mode: 0644]
keyboards/nyquist/rev1/config.h [new file with mode: 0644]
keyboards/nyquist/rev1/rev1.c [new file with mode: 0644]
keyboards/nyquist/rev1/rev1.h [new file with mode: 0644]
keyboards/nyquist/rev1/rules.mk [new file with mode: 0644]
keyboards/nyquist/rules.mk [new file with mode: 0644]
keyboards/nyquist/serial.c [new file with mode: 0644]
keyboards/nyquist/serial.h [new file with mode: 0644]
keyboards/nyquist/split_util.c [new file with mode: 0644]
keyboards/nyquist/split_util.h [new file with mode: 0644]
keyboards/phantom/keymaps/xyverz/keymap.c
keyboards/planck/keymaps/ab/keyboard-layout.json
keyboards/planck/keymaps/ab/keyboard-layout.png
keyboards/planck/keymaps/ab/keymap.c
keyboards/planck/keymaps/ab/readme.md
keyboards/planck/keymaps/dbroqua/keymap.c
keyboards/planck/keymaps/default/keymap.c
keyboards/planck/keymaps/dshields/Makefile
keyboards/planck/keymaps/dshields/config.h
keyboards/planck/keymaps/dshields/keymap.c
keyboards/planck/keymaps/espynn/keymap.c
keyboards/planck/keymaps/experimental/keymap.c
keyboards/planck/keymaps/impossible/keymap.c
keyboards/planck/keymaps/jeebak/keymap.c
keyboards/planck/keymaps/jeebak/readme.md
keyboards/planck/keymaps/jhenahan/keymap.c
keyboards/planck/keymaps/johannes/Makefile [new file with mode: 0644]
keyboards/planck/keymaps/johannes/keymap.c [new file with mode: 0644]
keyboards/planck/keymaps/johannes/planck-layout.png [new file with mode: 0644]
keyboards/planck/keymaps/johannes/readme.md [new file with mode: 0644]
keyboards/planck/keymaps/khord/keymap.c
keyboards/planck/keymaps/originerd/Makefile [new file with mode: 0644]
keyboards/planck/keymaps/originerd/keymap.c [new file with mode: 0644]
keyboards/planck/keymaps/originerd/readme.md [new file with mode: 0644]
keyboards/planck/keymaps/pete/keymap.c
keyboards/planck/keymaps/premek/keymap.c
keyboards/planck/keymaps/pvc/keymap.c
keyboards/planck/keymaps/sgoodwin/keymap.c
keyboards/planck/keymaps/smt/keymap.c
keyboards/planck/keymaps/thermal_printer/keymap.c
keyboards/planck/keymaps/unicode/keymap.c
keyboards/planck/keymaps/xyverz/keymap.c
keyboards/planck/keymaps/zach/zach_common_functions.c
keyboards/preonic/keymaps/0xdec/keymap.c
keyboards/preonic/keymaps/CMD-Preonic/keymap.c
keyboards/preonic/keymaps/default/keymap.c
keyboards/preonic/keymaps/jacwib/keymap.c
keyboards/preonic/keymaps/kinesis/keymap.c
keyboards/preonic/keymaps/nikchi/Makefile [new file with mode: 0644]
keyboards/preonic/keymaps/nikchi/config.h [new file with mode: 0644]
keyboards/preonic/keymaps/nikchi/keymap.c [new file with mode: 0644]
keyboards/preonic/keymaps/nikchi/readme.md [new file with mode: 0644]
keyboards/preonic/keymaps/smt/keymap.c
keyboards/preonic/keymaps/xyverz/keymap.c
keyboards/preonic/keymaps/zach/zach_common_functions.c
keyboards/readme.md
keyboards/roadkit/keymaps/default/keymap.c
keyboards/roadkit/keymaps/singles/keymap.c
keyboards/satan/keymaps/colemak/Makefile [new file with mode: 0644]
keyboards/satan/keymaps/colemak/keymap.c [new file with mode: 0644]
keyboards/satan/keymaps/colemak/readme.md [new file with mode: 0644]
keyboards/satan/keymaps/smt/keymap.c
keyboards/subatomic/keymaps/default/keymap.c
keyboards/tv44/keymaps/default/keymap.c
keyboards/tv44/keymaps/jeebak/keymap.c
keyboards/tv44/keymaps/jeebak/readme.md
keyboards/tv44/keymaps/smt/keymap.c
keyboards/tv44/keymaps/xyverz/keymap.c
keyboards/vision_division/keymaps/default/keymap.c
quantum/dynamic_macro.h
quantum/process_keycode/process_tap_dance.c
quantum/process_keycode/process_tap_dance.h
quantum/process_keycode/process_unicodemap.c
readme.md
secrets.tar.enc [new file with mode: 0644]
tmk_core/common.mk
tmk_core/common/action.c
tmk_core/common/action_tapping.c
tmk_core/common/keyboard.c
tmk_core/common/keyboard.h
tmk_core/protocol/lufa/adafruit_ble.cpp
tmk_core/protocol/lufa/adafruit_ble.h
tmk_core/protocol/lufa/lufa.c
tmk_core/protocol/ps2_mouse.c
util/activate_wsl.sh [new file with mode: 0644]
util/drivers.txt [new file with mode: 0644]
util/ergodox_ez.html [deleted file]
util/travis_build.sh
util/travis_compiled_push.sh
util/wsl_install.sh [new file with mode: 0644]

index 6029afce4f1238aa12f8062de92ac8be1a251aa9..0b48b80e59552169388bd0a5cec97e1f6f7a2507 100644 (file)
@@ -22,6 +22,7 @@ quantum/version.h
 .idea/
 CMakeLists.txt
 .DS_STORE
+/util/wsl_downloaded
 
 # Eclipse/PyCharm/Other IDE Settings
 .cproject
index 88da06f02a64a8a762a61462092c07bff7ae2e56..bc0285a447b146801249bc134c11013c7ef2c862 100644 (file)
@@ -15,6 +15,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y build-essential
     binutils-arm-none-eabi \
     libnewlib-arm-none-eabi \
     git \
+    software-properties-common \
+    avrdude \
     && rm -rf /var/lib/apt/lists/*
 
 ENV keyboard=ergodox
@@ -23,4 +25,4 @@ ENV keymap=default
 
 VOLUME /qmk
 WORKDIR /qmk
-CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap}
+CMD make clean; make;
diff --git a/book.json b/book.json
new file mode 100644 (file)
index 0000000..64a997d
--- /dev/null
+++ b/book.json
@@ -0,0 +1,23 @@
+{
+    "structure": {
+        "readme": "Home.md"
+    },
+    "plugins" : ["toolbar", "edit-link", "anchors"],
+    "pluginsConfig": {
+            "edit-link": {
+                "base": "https://github.com/qmk/qmk_firmware/edit/master/docs",
+                "label": "Suggest an edit"
+            },
+        "toolbar": {
+            "buttons":
+            [
+                {
+                    "label": "QMK Firmware",
+                    "icon": "fa fa-github",
+                    "url": "https://github.com/qmk/qmk_firmware"
+                }
+            ]
+        }
+    },
+    "root": "./docs/"
+}
diff --git a/doc/BUILD_GUIDE.md b/doc/BUILD_GUIDE.md
deleted file mode 100644 (file)
index 78cf00b..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-# This guide has now been included in the main readme - please reference that one instead.
-
-## Build Environment Setup
-
-### Windows (Vista and later)
-1. If you have ever installed WinAVR, uninstall it.
-2. 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**.
-3. 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.
-4. 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.
-5. 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.
-6. 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!
-7. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell".
-
-### Mac
-If you're using [homebrew,](http://brew.sh/) you can use the following commands:
-
-    brew tap osx-cross/avr
-    brew install avr-libc
-    brew install dfu-programmer
-
-This 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.
-
-You can also try these instructions:
-
-1. Install Xcode from the App Store.
-2. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
-3. Install [DFU-Programmer][dfu-prog].
-
-### Linux
-Install AVR GCC, AVR libc, and dfu-progammer with your favorite package manager.
-
-Debian/Ubuntu example:
-
-    sudo apt-get update
-    sudo apt-get install gcc-avr avr-libc dfu-programmer
-
-### Vagrant
-If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md).
-
-## Verify Your Installation
-1. 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.
-2. 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.
-3. 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`.
-4. 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.
-
-## Customizing, Building, and Deploying Your Firmware
-
-### The Make command
-
-The `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). You can run `make` from the root (`/`), your keyboard folder (`/keyboards/<keyboard>/`), or your keymap folder (`/keyboards/<keyboard>/keymaps/<keymap>/`) if you have a `Makefile` there (see the example [here](/doc/keymap_makefile_example.mk)).
-
-By default, this will generate 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.
-
-* The "root" (`/`) folder is the qmk_firmware folder, in which are `doc`, `keyboard`, `quantum`, etc.
-* The "keyboard" folder is any keyboard project's folder, like `/keyboards/planck`.
-* The "keymap" folder is any keymap's folder, like `/keyboards/planck/keymaps/default`.
-
-Below is a list of the useful `make` commands in QMK:
-
-* `make` - cleans automatically and builds your keyboard and keymap depending on which folder you're in. This defaults to the "default" layout (unless in a keymap folder), and Planck keyboard in the root folder
-  * `make keyboard=<keyboard>` - specifies the keyboard (only to be used in root)
-  * `make keymap=<keymap>` - specifies the keymap (only to be used in root and keyboard folder - not needed when in keymap folder)
-* `make quick` - skips the clean step (cannot be used immediately after modifying config.h or Makefiles)
-* `make dfu` - (requires dfu-programmer) builds and flashes the keymap to your keyboard once placed in reset/dfu mode (button or press `KC_RESET`). This does not work for Teensy-based keyboards like the ErgoDox EZ.
-  * `keyboard=` and `keymap=` are compatible with this
-* `make all-keyboards` - builds all keymaps for all keyboards and outputs status of each (use in root)
-* `make all-keyboards-default` - builds all default keymaps for all keyboards and outputs status of each (use in root)
-* `make all-keymaps [keyboard=<keyboard>]` - builds all of the keymaps for whatever keyboard folder you're in, or specified by `<keyboard>`
-* `make all-keyboards-quick`, `make all-keyboards-default-quick` and `make all-keymaps-quick [keyboard=<keyboard>]` - like the normal "make-all-*" commands, but they skip the clean steps
-
-Other, less useful functionality:
-
-* `make COLOR=false` - turns off color output
-* `make SILENT=true` - turns off output besides errors/warnings
-* `make VERBOSE=true` - outputs all of the avr-gcc stuff (not interesting)
-
-### The Makefile
-
-There are 3 different `make` and `Makefile` locations:
-
-* root (`/`)
-* keyboard (`/keyboards/<keyboard>/`)
-* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
-
-The 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](/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. **It is required if you want to run `make` in the keymap folder.**
-
-### The `config.h` file
-
-There are 2 `config.h` locations:
-
-* keyboard (`/keyboards/<keyboard>/`)
-* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
-
-The keyboard `config.h` is included only if the keymap one doesn't exist. The format to use for your custom one [is here](/doc/keymap_config_h_example.h). If you want to override a setting from the parent `config.h` file, you need to do this:
-
-```
-#undef MY_SETTING
-#define MY_SETTING 4
-```
-
-For a value of `4` for this imaginary setting. So we `undef` it first, then `define` it.
-
-You can then override any settings, rather than having to copy and paste the whole thing.
diff --git a/doc/CYGWIN_GUIDE.md b/doc/CYGWIN_GUIDE.md
deleted file mode 100755 (executable)
index 05d7196..0000000
+++ /dev/null
@@ -1,352 +0,0 @@
-#Planck Advanced (but not too advanced) `cygwin` Users Guide
-If you are a user of the [cygwin environment](https://cygwin.com) in Windows and want the freedom to use the latest tools available, then this is the guide for you. If compiling your own copy of the latest and greatest Gnu C Compiler makes you super happy, then this is the guide for you. If the command line make you smile, then this is the guide for you.
-
-This guide was written step by step as I went through the process on a `Windows 10` `x86_64` and a `Windows 7` `amd k10` based system.  This should be generally applicable to to any `Windows` environment with `cygwin`.
-
-#####Do not skip steps. Do not move past a step until the previous step finishes successfully.
-
-Based on [avr-libc installation guide](http://www.nongnu.org/avr-libc/user-manual/install_tools.html)
-
-##Get the Required Packages
-Download the `cygwin` setup ([x86_64](https://cygwin.com/setup-x86_64.exe)) and install the default system plus the following if they are not already selected:
-- devel/git
-- devel/gcc-core
-- devel/gcc-g++
-- devel/flex
-- devel/bison
-- devel/make
-- devel/texinfo
-- devel/gettext-devel
-- devel/automake
-- devel/autoconfig
-- devel/libtool
-- text/gettext
-- libs/libgcc1
-- interpreters/m4
-- web/wget
-- archive/unzip
-
-The following sources will be required:
-- [gmp](https://gmplib.org/) (6.1.0)
-- [mpfr](http://www.mpfr.org/) (3.1.4)
-- [mpc](http://www.multiprecision.org/) (1.0.3) 
-- [binutils](https://www.sourceware.org/binutils/) (2.26)
-- [gcc](https://gcc.gnu.org/) (5.3.0)
-- [avr-libc](http://www.nongnu.org/avr-libc/) (2.0.0)
-
-The `dfu-programmer` will be required to flash the new firmware 
-- [dfu-programmer](https://dfu-programmer.github.io/) (0.7.2)
-
-The set of commands below will create a directory (`~/local/avr`) for the sources you compile to be installed on the machine and a directory (`~/src`) for these source files to be stored. The commands then download the sources of the needed packages and unpack them. Note: the expand commands are different depending on if the packages are offered as a `bz2` or `gz` archive
-```
-$ mkdir ~/local
-$ mkdir ~/local/avr
-$ mkdir ~/src
-$ cd ~/src
-$ wget https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2
-$ wget http://www.mpfr.org/mpfr-3.1.4/mpfr-3.1.4.tar.bz2
-$ wget ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
-$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.gz
-$ wget http://mirror0.babylon.network/gcc/releases/gcc-5.3.0/gcc-5.3.0.tar.gz
-$ wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2
-$ tar -xjf gmp-6.1.0.tar.bz2
-$ tar -xjf mpfr-3.1.4.tar.bz2
-$ tar -zxf mpc-1.0.3.tar.gz
-$ tar -zxf binutils-2.26.tar.gz
-$ tar -zxf gcc-5.3.0.tar.gz
-$ tar -xjf avr-libc-2.0.0.tar.bz2 
-```
-
-##Setup the Build Environment
-These commands will set up the install directory and the `PATH` variable, which will allow you to access your installed packages.  Note: if you close the `cygwin` terminal window, you will need to rerun these commands, they are not permanent.
-```
-$ PREFIX=$HOME/local/avr
-$ export PREFIX
-$ PATH=/usr/local/bin:/usr/local/lib:/usr/local/include:/bin:/lib:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS
-$ PATH=$PATH:$PREFIX/bin:$PREFIX/lib
-$ export PATH
-```
-
-##The `gcc` Required Math Library Packages
-The following packages are required to be complied and installed in order to compile `gcc`.  They are not sufficiently available through the `cygwin` package system, so we have to make them ourselves.  They must be complied in this order because each one depends on the previous. Verfiy that for each package, `make check` returns all passing and no fails.
-
-###Build and Install `gmp`
-```
-$ cd ~/src/gmp-6.1.0
-$ ./configure --enable-static --disable-shared
-$ make
-$ make check
-$ make install
-```
-
-###Build and Install `mpfr`
-```
-$ cd ~/src/mpfr-3.1.4
-$ ./configure --with-gmp-build=../gmp-6.1.0 --enable-static --disable-shared
-$ make
-$ make check
-$ make install
-```
-
-###Build and Install `mpc`
-```
-$ cd ~/src/mpc-1.0.3
-$ ./configure --with-gmp=/usr/local --with-mpfr=/usr/local --enable-static --disable-shared
-$ make
-$ make check
-$ make install
-```
-
-##OPTIONAL Part
-You can build and install a brand new `gcc` or you can use the one supplied by `cygwin`.  This will take about 4-5 hours to compile (It is a "native build", so it does the entire build **3 times**. This takes a long while).
-
-###Build and Install `gcc` for Your Machine  
-```
-$ cd ~/src/gcc-5.3.0
-$ mkdir obj-local
-$ cd obj-local
-$ ../configure --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-static --disable-shared
-$ make
-$ make install
-```
-##End OPTIONAL Part
-
-###Build and Install `binutils` for Your Machine
-```
-$ cd ~/src/binutils-2.26
-$ mkdir obj-local
-$ cd obj-local
-$ ../configure
-$ make
-$ make install
-```
-
-##Buliding `binutils`, `gcc`, and `avr-libc` for the AVR system
-Now we can make the critical stuff for compiling our firmware: `binutils`, `gcc`, and `avr-libc` for the AVR architecture.  These allow us to build and manipulate the firmware for the keyboard.
-
-###Build `binutils` for AVR
-If you plan to build and install `avr-gdb` also, use the `gdb` install at the end of this guide as it also builds the `binutils`
-```
-$ cd ~/src/binutils-2.26
-$ mkdir obj-avr
-$ cd obj-avr
-$ ../configure --prefix=$PREFIX --target=avr --disable-nls
-$ make
-$ make install
-```
-
-###Build `gcc` for AVR
-```
-$ cd ~/src/gcc-5.3.0
-$ mkdir obj-avr
-$ cd obj-avr
-$ ../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-static --disable-shared --disable-nls --disable-libssp --with-dwarf2
-$ make
-$ make install
-```
-
-###Build `avr-libc` for AVR
-For building the `avr-libc`, we have to specify the host build system.  In my case it is `x86_64-unknown-cygwin`. You can look for build system type in the `gcc` configure notes for the proper `--build` specification to pass when you configure `avr-libc`.
-```
-$ cd ~/src/avr-libc-2.0.0
-$ ./configure --prefix=$PREFIX --build=x86_64-unknown-cygwin --host=avr
-$ make
-$ make install
-```
-
-##Building 'dfu-programmer' for flashing the firmware via USB and installing the drivers
-We can either build our own, or use the precomplied binaries.  The precompiled binaries don't play well with `cygwin` so it is better to build them ourselves.  The procedure for the precompiled binaries is included at the end of this guide.
-
-### Build and Install the `libusb`
-The `dfu-programmer` requires `libusb` so that it can interact with the USB system. These repos must be bootstrapped in order to create an appropriate `./configure` and `Makefile` for your system.
-```
-$ cd ~/src
-$ git clone https://github.com/libusb/libusb.git
-$ cd libusb
-$ ./bootstrap.sh
-$ ./configure
-$ make
-$ make install
-```
-
-### Build and Install the `dfu-programmer`
-```
-$ cd ~/src
-$ git clone https://github.com/dfu-programmer/dfu-programmer.git
-$ cd dfu-programmer
-$ ./bootstrap.sh
-$ ./configure
-$ make
-$ make install
-```
-
-Verify the installation with:
-```
-$ which dfu-programmer
-/usr/local/bin/dfu-programmer
-
-$ dfu-programmer
-dfu-programmer 0.7.2
-https://github.com/dfu-programmer/dfu-programmer
-Type 'dfu-programmer --help'    for a list of commands
-     'dfu-programmer --targets' to list supported target devices
-```
-If you are not getting the above result, you will not be able to flash the firmware! 
-
-###Install the USB drivers
-The drivers are included in the windows binary version of [`dfu-programmer` 0.7.2](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip).
-```
-$ cd ~/src
-$ wget http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip
-$ unzip dfu-programmer-win-0.7.2.zip -d dfu-programmer-win-0.7.2
-```
-
-or
-
-The official drivers are found in [Atmel's `FLIP` installer](http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe). Download and then install `FLIP`. Upon installation, the drivers will be found in `C:\Program Files (x86)\Atmel\Flip 3.4.7\usb`.
-
-Then, from an **administrator-privileged** `Windows` terminal, run the following command (adjust the path for username, etc. as necessary) and accept the prompt that pops up:
-```
-C:\> pnputil -i -a C:\cygwin64\home\Kevin\src\dfu-programmer-win-0.7.2\dfu-prog-usb-1.2.2\atmel_usb_dfu.inf
-or
-C:\> pnputil -i -a "C:\Program Files (x86)\Atmel\Flip 3.4.7\usb\atmel_usb_dfu.inf"
-```
-
-This should be the result:
-```
-Microsoft PnP Utility
-
-Processing inf :            atmel_usb_dfu.inf
-Successfully installed the driver on a device on the system.
-Driver package added successfully.
-Published name :            oem104.inf
-
-
-Total attempted:              1
-Number successfully imported: 1
-```
-
-Alternatively, the `Windows` driver can be installed when prompted by `Windows` when the keyboard is attached. Do not let `Windows` search for a driver; specify the path to search for a driver and point it to the `atmel_usb_dfu.inf` file.
-
-##Building and Flashing the Planck firmware!
-If you did everything else right. This part should be a snap! Grab the latest sources from `github`, make the Plank firmware, then flash it.
-
-###Build Planck and Load the Firmware
-```
-$ cd ~/src
-$ git clone https://github.com/qmk/qmk_firmware.git
-$ cd qmk_firmware/keyboards/planck
-$ make
-```
-
-Make sure there are no errors.  You should end up with this or something similar:
-```
-Creating load file for Flash: planck.hex
-avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature planck.elf planck.hex
-
-Creating load file for EEPROM: planck.eep
-avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
---change-section-lma .eeprom=0 --no-change-warnings -O ihex planck.elf planck.eep || exit 0
-
-Creating Extended Listing: planck.lss
-avr-objdump -h -S -z planck.elf > planck.lss
-
-Creating Symbol Table: planck.sym
-avr-nm -n planck.elf > planck.sym
-
-Size after:
-   text    data     bss     dec     hex filename
-  18602      82     155   18839    4997 planck.elf
-
--------- end --------
-```
-
-If you do not get the above, you **did not** build the firmware, and you will have nothing to flash.  If you have the fresh clone from `github`, it was probably something gone wrong in this install process, go check and see what didn't work and threw errors or what steps you might have missed.
-
-But if everything went OK, you are ready to flash! Press the reset button on the bottom of the Planck, wait two seconds, then:
-```
-$ make dfu
-```
-.
-.
-.
-profit!!!
-
-
-
-
-
-##extra bits...
-
-###Installing Precompiled `dfu-programmer` Binaries (not recommended for `cygwin`)
-To install the `dfu-programmer` from the binaries, we must get if from [the `dfu-programmer` website](https://dfu-programmer.github.io/) ([0.7.2](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip)).
-
-Copy this file into your `cygwin` home\src directory.  (For me, it is `C:\cygwin64\home\Kevin\src`), extract the files, move `dfu-programmer.exe` to `~/local/avr/bin`. Most obnoxiously, the `libusb0_x86.dll` and `libusb0.sys` need to be moved from  `./dfu-prog-usb-1.2.2/x86/` to a directory in the `Windows` `PATH` and the `cygwin` `PATH`. This is because the `dfu-programmer` binary is `mingw` based, not `cygwin` based, so the `dlls` do not cooperate. I achieved acceptable pathing by moving the files to  `C:\cygwin64\home\Kevin\local\avr\bin` Then, in a `WINDOWS` command prompt running (Adjusting your path for username, etc. as needed):
-```
-C:\> set PATH=%PATH%;C:\cygwin64\home\Kevin\local\avr\bin
-```
-
-Then, rename `libusb0_x86.dll` to `libusb0.dll`.
-You can tell that you were successful by trying to execute 'dfu-programmer' from the 'cygwin' prompt:
-```
-$ which dfu-programmer
-/home/Kevin/local/avr/bin/dfu-programmer
-
-$ dfu-programmer
-dfu-programmer 0.7.2
-https://github.com/dfu-programmer/dfu-programmer
-Type 'dfu-programmer --help'    for a list of commands
-     'dfu-programmer --targets' to list supported target devices
-```
-
-If you are not getting the above result, you will not be able to flash the firmware! 
-- Try making sure your `PATH` variables are set correctly for both `Windows` and `cygwin`. 
-- Make sure the `dll` is named correctly.
-- Do not extract it with `cygwin`'s `unzip` as it does not set the executable permission. If you did it anyway, do `chmod +x dfu-programmer.exe`.
-- Still have problems? Try building it instead.
-
-
-##Debugging Tools
-
-These tools are for debugging your firmware, etc. before flashing. Theoretically, it can save your memory from wearing out. However, these tool do not work 100% for the Planck firmware.
-
-### `gdb` for AVR
-`gdb` has a simulator for AVR but it does not support all instructions (like WDT), so it immediately crashes when running the Planck firmware (because `lufa.c` disables the WDT in the first few lines of execution). But it can still be useful in debugging example code and test cases, if you know how to use it.
-
-```
-$ cd ~/src
-$ git clone git://sourceware.org/git/binutils-gdb.git
-$ cd binutils-gdb
-$ mkdir obj-avr
-$ cd obj-avr
-$ ../configure --prefix=$PREFIX --target=avr --build=x86_64-unknown-cygwin --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --disable-nls --enable-static
-$ make
-$ make install
-```
-
-### `simulavr`
-`simulavr` is an AVR simulator.  It runs the complied AVR elfs. `simulavr` does not support the `atmega32u4` device... it does `atmega32` but that is not good enough for the firmware (no PORTE and other things), so you cannot run the Planck firmware. I use it to simulate ideas I have for features in separate test projects.
-
-This one is a major pain in the butt because it has a lot of dependencies and it is buggy.  I will do my best to explain it but... it was hard to figure out. A few things need to be changed in the 'Makefile' to make it work in `cygwin`.
-
-
-```
-$ cd ~/src
-$ git clone https://github.com/Traumflug/simulavr.git
-$ cd simulavr
-$ ./bootstrap
-$ ./configure --prefix=$PREFIX --enable-static --disable-tcl --disable-doxygen-doc
-```
- Edit `src/Makefile.am` now so that `-no-undefined` is included (I did this by removing the SYS_MINGW conditional surrounding `libsim_la_LDFLAGS += -no-undefined` and  `libsimulavr_la_LDFLAGS += -no-undefined \ libsimulavr_la_LIBADD += $(TCL_LIB)`. Also, `$(EXEEXT)` is added after `kbdgentables` in two places.
-
-```
-$ make
-$ make install
-```
-
-
-TODO:
-- git repos for all sources
-- command line magic for cygwin setup
-- better options for `dfu-drivers`
diff --git a/doc/FUSE.txt b/doc/FUSE.txt
deleted file mode 100644 (file)
index 99ddd2d..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-Atmega32u4 Fuse/Lock Bits for Planck/Atomic/Preonic
-=========================
-
-       Low Fuse: 0x5E
-       High Fuse: 0x99
-       Extended Fuse: 0xF3
-       Lock Byte: 0xFF
-
-
-ATMega168P Fuse/Lock Bits
-=========================
-This configuration is from usbasploader's Makefile.
-
-    HFUSE   0xD6
-    LFUSE   0xDF
-    EFUSE   0x00
-    LOCK    0x3F(intact)
-
-#---------------------------------------------------------------------
-# ATMega168P
-#---------------------------------------------------------------------
-# Fuse extended byte:
-# 0x00 = 0 0 0 0   0 0 0 0 <-- BOOTRST (boot reset vector at 0x1800)
-#                    \+/
-#                     +------- BOOTSZ (00 = 2k bytes)
-# Fuse high byte:
-# 0xd6 = 1 1 0 1   0 1 1 0
-#        ^ ^ ^ ^   ^ \-+-/
-#        | | | |   |   +------ BODLEVEL 0..2 (110 = 1.8 V)
-#        | | | |   + --------- EESAVE (preserve EEPROM over chip erase)
-#        | | | +-------------- WDTON (if 0: watchdog always on)
-#        | | +---------------- SPIEN (allow serial programming)
-#        | +------------------ DWEN (debug wire enable)
-#        +-------------------- RSTDISBL (reset pin is enabled)
-# Fuse low byte:
-# 0xdf = 1 1 0 1   1 1 1 1
-#        ^ ^ \ /   \--+--/
-#        | |  |       +------- CKSEL 3..0 (external >8M crystal)
-#        | |  +--------------- SUT 1..0 (crystal osc, BOD enabled)
-#        | +------------------ CKOUT (if 0: Clock output enabled)
-#        +-------------------- CKDIV8 (if 0: divide by 8)
-
-
-# Lock Bits
-# 0x3f = - - 1 1   1 1 1 1
-#            \ /   \-/ \-/
-#             |     |   +----- LB 2..1 (No memory lock features enabled)
-#             |     +--------- BLB0 2..1 (No restrictions for SPM or LPM accessing the Application section)
-#             +--------------- BLB1 2..1 (No restrictions for SPM or LPM accessing the Boot Loader section)
-
diff --git a/doc/HAND_WIRE.md b/doc/HAND_WIRE.md
deleted file mode 100644 (file)
index 17ef311..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-# Quantum Hand-wiring Guide
-
-Parts list:
-* *x* keyswitches (MX, Matias, Gateron, etc)
-* *x* diodes
-* Keyboard plate (metal, plastic, cardboard, etc)
-* Wire (strained for wiring to the Teensy, anything for the rows/columns)
-* Soldering iron set at 600ºF or 315ºC (if temperature-controlled)
-* Resin-cored solder (leaded or lead-free)
-* Adequate ventilation/a fan
-* Tweezers (optional)
-* Wire cutters/snippers
-
-## How the matrix works (why we need diodes)
-
-The microcontroller (in this case, the Teensy 2.0) will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example:
-
-        Column 0 being scanned     Column 1 being scanned
-                  x                                   x
-                 col0     col1              col0     col1
-                  |        |                 |        |
-        row0 ---(key0)---(key1)    row0 ---(key0)---(key1)
-                  |        |                 |        |
-        row1 ---(key2)---(key3)    row1 ---(key2)---(key3)
-
-The `x` represents that the column/row associated has a value of 1, or is HIGH. Here, we see that no keys are being pressed, so no rows get an `x`. For one keyswitch, keep in mind that one side of the contacts is connected to its row, and the other, its column.
-
-When we press `key0`, `col0` gets connected to `row0`, so the values that the firmware receives for that row is `0b01` (the `0b` here means that this is a bit value, meaning all of the following digits are bits - 0 or 1 - and represent the keys in that column). We'll use this notation to show when a keyswitch has been pressed, to show that the column and row are being connected:
-
-        Column 0 being scanned     Column 1 being scanned
-                  x                                   x
-                 col0     col1              col0     col1
-                  |        |                 |        |
-      x row0 ---(-+-0)---(key1)    row0 ---(-+-0)---(key1)
-                  |        |                 |        |
-        row1 ---(key2)---(key3)    row1 ---(key2)---(key3)
-
-We can now see that `row0` has an `x`, so has the value of 1. As a whole, the data the firmware receives when `key0` is pressed is
-
-    col0: 0b01
-    col1: 0b00
-            │└row0
-            └row1
-
-A problem arises when you start pressing more than one key at a time. Looking at our matrix again, it should become pretty obvious:
-
-        Column 0 being scanned     Column 1 being scanned
-                  x                                   x
-                 col0     col1              col0     col1
-                  |        |                 |        |
-      x row0 ---(-+-0)---(-+-1)  x row0 ---(-+-0)---(-+-1)
-                  |        |                 |        |
-      x row1 ---(key2)---(-+-3)  x row1 ---(key2)---(-+-3)
-
-      Remember that this ^ is still connected to row1
-
-The data we get from that is:
-
-    col0: 0b11
-    col1: 0b11
-            │└row0
-            └row1
-
-Which isn't accurate, since we only have 3 keys pressed down, not all 4. This behavior is called ghosting, and only happens in odd scenarios like this, but can be much more common on a bigger keyboard. The way we can get around this is by placing a diode after the keyswitch, but before it connects to its row. A diode only allows current to pass through one way, which will protect our other columns/rows from being activated in the previous example. We'll represent a dioded matrix like this;
-
-        Column 0 being scanned     Column 1 being scanned
-                    x                                   x
-                  col0      col1              col0     col1
-                    │        │                 |        │
-                 (key0)   (key1)            (key0)   (key1)
-                  ! │      ! │               ! |      ! │
-        row0 ─────┴────────┘ │     row0 ─────┴────────┘ │
-                    │        │                 |        │
-                 (key2)   (key3)            (key2)   (key3)
-                  !        !                 !        !
-        row1 ─────┴────────┘       row1 ─────┴────────┘
-
-In practical applications, the black line of the diode will be placed facing the row, and away from the keyswitch - the `!` in this case is the diode, where the gap represents the black line. A good way to remember this is to think of this symbol: `>|`
-
-Now when we press the three keys, invoking what would be a ghosting scenario:
-
-        Column 0 being scanned     Column 1 being scanned
-                    x                                   x
-                  col0      col1              col0     col1
-                    │        │                 │        │
-                 (┌─┤0)   (┌─┤1)            (┌─┤0)   (┌─┤1)
-                  ! │      ! │               ! │      ! │
-      x row0 ─────┴────────┘ │   x row0 ─────┴────────┘ │
-                    │        │                 │        │
-                 (key2)   (┌─┘3)            (key2)   (┌─┘3)
-                  !        !                 !        !
-        row1 ─────┴────────┘     x row1 ─────┴────────┘
-
-Things act as they should! Which will get us the following data:
-
-    col0: 0b01
-    col1: 0b11
-            │└row0
-            └row1
-
-The firmware can then use this correct data to detect what it should do, and eventually, what signals it needs to send to the OS.
-
-## The actual hand-wiring
-
-### Getting things in place
-
-When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards.
-
-To make things easier on yourself, make sure all of the keyswitches are oriented the same way (if they can be - not all layouts support this). Despite this, it's important to remember that the contacts on the keyswitches are completely symmetrical. We'll be using the keyswitch's left side contact for wiring the rows, and the right side one for wiring the columns.
-
-Get your soldering iron heated-up and collect the rest of the materials from the part list at the beginning of the guide. Place your keyboard so that the bottoms of the keyswitches are accessible - it may be a good idea to place it on a cloth to protect your keyswitches/keycaps.
-
-Before continuing, plan out where you're going to place your Teensy. If you're working with a board that has a large (6.25u) spacebar, it may be a good idea to place it in-between switches against the plate. Otherwise, you may want to trim some of the leads on the keyswitches where you plan on putting it - this will make it a little harder to solder the wire/diodes, but give you more room to place the Teensy.
-
-### Preparing the diodes
-
-It's a little easier to solder the diodes in place if you bend them at a 90º angle immediately after the black line - this will help to make sure you put them on the right way (direction matters), and in the correct position. The diodes will look like this when bent (with longer leads):
-
-       ┌─────┬─┐
-    ───┤     │ ├─┐
-       └─────┴─┘ │
-                 │
-
-We'll be using the long lead at the bent end to connect it to the elbow (bent part) of the next diode, creating the row.
-
-### Soldering the diodes
-
-Starting at the top-left switch, place the diode (with tweezers if you have them) on the switch so that the diode itself is vertically aligned, and the black line is facing toward you. The straight end of the diode should be touching the left contact on the switch, and the bent end should be facing to the right and resting on the switch there, like this:
-
-     │o
-    ┌┴┐         o
-    │ │    O
-    ├─┤      
-    └┬┘
-     └─────────────
-
-Letting the diode rest, grab your solder, and touch both it and the soldering iron to the left contact at the same time - the rosin in the solder should make it easy for the solder to flow over both the diode and the keyswitch contact. The diode may move a little, and if it does, carefully position it back it place by grabbing the bent end of the diode - the other end will become hot very quickly. If you find that it's moving too much, using needle-nose pliers of some sort may help to keep the diode still when soldering.
-
-The smoke that the rosin releases is harmful, so be careful not to breath it or get it in your eyes/face.
-
-After soldering things in place, it may be helpful to blow on the joint to push the smoke away from your face, and cool the solder quicker. You should see the solder develop a matte (not shiney) surface as it solidifies. Keep in mind that it will still be very hot afterwards, and will take a couple minutes to be cool to touch. Blow on it will accelerate this process.
-
-When the first diode is complete, the next one will need to be soldered to both the keyswitch, and the previous diode at the new elbow. That will look something like this:
-
-     │o               │o
-    ┌┴┐         o    ┌┴┐         o
-    │ │    O         │ │    O
-    ├─┤              ├─┤      
-    └┬┘              └┬┘
-     └────────────────┴─────────────
-
-After completing a row, use the wire cutters to trim the excess wire from the tops of the diodes, and from the right side on the final switch. This process will need to completed for each row you have.
-
-When all of the diodes are completely soldered, it's a good idea to quickly inspect each one to ensure that your solder joints are solid and sturdy - repairing things after this is possible, but more difficult.
-
-### Soldering the columns
-
-You'll have some options in the next process - it's a good idea to insulate the column wires (since the diodes aren't), but if you're careful enough, you can use exposed wires for the columns - it's not recommended, though. If you're using single-cored wire, stripping the plastic off of the whole wire and feeding it back on is probably the best option, but can be difficult depending on the size and materials. You'll want to leave parts of the wire exposed where you're going to be solder it onto the keyswitch.
-
-If you're using stranded wire, it's probably easiest to just use a lot of small wires to connect each keyswitch along the column. It's possible to use one and melt through the insulation, but this isn't recommended, will produce even more harmful fumes, and can ruin your soldering iron.
-
-Before beginning to solder, it helps to have your wire pre-bent (if using single-cored), or at least have an idea of how you're going to route the column (especially if you're making a staggered board). Where you go in particular doesn't matter too much, as we'll be basing our keymap definitions on how it was wired - just make sure every key in a particular row is in a unique column, and that they're in order from left to right.
-
-If you're not using any insulation, you can try to keep the column wires elevated, and solder them near the tips of the keyswitch contacts - if the wires are sturdy enough, they won't short out to the row wiring an diodes.
-
-### Wiring things to the Teensy
-
-Now that the matrix itself is complete, it's time to connect what you've done to the Teensy. You'll be needing the number of pins equal to your number of columns + your number of rows. There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple.
-
-The pins you'll absolutely have to avoid are: GND, VCC, AREF, and RST - all the others are usable and accessible in the firmware.
-
-Place the Teensy where you plan to put it - you'll have to cut wires to length in the next step, and you'll want to make sure they reach.
-
-Starting with the first column on the right side, measure out how much wire you'll need to connect it to the first pin on the Teensy - it helps to pick a side that you'll be able to work down, to keep the wires from overlapping too much. It may help to leave a little bit of slack so things aren't too tight. Cut the piece of wire, and solder it to the Teensy, and then the column - you can solder it anywhere along the column, but it may be easiest at the keyswitch. Just be sure the wire doesn't separate from the keyswitch when soldering.
-
-As you move from column to column, it'll be helpful to write the locations of the pins down. We'll use this data to setup the matrix in the future.
-
-When you're done with the columns, start with the rows in the same process, from top to bottom, and write them all down. Again, you can solder anywhere along the row, as long as it's after the diode - soldering before the diode (on the keyswitch side) will cause that row not to work.
-
-As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain!
-
-### Getting some basic firmware set-up
-
-From here, you should have a working keyboard with the correct firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
-
-To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/).
-
-The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder:
-
-    util/new_project.sh <project_name>
-
-You'll want to navigate to the `keyboards/<project_name>/` folder by typing, like the print-out from the script specifies:
-
-    cd keyboards/<project_name>
-
-#### config.h
-
-The first thing you're going to want to modify is the `config.h` file. Find `MATRIX_ROWS` and `MATRIX_COLS` and change their definitions to match the dimensions of your keyboard's matrix.
-
-Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitions to match how you wired up your matrix (looking from the top of the keyboard, the rows run top-to-bottom and the columns run left-to-right). Likewise, change the definition of `UNUSED_PINS` to match the pins you did not use (this will save power).
-
-#### \<project_name\>.h
-
-The next file you'll want to look at is `<project_name>.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix.
-
-We'll dive into how this will work with the following example. Say we have a keyboard like this:
-
-    ┌───┬───┬───┐
-    │   │   │   │
-    ├───┴─┬─┴───┤
-    │     │     │
-    └─────┴─────┘
-
-This can be described by saying the top row is 3 1u keys, and the bottom row is 2 1.5u keys. The difference between the two rows is important, because the bottom row has an unused column spot (3 v 2). Let's say that this is how we wired the columns:
-
-    ┌───┬───┬───┐
-    │ ┋ │ ┋ │ ┋ │
-    ├─┋─┴─┬─┴─┋─┤
-    │ ┋   │   ┋ │
-    └─────┴─────┘
-
-The middle column is unused on the bottom row in this example. Our `KEYMAP` definition would look like this:
-
-    #define KEYMAP( \
-        k00, k01, k02, \
-          k10,  k11,   \
-    ) \
-    { \
-        { k00, k01,   k02 }, \
-        { k10, KC_NO, k11 }, \
-    }
-
-Notice how the top half is spaced to resemble our physical layout - this helps us understand which keys are associated with which columns. The bottom half uses the keycode `KC_NO` where there is no keyswitch wired in. It's easiest to keep the bottom half aligned in a grid to help us make sense of how the firmware actually sees the wiring.
-
-Let's say that instead, we wired our keyboard like this (a fair thing to do):
-
-    ┌───┬───┬───┐
-    │ ┋ │  ┋│ ┋ │
-    ├─┋─┴─┬┋┴───┤
-    │ ┋   │┋    │
-    └─────┴─────┘
-
-This would require our `KEYMAP` definition to look like this:
-
-    #define KEYMAP( \
-        k00, k01, k02, \
-          k10,  k11,   \
-    ) \
-    { \
-        { k00, k01, k02   }, \
-        { k10, k11, KC_NO }, \
-    }
-
-Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.
-
-#### keymaps/default.c
-
-This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make KEYMAP=<variant>`, which will pull `keymaps/<variant>.c`.
-
-The basis of a keymap is its layers - by default, layer 0 is active. You can activate other layers, the highest of which will be referenced first. Let's start with our base layer.
-
-Using our previous example, let's say we want to create the following layout:
-
-    ┌───┬───┬───┐
-    │ A │ 1 │ H │
-    ├───┴─┬─┴───┤
-    │ TAB │ SPC │
-    └─────┴─────┘
-
-This can be accomplished by using the following `keymaps` definition:
-
-    const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    [0] = KEYMAP( /* Base */
-      KC_A,  KC_1,  KC_H, \
-        KC_TAB,  KC_SPC   \
-    ),
-    };
-
-Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file.
-
-It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.
-
-#### Compiling your firmware
-
-After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](/doc/BUILD_GUIDE.md) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy.
-
-Once everything is installed, running `make` in the terminal should get you some output, and eventually a `<project_name>.hex` file in that folder. If you're having trouble with this step, see the end of the guide for the trouble-shooting section.
-
-Once you have your `<project_name>.hex` file, open up the Teensy loader application, and click the file icon. From here, navigate to your `QMK/keyboards/<project_name>/` folder, and select the `<project_name>.hex` file. Plug in your keyboard and press the button on the Teensy - you should see the LED on the device turn off once you do. The Teensy Loader app will change a little, and the buttons should be clickable - click the download button (down arrow), and then the reset button (right arrow), and your keyboard should be ready to go!
-
-#### Testing your firmware
-
-Carefully flip your keyboard over, open up a new text document, and try typing - you should get the characters that you put into your keymap. Test each key, and note the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys:
-
-0. Flip the keyboard back over and short the keyswitch's contacts with a piece wire - this will eliminate the possibility of the keyswitch being bad and needing to be replaced.
-1. Check the solder points on the keyswitch - these need to be plump and whole. If you touch it with a moderate amount of force and it comes apart, it's not strong enough.
-2. Check the solder joints on the diode - if the diode is loose, part of your row may register, while the other may not.
-3. Check the solder joints on the columns - if your column wiring is loose, part or all of the column may not work.
-4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides.
-5. Check the <project_name>.h file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable.
-6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly.
-
-If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end.
-
-#### Securing the Teensy, finishing your hardware, getting fancier firmware
-
-Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
-
-There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/qmk/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
-
-## Trouble-shooting compiling
-
-### Windows
-
-#### fork: Resource temporarily unavailable
-
-http://www.avrfreaks.net/forum/windows-81-compilation-error
-
-### Mac
-
-### Linux
diff --git a/doc/PCB_GUIDE.md b/doc/PCB_GUIDE.md
deleted file mode 100644 (file)
index 16de711..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-# Planck Firmware Guide
-
-## Setting up the environment
-
-### Windows
-1. 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**.
-2. 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.
-3. 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.
-4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
-5. 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!
-
-
-### Mac
-
-If you're using homebrew, you can use the following commands:
-
-    brew tap osx-cross/avr
-    brew install avr-libc
-    brew install dfu-programmer
-
-Otherwise, these instructions will work:
-
-1. Install Xcode from the App Store.
-2. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
-3. Install [DFU-Programmer][dfu-prog].
-
-### Linux
-1. Install AVR GCC with your favorite package manager.
-2. Install [DFU-Programmer][dfu-prog].
-
-Note that, since it will be directly accessing USB hardware, the
-`dfu-programmer` program needs to be run as root.
-
-## Verify Your Installation
-1. Clone the following repository: https://github.com/qmk/qmk_firmware
-2. Open a Terminal and `cd` into `qmk_firmware/keyboards/planck`
-3. Run `make`. This should output a lot of information about the build process.
-
-## Using the built-in functions
-
-Here is a list of some of the functions available from the command line:
-
-* `make clean`: clean the environment - may be required in-between builds
-* `make`: compile the code
-* `make KEYMAP=<keymap>`: compile with the extended keymap file `extended_keymaps/extended_keymap_<keymap>.c`
-* `make dfu`: build and flash the layout to the PCB
-* `make dfu-force`: build and force-flash the layout to the PCB (may be require for first flash)
-
-Generally, the instructions to flash the PCB are as follows:
-
-1. Make changes to the appropriate keymap file
-2. Save the file
-3. `make clean`
-4. Press the reset button on the PCB/press the key with the `RESET` keycode
-5. `make <arguments> dfu` - use the necessary `KEYMAP=<keymap>` and/or `COMMON=true` arguments here.
-
-## Troubleshooting
-If you see something like this
-
-          0 [main] sh 13384 sync_with_child: child 9716(0x178) died before initialization with status code 0xC0000142
-        440 [main] sh 13384 sync_with_child: *** child state waiting for longjmp
-    /usr/bin/sh: fork: Resource temporarily unavailable
-
-after running 'make' on Windows than you are encountering a very popular issue with WinAVR on Windows 8.1 and 10.
-You can easily fix this problem by replacing msys-1.0.dll in WinAVR/utils/bin with [this one](http://www.madwizard.org/download/electronics/msys-1.0-vista64.zip).
-Restart your system and everything should work fine!
-
-
-If you see this
-
-    dfu-programmer atmega32u4 erase
-    process_begin: CreateProcess(NULL, dfu-programmer atmega32u4 erase, ...) failed.
-    make (e=2): The system cannot find the file specified.
-    make: *** [dfu] Error 2
-
-when trying to 'make dfu' on Windows you need to copy the dfu-programmer.exe to qmk_firmware/keyboards/planck.
-
-
-## Quantum MK Firmware
-
-### Keymap
-
-Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/qmk/qmk_firmware/blob/master/quantum/keymap_common.h).
-
-You can use modifiers with keycodes like this:
-
-    LCTL(KC_C)
-    
-Which will generate Ctrl+c. These are daisy-chainable, meaning you can do things like:
-
-    LCTL(LALT(KC_C))
-    
-That will generate Ctrl+Alt+c. The entire list of these functions is here:
-
-* `LCTL()`: Left control
-* `LSFT()` / `S()`: Left shift
-* `LALT()`: Left alt/opt
-* `LGUI()`: Left win/cmd
-* `RCTL()`: Right control
-* `RSFT()`: Right shift
-* `RALT()`: Right alt/opt
-* `RGUI()`: Right win/cmd
-
-`S(KC_1)`-like entries are useful in writing keymaps for the Planck.
-
-### Other keycodes
-
-A number of other keycodes have been added that you may find useful:
-
-* `CM_<key>`: the Colemak equivalent of a key (in place of `KC_<key>`), when using Colemak in software (`CM_O` generates `KC_SCLN`)
-* `RESET`: jump to bootloader for flashing (same as press the reset button)
-* `BL_STEP`: step through the backlight brightnesses
-* `BL_<0-15>`: set backlight brightness to 0-15
-* `BL_DEC`: lower the backlight brightness
-* `BL_INC`: raise the backlight brightness
-* `BL_TOGG`: toggle the backlight on/off
-
-### Function layers
-
-The extended keymap extends the number of function layers from 32 to the near-infinite value of 256. Rather than using `FN<num>` notation (still available, but limited to `FN0`-`FN31`), you can use the `FUNC(<num>)` notation. `F(<num>)` is a shortcut for this.
-
-The function actions are unchanged, and you can see the full list of them [here](https://github.com/jackhumbert/tmk_keyboard/blob/master/common/action_code.h). They are explained in detail [here](https://github.com/jackhumbert/tmk_keyboard/blob/master/doc/keymap.md#2-action).
-
-### Macros
-
-Macros have been setup in the `keymaps/keymap_default.c` file so that you can use `M(<num>)` to access a macro in the `action_get_macro` section on your keymap. The switch/case structure you see here is required, and is setup for `M(0)` - you'll need to copy and paste the code to look like this (e.g. to support `M(3)`):
-
-    switch(id) {
-      case 0:
-        return MACRODOWN(TYPE(KC_A), END);
-        break;
-      case 1:
-        return MACRODOWN(TYPE(KC_B), END);
-        break;
-      case 2:
-        return MACRODOWN(TYPE(KC_C), END);
-        break;
-      case 3:
-        return MACRODOWN(TYPE(KC_D), END);
-        break;
-    } 
-    return MACRO_NONE;
-
-`MACRODOWN()` is a shortcut for `(record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)` which tells the macro to execute when the key is pressed. Without this, the macro will be executed on both the down and up stroke.
-
-[cygwin]:       https://www.cygwin.com/
-[mingw]:        http://www.mingw.org/
-[mhv]:          https://infernoembedded.com/products/avr-tools
-[winavr]:       http://winavr.sourceforge.net/
-[crosspack]:    http://www.obdev.at/products/crosspack/index.html
-[dfu-prog]:     http://dfu-programmer.sourceforge.net/
diff --git a/doc/POWER.txt b/doc/POWER.txt
deleted file mode 100644 (file)
index 0abbbe4..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-Time to Sleep
-=============
-USB suspend     no activity on USB line for  3ms
-No Interaction  no user interaction
-    matrix has no change
-    matrix has no switch on
-
-
-AVR Power Management
-====================
-
-V-USB suspend
-    USB suspend
-    http://vusb.wikidot.com/examples
-
-MCUSR   MCU Status Register
-    WDRF    Watchdog Reset Flag
-    BORF
-    EXTRF
-    PORF    Power-on Reset Flag
-
-SMCR    Sleep Mode Control Register
-    SE      Sleep Enable
-    SM2:0   
-        #define set_sleep_mode(mode) \
-        #define SLEEP_MODE_IDLE         (0)
-        #define SLEEP_MODE_ADC          _BV(SM0)
-        #define SLEEP_MODE_PWR_DOWN     _BV(SM1)
-        #define SLEEP_MODE_PWR_SAVE     (_BV(SM0) | _BV(SM1))
-        #define SLEEP_MODE_STANDBY      (_BV(SM1) | _BV(SM2))
-        #define SLEEP_MODE_EXT_STANDBY  (_BV(SM0) | _BV(SM1) | _BV(SM2))
-
-
-ACSR    Analog Comparator Control and Status Register
-    To disable Analog Comparator
-    ACSR = 0x80;
-    or
-    ACSR &= ~_BV(ACIE);
-    ACSR |= _BV(ACD);
-
-    ACD: Analog Comparator Disable
-        When this bit is written logic one, the power to the Analog Comparator is
-        switched off. This bit can be set at any time to turn off the Analog
-        Comparator. This will reduce power consumption in Active and Idle mode.
-        When changing the ACD bit, the Analog Comparator Interrupt must be disabled
-        by clearing the ACIE bit in ACSR. Otherwise an interrupt can occur when
-        the bit is changed.
-
-DIDR1   Digital Input Disable Register 1
-    AIN1D
-    AIN0D
-        When this bit is written logic one, the digital input buffer on the AIN1/0 pin is disabled. The corresponding PIN Register bit will always read as zero when this bit is set. When an analog signal is applied to the AIN1/0 pin and the digital input from this pin is not needed, this bit should be written logic one to reduce power consumption in the digital input buffer.
-
-
-PRR     Power Reduction Register
-    PRTWI
-    PRTIM2
-    PRTIM0
-    PRTIM1
-    PRSPI
-    PRUSART0
-    PRADC
diff --git a/doc/TMK_README.md b/doc/TMK_README.md
deleted file mode 100644 (file)
index e3438ed..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-# TMK Documenation
-
-Features
---------
-These features can be used in your keyboard.
-
-* Multi-layer Keymap  - Multiple keyboard layouts with layer switching
-* Mouse key           - Mouse control with keyboard
-* System Control Key  - Power Down, Sleep, Wake Up and USB Remote Wake up
-* Media Control Key   - Volume Down/Up, Mute, Next/Prev track, Play, Stop and etc
-* USB NKRO            - 120 keys(+ 8 modifiers) simultaneously
-* PS/2 mouse support  - PS/2 mouse(TrackPoint) as composite device
-* Keyboard protocols  - PS/2, ADB, M0110, Sun and other old keyboard protocols
-* User Function       - Customizable function of key with writing code
-* Macro               - Very primitive at this time
-* Keyboard Tricks     - Oneshot modifier and modifier with tapping feature
-* Debug Console       - Messages for debug and interaction with firmware
-* Virtual DIP Switch  - Configurations stored EEPROM(Boot Magic)
-* Locking CapsLock    - Mechanical switch support for CapsLock
-* Breathing Sleep LED - Sleep indicator with charm during USB suspend
-* Backlight           - Control backlight levels
-
-
-
-Projects
---------
-You can find some keyboard specific projects under `converter` and `keyboard` directory.
-
-## Main projects
-
-### OLKB products
-* [planck](keyboards/planck/)                - [Planck] Ortholinear 40% keyboard
-* [preonic](keyboards/preonic/)              - [Preonic] Ortholinear 50% keyboard
-* [atomic](keyboards/atomic/)                - [Atomic] Ortholinear 60% keyboard
-
-### Ergodox EZ
-* [ergodox_ez](keyboards/ergodox/ez)         - [Ergodox_EZ] Assembled split keyboard
-
-## Other projects
-
-### converter
-* [ps2_usb](converter/ps2_usb/)             - [PS/2 keyboard to USB][GH_ps2]
-* [adb_usb](converter/adb_usb/)             - [ADB keyboard to USB][GH_adb]
-* [m0110_usb](converter/m0110_usb)          - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110]
-* [terminal_usb](converter/terminal_usb/)   - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal]
-* [news_usb](converter/news_usb/)           - [Sony NEWS keyboard to USB][GH_news]
-* [x68k_usb](converter/x68k_usb/)           - [Sharp X68000 keyboard to USB][GH_x68k]
-* [sun_usb](converter/sun_usb/)             - [Sun] to USB(type4, 5 and 3?)
-* [pc98_usb](converter/pc98_usb/)           - [PC98] to USB
-* [usb_usb](converter/usb_usb/)             - USB to USB(experimental)
-* [ascii_usb](converter/ascii_usb/)         - ASCII(Serial console terminal) to USB
-* [ibm4704_usb](converter/ibm4704_usb)      - [IBM 4704 keyboard Converter][GH_ibm4704]
-
-### keyboard
-* [hhkb](keyboards/hhkb/)                    - [Happy Hacking Keyboard pro][GH_hhkb] hasu's main board
-* [gh60](keyboards/gh60/)                    - [GH60] DIY 60% keyboard [prototype][GH60_proto] hasu's second board
-* [hbkb](keyboards/hbkb/)                    - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod)
-* [hid_liber](keyboards/hid_liber/)          - [HID liberation][HID_liber] controller (by alaricljs)
-* [phantom](keyboards/phantom/)              - [Phantom] keyboard (by Tranquilite)
-* [IIgs_Standard](keyboards/IIgs/)           - Apple [IIGS] keyboard mod(by JeffreySung)
-* [macway](keyboards/macway/)                - [Compact keyboard mod][GH_macway] [retired]
-* [KMAC](keyboards/kmac/)                    - Korean custom keyboard
-* [Lightsaber](keyboards/lightsaber/)        - Korean custom keyboard
-* [Infinity](keyboards/infinity/)            - Massdrop [Infinity keyboard][Infinity]
-* [NerD](keyboards/nerd/)                    - Korean custom keyboard
-* [KittenPaw](keyboards/kitten_paw)          - Custom Majestouch controller
-* [Lightpad](keyboards/lightpad)             - Korean custom keypad
-* [ghost_squid](keyboards/ghost_squid/)      - [The Ghost Squid][ghost_squid] controller for [Cooler Master QuickFire XT][cmxt]
-
-### Extenal projects using tmk_keyboard
-* [ErgoDox_cub-uanic][cub-uanic]            - Split Ergonomic Keyboard [ErgoDox][ergodox_org]
-* [mcdox][mcdox_tmk]                        - [mcdox][mcdox]
-
-
-[GH_macway]:    http://geekhack.org/showwiki.php?title=Island:11930
-[GH_hhkb]:      http://geekhack.org/showwiki.php?title=Island:12047
-[GH_ps2]:       http://geekhack.org/showwiki.php?title=Island:14618
-[GH_adb]:       http://geekhack.org/showwiki.php?title=Island:14290
-[GH_hhkb_bt]:   http://geekhack.org/showwiki.php?title=Island:20851
-[GH_m0110]:     http://geekhack.org/showwiki.php?title=Island:24965
-[GH_news]:      http://geekhack.org/showwiki.php?title=Island:25759
-[GH_terminal]:  http://geekhack.org/showwiki.php?title=Island:27272
-[GH_x68k]:      http://geekhack.org/showwiki.php?title=Island:29060
-[GH_hbkb]:      http://geekhack.org/showwiki.php?title=Island:29483
-[GH_ibm4704]:   http://geekhack.org/index.php?topic=54706.0
-[HID_liber]:    http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions
-[Phantom]:      http://geekhack.org/index.php?topic=26742
-[GH60]:         http://geekhack.org/index.php?topic=34959
-[GH60_proto]:   http://geekhack.org/index.php?topic=37570.0
-[PC98]:         http://en.wikipedia.org/wiki/NEC_PC-9801
-[Sun]:          http://en.wikipedia.org/wiki/Sun-3
-[IIGS]:         http://en.wikipedia.org/wiki/Apple_IIGS
-[Infinity]:     https://www.massdrop.com/buy/infinity-keyboard-kit
-[ghost_squid]:  http://deskthority.net/wiki/Costar_replacement_controllers#The_Ghost_Squid
-[cmxt]:         http://gaming.coolermaster.com/en/products/keyboard/quickfirext/
-[ergodox_org]:  http://ergodox.org/
-[cub-uanic]:    https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox
-[mcdox]:        https://github.com/DavidMcEwan/mcdox
-[mcdox_tmk]:    https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox
-[Planck]:       http://olkb.co/planck
-[Preonic]:      http://olkb.co/preonic
-[Atomic]:       http://olkb.co/atomic
-[Ergodox_EZ]:   https://www.indiegogo.com/projects/ergodox-ez-an-incredible-mechanical-keyboard
-
-
-License
--------
-**GPLv2** or later. Some protocol files are under **Modified BSD License**.
-
-Third party libraries like LUFA, PJRC and V-USB have their own license respectively.
-
-
-
-Build Firmware and Program Controller
--------------------------------------
-See [build environment setup](/readme.md#build-environment-setup), or the readme in the particular keyboards/* folder.
-
-
-
-Change your keymap
-------------------
-See [doc/keymap.md](tmk_core/doc/keymap.md).
-
-
-
-Magic Commands
---------------
-To see help press `Magic` + `H`.
-
-`Magic` key combination is `LShift` + `RShift` in many project, but `Power` key on ADB converter. 
-`Magic` keybind can be vary on each project, check `config.h` in project directory.
-
-Following commands can be also executed with `Magic` + key. In console mode `Magic` keybind is not needed.
-
-    ----- Command Help -----
-    c:      enter console mode
-    d:      toggle debug enable
-    x:      toggle matrix debug
-    k:      toggle keyboard debug
-    m:      toggle mouse debug
-    v:      print device version & info
-    t:      print timer count
-    s:      print status
-    e:     print eeprom config
-    n:     toggle NKRO
-    0/F10:  switch to Layer0
-    1/F1:   switch to Layer1
-    2/F2:   switch to Layer2
-    3/F3:   switch to Layer3
-    4/F4:   switch to Layer4
-    PScr:   power down/remote wake-up
-    Caps:   Lock Keyboard(Child Proof)
-    Paus:   jump to bootloader
-
-
-
-Boot Magic Configuration - Virtual DIP Switch
----------------------------------------------
-Boot Magic are executed during boot up time. Press Magic key below then plug in keyboard cable.
-Note that you must use keys of **Layer 0** as Magic keys. These settings are stored in EEPROM so that retain your configure over power cycles.
-
-To avoid configuring accidentally additive salt key `KC_SPACE` also needs to be pressed along with the following configuration keys. The salt key is configurable in `config.h`. See [tmk_core/common/bootmagic.h](tmk_core/common/bootmagic.h).
-
-#### General
-- Skip reading EEPROM to start with default configuration(`ESC`)
-- Clear configuration stored in EEPROM to reset configuration(`Backspace`)
-
-#### Bootloader
-- Kick up Bootloader(`B`)
-
-#### Debug
-- Debug enable(`D`)
-- Debug matrix enable(`D`+`X`)
-- Debug keyboard enable(`D`+`K`)
-- Debug mouse enable(`D`+`M`)
-
-#### Keymap
-- Swap Control and CapsLock(`Left Control`)
-- Change CapsLock to Control(`Caps Lock`)
-- Swap LeftAlt and Gui(`Left Alt`)
-- Swap RightAlt and Gui(`Right Alt`)
-- Disable Gui(`Left Gui`)
-- Swap Grave and Escape(`Grave`)
-- Swap BackSlash and BackSpace(`Back Slash`)
-- Enable NKRO on boot(`N`)
-
-#### Default Layer
-- Set Default Layer to 0(`0`)
-- Set Default Layer to 1(`1`)
-- Set Default Layer to 2(`2`)
-- Set Default Layer to 3(`3`)
-- Set Default Layer to 4(`4`)
-- Set Default Layer to 5(`5`)
-- Set Default Layer to 6(`6`)
-- Set Default Layer to 7(`7`)
-
-
-
-Mechanical Locking support
---------------------------
-This feature makes it possible for you to use mechanical locking switch for `CapsLock`, `NumLock` 
-or `ScrollLock`. To enable this feature define these macros in `config.h` and use `KC_LCAP`, `KC_LN
-UM` or `KC_LSCR` in keymap for locking key instead of normal `KC_CAPS`, `KC_NLCK` or `KC_SLCK`. Res
-ync option tries to keep switch state consistent with keyboard LED state.
-    #define LOCKING_SUPPORT_ENABLE
-    #define LOCKING_RESYNC_ENABLE
-
-
-
-Start Your Own Project
------------------------
-**TBD**
-
-
-
-Debugging
---------
-Use PJRC's `hid_listen` to see debug messages. You can use the tool for debug even if firmware use LUFA stack.
-
-You can use xprintf() to display debug info on `hid_listen`, see `tmk_core/common/xprintf.h`.
-
-
-
-Files and Directories
--------------------
-### Top
-* tmk_core/     - core library
-* keyboards/     - keyboard projects
-* converter/    - protocol converter projects
-* doc/          - documents
-
-
-
-Coding Style
--------------
-- Doesn't use Tab to indent, use 4-spaces instead.
-
-
-
-Other Keyboard Firmware Projects
-------------------
-You can learn a lot about keyboard firmware from these. See [doc/other_projects.md](tmk_core/doc/other_projects.md).
diff --git a/doc/USB_NKRO.txt b/doc/USB_NKRO.txt
deleted file mode 100644 (file)
index d9f1d12..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-USB NKRO MEMO
-=============
-2010/12/09
-
-
-References
-----------
-USB - boot mode, NKRO, compatibility, etc...
-    http://geekhack.org/showthread.php?t=13162
-NKey Rollover - Overview, Testing Methodology, and Results
-    http://geekhack.org/showwiki.php?title=NKey+Rollover+-+Overview+Testing+Methodology+and+Results
-dfj's NKRO(2010/06)
-    http://geekhack.org/showpost.php?p=191195&postcount=251
-    http://geekhack.org/showthread.php?p=204389#post204389
-
-
-Terminology
----------
-NKRO
-ghost
-matrix
-mechanical with diodes
-membrane
-
-
-OS Support Status
------------------
-USB NKRO is possible *without* a custom driver.
-At least following OS's supports.
-    Windows7 64bit
-    WindowsXP
-    Windows2000 SP4
-    Ubuntu10.4(Linux 2.6)
-    MacOSX(To be tested)
-
-
-Custom Driver for USB NKRO
---------------------------
-NOT NEEDED
-at least when using following report formats on Windows, Linux or MacOSX.
-
-
-USB NKRO methods
-----------------
-1. Virtual keyboards
-    Keyboard can increase its KRO by using virtual keyboards with Standard or Extended report.
-    If the keyboard has 2 virtual keyboard with Standard report(6KRO), it gets 12KRO.
-    Using this method means the keyboard is a composite device.
-
-2. Extended report
-    It needs large report size for this method to achieve NKRO.
-    If a keyboard has 101keys, it needs 103byte report. It seems to be inefficient.
-
-3. Bitmap report
-    If the keyboard has less than 128keys, 16byte report will be enough for NKRO.
-    The 16byte report seems to be reasonable cost to get NKRO.
-
-
-Report Format
--------------
-Other report formats than followings are possible, though these format are typical one.
-
-1. Standard             8bytes
-    modifiers(bitmap)       1byte
-    reserved                1byte(not used)
-    keys(array)             1byte*6
-Standard report can send 6keys plus 8modifiers simultaneously.
-Standard report is used by most keyboards in the marketplace.
-Standard report is identical to boot protocol report.
-Standard report is hard to suffer from compatibility problems.
-
-2. Extended standard    16,32,64bytes
-    modifiers(bitmap)       1byte
-    reserved                1byte(not used)
-    keys(array)             1byte*(14,32,62)
-Extended report can send N-keys by using N+2bytes.
-Extended report is expected to be compatible with boot protocol.
-
-3. Bitmap               16,32,64bytes
-    keys(bitmap)            (16,32)bytes
-Bitmap report can send at most 128keys by 16bytes and 256keys by 32bytes.
-Bitmap report can achieve USB NKRO efficiently in terms of report size.
-Bitmap report needs a deliberation for boot protocol implementation.
-Bitmap report descriptor sample:
-        0x05, 0x01,                     // Usage Page (Generic Desktop),
-        0x09, 0x06,                     // Usage (Keyboard),
-        0xA1, 0x01,                     // Collection (Application),
-        // bitmap of modifiers
-        0x75, 0x01,                     //   Report Size (1),
-        0x95, 0x08,                     //   Report Count (8),
-        0x05, 0x07,                     //   Usage Page (Key Codes),
-        0x19, 0xE0,                     //   Usage Minimum (224),
-        0x29, 0xE7,                     //   Usage Maximum (231),
-        0x15, 0x00,                     //   Logical Minimum (0),
-        0x25, 0x01,                     //   Logical Maximum (1),
-        0x81, 0x02,                     //   Input (Data, Variable, Absolute), ;Modifier byte
-        // LED output report
-        0x95, 0x05,                     //   Report Count (5),
-        0x75, 0x01,                     //   Report Size (1),
-        0x05, 0x08,                     //   Usage Page (LEDs),
-        0x19, 0x01,                     //   Usage Minimum (1),
-        0x29, 0x05,                     //   Usage Maximum (5),
-        0x91, 0x02,                     //   Output (Data, Variable, Absolute),
-        0x95, 0x01,                     //   Report Count (1),
-        0x75, 0x03,                     //   Report Size (3),
-        0x91, 0x03,                     //   Output (Constant),
-        // bitmap of keys
-        0x95, (REPORT_BYTES-1)*8,      //   Report Count (),
-        0x75, 0x01,                     //   Report Size (1),
-        0x15, 0x00,                     //   Logical Minimum (0),
-        0x25, 0x01,                     //   Logical Maximum(1),
-        0x05, 0x07,                     //   Usage Page (Key Codes),
-        0x19, 0x00,                     //   Usage Minimum (0),
-        0x29, (REPORT_BYTES-1)*8-1,    //   Usage Maximum (),
-        0x81, 0x02,                     //   Input (Data, Variable, Absolute),
-        0xc0                            // End Collection
-where REPORT_BYTES is a report size in bytes.
-
-
-Considerations
---------------
-Compatibility
-    boot protocol
-    minor/old system
-        Some BIOS doesn't send SET_PROTOCOL request, a keyboard can't switch to boot protocol mode.
-        This may cause a problem on a keyboard which uses other report than Standard.
-Reactivity
-    USB polling time
-    OS/Driver processing time
-
-
-Windows Problem
----------------
-1. Windows accepts only 6keys  in case of Standard report.
-        It should be able to send 6keys plus 8modifiers.
-2. Windows accepts only 10keys in case of 16bytes Extended report.
-        It should be able to send 14keys plus 8modifiers.
-3. Windows accepts only 18keys in case of 32bytes Extended report.
-        It should be able to send 30keys plus 8modifiers.
-If keys are pressed in excess of the number, wrong keys are registered on Windows.
-
-This problem will be reportedly fixed soon.(2010/12/05)
-    http://forums.anandtech.com/showpost.php?p=30873364&postcount=17
-
-
-Tools for testing NKRO
-----------------------
-Browser App:
-http://www.microsoft.com/appliedsciences/content/projects/KeyboardGhostingDemo.aspx
-http://random.xem.us/rollover.html
-
-Windows:
-AquaKeyTest.exe http://geekhack.org/showthread.php?t=6643
-
-Linux:
-xkeycaps
-xev
-showkeys
-
-EOF
diff --git a/doc/VAGRANT_GUIDE.md b/doc/VAGRANT_GUIDE.md
deleted file mode 100644 (file)
index 439e78d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# Quick Start Directions
-
-This project includes a Vagrantfile that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter.
-
-## Requirements
-
-Using the `/Vagrantfile` in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as [VirtualBox](https://www.virtualbox.org/) (or [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) but the (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion).
-
-*COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** `vagrant plugin install vagrant-vbguest`
-
-
-Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below.
-
-Build Firmware and Program Controller
--------------------------------------
-See [/doc/BUIDE_GUIDE.md](/doc/BUILD_GUIDE.md), or the readme in the particular keyboards/* folder.
-
-Change your keymap
-------------------
-See [/doc/keymap.md](/doc/keymap.md).
-
-## Flashing the firmware
-
-The "easy" way to flash the firmware is using a tool from your host OS like the Teensy programming app. [ErgoDox EZ](/keyboards/ergodox/readme.md) gives a great example.
-
-If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version.
-       
diff --git a/doc/basic_how_keyboards_work.md b/doc/basic_how_keyboards_work.md
deleted file mode 100644 (file)
index 73c3f5c..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-# How keys are registered, and interpreted by computers
-
-In this file, you can will learn the concepts of how keyboards work over USB,
-and you'll be able to better understand what you can expect from changing your
-firmware directly.
-
-## Schematic view
-
-Whenever you type on 1 particular key, here is the chain of actions taking
-place:
-
-``` text
-+------+         +-----+       +----------+      +----------+     +----+
-| User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS |
-+------+         +-----+       +----------+      +----------+     |----+
-```
-
-This scheme is a very simple view of what's going on, and more details follow
-in the next sections.
-
-## 1. You Press a Key
-
-Whenever you press a key, the firmware of your keyboard can register this event.
-It can register when the key is pressed, held and released.
-
-This usually happens with a [periodic scan of key presses with a frequency around 100 hz](https://github.com/benblazak/ergodox-firmware/blob/master/references.md#typical-keyboard-information).
-This speed often is limited by the mechanical key response time, the protocol
-to transfer those key presses (here USB HID), and by the software it is used in.
-
-## 2. What the Firmware Sends
-
-The [HID specification](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf)
-tells what a keyboard can actually send through USB to have a chance to be
-properly recognised. This includes a pre-defined list of keycodes which are
-simple numbers from `0x00` to `0xE7`. The firmware assigns a keycode to each
-key of the keyboard.
-
-The firmware does not send actually letters or characters, but only keycodes.
-Thus, by modifying the firmware, you only can modify what keycode is sent over
-USB for a given key.
-
-## 3. What the Operating System Does
-
-Once the keycode reaches the operating system, a piece of software has to have
-it match an actual character thanks to a keyboard layout. For example, if your
-layout is set to QWERTY, a sample of the matching table is as follow:
-
-``` text
-| keycode | character |
-|---------+-----------|
-|    0x04 | a/A       |
-|    0x05 | b/B       |
-|    0x06 | c/C       |
-|     ... | ...       |
-|    0x1C | y/Y       |
-|    0x1D | z/Z       |
-|     ... | ...       |
-|---------+-----------|
-```
-
-## Back to the firmware
-
-As the layout is generally fixed (unless you create your own), the firmware can
-actually call a keycode by its layout name directly to ease things for you.
-
-This is exactly what is done here with `KC_A` actually representing `0x04` in
-QWERTY. The full list can be found in `keycode.txt`.
-
-## List of Characters You Can Send
-
-Putting aside shortcuts, having a limited set of keycodes mapped to a limited
-layout means that **the list of characters you can assign to a given key only
-is the ones present in the layout**.
-
-For example, this means that if you have a QWERTY US layout, and you want to
-assign 1 key to produce `€` (euro currency symbol), you are unable to do so,
-because the QWERTY US layout does not have such mapping. You could fix that by
-using a QWERTY UK layout, or a QWERTY US International.
-
-You may wonder why a keyboard layout containing all of Unicode is not devised
-then? The limited number of keycode available through USB simply disallow such
-a thing.
-
-## How to (Maybe) Enter Unicode Characters
-
-You can have the firmware send *sequences of keys* to use the [software Unicode
-Input
-Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input) of
-the target operating system, thus effectively entering characters independently
-of the layout defined in the OS.
-
-Yet, it does come with multiple disadvantages:
-
- - Tied to a specific OS a a time (need recompilation when changing OS);
- - Within a given OS, does not work in all software;
- - Limited to a subset of Unicode on some systems.
diff --git a/doc/build_old.md b/doc/build_old.md
deleted file mode 100644 (file)
index 5c2d57d..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-Build Firmware and Program Controller
-=====================================
-
-## This guide may be out-dated - use doc/BUILD_GUIDE.md instead
-
-Download and Install
---------------------
-### 1. Install Tools
-
-1. **Toolchain** On Windows install [MHV AVR Tools][mhv] for AVR GCC compiler and [Cygwin][cygwin](or [MinGW][mingw]) for shell terminal. On Mac you can use [CrossPack][crosspack]. On Linux you can install AVR GCC (and avr-libc) with your favorite package manager or run the avr_setup.sh script in the root of this repository.
-
-2. **Programmer** On Windows install [Atmel FLIP][flip]. On Mac and Linux install [dfu-programmer][dfu-prog].
-
-3. **Driver** On Windows you start DFU bootloader on the chip first time you will see 'Found New Hardware Wizard' to install driver. If you install device driver properly you can find chip name like 'ATmega32U4' under 'LibUSB-Win32 Devices' tree on 'Device Manager'. If not you shall need to update its driver on 'Device Manager'. You will find the driver in `FLIP` install directory like: C:\Program Files (x86)\Atmel\Flip 3.4.5\usb\. In case of `dfu-programmer` use its driver.
-
-If you use PJRC Teensy you don't need step 2 and 3 above, just get [Teensy loader][teensy-loader].
-
-
-### 2. Download source
-You can find firmware source at github:
-
-- <https://github.com/tmk/tmk_keyboard>
-
-If you are familiar with `Git` tools you are recommended to use it but you can also download zip archive from:
-
-- <https://github.com/tmk/tmk_keyboard/archive/master.zip>
-
-
-Build firmware
---------------
-### 1. Open terminal
-Open terminal window to get access to commands. Use Cygwin(or MingGW) `shell terminal` in Windows or `Terminal.app` on Mac OSX. In Windows press `Windows` key and `R` then enter `cmd` in 'Run command' dialog showing up.
-
-### 2. Change directory
-Move to project directory in the firmware source.
-
-    cd tmk_keyboard/{'keyboard' or 'converter'}/<project>
-
-### 3. Make
-Build firmware using GNU `make` command. You'll see `<project>_<variant>.hex` file in that directory unless something unexpected occurs in build process.
-
-
-    make -f Makefile.<variant> clean
-    make -f Makefile.<variant>
-
-
-
-
-Program Controller
-------------------
-Now you have **hex** file to program on current directory. This **hex** is only needed to program your controller, other files are used for development and you may leave and forget them.
-
-### 1. Start bootloader
-How to program controller depends on controller chip and its board design. To program AVR USB chips you'll need to start it up in bootloader mode. Most of boards with the chip have a push button to let bootloader come up. Consult with your controller board manual.
-
-### 2. Program with DFU bootloader
-Stock AVR USB chip including ATmega32U4 has DFU bootloader by factory default. `FLIP` is a DFU programmer on Windows offered by Atmel. Open source command line tool `dfu-programmer` also supports AVR chips, it runs on Linux, Mac OSX and even Windows.
-
-To program AVR chip with DFU bootloader use `FLIP` or `dfu-programmer`.
-If you have a proper program command in `Makefile` just type this.
-
-`FLIP` has two version of tool, GUI app and command line program. If you want GUI see tutorial below.
-To use command line tool run this command. Note that you need to set PATH variable properly.
-
-    $ make -f Makefile.<variant> flip
-
-Or to program with `dfu-programmer` run:
-
-    $ make -f Makefile.<variant> dfu
-
-#### FLIP GUI tutorial
-1. On menu bar click Device -> Select, then. `ATmega32u4`.
-2. On menu bar click Settings -> Communication -> USB, then click 'Open' button on 'USB Port Connection' dialog.
-At this point you'll see grey-outed widgets on the app get colored and ready.
-
-3. On menu bar click File -> Load HEX File, then select your firmware hex file on File Selector dialog.
-4. On 'Operations Flow' panel click 'Run' button to load the firmware binary to the chip. Note that you should keep 'Erase', 'Blank Check', 'Program' and 'Verify' check boxes selected.
-5. Re-plug USB cord or click 'Start Application' button to restart your controller.
-Done.
-
-See also these instructions if you need.
-
-- <http://code.google.com/p/micropendous/wiki/LoadingFirmwareWithFLIP>
-- <http://www.atmel.com/Images/doc7769.pdf>
-
-
-### 3. Program with Teensy Loader
-If you have PJRC Teensy see instruction of `Teensy Loader`.
-
-- <http://www.pjrc.com/teensy/loader.html>
-
-Or use this command if you have command line version of Teensy Loader installed.
-
-    $ make -f Makefile.<variant> teensy
-
-
-### 4. Program with Other programmer
-You may want to use other programmer like `avrdude` with AVRISPmkII, Arduino or USBasp. In that case you can still use make target `program` for build with configuring `PROGRAM_CMD` in Makefile.
-
-    $ make -f Makefile.<variant> program
-
-
-[cygwin]:       https://www.cygwin.com/
-[mingw]:        http://www.mingw.org/
-[mhv]:          https://infernoembedded.com/products/avr-tools
-[winavr]:       http://winavr.sourceforge.net/
-[crosspack]:    http://www.obdev.at/products/crosspack/index.html
-[flip]:         http://www.atmel.com/tools/FLIP.aspx
-[dfu-prog]:     http://dfu-programmer.sourceforge.net/
-[teensy-loader]:http://www.pjrc.com/teensy/loader.html
-
-
-
-Makefile Options
-----------------
-### 1. MCU and Frequency.
-
-    MCU = atmega32u4       # Teensy 2.0
-    #MCU = at90usb1286      # Teensy++ 2.0
-    F_CPU = 16000000
-
-Set your MCU and its clock in Hz.
-
-    # Boot Section Size in *bytes*
-    #   Teensy halfKay   512
-    #   Atmel DFU loader 4096
-    #   LUFA bootloader  4096
-    OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-If you are using PJRC Teensy use `512` for `BOOTLOADER_SIZE`, otherwise use `4096` unless you are sure.
-
-### 2. Features
-Optional. Note that ***comment out*** with `#` to disable them.
-
-    BOOTMAGIC_ENABLE = yes      # Virtual DIP switch configuration(+1000)
-    MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
-    EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
-    CONSOLE_ENABLE = yes        # Console for debug(+400)
-    COMMAND_ENABLE = yes        # Commands for debug and configuration
-    SLEEP_LED_ENABLE = yes      # Breathing sleep LED during USB suspend
-    #NKRO_ENABLE = yes          # USB Nkey Rollover - not yet supported in LUFA
-    #BACKLIGHT_ENABLE = yes     # Enable keyboard backlight functionality
-
-### 3. Programmer
-Optional. Set proper command for your controller, bootloader and programmer. This command can be used with `make program`. Not needed if you use `FLIP`, `dfu-programmer` or `Teensy Loader`.
-
-    # avrdude with AVRISPmkII
-    PROGRAM_CMD = avrdude -p $(MCU) -c avrispmkII -P USB -U flash:w:$(TARGET).hex
-
-    # avrdude with USBaspLoader
-    PROGRAM_CMD = avrdude -p $(MCU) -c usbasp -U flash:w:$(TARGET).hex
-
-    # avrdude with arduino
-    PROGRAM_CMD = avrdude -p $(MCU) -c arduino -P COM1 -b 57600 -U flash:w:$(TARGET).hex
-
-
-
-Config.h Options
-----------------
-### 1. Magic command key combination
-
-    #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_RSHIFT)))
-
-### 2. Mechanical Locking Support for CapsLock
-
-    /* Mechanical locking CapsLock support. Use KC_LCAP instead of KC_CAPS in keymap */
-    #define CAPSLOCK_LOCKING_ENABLE
-    /* Locking CapsLock re-synchronize hack */
-    #define CAPSLOCK_LOCKING_RESYNC_ENABLE
-
-### 3. Disable Debug and Print
-
-    /* disable debug print */
-    #define NO_DEBUG
-
-    /* disable print */
-    #define NO_PRINT
-
-### 4. Disable Action Features
-
-    #define NO_ACTION_LAYER
-    #define NO_ACTION_TAPPING
-    #define NO_ACTION_ONESHOT
-    #define NO_ACTION_MACRO
-    #define NO_ACTION_FUNCTION
-
-***TBD***
diff --git a/doc/keycode.txt b/doc/keycode.txt
deleted file mode 100644 (file)
index 687406f..0000000
+++ /dev/null
@@ -1,261 +0,0 @@
-Keycode Symbol Table
-====================
-Keycodes are defined in `common/keycode.h`.
-Range of 00-A4 and E0-E7 are identical with HID Usage:
-<http://www.usb.org/developers/hidpage/Hut1_12v2.pdf>
-Virtual keycodes are defined out of above range to support special actions.
-
-
-Keycode Symbol      Short name      Description
---------------------------------------------------------------------------------
-KC_NO                               00 Reserved (no event indicated)
-KC_ROLL_OVER                        01 Keyboard ErrorRollOver
-KC_POST_FAIL                        02 Keyboard POSTFail
-KC_UNDEFINED                        03 Keyboard ErrorUndefined
-KC_A                                04 Keyboard a and A
-KC_B                                05 Keyboard b and B
-KC_C                                06 Keyboard c and C
-KC_D                                07 Keyboard d and D
-KC_E                                08 Keyboard e and E
-KC_F                                09 Keyboard f and F
-KC_G                                0A Keyboard g and G
-KC_H                                0B Keyboard h and H
-KC_I                                0C Keyboard i and I
-KC_J                                0D Keyboard j and J
-KC_K                                0E Keyboard k and K
-KC_L                                0F Keyboard l and L
-KC_M                                10 Keyboard m and M
-KC_N                                11 Keyboard n and N
-KC_O                                12 Keyboard o and O
-KC_P                                13 Keyboard p and P
-KC_Q                                14 Keyboard q and Q
-KC_R                                15 Keyboard r and R
-KC_S                                16 Keyboard s and S
-KC_T                                17 Keyboard t and T
-KC_U                                18 Keyboard u and U
-KC_V                                19 Keyboard v and V
-KC_W                                1A Keyboard w and W
-KC_X                                1B Keyboard x and X
-KC_Y                                1C Keyboard y and Y
-KC_Z                                1D Keyboard z and Z
-KC_1                                1E Keyboard 1 and !
-KC_2                                1F Keyboard 2 and @
-KC_3                                20 Keyboard 3 and #
-KC_4                                21 Keyboard 4 and $
-KC_5                                22 Keyboard 5 and %
-KC_6                                23 Keyboard 6 and ^
-KC_7                                24 Keyboard 7 and &
-KC_8                                25 Keyboard 8 and *
-KC_9                                26 Keyboard 9 and (
-KC_0                                27 Keyboard 0 and )
-KC_ENTER            KC_ENT          28 Keyboard Return (ENTER)
-KC_ESCAPE           KC_ESC          29 Keyboard ESCAPE
-KC_BSPACE           KC_BSPC         2A Keyboard DELETE (Backspace)
-KC_TAB                              2B Keyboard Tab
-KC_SPACE            KC_SPC          2C Keyboard Spacebar
-KC_MINUS            KC_MINS         2D Keyboard - and (underscore)
-KC_EQUAL            KC_EQL          2E Keyboard = and +
-KC_LBRACKET         KC_LBRC         2F Keyboard [ and {
-KC_RBRACKET         KC_RBRC         30 Keyboard ] and }
-KC_BSLASH           KC_BSLS         31 Keyboard \ and |
-KC_NONUS_HASH       KC_NUHS         32 Keyboard Non-US # and ~
-KC_SCOLON           KC_SCLN         33 Keyboard ; and :
-KC_QUOTE            KC_QUOT         34 Keyboard ‘ and “
-KC_GRAVE            KC_GRV          35 Keyboard Grave Accent and Tilde
-KC_COMMA            KC_COMM         36 Keyboard , and <
-KC_DOT                              37 Keyboard . and >
-KC_SLASH            KC_SLSH         38 Keyboard / and ?
-KC_CAPSLOCK         KC_CAPS         39 Keyboard Caps Lock
-KC_F1                               3A Keyboard F1
-KC_F2                               3B Keyboard F2
-KC_F3                               3C Keyboard F3
-KC_F4                               3D Keyboard F4
-KC_F5                               3E Keyboard F5
-KC_F6                               3F Keyboard F6
-KC_F7                               40 Keyboard F7
-KC_F8                               41 Keyboard F8
-KC_F9                               42 Keyboard F9
-KC_F10                              43 Keyboard F10
-KC_F11                              44 Keyboard F11
-KC_F12                              45 Keyboard F12
-KC_PSCREEN          KC_PSCR         46 Keyboard PrintScreen1
-KC_SCKLOCK          KC_SLCK         47 Keyboard Scroll Lock11
-KC_PAUSE            KC_PAUS         48 Keyboard Pause1
-KC_INSERT           KC_INS          49 Keyboard Insert1
-KC_HOME                             4A Keyboard Home1
-KC_PGUP                             4B Keyboard PageUp1
-KC_DELETE           KC_DEL          4C Keyboard Delete Forward
-KC_END                              4D Keyboard End1
-KC_PGDOWN           KC_PGDN         4E Keyboard PageDown1
-KC_RIGHT            KC_RGHT         4F Keyboard RightArrow1
-KC_LEFT                             50 Keyboard LeftArrow1
-KC_DOWN                             51 Keyboard DownArrow1
-KC_UP                               52 Keyboard UpArrow1
-KC_NUMLOCK          KC_NLCK         53 Keypad Num Lock and Clear11
-KC_KP_SLASH         KC_PSLS         54 Keypad /
-KC_KP_ASTERISK      KC_PAST         55 Keypad *
-KC_KP_MINUS         KC_PMNS         56 Keypad -
-KC_KP_PLUS          KC_PPLS         57 Keypad +
-KC_KP_ENTER         KC_PENT         58 Keypad ENTER5
-KC_KP_1             KC_P1           59 Keypad 1 and End
-KC_KP_2             KC_P2           5A Keypad 2 and Down Arrow
-KC_KP_3             KC_P3           5B Keypad 3 and PageDn
-KC_KP_4             KC_P4           5C Keypad 4 and Left Arrow
-KC_KP_5             KC_P5           5D Keypad 5
-KC_KP_6             KC_P6           5E Keypad 6 and Right Arrow
-KC_KP_7             KC_P7           5F Keypad 7 and Home
-KC_KP_8             KC_P8           60 Keypad 8 and Up Arrow
-KC_KP_9             KC_P9           61 Keypad 9 and PageUp
-KC_KP_0             KC_P0           62 Keypad 0 and Insert
-KC_KP_DOT           KC_PDOT         63 Keypad . and Delete
-KC_NONUS_BSLASH     KC_NUBS         64 Keyboard Non-US \ and |
-KC_APPLICATION      KC_APP          65 Keyboard Application10
-KC_POWER                            66 Keyboard Power9
-KC_KP_EQUAL         KC_PEQL         67 Keypad =
-KC_F13                              68 Keyboard F13
-KC_F14                              69 Keyboard F14
-KC_F15                              6A Keyboard F15
-KC_F16                              6B Keyboard F16
-KC_F17                              6C Keyboard F17
-KC_F18                              6D Keyboard F18
-KC_F19                              6E Keyboard F19
-KC_F20                              6F Keyboard F20
-KC_F21                              70 Keyboard F21
-KC_F22                              71 Keyboard F22
-KC_F23                              72 Keyboard F23
-KC_F24                              73 Keyboard F24
-KC_EXECUTE                          74 Keyboard Execute
-KC_HELP                             75 Keyboard Help
-KC_MENU                             76 Keyboard Menu
-KC_SELECT                           77 Keyboard Select
-KC_STOP                             78 Keyboard Stop
-KC_AGAIN                            79 Keyboard Again
-KC_UNDO                             7A Keyboard Undo
-KC_CUT                              7B Keyboard Cut
-KC_COPY                             7C Keyboard Copy
-KC_PASTE                            7D Keyboard Paste
-KC_FIND                             7E Keyboard Find
-KC__MUTE                            7F Keyboard Mute
-KC__VOLUP                           80 Keyboard Volume Up
-KC__VOLDOWN                         81 Keyboard Volume Down
-KC_LOCKING_CAPS                     82 Keyboard Locking Caps Lock12
-KC_LOCKING_NUM                      83 Keyboard Locking Num Lock12
-KC_LOCKING_SCROLL                   84 Keyboard Locking Scroll Lock12
-KC_KP_COMMA         KC_PCMM         85 Keypad Comma27
-KC_KP_EQUAL_AS400                   86 Keypad Equal Sign29
-KC_INT1             KC_RO           87 Keyboard International115,28
-KC_INT2             KC_KANA         88 Keyboard International216
-KC_INT3             KC_JYEN         89 Keyboard International317
-KC_INT4             KC_HENK         8A Keyboard International418
-KC_INT5             KC_MHEN         8B Keyboard International519
-KC_INT6                             8C Keyboard International620
-KC_INT7                             8D Keyboard International721
-KC_INT8                             8E Keyboard International822
-KC_INT9                             8F Keyboard International922
-KC_LANG1                            90 Keyboard LANG125
-KC_LANG2                            91 Keyboard LANG226
-KC_LANG3                            92 Keyboard LANG330
-KC_LANG4                            93 Keyboard LANG431
-KC_LANG5                            94 Keyboard LANG532
-KC_LANG6                            95 Keyboard LANG68
-KC_LANG7                            96 Keyboard LANG78
-KC_LANG8                            97 Keyboard LANG88
-KC_LANG9                            98 Keyboard LANG98
-KC_ALT_ERASE                        99 Keyboard Alternate Erase7
-KC_SYSREQ                           9A Keyboard SysReq/Attention1
-KC_CANCEL                           9B Keyboard Cancel
-KC_CLEAR                            9C Keyboard Clear
-KC_PRIOR                            9D Keyboard Prior
-KC_RETURN                           9E Keyboard Return
-KC_SEPARATOR                        9F Keyboard Separator
-KC_OUT                              A0 Keyboard Out
-KC_OPER                             A1 Keyboard Oper
-KC_CLEAR_AGAIN                      A2 Keyboard Clear/Again
-KC_CRSEL                            A3 Keyboard CrSel/Props
-KC_EXSEL                            A4 Keyboard ExSel
-/* Modifiers */
-KC_LCTRL            KC_LCTL         E0 Keyboard LeftControl
-KC_LSHIFT           KC_LSFT         E1 Keyboard LeftShift
-KC_LALT                             E2 Keyboard LeftAlt
-KC_LGUI                             E3 Keyboard Left GUI(Windows/Apple/Meta key)
-KC_RCTRL            KC_RCTL         E4 Keyboard RightControl
-KC_RSHIFT           KC_RSFT         E5 Keyboard RightShift
-KC_RALT                             E6 Keyboard RightAlt
-KC_RGUI                             E7 Keyboard Right GUI(Windows/Apple/Meta key)
-
-/* 
- * Virtual keycodes
- */
-/* System Control */
-KC_SYSTEM_POWER     KC_PWR          System Power Down
-KC_SYSTEM_SLEEP     KC_SLEP         System Sleep
-KC_SYSTEM_WAKE      KC_WAKE         System Wake
-/* Consumer Page */
-KC_AUDIO_MUTE       KC_MUTE
-KC_AUDIO_VOL_UP     KC_VOLU
-KC_AUDIO_VOL_DOWN   KC_VOLD
-KC_MEDIA_NEXT_TRACK KC_MNXT
-KC_MEDIA_PREV_TRACK KC_MPRV
-KC_MEDIA_STOP       KC_MSTP
-KC_MEDIA_PLAY_PAUSE KC_MPLY
-KC_MEDIA_SELECT     KC_MSEL
-KC_MAIL             KC_MAIL
-KC_CALCULATOR       KC_CALC
-KC_MY_COMPUTER      KC_MYCM
-KC_WWW_SEARCH       KC_WSCH
-KC_WWW_HOME         KC_WHOM
-KC_WWW_BACK         KC_WBAK
-KC_WWW_FORWARD      KC_WFWD
-KC_WWW_STOP         KC_WSTP
-KC_WWW_REFRESH      KC_WREF
-KC_WWW_FAVORITES    KC_WFAV
-/* Mousekey */
-KC_MS_UP            KC_MS_U         Mouse Cursor Up
-KC_MS_DOWN          KC_MS_D         Mouse Cursor Down
-KC_MS_LEFT          KC_MS_L         Mouse Cursor Left
-KC_MS_RIGHT         KC_MS_R         Mouse Cursor Right
-KC_MS_BTN1          KC_BTN1         Mouse Button 1
-KC_MS_BTN2          KC_BTN2         Mouse Button 2
-KC_MS_BTN3          KC_BTN3         Mouse Button 3
-KC_MS_BTN4          KC_BTN4         Mouse Button 4
-KC_MS_BTN5          KC_BTN5         Mouse Button 5
-KC_MS_WH_UP         KC_WH_U         Mouse Wheel Up
-KC_MS_WH_DOWN       KC_WH_D         Mouse Wheel Down
-KC_MS_WH_LEFT       KC_WH_L         Mouse Wheel Left
-KC_MS_WH_RIGHT      KC_WH_R         Mouse Wheel Right
-KC_MS_ACCEL0        KC_ACL0         Mouse Acceleration 0
-KC_MS_ACCEL1        KC_ACL1         Mouse Acceleration 1
-KC_MS_ACCEL2        KC_ACL2         Mouse Acceleration 2
-/* Fn key */
-KC_FN0
-KC_FN1
-KC_FN2
-KC_FN3
-KC_FN4
-KC_FN5
-KC_FN6
-KC_FN7
-KC_FN8
-KC_FN9
-KC_FN10
-KC_FN11
-KC_FN12
-KC_FN13
-KC_FN14
-KC_FN15
-KC_FN16
-KC_FN17
-KC_FN18
-KC_FN19
-KC_FN20
-KC_FN21
-KC_FN22
-KC_FN23
-KC_FN24
-KC_FN25
-KC_FN26
-KC_FN27
-KC_FN28
-KC_FN29
-KC_FN30
-KC_FN31
diff --git a/doc/keymap.md b/doc/keymap.md
deleted file mode 100644 (file)
index 3ea138e..0000000
+++ /dev/null
@@ -1,685 +0,0 @@
-Keymap framework - how to define your keymap
-============================================
-***NOTE: This is updated for QMK but this is still work in progress.  This may still be inconsistent with the source code.***
-
-QMK is based on TMK.   Understanding the essential changes made should help you understand variable names etc.
-
-## TMK vs. QMK
-
-| Firmware                  |TMK                    |QMK                      |
-|---------------------------|-----------------------|-------------------------|
-| Maintainer                |hasu                   |Jack Humbert et al.      |
-| Build path customization  | `TMK_DIR = ...`       | `include .../Makefile`  |
-| `keymaps` data            | 3D array of `uint8_t` holding **keycode**      | 3D array of `uint16_t` holding **action code**  |
-| `fn_actions` data         | 1D array of `uint16_t` holding **action code** | 1D array of `uint16_t` holding **action code**  |
-
-Since QMK is based on TMK and uses major portion of TMK code as is, understanding the essential changes made should help you understand the code.
-
-## 0. Keymap and layers
-In 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.
-
-For 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**.
-
-Respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence.
-
-    Keymap: 32 Layers                   Layer: action code matrix
-    -----------------                   ---------------------
-    stack of layers                     array_of_action_code[row][column]
-           ____________ precedence               _______________________
-          /           / | high                  / ESC / F1  / F2  / F3   ....
-      31 /___________// |                      /-----/-----/-----/-----
-      30 /___________// |                     / TAB /  Q  /  W  /  E   ....
-      29 /___________/  |                    /-----/-----/-----/-----
-       :   _:_:_:_:_:__ |               :   /LCtrl/  A  /  S  /  D   ....
-       :  / : : : : : / |               :  /  :     :     :     :
-       2 /___________// |               2 `--------------------------
-       1 /___________// |               1 `--------------------------
-       0 /___________/  V low           0 `--------------------------
-
-
-Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history.
-
-### 0.1 Keymap layer status
-Keymap layer has its state in two 32 bit parameters:
-
-* **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred.
-* **`layer_state`** () has current on/off status of the layer on its each bit.
-
-Keymap 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.
-Keymap 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`.
-To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
-
-    Initial state of Keymap          Change base layout              
-    -----------------------          ------------------              
-
-      31                               31
-      30                               30
-      29                               29
-       :                                :
-       :                                :   ____________
-       2   ____________                 2  /           /
-       1  /           /              ,->1 /___________/
-    ,->0 /___________/               |  0
-    |                                |
-    `--- default_layer = 0           `--- default_layer = 1
-         layer_state   = 0x00000001       layer_state   = 0x00000002
-
-On 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.
-
-    Overlay feature layer
-    ---------------------      bit|status
-           ____________        ---+------
-      31  /           /        31 |   0
-      30 /___________// -----> 30 |   1
-      29 /___________/  -----> 29 |   1
-       :                        : |   :
-       :   ____________         : |   :
-       2  /           /         2 |   0
-    ,->1 /___________/  ----->  1 |   1
-    |  0                        0 |   0
-    |                                 +
-    `--- default_layer = 1            |
-         layer_state   = 0x60000002 <-'
-
-
-
-### 0.2 Layer Precedence and Transparency
-Note 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.
-
-You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer.
-Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead.
-See example below.
-
-
-### 0.3 Keymap Example
-Keymap in this QMK is **`static const uint16_t PROGMEM keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array.  It holds the 16 bit quantum keycode (action code).
-
-> Please note that keymap in the TMK, which QMK was forked from, is **`static const uint8_t PROGMEM keymaps[]`** C array which holds the 8 bit keycode (~USB HID usage code).
-
-This is a keymap example for [HHKB](http://en.wikipedia.org/wiki/Happy_Hacking_Keyboard) keyboard.
-This example has three layers, 'QWERTY' as base layer, 'FN' and  'MOUSE'.
-
-In this example,
-
- `MO(layer)` is a **momentary layer switching** key.
-
-You can find other keymap definitions in file `keymap.c` located on project directories.
-```
-/*
- * dbroqua HHKB Layout
- */
-#include "hhkb.h"
-
-#define BASE 0
-#define FN 1
-#define MOUSE 2
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* BASE Level: Default Layer
-     * ,-----------------------------------------------------------------------------------------.
-     * | Esc |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  0  |  -  |  =  |  \  |  `  |
-     * |-----------------------------------------------------------------------------------------+
-     * | Tab    |  Q  |  W  |  E  |  R  |  T  |  Y  |  U  |  I  |  O  |  P  |  [  |  ]  |  Bksp  |
-     * |-----------------------------------------------------------------------------------------+
-     * | Ctrl    |  A  |  S  |  D  |  F  |  G  |  H  |  J  |  K  |  L  |  ;  |  '  |    Enter    |
-     * |-----------------------------------------------------------------------------------------+
-     * | Shift     |  Z  |  X  |  C  |  V  |  B  |  N  |  M  |  ,  |  .  |  /  | Shift     | fn  |
-     * +-----------------------------------------------------------------------------------------+
-     *         | Gui |  Alt   |               Space               | AltGr |Mouse|
-     *         `----------------------------------------------------------------´
-     */
-    [BASE] = KEYMAP(
-        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_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_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_LSFT,  KC_Z,  KC_X,  KC_C,  KC_V,  KC_B,  KC_N,  KC_M,  KC_COMM,  KC_DOT,  KC_SLSH,  KC_RSFT,  MO(FN),                    \
-                        KC_LGUI, KC_LALT,  /*        */ KC_SPC, KC_RALT, MO(MOUSE)
-    ),
-
-    /* FN Layer
-     * ,-----------------------------------------------------------------------------------------.
-     * | Pwr |  F1  | F2  | F3  | F4  | F5  | F6  | F7  | F8  | F9  | F0  | F11 | F12 | Ins | Del|
-     * |-----------------------------------------------------------------------------------------+
-     * | Caps   |     |     |     |     |     |     |     |PrtSc| Slck| Paus|  Up |     |        |
-     * |-----------------------------------------------------------------------------------------+
-     * |         | Vol-| Vol+| Mute|     |     | *   | /   | Home| PgUp| Left |Right|            |
-     * |-----------------------------------------------------------------------------------------+
-     * |           | Prev| Play| Next|     |     | +   | -   | End |PgDwn| Down|           |     |
-     * +-----------------------------------------------------------------------------------------+
-     *         |     |        |                                   | Stop  |     |
-     *         `----------------------------------------------------------------´
-     */
-    [FN] = KEYMAP(
-        KC_PWR,   KC_F1,    KC_F2,    KC_F3,    KC_F4,    KC_F5,    KC_F6,    KC_F7,    KC_F8,    KC_F9,    KC_F10,   KC_F11,   KC_F12,   KC_INS,   KC_DEL, \
-        KC_CAPS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_PSCR,  KC_SLCK,  KC_PAUS,  KC_UP,    KC_TRNS,  KC_TRNS,          \
-        KC_TRNS,  KC_VOLD,  KC_VOLU,  KC_MUTE,  KC_TRNS,  KC_TRNS,  KC_PAST,  KC_PSLS,  KC_HOME,  KC_PGUP,  KC_LEFT,  KC_RGHT,  KC_TRNS,                    \
-        KC_TRNS,  KC_MPRV,  KC_MPLY,  KC_MNXT,  KC_TRNS,  KC_TRNS,  KC_PPLS,  KC_PMNS,  KC_END,   KC_PGDN,  KC_DOWN,  KC_TRNS,  KC_TRNS,                    \
-                        KC_TRNS, KC_TRNS,           KC_TRNS,                KC_MSTP, KC_TRNS
-    ),
-
-    /* MOUSE Layer
-     * ,-----------------------------------------------------------------------------------------.
-     * |     |      |     |     |     |     |     |     |     |     |     |     |     |     |    |
-     * |-----------------------------------------------------------------------------------------+
-     * |        |     | WUp |     |     |     |     |     |     |     | Btn1|  Up | Btn2|        |
-     * |-----------------------------------------------------------------------------------------+
-     * |         | WLt | WDn | WRt |     |     |     |     |     |     | Left |Right|            |
-     * |-----------------------------------------------------------------------------------------+
-     * |           |     |     |     |     |     |     |     |     | Btn3| Down|           |     |
-     * +-----------------------------------------------------------------------------------------+
-     *         |     |        |                                   |       |     |
-     *         `----------------------------------------------------------------´
-     */
-    [MOUSE] = KEYMAP(
-        KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,   KC_TRNS, \
-        KC_TRNS,  KC_TRNS,  KC_WH_U,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_BTN1,  KC_MS_U,  KC_BTN2,  KC_TRNS,          \
-        KC_TRNS,  KC_WH_L,  KC_WH_D,  KC_WH_R,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_MS_L,  KC_MS_R,  KC_TRNS,                    \
-        KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_BTN3,  KC_MS_D,  KC_TRNS,  KC_TRNS,                    \
-                        KC_TRNS, KC_TRNS,           KC_TRNS,                KC_TRNS, KC_TRNS
-    )
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-  // MACRODOWN only works in this function
-      switch(id) {
-        case 0:
-          if (record->event.pressed) {
-            register_code(KC_RSFT);
-          } else {
-            unregister_code(KC_RSFT);
-          }
-        break;
-      }
-    return MACRO_NONE;
-};
-```
-
-
-## 1. Keycode
-See [`tmk_core/common/keycode.h`](../tmk_core/common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap.  Keycodes are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) plus special codes in the `0xA5-DF` range.
-
-Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys.
-
-keymaps[]
-
-In `KEYMAP()` macro, TMK recommends you to keep prefix part `KC_` of keycode to keep keymap compact. For example, just use `A` instead you place `KC_A` in `KEYMAP()`.  But this doesn't apply for QMK. 
-
-The `KEYMAP()` macro defines correspondence between the physical key location to the electrical key connection.
-
-Some keycodes has 7-letter **short name** such as `KC_COMM` in addition to descriptive name `KC_COMMA`, you'll prefer short one in `KEYMAP()`.
-
-### 1.0 Other key
-- `KC_NO` for no action
-- `KC_TRNS` for layer transparency (See above)
-
-### 1.1 Normal key
-- `KC_A` to `KC_Z`, `KC_1` to `KC_0` for alpha numeric key
-- `KC_MINS`, `KC_EQL`, `KC_GRV`, `KC_RBRC`, `KC_LBRC`, `KC_COMM`, `KC_DOT`, `KC_BSLS`, `KC_SLSH`, `KC_SCLN`, `KC_QUOT`
-- `KC_ESC`, `KC_TAB`, `KC_SPC`, `KC_BSPC`, `KC_ENT`, `KC_DEL`, `KC_INS`
-- `KC_UP`, `KC_DOWN`, `KC_RGHT`, `KC_LEFT`, `KC_PGUP`, `KC_PGDN`, `KC_HOME`, `KC_END`
-- `KC_CAPS`, `KC_NLCK`, `KC_SLCK`, `KC_PSCR`, `KC_PAUS`, `KC_APP`, `KC_F1` to `KC_F24`
-- `KC_P1` to `KC_P0`, `KC_PDOT`, `KC_PCMM`, `KC_PSLS`, `KC_PAST`, `KC_PMNS`, `KC_PPLS`, `KC_PEQL`, `KC_PENT` for keypad.
-
-### 1.2 Modifier
-There are 8 modifiers which has discrimination between left and right. 
-
-- `KC_LCTL` and `KC_RCTL` for Control
-- `KC_LSFT` and `KC_RSFT` for Shift
-- `KC_LALT` and `KC_RALT` for Alt
-- `KC_LGUI` and `KC_RGUI` for Windows key or Command key in Mac
-
-### 1.3 Mousekey
-- `KC_MS_U`, `KC_MS_D`, `KC_MS_L`, `KC_MS_R` for mouse cursor
-- `KC_WH_U`, `KC_WH_D`, `KC_WH_L`, `KC_WH_R` for mouse wheel
-- `KC_BTN1`, `KC_BTN2`, `KC_BTN3`, `KC_BTN4`, `KC_BTN5` for mouse buttons
-
-### 1.4 System & Media key
-- `KC_PWR`, `KC_SLEP`, `KC_WAKE` for Power, Sleep, Wake
-- `KC_MUTE`, `KC_VOLU`, `KC_VOLD` for audio volume control
-- `KC_MNXT`, `KC_MPRV`, `KC_MSTP`, `KC_MPLY`, `KC_MSEL` for media control
-- `KC_MAIL`, `KC_CALC`, `KC_MYCM` for application launch
-- `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation
-
-### 1.5 Fn key
-You don't need to use this functionality under QMK since this is a backward compatibility functionality.  Unlike TMK, you can write action code itself directly in  **`static const uint16_t PROGMEM keymaps[]`** C array using `MO(layer)`, etc.
-
-`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***Only 32 `Fn` keys can be defined at most.***
-
-
-### 1.6 Keycode Table
- See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes.
-
- In regard to implementation side most of keycodes are identical with [HID usage][HID_usage](pdf) sent to host for real and some virtual keycodes are defined to support special actions.
-[HID_usage]: http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
-
-
-
-## 2. Action
-See [`common/action_code.h`](../common/action_code.h). Action is a **16bit code** and defines function to perform on events of a key like press, release, holding and tapping.
-
-Most of keys just register 8bit scancode to host, but to support other complex features needs 16bit extended action codes internally. However, using 16bit action codes in keymap results in double size in memory compared to using just keycodes. To avoid this waste 8bit keycodes are used in `KEYMAP()` instead of action codes.
-
-***You can just use keycodes of `Normal key`, `Modifier`, `Mousekey` and `System & Media key` in keymap*** to indicate corresponding actions instead of using action codes. While ***to use other special actions you should use keycode of `Fn` key defined in `fn_actions[]`.***
-
-
-### 2.1 Key Action
-This is a simple action that registers scancodes(HID usage in fact) to host on press event of key and unregister on release.
-
-#### Parameters
-+ **mods**: { ` MOD_LCTL`, ` MOD_LSFT`, ` MOD_LALT`, ` MOD_LGUI`,
-              ` MOD_RCTL`, ` MOD_RSFT`, ` MOD_RALT`, ` MOD_RGUI` }
-+ **key**: keycode
-
-
-#### 2.1.1 Normal key and Modifier
-***This action usually won't be used expressly in keymap*** because you can just use keycodes in `KEYMAP()` instead.
-
-You can define these actions on *'A'* key and *'left shift'* modifier with:
-
-    ACTION_KEY(KC_A)
-    ACTION_KEY(KC_LSFT)
-
-#### 2.1.2 Modified key
-This action is comprised of strokes of modifiers and a key. `Macro` action is needed if you want more complex key strokes.
-
-Say you want to assign a key to `Shift + 1` to get character *'!'* or `Alt + Tab` to switch application windows.
-
-    ACTION_MODS_KEY(MOD_LSFT, KC_1)
-    ACTION_MODS_KEY(MOD_LALT, KC_TAB)
-
-Or `Alt,Shift + Tab` can be defined. `ACTION_MODS_KEY(mods, key)` requires **4-bit modifier state** and a **keycode** as arguments. See `keycode.h` for `MOD_BIT()` macro.
-
-    ACTION_MODS_KEY(MOD_LALT | MOD_LSFT, KC_TAB)
-
-#### 2.1.3 Multiple Modifiers
-Registers multiple modifiers with pressing a key. To specify multiple modifiers use `|`.
-
-    ACTION_MODS(MOD_ALT | MOD_LSFT)
-
-#### 2.1.3 Modifier with Tap key([Dual role][dual_role])
-Works as a modifier key while holding, but registers a key on tap(press and release quickly).
-
-
-    ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT)
-
-
-
-### 2.2 Layer Action
-These actions operate layers of keymap.
-
-#### Parameters
-You can specify a **target layer** of action and **when the action is executed**. Some actions take a **bit value** for bitwise operation.
-
-
-+ **layer**: `0`-`31`
-+ **on**: { `ON_PRESS` | `ON_RELEASE` | `ON_BOTH` }
-+ **bits**: 4-bit value and 1-bit mask bit
-
-
-#### 2.2.1 Default Layer
-Default Layer is a layer which always is valid and referred to when actions is not defined on other overlay layers.
-
-This sets Default Layer to given parameter `layer` and activate it.
-
-    ACTION_DEFAULT_LAYER_SET(layer)
-
-
-#### 2.2.2 Momentary 
-Turns on `layer` momentarily while holding, in other words it activates when key is pressed and deactivate when released.
-
-    ACTION_LAYER_MOMENTARY(layer)
-
-
-#### 2.2.3 Toggle Switch
-Turns on `layer` with first type(press and release) and turns off with next.
-
-    ACTION_LAYER_TOGGLE(layer)
-
-
-#### 2.2.4 Momentary Switch with tap key
-Turns on `layer` momentary while holding, but registers key on tap(press and release quickly).
-
-    ACTION_LAYER_TAP_KEY(layer, key)
-
-
-#### 2.2.5 Momentary Switch with tap toggle
-Turns on `layer` momentary while holding and toggles it with serial taps.
-
-    ACTION_LAYER_TAP_TOGGLE(layer)
-
-
-#### 2.2.6 Invert state of layer
-Inverts current state of `layer`. If the layer is on it becomes off with this action.
-
-    ACTION_LAYER_INVERT(layer, on)
-
-
-#### 2.2.7 Turn On layer
-Turns on layer state.
-
-    ACTION_LAYER_ON(layer, on)
-
-Turns on layer state on press and turns off on release.
-
-    ACTION_LAYER_ON_OFF(layer)
-
-
-#### 2.2.8 Turn Off layer
-Turns off layer state.
-
-    ACTION_LAYER_OFF(layer, on)
-
-Turns off layer state on press and activates on release.
-
-    ACTION_LAYER_OFF_ON(layer)
-
-
-#### 2.2.9 Set layer
-Turn on layer only.
-`layer_state = (1<<layer) [layer: 0-31]`
-
-    ACTION_LAYER_SET(layer, on)
-
-Turns on layer only and clear all layer on release..
-
-    ACTION_LAYER_SET_CLEAR(layer)
-
-
-#### 2.2.10 Bitwise operation
-
-**part** indicates which part of 32bit layer state(0-7). **bits** is 5-bit value. **on** indicates when the action is executed.
-
-    ACTION_LAYER_BIT_AND(part, bits, on)
-    ACTION_LAYER_BIT_OR(part, bits, on)
-    ACTION_LAYER_BIT_XOR(part, bits, on)
-    ACTION_LAYER_BIT_SET(part, bits, on)
-
-These actions works with parameters as following code.
-
-    uint8_t shift = part*4;
-    uint32_t mask = (bits&0x10) ? ~(0xf<<shift) : 0;
-    uint32_t layer_state = layer_state <bitop> ((bits<<shift)|mask);
-
-
-Default Layer also has bitwise operations, they are executed when key is released.
-
-    ACTION_DEFAULT_LAYER_BIT_AND(part, bits)
-    ACTION_DEFAULT_LAYER_BIT_OR(part, bits)
-    ACTION_DEFAULT_LAYER_BIT_XOR(part, bits)
-    ACTION_DEFAULT_LAYER_BIT_SET(part, bits)
-
-
-
-### 2.3 Macro action
-***TBD***
-
-`Macro` action indicates complex key strokes.
-    MACRO( D(LSHIFT), D(D), END )
-    MACRO( U(D), U(LSHIFT), END )
-    MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END )
-
-#### 2.3.1 Macro Commands
-- **I()**   change interval of stroke.
-- **D()**   press key
-- **U()**   release key
-- **T()**   type key(press and release)
-- **W()**   wait
-- **END**   end mark
-
-#### 2.3.2 Examples
-
-***TODO: sample implementation***
-See `keyboards/hhkb/keymap.c` for sample.
-
-
-
-### 2.4 Function action
-***TBD***
-
-There are two type of action, normal `Function` and tappable `Function`.
-These actions call user defined function with `id`, `opt`, and key event information as arguments.
-
-#### 2.4.1 Function
-To define normal `Function` action in keymap use this.
-
-    ACTION_FUNCTION(id, opt)
-
-#### 2.4.2 Function with tap
-To define tappable `Function` action in keymap use this.
-
-    ACTION_FUNCTION_TAP(id, opt)
-
-#### 2.4.3 Implement user function
-`Function` actions can be defined freely with C by user in callback function:
-
-    void keymap_call_function(keyrecord_t *event, uint8_t id, uint8_t opt)
-
-This C function is called every time key is operated, argument `id` selects action to be performed and `opt` can be used for option. Function `id` can be 0-255 and `opt` can be 0-15.
-
- `keyrecord_t` is comprised of key event and tap count. `keyevent_t` indicates which and when key is pressed or released. From `tap_count` you can know tap state, 0 means no tap. These information will be used in user function to decide how action of key is performed.
-
-    typedef struct {
-        keyevent_t  event;
-        uint8_t     tap_count;
-    } keyrecord_t;
-
-    typedef struct {
-        key_t    key;
-        bool     pressed;
-        uint16_t time;
-    } keyevent_t;
-
-    typedef struct {
-        uint8_t col;
-        uint8_t row;
-    } key_t;
-
-***TODO: sample implementation***
-See `keyboards/hhkb/keymap.c` for sample.
-
-
-
-### 2.5 Backlight Action
-These actions control the backlight.
-
-#### 2.5.1 Change backlight level
-Increase backlight level.
-
-    ACTION_BACKLIGHT_INCREASE()
-
-Decrease backlight level.
-
-    ACTION_BACKLIGHT_DECREASE()
-
-Step through backlight levels.
-
-    ACTION_BACKLIGHT_STEP()
-
-Turn a specific backlight level on or off.
-
-    ACTION_BACKLIGHT_LEVEL(1)
-
-#### 2.5.2 Turn on / off backlight
-Turn the backlight on and off without changing level.
-
-    ACTION_BACKLIGHT_TOGGLE()
-
-
-
-### 2.6 Swap-Hands Action
-The swap-hands action allows support for one-handed keyboards without requiring a separate layer. Set `ONEHAND_ENABLE` in the Makefile and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd`
-
-### 2.6.1 Configuration
-The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck:
-
-```
-const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
-  {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
-  {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
-  {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
-  {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
-};
-```
-
-Note that the array indices are reversed same as the matrix and the values are of type `keypos_t` which is `{col, row}` and all values are zero-based. In the example above, `hand_swap_config[2][4]` (third row, fifth column) would return {7, 2} (third row, eighth column).
-
-### 2.6.2 Advanced Swap Commands
-- **`ACTION_SWAP_HANDS()`** Swaps hands when pressed, returns to normal when released (momentary).
-- **`ACTION_SWAP_HANDS_TOGGLE()`** Toggles swap on and off with every keypress.
-- **`ACTION_SWAP_HANDS_TAP_TOGGLE()`** Toggles with a tap; momentary when held.
-- **`ACTION_SWAP_HANDS_TAP_KEY(key)`** Sends `key` with a tap; momentary swap when held.
-- **`ACTION_SWAP_HANDS_ON_OFF()`** Alias for `ACTION_SWAP_HANDS()`
-- **`ACTION_SWAP_HANDS_OFF_ON()`** Momentarily turns off swap.
-- **`ACTION_SWAP_HANDS_ON()`** Turns on swapping and leaves it on.
-- **`ACTION_SWAP_HANDS_OFF()`** Turn off swapping and leaves it off. Good for returning to a known state.
-
-
-
-## 3. Layer switching Example
-There are some ways to switch layer with 'Layer' actions.
-
-### 3.1 Momentary switching
-Momentary switching changes layer only while holding Fn key.
-
-This action makes 'Layer 1' active(valid) on key press event and inactive on release event. Namely you can overlay a layer on lower layers or default layer temporarily with this action.
-
-    ACTION_LAYER_MOMENTARY(1)
-
-
-Note that after switching on press the actions on destination layer(Layer 1) are performed.
-***Thus you shall need to place an action to go back on destination layer***, or you will be stuck in destination layer without way to get back. Usually you need to place same action or 'KC_TRNS` on destination layer to get back.
-
-
-### 3.2 Toggle switching
-Toggle switching performed after releasing a key. With this action you can keep staying on the destination layer until you type the key again to return.
-
-This performs toggle switching action of 'Layer 2'.
-
-    ACTION_LAYER_TOGGLE(2)
-
-
-
-### 3.3 Momentary switching with Tap key
-These actions switch a layer only while holding a key but register the key on tap. **Tap** means to press and release a key quickly.
-
-    ACTION_LAYER_TAP_KEY(2, KC_SCLN)
-
-With this you can place a layer switching action on normal key like ';' without losing its original key register function. This action allows you to have layer switching action without necessity of a dedicated key. It means you can have it even on home row of keyboard.
-
-
-
-### 3.4 Momentary switching with Tap Toggle
-This switches layer only while holding a key but toggle layer with several taps. **Tap** means to press and release key quickly.
-
-    ACTION_LAYER_TAP_TOGGLE(1)
-
-Number of taps can be configured with `TAPPING_TOGGLE` in `config.h`, `5` by default.
-
-
-
-### 3.5 Momentary switching with Modifiers
-This registers modifier key(s) simultaneously with layer switching.
-
-    ACTION_LAYER_MODS(2, MOD_LSFT | MOD_LALT)
-
-
-
-## 4. Tapping
-Tapping is to press and release a key quickly. Tapping speed is determined with setting of `TAPPING_TERM`, which can be defined in `config.h`, 200ms by default.
-
-### 4.1 Tap Key
-This is a feature to assign normal key action and modifier including layer switching to just same one physical key. This is a kind of [Dual role key][dual_role]. It works as modifier when holding the key but registers normal key when tapping.
-
-Modifier with tap key:
-
-    ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRV)
-
-Layer switching with tap key:
-
-    ACTION_LAYER_TAP_KEY(2, KC_SCLN)
-
-[dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
-
-When user hold a key after tap, it repeat the tapped key rather to hold a modifier key.
-If you prefer to hold a modifier instead, define `TAPPING_FORCE_HOLD` in `config.h`.
-See https://github.com/qmk/qmk_firmware/issues/889 for the detail.
-
-### 4.2 Tap Toggle
-This is a feature to assign both toggle layer and momentary switch layer action to just same one physical key. It works as momentary layer switch when holding a key but toggle switch with several taps.
-
-    ACTION_LAYER_TAP_TOGGLE(1)
-
-
-### 4.3 Oneshot Modifier
-This runs onetime effects which modify only on just one following key. It works as normal modifier key when holding down while oneshot modifier when tapping. The behavior of oneshot modifiers is similar to the [sticky keys](https://en.wikipedia.org/wiki/StickyKeys) functionality found in most operating systems.
-
-    ACTION_MODS_ONESHOT(MOD_LSFT)
-
-Oneshot layer key:
-
-    ACTION_LAYER_ONESHOT(MY_LAYER)
-
-Say you want to type 'The', you have to push and hold Shift key before type 't' then release it before type 'h' and 'e', otherwise you'll get 'THe' or 'the' unintentionally. With Oneshot Modifier you can tap Shift then type 't', 'h' and 'e' normally, you don't need to holding Shift key properly here. This mean you can release Shift before 't' is pressed down.
-
-Oneshot effect is cancel unless following key is pressed down within `ONESHOT_TIMEOUT` of `config.h`. No timeout when it is `0` or not defined.
-
-Most implementations of sticky keys allow you to lock a modifier by double tapping the modifier. The layer then remains locked untill the modifier is tapped again. To enable this behaviour for oneshot modifiers set `ONESHOT_TAP_TOGGLE` to the number taps required. The feature is disabled if `ONESHOT_TAP_TOGGLE<2` or not defined.
-
-
-### 4.4 Tap Toggle Mods
-Similar to layer tap toggle, this works as a momentary modifier when holding, but toggles on with several taps. A single tap will 'unstick' the modifier again.
-
-    ACTION_MODS_TAP_TOGGLE(MOD_LSFT)
-
-
-
-
-## 5. Legacy Keymap
-In QMK, `tmk_core/common/keymap.c` is missing and its replacement `quantum/keymap_common.c` lacks Legacy Keymap support.
-
-Legacy Keymap uses two arrays `fn_layer[]` and `fn_keycode[]` to define Fn key. The index of arrays corresponds with postfix number of `Fn` key. Array `fn_layer[]` indicates destination layer to switch and `fn_keycode[]` has keycodes to send when tapping `Fn` key.
-
-In the following legacy keymap setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key.
-
-    static const uint8_t PROGMEM fn_layer[] = {
-        1,              // Fn0
-        2,              // Fn1
-        2,              // Fn2
-    };
-
-    static const uint8_t PROGMEM fn_keycode[] = {
-        KC_NO,          // Fn0
-        KC_NO,          // Fn1
-        KC_SPC,         // Fn2
-    };
-
-Under QMK, these can be realized using action code ACTION_LAYER_TAP_KEY(1, KC_NO), ACTION_LAYER_TAP_KEY(2, KC_NO), and ACTION_LAYER_TAP_KEY(2, KC_SPC) in the `keymaps` directly.
-
-## 6. Terminology
-***TBD***
-### keymap
-is comprised of multiple layers.
-### layer
-is matrix of keycodes.
-### key
-is physical button on keyboard or logical switch on software.
-### keycode
-is codes used on firmware.
-### action
-is a function assigned on a key.
-### layer transparency
-Using transparent keycode one layer can refer key definition on other lower layer.
-### layer precedence
-Top layer has higher precedence than lower layers.
-### tapping
-is to press and release a key quickly.
-### Fn key
-is key which executes a special action like layer switching, mouse key, macro or etc.
-### dual role key
-<http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys>
diff --git a/doc/keymap_config_h_example.h b/doc/keymap_config_h_example.h
deleted file mode 100644 (file)
index 8893d12..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
-
-// place overrides here
-
-#endif
diff --git a/doc/keymap_makefile_example.mk b/doc/keymap_makefile_example.mk
deleted file mode 100644 (file)
index f4671a9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# Build Options
-#   change to "no" to disable the options, or define them in the Makefile in 
-#   the appropriate keymap folder that will get included automatically
-#
-BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
-CONSOLE_ENABLE = no         # Console for debug(+400)
-COMMAND_ENABLE = yes        # Commands for debug and configuration
-NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
-MIDI_ENABLE = no            # MIDI controls
-AUDIO_ENABLE = no           # Audio output on port C6
-UNICODE_ENABLE = no         # Unicode
-BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
-SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
-
-ifndef QUANTUM_DIR
-       include ../../../../Makefile
-endif
\ No newline at end of file
diff --git a/doc/other_projects.md b/doc/other_projects.md
deleted file mode 100644 (file)
index bf980b0..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-Other Keyboard Firmware Projects
-================================
-## PJRC USB Keyboard/Mouse Example[USB][PJRC][Teensy][AVR]
-- <http://www.pjrc.com/teensy/usb_keyboard.html>
-- <http://www.pjrc.com/teensy/usb_mouse.html>
-
-## kbupgrade[USB][V-USB][AVR]
-- <http://github.com/rhomann/kbupgrade>
-- <http://geekhack.org/showwiki.php?title=Island:8406>
-
-## c64key[USB][V-USB][AVR]
-- <http://symlink.dk/projects/c64key/>
-
-## rump[USB][V-USB][AVR]
-- <http://mg8.org/rump/>
-- <http://github.com/clee/rump>
-
-## dulcimer[USB][V-USB][AVR]
-- <http://www.schatenseite.de/dulcimer.html>
-
-## humblehacker-keyboard[USB][LUFA][AVR][Ergo]
-- <http://github.com/humblehacker>
-- <http://www.humblehacker.com/keyboard/>
-- <http://geekhack.org/showwiki.php?title=Island:6292>
-
-## ps2avr[PS/2][AVR]
-- <http://sourceforge.net/projects/ps2avr/>
-
-## ErgoDox[Ergo][Split][USB][AVR]
-- <http://geekhack.org/index.php?topic=22780.0>
-- <https://github.com/benblazak/ergodox-firmware>
-- <https://github.com/cub-uanic/tmk_keyboard>
-
-## Suka's keyboard collection[Ergo][Split][3DPrinting][USB][AVR]
-- <http://deskthority.net/workshop-f7/my-diy-keyboard-collection-or-how-i-became-a-kb-geek-t2534.html>
-- <https://github.com/frobiac/adnw>
-
-## bpiphany's AVR-Keyboard[PJRC][AVR][USB]
-- <https://github.com/BathroomEpiphanies/AVR-Keyboard>
-- <http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions>
-- <http://deskthority.net/wiki/Phantom>
-
-## USB-USB keyboard remapper[converter][USB-USB][AVR][Arduino]
-- <http://forum.colemak.com/viewtopic.php?pid=10837>
-- <https://github.com/darkytoothpaste/keymapper>
-
-## USB-USB converter threads[converter][USB-USB]
-- <http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html>
-- <http://geekhack.org/index.php?topic=19458.0>
-
-## kbdbabel.org[converter][vintage][protocol][8051]
-Great resource of vintage keyboard protocol information and code
-
-- <http://www.kbdbabel.org/>
-
-## Haata's kiibohd Controller[converter][vintage][protocol][AVR][PJRC][Cortex]
-A lots of vintage keyboard protocol supports
-
-- <http://gitorious.org/kiibohd-controller>
-
-## Kinesis ergonomic keyboard firmware replacement[V-USB][LUFA][Ergo]
-- <https://github.com/chrisandreae/kinesis-firmware>
diff --git a/docs/Adding-features-to-QMK.md b/docs/Adding-features-to-QMK.md
new file mode 100644 (file)
index 0000000..f6f7cba
--- /dev/null
@@ -0,0 +1,7 @@
+If 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:
+
+* **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!
+* **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.
+* **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.
+* **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).
+* **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/docs/BUILD_GUIDE.md b/docs/BUILD_GUIDE.md
new file mode 100644 (file)
index 0000000..78cf00b
--- /dev/null
@@ -0,0 +1,103 @@
+# This guide has now been included in the main readme - please reference that one instead.
+
+## Build Environment Setup
+
+### Windows (Vista and later)
+1. If you have ever installed WinAVR, uninstall it.
+2. 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**.
+3. 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.
+4. 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.
+5. 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.
+6. 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!
+7. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell".
+
+### Mac
+If you're using [homebrew,](http://brew.sh/) you can use the following commands:
+
+    brew tap osx-cross/avr
+    brew install avr-libc
+    brew install dfu-programmer
+
+This 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.
+
+You can also try these instructions:
+
+1. Install Xcode from the App Store.
+2. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
+3. Install [DFU-Programmer][dfu-prog].
+
+### Linux
+Install AVR GCC, AVR libc, and dfu-progammer with your favorite package manager.
+
+Debian/Ubuntu example:
+
+    sudo apt-get update
+    sudo apt-get install gcc-avr avr-libc dfu-programmer
+
+### Vagrant
+If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md).
+
+## Verify Your Installation
+1. 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.
+2. 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.
+3. 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`.
+4. 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.
+
+## Customizing, Building, and Deploying Your Firmware
+
+### The Make command
+
+The `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). You can run `make` from the root (`/`), your keyboard folder (`/keyboards/<keyboard>/`), or your keymap folder (`/keyboards/<keyboard>/keymaps/<keymap>/`) if you have a `Makefile` there (see the example [here](/doc/keymap_makefile_example.mk)).
+
+By default, this will generate 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.
+
+* The "root" (`/`) folder is the qmk_firmware folder, in which are `doc`, `keyboard`, `quantum`, etc.
+* The "keyboard" folder is any keyboard project's folder, like `/keyboards/planck`.
+* The "keymap" folder is any keymap's folder, like `/keyboards/planck/keymaps/default`.
+
+Below is a list of the useful `make` commands in QMK:
+
+* `make` - cleans automatically and builds your keyboard and keymap depending on which folder you're in. This defaults to the "default" layout (unless in a keymap folder), and Planck keyboard in the root folder
+  * `make keyboard=<keyboard>` - specifies the keyboard (only to be used in root)
+  * `make keymap=<keymap>` - specifies the keymap (only to be used in root and keyboard folder - not needed when in keymap folder)
+* `make quick` - skips the clean step (cannot be used immediately after modifying config.h or Makefiles)
+* `make dfu` - (requires dfu-programmer) builds and flashes the keymap to your keyboard once placed in reset/dfu mode (button or press `KC_RESET`). This does not work for Teensy-based keyboards like the ErgoDox EZ.
+  * `keyboard=` and `keymap=` are compatible with this
+* `make all-keyboards` - builds all keymaps for all keyboards and outputs status of each (use in root)
+* `make all-keyboards-default` - builds all default keymaps for all keyboards and outputs status of each (use in root)
+* `make all-keymaps [keyboard=<keyboard>]` - builds all of the keymaps for whatever keyboard folder you're in, or specified by `<keyboard>`
+* `make all-keyboards-quick`, `make all-keyboards-default-quick` and `make all-keymaps-quick [keyboard=<keyboard>]` - like the normal "make-all-*" commands, but they skip the clean steps
+
+Other, less useful functionality:
+
+* `make COLOR=false` - turns off color output
+* `make SILENT=true` - turns off output besides errors/warnings
+* `make VERBOSE=true` - outputs all of the avr-gcc stuff (not interesting)
+
+### The Makefile
+
+There are 3 different `make` and `Makefile` locations:
+
+* root (`/`)
+* keyboard (`/keyboards/<keyboard>/`)
+* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
+
+The 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](/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. **It is required if you want to run `make` in the keymap folder.**
+
+### The `config.h` file
+
+There are 2 `config.h` locations:
+
+* keyboard (`/keyboards/<keyboard>/`)
+* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
+
+The keyboard `config.h` is included only if the keymap one doesn't exist. The format to use for your custom one [is here](/doc/keymap_config_h_example.h). If you want to override a setting from the parent `config.h` file, you need to do this:
+
+```
+#undef MY_SETTING
+#define MY_SETTING 4
+```
+
+For a value of `4` for this imaginary setting. So we `undef` it first, then `define` it.
+
+You can then override any settings, rather than having to copy and paste the whole thing.
diff --git a/docs/Becoming-a-QMK-Collaborator.md b/docs/Becoming-a-QMK-Collaborator.md
new file mode 100644 (file)
index 0000000..1427675
--- /dev/null
@@ -0,0 +1,7 @@
+A 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:
+
+* **Have a PCB available for sale** - unfortunately there's just too much variation and complications with handwired keyboards.
+* **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.
+* **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.
+
+If 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 (file)
index 0000000..d4cec91
--- /dev/null
@@ -0,0 +1,119 @@
+### Windows 10
+
+#### Creators Update
+If 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).
+
+#### Windows Subsystem for Linux
+In 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.
+
+#### Git
+If you already have cloned the repository on your Windows file system you can ignore this section.
+
+You 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. 
+
+Once 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.
+
+#### Toolchain setup
+The 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.
+
+1. Open "Bash On Ubuntu On Windows" from the start menu. 
+2. 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`. 
+3. Run `util/wsl_install.sh` and follow the on-screen instructions.
+4. Close the Bash command window, and re-open it.
+5. You are ready to compile and flash the firmware!
+
+#### Some important things to keep in mind
+* You can run `util/wsl_install.sh` again to get all the newest updates.
+* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it.
+* 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
+* 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.
+
+### Windows (Vista and later)
+1. If you have ever installed WinAVR, uninstall it.
+2. 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**.
+3. 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).
+4. 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.
+5. 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.
+6. Open the `\util` folder.
+7. 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.
+8. 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!
+
+If 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.
+
+### Mac
+If you're using [homebrew,](http://brew.sh/) you can use the following commands:
+
+    brew tap osx-cross/avr
+    brew install avr-libc
+    brew install dfu-programmer
+
+This 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.
+
+You can also try these instructions:
+
+1. Install Xcode from the App Store.
+2. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
+3. Install [DFU-Programmer](https://dfu-programmer.github.io/).
+
+If you are going to flash Infinity based keyboards you will also need dfu-util
+
+    brew install dfu-util
+
+### Linux
+
+To 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`.**
+
+You can also install things manually, but this documentation might not be always up to date with all requirements.
+
+The 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.
+
+```
+build-essential
+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
+git
+```
+
+Install the dependencies with your favorite package manager.
+
+Debian/Ubuntu example:
+
+    sudo apt-get update
+    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
+
+### Docker
+
+If 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:
+
+```bash
+# You'll run this every time you want to build a keymap
+# modify the keymap and keyboard assigment to compile what you want
+# defaults are ergodox/default
+
+docker run -e keymap=gwen -e subproject=ez -e keyboard=ergodox --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
+
+# 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
+docker run -e keymap=default -e subproject=ez -e keyboard=ergobox --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
+
+```
+
+This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash.
+
+### Vagrant
+If 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).
+
+## Verify Your Installation
+1. 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.
+2. 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.
+3. 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`.
+4. 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/docs/CYGWIN_GUIDE.md b/docs/CYGWIN_GUIDE.md
new file mode 100644 (file)
index 0000000..05d7196
--- /dev/null
@@ -0,0 +1,352 @@
+#Planck Advanced (but not too advanced) `cygwin` Users Guide
+If you are a user of the [cygwin environment](https://cygwin.com) in Windows and want the freedom to use the latest tools available, then this is the guide for you. If compiling your own copy of the latest and greatest Gnu C Compiler makes you super happy, then this is the guide for you. If the command line make you smile, then this is the guide for you.
+
+This guide was written step by step as I went through the process on a `Windows 10` `x86_64` and a `Windows 7` `amd k10` based system.  This should be generally applicable to to any `Windows` environment with `cygwin`.
+
+#####Do not skip steps. Do not move past a step until the previous step finishes successfully.
+
+Based on [avr-libc installation guide](http://www.nongnu.org/avr-libc/user-manual/install_tools.html)
+
+##Get the Required Packages
+Download the `cygwin` setup ([x86_64](https://cygwin.com/setup-x86_64.exe)) and install the default system plus the following if they are not already selected:
+- devel/git
+- devel/gcc-core
+- devel/gcc-g++
+- devel/flex
+- devel/bison
+- devel/make
+- devel/texinfo
+- devel/gettext-devel
+- devel/automake
+- devel/autoconfig
+- devel/libtool
+- text/gettext
+- libs/libgcc1
+- interpreters/m4
+- web/wget
+- archive/unzip
+
+The following sources will be required:
+- [gmp](https://gmplib.org/) (6.1.0)
+- [mpfr](http://www.mpfr.org/) (3.1.4)
+- [mpc](http://www.multiprecision.org/) (1.0.3) 
+- [binutils](https://www.sourceware.org/binutils/) (2.26)
+- [gcc](https://gcc.gnu.org/) (5.3.0)
+- [avr-libc](http://www.nongnu.org/avr-libc/) (2.0.0)
+
+The `dfu-programmer` will be required to flash the new firmware 
+- [dfu-programmer](https://dfu-programmer.github.io/) (0.7.2)
+
+The set of commands below will create a directory (`~/local/avr`) for the sources you compile to be installed on the machine and a directory (`~/src`) for these source files to be stored. The commands then download the sources of the needed packages and unpack them. Note: the expand commands are different depending on if the packages are offered as a `bz2` or `gz` archive
+```
+$ mkdir ~/local
+$ mkdir ~/local/avr
+$ mkdir ~/src
+$ cd ~/src
+$ wget https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2
+$ wget http://www.mpfr.org/mpfr-3.1.4/mpfr-3.1.4.tar.bz2
+$ wget ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
+$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.gz
+$ wget http://mirror0.babylon.network/gcc/releases/gcc-5.3.0/gcc-5.3.0.tar.gz
+$ wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2
+$ tar -xjf gmp-6.1.0.tar.bz2
+$ tar -xjf mpfr-3.1.4.tar.bz2
+$ tar -zxf mpc-1.0.3.tar.gz
+$ tar -zxf binutils-2.26.tar.gz
+$ tar -zxf gcc-5.3.0.tar.gz
+$ tar -xjf avr-libc-2.0.0.tar.bz2 
+```
+
+##Setup the Build Environment
+These commands will set up the install directory and the `PATH` variable, which will allow you to access your installed packages.  Note: if you close the `cygwin` terminal window, you will need to rerun these commands, they are not permanent.
+```
+$ PREFIX=$HOME/local/avr
+$ export PREFIX
+$ PATH=/usr/local/bin:/usr/local/lib:/usr/local/include:/bin:/lib:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS
+$ PATH=$PATH:$PREFIX/bin:$PREFIX/lib
+$ export PATH
+```
+
+##The `gcc` Required Math Library Packages
+The following packages are required to be complied and installed in order to compile `gcc`.  They are not sufficiently available through the `cygwin` package system, so we have to make them ourselves.  They must be complied in this order because each one depends on the previous. Verfiy that for each package, `make check` returns all passing and no fails.
+
+###Build and Install `gmp`
+```
+$ cd ~/src/gmp-6.1.0
+$ ./configure --enable-static --disable-shared
+$ make
+$ make check
+$ make install
+```
+
+###Build and Install `mpfr`
+```
+$ cd ~/src/mpfr-3.1.4
+$ ./configure --with-gmp-build=../gmp-6.1.0 --enable-static --disable-shared
+$ make
+$ make check
+$ make install
+```
+
+###Build and Install `mpc`
+```
+$ cd ~/src/mpc-1.0.3
+$ ./configure --with-gmp=/usr/local --with-mpfr=/usr/local --enable-static --disable-shared
+$ make
+$ make check
+$ make install
+```
+
+##OPTIONAL Part
+You can build and install a brand new `gcc` or you can use the one supplied by `cygwin`.  This will take about 4-5 hours to compile (It is a "native build", so it does the entire build **3 times**. This takes a long while).
+
+###Build and Install `gcc` for Your Machine  
+```
+$ cd ~/src/gcc-5.3.0
+$ mkdir obj-local
+$ cd obj-local
+$ ../configure --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-static --disable-shared
+$ make
+$ make install
+```
+##End OPTIONAL Part
+
+###Build and Install `binutils` for Your Machine
+```
+$ cd ~/src/binutils-2.26
+$ mkdir obj-local
+$ cd obj-local
+$ ../configure
+$ make
+$ make install
+```
+
+##Buliding `binutils`, `gcc`, and `avr-libc` for the AVR system
+Now we can make the critical stuff for compiling our firmware: `binutils`, `gcc`, and `avr-libc` for the AVR architecture.  These allow us to build and manipulate the firmware for the keyboard.
+
+###Build `binutils` for AVR
+If you plan to build and install `avr-gdb` also, use the `gdb` install at the end of this guide as it also builds the `binutils`
+```
+$ cd ~/src/binutils-2.26
+$ mkdir obj-avr
+$ cd obj-avr
+$ ../configure --prefix=$PREFIX --target=avr --disable-nls
+$ make
+$ make install
+```
+
+###Build `gcc` for AVR
+```
+$ cd ~/src/gcc-5.3.0
+$ mkdir obj-avr
+$ cd obj-avr
+$ ../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-static --disable-shared --disable-nls --disable-libssp --with-dwarf2
+$ make
+$ make install
+```
+
+###Build `avr-libc` for AVR
+For building the `avr-libc`, we have to specify the host build system.  In my case it is `x86_64-unknown-cygwin`. You can look for build system type in the `gcc` configure notes for the proper `--build` specification to pass when you configure `avr-libc`.
+```
+$ cd ~/src/avr-libc-2.0.0
+$ ./configure --prefix=$PREFIX --build=x86_64-unknown-cygwin --host=avr
+$ make
+$ make install
+```
+
+##Building 'dfu-programmer' for flashing the firmware via USB and installing the drivers
+We can either build our own, or use the precomplied binaries.  The precompiled binaries don't play well with `cygwin` so it is better to build them ourselves.  The procedure for the precompiled binaries is included at the end of this guide.
+
+### Build and Install the `libusb`
+The `dfu-programmer` requires `libusb` so that it can interact with the USB system. These repos must be bootstrapped in order to create an appropriate `./configure` and `Makefile` for your system.
+```
+$ cd ~/src
+$ git clone https://github.com/libusb/libusb.git
+$ cd libusb
+$ ./bootstrap.sh
+$ ./configure
+$ make
+$ make install
+```
+
+### Build and Install the `dfu-programmer`
+```
+$ cd ~/src
+$ git clone https://github.com/dfu-programmer/dfu-programmer.git
+$ cd dfu-programmer
+$ ./bootstrap.sh
+$ ./configure
+$ make
+$ make install
+```
+
+Verify the installation with:
+```
+$ which dfu-programmer
+/usr/local/bin/dfu-programmer
+
+$ dfu-programmer
+dfu-programmer 0.7.2
+https://github.com/dfu-programmer/dfu-programmer
+Type 'dfu-programmer --help'    for a list of commands
+     'dfu-programmer --targets' to list supported target devices
+```
+If you are not getting the above result, you will not be able to flash the firmware! 
+
+###Install the USB drivers
+The drivers are included in the windows binary version of [`dfu-programmer` 0.7.2](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip).
+```
+$ cd ~/src
+$ wget http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip
+$ unzip dfu-programmer-win-0.7.2.zip -d dfu-programmer-win-0.7.2
+```
+
+or
+
+The official drivers are found in [Atmel's `FLIP` installer](http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe). Download and then install `FLIP`. Upon installation, the drivers will be found in `C:\Program Files (x86)\Atmel\Flip 3.4.7\usb`.
+
+Then, from an **administrator-privileged** `Windows` terminal, run the following command (adjust the path for username, etc. as necessary) and accept the prompt that pops up:
+```
+C:\> pnputil -i -a C:\cygwin64\home\Kevin\src\dfu-programmer-win-0.7.2\dfu-prog-usb-1.2.2\atmel_usb_dfu.inf
+or
+C:\> pnputil -i -a "C:\Program Files (x86)\Atmel\Flip 3.4.7\usb\atmel_usb_dfu.inf"
+```
+
+This should be the result:
+```
+Microsoft PnP Utility
+
+Processing inf :            atmel_usb_dfu.inf
+Successfully installed the driver on a device on the system.
+Driver package added successfully.
+Published name :            oem104.inf
+
+
+Total attempted:              1
+Number successfully imported: 1
+```
+
+Alternatively, the `Windows` driver can be installed when prompted by `Windows` when the keyboard is attached. Do not let `Windows` search for a driver; specify the path to search for a driver and point it to the `atmel_usb_dfu.inf` file.
+
+##Building and Flashing the Planck firmware!
+If you did everything else right. This part should be a snap! Grab the latest sources from `github`, make the Plank firmware, then flash it.
+
+###Build Planck and Load the Firmware
+```
+$ cd ~/src
+$ git clone https://github.com/qmk/qmk_firmware.git
+$ cd qmk_firmware/keyboards/planck
+$ make
+```
+
+Make sure there are no errors.  You should end up with this or something similar:
+```
+Creating load file for Flash: planck.hex
+avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature planck.elf planck.hex
+
+Creating load file for EEPROM: planck.eep
+avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
+--change-section-lma .eeprom=0 --no-change-warnings -O ihex planck.elf planck.eep || exit 0
+
+Creating Extended Listing: planck.lss
+avr-objdump -h -S -z planck.elf > planck.lss
+
+Creating Symbol Table: planck.sym
+avr-nm -n planck.elf > planck.sym
+
+Size after:
+   text    data     bss     dec     hex filename
+  18602      82     155   18839    4997 planck.elf
+
+-------- end --------
+```
+
+If you do not get the above, you **did not** build the firmware, and you will have nothing to flash.  If you have the fresh clone from `github`, it was probably something gone wrong in this install process, go check and see what didn't work and threw errors or what steps you might have missed.
+
+But if everything went OK, you are ready to flash! Press the reset button on the bottom of the Planck, wait two seconds, then:
+```
+$ make dfu
+```
+.
+.
+.
+profit!!!
+
+
+
+
+
+##extra bits...
+
+###Installing Precompiled `dfu-programmer` Binaries (not recommended for `cygwin`)
+To install the `dfu-programmer` from the binaries, we must get if from [the `dfu-programmer` website](https://dfu-programmer.github.io/) ([0.7.2](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip)).
+
+Copy this file into your `cygwin` home\src directory.  (For me, it is `C:\cygwin64\home\Kevin\src`), extract the files, move `dfu-programmer.exe` to `~/local/avr/bin`. Most obnoxiously, the `libusb0_x86.dll` and `libusb0.sys` need to be moved from  `./dfu-prog-usb-1.2.2/x86/` to a directory in the `Windows` `PATH` and the `cygwin` `PATH`. This is because the `dfu-programmer` binary is `mingw` based, not `cygwin` based, so the `dlls` do not cooperate. I achieved acceptable pathing by moving the files to  `C:\cygwin64\home\Kevin\local\avr\bin` Then, in a `WINDOWS` command prompt running (Adjusting your path for username, etc. as needed):
+```
+C:\> set PATH=%PATH%;C:\cygwin64\home\Kevin\local\avr\bin
+```
+
+Then, rename `libusb0_x86.dll` to `libusb0.dll`.
+You can tell that you were successful by trying to execute 'dfu-programmer' from the 'cygwin' prompt:
+```
+$ which dfu-programmer
+/home/Kevin/local/avr/bin/dfu-programmer
+
+$ dfu-programmer
+dfu-programmer 0.7.2
+https://github.com/dfu-programmer/dfu-programmer
+Type 'dfu-programmer --help'    for a list of commands
+     'dfu-programmer --targets' to list supported target devices
+```
+
+If you are not getting the above result, you will not be able to flash the firmware! 
+- Try making sure your `PATH` variables are set correctly for both `Windows` and `cygwin`. 
+- Make sure the `dll` is named correctly.
+- Do not extract it with `cygwin`'s `unzip` as it does not set the executable permission. If you did it anyway, do `chmod +x dfu-programmer.exe`.
+- Still have problems? Try building it instead.
+
+
+##Debugging Tools
+
+These tools are for debugging your firmware, etc. before flashing. Theoretically, it can save your memory from wearing out. However, these tool do not work 100% for the Planck firmware.
+
+### `gdb` for AVR
+`gdb` has a simulator for AVR but it does not support all instructions (like WDT), so it immediately crashes when running the Planck firmware (because `lufa.c` disables the WDT in the first few lines of execution). But it can still be useful in debugging example code and test cases, if you know how to use it.
+
+```
+$ cd ~/src
+$ git clone git://sourceware.org/git/binutils-gdb.git
+$ cd binutils-gdb
+$ mkdir obj-avr
+$ cd obj-avr
+$ ../configure --prefix=$PREFIX --target=avr --build=x86_64-unknown-cygwin --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --disable-nls --enable-static
+$ make
+$ make install
+```
+
+### `simulavr`
+`simulavr` is an AVR simulator.  It runs the complied AVR elfs. `simulavr` does not support the `atmega32u4` device... it does `atmega32` but that is not good enough for the firmware (no PORTE and other things), so you cannot run the Planck firmware. I use it to simulate ideas I have for features in separate test projects.
+
+This one is a major pain in the butt because it has a lot of dependencies and it is buggy.  I will do my best to explain it but... it was hard to figure out. A few things need to be changed in the 'Makefile' to make it work in `cygwin`.
+
+
+```
+$ cd ~/src
+$ git clone https://github.com/Traumflug/simulavr.git
+$ cd simulavr
+$ ./bootstrap
+$ ./configure --prefix=$PREFIX --enable-static --disable-tcl --disable-doxygen-doc
+```
+ Edit `src/Makefile.am` now so that `-no-undefined` is included (I did this by removing the SYS_MINGW conditional surrounding `libsim_la_LDFLAGS += -no-undefined` and  `libsimulavr_la_LDFLAGS += -no-undefined \ libsimulavr_la_LIBADD += $(TCL_LIB)`. Also, `$(EXEEXT)` is added after `kbdgentables` in two places.
+
+```
+$ make
+$ make install
+```
+
+
+TODO:
+- git repos for all sources
+- command line magic for cygwin setup
+- better options for `dfu-drivers`
diff --git a/docs/Compatible-Microcontrollers.md b/docs/Compatible-Microcontrollers.md
new file mode 100644 (file)
index 0000000..20ba620
--- /dev/null
@@ -0,0 +1,25 @@
+# Atmel AVR
+
+QMK should run on any Atmel AVR processor with enough Flash. It has been tested on the following:
+
+* ATmega32U4 ([PJRC Teensy 2.0](http://www.pjrc.com/teensy/))
+* AT90USB1286 ([PJRC Teensy++ 2.0](http://www.pjrc.com/teensy/))
+* AT90USB1287 ([Atmel USBKEY](http://www.atmel.com/tools/AT90USBKEY.aspx))
+* ATmega168P with using [V-USB](http://www.obdev.at/products/vusb/index.html)
+* ATmega328P with using [V-USB](http://www.obdev.at/products/vusb/index.html)
+* ATmega32U2
+* AT90USB1286, 646, 647 should work
+* AT90USB162 testing...
+
+NOTE: To enable full features of firmware you'll need 32KB flash size.
+
+Please add any tested microcontrollers to this list.
+
+# ARM
+
+You can also use any ARM processor that [ChibiOS](http://www.chibios.org) supports. The following processors have been tested:
+
+* [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)
+* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf)
+* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf)
+* [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 (file)
index 0000000..1c4929e
--- /dev/null
@@ -0,0 +1,123 @@
+A 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. 
+
+## A Word on Keyboards vs Keymap
+
+We have structured QMK as a hierarchy:
+
+* Core
+  * Keyboard/Revision (`_kb`)
+    * Keymap (`_user`)
+
+Each 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.
+
+When 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.
+
+## Matrix Initialization Code
+
+* Keyboard/Revision: `void matrix_init_kb(void)` 
+* Keymap: `void matrix_init_user(void)`
+
+This 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.
+
+### Example
+
+```
+void matrix_init_kb(void) {
+        // put your keyboard start-up code here
+        // runs once when the firmware starts up
+        matrix_init_user();
+
+        // JTAG disable for PORT F. write JTD bit twice within four cycles.
+        MCUCR |= (1<<JTD);
+        MCUCR |= (1<<JTD);
+
+        // * Set our LED pins as output
+        DDRB |= (1<<0);
+        DDRB |= (1<<1);
+        DDRB |= (1<<2);
+        DDRB |= (1<<3);
+        DDRB |= (1<<4);
+}
+```
+
+## Matrix Scanning Code
+
+* Keyboard/Revision: `void matrix_scan_kb(void)`
+* Keymap: `void matrix_scan_user(void)`
+
+This 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.
+
+You 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.
+
+## Hook Into Key Presses
+
+* Keyboard/Revision: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)` 
+* Keymap: `bool process_record_user(uint16_t keycode, keyrecord_t *record)`
+
+This 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.
+
+The return value is whether or not QMK should continue processing the keycode - returning `false` stops the execution.
+
+The `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.
+
+The `record` variable contains infomation about the actual press:
+
+```
+keyrecord_t record {
+  keyevent_t event {
+    keypos_t key {
+      uint8_t col
+      uint8_t row
+    }
+    bool     pressed
+    uint16_t time
+  }
+}
+```
+
+The conditional `if (record->event.pressed)` can tell if the key is being pressed or released, and you can execute code based on that.
+
+## LED Control
+
+* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)` 
+* Keymap: `void led_set_user(uint8_t usb_led)`
+
+This 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.
+
+* `USB_LED_NUM_LOCK`
+* `USB_LED_CAPS_LOCK`
+* `USB_LED_SCROLL_LOCK`
+* `USB_LED_COMPOSE`
+* `USB_LED_KANA`
+
+### Example:
+
+```
+void led_set_kb(uint8_t usb_led) {
+    if (usb_led & (1<<USB_LED_NUM_LOCK)) {
+        PORTB |= (1<<0);
+    } else {
+        PORTB &= ~(1<<0);
+    }
+    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+        PORTB |= (1<<1);
+    } else {
+        PORTB &= ~(1<<1);
+    }
+    if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
+        PORTB |= (1<<2);
+    } else {
+        PORTB &= ~(1<<2);
+    }
+    if (usb_led & (1<<USB_LED_COMPOSE_LOCK)) {
+        PORTB |= (1<<3);
+    } else {
+        PORTB &= ~(1<<3);
+    }
+    if (usb_led & (1<<USB_LED_KANA_LOCK)) {
+        PORTB |= (1<<4);
+    } else {
+        PORTB &= ~(1<<4);
+    }
+}
+```
\ No newline at end of file
diff --git a/docs/Differences-from-TMK.md b/docs/Differences-from-TMK.md
new file mode 100644 (file)
index 0000000..10ca329
--- /dev/null
@@ -0,0 +1,7 @@
+Understanding the essential changes made on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) should help you understand the QMK Firmware.
+
+| Firmware                     |TMK                    |QMK                      |
+|------------------------------|-----------------------|-------------------------|
+| Maintainer                   |hasu  (@tmk)           |Jack Humbert et al.      |
+| Build path customization     | `TMK_DIR = ...`       | `include .../Makefile`  |
+| `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 (file)
index 0000000..b9aa676
--- /dev/null
@@ -0,0 +1,84 @@
+[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.
+
+Using an IDE such as Eclipse provides many advantages over a plain text editor, such as:
+* intelligent code completion
+* convenient navigation in the code
+* refactoring tools
+* build automation (no need for the command-line)
+* a GUI for GIT
+* static code analysis
+* many other tools such as debugging, code formatting, showing call hierarchies etc.
+
+The purpose of the is page is to document how to set-up Eclipse for developing AVR software, and working on the QMK code base.
+
+Note that this set-up has been tested on Ubuntu 16.04 only for the moment.
+
+# Prerequisites
+## Build environment
+Before 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).
+
+## Java
+Eclipse 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.
+
+# Install Eclipse and its plugins
+Eclipse 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.
+
+## Download and install Eclipse CDT
+If 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.
+
+If 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.
+
+Installation 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.
+
+Alternatively, 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).
+
+## First Launch
+When 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)
+
+When 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).
+
+Once 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).
+
+## Install the necessary plugins
+Note: you do not need to restart Eclipse after installing each plugin. Simply restart once all plugins are installed.
+
+### [The AVR plugin](http://avr-eclipse.sourceforge.net/)
+This 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.
+
+### [ANSI Escape in Console](https://marketplace.eclipse.org/content/ansi-escape-console)
+This plugin is necessary to properly display the colored build output generated by the QMK makefile.
+
+1. Open <kbd><kbd>Help</kbd> > <kbd>Eclipse Marketplace…</kbd></kbd>
+2. Search for _ANSI Escape in Console_
+3. Click the <samp>Install</samp> button of the plugin
+4. Follow the instructions and agree again with the security warning for unsigned content.
+
+Once both plugins are installed, restart Eclipse as prompted.
+
+# Configure Eclipse for QMK
+## Importing the project
+1. Click <kbd><kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd></kbd>
+2. On the next screen:
+  * Select the directory where you cloned the repository as _Existing Code Location_;
+  * (Optional) Give a different name to the project¹, e.g. _QMK_ or _Quantum_;
+  * Select the _AVR-GCC Toolchain_;
+  * Keep the rest as-is and click <kbd>Finish</kbd>
+
+  ![Importing QMK in Eclipse](http://i.imgur.com/oHYR1yW.png)
+
+3. The project will now be loaded and indexed. Its files can be browsed easily through the _Project Explorer_ on the left.
+
+¹ 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`).
+
+## Build your keyboard
+We will now configure a make target that cleans the project and builds the keymap of your choice.
+
+1. On the right side of the screen, select the <kbd>Make Target</kbd> tab
+2. Expand the folder structure to the keyboard of your choice, e.g. `qmk_firmware/keyboards/ergodox`
+3. 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)
+4. Choose a name for your build target, e.g. _clean \<your keymap\>_
+5. 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>`
+6. Leave the other options checked and click <kbd>OK</kbd>. Your make target will now appear under the selected keyboard.
+7. (Optional) Toggle the <kbd>Hide Empty Folders</kbd> icon button above the targets tree to only show your build target.
+8. Double-click the build target you created to trigger a build.
+9. 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 (file)
index 0000000..5c2f3b3
--- /dev/null
@@ -0,0 +1,64 @@
+# 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.
+
+If you want to use TMK for your own keyboard project, you've got three options for embedding the [core][1].  
+The recommended option is [subtrees](#1-git-subtree).
+
+After adding the embed you'll need to [modify the Makefile](#modifications-to-the-makefile) of your project to point to the core correctly.
+
+## 1. git subtree
+
+In order to set up the subtree in your project, first add the core repository as a remote:  
+```
+git remote add -f core https://github.com/tmk/tmk_core
+```
+
+Then add the core as a subtree (directory) in your local repository:  
+```
+git subtree add -P tmk_core core master --squash
+```
+
+And that's it!
+
+When you want to update the subtree in your repository to match the master on [tmk_core][1], do this:  
+```
+git subtree pull -P tmk_core core master --squash
+```
+
+## 2. git submodule
+
+In order to set up the submodule in your project, first add a new submodule:  
+```
+git submodule add https://github.com/tmk/tmk_core tmk_core
+```
+
+Then pull, sync and update the submodule:  
+```
+git pull
+git submodule sync --recursive
+git submodule update --init --recursive
+```
+
+And that's it!
+
+When you want to update the subtree in your repository to match the master on [tmk_core][1], follow the same steps as above.
+
+If you want to clone a repository from GitHub that has submodule(s) in it, pass <kbd>--recursive</kbd> when cloning, like so:  
+`git clone --recursive https://github.com/<username>/<repository>`
+
+## 3. Manually (without git)
+
+*Note: This is not recommended in any way, but it's still possible.*
+
+Download a zipped version of the [tmk_core][1] repository using this link:  
+<https://github.com/tmk/tmk_core/archive/master.zip>
+
+Extract the zip in your project's directory, then rename the folder to <kbd>tmk_core</kbd>.
+
+## Modifications to the *Makefile*
+
+The 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:  
+```Makefile
+TMK_DIR = ./tmk_core
+```
+
+[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 (file)
index 0000000..75babb6
--- /dev/null
@@ -0,0 +1,151 @@
+## READ FIRST
+- https://github.com/jackhumbert/qmk_firmware/blob/master/doc/BUILD_GUIDE.md
+
+In short,
+
+    $ make [-f Makefile.<variant>] [KEYMAP=...] clean
+    $ make [-f Makefile.<variant>] [KEYMAP=...]
+    $ make [-f Makefile.<variant>] [KEYMAP=...] dfu
+
+
+## Can't program on Linux and Mac
+You will need proper permission to operate a device. For Linux users see udev rules below.
+Easy 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.
+
+https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/sudo.8.html
+
+In short when your controller is ATMega32u4,
+    
+    $ sudo dfu-programmer atmega32u4 erase --force
+    $ sudo dfu-programmer atmega32u4 flash your.hex
+    $ sudo dfu-programmer atmega32u4 reset
+
+or just
+
+    $ sudo make dfu
+
+But to run `make` with root privilege is not good idea. Use former method as possible.
+
+## Do 'make clean' before 'make'
+You'll need `make clean` after you edit **config.h** or change options like `KEYMAP`.
+
+Frist remove all files made in previous build,
+
+    $ make clean
+
+then build new firmware. 
+
+    $ make [KEYMAP=...]
+
+Also you can always try `make clean` when you get other strange result during build.
+
+
+## WINAVR is obsolete
+It is no longer recommended and may cause some problem.
+See [Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
+
+## USB stack: LUFA or PJRC?
+Use **LUFA**.
+
+**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.
+See also [Issue #50](https://github.com/tmk/tmk_keyboard/issues/50) and [Issue #58](https://github.com/tmk/tmk_keyboard/issues/58).
+
+## Edit configuration but not change
+You will need followings after editing `CONSOLE_ENABLE`, `NKRO_ENABLE`, `EXTRAKEY_ENABLE` or `MOUSEKEY_ENABLE` option in **Makefile**.
+
+### 1. make clean
+This will be needed when you edit **config.h**.
+
+### 2. Remove Drivers from Device Manager(Windows)
+**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**.
+
+### 3. Build with different VID:PID
+**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.
+
+### 4. Just try other ports
+This will be useful and the easiest workaround for **Windows**.
+
+
+
+## USB VID and PID
+You 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.
+
+For example TMK uses following numbers by default.
+```
+keyboard:
+hhkb: FEED:CAFE
+gh60: FEED:6060
+
+converter:
+x68k: FEED:6800
+ps2: FEED:6512
+adb: FEED:0ADB
+ibm4704: FEED:4704
+pc98: FEED:9898
+```
+
+Also see this.
+https://github.com/tmk/tmk_keyboard/issues/150
+
+You can buy a really unique VID:PID here. I don't think you need this for personal use.
+- http://www.obdev.at/products/vusb/license.html
+- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
+
+
+## Linux udev rules
+On 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/`.
+
+**/etc/udev/rules.d/50-atmel-dfu.rules:**
+```
+# Atmel ATMega32U4
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666"
+# Atmel USBKEY AT90USB1287
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666"
+# Atmel ATMega32U2
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666"
+```
+
+**/etc/udev/rules.d/52-tmk-keyboard.rules:**
+```
+# tmk keyboard products     https://github.com/tmk/tmk_keyboard
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
+```
+
+
+
+## Cortex: cstddef: No such file or directory
+GCC 4.8 of Ubuntu 14.04 had this problem and had to update to 4.9 with this PPA.
+https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded
+
+https://github.com/tmk/tmk_keyboard/issues/212
+https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef
+https://developer.mbed.org/forum/mbed/topic/5205/
+
+
+## 'clock_prescale_set' and 'clock_div_1' not available
+Your toolchain is too old to support the MCU. For example WinAVR 20100110 doesn't support ATMega32u2.
+
+```
+Compiling C: ../../tmk_core/protocol/lufa/lufa.c
+avr-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
+../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu':
+../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set'
+../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function)
+../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once
+../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.)
+make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1
+```
+
+
+## BOOTLOADER_SIZE for AVR
+Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment.
+
+```
+# Boot Section Size in *bytes*    
+#   Teensy halfKay   512          
+#   Teensy++ halfKay 2048         
+#   Atmel DFU loader 4096       (TMK Alt Controller)
+#   LUFA bootloader  4096         
+#   USBaspLoader     2048         
+OPT_DEFS += -DBOOTLOADER_SIZE=2048
+```
\ No newline at end of file
diff --git a/docs/FAQ-Keymap.md b/docs/FAQ-Keymap.md
new file mode 100644 (file)
index 0000000..7c73f57
--- /dev/null
@@ -0,0 +1,248 @@
+## READ FIRST
+https://github.com/tmk/tmk_core/blob/master/doc/keymap.md
+
+## How to get keycode
+See [Keycodes](Keycodes). Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h).
+
+## Sysrq key
+Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'.
+
+See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and
+- http://en.wikipedia.org/wiki/Magic_SysRq_key
+- http://en.wikipedia.org/wiki/System_request
+
+## Power key doesn't work
+Use `KC_PWR` instead of `KC_POWER` or vice versa.
+- `KC_PWR` works with Windows and Linux, not with OSX.
+- `KC_POWER` works with OSX and Linux, not with Windows.
+
+http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264
+
+## Oneshot modifier
+Solves my personal 'the' problem. I often got 'the' or 'THe' wrongly instead of 'The'.  Oneshot Shift mitgates this for me.
+https://github.com/tmk/tmk_keyboard/issues/67
+
+## Modifier/Layer stuck
+Modifier keys or layers can be stuck unless layer switching is configured properly.
+For 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.
+
+- https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching
+- http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604
+- https://github.com/tmk/tmk_keyboard/issues/248
+
+
+## Mechanical Lock Switch Support
+https://github.com/tmk/tmk_keyboard#mechanical-locking-support
+
+This feature is for *mechanical lock switch* like this Alps one.
+http://deskthority.net/wiki/Alps_SKCL_Lock
+
+Using 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.
+
+Old 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`.***
+
+
+## Input special charactors other than ASCII like Cédille 'Ç'
+NO UNIVERSAL METHOD TO INPUT THOSE WORKS OVER ALL SYSTEMS. You have to define **MACRO** in way specific to your OS or layout.
+
+See this post for example **MACRO** code.
+
+http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620
+
+On **Windows** you can use `AltGr` key or **Alt code**.
+- http://en.wikipedia.org/wiki/AltGr_key
+- http://en.wikipedia.org/wiki/Alt_code
+
+On **Mac** OS defines `Option` key combinations.
+- http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input
+
+On **Xorg** you can use `compose` key, instead.
+- http://en.wikipedia.org/wiki/Compose_key
+
+And see this for **Unicode** input.
+- http://en.wikipedia.org/wiki/Unicode_input
+
+
+## Apple/Mac keyboard Fn
+Not supported.
+
+Apple/Mac keyboard sends keycode for Fn unlike most of other keyboards.
+I 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.
+
+https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/AppleHIDUsageTables.h
+
+
+## Media control keys in Mac OSX
+#### KC_MNXT and KC_MPRV does not work on Mac
+Use `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) and `KC_MRWD`(`KC_MEDIA_REWIND`) instead of `KC_MNXT` and `KC_MPRV`.
+See https://github.com/tmk/tmk_keyboard/issues/195
+
+
+## Keys supported in Mac OSX?
+You can know which keycodes are supported in OSX from this source code.
+
+`usb_2_adb_keymap` array maps Keyboard/Keypad Page usages to ADB scancodes(OSX internal keycodes).
+
+https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/Cosmo_USB2ADB.c
+
+And `IOHIDConsumer::dispatchConsumerEvent` handles Consumer page usages.
+
+https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/IOHIDConsumer.cpp
+
+
+## JIS keys in Mac OSX
+Japanese JIS keyboard specific keys like `無変換(Muhenkan)`, `変換(Henkan)`, `ひらがな(hiragana)` are not recognized on OSX. You can use **Seil** to enable those keys, try following options.
+
+* Enable NFER Key on PC keyboard
+* Enable XFER Key on PC keyboard
+* Enable KATAKANA Key on PC keyboard
+
+https://pqrs.org/osx/karabiner/seil.html
+
+
+## RN-42 Bluetooth doesn't work with Karabiner
+Karabiner - 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.
+https://github.com/tekezo/Karabiner/issues/403#issuecomment-102559237
+
+See these for the deail of this problem.
+https://github.com/tmk/tmk_keyboard/issues/213
+https://github.com/tekezo/Karabiner/issues/403
+
+
+## Esc and `~ on a key
+
+
+You can define FC660 and Poker style ESC with `ACTION_LAYER_MODS`.
+https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#35-momentary-switching-with-modifiers
+
+```
+#include "keymap_common.h"
+
+
+/* Leopold FC660
+ * https://elitekeyboards.com/products.php?sub=leopold,compact&pid=fc660c
+ * Shift + Esc = ~
+ * Fn    + Esc = `
+ *
+ * Votex Poker II
+ * https://adprice.fedorapeople.org/poker2_manual.pdf
+ * Fn         + Esc = `
+ * Fn + Shift + Esc = ~
+ */
+const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    /* 0: qwerty */
+    [0] = KEYMAP( \
+        ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, NUHS,BSPC, \
+        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS, \
+        LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,ENT,  \
+        FN0, NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,ESC, \
+        LCTL,LGUI,LALT,          SPC,                     RALT,FN1, RGUI,RCTL),
+    [1] = KEYMAP( \
+        GRV, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\
+        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+        TRNS,TRNS,TRNS,          TRNS,                    TRNS,TRNS,TRNS,TRNS),
+    [2] = KEYMAP( \
+        GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, TRNS,TRNS, \
+        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\
+        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+        TRNS,TRNS,TRNS,          TRNS,                    TRNS,TRNS,TRNS,TRNS),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+    // https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#35-momentary-switching-with-modifiers
+    [0] = ACTION_LAYER_MODS(1, MOD_LSFT),
+    [1] = ACTION_LAYER_MOMENTARY(2),
+};
+```
+
+Otherwise, you can write code, see this.
+https://github.com/p3lim/keyboard_firmware/commit/fd799c12b69a5ab5addd1d4c03380a1b8ef8e9dc
+
+
+## 32 Fn keys are not enough?
+### actionmap
+It 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.
+https://github.com/tmk/tmk_keyboard/issues?utf8=%E2%9C%93&q=is%3Aissue+actionmap
+
+### extension for modified keys
+https://geekhack.org/index.php?topic=41989.msg1885526#msg1885526
+
+
+## Arrow on Right Modifier keys with Dual-Role
+This 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**.
+```
+#include "keymap_common.h"
+
+
+/* Arrow keys on right modifier keys with TMK dual role feature
+ *
+ *  https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role
+ *  https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
+ */
+const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    /* 0: qwerty */
+    [0] = KEYMAP( \
+        ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, NUHS,BSPC, \
+        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS, \
+        LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,ENT,  \
+        LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,FN0, ESC, \
+        FN4, LGUI,LALT,          SPC,                     APP, FN2, FN1, FN3),
+    [1] = KEYMAP( \
+        GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, TRNS,TRNS, \
+        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\
+        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \
+        TRNS,TRNS,TRNS,          TRNS,                    TRNS,FN7, FN6, FN8),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+    [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP),
+    [1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN),
+    [2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT),
+    [3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT),
+    [4] = ACTION_LAYER_MOMENTARY(1),
+    [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP),
+    [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN),
+    [7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME),
+    [8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END),
+};
+
+```
+
+
+Dual-role key: https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
+
+
+## Eject on Mac OSX
+`EJCT` keycode works on OSX. https://github.com/tmk/tmk_keyboard/issues/250
+It seems Windows 10 ignores the code and Linux/Xorg recognizes but has no mapping by default.
+
+Not 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.
+
+
+
+## What's weak_mods and real_mods in action_util.c
+___TO BE IMPROVED___
+
+real_mods is intended to retains state of real/physical modifier key state, while
+weak_mods retains state of virtual or temprary modifiers which should not affect state real modifier key.
+
+Let's say you hold down physical left shift key and type ACTION_MODS_KEY(LSHIFT, KC_A), 
+
+with weak_mods,
+* (1) hold down left shift: real_mods |= MOD_BIT(LSHIFT)
+* (2) press ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods |= MOD_BIT(LSHIFT)
+* (3) release ACTION_MODS_KEY(LSHIFT, KC_A): waek_mods &= ~MOD_BIT(LSHIFT)
+real_mods still keeps modifier state.
+
+without weak mods,
+* (1) hold down left shift: real_mods |= MOD_BIT(LSHIFT)
+* (2) press ACTION_MODS_KEY(LSHIFT, KC_A): real_mods |= MOD_BIT(LSHIFT)
+* (3) release ACTION_MODS_KEY(LSHIFT, KC_A): real_mods &= ~MOD_BIT(LSHIFT)
+here real_mods lost state for 'physical left shift'.
+
+weak_mods is ORed with real_mods when keyboard report is sent.
+https://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 (file)
index 0000000..0636d8b
--- /dev/null
@@ -0,0 +1,238 @@
+## READ FIRST
+- **README** of top directory : https://github.com/tmk/tmk_keyboard/blob/master/README.md
+- **README** of target project(keyboard/converter) directory.
+
+Note that you'll need to read **both**.
+
+
+# Build
+- [[FAQ/Build]]
+
+
+# Keymap
+- [[FAQ/Keymap]]
+
+
+# Debug Console
+## hid_listen can't recognize device
+When debug console of your device is not ready you will see like this:
+
+    Waiting for device:.........
+
+once the device is pluged in then *hid_listen* finds it you will get this message:
+
+    Waiting for new device:.........................
+    Listening:
+
+Check if you can't get this 'Listening:' message:
+- build with `CONSOLE_ENABLE=yes` in **Makefile**.
+
+You may need privilege to access the device on OS like Linux.
+- try `sudo hid_listen`
+
+## Can't get message on console
+Check:
+- *hid_listen* finds your device. See above.
+- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
+- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**.
+- try using 'print' function instead of debug print. See **common/print.h**.
+- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
+
+## Linux or UNIX like system requires Super User privilege
+Just use 'sudo' to execute *hid_listen* with privilege.
+```
+$ sudo hid_listen
+```
+
+Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system.
+
+File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu)
+```
+# tmk keyboard products     https://github.com/tmk/tmk_keyboard
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
+```
+
+***
+
+# Miscellaneous
+## NKRO Doesn't work
+First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**.
+
+Try `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.
+
+If 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.
+
+https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
+
+
+## TrackPoint needs reset circuit(PS/2 mouse support)
+Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754.
+
+- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
+- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
+
+
+## Can't read column of matrix beyond 16 
+Use `1UL<<16` instead of `1<<16` in `read_cols()` in **matrix.h** when your columns goes beyond 16.
+
+In 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`.
+
+http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
+
+
+
+## Pull-up Resistor
+In some case converters needed to have pull-up resistors to work correctly. Place the resistor between VCC and signal line in parallel.
+
+For example:
+```
+Keyboard       Conveter
+               ,------.
+5V------+------|VCC   |
+        |      |      |
+        R      |      |
+        |      |      |
+Signal--+------|PD0   |
+               |      |
+GND------------|GND   |
+               `------'
+R: 1K Ohm resistor
+```
+
+https://github.com/tmk/tmk_keyboard/issues/71
+
+
+## Arduino Micro's pin naming is confusing
+Note 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.
+http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
+
+
+
+## Bootloader jump doesn't work
+Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
+```
+# Size of Bootloaders in bytes:
+#   Atmel DFU loader(ATmega32U4)   4096    
+#   Atmel DFU loader(AT90USB128)   8192    
+#   LUFA bootloader(ATmega32U4)    4096             
+#   Arduino Caterina(ATmega32U4)   4096             
+#   USBaspLoader(ATmega***)        2048             
+#   Teensy   halfKay(ATmega32U4)   512              
+#   Teensy++ halfKay(AT90USB128)   2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+```
+AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet.
+Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**.
+
+AVR Boot section is located at end of Flash memory like the followings.
+```
+byte     Atmel/LUFA(ATMega32u4)          byte     Atmel(AT90SUB1286)
+0x0000   +---------------+               0x00000  +---------------+
+         |               |                        |               |
+         |               |                        |               |
+         |  Application  |                        |  Application  |
+         |               |                        |               | 
+         =               =                        =               =
+         |               | 32KB-4KB               |               | 128KB-8KB
+0x6000   +---------------+               0x1E000  +---------------+
+         |  Bootloader   | 4KB                    |  Bootloader   | 8KB
+0x7FFF   +---------------+               0x1FFFF  +---------------+
+
+byte     Teensy(ATMega32u4)              byte     Teensy++(AT90SUB1286)
+0x0000   +---------------+               0x00000  +---------------+
+         |               |                        |               |
+         |               |                        |               |
+         |  Application  |                        |  Application  |
+         |               |                        |               |
+         =               =                        =               =
+         |               | 32KB-512B              |               | 128KB-2KB
+0x7E00   +---------------+               0x1FC00  +---------------+
+         |  Bootloader   | 512B                   |  Bootloader   | 2KB
+0x7FFF   +---------------+               0x1FFFF  +---------------+
+```
+
+And see this discussion for further reference.
+https://github.com/tmk/tmk_keyboard/issues/179
+
+
+## Special Extra key doesn't work(System, Audio control keys)
+You need to define `EXTRAKEY_ENABLE` in **makefile** to use them in TMK.
+```
+EXTRAKEY_ENABLE = yes          # Audio control and System control
+```
+http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-60.html#p157919
+
+
+## Wakeup from sleep doesn't work
+In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
+
+Pressing any key during sleep should wake host.
+
+
+## Using Arduino?
+**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself.
+
+- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
+- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
+
+Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
+
+
+## Using PF4-7 pins of USB AVR?
+You 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.
+
+If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
+
+See this code.
+```
+    // JTAG disable for PORT F. write JTD bit twice within four cycles.
+    MCUCR |= (1<<JTD);
+    MCUCR |= (1<<JTD);
+```
+https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
+
+And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.
+
+
+## Adding LED indicators of Lock keys
+You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
+
+http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560
+
+## Program Arduino Micro/Leonardo
+Push reset button and then run command like this within 8 seconds.
+
+```
+avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0
+```
+
+Device name will vary depending on your system.
+
+http://arduino.cc/en/Main/ArduinoBoardMicro
+https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
+
+
+## USB 3 compatibility
+I heard some people have a problem with USB 3 port, try USB 2 port.
+
+
+## Mac compatibility
+### OS X 10.11 and Hub
+https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
+
+
+## Problem on BIOS(UEFI)/Resume(Sleep&Wake)/Power cycles
+Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).
+
+As 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. 
+
+https://github.com/tmk/tmk_keyboard/issues/266
+https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
+
+
+
+## FLIP doesn't work
+### AtLibUsbDfu.dll not found
+Remove current driver and reinstall one FLIP provides from DeviceManager.
+http://imgur.com/a/bnwzy
\ No newline at end of file
diff --git a/docs/FUSE.txt b/docs/FUSE.txt
new file mode 100644 (file)
index 0000000..99ddd2d
--- /dev/null
@@ -0,0 +1,50 @@
+Atmega32u4 Fuse/Lock Bits for Planck/Atomic/Preonic
+=========================
+
+       Low Fuse: 0x5E
+       High Fuse: 0x99
+       Extended Fuse: 0xF3
+       Lock Byte: 0xFF
+
+
+ATMega168P Fuse/Lock Bits
+=========================
+This configuration is from usbasploader's Makefile.
+
+    HFUSE   0xD6
+    LFUSE   0xDF
+    EFUSE   0x00
+    LOCK    0x3F(intact)
+
+#---------------------------------------------------------------------
+# ATMega168P
+#---------------------------------------------------------------------
+# Fuse extended byte:
+# 0x00 = 0 0 0 0   0 0 0 0 <-- BOOTRST (boot reset vector at 0x1800)
+#                    \+/
+#                     +------- BOOTSZ (00 = 2k bytes)
+# Fuse high byte:
+# 0xd6 = 1 1 0 1   0 1 1 0
+#        ^ ^ ^ ^   ^ \-+-/
+#        | | | |   |   +------ BODLEVEL 0..2 (110 = 1.8 V)
+#        | | | |   + --------- EESAVE (preserve EEPROM over chip erase)
+#        | | | +-------------- WDTON (if 0: watchdog always on)
+#        | | +---------------- SPIEN (allow serial programming)
+#        | +------------------ DWEN (debug wire enable)
+#        +-------------------- RSTDISBL (reset pin is enabled)
+# Fuse low byte:
+# 0xdf = 1 1 0 1   1 1 1 1
+#        ^ ^ \ /   \--+--/
+#        | |  |       +------- CKSEL 3..0 (external >8M crystal)
+#        | |  +--------------- SUT 1..0 (crystal osc, BOD enabled)
+#        | +------------------ CKOUT (if 0: Clock output enabled)
+#        +-------------------- CKDIV8 (if 0: divide by 8)
+
+
+# Lock Bits
+# 0x3f = - - 1 1   1 1 1 1
+#            \ /   \-/ \-/
+#             |     |   +----- LB 2..1 (No memory lock features enabled)
+#             |     +--------- BLB0 2..1 (No restrictions for SPM or LPM accessing the Application section)
+#             +--------------- BLB1 2..1 (No restrictions for SPM or LPM accessing the Boot Loader section)
+
diff --git a/docs/Git-subtree.md b/docs/Git-subtree.md
new file mode 100644 (file)
index 0000000..4fd7f8b
--- /dev/null
@@ -0,0 +1,7 @@
+## Update core branch procedure
+    git co master
+    git subtree split -P tmk_core -b <tmp_branch>
+    git co core
+    git merge <tmp_branch>
+    git co master
+    git subtree merge -P tmk_core --squash
diff --git a/docs/HAND_WIRE.md b/docs/HAND_WIRE.md
new file mode 100644 (file)
index 0000000..17ef311
--- /dev/null
@@ -0,0 +1,321 @@
+# Quantum Hand-wiring Guide
+
+Parts list:
+* *x* keyswitches (MX, Matias, Gateron, etc)
+* *x* diodes
+* Keyboard plate (metal, plastic, cardboard, etc)
+* Wire (strained for wiring to the Teensy, anything for the rows/columns)
+* Soldering iron set at 600ºF or 315ºC (if temperature-controlled)
+* Resin-cored solder (leaded or lead-free)
+* Adequate ventilation/a fan
+* Tweezers (optional)
+* Wire cutters/snippers
+
+## How the matrix works (why we need diodes)
+
+The microcontroller (in this case, the Teensy 2.0) will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example:
+
+        Column 0 being scanned     Column 1 being scanned
+                  x                                   x
+                 col0     col1              col0     col1
+                  |        |                 |        |
+        row0 ---(key0)---(key1)    row0 ---(key0)---(key1)
+                  |        |                 |        |
+        row1 ---(key2)---(key3)    row1 ---(key2)---(key3)
+
+The `x` represents that the column/row associated has a value of 1, or is HIGH. Here, we see that no keys are being pressed, so no rows get an `x`. For one keyswitch, keep in mind that one side of the contacts is connected to its row, and the other, its column.
+
+When we press `key0`, `col0` gets connected to `row0`, so the values that the firmware receives for that row is `0b01` (the `0b` here means that this is a bit value, meaning all of the following digits are bits - 0 or 1 - and represent the keys in that column). We'll use this notation to show when a keyswitch has been pressed, to show that the column and row are being connected:
+
+        Column 0 being scanned     Column 1 being scanned
+                  x                                   x
+                 col0     col1              col0     col1
+                  |        |                 |        |
+      x row0 ---(-+-0)---(key1)    row0 ---(-+-0)---(key1)
+                  |        |                 |        |
+        row1 ---(key2)---(key3)    row1 ---(key2)---(key3)
+
+We can now see that `row0` has an `x`, so has the value of 1. As a whole, the data the firmware receives when `key0` is pressed is
+
+    col0: 0b01
+    col1: 0b00
+            │└row0
+            └row1
+
+A problem arises when you start pressing more than one key at a time. Looking at our matrix again, it should become pretty obvious:
+
+        Column 0 being scanned     Column 1 being scanned
+                  x                                   x
+                 col0     col1              col0     col1
+                  |        |                 |        |
+      x row0 ---(-+-0)---(-+-1)  x row0 ---(-+-0)---(-+-1)
+                  |        |                 |        |
+      x row1 ---(key2)---(-+-3)  x row1 ---(key2)---(-+-3)
+
+      Remember that this ^ is still connected to row1
+
+The data we get from that is:
+
+    col0: 0b11
+    col1: 0b11
+            │└row0
+            └row1
+
+Which isn't accurate, since we only have 3 keys pressed down, not all 4. This behavior is called ghosting, and only happens in odd scenarios like this, but can be much more common on a bigger keyboard. The way we can get around this is by placing a diode after the keyswitch, but before it connects to its row. A diode only allows current to pass through one way, which will protect our other columns/rows from being activated in the previous example. We'll represent a dioded matrix like this;
+
+        Column 0 being scanned     Column 1 being scanned
+                    x                                   x
+                  col0      col1              col0     col1
+                    │        │                 |        │
+                 (key0)   (key1)            (key0)   (key1)
+                  ! │      ! │               ! |      ! │
+        row0 ─────┴────────┘ │     row0 ─────┴────────┘ │
+                    │        │                 |        │
+                 (key2)   (key3)            (key2)   (key3)
+                  !        !                 !        !
+        row1 ─────┴────────┘       row1 ─────┴────────┘
+
+In practical applications, the black line of the diode will be placed facing the row, and away from the keyswitch - the `!` in this case is the diode, where the gap represents the black line. A good way to remember this is to think of this symbol: `>|`
+
+Now when we press the three keys, invoking what would be a ghosting scenario:
+
+        Column 0 being scanned     Column 1 being scanned
+                    x                                   x
+                  col0      col1              col0     col1
+                    │        │                 │        │
+                 (┌─┤0)   (┌─┤1)            (┌─┤0)   (┌─┤1)
+                  ! │      ! │               ! │      ! │
+      x row0 ─────┴────────┘ │   x row0 ─────┴────────┘ │
+                    │        │                 │        │
+                 (key2)   (┌─┘3)            (key2)   (┌─┘3)
+                  !        !                 !        !
+        row1 ─────┴────────┘     x row1 ─────┴────────┘
+
+Things act as they should! Which will get us the following data:
+
+    col0: 0b01
+    col1: 0b11
+            │└row0
+            └row1
+
+The firmware can then use this correct data to detect what it should do, and eventually, what signals it needs to send to the OS.
+
+## The actual hand-wiring
+
+### Getting things in place
+
+When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards.
+
+To make things easier on yourself, make sure all of the keyswitches are oriented the same way (if they can be - not all layouts support this). Despite this, it's important to remember that the contacts on the keyswitches are completely symmetrical. We'll be using the keyswitch's left side contact for wiring the rows, and the right side one for wiring the columns.
+
+Get your soldering iron heated-up and collect the rest of the materials from the part list at the beginning of the guide. Place your keyboard so that the bottoms of the keyswitches are accessible - it may be a good idea to place it on a cloth to protect your keyswitches/keycaps.
+
+Before continuing, plan out where you're going to place your Teensy. If you're working with a board that has a large (6.25u) spacebar, it may be a good idea to place it in-between switches against the plate. Otherwise, you may want to trim some of the leads on the keyswitches where you plan on putting it - this will make it a little harder to solder the wire/diodes, but give you more room to place the Teensy.
+
+### Preparing the diodes
+
+It's a little easier to solder the diodes in place if you bend them at a 90º angle immediately after the black line - this will help to make sure you put them on the right way (direction matters), and in the correct position. The diodes will look like this when bent (with longer leads):
+
+       ┌─────┬─┐
+    ───┤     │ ├─┐
+       └─────┴─┘ │
+                 │
+
+We'll be using the long lead at the bent end to connect it to the elbow (bent part) of the next diode, creating the row.
+
+### Soldering the diodes
+
+Starting at the top-left switch, place the diode (with tweezers if you have them) on the switch so that the diode itself is vertically aligned, and the black line is facing toward you. The straight end of the diode should be touching the left contact on the switch, and the bent end should be facing to the right and resting on the switch there, like this:
+
+     │o
+    ┌┴┐         o
+    │ │    O
+    ├─┤      
+    └┬┘
+     └─────────────
+
+Letting the diode rest, grab your solder, and touch both it and the soldering iron to the left contact at the same time - the rosin in the solder should make it easy for the solder to flow over both the diode and the keyswitch contact. The diode may move a little, and if it does, carefully position it back it place by grabbing the bent end of the diode - the other end will become hot very quickly. If you find that it's moving too much, using needle-nose pliers of some sort may help to keep the diode still when soldering.
+
+The smoke that the rosin releases is harmful, so be careful not to breath it or get it in your eyes/face.
+
+After soldering things in place, it may be helpful to blow on the joint to push the smoke away from your face, and cool the solder quicker. You should see the solder develop a matte (not shiney) surface as it solidifies. Keep in mind that it will still be very hot afterwards, and will take a couple minutes to be cool to touch. Blow on it will accelerate this process.
+
+When the first diode is complete, the next one will need to be soldered to both the keyswitch, and the previous diode at the new elbow. That will look something like this:
+
+     │o               │o
+    ┌┴┐         o    ┌┴┐         o
+    │ │    O         │ │    O
+    ├─┤              ├─┤      
+    └┬┘              └┬┘
+     └────────────────┴─────────────
+
+After completing a row, use the wire cutters to trim the excess wire from the tops of the diodes, and from the right side on the final switch. This process will need to completed for each row you have.
+
+When all of the diodes are completely soldered, it's a good idea to quickly inspect each one to ensure that your solder joints are solid and sturdy - repairing things after this is possible, but more difficult.
+
+### Soldering the columns
+
+You'll have some options in the next process - it's a good idea to insulate the column wires (since the diodes aren't), but if you're careful enough, you can use exposed wires for the columns - it's not recommended, though. If you're using single-cored wire, stripping the plastic off of the whole wire and feeding it back on is probably the best option, but can be difficult depending on the size and materials. You'll want to leave parts of the wire exposed where you're going to be solder it onto the keyswitch.
+
+If you're using stranded wire, it's probably easiest to just use a lot of small wires to connect each keyswitch along the column. It's possible to use one and melt through the insulation, but this isn't recommended, will produce even more harmful fumes, and can ruin your soldering iron.
+
+Before beginning to solder, it helps to have your wire pre-bent (if using single-cored), or at least have an idea of how you're going to route the column (especially if you're making a staggered board). Where you go in particular doesn't matter too much, as we'll be basing our keymap definitions on how it was wired - just make sure every key in a particular row is in a unique column, and that they're in order from left to right.
+
+If you're not using any insulation, you can try to keep the column wires elevated, and solder them near the tips of the keyswitch contacts - if the wires are sturdy enough, they won't short out to the row wiring an diodes.
+
+### Wiring things to the Teensy
+
+Now that the matrix itself is complete, it's time to connect what you've done to the Teensy. You'll be needing the number of pins equal to your number of columns + your number of rows. There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple.
+
+The pins you'll absolutely have to avoid are: GND, VCC, AREF, and RST - all the others are usable and accessible in the firmware.
+
+Place the Teensy where you plan to put it - you'll have to cut wires to length in the next step, and you'll want to make sure they reach.
+
+Starting with the first column on the right side, measure out how much wire you'll need to connect it to the first pin on the Teensy - it helps to pick a side that you'll be able to work down, to keep the wires from overlapping too much. It may help to leave a little bit of slack so things aren't too tight. Cut the piece of wire, and solder it to the Teensy, and then the column - you can solder it anywhere along the column, but it may be easiest at the keyswitch. Just be sure the wire doesn't separate from the keyswitch when soldering.
+
+As you move from column to column, it'll be helpful to write the locations of the pins down. We'll use this data to setup the matrix in the future.
+
+When you're done with the columns, start with the rows in the same process, from top to bottom, and write them all down. Again, you can solder anywhere along the row, as long as it's after the diode - soldering before the diode (on the keyswitch side) will cause that row not to work.
+
+As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain!
+
+### Getting some basic firmware set-up
+
+From here, you should have a working keyboard with the correct firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
+
+To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/).
+
+The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder:
+
+    util/new_project.sh <project_name>
+
+You'll want to navigate to the `keyboards/<project_name>/` folder by typing, like the print-out from the script specifies:
+
+    cd keyboards/<project_name>
+
+#### config.h
+
+The first thing you're going to want to modify is the `config.h` file. Find `MATRIX_ROWS` and `MATRIX_COLS` and change their definitions to match the dimensions of your keyboard's matrix.
+
+Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitions to match how you wired up your matrix (looking from the top of the keyboard, the rows run top-to-bottom and the columns run left-to-right). Likewise, change the definition of `UNUSED_PINS` to match the pins you did not use (this will save power).
+
+#### \<project_name\>.h
+
+The next file you'll want to look at is `<project_name>.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix.
+
+We'll dive into how this will work with the following example. Say we have a keyboard like this:
+
+    ┌───┬───┬───┐
+    │   │   │   │
+    ├───┴─┬─┴───┤
+    │     │     │
+    └─────┴─────┘
+
+This can be described by saying the top row is 3 1u keys, and the bottom row is 2 1.5u keys. The difference between the two rows is important, because the bottom row has an unused column spot (3 v 2). Let's say that this is how we wired the columns:
+
+    ┌───┬───┬───┐
+    │ ┋ │ ┋ │ ┋ │
+    ├─┋─┴─┬─┴─┋─┤
+    │ ┋   │   ┋ │
+    └─────┴─────┘
+
+The middle column is unused on the bottom row in this example. Our `KEYMAP` definition would look like this:
+
+    #define KEYMAP( \
+        k00, k01, k02, \
+          k10,  k11,   \
+    ) \
+    { \
+        { k00, k01,   k02 }, \
+        { k10, KC_NO, k11 }, \
+    }
+
+Notice how the top half is spaced to resemble our physical layout - this helps us understand which keys are associated with which columns. The bottom half uses the keycode `KC_NO` where there is no keyswitch wired in. It's easiest to keep the bottom half aligned in a grid to help us make sense of how the firmware actually sees the wiring.
+
+Let's say that instead, we wired our keyboard like this (a fair thing to do):
+
+    ┌───┬───┬───┐
+    │ ┋ │  ┋│ ┋ │
+    ├─┋─┴─┬┋┴───┤
+    │ ┋   │┋    │
+    └─────┴─────┘
+
+This would require our `KEYMAP` definition to look like this:
+
+    #define KEYMAP( \
+        k00, k01, k02, \
+          k10,  k11,   \
+    ) \
+    { \
+        { k00, k01, k02   }, \
+        { k10, k11, KC_NO }, \
+    }
+
+Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.
+
+#### keymaps/default.c
+
+This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make KEYMAP=<variant>`, which will pull `keymaps/<variant>.c`.
+
+The basis of a keymap is its layers - by default, layer 0 is active. You can activate other layers, the highest of which will be referenced first. Let's start with our base layer.
+
+Using our previous example, let's say we want to create the following layout:
+
+    ┌───┬───┬───┐
+    │ A │ 1 │ H │
+    ├───┴─┬─┴───┤
+    │ TAB │ SPC │
+    └─────┴─────┘
+
+This can be accomplished by using the following `keymaps` definition:
+
+    const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    [0] = KEYMAP( /* Base */
+      KC_A,  KC_1,  KC_H, \
+        KC_TAB,  KC_SPC   \
+    ),
+    };
+
+Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file.
+
+It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.
+
+#### Compiling your firmware
+
+After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](/doc/BUILD_GUIDE.md) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy.
+
+Once everything is installed, running `make` in the terminal should get you some output, and eventually a `<project_name>.hex` file in that folder. If you're having trouble with this step, see the end of the guide for the trouble-shooting section.
+
+Once you have your `<project_name>.hex` file, open up the Teensy loader application, and click the file icon. From here, navigate to your `QMK/keyboards/<project_name>/` folder, and select the `<project_name>.hex` file. Plug in your keyboard and press the button on the Teensy - you should see the LED on the device turn off once you do. The Teensy Loader app will change a little, and the buttons should be clickable - click the download button (down arrow), and then the reset button (right arrow), and your keyboard should be ready to go!
+
+#### Testing your firmware
+
+Carefully flip your keyboard over, open up a new text document, and try typing - you should get the characters that you put into your keymap. Test each key, and note the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys:
+
+0. Flip the keyboard back over and short the keyswitch's contacts with a piece wire - this will eliminate the possibility of the keyswitch being bad and needing to be replaced.
+1. Check the solder points on the keyswitch - these need to be plump and whole. If you touch it with a moderate amount of force and it comes apart, it's not strong enough.
+2. Check the solder joints on the diode - if the diode is loose, part of your row may register, while the other may not.
+3. Check the solder joints on the columns - if your column wiring is loose, part or all of the column may not work.
+4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides.
+5. Check the <project_name>.h file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable.
+6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly.
+
+If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end.
+
+#### Securing the Teensy, finishing your hardware, getting fancier firmware
+
+Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
+
+There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/qmk/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
+
+## Trouble-shooting compiling
+
+### Windows
+
+#### fork: Resource temporarily unavailable
+
+http://www.avrfreaks.net/forum/windows-81-compilation-error
+
+### Mac
+
+### Linux
diff --git a/docs/HHKB-Alt-controller.md b/docs/HHKB-Alt-controller.md
new file mode 100644 (file)
index 0000000..c12d8d7
--- /dev/null
@@ -0,0 +1,5 @@
+# Alternative Controller for HHKB
+
+* [Geekhack.org thread](https://geekhack.org/index.php?topic=12047.0)
+
+* [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 (file)
index 0000000..bc1d25b
--- /dev/null
@@ -0,0 +1,183 @@
+# Quantum Mechanical Keyboard Firmware
+
+You 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.
+
+# Getting started
+
+Before 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!
+
+* [Build Environment Setup](/Build-Environment-Setup.md)
+* [QMK Overview](/QMK-Overview.md)
+
+# Configuring QMK Firmware
+
+The 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.
+
+For more details of the `keymaps` array, see [Keymap Overview](/Keymap.md) page.
+
+## Space Cadet Shift: The future, built in
+
+Steve 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.
+
+## The Leader key: A new kind of modifier
+
+Most 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.
+
+## Tap Dance: A single key can do 3, 5, or 100 different things
+
+Hit 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.
+
+## Temporarily setting the default layer
+
+`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.
+
+## Macro shortcuts: Send a whole string when pressing just one key
+
+How 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.
+
+## Additional keycode aliases for software-implemented layouts \(Colemak, Dvorak, etc\)
+
+Everything 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:
+
+```
+#include <keymap_colemak.h>
+```
+
+If you use Dvorak, use `keymap_dvorak.h` instead of `keymap_colemak.h` for this line. After including this line, you will get access to:
+
+* `CM_*` for all of the Colemak-equivalent characters
+* `DV_*` for all of the Dvorak-equivalent characters
+
+These 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.
+
+To 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`.
+
+## Backlight Breathing
+
+In order to enable backlight breathing, the following line must be added to your config.h file.
+
+```
+#define BACKLIGHT_BREATHING
+```
+
+The following function calls are used to control the breathing effect.
+
+* `breathing_enable()` - Enable the free-running breathing effect.
+* `breathing_disable()` - Disable the free-running breathing effect immediately.
+* `breathing_self_disable()` - Disable the free-running breathing effect after the current effect ends.
+* `breathing_toggle()` - Toggle the free-running breathing effect.
+* `breathing_defaults()` - Reset the speed and brightness settings of the breathing effect.
+
+The following function calls are used to control the maximum brightness of the breathing effect.
+
+* `breathing_intensity_set(value)` - Set the brightness of the breathing effect when it is at its max value.
+* `breathing_intensity_default()` - Reset the brightness of the breathing effect to the default value based on the current backlight intensity.
+
+The following function calls are used to control the cycling speed of the breathing effect.
+
+* `breathing_speed_set(value)` - Set the speed of the breathing effect - how fast it cycles.
+* `breathing_speed_inc(value)` - Increase the speed of the breathing effect by a fixed value.
+* `breathing_speed_dec(value)` - Decrease the speed of the breathing effect by a fixed value.
+* `breathing_speed_default()` - Reset the speed of the breathing effect to the default value.
+
+The following example shows how to enable the backlight breathing effect when the FUNCTION layer macro button is pressed:
+
+```
+case MACRO_FUNCTION:
+    if (record->event.pressed)
+    {
+        breathing_speed_set(3);
+        breathing_enable();
+        layer_on(LAYER_FUNCTION);
+    }
+    else
+    {
+        breathing_speed_set(1);
+        breathing_self_disable();
+        layer_off(LAYER_FUNCTION);
+    }
+    break;
+```
+
+The following example shows how to pulse the backlight on-off-on when the RAISED layer macro button is pressed:
+
+```
+case MACRO_RAISED:
+  if (record->event.pressed)
+  {
+    layer_on(LAYER_RAISED);
+    breathing_speed_set(2);
+    breathing_pulse();
+    update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
+  }
+  else
+  {
+    layer_off(LAYER_RAISED);
+    update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
+  }
+  break;
+```
+
+## Other firmware shortcut keycodes
+
+* `RESET` - puts the MCU in DFU mode for flashing new firmware \(with `make dfu`\)
+* `DEBUG` - the firmware into debug mode - you'll need hid\_listen to see things
+* `BL_ON` - turns the backlight on
+* `BL_OFF` - turns the backlight off
+* `BL_<n>` - sets the backlight to level _n_
+* `BL_INC` - increments the backlight level by one
+* `BL_DEC` - decrements the backlight level by one
+* `BL_TOGG` - toggles the backlight
+* `BL_STEP` - steps through the backlight levels
+
+Enable the backlight from the Makefile.
+
+# Custom Quantum functions
+
+All 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.
+
+## `void matrix_init_*(void)`
+
+This function gets called when the matrix is initiated, and can contain start-up code for your keyboard/keymap.
+
+## `void matrix_scan_*(void)`
+
+This 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.
+
+## `bool process_record_*(uint16_t keycode, keyrecord_t *record)`
+
+This 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.
+
+The `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.
+
+The `record` variable contains infomation about the actual press:
+
+```
+keyrecord_t record {
+  keyevent_t event {
+    keypos_t key {
+      uint8_t col
+      uint8_t row
+    }
+    bool     pressed
+    uint16_t time
+  }
+}
+```
+
+The conditional `if (record->event.pressed)` can tell if the key is being pressed or released, and you can execute code based on that.
+
+## `void led_set_*(uint8_t usb_led)`
+
+This gets called whenever there is a state change on your host LEDs \(eg caps lock, scroll lock, etc\). The LEDs are defined as:
+
+```
+#define USB_LED_NUM_LOCK                0
+#define USB_LED_CAPS_LOCK               1
+#define USB_LED_SCROLL_LOCK             2
+#define USB_LED_COMPOSE                 3
+#define USB_LED_KANA                    4
+```
+
+and 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.
+
diff --git a/docs/Key-Functions.md b/docs/Key-Functions.md
new file mode 100644 (file)
index 0000000..228fea8
--- /dev/null
@@ -0,0 +1,117 @@
+# Quick Aliases To Common Actions
+
+Your keymap can include shortcuts to common operations (called "function actions" in tmk).
+
+These 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).
+
+Instead 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.
+
+### Switching and toggling layers
+
+`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.
+
+`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).
+
+`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).
+
+`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.
+
+`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).
+
+`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.
+
+
+### Fun with modifier keys
+
+* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias
+* `RSFT(kc)` - applies right Shift to *kc*
+* `LCTL(kc)` - applies left Control to *kc*
+* `RCTL(kc)` - applies right Control to *kc*
+* `LALT(kc)` - applies left Alt to *kc*
+* `RALT(kc)` - applies right Alt to *kc*
+* `LGUI(kc)` - applies left GUI (command/win) to *kc*
+* `RGUI(kc)` - applies right GUI (command/win) to *kc*
+* `HYPR(kc)` - applies Hyper (all modifiers) to *kc*
+* `MEH(kc)`  - applies Meh (all modifiers except Win/Cmd) to *kc*
+* `LCAG(kc)` - applies CtrlAltGui to *kc*
+
+You can also chain these, like this:
+
+    LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress.
+
+The 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`.
+
+    KC_TILD  ~
+    KC_EXLM  !
+    KC_QUES  ?
+    KC_AT    @
+    KC_HASH  #
+    KC_DLR   $
+    KC_PERC  %
+    KC_CIRC  ^
+    KC_AMPR  &
+    KC_ASTR  *
+    KC_LPRN  (
+    KC_RPRN  )
+    KC_UNDS  _
+    KC_PLUS  +
+    KC_DQUO  "
+    KC_LCBR  {
+    KC_RCBR  }
+    KC_LABK  <
+    KC_RABK  >
+    KC_PIPE  |
+    KC_COLN  :
+
+`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. :)
+
+`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.
+
+These are the values you can use for the `mod` in `MT()` and `OSM()`:
+
+  * MOD_LCTL
+  * MOD_LSFT
+  * MOD_LALT
+  * MOD_LGUI
+  * MOD_RCTL
+  * MOD_RSFT
+  * MOD_RALT
+  * MOD_RGUI
+  * MOD_HYPR
+  * MOD_MEH
+
+These 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.
+
+We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact:
+
+  * `CTL_T(kc)` - is LCTL when held and *kc* when tapped
+  * `SFT_T(kc)` - is LSFT when held and *kc* when tapped
+  * `ALT_T(kc)` - is LALT when held and *kc* when tapped
+  * `ALGR_T(kc)` - is AltGr when held and *kc* when tapped
+  * `GUI_T(kc)` - is LGUI when held and *kc* when tapped
+  * `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/)
+  * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped
+  * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift.
+
+##### Permissive Hold
+
+As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
+
+```
+#define PERMISSIVE_HOLD
+```
+
+This makes it easier for fast typists to use dual-function keys. As described in the PR:
+
+Without this, if you let go of a held key inside the tapping term, it won't register.
+
+Example: (Tapping Term = 200)
+
+- SHFT_T(KC_A) Down
+- KC_X Down
+- KC_X Up
+- SHFT_T(KC_A) Up
+
+With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X).
+
+With 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 (file)
index 0000000..a0c95a9
--- /dev/null
@@ -0,0 +1,228 @@
+# Overview
+
+When defining a [keymap](Keymap.md) each key needs a valid key definition.
+
+This page documents the symbols that correspond to keycodes that are available to you in QMK.
+
+To 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).
+
+The 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.
+
+# The Keycodes
+
+Keycodes in QMK are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with following exceptions:
+
+* `KC_NO` = 0 for no action
+* `KC_TRNS` = 1 for layer transparency
+* internal special keycodes in the `0xA5-DF` range (tmk heritage).
+
+## Letters and Numbers
+
+|KC_1|KC_2|KC_3|KC_4|KC_5|KC_6|KC_7|KC_8|
+|----|----|----|----|----|----|----|----|
+|KC_9|KC_0|KC_F1|KC_F2|KC_F3|KC_F4|KC_F5|KC_F6|
+|KC_F7|KC_F8|KC_F9|KC_F10|KC_F11|KC_F12|KC_F13|KC_F14|
+|KC_F15|KC_F16|KC_F17|KC_F18|KC_F19|KC_F20|KC_F21|KC_F22|
+|KC_F23|KC_F24|KC_A|KC_B|KC_C|KC_D|KC_E|KC_F|
+|KC_G|KC_H|KC_I|KC_J|KC_K|KC_L|KC_M|KC_N|
+|KC_O|KC_P|KC_Q|KC_R|KC_S|KC_T|KC_U|KC_V|
+|KC_W|KC_X|KC_Y|KC_Z|||||
+
+## Punctuation
+
+|Long Name|Short Name|Description|
+|---------|----------|-----------|
+|KC_ENTER|KC_ENT|`Return (ENTER)`|
+|KC_ESCAPE|KC_ESC|`ESCAPE`|
+|KC_BSPACE|KC_BSPC|`DELETE (Backspace)`|
+|KC_TAB||`Tab`|
+|KC_SPACE|KC_SPC|Spacebar|
+|KC_MINUS|KC_MINS|`-` and `_`|
+|KC_EQUAL|KC_EQL|`=` and `+`|
+|KC_LBRACKET|KC_LBRC|`[` and `{`|
+|KC_RBRACKET|KC_RBRC|`]` and `}`|
+|KC_BSLASH|KC_BSLS|`\` and <code>&#124;</code> |
+|KC_NONUS_HASH|KC_NUHS|Non-US `#` and `~`|
+|KC_NONUS_BSLASH|KC_NUBS|Non-US `\` and <code>&#124;</code> |
+|KC_INT1|KC_RO|JIS `\` and <code>&#124;</code> |
+|KC_INT2|KC_KANA|International216|
+|KC_INT3|KC_JYEN|Yen Symbol (`¥`)|
+|KC_SCOLON|KC_SCLN|`;` and `:`|
+|KC_QUOTE|KC_QUOT|`‘` and `“`|
+|KC_GRAVE|KC_GRV|Grave Accent and Tilde|
+|KC_COMMA|KC_COMM|`,` and `<`|
+|KC_DOT||`.` and `>`|
+|KC_SLASH|KC_SLSH|`/` and `?`|
+|KC_CAPSLOCK|KC_CAPS|Caps Lock|
+
+## Modifiers
+
+|Long Name|Short Name|Description|
+|---------|----------|-----------|
+|KC_LCTRL|KC_LCTL|LeftControl|
+|KC_LSHIFT|KC_LSFT|LeftShift|
+|KC_LALT||LeftAlt|
+|KC_LGUI||Left GUI(Windows/Apple/Meta key)|
+|KC_RCTRL|KC_RCTL|RightControl|
+|KC_RSHIFT|KC_RSFT|RightShift|
+|KC_RALT||RightAlt|
+|KC_RGUI||Right GUI(Windows/Apple/Meta key)|
+|KC_LOCKING_CAPS||Locking Caps Lock|
+|KC_LOCKING_NUM||Locking Num Lock|
+|KC_LOCKING_SCROLL||Locking Scroll Lock|
+|KC_INT4|KC_HENK|JIS Henken|
+|KC_INT5|KC_MHEN|JIS Muhenken|
+
+## Commands
+
+|Long Name|Short Name|Description|
+|---------|----------|-----------|
+|KC_PSCREEN|KC_PSCR|PrintScreen|
+|KC_SCROLLLOCK|KC_SLCK|Scroll Lock|
+|KC_PAUSE|KC_PAUS|Pause|
+|KC_INSERT|KC_INS|Insert|
+|KC_HOME||Home|
+|KC_PGUP||PageUp|
+|KC_DELETE|KC_DEL|Delete Forward|
+|KC_END||End|
+|KC_PGDOWN|KC_PGDN|PageDown|
+|KC_RIGHT|KC_RGHT|RightArrow|
+|KC_LEFT||LeftArrow|
+|KC_DOWN||DownArrow|
+|KC_UP||UpArrow|
+|KC_APPLICATION|KC_APP|Application|
+|KC_POWER||Power|
+|KC_EXECUTE||Execute|
+|KC_HELP||Help|
+|KC_MENU||Menu|
+|KC_SELECT||Select|
+|KC_AGAIN||Again|
+|KC_UNDO||Undo|
+|KC_CUT||Cut|
+|KC_COPY||Copy|
+|KC_PASTE||Paste|
+|KC_FIND||Find|
+|KC_ALT_ERASE||Alternate Erase|
+|KC_SYSREQ||SysReq/Attention|
+|KC_CANCEL||Cancel|
+|KC_CLEAR||Clear|
+|KC_PRIOR||Prior|
+|KC_RETURN||Return|
+|KC_SEPARATOR||Separator|
+|KC_OUT||Out|
+|KC_OPER||Oper|
+|KC_CLEAR_AGAIN||Clear/Again|
+|KC_CRSEL||CrSel/Props|
+|KC_EXSEL||ExSel|
+|KC_SYSTEM_POWER|KC_PWR|System Power Down|
+|KC_SYSTEM_SLEEP|KC_SLEP|System Sleep|
+|KC_SYSTEM_WAKE|KC_WAKE|System Wake|
+|KC_MAIL|KC_MAIL||
+|KC_CALCULATOR|KC_CALC||
+|KC_MY_COMPUTER|KC_MYCM||
+|KC_WWW_SEARCH|KC_WSCH||
+|KC_WWW_HOME|KC_WHOM||
+|KC_WWW_BACK|KC_WBAK||
+|KC_WWW_FORWARD|KC_WFWD||
+|KC_WWW_STOP|KC_WSTP||
+|KC_WWW_REFRESH|KC_WREF||
+|KC_WWW_FAVORITES|KC_WFAV||
+
+## Media Keys
+
+Windows and Mac use different key codes for next track and previous track. Make sure you choose the keycode that corresponds to your OS.
+
+|Long Name|Short Name|Description|
+|---------|----------|-----------|
+|KC_STOP||Stop|
+|KC__MUTE||Mute|
+|KC__VOLUP||Volume Up|
+|KC__VOLDOWN||Volume Down|
+|KC_AUDIO_MUTE|KC_MUTE||
+|KC_AUDIO_VOL_UP|KC_VOLU||
+|KC_AUDIO_VOL_DOWN|KC_VOLD||
+|KC_MEDIA_NEXT_TRACK|KC_MNXT|Next Track (Windows)|
+|KC_MEDIA_PREV_TRACK|KC_MPRV|Previous Track (Windows)|
+|KC_MEDIA_FAST_FORWARD|KC_MFFD|Next Track (macOS)|
+|KC_MEDIA_REWIND|KC_MRWD|Previous Track (macOS)|
+|KC_MEDIA_STOP|KC_MSTP||
+|KC_MEDIA_PLAY_PAUSE|KC_MPLY||
+|KC_MEDIA_SELECT|KC_MSEL||
+
+## Numpad
+
+|Long Name|Short Name|Description|
+|---------|----------|-----------|
+|KC_NUMLOCK|KC_NLCK|Keypad Num Lock and Clear|
+|KC_KP_SLASH|KC_PSLS|Keypad /|
+|KC_KP_ASTERISK|KC_PAST|Keypad *|
+|KC_KP_MINUS|KC_PMNS|Keypad -|
+|KC_KP_PLUS|KC_PPLS|Keypad +|
+|KC_KP_ENTER|KC_PENT|Keypad ENTER|
+|KC_KP_1|KC_P1|Keypad 1 and End|
+|KC_KP_2|KC_P2|Keypad 2 and Down Arrow|
+|KC_KP_3|KC_P3|Keypad 3 and PageDn|
+|KC_KP_4|KC_P4|Keypad 4 and Left Arrow|
+|KC_KP_5|KC_P5|Keypad 5|
+|KC_KP_6|KC_P6|Keypad 6 and Right Arrow|
+|KC_KP_7|KC_P7|Keypad 7 and Home|
+|KC_KP_8|KC_P8|Keypad 8 and Up Arrow|
+|KC_KP_9|KC_P9|Keypad 9 and PageUp|
+|KC_KP_0|KC_P0|Keypad 0 and Insert|
+|KC_KP_DOT|KC_PDOT|Keypad . and Delete|
+|KC_KP_EQUAL|KC_PEQL|Keypad =|
+|KC_KP_COMMA|KC_PCMM|Keypad Comma|
+|KC_KP_EQUAL_AS400||Keypad Equal Sign|
+
+## Special Keys
+
+|Long Name|Short Name|Description|
+|---------|----------|-----------|
+|KC_NO||Ignore this key. (NOOP) |
+
+## Mousekey
+
+|Long Name|Short Name|Description|
+|---------|----------|-----------|
+|KC_MS_UP|KC_MS_U|Mouse Cursor Up|
+|KC_MS_DOWN|KC_MS_D|Mouse Cursor Down|
+|KC_MS_LEFT|KC_MS_L|Mouse Cursor Left|
+|KC_MS_RIGHT|KC_MS_R|Mouse Cursor Right|
+|KC_MS_BTN1|KC_BTN1|Mouse Button 1|
+|KC_MS_BTN2|KC_BTN2|Mouse Button 2|
+|KC_MS_BTN3|KC_BTN3|Mouse Button 3|
+|KC_MS_BTN4|KC_BTN4|Mouse Button 4|
+|KC_MS_BTN5|KC_BTN5|Mouse Button 5|
+|KC_MS_WH_UP|KC_WH_U|Mouse Wheel Up|
+|KC_MS_WH_DOWN|KC_WH_D|Mouse Wheel Down|
+|KC_MS_WH_LEFT|KC_WH_L|Mouse Wheel Left|
+|KC_MS_WH_RIGHT|KC_WH_R|Mouse Wheel Right|
+|KC_MS_ACCEL0|KC_ACL0|Mouse Acceleration 0|
+|KC_MS_ACCEL1|KC_ACL1|Mouse Acceleration 1|
+|KC_MS_ACCEL2|KC_ACL2|Mouse Acceleration 2|
+
+## Magic Keys
+
+The 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.
+
+|Long Name|Short Name|Description|
+|---------|----------|-----------|
+|MAGIC_SWAP_CONTROL_CAPSLOCK||Swap Capslock and Control|
+|MAGIC_CAPSLOCK_TO_CONTROL||Change Capslock to Control|
+|MAGIC_SWAP_ALT_GUI||Swap ALT and GUI|
+|MAGIC_SWAP_LALT_LGUI||Swap LALT and LGUI|
+|MAGIC_SWAP_RALT_RGUI||Swap RALT and RGUI|
+|MAGIC_NO_GUI||Disable off the GUI key|
+|MAGIC_SWAP_GRAVE_ESC||Swap the GRAVE (~ `) and Esc keys|
+|MAGIC_SWAP_BACKSLASH_BACKSPACE||Swap Backslash and Backspace|
+|MAGIC_UNSWAP_CONTROL_CAPSLOCK||Disable the Control/Caps Swap|
+|MAGIC_UNCAPSLOCK_TO_CONTROL||Turn Capslock back into Capslock|
+|MAGIC_UNSWAP_ALT_GUI||Turn the ALT/GUI swap off|
+|MAGIC_UNSWAP_LALT_LGUI||Turn the LALT/LGUI swap off|
+|MAGIC_UNSWAP_RALT_RGUI||Turn the RALT/RGUI swap off|
+|MAGIC_UNNO_GUI||Enable the GUI key|
+|MAGIC_UNSWAP_GRAVE_ESC||Turn the GRAVE/ESC swap off|
+|MAGIC_UNSWAP_BACKSLASH_BACKSPACE||Turn the Backslash/Backspace swap off|
+|MAGIC_HOST_NKRO||Turn NKRO on|
+|MAGIC_UNHOST_NKRO||Turn NKRO off|
+|MAGIC_TOGGLE_NKRO||Toggle NKRO on or off|
diff --git a/docs/Keymap-examples.md b/docs/Keymap-examples.md
new file mode 100644 (file)
index 0000000..0940119
--- /dev/null
@@ -0,0 +1,37 @@
+# Share your keymap idea here!
+https://github.com/tmk/tmk_keyboard/issues/265
+
+---
+
+## Reverse-shifted for numbers
+With pressing Shift and '1' key you get **1** while with just '1' key you get **!**.
+- https://geekhack.org/index.php?topic=41989.msg1959718#msg1959718
+
+
+## KBT Pure layout
+Keymap code on Alps64
+https://github.com/thisisshi/tmk_keyboard/blob/15fe63e8d181a8a95988dcc71929f0024df55caa/keyboard/alps64/keymap_pure.c
+
+and guide.
+https://github.com/thisisshi/tmk_keyboard/blob/77ac0805ade565fb23657e3644c920ada71edccf/keyboard/alps64/Guide.md
+
+## Prevent stuck modifiers
+
+Consider the following scenario:
+
+1. Layer 0 has a key defined as Shift.
+2. The same key is defined on layer 1 as the letter A.
+3. User presses Shift.
+4. User switches to layer 1 for whatever reason.
+5. User releases Shift, or rather the letter A.
+6. User switches back to layer 0.
+
+Shift was actually never released and is still considered pressed.
+
+If such situation bothers you add this to your `config.h`:
+
+    #define PREVENT_STUCK_MODIFIERS
+
+This option uses 5 bytes of memory per every 8 keys on the keyboard
+rounded up (5 bits per key). For example on Planck (48 keys) it uses
+(48/8)\*5 = 30 bytes.
diff --git a/docs/Keymap.md b/docs/Keymap.md
new file mode 100644 (file)
index 0000000..53b17f4
--- /dev/null
@@ -0,0 +1,222 @@
+# Keymap Overview
+
+QMK 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.
+
+
+## Keymap and layers
+In 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.
+
+For 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**.
+
+Respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence.
+
+    Keymap: 32 Layers                   Layer: action code matrix
+    -----------------                   ---------------------
+    stack of layers                     array_of_action_code[row][column]
+           ____________ precedence               _______________________
+          /           / | high                  / ESC / F1  / F2  / F3   ....
+      31 /___________// |                      /-----/-----/-----/-----
+      30 /___________// |                     / TAB /  Q  /  W  /  E   ....
+      29 /___________/  |                    /-----/-----/-----/-----
+       :   _:_:_:_:_:__ |               :   /LCtrl/  A  /  S  /  D   ....
+       :  / : : : : : / |               :  /  :     :     :     :
+       2 /___________// |               2 `--------------------------
+       1 /___________// |               1 `--------------------------
+       0 /___________/  V low           0 `--------------------------
+
+
+Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history.
+
+### Keymap layer status
+Keymap layer has its state in two 32 bit parameters:
+
+* **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred.
+* **`layer_state`** () has current on/off status of the layer on its each bit.
+
+Keymap 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.
+Keymap 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`.
+To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
+
+    Initial state of Keymap          Change base layout              
+    -----------------------          ------------------              
+
+      31                               31
+      30                               30
+      29                               29
+       :                                :
+       :                                :   ____________
+       2   ____________                 2  /           /
+       1  /           /              ,->1 /___________/
+    ,->0 /___________/               |  0
+    |                                |
+    `--- default_layer = 0           `--- default_layer = 1
+         layer_state   = 0x00000001       layer_state   = 0x00000002
+
+On 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.
+
+    Overlay feature layer
+    ---------------------      bit|status
+           ____________        ---+------
+      31  /           /        31 |   0
+      30 /___________// -----> 30 |   1
+      29 /___________/  -----> 29 |   1
+       :                        : |   :
+       :   ____________         : |   :
+       2  /           /         2 |   0
+    ,->1 /___________/  ----->  1 |   1
+    |  0                        0 |   0
+    |                                 +
+    `--- default_layer = 1            |
+         layer_state   = 0x60000002 <-'
+
+
+
+### Layer Precedence and Transparency
+Note 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.
+
+You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer.
+Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead.
+
+## Anatomy Of A `keymap.c`
+
+For 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.
+
+There are 3 main sections of a `keymap.c` file you'll want to concern yourself with:
+
+* [The Definitions](#definitions)
+* [The Layer/Keymap Datastructure](#layers-and-keymaps)
+* [Custom Functions](#custom-functions), if any
+
+### Definitions
+
+At the top of the file you'll find this:
+
+    #include "clueboard.h"
+
+    // Helpful defines
+    #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))
+    #define _______ KC_TRNS
+
+    // Each layer gets a name for readability.
+    // The underscores don't mean anything - you can
+    // have a layer called STUFF or any other name.
+    // Layer names don't all need to be of the same 
+    // length, and you can also skip them entirely
+    // and just use numbers.
+    #define _BL 0
+    #define _FL 1
+    #define _CL 2
+
+These 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.
+
+### Layers and Keymaps
+
+The 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:
+
+    const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+After 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. 
+
+`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. 
+
+> 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.
+
+#### Base Layer
+
+Here is an example of the Clueboard's base layer:
+
+      /* Keymap _BL: Base Layer (Default Layer)
+       */
+    [_BL] = KEYMAP(
+      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, \
+      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, \
+      KC_CAPS, KC_A,    KC_S,   KC_D,   KC_F,   KC_G,   KC_H,   KC_J,   KC_K,   KC_L,    KC_SCLN,  KC_QUOT,  KC_NUHS,  KC_ENT,                             \
+      KC_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,            \
+      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),
+
+Some interesting things to note about this:
+
+* 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.
+* Plain keyboard scancodes are prefixed with KC_, while "special" keys are not.
+* The upper left key activates custom function 0 (`F(0)`)
+* The "Fn" key is defined with `MO(_FL)`, which moves to the `_FL` layer while that key is being held down.
+
+#### Function Overlay Layer
+
+Our 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.
+
+    [_FL] = KEYMAP(
+      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, \
+      _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS,  _______,  _______,  _______,                   _______, \
+      _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                           \
+      _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,          KC_PGUP,         \
+      _______, _______, _______, _______,        _______,_______,                        _______,  _______,  _______,  MO(_FL), KC_HOME, KC_PGDN, KC_END),
+
+Some interesting things to note:
+
+* We have used our `_______` definition to turn `KC_TRNS` into `_______`. This makes it easier to spot the keys that have changed on this layer.
+* While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer. 
+
+### Custom Functions
+
+At 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. 
+
+#### `fn_actions[]`
+
+We 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:
+
+    const uint16_t PROGMEM fn_actions[] = {
+      [0] = ACTION_FUNCTION(0),  // Calls action_function()
+    };
+
+In this case we've instructed QMK to call the `ACTION_FUNCTION` callback, which we will define in the next section.
+
+> 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.
+
+#### `action_function()`
+
+To 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`.
+
+    void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
+      static uint8_t mods_pressed;
+
+      switch (id) {
+        case 0:
+          /* Handle the combined Grave/Esc key
+           */
+          mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
+
+          if (record->event.pressed) {
+            /* The key is being pressed.
+             */
+            if (mods_pressed) {
+              add_key(KC_GRV);
+              send_keyboard_report();
+            } else {
+              add_key(KC_ESC);
+              send_keyboard_report();
+            }
+          } else {
+            /* The key is being released.
+             */
+            if (mods_pressed) {
+              del_key(KC_GRV);
+              send_keyboard_report();
+            } else {
+              del_key(KC_ESC);
+              send_keyboard_report();
+            }
+          }
+          break;
+      }
+    }
+
+# Nitty Gritty Details
+
+This should have given you a basic overview for creating your own keymap. For more details see the following resources:
+
+* https://github.com/qmk/qmk_firmware/wiki/Keycodes
+* https://github.com/qmk/qmk_firmware/wiki/FAQ-Keymap
+* https://github.com/qmk/qmk_firmware/wiki/Keymap-examples
+
+We 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 (file)
index 0000000..4a7ee64
--- /dev/null
@@ -0,0 +1,29 @@
+== KLL vs TMK
+1. **Shift** = Memontary
+1. Latch = One shot
+1. Lock  = Toggle
+
+## KLL terminology
+### Fall-through
+When a key is undefined on a particular layer, the key
+definition on the previously stacked layer will be used. Eventually
+the key definition will be set to using the default layer. If the None
+keyword is used, then the fall-through will stop and no action will
+take place.
+###Latch
+When referring to keyboards, a key function that is only enabled
+until the release of the next keypress.
+###Lock
+When referring to keyboards, a key function that is enabled until
+that key is pressed again (e.g. Caps Lock).
+### NKRO
+N-Key Rollover is the capability to press N number of keys at the
+same time on a keyboard and have them all register on the OS simultaneously.
+### Scan Code
+Row x Column code or native protocol code used by the keyboard.
+### Shift
+When referring to keyboards, a key function that is enabled while
+that key is held.
+### USB Code
+Keyboard Press/Release codes as defined by the USB HID
+Spec.
\ No newline at end of file
diff --git a/docs/Leader-Key.md b/docs/Leader-Key.md
new file mode 100644 (file)
index 0000000..bf4d545
--- /dev/null
@@ -0,0 +1,37 @@
+# The Leader key: A new kind of modifier
+
+If 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.
+
+That's what `KC_LEAD` does. Here's an example:
+
+1. 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.
+2. 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.
+3. Within your `matrix_scan_user` function, do something like this:
+
+```
+LEADER_EXTERNS();
+
+void matrix_scan_user(void) {
+  LEADER_DICTIONARY() {
+    leading = false;
+    leader_end();
+
+    SEQ_ONE_KEY(KC_F) {
+      register_code(KC_S);
+      unregister_code(KC_S);
+    }
+    SEQ_TWO_KEYS(KC_A, KC_S) {
+      register_code(KC_H);
+      unregister_code(KC_H);
+    }
+    SEQ_THREE_KEYS(KC_A, KC_S, KC_D) {
+      register_code(KC_LGUI);
+      register_code(KC_S);
+      unregister_code(KC_S);
+      unregister_code(KC_LGUI);
+    }
+  }
+}
+```
+
+As 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 (file)
index 0000000..77ee688
--- /dev/null
@@ -0,0 +1,1272 @@
+# Details
+
+This page contains details that are no longer relevant to the License Clarification effort.
+
+## Small Contributions
+
+Smaller contributions that don't need to sign off on the license change.
+
+Username | # Lines | Files | 
+---------|---------|-------|
+@AGausmann | 3 | quantum/process_keycode/process_midi.c |
+@Chipairon | 2 | quantum/keymap_extras/keymap_spanish.h | 
+@coderkun | 5 | quantum/process_keycode/process_unicode.c | 
+@fernandodeperto | 3 | quantum/keymap_extras/keymap_nordic.h | 
+@jeebak | 8 | quantum/audio/audio_pwm.c | 
+@Keller-Laminar | 1 | quantum/keymap_extras/keymap_dvorak.h | 
+kevin at letord.fr | 1 | quantum/keymap_extras/keymap_french.h | 
+@ofpies | 3 | quantum/config_common.h<br>quantum/quantum.c | 
+@MagicianVivi | 2 | quantum/keymap_extras/keymap_bepo.h | 
+@NoahAndrews | 1 | quantum/template/template.h | 
+@robertdale | 6 | quantum/process_keycode/process_music.c | 
+@scott-t-wilson | 3 | quantum/rgblight.c<br>quantum/rgblight.h | 
+@skullydazed | 2 | quantum/rgblight.c | 
+@yoyoerx | 6 | quantum/matrix.c<br>quantum/template/template.c | 
+
+# Single Author Files
+
+These are the single author files that still need to have their license clarified.
+
+* quantum/dynamic_macro.h: @Vifon
+* quantum/pincontrol.h: @wez
+* quantum/keymap_extras/keymap_canadian_multilingual.h: @DidierLoiseau
+* quantum/keymap_extras/keymap_jp.h: @h-youhei
+* quantum/keymap_extras/keymap_unicode_cyrillic.h: @kuel
+* quantum/keymap_extras/keymap_russian.h: @kuel
+
+# Multi Author Files
+
+Each 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:
+
+```git blame <file> | cut -f 2 -d '(' | cut -f 1 -d '2' | sort | uniq -c | sed 's/^ */* /'```
+
+## quantum/config_common.h 
+
+* 24 Eric Tang
+* 2 Fred Sundvik
+* 58 Jack Humbert
+* 1 ofples
+
+## quantum/keycode_config.h 
+
+* 5 IBNobody
+* 20 Jack Humbert
+* 1 fredizzimo
+
+## quantum/keymap.h 
+
+* 39 Jack Humbert
+* 6 Wilba6582
+* 8 fredizzimo
+
+## quantum/keymap_common.c 
+
+* 1 Fred Sundvik
+* 162 Jack Humbert
+* 11 Wilba6582
+* 3 fredizzimo
+
+## quantum/light_ws2812.c 
+
+* 163 Jack Humbert
+* 168 Yang Liu
+
+## quantum/light_ws2812.h 
+
+* 11 Jack Humbert
+* 70 Yang Liu
+
+## quantum/matrix.c 
+
+* 3 Erez Zukerman
+* 15 Eric Tang
+* 239 IBNobody
+* 152 Jack Humbert
+* 2 fredizzimo
+* 2 yoyoerx
+
+## quantum/quantum.c 
+
+* 38 Erez Zukerman
+* 96 Eric Tang
+* 49 Gergely Nagy
+* 68 IBNobody
+* 4 Jack & Erez
+* 561 Jack Humbert
+* 2 Ofer Plesser
+* 14 Pavlos Vinieratos
+* 2 Priyadi Iman Nurcahyo
+* 12 Smilliam
+* 52 TerryMathews
+* 12 Wojciech Siewierski
+
+## quantum/quantum.h 
+
+* 23 Erez Zukerman
+* 4 Eric Tang
+* 1 Fred Sundvik
+* 3 Gergely Nagy
+* 86 Jack Humbert
+* 2 Pavlos Vinieratos
+* 5 fredizzimo
+
+## quantum/quantum_keycodes.h 
+
+* 2 Erez Zukerman
+* 2 Jack Humbert
+* 313 Wilba6582
+
+## quantum/rgblight.c 
+
+* 13 Erez Zukerman
+* 5 Eric Tang
+* 39 Fred Sundvik
+* 101 Jack Humbert
+* 311 Jordi Orlando
+* 1 Scott Wilson
+* 147 Yang Liu
+* 2 skullY
+
+## quantum/rgblight.h 
+
+* 3 Erez Zukerman
+* 2 Eric Tang
+* 6 Fred Sundvik
+* 12 Jack Humbert
+* 2 Scott Wilson
+* 80 Yang Liu
+
+## quantum/api/api_sysex.c 
+
+* 44 Fred Sundvik
+* 13 Jack Humbert
+
+## quantum/audio/audio.c 
+
+* 318 IBNobody
+* 164 Jack Humbert
+
+## quantum/audio/audio.h 
+
+* 15 IBNobody
+* 76 Jack Humbert
+
+## quantum/audio/audio_pwm.c 
+
+* 642 IBNobody
+* 1 Jack Humbert
+
+## quantum/audio/song_list.h 
+
+* 101 IBNobody
+* 16 Jack Humbert
+* 8 JeeBak Kim
+
+## quantum/audio/voices.c 
+
+* 24 IBNobody
+* 256 Jack Humbert
+
+## quantum/audio/voices.h 
+
+* 3 IBNobody
+* 32 Jack Humbert
+
+## quantum/keymap_extras/keymap_bepo.h 
+
+* 308 Didier Loiseau
+* 1 Jack Humbert   
+* 2 Vivien Alger
+
+## quantum/keymap_extras/keymap_colemak.h 
+
+* 31 Erez Zukerman
+* 44 Jack Humbert
+
+## quantum/keymap_extras/keymap_dvorak.h 
+
+* 69 Jack Humbert
+* 15 Jonathan A. Kollasch
+* 1 Keller-Laminar
+
+## quantum/keymap_extras/keymap_fr_ch.h 
+
+* 1 Jack Humbert
+* 1 Jonathan A. Kollasch
+* 96 Vincent Pochet
+
+## quantum/keymap_extras/keymap_french.h 
+
+* 80 Jack Humbert
+* 2 Jonathan A. Kollasch
+* 1 Kévin Letord
+
+## quantum/keymap_extras/keymap_french_osx.h 
+
+* 1 Jack Humbert
+* 76 Sébastien Pérochon
+
+## quantum/keymap_extras/keymap_german.h 
+
+* 1 Jack Humbert
+* 1 Jonathan A. Kollasch
+* 58 Matthias Schmitt
+* 39 plgruener
+
+## quantum/keymap_extras/keymap_german_ch.h 
+
+* 1 Jack Humbert
+* 1 Jonathan A. Kollasch
+* 100 heartsekai
+
+## quantum/keymap_extras/keymap_german_osx.h 
+
+* 1 Jack Humbert
+* 96 Stephan Bösebeck
+
+## quantum/keymap_extras/keymap_neo2.h 
+
+* 2 Jack Humbert
+* 42 Matthias Schmitt
+* 19 plgruener
+
+## quantum/keymap_extras/keymap_nordic.h 
+
+* 1 Andreas Lindhé
+* 1 Erez Zukerman
+* 3 Fernando Mendonca
+* 53 Jack Humbert
+* 1 Jonathan A. Kollasch
+
+## quantum/keymap_extras/keymap_norwegian.h 
+
+* 1 Andreas Lindhé
+* 40 joar
+
+## quantum/keymap_extras/keymap_plover.h 
+
+* 1 Jack Humbert
+* 31 James ‘Twey’ Kay
+
+## quantum/keymap_extras/keymap_spanish.h 
+
+* 59 Jack Humbert
+* 1 Jonathan A. Kollasch
+* 2 Rubén Díaz-Jorge
+
+## quantum/keymap_extras/keymap_uk.h 
+
+* 34 Jack Humbert
+* 2 Jonathan A. Kollasch
+
+## quantum/process_keycode/process_midi.c 
+
+* 3 Adam Gausmann
+* 65 Jack Humbert
+
+## quantum/process_keycode/process_music.c 
+
+* 180 Jack Humbert
+* 6 Robert Dale
+
+## quantum/process_keycode/process_tap_dance.c 
+
+* 90 Gergely Nagy
+* 38 Jack Humbert
+* 8 Pavlos Vinieratos
+
+## quantum/process_keycode/process_tap_dance.h 
+
+* 22 Gergely Nagy
+* 41 Jack Humbert
+* 9 Pavlos Vinieratos
+
+## quantum/process_keycode/process_unicode.c 
+
+* 176 Gergely Nagy
+* 24 Jack Humbert
+* 84 Priyadi Iman Nurcahyo
+* 5 coderkun
+
+## quantum/process_keycode/process_unicode.h 
+
+* 40 Gergely Nagy
+* 117 Jack Humbert
+* 10 Priyadi Iman Nurcahyo
+
+## quantum/template/config.h 
+
+* 9 Eric Tang
+* 78 IBNobody
+* 75 Jack Humbert
+
+## quantum/template/template.c 
+
+* 9 Damien Pollet
+* 7 IBNobody
+* 8 Jack Humbert
+* 4 yoyoerx
+
+## quantum/template/template.h 
+
+* 2 Damien Pollet
+* 16 Jack Humbert
+* 1 Noah Andrews
+
+# All Single Author Files
+
+These files have only a single author and so clarifying licensing should be pretty straightforward.
+
+* quantum/analog.c: Jack Humbert
+* quantum/analog.h: Jack Humbert
+* quantum/api.h: Jack Humbert
+* quantum/keycode_config.c: Jack Humbert
+* quantum/pincontrol.h: Wez Furlong
+* quantum/api/api_sysex.h: Jack Humbert
+* quantum/audio/luts.c: IBNobody
+* quantum/audio/luts.h: IBNobody
+* quantum/audio/musical_notes.h: Jack Humbert
+* quantum/audio/wave.h: Jack Humbert
+* quantum/keymap_extras/keymap_br_abnt2.h: Potiguar Faga
+* quantum/keymap_extras/keymap_dvp.h: Artyom Mironov
+* quantum/keymap_extras/keymap_jp.h: h-youhei
+* quantum/keymap_extras/keymap_unicode_cyrillic.h: kuel
+* quantum/process_keycode/process_chording.c: Jack Humbert
+* quantum/process_keycode/process_chording.h: Jack Humbert
+* quantum/process_keycode/process_leader.c: Jack Humbert
+* quantum/process_keycode/process_leader.h: Jack Humbert
+* quantum/process_keycode/process_midi.h: Jack Humbert
+* quantum/process_keycode/process_music.h: Jack Humbert
+* quantum/process_keycode/process_printer.c: Jack Humbert
+* quantum/process_keycode/process_printer.h: Jack Humbert
+* quantum/process_keycode/process_printer_bb.c: Jack Humbert
+* quantum/serial_link/LICENSE: Fred Sundvik
+* quantum/serial_link/protocol/frame_router.c: Fred Sundvik
+* quantum/serial_link/protocol/frame_router.h: Fred Sundvik
+* quantum/serial_link/protocol/frame_validator.c: Fred Sundvik
+* quantum/serial_link/protocol/frame_validator.h: Fred Sundvik
+* quantum/serial_link/protocol/physical.h: Fred Sundvik
+* quantum/serial_link/protocol/triple_buffered_object.c: Fred Sundvik
+* quantum/serial_link/protocol/triple_buffered_object.h: Fred Sundvik
+* quantum/serial_link/system/serial_link.c: Fred Sundvik
+* quantum/serial_link/system/serial_link.h: Fred Sundvik
+* quantum/serial_link/tests/byte_stuffer_tests.cpp: Fred Sundvik
+* quantum/serial_link/tests/frame_router_tests.cpp: Fred Sundvik
+* quantum/serial_link/tests/frame_validator_tests.cpp: Fred Sundvik
+* quantum/serial_link/tests/Makefile: Fred Sundvik
+* quantum/serial_link/tests/transport_tests.cpp: Fred Sundvik
+* quantum/serial_link/tests/triple_buffered_object_tests.cpp: Fred Sundvik
+* quantum/template/rules.mk: Fred Sundvik
+* quantum/template/keymaps/default/config.h: Jack Humbert
+* quantum/template/keymaps/default/Makefile: Jack Humbert
+* quantum/template/keymaps/default/readme.md: Jack Humbert
+* quantum/tools/eeprom_reset.hex: Jack Humbert
+* quantum/tools/readme.md: Jack Humbert
+* quantum/visualizer/lcd_backlight.c: Fred Sundvik
+* quantum/visualizer/lcd_backlight.h: Fred Sundvik
+* quantum/visualizer/led_test.h: Fred Sundvik
+* quantum/visualizer/LICENSE.md: Fred Sundvik
+* quantum/visualizer/readme.md: Fred Sundvik
+* quantum/visualizer/example_integration/callbacks.c: Fred Sundvik
+* quantum/visualizer/example_integration/gfxconf.h: Fred Sundvik
+* quantum/visualizer/example_integration/lcd_backlight_hal.c: Fred Sundvik
+* quantum/visualizer/example_integration/visualizer_user.c: Fred Sundvik
+
+# All Files
+
+## quantum/analog.c 
+
+* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
+
+## quantum/analog.h 
+
+* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
+
+## quantum/api.c 
+
+* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert
+* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert
+
+## quantum/api.h 
+
+* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert
+
+## quantum/config_common.h 
+
+* 35a81f5b8b081e1607a7c04489b01f551c3213cc Mon Oct 26 16:32:37 2015 -0400 Jack Humbert
+* aaa758f1d3f97dda39879f2b055ad2da9680adfe Mon May 23 20:42:21 2016 -0700 Eric Tang
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+* 705c775a4a433249081321cea0c2def2627817dc Sun Aug 21 22:05:55 2016 -0500 IBNobody
+* 936a26d04ffa12801031c058f27e221174e3fabd Thu Aug 25 00:15:41 2016 -0500 IBNobody
+* 6390033e8688550826a4bd3004a2e76568600657 Mon Nov 21 20:14:16 2016 -0500 Jack Humbert
+* 03d6e165bb0baf9d0093250d3c3c0771290df4d6 Fri Nov 25 09:17:40 2016 +0200 ofples
+* 0c9d66eb59add717397ba83d508577073412ce86 Fri Nov 25 09:20:41 2016 +0200 ofples
+* de1df639535817e17f1c01f07e7a629cec478526 Sat Nov 26 13:55:41 2016 +0700 Priyadi Iman Nurcahyo
+* 17acde94ee2695ab69ea336742c904d649dce17c Sat Nov 26 14:02:38 2016 +0700 Priyadi Iman Nurcahyo
+* d9d67e7b7686fdcbc7269a76d2a54c42325bdd03 Sat Nov 26 15:26:02 2016 +0700 Priyadi Iman Nurcahyo
+* f2214ce1cb6cfe7a0efabe870a2c00fb8451ee80 Sat Nov 26 15:57:48 2016 +0700 Priyadi Iman Nurcahyo
+* 6e0f994950435aa5867e7b7ce780186d881d74ac Mon Nov 28 23:51:07 2016 -0500 Jack Humbert
+* dd685eceb2045371d38f24d454f1ab08ca7416f4 Thu Dec 29 12:13:30 2016 +0200 Fred Sundvik
+
+## quantum/dynamic_macro.h 
+
+* 39e8e61258b51a2c33a94dd877e983f0b1dae0c1 Thu Aug 18 01:37:13 2016 +0200 Wojciech Siewierski
+* 70f32842e5d94f14d05c1f9adcb1b1144a25a132 Sun Oct 9 12:52:39 2016 +0200 Wojciech Siewierski
+
+## quantum/keycode_config.c 
+
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+
+## quantum/keycode_config.h 
+
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo
+* 558f3ec1eb325caf706efc15e2fab26121aba442 Tue Sep 6 23:19:01 2016 -0500 IBNobody
+
+## quantum/keymap.h 
+
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 76076db72545bbb649f11394a12721f61579527f Mon Jun 20 22:36:36 2016 -0400 Jack & Erez
+* 1a0bac8bccf0e156d2f3c5f14a7214f9677b6370 Tue Jun 21 17:42:29 2016 -0400 Jack Humbert
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo
+* 50c686587ed49d8079ba1b11d45ceb6a55d6cd4b Thu Jul 7 23:34:33 2016 -0400 TerryMathews
+* e692ebf86a962e90c51302e7b17a953ea2858f79 Fri Aug 12 20:38:26 2016 +0900 shela
+* 558f3ec1eb325caf706efc15e2fab26121aba442 Tue Sep 6 23:19:01 2016 -0500 IBNobody
+* 1048a588c750e27ff0f900cd6aaf670e034086d0 Fri Oct 7 17:15:11 2016 +0200 npoirey
+* 5b2e455d3b71bfb90754930d1f22d3e8ce98b927 Mon Oct 10 00:46:20 2016 +0700 Priyadi Iman Nurcahyo
+* e27a754b70434de88a37c4a572e4ca5f7730ff58 Wed Oct 12 22:18:27 2016 -0400 Jack & Erez
+* 52d7f7d2770a35adf0b0b0c803e05ae8719f539f Sun Oct 16 15:49:45 2016 -0400 Jack Humbert
+* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert
+* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert
+* 01038ab54ca6c2858ea9e856c717a1129ffe4156 Fri Dec 23 21:51:11 2016 +0200 Ofer Plesser
+* d8a608f3ff4cb4d73cd57be500fd9881e230099d Thu Dec 29 18:28:48 2016 +1100 Wilba6582
+
+## quantum/keymap_common.c 
+
+* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
+* 35a81f5b8b081e1607a7c04489b01f551c3213cc Mon Oct 26 16:32:37 2015 -0400 Jack Humbert
+* cc1c32671eb1eb43a87e55ac4ffa60b15115e48d Mon Oct 26 20:02:25 2015 -0400 Jack Humbert
+* d9f08e6177271594fa573993d9f4dbc2d98c7416 Tue Oct 27 22:00:52 2015 -0400 Jack Humbert
+* 18da1e6801335b0d9515ab72e9236a01d629915f Tue Oct 27 23:06:18 2015 -0400 Jack Humbert
+* d3db8d62f6fc6a7dee43978ddc8356579b502b37 Wed Oct 28 04:07:15 2015 +0200 Erez Zukerman
+* 7d6716beded4a60cd9de24e95d8ec60694692b6f Fri Jan 29 23:27:36 2016 -0500 Jack Humbert
+* 65b41e2e59e274354e57ed36cad097823f111f1a Sun Feb 7 11:48:28 2016 +0100 Wojciech Siewierski
+* 47dcec29456106828b83fe5b85fa7a7427ddc710 Sun Jan 3 17:49:28 2016 -0500 Chris Gerber
+* 1d13aa933bbb57bf0c1fe0196981b81233c3df97 Mon Mar 28 19:45:20 2016 -0500 IBNobody
+* 3755ef5ddbdad9f25a53fee951c3eb78035b52c3 Wed Apr 13 20:57:51 2016 -0500 IBNobody
+* ee2ee7f4f049dda385a9db7dddd8e7e91681315b Fri Apr 15 13:44:07 2016 -0400 Jack Humbert
+* 9cfc74c35b940884618b0fe1e6fd25c570e1c974 Thu Apr 7 15:21:06 2016 +0300 Erez Zukerman
+* ab19ebd08a8b955775e6fa94cdf6b8d128d8b43c Sat Apr 16 18:51:58 2016 -0400 Jack Humbert
+* c83aa16f1d614c1c10f7597a67ffb9f2ae871951 Sat Apr 16 20:26:02 2016 -0400 Jack Humbert
+* 41cc35425ab32c9a9492006da8b667d01d32dfa6 Sat Apr 16 21:31:40 2016 -0400 Jack Humbert
+* 8bbd064cf52a76508589579f19595607a1f3af21 Sat Apr 16 23:07:50 2016 -0400 Jack Humbert
+* 45f10b4c4b308226fa1568277654a13853a03ab4 Sat Apr 16 22:10:18 2016 -0500 IBNobody
+* e7b9959819e709d7df2e96a94bdaf36e4e9e23e3 Sat Apr 16 23:15:40 2016 -0400 Jack Humbert
+* a67d425f4d5278595e7ab785a0f246b83fb1a09f Sun Apr 17 01:00:39 2016 -0400 Jack Humbert
+* d5b72e7bde5ede25f7d5699b50b7d9eb6f31ba92 Sun Apr 17 12:54:32 2016 -0500 IBNobody
+* 3103ea542f0039637a1a266df79a97a7a13fa6b4 Sun Apr 17 12:55:19 2016 -0500 IBNobody
+* 23231fa577f7c6c585124226a83f21a7668e62dd Sun Apr 17 14:16:03 2016 -0500 IBNobody
+* 5c98ad59606ee95b82c27bf2525383a9ec88542b Sun Apr 17 20:14:37 2016 -0500 IBNobody
+* e49712b5593b887c8af18aeb7196513f1c7b7bcf Mon Apr 18 21:01:48 2016 -0400 Jack Humbert
+* 620ac4b260fa663d12b11a0b15ac50379523c125 Thu Apr 21 19:35:18 2016 -0700 Eric Tang
+* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
+* 41b3e399b1d43db9574c6016951d92974b3d93e7 Thu May 5 21:50:51 2016 -0400 Jack Humbert
+* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman
+* fde477a927edc6b4207a6968d44aeed021e8b300 Sun May 15 00:51:06 2016 -0400 Jack Humbert
+* b732b79b49b098dba8e14493c745075f336747d8 Wed May 18 23:47:16 2016 -0400 Jack Humbert
+* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo
+* 9870082a06386eba8c0c5f22da90d0256ef6244b Thu Jul 7 19:48:39 2016 +0300 Fred Sundvik
+* 8b94e26d7c3b30cc57d710a11e5651d15e8e3b20 Sun Jul 24 22:07:43 2016 -0400 Jack Humbert
+* d8a608f3ff4cb4d73cd57be500fd9881e230099d Thu Dec 29 18:28:48 2016 +1100 Wilba6582
+
+## quantum/light_ws2812.c 
+
+* ba9ac457b2159097ecfd9848c5171c52e3a68260 Sun Jan 24 17:05:47 2016 -0800 Yang Liu
+* 57e08eb8badc5db2fb44d2df684f32ea48cce411 Thu Jul 7 11:33:32 2016 -0400 Jack Humbert
+* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert
+* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert
+* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert
+* 530dd3377e4d409a7ca2fee7e47b60b735ebc0fa Tue Nov 15 13:18:10 2016 -0500 Jack Humbert
+* 3774a7fcdab5544fc787f4c200be05fcd417e31f Thu Nov 17 17:42:14 2016 -0500 Jack Humbert
+
+## quantum/light_ws2812.h 
+
+* ba9ac457b2159097ecfd9848c5171c52e3a68260 Sun Jan 24 17:05:47 2016 -0800 Yang Liu
+* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert
+* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert
+* 664c0a036b3d7c3ed39f4a7a78d97f4a9cc7d20c Mon Nov 21 19:50:55 2016 -0500 Jack Humbert
+* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert
+
+## quantum/matrix.c 
+
+* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
+* 35a81f5b8b081e1607a7c04489b01f551c3213cc Mon Oct 26 16:32:37 2015 -0400 Jack Humbert
+* 641859df84bf40025b2c14319d1a168a435562e2 Thu Mar 10 11:28:34 2016 -0500 yoyoerx
+* 684793360cdb08ac1e50a6d27e1796fadd527adb Mon May 9 00:36:23 2016 -0400 Jack Humbert
+* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman
+* aaa758f1d3f97dda39879f2b055ad2da9680adfe Mon May 23 20:42:21 2016 -0700 Eric Tang
+* 1ae6011cef2230826a9e6db6c5b638677bc640b7 Tue May 24 08:44:40 2016 -0700 Eric Tang
+* de57799530d3184722532f93d156364067d8fcd5 Sat May 28 11:56:06 2016 -0400 Jack Humbert
+* 008c8d54a0a1a1e908d372d0fe9edb45a2d491e5 Fri Jun 17 22:09:59 2016 -0400 Jack Humbert
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+* 215c2119af5281072d5a6efb0308408793cadd08 Wed Jun 29 16:21:41 2016 -0400 Jack Humbert
+* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo
+* 8e88d55bfd7c88cb15845e0c6415e4e892532861 Mon Jul 4 11:45:58 2016 -0400 Jack Humbert
+* 3577e26fd9916ceab58779ec6323d43da54eb3b5 Wed Jul 6 00:24:31 2016 -0400 Jack Humbert
+* 17170ba76d3c94edcf1ab263520238fdb0384774 Sun Oct 23 23:00:43 2016 -0500 IBNobody
+* 508eddf8ba8548d3f71e1c09a404839beb49f45c Fri Oct 28 14:21:38 2016 -0500 IBNobody
+* 4c6960835c0a6e29670dabdc27117d7d3c7f99f5 Fri Oct 28 16:24:20 2016 -0500 IBNobody
+* 32f88c07173b795c6981c779057dceba00aeb1cb Sat Oct 29 10:39:03 2016 -0500 IBNobody
+* f4030289744fc6dc82dd85c955070c0845813cc5 Sat Oct 29 16:12:58 2016 -0500 IBNobody
+* a06115df19a74d39b08758472b221e630c3680d3 Fri Nov 18 23:20:07 2016 -0500 Jack Humbert
+
+## quantum/pincontrol.h 
+
+* 8485bb34d2e291db5b6c81f892850da1cdca37ba Sun Nov 27 22:43:11 2016 -0800 Wez Furlong
+
+## quantum/quantum.c 
+
+* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman
+* 15719f3574c6274ee0f3ec87431927c5a523aa3e Sun May 15 00:40:59 2016 -0400 Jack Humbert
+* bf5c2ccee5497523c214dae7aacdc27fdbb0f235 Sun May 15 00:47:25 2016 -0400 Jack Humbert
+* fde477a927edc6b4207a6968d44aeed021e8b300 Sun May 15 00:51:06 2016 -0400 Jack Humbert
+* 0428214b905e5f8b3bed721885957ce249ba4991 Wed May 18 23:14:00 2016 -0400 Jack Humbert
+* b732b79b49b098dba8e14493c745075f336747d8 Wed May 18 23:47:16 2016 -0400 Jack Humbert
+* 0275d444d77c9d85d2189b09d8813fb76dc4d566 Thu May 19 15:36:28 2016 +0300 purpleP
+* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert
+* 1237025963484d70bbe5185a790bec6544653ccc Tue May 24 23:27:59 2016 -0400 Erez Zukerman
+* 8bc69afc633d3e199e3ac0a5bf39e4d255f2ce4a Tue May 24 23:48:46 2016 -0400 Erez Zukerman
+* 17977a7e24ddab6ca101341b33c8fe7ad13e68f5 Sat May 28 15:22:30 2016 -0400 Jack Humbert
+* 1c9f33c06a6ef18c9c21e5841180af5ae554c34b Wed Jun 1 22:49:55 2016 -0400 Jack Humbert
+* 4635b4453335b61df11008fa907eef221db5912b Wed Jun 1 23:00:55 2016 -0400 Jack Humbert
+* 794aed37a0da5a277a07e7fa86263e0852fa9f6d Fri Jun 3 12:48:40 2016 -0700 Eric Tang
+* b70248fa2144d297504eedbc80a76dfdc40d9f1f Fri Jun 17 21:42:59 2016 -0400 Jack Humbert
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 76076db72545bbb649f11394a12721f61579527f Mon Jun 20 22:36:36 2016 -0400 Jack & Erez
+* 98f0807359cfa78d25442b91ff4c5bbfc5679661 Tue Jun 21 22:55:54 2016 -0400 Jack Humbert
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+* b68b722325e1f0f68387e161365fa8e31c79b7b2 Thu Jun 23 23:14:21 2016 -0400 Jack Humbert
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+* 197f152dee834a737cd820f2a95d1ade98be4898 Wed Jun 29 18:29:20 2016 -0400 Jack Humbert
+* 60fd885a6e540509baa2193932e15caeaeb8f4c5 Wed Jun 29 18:35:29 2016 -0400 Jack Humbert
+* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo
+* 1412076df68ac00f9a00173977d2826603c12ddf Mon Jul 4 19:56:08 2016 -0700 Smilliam
+* 6b0c9cc905c0985f96a80306cf5fe0d6724b28fc Mon Jul 4 19:58:26 2016 -0700 Smilliam
+* a4bf46f9b1d0a0be0cecb2cd0f0d941aa7c71bd3 Wed Jul 6 22:48:19 2016 -0400 Jack Humbert
+* 50c686587ed49d8079ba1b11d45ceb6a55d6cd4b Thu Jul 7 23:34:33 2016 -0400 TerryMathews
+* f7a86822266603b8ffd21e9f89ec1de8d4950791 Fri Jul 8 03:32:28 2016 -0400 TerryMathews
+* b12fe6abb25db1feca6a7649097a8d1cb67a063f Sun Jul 10 19:04:01 2016 -0700 Smilliam
+* a998a48673372e409991066d7d2d9ba282f79d59 Mon Jul 11 09:14:43 2016 -0400 Jack Humbert
+* a28a6e5b79c819e5f9323f62686498eca3ef399f Wed Jul 13 16:38:02 2016 +0200 Pavlos Vinieratos
+* 857aa5bef6a74f8785a7039feea5286c07bf7067 Sat Aug 13 11:14:42 2016 +0200 Gergely Nagy
+* 644c8c79271db8cf1bd934b9a80a0215585e46e7 Thu Aug 18 01:34:05 2016 +0200 Wojciech Siewierski
+* 0d28787c5cf2173d12f57b397515f91cffaa820a Thu Aug 18 11:29:53 2016 +0200 Gergely Nagy
+* e571d4656cd283ce8d793fe3dd2ac176b84b0bf5 Tue Sep 6 18:02:43 2016 -0500 IBNobody
+* 558f3ec1eb325caf706efc15e2fab26121aba442 Tue Sep 6 23:19:01 2016 -0500 IBNobody
+* 5b2e455d3b71bfb90754930d1f22d3e8ce98b927 Mon Oct 10 00:46:20 2016 +0700 Priyadi Iman Nurcahyo
+* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert
+* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert
+* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert
+* ffa5b1e7ea6697acf9ebfcade1149031642f7870 Sat Nov 19 11:32:09 2016 +0100 Gergely Nagy
+* 74a1f00713d1407fb1d2e20d58da93919ab0c221 Sat Nov 19 18:19:18 2016 +0100 Gergely Nagy
+* 664c0a036b3d7c3ed39f4a7a78d97f4a9cc7d20c Mon Nov 21 19:50:55 2016 -0500 Jack Humbert
+* 450a8fb5b61de8166fe21eb4f57e1c00514afe32 Mon Nov 21 20:17:45 2016 -0500 Jack Humbert
+* cefa8468fb5f28bd67a0c02d371a4aef0964e20c Wed Nov 23 20:16:38 2016 -0500 Jack Humbert
+* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert
+* 01038ab54ca6c2858ea9e856c717a1129ffe4156 Fri Dec 23 21:51:11 2016 +0200 Ofer Plesser
+
+## quantum/quantum.h 
+
+* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman
+* fde477a927edc6b4207a6968d44aeed021e8b300 Sun May 15 00:51:06 2016 -0400 Jack Humbert
+* 0428214b905e5f8b3bed721885957ce249ba4991 Wed May 18 23:14:00 2016 -0400 Jack Humbert
+* b732b79b49b098dba8e14493c745075f336747d8 Wed May 18 23:47:16 2016 -0400 Jack Humbert
+* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert
+* de57799530d3184722532f93d156364067d8fcd5 Sat May 28 11:56:06 2016 -0400 Jack Humbert
+* 17977a7e24ddab6ca101341b33c8fe7ad13e68f5 Sat May 28 15:22:30 2016 -0400 Jack Humbert
+* 1c9f33c06a6ef18c9c21e5841180af5ae554c34b Wed Jun 1 22:49:55 2016 -0400 Jack Humbert
+* 794aed37a0da5a277a07e7fa86263e0852fa9f6d Fri Jun 3 12:48:40 2016 -0700 Eric Tang
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 98f0807359cfa78d25442b91ff4c5bbfc5679661 Tue Jun 21 22:55:54 2016 -0400 Jack Humbert
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+* 197f152dee834a737cd820f2a95d1ade98be4898 Wed Jun 29 18:29:20 2016 -0400 Jack Humbert
+* 8125cdb88ce1201fcfd16ed4c5313222ef4c230c Wed Jun 29 18:36:52 2016 -0400 Jack Humbert
+* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo
+* a28a6e5b79c819e5f9323f62686498eca3ef399f Wed Jul 13 16:38:02 2016 +0200 Pavlos Vinieratos
+* e01b4c3fd9a7b66276ffd22dcac25d569d7bb7ff Sat Jul 9 00:41:15 2016 +0300 Fred Sundvik
+* 0d28787c5cf2173d12f57b397515f91cffaa820a Thu Aug 18 11:29:53 2016 +0200 Gergely Nagy
+* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert
+* 664c0a036b3d7c3ed39f4a7a78d97f4a9cc7d20c Mon Nov 21 19:50:55 2016 -0500 Jack Humbert
+* cefa8468fb5f28bd67a0c02d371a4aef0964e20c Wed Nov 23 20:16:38 2016 -0500 Jack Humbert
+* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert
+
+## quantum/quantum_keycodes.h 
+
+* d8a608f3ff4cb4d73cd57be500fd9881e230099d Thu Dec 29 18:28:48 2016 +1100 Wilba6582
+* 8459bb97c1e8bcb9ccce55a1ed849d373bd7706c Wed Jan 11 21:57:41 2017 -0500 Erez Zukerman
+* 3717cf5864d6505e406b5eb75f315e6dc2392912 Thu Jan 12 07:38:07 2017 -0500 Erez Zukerman
+* 7288e5ab9c005a7b035d91e68358aa2b6a12420c Fri Jan 13 14:04:51 2017 -0500 Jack Humbert
+
+## quantum/rgblight.c 
+
+* ba9ac457b2159097ecfd9848c5171c52e3a68260 Sun Jan 24 17:05:47 2016 -0800 Yang Liu
+* 2647c7cd84820a833b85e41ea86caf76b36e6ee1 Sun Jan 24 17:19:33 2016 -0800 Yang Liu
+* 97f8f378761506914b69d4fd2d5661bfcae28295 Sun Apr 10 21:16:49 2016 -0700 skullY
+* 620ac4b260fa663d12b11a0b15ac50379523c125 Thu Apr 21 19:35:18 2016 -0700 Eric Tang
+* c37d52d2137acf5739c481cc0c8917ad6fd77161 Tue Apr 26 13:48:36 2016 -0400 Jack Humbert
+* e024c11f7a849a38e478cda9fb9939a838cfa2e0 Tue Apr 26 13:50:04 2016 -0400 Jack Humbert
+* 80c87054193b9243670aeb85adefbe1aa6c0fda0 Tue Jun 21 12:53:21 2016 -0400 Jack Humbert
+* 57e08eb8badc5db2fb44d2df684f32ea48cce411 Thu Jul 7 11:33:32 2016 -0400 Jack Humbert
+* 3a860c4bc210857f03ef9fae5043d6d5736d140d Tue Jul 26 14:43:45 2016 -0500 Jordi Orlando
+* 899c88cd8bf024792760fcf3ee8be6fed13fb315 Tue Jul 26 14:46:30 2016 -0500 Jordi Orlando
+* ea2d2f5d5841791745c93ef27cd1528a7fd69c97 Tue Jul 26 15:31:22 2016 -0500 Jordi Orlando
+* b8679bbe045a2285d6ab6bbc420121b26f516b9a Wed Oct 5 20:41:33 2016 -0400 Jack Humbert
+* 9b0e21f87f446935f29254bb623c2cfe29472b6e Sun Oct 9 19:26:16 2016 +0300 Fred Sundvik
+* 92a3a96849aee708753a6623b0db228023e3baf8 Sun Oct 9 19:47:05 2016 +0300 Fred Sundvik
+* ffae9d84c5279b463da112ee15568d536649b819 Sun Oct 9 19:53:41 2016 +0300 Fred Sundvik
+* 03b6fcdaf034392e27752a9bd2c11de06a166e39 Mon Oct 10 00:20:24 2016 -0400 Jack Humbert
+* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert
+* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert
+* 3774a7fcdab5544fc787f4c200be05fcd417e31f Thu Nov 17 17:42:14 2016 -0500 Jack Humbert
+* 285c5a91f23e972d9c579184283443111186329d Thu Nov 17 20:56:36 2016 -0500 Erez Zukerman
+* 2e23689b8e3222982082c1f5a4f8ce7686f9658b Wed Nov 23 18:52:02 2016 -0500 Jack Humbert
+* 4094544d41450617bc21ab58646603b8964eae0e Tue Nov 29 09:23:16 2016 -0500 Erez Zukerman
+* cae269b08b642b07ee06dec7120a784a3c3d7aab Fri Dec 23 10:29:19 2016 -0500 Jack Humbert
+* 748181dccddb8c9fa52a776f4fcd904ddca9aa31 Wed Dec 28 16:29:02 2016 -0500 Scott Wilson
+* b8e74c378b1f118178edf0634d9fa7f0f9dd5e08 Thu Dec 29 09:32:02 2016 -0500 Scott Wilson
+
+## quantum/rgblight.h 
+
+* ba9ac457b2159097ecfd9848c5171c52e3a68260 Sun Jan 24 17:05:47 2016 -0800 Yang Liu
+* 2647c7cd84820a833b85e41ea86caf76b36e6ee1 Sun Jan 24 17:19:33 2016 -0800 Yang Liu
+* 620ac4b260fa663d12b11a0b15ac50379523c125 Thu Apr 21 19:35:18 2016 -0700 Eric Tang
+* 80c87054193b9243670aeb85adefbe1aa6c0fda0 Tue Jun 21 12:53:21 2016 -0400 Jack Humbert
+* 57e08eb8badc5db2fb44d2df684f32ea48cce411 Thu Jul 7 11:33:32 2016 -0400 Jack Humbert
+* b8679bbe045a2285d6ab6bbc420121b26f516b9a Wed Oct 5 20:41:33 2016 -0400 Jack Humbert
+* 9b0e21f87f446935f29254bb623c2cfe29472b6e Sun Oct 9 19:26:16 2016 +0300 Fred Sundvik
+* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert
+* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert
+* 3774a7fcdab5544fc787f4c200be05fcd417e31f Thu Nov 17 17:42:14 2016 -0500 Jack Humbert
+* 285c5a91f23e972d9c579184283443111186329d Thu Nov 17 20:56:36 2016 -0500 Erez Zukerman
+* 2e23689b8e3222982082c1f5a4f8ce7686f9658b Wed Nov 23 18:52:02 2016 -0500 Jack Humbert
+* 4094544d41450617bc21ab58646603b8964eae0e Tue Nov 29 09:23:16 2016 -0500 Erez Zukerman
+* cae269b08b642b07ee06dec7120a784a3c3d7aab Fri Dec 23 10:29:19 2016 -0500 Jack Humbert
+* 748181dccddb8c9fa52a776f4fcd904ddca9aa31 Wed Dec 28 16:29:02 2016 -0500 Scott Wilson
+
+## quantum/variable_trace.c 
+
+* f519b94be7086852f2afe4ec248786b47968f7ff Sun Nov 6 21:57:26 2016 +0200 Fred Sundvik
+* a377017c95b826d83ac7a46ef176d39a58294b44 Sun Nov 6 22:11:24 2016 +0200 Fred Sundvik
+
+## quantum/variable_trace.h 
+
+* a377017c95b826d83ac7a46ef176d39a58294b44 Sun Nov 6 22:11:24 2016 +0200 Fred Sundvik
+* 0ba3e523a7c124e4ce54dfd043dc32e72ad3233b Sun Nov 6 22:44:43 2016 +0200 Fred Sundvik
+
+## quantum/version.h 
+
+* None None None
+
+## quantum/api/api_sysex.c 
+
+* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert
+* dd685eceb2045371d38f24d454f1ab08ca7416f4 Thu Dec 29 12:13:30 2016 +0200 Fred Sundvik
+
+## quantum/api/api_sysex.h 
+
+* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert
+
+## quantum/audio/audio.c 
+
+* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
+* 620ac4b260fa663d12b11a0b15ac50379523c125 Thu Apr 21 19:35:18 2016 -0700 Eric Tang
+* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
+* 3f02637f4dd765803671c2611191beb096d60b36 Mon May 9 13:17:15 2016 -0400 Jack Humbert
+* 15719f3574c6274ee0f3ec87431927c5a523aa3e Sun May 15 00:40:59 2016 -0400 Jack Humbert
+* 0428214b905e5f8b3bed721885957ce249ba4991 Wed May 18 23:14:00 2016 -0400 Jack Humbert
+* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert
+
+## quantum/audio/audio.h 
+
+* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
+* 082a0f313d8c842a5de7bae30ec8a3597e35880b Fri Apr 22 00:01:38 2016 -0500 IBNobody
+* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
+* 3f02637f4dd765803671c2611191beb096d60b36 Mon May 9 13:17:15 2016 -0400 Jack Humbert
+* 15719f3574c6274ee0f3ec87431927c5a523aa3e Sun May 15 00:40:59 2016 -0400 Jack Humbert
+* 0428214b905e5f8b3bed721885957ce249ba4991 Wed May 18 23:14:00 2016 -0400 Jack Humbert
+* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert
+* 215c2119af5281072d5a6efb0308408793cadd08 Wed Jun 29 16:21:41 2016 -0400 Jack Humbert
+
+## quantum/audio/audio_pwm.c 
+
+* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+
+## quantum/audio/luts.c 
+
+* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
+
+## quantum/audio/luts.h 
+
+* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
+
+## quantum/audio/musical_notes.h 
+
+* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
+
+## quantum/audio/song_list.h 
+
+* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
+* 7d0345ef25b5e1924f1e98c76d78607778e0b17d Sat Jul 30 01:52:33 2016 -0700 JeeBak Kim
+
+## quantum/audio/voices.c 
+
+* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
+* e89b806b850ad1b5484176664288b71b0131683e Thu Apr 21 00:40:00 2016 -0400 Jack Humbert
+* 9828aba2a12f03fccbc1095bc8e4918ae58fa31b Thu Apr 21 18:14:25 2016 -0400 Jack Humbert
+* 7b3f212500210ae85063b043952b5b3ef6988ad6 Thu Apr 21 23:10:47 2016 -0400 Jack Humbert
+* 082a0f313d8c842a5de7bae30ec8a3597e35880b Fri Apr 22 00:01:38 2016 -0500 IBNobody
+* b1900c8dde2a68e87aaabd84280a99bf6658ea9f Fri Apr 22 01:02:50 2016 -0400 Jack Humbert
+* a8086126fecbdce1c192036cf1011329d406949d Fri Apr 22 01:04:13 2016 -0400 Jack Humbert
+* a718c53fe77f0b3b4361c850531eee5f23e3e13d Fri Apr 22 11:58:29 2016 -0400 Jack Humbert
+* e7b6bb641c0636c01e3781fe51865fdb20014eeb Mon Apr 25 00:59:47 2016 -0400 Jack Humbert
+* 140b97a1cd226432a8ec647004943698e3d87f0b Tue Apr 26 01:16:47 2016 -0400 Jack Humbert
+* 66e0323881a5a3da65e14daeec41a1e9cfbda431 Fri Apr 29 12:42:55 2016 -0400 Jack Humbert
+* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
+* 0edfe55bfe4afd037918ff73e49552a28f39a5ca Mon Dec 12 15:39:07 2016 -0500 Jack Humbert
+* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert
+* 438a5d685bb7b726ff59109ce4229eca6303cd8e Tue Dec 20 19:38:22 2016 -0500 Jack Humbert
+* 2fa36e38cf28f07ad4a4d74722486921fa7b8706 Wed Dec 21 00:22:32 2016 -0500 Jack Humbert
+
+## quantum/audio/voices.h 
+
+* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
+* e89b806b850ad1b5484176664288b71b0131683e Thu Apr 21 00:40:00 2016 -0400 Jack Humbert
+* 9828aba2a12f03fccbc1095bc8e4918ae58fa31b Thu Apr 21 18:14:25 2016 -0400 Jack Humbert
+* 7b3f212500210ae85063b043952b5b3ef6988ad6 Thu Apr 21 23:10:47 2016 -0400 Jack Humbert
+* 082a0f313d8c842a5de7bae30ec8a3597e35880b Fri Apr 22 00:01:38 2016 -0500 IBNobody
+* b1900c8dde2a68e87aaabd84280a99bf6658ea9f Fri Apr 22 01:02:50 2016 -0400 Jack Humbert
+* a8086126fecbdce1c192036cf1011329d406949d Fri Apr 22 01:04:13 2016 -0400 Jack Humbert
+* a718c53fe77f0b3b4361c850531eee5f23e3e13d Fri Apr 22 11:58:29 2016 -0400 Jack Humbert
+* e7b6bb641c0636c01e3781fe51865fdb20014eeb Mon Apr 25 00:59:47 2016 -0400 Jack Humbert
+* 140b97a1cd226432a8ec647004943698e3d87f0b Tue Apr 26 01:16:47 2016 -0400 Jack Humbert
+* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody
+* 0edfe55bfe4afd037918ff73e49552a28f39a5ca Mon Dec 12 15:39:07 2016 -0500 Jack Humbert
+* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert
+* 438a5d685bb7b726ff59109ce4229eca6303cd8e Tue Dec 20 19:38:22 2016 -0500 Jack Humbert
+
+## quantum/audio/wave.h 
+
+* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert
+
+## quantum/keymap_extras/keymap_bepo.h 
+
+* 7c33f8493fb4ecd664390232c8de856158f9fcae Sun Feb 7 19:29:49 2016 +0100 Didier Loiseau
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 7b4d30ee50aa534a973473c715924964991739f0 Sun Jul 24 10:57:49 2016 +0200 Vivien Alger
+
+## quantum/keymap_extras/keymap_br_abnt2.h 
+
+* 7aa31ad338325477199f752ac3e344a6ab9b27d0 Tue Nov 8 13:32:04 2016 -0200 Potiguar Faga
+
+## quantum/keymap_extras/keymap_canadian_multilingual.h 
+
+* a7cef2ca0a2322448d02008337013936b1d550ec Wed Feb 17 21:45:38 2016 +0100 Didier Loiseau
+* 7840e69bfaee1d67de273c235b532d6f20c905a9 Thu Feb 18 00:47:23 2016 +0100 Didier Loiseau
+* 911222892ecb1c01551e0abdfbe98ed1dbf82139 Fri Feb 26 00:55:39 2016 +0100 Didier Loiseau
+* 3a91ddb0745ae0f52007984793ea1b48abb2098c Tue Mar 1 22:59:38 2016 +0100 Didier Loiseau
+* aa5eb49edd993e2abe3adf814e030fcdda4a3596 Wed Mar 2 00:22:41 2016 +0100 Didier Loiseau
+* 1aeb59335f2fe67613df25308a630ca453975ac0 Sun Sep 11 02:19:55 2016 +0200 Didier Loiseau
+
+## quantum/keymap_extras/keymap_colemak.h 
+
+* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
+* 39915b1748cefd99f841fa03b7f6e7c20439fbcf Thu Oct 29 15:12:51 2015 -0400 Jack Humbert
+* 3c683aa9f23288ddada760fb49abcc5fa7324f5e Fri Feb 5 16:28:24 2016 +0200 Erez Zukerman
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+
+## quantum/keymap_extras/keymap_dvorak.h 
+
+* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
+* 233af3a41c69d456583bfcfd897233b9c117caa6 Mon Feb 22 13:06:26 2016 -0500 Keller-Laminar
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 4278d8861526ed285d9d00badcdc8c121454be60 Thu Jul 14 11:32:43 2016 -0500 Jonathan A. Kollasch
+* f0021c9cb9e30d47d5a3ab5ec75e59e626c3d244 Mon Sep 19 14:25:44 2016 -0500 Jonathan A. Kollasch
+
+## quantum/keymap_extras/keymap_dvp.h 
+
+* 6e003b1e3fa844cfde0069004e755aae7a9539f3 Wed Oct 19 23:45:55 2016 +0300 Artyom Mironov
+
+## quantum/keymap_extras/keymap_fr_ch.h 
+
+* 1934e8a270820ff6f08c95f4399b26162623e4e0 Sat Feb 20 14:01:28 2016 +0100 Vincent Pochet
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
+
+## quantum/keymap_extras/keymap_french.h 
+
+* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
+* 4a19cc054dc7aeb0a35613d608143bf51fa791cc Sat Feb 27 15:22:54 2016 +0100 Kévin Letord
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 010dd1308420e25b327fa4d5d6b13f67a849408b Thu Jul 14 11:04:25 2016 -0500 Jonathan A. Kollasch
+* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
+
+## quantum/keymap_extras/keymap_french_osx.h 
+
+* 48eff6dd89672c6c71afd8a3d1cdc5d35b0bf768 Tue Jan 5 10:49:36 2016 +0100 Sébastien Pérochon
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+
+## quantum/keymap_extras/keymap_german.h 
+
+* 3dbcad51d1217b32c3c17917c2646fa7a9a9165b Sat Dec 19 01:22:12 2015 +0100 Matthias Schmitt
+* da09312dd56e3b085fb217cc7cc2abf06f401992 Tue Jan 19 20:04:08 2016 +0100 plgruener
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
+
+## quantum/keymap_extras/keymap_german_ch.h 
+
+* 465aabe11dbd673fb4c68ecbffbfb062273def1a Wed May 18 21:22:04 2016 +0200 heartsekai
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
+
+## quantum/keymap_extras/keymap_german_osx.h 
+
+* e44c30f2030dd4c481a6e38e9392f147be7b0ae2 Fri Jan 15 15:55:00 2016 +0100 Stephan Bösebeck
+* bfc6eca44aeb3ad22a1c37206005dcfe617431cd Mon Mar 14 13:35:34 2016 +0100 Daniel Kriesten
+* dbd4ab3457dd001ab4bbcec14315047b815f7dfe Thu Mar 31 23:15:59 2016 +0200 Stephan Bösebeck
+* 6d40f7c5060f608068b0c4fc90871687c70b4f05 Sun Apr 17 22:19:47 2016 +0200 Stephan Bösebeck
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 1a0bac8bccf0e156d2f3c5f14a7214f9677b6370 Tue Jun 21 17:42:29 2016 -0400 Jack Humbert
+
+## quantum/keymap_extras/keymap_jp.h 
+
+* 2febf9b9f7d610fc2eca666a842272cb90a87919 Tue Nov 22 20:40:12 2016 +0900 h-youhei
+
+## quantum/keymap_extras/keymap_neo2.h 
+
+* 7b7870bae178c80138be5c587238fdedeb837df9 Sat Dec 19 01:41:23 2015 +0100 Matthias Schmitt
+* 4ca43225011ac94bd0a7976baf7f84059274dfbf Fri Feb 19 21:04:30 2016 +0100 plgruener
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* e329729d3a11b5798f4e2b9f65ac9bc2dcc84a9e Tue Jun 21 18:32:28 2016 -0400 Jack Humbert
+
+## quantum/keymap_extras/keymap_nordic.h 
+
+* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
+* c29ad125a7a58d5a2ced0a619165204136da9019 Fri Feb 5 01:50:54 2016 +0100 Fernando Mendonca
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
+* 283ebbe14298fe75128765fa42c46f02534fb761 Mon Jul 25 12:50:27 2016 +0200 Andreas Lindhé
+* 555e41d9e5f8d393637898e2c77c64066b648245 Fri Dec 2 13:03:51 2016 -0500 Erez Zukerman
+
+## quantum/keymap_extras/keymap_norwegian.h 
+
+* e329729d3a11b5798f4e2b9f65ac9bc2dcc84a9e Tue Jun 21 18:32:28 2016 -0400 Jack Humbert
+* b6fa762234fb5a3590d0ff91ffdf5aa3ae322c8f Mon Jul 25 11:29:54 2016 +0200 Andreas Lindhé
+
+## quantum/keymap_extras/keymap_plover.h 
+
+* 7ccfaf750d08bdb3a25ef2869cac251b7cd4d3ad Sat Apr 23 18:49:10 2016 +0100 James ‘Twey’ Kay
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+
+## quantum/keymap_extras/keymap_russian.h 
+
+* c5ee24a6c3ea39e9725dfc276c92d5bce726ca78 Sun Aug 7 11:01:12 2016 -0500 kuel
+* 2a0121a78643b1dc774d82352f8c9e246010803e Sun Aug 7 11:07:38 2016 -0500 kuel
+
+## quantum/keymap_extras/keymap_spanish.h 
+
+* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 132c04746910f7230b63ed33717c4ed65599ed1b Sat Jul 2 10:26:04 2016 +0200 Rubén Díaz-Jorge
+* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
+
+## quantum/keymap_extras/keymap_uk.h 
+
+* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 010dd1308420e25b327fa4d5d6b13f67a849408b Thu Jul 14 11:04:25 2016 -0500 Jonathan A. Kollasch
+* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch
+
+## quantum/keymap_extras/keymap_unicode_cyrillic.h 
+
+* c5ee24a6c3ea39e9725dfc276c92d5bce726ca78 Sun Aug 7 11:01:12 2016 -0500 kuel
+
+## quantum/process_keycode/process_chording.c 
+
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+
+## quantum/process_keycode/process_chording.h 
+
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+
+## quantum/process_keycode/process_leader.c 
+
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+
+## quantum/process_keycode/process_leader.h 
+
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+
+## quantum/process_keycode/process_midi.c 
+
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+* 8b94e26d7c3b30cc57d710a11e5651d15e8e3b20 Sun Jul 24 22:07:43 2016 -0400 Jack Humbert
+* 8d99140d1b80bf497b2198138d3f481e93b0fbab Thu Sep 29 14:46:10 2016 -0500 Adam Gausmann
+
+## quantum/process_keycode/process_midi.h 
+
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+
+## quantum/process_keycode/process_music.c 
+
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+* 3ea738e450e9326b0d3ee4192da881cffb4c13c1 Sun Jul 24 10:00:39 2016 -0400 Robert Dale
+* ae95834f5af7404c04e6fe3446019046278d814b Mon Dec 12 16:06:41 2016 -0500 Jack Humbert
+* 273faa4d9cd5a84207548f83ba550c9efee90933 Fri Dec 23 20:59:00 2016 -0500 Jack Humbert
+* 841d7e6a1d74b1fc45575ed551132ec27353ebf3 Mon Jan 23 13:55:24 2017 -0500 Jack Humbert
+
+## quantum/process_keycode/process_music.h 
+
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+
+## quantum/process_keycode/process_printer.c 
+
+* a889b899e2cf52b3b7807d8a7ad39f12e0761a10 Sun Oct 16 16:03:56 2016 -0400 Jack Humbert
+
+## quantum/process_keycode/process_printer.h 
+
+* a889b899e2cf52b3b7807d8a7ad39f12e0761a10 Sun Oct 16 16:03:56 2016 -0400 Jack Humbert
+
+## quantum/process_keycode/process_printer_bb.c 
+
+* a889b899e2cf52b3b7807d8a7ad39f12e0761a10 Sun Oct 16 16:03:56 2016 -0400 Jack Humbert
+
+## quantum/process_keycode/process_tap_dance.c 
+
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+* 1a7e954f9fc4d250ba1ae46e3bfc168aca2b5cce Wed Jul 13 00:20:28 2016 +0200 Pavlos Vinieratos
+* f3b56701ed7e6c622dc48e429780124ba5fde172 Wed Jul 13 16:47:45 2016 +0200 Pavlos Vinieratos
+* d3091faf363afc8fef73ddf4948f872439b0e827 Fri Jul 15 23:54:08 2016 +0200 Pavlos Vinieratos
+* dda2fd6ff3984ed96f8275c661b47a0484f9ee18 Mon Jul 18 23:34:02 2016 +0200 Pavlos Vinieratos
+* d5daec2a58019ebdb9804787e0f786e4fc3c05b9 Tue Jul 19 18:00:59 2016 +0200 Pavlos Vinieratos
+* 4e6a8627d8ebd7af942f68142d1a959d60361d90 Tue Jul 19 18:02:13 2016 +0200 Pavlos Vinieratos
+* 70e42489dec375e558d8e81ed5ebfb69b4f3dbd9 Wed Jul 20 10:22:52 2016 +0200 Gergely Nagy
+* ce8cc9219fca5dde077f1142d03d011b38d27479 Wed Jul 20 11:34:45 2016 +0200 Gergely Nagy
+* 44e16ffc80620b61eaa17aedcfdd8233d9c99bd9 Wed Jul 20 11:49:59 2016 +0200 Gergely Nagy
+* b21e8b97acb722bfa7b85831cfd010716ed77962 Wed Jul 27 08:42:09 2016 +0200 Gergely Nagy
+* d78058cc75a9b05a6885991506d5f807ebb2a9f9 Wed Aug 17 10:28:08 2016 +0200 Gergely Nagy
+* 29f64d7a93d941167c6c6e95f893ab84586b2205 Wed Aug 17 13:04:50 2016 +0200 Gergely Nagy
+* 0d28787c5cf2173d12f57b397515f91cffaa820a Thu Aug 18 11:29:53 2016 +0200 Gergely Nagy
+* acda2b793f69c6e0e9b9667e9ebe8a0325eb5ecd Thu Sep 1 08:32:47 2016 +0200 Gergely Nagy
+* e1f131db8e59c6ed3471906d3a62457d593f51af Wed Sep 21 10:11:42 2016 +0200 Pavlos Vinieratos
+
+## quantum/process_keycode/process_tap_dance.h 
+
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+* f3b56701ed7e6c622dc48e429780124ba5fde172 Wed Jul 13 16:47:45 2016 +0200 Pavlos Vinieratos
+* d3091faf363afc8fef73ddf4948f872439b0e827 Fri Jul 15 23:54:08 2016 +0200 Pavlos Vinieratos
+* 70e42489dec375e558d8e81ed5ebfb69b4f3dbd9 Wed Jul 20 10:22:52 2016 +0200 Gergely Nagy
+* ce8cc9219fca5dde077f1142d03d011b38d27479 Wed Jul 20 11:34:45 2016 +0200 Gergely Nagy
+* b21e8b97acb722bfa7b85831cfd010716ed77962 Wed Jul 27 08:42:09 2016 +0200 Gergely Nagy
+* 29f64d7a93d941167c6c6e95f893ab84586b2205 Wed Aug 17 13:04:50 2016 +0200 Gergely Nagy
+* 0edc82f0300924394324e2f3c4d2f8f0008439db Wed Sep 21 11:29:34 2016 +0200 Pavlos Vinieratos
+* cda4b534fa4921c2d8f9884aa6a144333e7b07c4 Wed Sep 21 11:29:43 2016 +0200 Pavlos Vinieratos
+
+## quantum/process_keycode/process_unicode.c 
+
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+* 8bdf745909bc2581491acce11225f56a85bc8f24 Sat Aug 13 10:33:47 2016 +0200 Gergely Nagy
+* 63e5782d2cdf0ee282ad434c773463d9da9db6b3 Sat Aug 13 10:43:22 2016 +0200 Gergely Nagy
+* fa06a163607e8c6c4bd0968c2de96a9a298b777c Sat Aug 13 10:46:38 2016 +0200 Gergely Nagy
+* 0b6861827faea747345ea38202d64c8004ab128c Sat Aug 13 11:11:22 2016 +0200 Gergely Nagy
+* 857aa5bef6a74f8785a7039feea5286c07bf7067 Sat Aug 13 11:14:42 2016 +0200 Gergely Nagy
+* 234dd276cf03be6fd6961473e9d9c8f35deec682 Sun Aug 14 10:37:51 2016 +0200 Gergely Nagy
+* a312cbf712764277e0dbbbb99410c2f6fc6c7484 Sun Aug 14 14:34:52 2016 +0200 Gergely Nagy
+* 43d08629cf275d0b32281ffe8785258fff226b49 Mon Aug 15 10:02:05 2016 +0200 Gergely Nagy
+* e8845f0daf8dc7a7674dc5420cc5a684bbbea09b Mon Aug 15 10:07:13 2016 +0200 Gergely Nagy
+* dffdeb50b79d3c623e2ed9fd1c1d82d6d0ae7bf0 Sun Aug 21 20:25:19 2016 +0200 coderkun
+* 81594c7883deefedbcd317c72c1b1f1d32e65cd7 Sun Aug 21 21:02:18 2016 +0200 coderkun
+* a058ae40e268b34ba5db45f5fd5d557d50fa5437 Wed Aug 24 15:39:23 2016 +0200 Gergely Nagy
+* c9ea236fc35d350c0ff33de0af84d3dee7d0eb95 Wed Aug 31 08:21:52 2016 +0200 Gergely Nagy
+* a3f5a4cf5839fe29dd37400d72c5e353812002f8 Sun Oct 2 10:35:09 2016 +0200 coderkun
+* 5b2e455d3b71bfb90754930d1f22d3e8ce98b927 Mon Oct 10 00:46:20 2016 +0700 Priyadi Iman Nurcahyo
+* e7d5dc89f2890007d776f6b613dc9deb473cff22 Sun Oct 23 05:36:26 2016 +0700 Priyadi Iman Nurcahyo
+* 4a666c201007eacf13a9031e3c9b156e2e04afe6 Sun Oct 23 19:15:33 2016 +0700 Priyadi Iman Nurcahyo
+* 8d60354d5a116b6cb1fc32eac7461eb125543c7d Wed Oct 26 00:48:44 2016 -0400 Jack Humbert
+* 30b80a23f3cafd846937b37b249f2df4411e1f5a Mon Jan 9 02:59:10 2017 +0700 Priyadi Iman Nurcahyo
+
+## quantum/process_keycode/process_unicode.h 
+
+* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert
+* 63e5782d2cdf0ee282ad434c773463d9da9db6b3 Sat Aug 13 10:43:22 2016 +0200 Gergely Nagy
+* fa06a163607e8c6c4bd0968c2de96a9a298b777c Sat Aug 13 10:46:38 2016 +0200 Gergely Nagy
+* 857aa5bef6a74f8785a7039feea5286c07bf7067 Sat Aug 13 11:14:42 2016 +0200 Gergely Nagy
+* 234dd276cf03be6fd6961473e9d9c8f35deec682 Sun Aug 14 10:37:51 2016 +0200 Gergely Nagy
+* a312cbf712764277e0dbbbb99410c2f6fc6c7484 Sun Aug 14 14:34:52 2016 +0200 Gergely Nagy
+* 43d08629cf275d0b32281ffe8785258fff226b49 Mon Aug 15 10:02:05 2016 +0200 Gergely Nagy
+* e8845f0daf8dc7a7674dc5420cc5a684bbbea09b Mon Aug 15 10:07:13 2016 +0200 Gergely Nagy
+* a058ae40e268b34ba5db45f5fd5d557d50fa5437 Wed Aug 24 15:39:23 2016 +0200 Gergely Nagy
+* c9ea236fc35d350c0ff33de0af84d3dee7d0eb95 Wed Aug 31 08:21:52 2016 +0200 Gergely Nagy
+* 5b2e455d3b71bfb90754930d1f22d3e8ce98b927 Mon Oct 10 00:46:20 2016 +0700 Priyadi Iman Nurcahyo
+* 4a666c201007eacf13a9031e3c9b156e2e04afe6 Sun Oct 23 19:15:33 2016 +0700 Priyadi Iman Nurcahyo
+* 6fee7e178f7c949213a124d78de60bc30267d367 Sat Nov 26 23:53:15 2016 +0700 Priyadi Iman Nurcahyo
+
+## quantum/serial_link/LICENSE 
+
+* 639cdd363e35c13fe331939d0972aa4db5f5198d Tue Jul 5 23:27:47 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/README.md 
+
+* 639cdd363e35c13fe331939d0972aa4db5f5198d Tue Jul 5 23:27:47 2016 +0300 Fred Sundvik
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/protocol/byte_stuffer.c 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+* 0a11460175d6a838c71343c19eb4ce4699936247 Wed Aug 24 22:23:17 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/protocol/byte_stuffer.h 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+* 0a11460175d6a838c71343c19eb4ce4699936247 Wed Aug 24 22:23:17 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/protocol/frame_router.c 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/protocol/frame_router.h 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/protocol/frame_validator.c 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/protocol/frame_validator.h 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/protocol/physical.h 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/protocol/transport.c 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+* bcdf9ab76bf3723e6015d4255d53e7c1e7259b61 Sat Aug 27 14:18:49 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/protocol/transport.h 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+* bcdf9ab76bf3723e6015d4255d53e7c1e7259b61 Sat Aug 27 14:18:49 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/protocol/triple_buffered_object.c 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/protocol/triple_buffered_object.h 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/system/serial_link.c 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/system/serial_link.h 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/tests/byte_stuffer_tests.cpp 
+
+* 0a11460175d6a838c71343c19eb4ce4699936247 Wed Aug 24 22:23:17 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/tests/frame_router_tests.cpp 
+
+* cdd0913bcc63334fa20f1a7bd46bdce4d4f2843b Sat Aug 27 13:43:46 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/tests/frame_validator_tests.cpp 
+
+* b3eba797af74ace19b9f2e762bdd33d9449e3f94 Sat Aug 27 13:54:16 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/tests/Makefile 
+
+* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/tests/rules.mk 
+
+* 0a11460175d6a838c71343c19eb4ce4699936247 Wed Aug 24 22:23:17 2016 +0300 Fred Sundvik
+* cdd0913bcc63334fa20f1a7bd46bdce4d4f2843b Sat Aug 27 13:43:46 2016 +0300 Fred Sundvik
+* b3eba797af74ace19b9f2e762bdd33d9449e3f94 Sat Aug 27 13:54:16 2016 +0300 Fred Sundvik
+* bcdf9ab76bf3723e6015d4255d53e7c1e7259b61 Sat Aug 27 14:18:49 2016 +0300 Fred Sundvik
+* ffb0a126f5b2484eda7f6b1c62ea61924eec6521 Sat Aug 27 14:25:52 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/tests/testlist.mk 
+
+* 6d7cd639a5e4503f00162c7cfa4bc7302b82c71c Sun Aug 21 16:29:54 2016 +0300 Fred Sundvik
+* ffb0a126f5b2484eda7f6b1c62ea61924eec6521 Sat Aug 27 14:25:52 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/tests/transport_tests.cpp 
+
+* bcdf9ab76bf3723e6015d4255d53e7c1e7259b61 Sat Aug 27 14:18:49 2016 +0300 Fred Sundvik
+
+## quantum/serial_link/tests/triple_buffered_object_tests.cpp 
+
+* ffb0a126f5b2484eda7f6b1c62ea61924eec6521 Sat Aug 27 14:25:52 2016 +0300 Fred Sundvik
+
+## quantum/template/config.h 
+
+* 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b Tue Oct 27 14:33:18 2015 -0400 Jack Humbert
+* 24f2698fba0055128eb90fbde793e3c84900df69 Sat Jan 23 20:45:52 2016 -0500 Jack Humbert
+* 577971ab07a49405e1dcd8e5f75b3ecb87e710b9 Mon Mar 28 00:03:21 2016 -0500 IBNobody
+* 1d13aa933bbb57bf0c1fe0196981b81233c3df97 Mon Mar 28 19:45:20 2016 -0500 IBNobody
+* aaa758f1d3f97dda39879f2b055ad2da9680adfe Mon May 23 20:42:21 2016 -0700 Eric Tang
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+
+## quantum/template/Makefile 
+
+* 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b Tue Oct 27 14:33:18 2015 -0400 Jack Humbert
+* 6485c7d7dae01c499a7e1f27e7956f12ce0f6901 Thu Nov 5 12:07:03 2015 -0500 Jack Humbert
+* 24f2698fba0055128eb90fbde793e3c84900df69 Sat Jan 23 20:45:52 2016 -0500 Jack Humbert
+* 577971ab07a49405e1dcd8e5f75b3ecb87e710b9 Mon Mar 28 00:03:21 2016 -0500 IBNobody
+* 0656f2fa10e25e160617c3e5d14cfbae35dd9c8d Fri Apr 29 22:19:40 2016 -0400 Jack Humbert
+* 38987d4c1589d2d457459f42e179be24b712be30 Sat May 28 12:05:17 2016 -0400 Jack Humbert
+* d9e4dad0a828a8a904f44dda090a4d6d08fe2948 Sat Jun 11 13:31:31 2016 -0400 Jack Humbert
+* a8375fa15a6ca9285eb15ae89bcda898349e06f8 Tue Jun 21 10:21:43 2016 -0400 Jack Humbert
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+* ab4d7adbb96fa034fd20364247d615f527661594 Fri Aug 19 09:06:28 2016 +0300 Fred Sundvik
+
+## quantum/template/readme.md 
+
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+* 1f5838a28679975f689e35471a35720ed5c7e7c5 Sat Aug 27 23:29:37 2016 +0300 Fred Sundvik
+
+## quantum/template/rules.mk 
+
+* ab4d7adbb96fa034fd20364247d615f527661594 Fri Aug 19 09:06:28 2016 +0300 Fred Sundvik
+
+## quantum/template/template.c 
+
+* 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b Tue Oct 27 14:33:18 2015 -0400 Jack Humbert
+* 641859df84bf40025b2c14319d1a168a435562e2 Thu Mar 10 11:28:34 2016 -0500 yoyoerx
+* eba9a7d74db0be548cddc107f0370dabf43b017f Tue Mar 15 23:52:51 2016 -0500 IBNobody
+* ec62d9e85cab5cf166241b0536120d005fa7c898 Tue Mar 22 20:39:05 2016 -0500 IBNobody
+* 3d56ec052ed485d4b717da930c4024b4a3f792e0 Tue Mar 22 21:06:22 2016 -0500 IBNobody
+* 2181be029e01d9cf46ae3cadcdf25f5bca02c631 Mon Mar 28 16:13:37 2016 +0200 Damien Pollet
+* 0656f2fa10e25e160617c3e5d14cfbae35dd9c8d Fri Apr 29 22:19:40 2016 -0400 Jack Humbert
+* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+* 589df84d6cd19ad7d776cc19bcddade1cd178ddc Thu Jul 7 09:58:44 2016 -0400 Jack Humbert
+* c1dfb636ef61159456bdb24f4fee3f27e5babbeb Thu Jul 7 12:22:10 2016 -0400 Jack Humbert
+
+## quantum/template/template.h 
+
+* 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b Tue Oct 27 14:33:18 2015 -0400 Jack Humbert
+* 24f2698fba0055128eb90fbde793e3c84900df69 Sat Jan 23 20:45:52 2016 -0500 Jack Humbert
+* ee1b94045e5bebda517119cb1853b0ab3fd0f499 Fri Mar 4 10:53:58 2016 -0500 Noah Andrews
+* 641859df84bf40025b2c14319d1a168a435562e2 Thu Mar 10 11:28:34 2016 -0500 yoyoerx
+* eba9a7d74db0be548cddc107f0370dabf43b017f Tue Mar 15 23:52:51 2016 -0500 IBNobody
+* ec62d9e85cab5cf166241b0536120d005fa7c898 Tue Mar 22 20:39:05 2016 -0500 IBNobody
+* 2181be029e01d9cf46ae3cadcdf25f5bca02c631 Mon Mar 28 16:13:37 2016 +0200 Damien Pollet
+* 0656f2fa10e25e160617c3e5d14cfbae35dd9c8d Fri Apr 29 22:19:40 2016 -0400 Jack Humbert
+* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman
+* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+
+## quantum/template/keymaps/default/config.h 
+
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+
+## quantum/template/keymaps/default/keymap.c 
+
+* d9e4dad0a828a8a904f44dda090a4d6d08fe2948 Sat Jun 11 13:31:31 2016 -0400 Jack Humbert
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+
+## quantum/template/keymaps/default/Makefile 
+
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+
+## quantum/template/keymaps/default/readme.md 
+
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+
+## quantum/tools/eeprom_reset.hex 
+
+* 0b0ec82427aff54481103559066213056b6d7598 Sat Apr 16 00:01:22 2016 -0400 Jack Humbert
+
+## quantum/tools/readme.md 
+
+* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert
+
+## quantum/visualizer/lcd_backlight.c 
+
+* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
+
+## quantum/visualizer/lcd_backlight.h 
+
+* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
+
+## quantum/visualizer/led_test.c 
+
+* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik
+* 07d0d5cbe48d7afaf0bc8c9916d40179ec51cb42 Thu Jul 7 12:46:10 2016 +0300 Fred Sundvik
+
+## quantum/visualizer/led_test.h 
+
+* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik
+
+## quantum/visualizer/LICENSE.md 
+
+* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
+
+## quantum/visualizer/readme.md 
+
+* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
+
+## quantum/visualizer/visualizer.c 
+
+* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
+* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik
+* 70797bb8f21c72cba15b314b2d0a6684bfedc369 Thu Jul 7 00:20:20 2016 +0300 Fred Sundvik
+* 7229751ba9d402b2a6c9dc1b7b29385b5162fe41 Thu Jul 7 14:01:20 2016 +0300 Fred Sundvik
+* dae7c9bfb3325412c542fbbe4342c9c8e0fc1904 Thu Jul 7 14:12:56 2016 +0300 Fred Sundvik
+* 9eb8d05246fba4f46c04b8fa1884b8f2d2ee0664 Tue Jan 17 21:47:07 2017 -0500 SjB
+
+## quantum/visualizer/visualizer.h 
+
+* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
+* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik
+* 70797bb8f21c72cba15b314b2d0a6684bfedc369 Thu Jul 7 00:20:20 2016 +0300 Fred Sundvik
+* 9eb8d05246fba4f46c04b8fa1884b8f2d2ee0664 Tue Jan 17 21:47:07 2017 -0500 SjB
+
+## quantum/visualizer/visualizer.mk 
+
+* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
+* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik
+* 70797bb8f21c72cba15b314b2d0a6684bfedc369 Thu Jul 7 00:20:20 2016 +0300 Fred Sundvik
+* 07d0d5cbe48d7afaf0bc8c9916d40179ec51cb42 Thu Jul 7 12:46:10 2016 +0300 Fred Sundvik
+* 7229751ba9d402b2a6c9dc1b7b29385b5162fe41 Thu Jul 7 14:01:20 2016 +0300 Fred Sundvik
+* aaac254ebce2005272e7385488b5690bbbe6d7c8 Thu Jul 7 14:29:53 2016 +0300 Fred Sundvik
+* caedec92d2c22480313c43a364408fb920c55364 Thu Jul 7 14:42:16 2016 +0300 Fred Sundvik
+
+## quantum/visualizer/example_integration/callbacks.c 
+
+* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
+
+## quantum/visualizer/example_integration/gfxconf.h 
+
+* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
+
+## quantum/visualizer/example_integration/lcd_backlight_hal.c 
+
+* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik
+
+## quantum/visualizer/example_integration/visualizer_user.c 
+
+* 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 (file)
index 0000000..cf30619
--- /dev/null
@@ -0,0 +1,38 @@
+# Overview
+
+As 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.
+
+# Signoff
+
+This 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
+
+Username | Files | Sign Off Date |
+---------|-------|---------------|
+@0xdec | quantum/rgblight.c | 2017 Jan 29 |
+@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 |
+@cdlm | quantum/template/template.c<br>quantum/template/template.h | 2017 Feb 03 |
+@DidierLoiseau | quantum/keymap_extras/keymap_canadian_multilingual.h<br>quantum/keymap_extras/keymap_bepo.h |2017 Jan 29 |
+@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 |
+@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 |
+@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 |
+@h-youhei | quantum/keymap_extras/keymap_jp.h | 2017 Jan 28 |
+@heartsekai | quantum/keymap_extras/keymap_german_ch.h | 2017 Jan 29 |
+@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 |
+@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 |
+@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 |
+kuel | quantum/keymap_extras/keymap_unicode_cyrillic.h<br>quantum/keymap_extras/keymap_russian.h | |
+@lindhe | quantum/keymap_extras/keymap_nordic.h<br>quantum/keymap_extras/keymap_norwegian.h | 2017 Jan 30 |
+@matzebond | quantum/keymap_extras/keymap_german.h<br>quantum/keymap_extras/keymap_neo2.h | 2017 Jan 30 |
+@plgruener | quantum/keymap_extras/keymap_german.h<br>quantum/keymap_extras/keymap_neo2.h | 2017 Jan 30 |
+@priyadi | quantum/quantum.c<br>quantum/process_keycode/process_unicode.c<br>quantum/process_keycode/process_unicode.h | 2017 Jan 31 |
+@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 |
+@Smilliam | quantum/quantum.c | 2017 Feb 25 |
+@sperochon | quantum/keymap_extras/keymap_french_osx.h | 2017 Jan 30 |
+stephan . bosebeck at holidayinsider.com | quantum/keymap_extras/keymap_german_osx.h | 2017 Feb 15 |
+@TerryMathews | quantum/quantum.c | 2017 Jan 29 |
+@Twey | quantum/keymap_extras/keymap_plover.h | |
+@Vifon | quantum/dynamic_macro.h<br>quantum/quantum.c | 2017 Feb 09 |
+@vincent-pochet | quantum/keymap_extras/keymap_fr_ch.h | 2017 Feb 09 |
+@wez | quantum/dynamic_macro.h | 2017 Jan 29 |
+@Wilba6582 | quantum/keymap.h<br>quantum/keymap_common.c<br>quantum/quantum_keycodes.h | 2017 Feb 15 |
+@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 (file)
index 0000000..994d019
--- /dev/null
@@ -0,0 +1,215 @@
+# Macro shortcuts: Send a whole string when pressing just one key
+
+Instead 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).
+
+```c
+const 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.
+{
+  switch(id) {
+    case 0: // this would trigger when you hit a key mapped as M(0)
+      if (record->event.pressed) {
+        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
+      }
+      break;
+  }
+  return MACRO_NONE;
+};
+```
+A macro can include the following commands:
+
+* I() change interval of stroke in milliseconds.
+* D() press key.
+* U() release key.
+* T() type key(press and release).
+* W() wait (milliseconds).
+* END end mark.
+
+So 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.
+
+Note: Using macros to have your keyboard send passwords for you is possible, but a bad idea.
+
+## Advanced macro functions
+
+To get more control over the keys/actions your keyboard takes, the following functions are available to you in the `action_get_macro` function block:
+
+* `record->event.pressed`
+
+This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
+
+```c
+if (record->event.pressed) {
+  // on keydown
+} else {
+  // on keyup
+}
+```
+
+* `register_code(<kc>);`
+
+This 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`.
+
+* `unregister_code(<kc>);`
+
+Parallel 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.
+
+* `layer_on(<n>);`
+
+This 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.
+
+* `layer_off(<n>);`
+
+This will turn off the layer `<n>`.
+
+* `clear_keyboard();`
+
+This will clear all mods and keys currently pressed.
+
+* `clear_mods();`
+
+This will clear all mods currently pressed.
+
+* `clear_keyboard_but_mods();`
+
+This will clear all keys besides the mods currently pressed.
+
+* `update_tri_layer(layer_1, layer_2, layer_3);`
+
+If 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).
+
+### Naming your macros
+
+If 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:
+
+```
+#define AUD_OFF M(6)
+#define AUD_ON M(7)
+#define MUS_OFF M(8)
+#define MUS_ON M(9)
+#define VC_IN M(10)
+#define VC_DE M(11)
+#define PLOVER M(12)
+#define EXT_PLV M(13)
+```
+
+As was done on the [Planck default keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/default/keymap.c#L33-L40)
+
+#### Timer functionality
+
+It's possible to start timers and read values for time-specific events - here's an example:
+
+```c
+static uint16_t key_timer;
+key_timer = timer_read();
+if (timer_elapsed(key_timer) < 100) {
+  // do something if less than 100ms have passed
+} else {
+  // do something if 100ms or more have passed
+}
+```
+
+It's best to declare the `static uint16_t key_timer;` outside of the macro block (top of file, etc).
+
+### Example: Single-key copy/paste (hold to copy, tap to paste)
+
+With 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?
+
+Here's what you do:
+
+
+```
+static uint16_t key_timer;
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+      switch(id) {
+        case 0: {
+            if (record->event.pressed) {
+                key_timer = timer_read(); // if the key is being pressed, we start the timer.
+            }
+            else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
+                if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap.
+                    return MACRO( D(LCTL), T(C), U(LCTL), END  );
+                }
+                else {
+                    return MACRO( D(LCTL), T(V), U(LCTL), END  );
+                }
+            }
+            break;
+        }
+      }
+    return MACRO_NONE;
+};
+```
+
+And 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.
+
+# Dynamic macros: record and replay macros in runtime
+
+In 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).
+
+To enable them, first add a new element to the `planck_keycodes` enum — `DYNAMIC_MACRO_RANGE`:
+
+    enum planck_keycodes {
+      QWERTY = SAFE_RANGE,
+      COLEMAK,
+      DVORAK,
+      PLOVER,
+      LOWER,
+      RAISE,
+      BACKLIT,
+      EXT_PLV,
+      DYNAMIC_MACRO_RANGE,
+    };
+
+It must be the last element because `dynamic_macros.h` will add some more keycodes after it.
+
+Below it include the `dynamic_macro.h` header:
+
+    #include "dynamic_macro.h"`
+
+Add the following keys to your keymap:
+
+- `DYN_REC_START1` — start recording the macro 1,
+- `DYN_REC_START2` — start recording the macro 2,
+- `DYN_MACRO_PLAY1` — replay the macro 1,
+- `DYN_MACRO_PLAY2` — replay the macro 2,
+- `DYN_REC_STOP` — finish the macro that is currently being recorded.
+
+Add the following code to the very beginning of your `process_record_user()` function:
+
+    if (!process_record_dynamic_macro(keycode, record)) {
+        return false;
+    }
+
+That 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`.
+
+Note 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.
+
+For 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:
+
+    uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
+    if (!process_record_dynamic_macro(macro_kc, record)) {
+        return false;
+    }
+
+If 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).
+
+For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header.
+
+# Sending strings
+Some 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:
+```c
+const 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.
+{
+  switch(id) {
+    case 0: // this would trigger when you hit a key mapped as M(0)
+      if (record->event.pressed) {
+                               SEND_STRING("QMK is the best thing ever!"); // This would type "QMK is the best thing ever!" (without quotation marks).
+        return false; // This is false because it has to return something.
+      }
+      break;
+  }
+  return MACRO_NONE;
+};
+```
+If 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 (file)
index 0000000..8256320
--- /dev/null
@@ -0,0 +1,167 @@
+# More detailed make instruction
+
+The 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).
+
+`<keyboard>-<subproject>-<keymap>-<target>`, where:
+
+* `<keyboard>` is the name of the keyboard, for example `planck`
+  * Use `allkb` to compile all keyboards
+* `<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`.
+  * If the keyboard doesn't have any subprojects, it can be left out
+  * To compile the default subproject, you can leave it out, or specify `defaultsp`
+  * Use `allsp` to compile all subprojects
+* `<keymap>` is the name of the keymap, for example `algernon`
+  * Use `allkm` to compile all keymaps
+* `<target>` will be explained in more detail below.
+
+**Note:** When you leave some parts of the command out, you should also remove the dash (`-`).
+
+As mentioned above, there are some shortcuts, when you are in a:
+
+* `keyboard` folder, the command will automatically fill the `<keyboard>` part. So you only need to type `<subproject>-<keymap>-<target>`
+* `subproject` folder, it will fill in both `<keyboard>` and `<subproject>`
+* `keymap` folder, then `<keyboard>` and `<keymap>` will be filled in. If you need to specify the `<subproject>` use the following syntax `<subproject>-<target>`
+  * 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))
+* `keymap` folder of a `subproject`, then everything except the `<target>` will be filled in
+
+The `<target>` means the following
+* If no target is given, then it's the same as `all` below
+* `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.
+* `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`.
+* `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.
+
+Some other targets are supported but, but not important enough to be documented here. Check the source code of the make files for more information.
+
+You can also add extra options at the end of the make command line, after the target
+
+* `make COLOR=false` - turns off color output
+* `make SILENT=true` - turns off output besides errors/warnings
+* `make VERBOSE=true` - outputs all of the gcc stuff (not interesting, unless you need to debug)
+* `make EXTRAFLAGS=-E` - Preprocess the code without doing any compiling (useful if you are trying to debug #define commands)
+
+The 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.
+
+Here are some examples commands
+
+* `make allkb-allsp-allkm` builds everything (all keyboards, all subprojects, all keymaps). Running just `make` from the `root` will also run this.
+* `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.
+* `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`
+* `make dfu COLOR=false` from within a keymap folder, builds and uploads the keymap, but without color output.
+
+## The `Makefile`
+
+There are 5 different `make` and `Makefile` locations:
+
+* root (`/`)
+* keyboard (`/keyboards/<keyboard>/`)
+* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
+* subproject (`/keyboards/<keyboard>/<subproject>`)
+* subproject keymap (`/keyboards/<keyboard>/<subproject>/keymaps/<keymap>`)
+
+The 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.**
+
+For 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.
+
+### Makefile options
+
+Set these variables to `no` to disable them, and `yes` to enable them.
+
+`BOOTMAGIC_ENABLE`
+
+This 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.
+
+Consumes about 1000 bytes.
+
+`MOUSEKEY_ENABLE`
+
+This gives you control over cursor movements and clicks via keycodes/custom functions.
+
+`EXTRAKEY_ENABLE`
+
+This allows you to use the system and audio control key codes.
+
+`CONSOLE_ENABLE`
+
+This allows you to print messages that can be read using [`hid_listen`](https://www.pjrc.com/teensy/hid_listen.html). 
+
+By 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. 
+
+To disable debug messages (*dprint*) and reduce the .hex file size, include `#define NO_DEBUG` in your `config.h` file.
+
+To 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.
+
+To disable print messages (*print*, *xprintf*) and **KEEP** user print messages (*uprint*), include `#define USER_PRINT` in your `config.h` file.
+
+To see the text, open `hid_listen` and enjoy looking at your printed messages.
+
+**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. 
+
+Consumes about 400 bytes.
+
+`COMMAND_ENABLE`
+
+This 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`).
+
+`SLEEP_LED_ENABLE`
+
+Enables 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.
+
+`NKRO_ENABLE`
+
+This 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.
+
+`BACKLIGHT_ENABLE`
+
+This 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`:
+
+    #define BACKLIGHT_PIN B7
+
+`MIDI_ENABLE`
+
+This 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.
+
+`UNICODE_ENABLE`
+
+This allows you to send unicode symbols via `UC(<unicode>)` in your keymap. Only codes up to 0x7FFF are currently supported.
+
+`UNICODEMAP_ENABLE`
+
+This allows sending unicode symbols using `X(<unicode>)` in your keymap. Codes
+up to 0xFFFFFFFF are supported, including emojis. You will need to maintain
+a separate mapping table in your keymap file.
+
+Known limitations:
+- Under Mac OS, only codes up to 0xFFFF are supported.
+- Under Linux ibus, only codes up to 0xFFFFF are supported (but anything important is still under this limit for now).
+
+Characters out of range supported by the OS will be ignored.
+
+`BLUETOOTH_ENABLE`
+
+This allows you to interface with a Bluefruit EZ-key to send keycodes wirelessly. It uses the D2 and D3 pins.
+
+`AUDIO_ENABLE`
+
+This allows you output audio on the C6 pin (needs abstracting). See the [audio section](#audio-output-from-a-speaker) for more information.
+
+`FAUXCLICKY_ENABLE`
+
+Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue switches. By default, uses the C6 pin, same as AUDIO_ENABLE.
+
+`VARIABLE_TRACE`
+
+Use this to debug changes to variable values, see the [tracing variables](#tracing-variables) section for more information.
+
+`API_SYSEX_ENABLE`
+
+This enables using the Quantum SYSEX API to send strings (somewhere?)
+
+This consumes about 5390 bytes.
+
+### Customizing Makefile options on a per-keymap basis
+
+If 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.
+
+So 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`.
+
+You 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 (file)
index 0000000..adef260
--- /dev/null
@@ -0,0 +1,21 @@
+In rare circumstances, your keyboard/device can become unwritable, and `dfu-programmer` will give you an error like this:  
+
+    Erasing flash...  Success
+    Checking memory from 0x0 to 0x6FFF...  Empty.
+    Checking memory from 0x0 to 0x607F...  Empty.
+    0%                            100%  Programming 0x6080 bytes...
+    [ X  ERROR
+    Memory write error, use debug for more info.
+
+Currently 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).
+
+An example command to flash the board once things are hooked up is:
+
+    avrdude -c usbtiny -p m32u4 -U flash:w:planck_default_rev4.hex
+
+Research is still being done on why this happens, but here are some cases:
+
+* [`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)
+* [Doing a force erase works here](https://geekhack.org/index.php?topic=12047.msg1520147#msg1520147)
+* [`dfu-programmer atmega32u4 erase --force` works here as well](https://forum.fhem.de/index.php?topic=29777.0) [DE]
+* [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 (file)
index 0000000..2429570
--- /dev/null
@@ -0,0 +1,388 @@
+
+## Audio output from a speaker
+
+Your 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.
+
+The 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:
+
+```
+#include "audio.h"
+```
+
+Then, lower down the file:
+
+```
+float tone_startup[][2] = {
+    ED_NOTE(_E7 ),
+    E__NOTE(_CS7),
+    E__NOTE(_E6 ),
+    E__NOTE(_A6 ),
+    M__NOTE(_CS7, 20)
+};
+```
+
+This is how you write a song. Each of these lines is a note, so we have a little ditty composed of five notes here.
+
+Then, we have this chunk:
+
+```
+float tone_qwerty[][2]     = SONG(QWERTY_SOUND);
+float tone_dvorak[][2]     = SONG(DVORAK_SOUND);
+float tone_colemak[][2]    = SONG(COLEMAK_SOUND);
+float tone_plover[][2]     = SONG(PLOVER_SOUND);
+float tone_plover_gb[][2]  = SONG(PLOVER_GOODBYE_SOUND);
+
+float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
+float goodbye[][2] = SONG(GOODBYE_SOUND);
+```
+
+Wherein 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.
+
+So 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:
+
+```
+PLAY_NOTE_ARRAY(tone_plover, false, 0); // Signature is: Song name, repeat, rest style
+```
+
+This is inside one of the macros. So when that macro executes, your keyboard plays that particular chime.
+
+"Rest style" in the method signature above (the last parameter) specifies if there's a rest (a moment of silence) between the notes.
+
+## Music mode
+
+The 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.  
+
+Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things.
+
+Keycodes available:
+
+* `MU_ON` - Turn music mode on
+* `MU_OFF` - Turn music mode off
+* `MU_TOG` - Toggle music mode
+
+In music mode, the following keycodes work differently, and don't pass through:
+
+* `LCTL` - start a recording
+* `LALT` - stop recording/stop playing
+* `LGUI` - play recording
+* `KC_UP` - speed-up playback
+* `KC_DOWN` - slow-down playback
+
+## MIDI functionalty
+
+This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
+
+## Bluetooth functionality
+
+This 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.
+
+## RGB Under Glow Mod
+
+![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg)
+
+Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY).
+
+For 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.
+
+    RGBLIGHT_ENABLE = yes
+
+In order to use the underglow animation functions, you need to have `#define RGBLIGHT_ANIMATIONS` in your `config.h`.
+
+Please 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:
+
+    #define RGB_DI_PIN F4     // The pin your RGB strip is wired to
+    #define RGBLIGHT_ANIMATIONS    // Require for fancier stuff (not compatible with audio)
+    #define RGBLED_NUM 14     // Number of LEDs
+    #define RGBLIGHT_HUE_STEP 10
+    #define RGBLIGHT_SAT_STEP 17
+    #define RGBLIGHT_VAL_STEP 17
+
+You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to.
+
+The 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`
+
+### WS2812 Wiring
+
+![WS2812 Wiring](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/WS2812-wiring.jpg)
+
+Please 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.
+
+## PS/2 Mouse Support
+
+Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.
+
+To 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.
+
+There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).
+
+### Busywait version
+
+Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
+
+In rules.mk:
+
+```
+PS2_MOUSE_ENABLE = yes
+PS2_USE_BUSYWAIT = yes
+```
+
+In your keyboard config.h:
+
+```
+#ifdef PS2_USE_BUSYWAIT
+#   define PS2_CLOCK_PORT  PORTD
+#   define PS2_CLOCK_PIN   PIND
+#   define PS2_CLOCK_DDR   DDRD
+#   define PS2_CLOCK_BIT   1
+#   define PS2_DATA_PORT   PORTD
+#   define PS2_DATA_PIN    PIND
+#   define PS2_DATA_DDR    DDRD
+#   define PS2_DATA_BIT    2
+#endif
+```
+
+### Interrupt version
+
+The 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.
+
+In rules.mk:
+
+```
+PS2_MOUSE_ENABLE = yes
+PS2_USE_INT = yes
+```
+
+In your keyboard config.h:
+
+```
+#ifdef PS2_USE_INT
+#define PS2_CLOCK_PORT  PORTD
+#define PS2_CLOCK_PIN   PIND
+#define PS2_CLOCK_DDR   DDRD
+#define PS2_CLOCK_BIT   2
+#define PS2_DATA_PORT   PORTD
+#define PS2_DATA_PIN    PIND
+#define PS2_DATA_DDR    DDRD
+#define PS2_DATA_BIT    5
+
+#define PS2_INT_INIT()  do {    \
+    EICRA |= ((1<<ISC21) |      \
+              (0<<ISC20));      \
+} while (0)
+#define PS2_INT_ON()  do {      \
+    EIMSK |= (1<<INT2);         \
+} while (0)
+#define PS2_INT_OFF() do {      \
+    EIMSK &= ~(1<<INT2);        \
+} while (0)
+#define PS2_INT_VECT   INT2_vect
+#endif
+```
+
+### USART version
+
+To 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.
+
+In rules.mk:
+
+```
+PS2_MOUSE_ENABLE = yes
+PS2_USE_USART = yes
+```
+
+In your keyboard config.h:
+
+```
+#ifdef PS2_USE_USART
+#define PS2_CLOCK_PORT  PORTD
+#define PS2_CLOCK_PIN   PIND
+#define PS2_CLOCK_DDR   DDRD
+#define PS2_CLOCK_BIT   5
+#define PS2_DATA_PORT   PORTD
+#define PS2_DATA_PIN    PIND
+#define PS2_DATA_DDR    DDRD
+#define PS2_DATA_BIT    2
+
+/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
+/* set DDR of CLOCK as input to be slave */
+#define PS2_USART_INIT() do {   \
+    PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT);   \
+    PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT);     \
+    UCSR1C = ((1 << UMSEL10) |  \
+              (3 << UPM10)   |  \
+              (0 << USBS1)   |  \
+              (3 << UCSZ10)  |  \
+              (0 << UCPOL1));   \
+    UCSR1A = 0;                 \
+    UBRR1H = 0;                 \
+    UBRR1L = 0;                 \
+} while (0)
+#define PS2_USART_RX_INT_ON() do {  \
+    UCSR1B = ((1 << RXCIE1) |       \
+              (1 << RXEN1));        \
+} while (0)
+#define PS2_USART_RX_POLL_ON() do { \
+    UCSR1B = (1 << RXEN1);          \
+} while (0)
+#define PS2_USART_OFF() do {    \
+    UCSR1C = 0;                 \
+    UCSR1B &= ~((1 << RXEN1) |  \
+                (1 << TXEN1));  \
+} while (0)
+#define PS2_USART_RX_READY      (UCSR1A & (1<<RXC1))
+#define PS2_USART_RX_DATA       UDR1
+#define PS2_USART_ERROR         (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
+#define PS2_USART_RX_VECT       USART1_RX_vect
+#endif
+```
+
+### Additional Settings
+
+#### PS/2 mouse features
+
+These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/
+
+```
+/* Use remote mode instead of the default stream mode (see link) */
+#define PS2_MOUSE_USE_REMOTE_MODE  
+
+/* Enable the scrollwheel or scroll gesture on your mouse or touchpad */
+#define PS2_MOUSE_ENABLE_SCROLLING
+
+/* Some mice will need a scroll mask to be configured. The default is 0xFF. */
+#define PS2_MOUSE_SCROLL_MASK 0x0F
+
+/* Applies a transformation to the movement before sending to the host (see link) */
+#define PS2_MOUSE_USE_2_1_SCALING
+
+/* The time to wait after initializing the ps2 host */
+#define PS2_MOUSE_INIT_DELAY 1000 /* Default */
+```
+
+You can also call the following functions from ps2_mouse.h
+
+```
+void ps2_mouse_disable_data_reporting(void);
+
+void ps2_mouse_enable_data_reporting(void);
+
+void ps2_mouse_set_remote_mode(void);
+
+void ps2_mouse_set_stream_mode(void);
+
+void ps2_mouse_set_scaling_2_1(void);
+
+void ps2_mouse_set_scaling_1_1(void);
+
+void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
+
+void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
+```
+
+#### Fine control
+
+Use the following defines to change the sensitivity and speed of the mouse.
+Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads).
+
+```
+#define PS2_MOUSE_X_MULTIPLIER 3
+#define PS2_MOUSE_Y_MULTIPLIER 3
+#define PS2_MOUSE_V_MULTIPLIER 1
+```
+
+#### Scroll button
+
+If you're using a trackpoint, you will likely want to be able to use it for scrolling.
+Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
+To enable the feature, you must set a scroll button mask as follows:
+
+```
+#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BUTTON_MIDDLE) /* Default */
+```
+
+To disable the scroll button feature:
+
+```
+#define PS2_MOUSE_SCROLL_BTN_MASK 0
+```
+
+The available buttons are:
+
+```
+#define PS2_MOUSE_BTN_LEFT      0
+#define PS2_MOUSE_BTN_RIGHT     1
+#define PS2_MOUSE_BTN_MIDDLE    2
+```
+
+You can also combine buttons in the mask by `|`ing them together.
+
+Once you've configured your scroll button mask, you must configure the scroll button send interval.
+This is the interval before which if the scroll buttons were released they would be sent to the host.
+After this interval, they will cause the mouse to scroll and will not be sent.
+
+```
+#define PS2_MOUSE_SCROLL_BTN_SEND 300 /* Default */
+```
+
+To disable sending the scroll buttons:
+```
+#define PS2_MOUSE_SCROLL_BTN_SEND 0
+```
+
+Fine control over the scrolling is supported with the following defines:
+
+```
+#define PS2_MOUSE_SCROLL_DIVISOR_H 2
+#define PS2_MOUSE_SCROLL_DIVISOR_V 2
+```
+
+#### Debug settings
+
+To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
+
+```
+/* To debug the mouse reports */
+#define PS2_MOUSE_DEBUG_HID
+#define PS2_MOUSE_DEBUG_RAW
+```
+
+## Safety Considerations
+
+You probably don't want to "brick" your keyboard, making it impossible
+to rewrite firmware onto it.  Here are some of the parameters to show
+what things are (and likely aren't) too risky.
+
+- If your keyboard map does not include RESET, then, to get into DFU
+  mode, you will need to press the reset button on the PCB, which
+  requires unscrewing the bottom.
+- Messing with tmk_core / common files might make the keyboard
+  inoperable
+- Too large a .hex file is trouble; `make dfu` will erase the block,
+  test the size (oops, wrong order!), which errors out, failing to
+  flash the keyboard, leaving it in DFU mode.
+  - To this end, note that the maximum .hex file size on Planck is
+    7000h (28672 decimal)
+
+```
+Linking: .build/planck_rev4_cbbrowne.elf                                                            [OK]
+Creating load file for Flash: .build/planck_rev4_cbbrowne.hex                                       [OK]
+
+Size after:
+   text    data     bss     dec     hex filename
+      0   22396       0   22396    577c planck_rev4_cbbrowne.hex
+```
+
+  - The above file is of size 22396/577ch, which is less than
+    28672/7000h
+  - As long as you have a suitable alternative .hex file around, you
+    can retry, loading that one
+  - Some of the options you might specify in your keyboard's Makefile
+    consume extra memory; watch out for BOOTMAGIC_ENABLE,
+    MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE
+- DFU tools do /not/ allow you to write into the bootloader (unless
+  you throw in extra fruitsalad of options), so there is little risk
+  there.
+- EEPROM has around a 100000 write cycle.  You shouldn't rewrite the
+  firmware repeatedly and continually; that'll burn the EEPROM
+  eventually.
+
diff --git a/docs/Mouse-keys.md b/docs/Mouse-keys.md
new file mode 100644 (file)
index 0000000..16e920f
--- /dev/null
@@ -0,0 +1,17 @@
+# Can I increase the speed of the mouse keys?
+
+**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.
+Is there perhaps something I can input in the keymap.c to change the sensitivity? Or some other surefire way of increasing the speed?
+Thanks!
+
+**A:**  In your keymap's config.h:
+
+```
+#define MOUSEKEY_INTERVAL       20
+#define MOUSEKEY_DELAY          0
+#define MOUSEKEY_TIME_TO_MAX    60
+#define MOUSEKEY_MAX_SPEED      7
+#define MOUSEKEY_WHEEL_DELAY 0
+```
+
+Tweak 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 (file)
index 0000000..163c7c1
--- /dev/null
@@ -0,0 +1,62 @@
+Keyboard Firmware Projects other than TMK
+================================
+## PJRC USB Keyboard/Mouse Example[USB][PJRC][Teensy][AVR]
+- <http://www.pjrc.com/teensy/usb_keyboard.html>
+- <http://www.pjrc.com/teensy/usb_mouse.html>
+## kbupgrade[USB][V-USB][AVR]
+- <http://github.com/rhomann/kbupgrade>
+- <http://geekhack.org/showwiki.php?title=Island:8406>
+## c64key[USB][V-USB][AVR]
+- <http://symlink.dk/projects/c64key/>
+## rump[USB][V-USB][AVR]
+- <http://mg8.org/rump/>
+- <http://github.com/clee/rump>
+## dulcimer[USB][V-USB][AVR]
+- <http://www.schatenseite.de/dulcimer.html>
+## humblehacker-keyboard[USB][LUFA][AVR][Ergo]
+- <http://github.com/humblehacker>
+- <http://www.humblehacker.com/keyboard/>
+- <http://geekhack.org/showwiki.php?title=Island:6292>
+## ps2avr[PS/2][AVR]
+- <http://sourceforge.net/projects/ps2avr/>
+## ErgoDox[Ergo][Split][USB][AVR]
+- <http://geekhack.org/index.php?topic=22780.0>
+- <https://github.com/benblazak/ergodox-firmware>
+- <https://github.com/cub-uanic/tmk_keyboard>
+## Suka's keyboard collection[Ergo][Split][3DPrinting][USB][AVR]
+- <http://deskthority.net/workshop-f7/my-diy-keyboard-collection-or-how-i-became-a-kb-geek-t2534.html>
+- <https://github.com/frobiac/adnw>
+## bpiphany's AVR-Keyboard[PJRC][AVR][USB]
+- <https://github.com/BathroomEpiphanies/AVR-Keyboard>
+- <http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions>
+- <http://deskthority.net/wiki/Phantom>
+## USB-USB keyboard remapper[converter][USB-USB][AVR][Arduino]
+- <http://forum.colemak.com/viewtopic.php?pid=10837>
+- <https://github.com/darkytoothpaste/keymapper>
+## USB-USB converter threads[converter][USB-USB]
+- <http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html>
+- <http://geekhack.org/index.php?topic=19458.0>
+## kbdbabel.org[converter][vintage][protocol][8051]
+Great resource of vintage keyboard protocol information and code
+
+- <http://www.kbdbabel.org/>
+## Haata's kiibohd Controller[converter][vintage][protocol][AVR][PJRC][Cortex]
+A lots of vintage keyboard protocol supports
+- <https://github.com/kiibohd/controller>
+## Kinesis ergonomic keyboard firmware replacement[V-USB][LUFA][Ergo]
+- <https://github.com/chrisandreae/kinesis-firmware>
diff --git a/docs/PCB_GUIDE.md b/docs/PCB_GUIDE.md
new file mode 100644 (file)
index 0000000..16de711
--- /dev/null
@@ -0,0 +1,151 @@
+# Planck Firmware Guide
+
+## Setting up the environment
+
+### Windows
+1. 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**.
+2. 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.
+3. 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.
+4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
+5. 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!
+
+
+### Mac
+
+If you're using homebrew, you can use the following commands:
+
+    brew tap osx-cross/avr
+    brew install avr-libc
+    brew install dfu-programmer
+
+Otherwise, these instructions will work:
+
+1. Install Xcode from the App Store.
+2. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
+3. Install [DFU-Programmer][dfu-prog].
+
+### Linux
+1. Install AVR GCC with your favorite package manager.
+2. Install [DFU-Programmer][dfu-prog].
+
+Note that, since it will be directly accessing USB hardware, the
+`dfu-programmer` program needs to be run as root.
+
+## Verify Your Installation
+1. Clone the following repository: https://github.com/qmk/qmk_firmware
+2. Open a Terminal and `cd` into `qmk_firmware/keyboards/planck`
+3. Run `make`. This should output a lot of information about the build process.
+
+## Using the built-in functions
+
+Here is a list of some of the functions available from the command line:
+
+* `make clean`: clean the environment - may be required in-between builds
+* `make`: compile the code
+* `make KEYMAP=<keymap>`: compile with the extended keymap file `extended_keymaps/extended_keymap_<keymap>.c`
+* `make dfu`: build and flash the layout to the PCB
+* `make dfu-force`: build and force-flash the layout to the PCB (may be require for first flash)
+
+Generally, the instructions to flash the PCB are as follows:
+
+1. Make changes to the appropriate keymap file
+2. Save the file
+3. `make clean`
+4. Press the reset button on the PCB/press the key with the `RESET` keycode
+5. `make <arguments> dfu` - use the necessary `KEYMAP=<keymap>` and/or `COMMON=true` arguments here.
+
+## Troubleshooting
+If you see something like this
+
+          0 [main] sh 13384 sync_with_child: child 9716(0x178) died before initialization with status code 0xC0000142
+        440 [main] sh 13384 sync_with_child: *** child state waiting for longjmp
+    /usr/bin/sh: fork: Resource temporarily unavailable
+
+after running 'make' on Windows than you are encountering a very popular issue with WinAVR on Windows 8.1 and 10.
+You can easily fix this problem by replacing msys-1.0.dll in WinAVR/utils/bin with [this one](http://www.madwizard.org/download/electronics/msys-1.0-vista64.zip).
+Restart your system and everything should work fine!
+
+
+If you see this
+
+    dfu-programmer atmega32u4 erase
+    process_begin: CreateProcess(NULL, dfu-programmer atmega32u4 erase, ...) failed.
+    make (e=2): The system cannot find the file specified.
+    make: *** [dfu] Error 2
+
+when trying to 'make dfu' on Windows you need to copy the dfu-programmer.exe to qmk_firmware/keyboards/planck.
+
+
+## Quantum MK Firmware
+
+### Keymap
+
+Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/qmk/qmk_firmware/blob/master/quantum/keymap_common.h).
+
+You can use modifiers with keycodes like this:
+
+    LCTL(KC_C)
+    
+Which will generate Ctrl+c. These are daisy-chainable, meaning you can do things like:
+
+    LCTL(LALT(KC_C))
+    
+That will generate Ctrl+Alt+c. The entire list of these functions is here:
+
+* `LCTL()`: Left control
+* `LSFT()` / `S()`: Left shift
+* `LALT()`: Left alt/opt
+* `LGUI()`: Left win/cmd
+* `RCTL()`: Right control
+* `RSFT()`: Right shift
+* `RALT()`: Right alt/opt
+* `RGUI()`: Right win/cmd
+
+`S(KC_1)`-like entries are useful in writing keymaps for the Planck.
+
+### Other keycodes
+
+A number of other keycodes have been added that you may find useful:
+
+* `CM_<key>`: the Colemak equivalent of a key (in place of `KC_<key>`), when using Colemak in software (`CM_O` generates `KC_SCLN`)
+* `RESET`: jump to bootloader for flashing (same as press the reset button)
+* `BL_STEP`: step through the backlight brightnesses
+* `BL_<0-15>`: set backlight brightness to 0-15
+* `BL_DEC`: lower the backlight brightness
+* `BL_INC`: raise the backlight brightness
+* `BL_TOGG`: toggle the backlight on/off
+
+### Function layers
+
+The extended keymap extends the number of function layers from 32 to the near-infinite value of 256. Rather than using `FN<num>` notation (still available, but limited to `FN0`-`FN31`), you can use the `FUNC(<num>)` notation. `F(<num>)` is a shortcut for this.
+
+The function actions are unchanged, and you can see the full list of them [here](https://github.com/jackhumbert/tmk_keyboard/blob/master/common/action_code.h). They are explained in detail [here](https://github.com/jackhumbert/tmk_keyboard/blob/master/doc/keymap.md#2-action).
+
+### Macros
+
+Macros have been setup in the `keymaps/keymap_default.c` file so that you can use `M(<num>)` to access a macro in the `action_get_macro` section on your keymap. The switch/case structure you see here is required, and is setup for `M(0)` - you'll need to copy and paste the code to look like this (e.g. to support `M(3)`):
+
+    switch(id) {
+      case 0:
+        return MACRODOWN(TYPE(KC_A), END);
+        break;
+      case 1:
+        return MACRODOWN(TYPE(KC_B), END);
+        break;
+      case 2:
+        return MACRODOWN(TYPE(KC_C), END);
+        break;
+      case 3:
+        return MACRODOWN(TYPE(KC_D), END);
+        break;
+    } 
+    return MACRO_NONE;
+
+`MACRODOWN()` is a shortcut for `(record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)` which tells the macro to execute when the key is pressed. Without this, the macro will be executed on both the down and up stroke.
+
+[cygwin]:       https://www.cygwin.com/
+[mingw]:        http://www.mingw.org/
+[mhv]:          https://infernoembedded.com/products/avr-tools
+[winavr]:       http://winavr.sourceforge.net/
+[crosspack]:    http://www.obdev.at/products/crosspack/index.html
+[dfu-prog]:     http://dfu-programmer.sourceforge.net/
diff --git a/docs/POWER.txt b/docs/POWER.txt
new file mode 100644 (file)
index 0000000..0abbbe4
--- /dev/null
@@ -0,0 +1,62 @@
+Time to Sleep
+=============
+USB suspend     no activity on USB line for  3ms
+No Interaction  no user interaction
+    matrix has no change
+    matrix has no switch on
+
+
+AVR Power Management
+====================
+
+V-USB suspend
+    USB suspend
+    http://vusb.wikidot.com/examples
+
+MCUSR   MCU Status Register
+    WDRF    Watchdog Reset Flag
+    BORF
+    EXTRF
+    PORF    Power-on Reset Flag
+
+SMCR    Sleep Mode Control Register
+    SE      Sleep Enable
+    SM2:0   
+        #define set_sleep_mode(mode) \
+        #define SLEEP_MODE_IDLE         (0)
+        #define SLEEP_MODE_ADC          _BV(SM0)
+        #define SLEEP_MODE_PWR_DOWN     _BV(SM1)
+        #define SLEEP_MODE_PWR_SAVE     (_BV(SM0) | _BV(SM1))
+        #define SLEEP_MODE_STANDBY      (_BV(SM1) | _BV(SM2))
+        #define SLEEP_MODE_EXT_STANDBY  (_BV(SM0) | _BV(SM1) | _BV(SM2))
+
+
+ACSR    Analog Comparator Control and Status Register
+    To disable Analog Comparator
+    ACSR = 0x80;
+    or
+    ACSR &= ~_BV(ACIE);
+    ACSR |= _BV(ACD);
+
+    ACD: Analog Comparator Disable
+        When this bit is written logic one, the power to the Analog Comparator is
+        switched off. This bit can be set at any time to turn off the Analog
+        Comparator. This will reduce power consumption in Active and Idle mode.
+        When changing the ACD bit, the Analog Comparator Interrupt must be disabled
+        by clearing the ACIE bit in ACSR. Otherwise an interrupt can occur when
+        the bit is changed.
+
+DIDR1   Digital Input Disable Register 1
+    AIN1D
+    AIN0D
+        When this bit is written logic one, the digital input buffer on the AIN1/0 pin is disabled. The corresponding PIN Register bit will always read as zero when this bit is set. When an analog signal is applied to the AIN1/0 pin and the digital input from this pin is not needed, this bit should be written logic one to reduce power consumption in the digital input buffer.
+
+
+PRR     Power Reduction Register
+    PRTWI
+    PRTIM2
+    PRTIM0
+    PRTIM1
+    PRSPI
+    PRUSART0
+    PRADC
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 (file)
index 0000000..436c73c
--- /dev/null
@@ -0,0 +1,70 @@
+Setting 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:
+
+```
+$ util/new_project.sh simontester
+######################################################
+# /keyboards/simontester project created. To start
+# working on things, cd into keyboards/simontester
+######################################################
+```
+
+
+
+# END OF NEW ARM DOC, OLD ATMEL DOC FOLLOWS
+
+## `/keyboards/<keyboard>/config.h`
+
+The `USB Device descriptor parameter` block contains parameters are used to uniquely identify your keyboard, but they don't really matter to the machine.
+
+Your `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.
+
+The `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.
+
+For 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.
+
+`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.
+
+`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.
+
+`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number.
+
+## `/keyboards/<keyboard>/Makefile`
+
+The 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`.
+
+```
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+```
+
+At 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).
+
+## `/keyboards/<keyboard>/readme.md`
+
+This 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>/.
+
+## `/keyboards/<keyboard>/<keyboard>.c`
+
+This 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)
+
+## `/keyboards/<keyboard>/<keyboard>.h`
+
+Here 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:
+
+```
+#define KEYMAP( \
+    k00, k01, k02, \
+      k10,  k11   \
+) \
+{ \
+    { k00, k01,   k02 }, \
+    { k10, KC_NO, k11 }, \
+}
+```
+
+Each 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 (file)
index 0000000..6f291a4
--- /dev/null
@@ -0,0 +1,59 @@
+If 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.
+
+## `/keyboards/<keyboard>/config.h`
+
+The `USB Device descriptor parameter` block contains parameters are used to uniquely identify your keyboard, but they don't really matter to the machine.
+
+Your `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.
+
+The `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.
+
+For 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.
+
+`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.
+
+`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.
+
+`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number.
+
+## `/keyboards/<keyboard>/Makefile`
+
+The 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`.
+
+```
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+```
+
+At 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).
+
+## `/keyboards/<keyboard>/readme.md`
+
+This 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>/.
+
+## `/keyboards/<keyboard>/<keyboard>.c`
+
+This 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)
+
+## `/keyboards/<keyboard>/<keyboard>.h`
+
+Here 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:
+
+```
+#define KEYMAP( \
+    k00, k01, k02, \
+      k10,  k11   \
+) \
+{ \
+    { k00, k01,   k02 }, \
+    { k10, KC_NO, k11 }, \
+}
+```
+
+Each 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/Previously-Asked-Questions.asciidoc b/docs/Previously-Asked-Questions.asciidoc
new file mode 100644 (file)
index 0000000..36af1f2
--- /dev/null
@@ -0,0 +1,14 @@
+= Previously Asked Questions
+:toc:
+:toc-placement: preamble
+
+toc::[]
+
+= Question thread
+http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177-270.html
+
+= Questions
+== Columns beyond 16(uint16_t) cannot be read
+* https://github.com/tmk/tmk_keyboard/wiki/FAQ#cant-read-comlumn-of-matrix-beyond-16
+* http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177-270.html#p247051
+* 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 (file)
index 0000000..f595bd2
--- /dev/null
@@ -0,0 +1,75 @@
+# QMK Overview
+
+This 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.
+
+# Basic QMK structure
+
+QMK 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.
+
+## Keyboard project structure
+
+Within 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:
+
+* `keymaps/`: Different keymaps that can be built
+* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`.
+* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
+
+### Keymap structure
+
+In 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.
+
+* `config.h`: the options to configure your keymap
+* `keymap.c`: all of your keymap code, required
+* `Makefile`: the features of QMK that are enabled, required to run `make` in your keymap folder
+* `readme.md`: a description of your keymap, how others might use it, and explanations of features
+* 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.
+
+# The `make` command
+
+The `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.
+
+**NOTE:** To abort a make command press `Ctrl-c`
+
+For more details on the QMK build process see [Make Instructions](/Make-Instructions.md).
+
+### Simple instructions for building and uploading a keyboard
+
+**Most keyboards have more specific instructions in the keyboard specific readme.md file, so please check that first**
+
+1. Enter the `root` folder
+2. Run `make <keyboard>-<subproject>-<keymap>-<programmer>`
+
+In the above commands, replace:
+
+* `<keyboard>` with the name of your keyboard
+* `<keymap>` with the name of your keymap
+* `<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`.
+  * 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.
+* `<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.
+  * 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.
+
+**NOTE:** Some operating systems will refuse to program unless you run the make command as root for example `sudo make clueboard-default-dfu`
+
+## Make Examples
+
+* Build all Clueboard keymaps: `make clueboard`
+* Build the default Planck keymap: `make planck-rev4-default`
+* Build and flash your ergodox-ez: `make ergodox-ez-default-teensy`
+
+# The `config.h` file
+
+There are 2 `config.h` locations:
+
+* keyboard (`/keyboards/<keyboard>/`)
+* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
+
+The 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:
+
+```c
+#undef MY_SETTING
+#define MY_SETTING 4
+```
+
+For a value of `4` for this imaginary setting. So we `undef` it first, then `define` it.
+
+You 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 (file)
index 0000000..fd5e96c
--- /dev/null
@@ -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 (file)
index 0000000..99845a7
--- /dev/null
@@ -0,0 +1,26 @@
+
+### Getting started 
+* [Introduction](/Home.md)
+* [QMK Overview](/QMK-Overview.md)
+* [Build Environment Setup](/Build-Environment-Setup.md)
+
+### Making a keymap
+* [Keymap overview](/Keymap.md)
+* [Keycodes](/Keycodes.md)
+* [Layer switching](/Key-Functions.md)
+* [Leader Key](/Leader-Key.md)
+* [Macros](/Macros.md)
+* [Space Cadet](/Space-Cadet-Shift.md)
+* [Tap Dance](/Tap-Dance.md)
+* [Mouse keys](/Mouse-keys.md)
+* [FAQ: Creating a Keymap](/FAQ-Keymap.md)
+* [FAQ: Compiling QMK](/FAQ-Build.md)
+  
+### For hardware makers and modders
+* [Modding your keyboard](/Modding-your-keyboard.md)
+* [Porting your keyboard to QMK](/Porting-your-keyboard-to-QMK.md)
+* [Adding features to QMK](/Adding-features-to-QMK.md)
+  
+### Other topics
+* [General FAQ](/FAQ.md)
+* [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 (file)
index 0000000..a1ec256
--- /dev/null
@@ -0,0 +1,24 @@
+## Space Cadet Shift: The future, built in
+
+Steve 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.
+
+To 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.
+
+It'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:
+
+    #define LSPO_KEY KC_9
+    #define RSPC_KEY KC_0
+
+You can also choose between different rollover behaviors of the shift keys by defining:
+
+    #define DISABLE_SPACE_CADET_ROLLOVER
+
+in 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.
+
+The only other thing you're going to want to do is create a `Makefile` in your keymap directory and set the following:
+
+```
+COMMAND_ENABLE   = no  # Commands for debug and configuration
+```
+
+This 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 (file)
index 0000000..0597b04
--- /dev/null
@@ -0,0 +1,34 @@
+## TMK based projects
+Add your project here!
+See https://github.com/tmk/tmk_keyboard/issues/173
+
+### keyboards
+**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:
+- https://github.com/VinnyCordeiro/tmk_keyboard
+
+**Octagon V1**: Korean custom keyboard designed by Duck.
+- https://github.com/xauser/tmk_keyboard/tree/xauser
+
+**Compact L3**: Custom keyboard designed by LifeZone and LeeKu.
+- https://github.com/xauser/tmk_keyboard/tree/xauser
+
+**KMAC, 1,2 and Happy**: Custom keyboard designed by kbdmania.
+- https://github.com/ageaenes/tmk_keyboard
+
+**P60**: [DIY wired 60% keyboard](https://imgur.com/a/zwsDN) by [p3lim](https://github.com/p3lim).
+- https://github.com/p3lim/keyboard_firmware
+
+**Nerd, Kitten Paw, Lightsaber, Phantom, Lightpad, Ergodox** on [xauser](https://github.com/xauser)'s repository
+- https://github.com/xauser/tmk_keyboard/tree/xauser
+
+**ErgoDox** on [cub-unanic](https://github.com/cub-uanic)'s repository
+- https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox
+
+**Atreus** by [technomancy](https://atreus.technomancy.us)
+- https://github.com/technomancy/tmk_keyboard/tree/atreus/keyboard/atreus
+
+**[mcdox](https://github.com/DavidMcEwan/mcdox)**
+- https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox
+
+
+### 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 (file)
index 0000000..fb5b2c9
--- /dev/null
@@ -0,0 +1,69 @@
+## TMK own projects by hasu
+Located in [tmk_keyboard](https://github.com/tmk/tmk_keyboard/tree/master/) repository.
+
+### converter                                                                                                                                                                                          
+* [ps2_usb]         - [PS/2 keyboard to USB][GH_ps2]
+* [adb_usb]         - [ADB keyboard to USB][GH_adb]
+* [m0110_usb]       - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110]
+* [terminal_usb]    - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal]
+* [news_usb]        - [Sony NEWS keyboard to USB][GH_news]
+* [x68k_usb]        - [Sharp X68000 keyboard to USB][GH_x68k]
+* [sun_usb]         - [Sun] to USB(type4, 5 and 3?)
+* [pc98_usb]        - [PC98] to USB
+* [usb_usb]         - USB to USB(experimental)
+* [ascii_usb]       - ASCII(Serial console terminal) to USB
+* [ibm4704_usb]     - [IBM 4704 keyboard Converter][GH_ibm4704]
+                   
+### keyboard 
+* [hhkb]            - [Happy Hacking Keyboard pro][GH_hhkb]
+* [gh60]            - [GH60][GH60_diy] DIY 60% keyboard [prototype][GH60_proto]
+* [hbkb]            - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod)
+* [hid_liber]       - [HID liberation][HID_liber] controller (by alaricljs)
+* [phantom]         - [Phantom] keyboard (by Tranquilite)
+* [IIgs_Standard]   - Apple [IIGS] keyboard mod(by JeffreySung)
+* [macway]          - [Compact keyboard mod][GH_macway] [retired]
+* [KMAC]            - Korean custom keyboard
+* [Lightsaber]      - Korean custom keyboard
+             
+[ps2_usb]:              https://github.com/tmk/tmk_keyboard/tree/master/converter/ps2_usb/
+[adb_usb]:              https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb/
+[m0110_usb]:            https://github.com/tmk/tmk_keyboard/tree/master/converter/m0110_usb
+[terminal_usb]:         https://github.com/tmk/tmk_keyboard/tree/master/converter/terminal_usb/
+[news_usb]:             https://github.com/tmk/tmk_keyboard/tree/master/converter/news_usb/
+[x68k_usb]:             https://github.com/tmk/tmk_keyboard/tree/master/converter/x68k_usb/
+[sun_usb]:              https://github.com/tmk/tmk_keyboard/tree/master/converter/sun_usb/
+[pc98_usb]:             https://github.com/tmk/tmk_keyboard/tree/master/converter/pc98_usb/
+[usb_usb]:              https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb/
+[ascii_usb]:            https://github.com/tmk/tmk_keyboard/tree/master/converter/ascii_usb/
+[ibm4704_usb]:          https://github.com/tmk/tmk_keyboard/tree/master/converter/ibm4704_usb
+[hhkb]:                 https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hhkb/
+[gh60]:                 https://github.com/tmk/tmk_keyboard/tree/master/keyboard/gh60/
+[hbkb]:                 https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hbkb/
+[hid_liber]:            https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hid_liber/
+[phantom]:              https://github.com/tmk/tmk_keyboard/tree/master/keyboard/phantom/
+[IIgs_Standard]:        https://github.com/tmk/tmk_keyboard/tree/master/keyboard/IIgs/
+[macway]:               https://github.com/tmk/tmk_keyboard/tree/master/keyboard/macway/
+[KMAC]:                 https://github.com/tmk/tmk_keyboard/tree/master/keyboard/kmac/
+[Lightsaber]:           https://github.com/tmk/tmk_keyboard/tree/master/keyboard/lightsaber/
+             
+[GH_macway]:    http://geekhack.org/showwiki.php?title=Island:11930
+[GH_hhkb]:      http://geekhack.org/showwiki.php?title=Island:12047
+[GH_ps2]:       http://geekhack.org/showwiki.php?title=Island:14618
+[GH_adb]:       http://geekhack.org/showwiki.php?title=Island:14290
+[GH_hhkb_bt]:   http://geekhack.org/showwiki.php?title=Island:20851
+[GH_m0110]:     http://geekhack.org/showwiki.php?title=Island:24965
+[GH_news]:      http://geekhack.org/showwiki.php?title=Island:25759
+[GH_terminal]:  http://geekhack.org/showwiki.php?title=Island:27272
+[GH_x68k]:      http://geekhack.org/showwiki.php?title=Island:29060
+[GH_hbkb]:      http://geekhack.org/showwiki.php?title=Island:29483
+[GH_ibm4704]:   http://geekhack.org/index.php?topic=54706.0
+[HID_liber]:    http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions
+[Phantom]:      http://geekhack.org/index.php?topic=26742
+[GH60_diy]:     http://geekhack.org/index.php?topic=34959
+[GH60_proto]:   http://geekhack.org/index.php?topic=37570.0
+[PC98]:         http://en.wikipedia.org/wiki/NEC_PC-9801
+[Sun]:          http://en.wikipedia.org/wiki/Sun-3
+[IIGS]:         http://en.wikipedia.org/wiki/Apple_IIGS
+
+
+See other [[TMK Based Projects]]
\ No newline at end of file
diff --git a/docs/TMK_README.md b/docs/TMK_README.md
new file mode 100644 (file)
index 0000000..e3438ed
--- /dev/null
@@ -0,0 +1,243 @@
+# TMK Documenation
+
+Features
+--------
+These features can be used in your keyboard.
+
+* Multi-layer Keymap  - Multiple keyboard layouts with layer switching
+* Mouse key           - Mouse control with keyboard
+* System Control Key  - Power Down, Sleep, Wake Up and USB Remote Wake up
+* Media Control Key   - Volume Down/Up, Mute, Next/Prev track, Play, Stop and etc
+* USB NKRO            - 120 keys(+ 8 modifiers) simultaneously
+* PS/2 mouse support  - PS/2 mouse(TrackPoint) as composite device
+* Keyboard protocols  - PS/2, ADB, M0110, Sun and other old keyboard protocols
+* User Function       - Customizable function of key with writing code
+* Macro               - Very primitive at this time
+* Keyboard Tricks     - Oneshot modifier and modifier with tapping feature
+* Debug Console       - Messages for debug and interaction with firmware
+* Virtual DIP Switch  - Configurations stored EEPROM(Boot Magic)
+* Locking CapsLock    - Mechanical switch support for CapsLock
+* Breathing Sleep LED - Sleep indicator with charm during USB suspend
+* Backlight           - Control backlight levels
+
+
+
+Projects
+--------
+You can find some keyboard specific projects under `converter` and `keyboard` directory.
+
+## Main projects
+
+### OLKB products
+* [planck](keyboards/planck/)                - [Planck] Ortholinear 40% keyboard
+* [preonic](keyboards/preonic/)              - [Preonic] Ortholinear 50% keyboard
+* [atomic](keyboards/atomic/)                - [Atomic] Ortholinear 60% keyboard
+
+### Ergodox EZ
+* [ergodox_ez](keyboards/ergodox/ez)         - [Ergodox_EZ] Assembled split keyboard
+
+## Other projects
+
+### converter
+* [ps2_usb](converter/ps2_usb/)             - [PS/2 keyboard to USB][GH_ps2]
+* [adb_usb](converter/adb_usb/)             - [ADB keyboard to USB][GH_adb]
+* [m0110_usb](converter/m0110_usb)          - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110]
+* [terminal_usb](converter/terminal_usb/)   - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal]
+* [news_usb](converter/news_usb/)           - [Sony NEWS keyboard to USB][GH_news]
+* [x68k_usb](converter/x68k_usb/)           - [Sharp X68000 keyboard to USB][GH_x68k]
+* [sun_usb](converter/sun_usb/)             - [Sun] to USB(type4, 5 and 3?)
+* [pc98_usb](converter/pc98_usb/)           - [PC98] to USB
+* [usb_usb](converter/usb_usb/)             - USB to USB(experimental)
+* [ascii_usb](converter/ascii_usb/)         - ASCII(Serial console terminal) to USB
+* [ibm4704_usb](converter/ibm4704_usb)      - [IBM 4704 keyboard Converter][GH_ibm4704]
+
+### keyboard
+* [hhkb](keyboards/hhkb/)                    - [Happy Hacking Keyboard pro][GH_hhkb] hasu's main board
+* [gh60](keyboards/gh60/)                    - [GH60] DIY 60% keyboard [prototype][GH60_proto] hasu's second board
+* [hbkb](keyboards/hbkb/)                    - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod)
+* [hid_liber](keyboards/hid_liber/)          - [HID liberation][HID_liber] controller (by alaricljs)
+* [phantom](keyboards/phantom/)              - [Phantom] keyboard (by Tranquilite)
+* [IIgs_Standard](keyboards/IIgs/)           - Apple [IIGS] keyboard mod(by JeffreySung)
+* [macway](keyboards/macway/)                - [Compact keyboard mod][GH_macway] [retired]
+* [KMAC](keyboards/kmac/)                    - Korean custom keyboard
+* [Lightsaber](keyboards/lightsaber/)        - Korean custom keyboard
+* [Infinity](keyboards/infinity/)            - Massdrop [Infinity keyboard][Infinity]
+* [NerD](keyboards/nerd/)                    - Korean custom keyboard
+* [KittenPaw](keyboards/kitten_paw)          - Custom Majestouch controller
+* [Lightpad](keyboards/lightpad)             - Korean custom keypad
+* [ghost_squid](keyboards/ghost_squid/)      - [The Ghost Squid][ghost_squid] controller for [Cooler Master QuickFire XT][cmxt]
+
+### Extenal projects using tmk_keyboard
+* [ErgoDox_cub-uanic][cub-uanic]            - Split Ergonomic Keyboard [ErgoDox][ergodox_org]
+* [mcdox][mcdox_tmk]                        - [mcdox][mcdox]
+
+
+[GH_macway]:    http://geekhack.org/showwiki.php?title=Island:11930
+[GH_hhkb]:      http://geekhack.org/showwiki.php?title=Island:12047
+[GH_ps2]:       http://geekhack.org/showwiki.php?title=Island:14618
+[GH_adb]:       http://geekhack.org/showwiki.php?title=Island:14290
+[GH_hhkb_bt]:   http://geekhack.org/showwiki.php?title=Island:20851
+[GH_m0110]:     http://geekhack.org/showwiki.php?title=Island:24965
+[GH_news]:      http://geekhack.org/showwiki.php?title=Island:25759
+[GH_terminal]:  http://geekhack.org/showwiki.php?title=Island:27272
+[GH_x68k]:      http://geekhack.org/showwiki.php?title=Island:29060
+[GH_hbkb]:      http://geekhack.org/showwiki.php?title=Island:29483
+[GH_ibm4704]:   http://geekhack.org/index.php?topic=54706.0
+[HID_liber]:    http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions
+[Phantom]:      http://geekhack.org/index.php?topic=26742
+[GH60]:         http://geekhack.org/index.php?topic=34959
+[GH60_proto]:   http://geekhack.org/index.php?topic=37570.0
+[PC98]:         http://en.wikipedia.org/wiki/NEC_PC-9801
+[Sun]:          http://en.wikipedia.org/wiki/Sun-3
+[IIGS]:         http://en.wikipedia.org/wiki/Apple_IIGS
+[Infinity]:     https://www.massdrop.com/buy/infinity-keyboard-kit
+[ghost_squid]:  http://deskthority.net/wiki/Costar_replacement_controllers#The_Ghost_Squid
+[cmxt]:         http://gaming.coolermaster.com/en/products/keyboard/quickfirext/
+[ergodox_org]:  http://ergodox.org/
+[cub-uanic]:    https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox
+[mcdox]:        https://github.com/DavidMcEwan/mcdox
+[mcdox_tmk]:    https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox
+[Planck]:       http://olkb.co/planck
+[Preonic]:      http://olkb.co/preonic
+[Atomic]:       http://olkb.co/atomic
+[Ergodox_EZ]:   https://www.indiegogo.com/projects/ergodox-ez-an-incredible-mechanical-keyboard
+
+
+License
+-------
+**GPLv2** or later. Some protocol files are under **Modified BSD License**.
+
+Third party libraries like LUFA, PJRC and V-USB have their own license respectively.
+
+
+
+Build Firmware and Program Controller
+-------------------------------------
+See [build environment setup](/readme.md#build-environment-setup), or the readme in the particular keyboards/* folder.
+
+
+
+Change your keymap
+------------------
+See [doc/keymap.md](tmk_core/doc/keymap.md).
+
+
+
+Magic Commands
+--------------
+To see help press `Magic` + `H`.
+
+`Magic` key combination is `LShift` + `RShift` in many project, but `Power` key on ADB converter. 
+`Magic` keybind can be vary on each project, check `config.h` in project directory.
+
+Following commands can be also executed with `Magic` + key. In console mode `Magic` keybind is not needed.
+
+    ----- Command Help -----
+    c:      enter console mode
+    d:      toggle debug enable
+    x:      toggle matrix debug
+    k:      toggle keyboard debug
+    m:      toggle mouse debug
+    v:      print device version & info
+    t:      print timer count
+    s:      print status
+    e:     print eeprom config
+    n:     toggle NKRO
+    0/F10:  switch to Layer0
+    1/F1:   switch to Layer1
+    2/F2:   switch to Layer2
+    3/F3:   switch to Layer3
+    4/F4:   switch to Layer4
+    PScr:   power down/remote wake-up
+    Caps:   Lock Keyboard(Child Proof)
+    Paus:   jump to bootloader
+
+
+
+Boot Magic Configuration - Virtual DIP Switch
+---------------------------------------------
+Boot Magic are executed during boot up time. Press Magic key below then plug in keyboard cable.
+Note that you must use keys of **Layer 0** as Magic keys. These settings are stored in EEPROM so that retain your configure over power cycles.
+
+To avoid configuring accidentally additive salt key `KC_SPACE` also needs to be pressed along with the following configuration keys. The salt key is configurable in `config.h`. See [tmk_core/common/bootmagic.h](tmk_core/common/bootmagic.h).
+
+#### General
+- Skip reading EEPROM to start with default configuration(`ESC`)
+- Clear configuration stored in EEPROM to reset configuration(`Backspace`)
+
+#### Bootloader
+- Kick up Bootloader(`B`)
+
+#### Debug
+- Debug enable(`D`)
+- Debug matrix enable(`D`+`X`)
+- Debug keyboard enable(`D`+`K`)
+- Debug mouse enable(`D`+`M`)
+
+#### Keymap
+- Swap Control and CapsLock(`Left Control`)
+- Change CapsLock to Control(`Caps Lock`)
+- Swap LeftAlt and Gui(`Left Alt`)
+- Swap RightAlt and Gui(`Right Alt`)
+- Disable Gui(`Left Gui`)
+- Swap Grave and Escape(`Grave`)
+- Swap BackSlash and BackSpace(`Back Slash`)
+- Enable NKRO on boot(`N`)
+
+#### Default Layer
+- Set Default Layer to 0(`0`)
+- Set Default Layer to 1(`1`)
+- Set Default Layer to 2(`2`)
+- Set Default Layer to 3(`3`)
+- Set Default Layer to 4(`4`)
+- Set Default Layer to 5(`5`)
+- Set Default Layer to 6(`6`)
+- Set Default Layer to 7(`7`)
+
+
+
+Mechanical Locking support
+--------------------------
+This feature makes it possible for you to use mechanical locking switch for `CapsLock`, `NumLock` 
+or `ScrollLock`. To enable this feature define these macros in `config.h` and use `KC_LCAP`, `KC_LN
+UM` or `KC_LSCR` in keymap for locking key instead of normal `KC_CAPS`, `KC_NLCK` or `KC_SLCK`. Res
+ync option tries to keep switch state consistent with keyboard LED state.
+    #define LOCKING_SUPPORT_ENABLE
+    #define LOCKING_RESYNC_ENABLE
+
+
+
+Start Your Own Project
+-----------------------
+**TBD**
+
+
+
+Debugging
+--------
+Use PJRC's `hid_listen` to see debug messages. You can use the tool for debug even if firmware use LUFA stack.
+
+You can use xprintf() to display debug info on `hid_listen`, see `tmk_core/common/xprintf.h`.
+
+
+
+Files and Directories
+-------------------
+### Top
+* tmk_core/     - core library
+* keyboards/     - keyboard projects
+* converter/    - protocol converter projects
+* doc/          - documents
+
+
+
+Coding Style
+-------------
+- Doesn't use Tab to indent, use 4-spaces instead.
+
+
+
+Other Keyboard Firmware Projects
+------------------
+You can learn a lot about keyboard firmware from these. See [doc/other_projects.md](tmk_core/doc/other_projects.md).
diff --git a/docs/Tap-Dance.md b/docs/Tap-Dance.md
new file mode 100644 (file)
index 0000000..25827a6
--- /dev/null
@@ -0,0 +1,144 @@
+# Tap Dance: A single key can do 3, 5, or 100 different things
+
+Hit 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:
+
+With 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.
+
+To 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.
+
+With `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.
+
+The 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.
+
+But lets start with how to use it, first!
+
+First, 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.
+
+This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are three possible options:
+
+* `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.
+* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action.
+* `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.
+
+The 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.
+
+And that's the bulk of it!
+
+And now, on to the explanation of how it works!
+
+The 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.
+
+This 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.
+
+Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-dance keys.
+
+For 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.
+
+### Examples
+
+Here's a simple example for a single definition:
+
+1. In your `makefile`, add `TAP_DANCE_ENABLE = yes`
+2. In your `config.h` (which you can copy from `qmk_firmware/keyboards/planck/config.h` to your keymap directory), add `#define TAPPING_TERM 200`
+3. In your `keymap.c` file, define the variables and definitions, then add to your keymap:
+
+```c
+//Tap Dance Declarations
+enum {
+  TD_ESC_CAPS = 0
+};
+
+//Tap Dance Definitions
+qk_tap_dance_action_t tap_dance_actions[] = {
+  //Tap once for Esc, twice for Caps Lock
+  [TD_ESC_CAPS]  = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS)
+// Other declarations would go here, separated by commas, if you have them
+};
+
+//In Layer declaration, add tap dance item in place of a key code
+TD(TD_ESC_CAPS)
+```
+
+Here's a more complex example involving custom actions:
+
+```c
+enum {
+ CT_SE = 0,
+ CT_CLN,
+ CT_EGG,
+ CT_FLSH,
+};
+
+/* Have the above three on the keymap, TD(CT_SE), etc... */
+
+void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
+  if (state->count == 1) {
+    register_code (KC_RSFT);
+    register_code (KC_SCLN);
+  } else {
+    register_code (KC_SCLN);
+  }
+}
+
+void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) {
+  if (state->count == 1) {
+    unregister_code (KC_RSFT);
+    unregister_code (KC_SCLN);
+  } else {
+    unregister_code (KC_SCLN);
+  }
+}
+
+void dance_egg (qk_tap_dance_state_t *state, void *user_data) {
+  if (state->count >= 100) {
+    SEND_STRING ("Safety dance!");
+    reset_tap_dance (state);
+  }
+}
+
+// on each tap, light up one led, from right to left
+// on the forth tap, turn them off from right to left
+void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
+  switch (state->count) {
+  case 1:
+    ergodox_right_led_3_on();
+    break;
+  case 2:
+    ergodox_right_led_2_on();
+    break;
+  case 3:
+    ergodox_right_led_1_on();
+    break;
+  case 4:
+    ergodox_right_led_3_off();
+    _delay_ms(50);
+    ergodox_right_led_2_off();
+    _delay_ms(50);
+    ergodox_right_led_1_off();
+  }
+}
+
+// on the fourth tap, set the keyboard on flash state
+void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
+  if (state->count >= 4) {
+    reset_keyboard();
+    reset_tap_dance(state);
+  }
+}
+
+// if the flash state didnt happen, then turn off leds, left to right
+void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
+  ergodox_right_led_1_off();
+  _delay_ms(50);
+  ergodox_right_led_2_off();
+  _delay_ms(50);
+  ergodox_right_led_3_off();
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+  [CT_SE]  = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT)
+ ,[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset)
+ ,[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg)
+ ,[CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset)
+};
+```
diff --git a/docs/Test-for-ASCIIDOC.asciidoc b/docs/Test-for-ASCIIDOC.asciidoc
new file mode 100644 (file)
index 0000000..ce57d27
--- /dev/null
@@ -0,0 +1,17 @@
+
+
+
+.Makefile
+[source,Makefile]
+----
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = yes  # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes   # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes   # Audio control and System control(+450)
+CONSOLE_ENABLE = yes    # Console for debug(+400)
+COMMAND_ENABLE = yes    # Commands for debug and configuration
+#SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes       # USB Nkey Rollover - not yet supported in LUFA
+----
\ No newline at end of file
diff --git a/docs/USB-HID.md b/docs/USB-HID.md
new file mode 100644 (file)
index 0000000..1d0c458
--- /dev/null
@@ -0,0 +1,11 @@
+# Getting Report Descriptor
+```
+  $ cd /sys/bus/usb/drivers/usbhid
+  $ ls
+  1-1.3.4:1.0  1-1.3.4:1.2  bind    new_id     uevent
+  1-1.3.4:1.1  1-1.3.4:1.3  module  remove_id  unbind
+  $ echo -n 1-1.4\:1.0 | sudo tee unbind
+  $ sudo lsusb -vvv -d 046d:c01d
+  $ echo -n 1-1.4\:1.0 | sudo tee bind
+```
+
diff --git a/docs/USB_NKRO.txt b/docs/USB_NKRO.txt
new file mode 100644 (file)
index 0000000..d9f1d12
--- /dev/null
@@ -0,0 +1,160 @@
+USB NKRO MEMO
+=============
+2010/12/09
+
+
+References
+----------
+USB - boot mode, NKRO, compatibility, etc...
+    http://geekhack.org/showthread.php?t=13162
+NKey Rollover - Overview, Testing Methodology, and Results
+    http://geekhack.org/showwiki.php?title=NKey+Rollover+-+Overview+Testing+Methodology+and+Results
+dfj's NKRO(2010/06)
+    http://geekhack.org/showpost.php?p=191195&postcount=251
+    http://geekhack.org/showthread.php?p=204389#post204389
+
+
+Terminology
+---------
+NKRO
+ghost
+matrix
+mechanical with diodes
+membrane
+
+
+OS Support Status
+-----------------
+USB NKRO is possible *without* a custom driver.
+At least following OS's supports.
+    Windows7 64bit
+    WindowsXP
+    Windows2000 SP4
+    Ubuntu10.4(Linux 2.6)
+    MacOSX(To be tested)
+
+
+Custom Driver for USB NKRO
+--------------------------
+NOT NEEDED
+at least when using following report formats on Windows, Linux or MacOSX.
+
+
+USB NKRO methods
+----------------
+1. Virtual keyboards
+    Keyboard can increase its KRO by using virtual keyboards with Standard or Extended report.
+    If the keyboard has 2 virtual keyboard with Standard report(6KRO), it gets 12KRO.
+    Using this method means the keyboard is a composite device.
+
+2. Extended report
+    It needs large report size for this method to achieve NKRO.
+    If a keyboard has 101keys, it needs 103byte report. It seems to be inefficient.
+
+3. Bitmap report
+    If the keyboard has less than 128keys, 16byte report will be enough for NKRO.
+    The 16byte report seems to be reasonable cost to get NKRO.
+
+
+Report Format
+-------------
+Other report formats than followings are possible, though these format are typical one.
+
+1. Standard             8bytes
+    modifiers(bitmap)       1byte
+    reserved                1byte(not used)
+    keys(array)             1byte*6
+Standard report can send 6keys plus 8modifiers simultaneously.
+Standard report is used by most keyboards in the marketplace.
+Standard report is identical to boot protocol report.
+Standard report is hard to suffer from compatibility problems.
+
+2. Extended standard    16,32,64bytes
+    modifiers(bitmap)       1byte
+    reserved                1byte(not used)
+    keys(array)             1byte*(14,32,62)
+Extended report can send N-keys by using N+2bytes.
+Extended report is expected to be compatible with boot protocol.
+
+3. Bitmap               16,32,64bytes
+    keys(bitmap)            (16,32)bytes
+Bitmap report can send at most 128keys by 16bytes and 256keys by 32bytes.
+Bitmap report can achieve USB NKRO efficiently in terms of report size.
+Bitmap report needs a deliberation for boot protocol implementation.
+Bitmap report descriptor sample:
+        0x05, 0x01,                     // Usage Page (Generic Desktop),
+        0x09, 0x06,                     // Usage (Keyboard),
+        0xA1, 0x01,                     // Collection (Application),
+        // bitmap of modifiers
+        0x75, 0x01,                     //   Report Size (1),
+        0x95, 0x08,                     //   Report Count (8),
+        0x05, 0x07,                     //   Usage Page (Key Codes),
+        0x19, 0xE0,                     //   Usage Minimum (224),
+        0x29, 0xE7,                     //   Usage Maximum (231),
+        0x15, 0x00,                     //   Logical Minimum (0),
+        0x25, 0x01,                     //   Logical Maximum (1),
+        0x81, 0x02,                     //   Input (Data, Variable, Absolute), ;Modifier byte
+        // LED output report
+        0x95, 0x05,                     //   Report Count (5),
+        0x75, 0x01,                     //   Report Size (1),
+        0x05, 0x08,                     //   Usage Page (LEDs),
+        0x19, 0x01,                     //   Usage Minimum (1),
+        0x29, 0x05,                     //   Usage Maximum (5),
+        0x91, 0x02,                     //   Output (Data, Variable, Absolute),
+        0x95, 0x01,                     //   Report Count (1),
+        0x75, 0x03,                     //   Report Size (3),
+        0x91, 0x03,                     //   Output (Constant),
+        // bitmap of keys
+        0x95, (REPORT_BYTES-1)*8,      //   Report Count (),
+        0x75, 0x01,                     //   Report Size (1),
+        0x15, 0x00,                     //   Logical Minimum (0),
+        0x25, 0x01,                     //   Logical Maximum(1),
+        0x05, 0x07,                     //   Usage Page (Key Codes),
+        0x19, 0x00,                     //   Usage Minimum (0),
+        0x29, (REPORT_BYTES-1)*8-1,    //   Usage Maximum (),
+        0x81, 0x02,                     //   Input (Data, Variable, Absolute),
+        0xc0                            // End Collection
+where REPORT_BYTES is a report size in bytes.
+
+
+Considerations
+--------------
+Compatibility
+    boot protocol
+    minor/old system
+        Some BIOS doesn't send SET_PROTOCOL request, a keyboard can't switch to boot protocol mode.
+        This may cause a problem on a keyboard which uses other report than Standard.
+Reactivity
+    USB polling time
+    OS/Driver processing time
+
+
+Windows Problem
+---------------
+1. Windows accepts only 6keys  in case of Standard report.
+        It should be able to send 6keys plus 8modifiers.
+2. Windows accepts only 10keys in case of 16bytes Extended report.
+        It should be able to send 14keys plus 8modifiers.
+3. Windows accepts only 18keys in case of 32bytes Extended report.
+        It should be able to send 30keys plus 8modifiers.
+If keys are pressed in excess of the number, wrong keys are registered on Windows.
+
+This problem will be reportedly fixed soon.(2010/12/05)
+    http://forums.anandtech.com/showpost.php?p=30873364&postcount=17
+
+
+Tools for testing NKRO
+----------------------
+Browser App:
+http://www.microsoft.com/appliedsciences/content/projects/KeyboardGhostingDemo.aspx
+http://random.xem.us/rollover.html
+
+Windows:
+AquaKeyTest.exe http://geekhack.org/showthread.php?t=6643
+
+Linux:
+xkeycaps
+xev
+showkeys
+
+EOF
diff --git a/docs/Unicode-and-additional-language-support.md b/docs/Unicode-and-additional-language-support.md
new file mode 100644 (file)
index 0000000..562dae4
--- /dev/null
@@ -0,0 +1,54 @@
+## Unicode support
+
+There are three Unicode keymap definition method available in QMK:
+
+### UNICODE_ENABLE
+
+Supports Unicode input up to 0xFFFF. The keycode function is `UC(n)` in
+keymap file, where *n* is a 4 digit hexadecimal.
+
+### UNICODEMAP_ENABLE
+
+Supports Unicode up to 0xFFFFFFFF. You need to maintain a separate mapping
+table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file.
+The keycode function is `X(n)` where *n* is the array index of the mapping
+table.
+
+### UCIS_ENABLE
+
+TBD
+
+Unicode input in QMK works by inputing a sequence of characters to the OS,
+sort of like macro. Unfortunately, each OS has different ideas on how Unicode is inputted.
+
+This is the current list of Unicode input method in QMK:
+
+* 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.
+* 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.
+* 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.
+* UC_WINC: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows.
+
+## Additional language support
+
+In `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.
+
+## International Characters on Windows
+
+[AutoHotkey](https://autohotkey.com) allows Windows users to create custom hotkeys among others.
+
+The method does not require Unicode support in the keyboard itself but depends instead of AutoHotkey running in the background.
+
+First you need to select a modifier combination that is not in use by any of your programs.
+CtrlAltWin is not used very widely and should therefore be perfect for this.
+There is a macro defined for a mod-tab combo `LCAG_T`.
+Add this mod-tab combo to a key on your keyboard, e.g.: `LCAG_T(KC_TAB)`.
+This makes the key behave like a tab key if pressed and released immediately but changes it to the modifier if used with another key.
+
+In the default script of AutoHotkey you can define custom hotkeys.
+
+    <^<!<#a::Send, ä
+    <^<!<#<+a::Send, Ä
+
+The hotkeys above are for the combination CtrlAltGui and CtrlAltGuiShift plus the letter a.
+AutoHotkey inserts the Text right of `Send, ` when this combination is pressed.
+
diff --git a/docs/Unit-testing.md b/docs/Unit-testing.md
new file mode 100644 (file)
index 0000000..3eac625
--- /dev/null
@@ -0,0 +1,68 @@
+# Unit Testing
+
+If 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.
+
+Instead I recommend these two books, explaining two different styles of Unit Testing in detail.
+
+* "Test Driven Development: By Example: Kent Beck"
+* "Growing Object-Oriented Software, Guided By Tests: Steve Freeman, Nat Pryce"
+
+If 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.
+
+## Google Test and Google Mock
+It'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.
+
+## Use of C++
+
+Note 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.
+
+One thing to remember, is that you have to append `extern "C"` around all of your C file includes.
+
+## Adding tests for new or existing features
+
+If 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.
+
+1. If it doesn't already exist, add a test subfolder to the folder containing the feature.
+2. Create a `testlist.mk` and a `rules.mk` file in that folder.
+3. Include those files from the root folder `testlist.mk`and `build_test.mk` respectively.
+4. 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.
+5. Define the source files and required options in the `rules.mk` file.
+   * `_SRC` for source files
+   * `_DEFS` for additional defines
+   * `_INC` for additional include folders
+6. 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.
+
+Note 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)
+
+## Running the tests
+
+To 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.
+
+## Debugging the tests
+
+If 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.
+
+## Full Integration tests
+
+It'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.
+
+In that model you would emulate the input, and expect a certain output from the emulated keyboard.
+
+# Tracing variables 
+
+Sometimes 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.
+
+To 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. 
+
+Then 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
+```c
+void matrix_init_user(void) {
+  ADD_TRACED_VARIABLE("layer", &layer_state, sizeof(layer_state));
+}
+```
+
+This 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.
+
+In 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.
+
+Also 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/docs/VAGRANT_GUIDE.md b/docs/VAGRANT_GUIDE.md
new file mode 100644 (file)
index 0000000..439e78d
--- /dev/null
@@ -0,0 +1,27 @@
+# Quick Start Directions
+
+This project includes a Vagrantfile that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter.
+
+## Requirements
+
+Using the `/Vagrantfile` in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as [VirtualBox](https://www.virtualbox.org/) (or [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) but the (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion).
+
+*COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** `vagrant plugin install vagrant-vbguest`
+
+
+Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below.
+
+Build Firmware and Program Controller
+-------------------------------------
+See [/doc/BUIDE_GUIDE.md](/doc/BUILD_GUIDE.md), or the readme in the particular keyboards/* folder.
+
+Change your keymap
+------------------
+See [/doc/keymap.md](/doc/keymap.md).
+
+## Flashing the firmware
+
+The "easy" way to flash the firmware is using a tool from your host OS like the Teensy programming app. [ErgoDox EZ](/keyboards/ergodox/readme.md) gives a great example.
+
+If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version.
+       
diff --git a/docs/_Sidebar.md b/docs/_Sidebar.md
new file mode 100644 (file)
index 0000000..f82c44c
--- /dev/null
@@ -0,0 +1,21 @@
+* [Wiki Home](/qmk/qmk_firmware/wiki)
+* Getting started
+  * [QMK Overview](QMK-Overview)
+  * [Build Environment Setup](Build-Environment-Setup)
+* [Overview for keymap creators](Keymap)
+ * [Keycodes](Keycodes)
+ * [Layer switching](Key-Functions)
+ * [Leader Key](Leader-Key)
+ * [Macros](Macros)
+ * [Space Cadet](Space-Cadet-Shift)
+ * [Tap Dance](Tap-Dance)
+ * [Mouse keys](Mouse-keys)
+ * [FAQ: Creating a Keymap](FAQ-Keymap)
+ * [FAQ: Compiling QMK](FAQ-Build)
+* For hardware makers and modders
+  * [Modding your keyboard](Modding-your-keyboard)
+  * [Porting your keyboard to QMK](Porting-your-keyboard-to-QMK)
+  * [Adding features to QMK](Adding-features-to-QMK)
+* [General FAQ](FAQ)
+
+
diff --git a/docs/basic_how_keyboards_work.md b/docs/basic_how_keyboards_work.md
new file mode 100644 (file)
index 0000000..73c3f5c
--- /dev/null
@@ -0,0 +1,96 @@
+# How keys are registered, and interpreted by computers
+
+In this file, you can will learn the concepts of how keyboards work over USB,
+and you'll be able to better understand what you can expect from changing your
+firmware directly.
+
+## Schematic view
+
+Whenever you type on 1 particular key, here is the chain of actions taking
+place:
+
+``` text
++------+         +-----+       +----------+      +----------+     +----+
+| User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS |
++------+         +-----+       +----------+      +----------+     |----+
+```
+
+This scheme is a very simple view of what's going on, and more details follow
+in the next sections.
+
+## 1. You Press a Key
+
+Whenever you press a key, the firmware of your keyboard can register this event.
+It can register when the key is pressed, held and released.
+
+This usually happens with a [periodic scan of key presses with a frequency around 100 hz](https://github.com/benblazak/ergodox-firmware/blob/master/references.md#typical-keyboard-information).
+This speed often is limited by the mechanical key response time, the protocol
+to transfer those key presses (here USB HID), and by the software it is used in.
+
+## 2. What the Firmware Sends
+
+The [HID specification](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf)
+tells what a keyboard can actually send through USB to have a chance to be
+properly recognised. This includes a pre-defined list of keycodes which are
+simple numbers from `0x00` to `0xE7`. The firmware assigns a keycode to each
+key of the keyboard.
+
+The firmware does not send actually letters or characters, but only keycodes.
+Thus, by modifying the firmware, you only can modify what keycode is sent over
+USB for a given key.
+
+## 3. What the Operating System Does
+
+Once the keycode reaches the operating system, a piece of software has to have
+it match an actual character thanks to a keyboard layout. For example, if your
+layout is set to QWERTY, a sample of the matching table is as follow:
+
+``` text
+| keycode | character |
+|---------+-----------|
+|    0x04 | a/A       |
+|    0x05 | b/B       |
+|    0x06 | c/C       |
+|     ... | ...       |
+|    0x1C | y/Y       |
+|    0x1D | z/Z       |
+|     ... | ...       |
+|---------+-----------|
+```
+
+## Back to the firmware
+
+As the layout is generally fixed (unless you create your own), the firmware can
+actually call a keycode by its layout name directly to ease things for you.
+
+This is exactly what is done here with `KC_A` actually representing `0x04` in
+QWERTY. The full list can be found in `keycode.txt`.
+
+## List of Characters You Can Send
+
+Putting aside shortcuts, having a limited set of keycodes mapped to a limited
+layout means that **the list of characters you can assign to a given key only
+is the ones present in the layout**.
+
+For example, this means that if you have a QWERTY US layout, and you want to
+assign 1 key to produce `€` (euro currency symbol), you are unable to do so,
+because the QWERTY US layout does not have such mapping. You could fix that by
+using a QWERTY UK layout, or a QWERTY US International.
+
+You may wonder why a keyboard layout containing all of Unicode is not devised
+then? The limited number of keycode available through USB simply disallow such
+a thing.
+
+## How to (Maybe) Enter Unicode Characters
+
+You can have the firmware send *sequences of keys* to use the [software Unicode
+Input
+Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input) of
+the target operating system, thus effectively entering characters independently
+of the layout defined in the OS.
+
+Yet, it does come with multiple disadvantages:
+
+ - Tied to a specific OS a a time (need recompilation when changing OS);
+ - Within a given OS, does not work in all software;
+ - Limited to a subset of Unicode on some systems.
diff --git a/docs/build_old.md b/docs/build_old.md
new file mode 100644 (file)
index 0000000..5c2d57d
--- /dev/null
@@ -0,0 +1,187 @@
+Build Firmware and Program Controller
+=====================================
+
+## This guide may be out-dated - use doc/BUILD_GUIDE.md instead
+
+Download and Install
+--------------------
+### 1. Install Tools
+
+1. **Toolchain** On Windows install [MHV AVR Tools][mhv] for AVR GCC compiler and [Cygwin][cygwin](or [MinGW][mingw]) for shell terminal. On Mac you can use [CrossPack][crosspack]. On Linux you can install AVR GCC (and avr-libc) with your favorite package manager or run the avr_setup.sh script in the root of this repository.
+
+2. **Programmer** On Windows install [Atmel FLIP][flip]. On Mac and Linux install [dfu-programmer][dfu-prog].
+
+3. **Driver** On Windows you start DFU bootloader on the chip first time you will see 'Found New Hardware Wizard' to install driver. If you install device driver properly you can find chip name like 'ATmega32U4' under 'LibUSB-Win32 Devices' tree on 'Device Manager'. If not you shall need to update its driver on 'Device Manager'. You will find the driver in `FLIP` install directory like: C:\Program Files (x86)\Atmel\Flip 3.4.5\usb\. In case of `dfu-programmer` use its driver.
+
+If you use PJRC Teensy you don't need step 2 and 3 above, just get [Teensy loader][teensy-loader].
+
+
+### 2. Download source
+You can find firmware source at github:
+
+- <https://github.com/tmk/tmk_keyboard>
+
+If you are familiar with `Git` tools you are recommended to use it but you can also download zip archive from:
+
+- <https://github.com/tmk/tmk_keyboard/archive/master.zip>
+
+
+Build firmware
+--------------
+### 1. Open terminal
+Open terminal window to get access to commands. Use Cygwin(or MingGW) `shell terminal` in Windows or `Terminal.app` on Mac OSX. In Windows press `Windows` key and `R` then enter `cmd` in 'Run command' dialog showing up.
+
+### 2. Change directory
+Move to project directory in the firmware source.
+
+    cd tmk_keyboard/{'keyboard' or 'converter'}/<project>
+
+### 3. Make
+Build firmware using GNU `make` command. You'll see `<project>_<variant>.hex` file in that directory unless something unexpected occurs in build process.
+
+
+    make -f Makefile.<variant> clean
+    make -f Makefile.<variant>
+
+
+
+
+Program Controller
+------------------
+Now you have **hex** file to program on current directory. This **hex** is only needed to program your controller, other files are used for development and you may leave and forget them.
+
+### 1. Start bootloader
+How to program controller depends on controller chip and its board design. To program AVR USB chips you'll need to start it up in bootloader mode. Most of boards with the chip have a push button to let bootloader come up. Consult with your controller board manual.
+
+### 2. Program with DFU bootloader
+Stock AVR USB chip including ATmega32U4 has DFU bootloader by factory default. `FLIP` is a DFU programmer on Windows offered by Atmel. Open source command line tool `dfu-programmer` also supports AVR chips, it runs on Linux, Mac OSX and even Windows.
+
+To program AVR chip with DFU bootloader use `FLIP` or `dfu-programmer`.
+If you have a proper program command in `Makefile` just type this.
+
+`FLIP` has two version of tool, GUI app and command line program. If you want GUI see tutorial below.
+To use command line tool run this command. Note that you need to set PATH variable properly.
+
+    $ make -f Makefile.<variant> flip
+
+Or to program with `dfu-programmer` run:
+
+    $ make -f Makefile.<variant> dfu
+
+#### FLIP GUI tutorial
+1. On menu bar click Device -> Select, then. `ATmega32u4`.
+2. On menu bar click Settings -> Communication -> USB, then click 'Open' button on 'USB Port Connection' dialog.
+At this point you'll see grey-outed widgets on the app get colored and ready.
+
+3. On menu bar click File -> Load HEX File, then select your firmware hex file on File Selector dialog.
+4. On 'Operations Flow' panel click 'Run' button to load the firmware binary to the chip. Note that you should keep 'Erase', 'Blank Check', 'Program' and 'Verify' check boxes selected.
+5. Re-plug USB cord or click 'Start Application' button to restart your controller.
+Done.
+
+See also these instructions if you need.
+
+- <http://code.google.com/p/micropendous/wiki/LoadingFirmwareWithFLIP>
+- <http://www.atmel.com/Images/doc7769.pdf>
+
+
+### 3. Program with Teensy Loader
+If you have PJRC Teensy see instruction of `Teensy Loader`.
+
+- <http://www.pjrc.com/teensy/loader.html>
+
+Or use this command if you have command line version of Teensy Loader installed.
+
+    $ make -f Makefile.<variant> teensy
+
+
+### 4. Program with Other programmer
+You may want to use other programmer like `avrdude` with AVRISPmkII, Arduino or USBasp. In that case you can still use make target `program` for build with configuring `PROGRAM_CMD` in Makefile.
+
+    $ make -f Makefile.<variant> program
+
+
+[cygwin]:       https://www.cygwin.com/
+[mingw]:        http://www.mingw.org/
+[mhv]:          https://infernoembedded.com/products/avr-tools
+[winavr]:       http://winavr.sourceforge.net/
+[crosspack]:    http://www.obdev.at/products/crosspack/index.html
+[flip]:         http://www.atmel.com/tools/FLIP.aspx
+[dfu-prog]:     http://dfu-programmer.sourceforge.net/
+[teensy-loader]:http://www.pjrc.com/teensy/loader.html
+
+
+
+Makefile Options
+----------------
+### 1. MCU and Frequency.
+
+    MCU = atmega32u4       # Teensy 2.0
+    #MCU = at90usb1286      # Teensy++ 2.0
+    F_CPU = 16000000
+
+Set your MCU and its clock in Hz.
+
+    # Boot Section Size in *bytes*
+    #   Teensy halfKay   512
+    #   Atmel DFU loader 4096
+    #   LUFA bootloader  4096
+    OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+If you are using PJRC Teensy use `512` for `BOOTLOADER_SIZE`, otherwise use `4096` unless you are sure.
+
+### 2. Features
+Optional. Note that ***comment out*** with `#` to disable them.
+
+    BOOTMAGIC_ENABLE = yes      # Virtual DIP switch configuration(+1000)
+    MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+    EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+    CONSOLE_ENABLE = yes        # Console for debug(+400)
+    COMMAND_ENABLE = yes        # Commands for debug and configuration
+    SLEEP_LED_ENABLE = yes      # Breathing sleep LED during USB suspend
+    #NKRO_ENABLE = yes          # USB Nkey Rollover - not yet supported in LUFA
+    #BACKLIGHT_ENABLE = yes     # Enable keyboard backlight functionality
+
+### 3. Programmer
+Optional. Set proper command for your controller, bootloader and programmer. This command can be used with `make program`. Not needed if you use `FLIP`, `dfu-programmer` or `Teensy Loader`.
+
+    # avrdude with AVRISPmkII
+    PROGRAM_CMD = avrdude -p $(MCU) -c avrispmkII -P USB -U flash:w:$(TARGET).hex
+
+    # avrdude with USBaspLoader
+    PROGRAM_CMD = avrdude -p $(MCU) -c usbasp -U flash:w:$(TARGET).hex
+
+    # avrdude with arduino
+    PROGRAM_CMD = avrdude -p $(MCU) -c arduino -P COM1 -b 57600 -U flash:w:$(TARGET).hex
+
+
+
+Config.h Options
+----------------
+### 1. Magic command key combination
+
+    #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_RSHIFT)))
+
+### 2. Mechanical Locking Support for CapsLock
+
+    /* Mechanical locking CapsLock support. Use KC_LCAP instead of KC_CAPS in keymap */
+    #define CAPSLOCK_LOCKING_ENABLE
+    /* Locking CapsLock re-synchronize hack */
+    #define CAPSLOCK_LOCKING_RESYNC_ENABLE
+
+### 3. Disable Debug and Print
+
+    /* disable debug print */
+    #define NO_DEBUG
+
+    /* disable print */
+    #define NO_PRINT
+
+### 4. Disable Action Features
+
+    #define NO_ACTION_LAYER
+    #define NO_ACTION_TAPPING
+    #define NO_ACTION_ONESHOT
+    #define NO_ACTION_MACRO
+    #define NO_ACTION_FUNCTION
+
+***TBD***
diff --git a/docs/gitbook/images/favicon.ico b/docs/gitbook/images/favicon.ico
new file mode 100644 (file)
index 0000000..bd9e65b
Binary files /dev/null and b/docs/gitbook/images/favicon.ico differ
diff --git a/docs/gitbook/images/favicon.png b/docs/gitbook/images/favicon.png
new file mode 100644 (file)
index 0000000..0f3343d
Binary files /dev/null and b/docs/gitbook/images/favicon.png differ
diff --git a/docs/keycode.txt b/docs/keycode.txt
new file mode 100644 (file)
index 0000000..3ecf424
--- /dev/null
@@ -0,0 +1,261 @@
+Keycode Symbol Table
+====================
+Keycodes are defined in `common/keycode.h`.
+Range of 00-A4 and E0-E7 are identical with HID Usage:
+<http://www.usb.org/developers/hidpage/Hut1_12v2.pdf>
+Virtual keycodes are defined out of above range to support special actions.
+
+
+Keycode Symbol      Short name      Description
+--------------------------------------------------------------------------------
+KC_NO                               00 Reserved (no event indicated)
+KC_ROLL_OVER                        01 Keyboard ErrorRollOver
+KC_POST_FAIL                        02 Keyboard POSTFail
+KC_UNDEFINED                        03 Keyboard ErrorUndefined
+KC_A                                04 Keyboard a and A
+KC_B                                05 Keyboard b and B
+KC_C                                06 Keyboard c and C
+KC_D                                07 Keyboard d and D
+KC_E                                08 Keyboard e and E
+KC_F                                09 Keyboard f and F
+KC_G                                0A Keyboard g and G
+KC_H                                0B Keyboard h and H
+KC_I                                0C Keyboard i and I
+KC_J                                0D Keyboard j and J
+KC_K                                0E Keyboard k and K
+KC_L                                0F Keyboard l and L
+KC_M                                10 Keyboard m and M
+KC_N                                11 Keyboard n and N
+KC_O                                12 Keyboard o and O
+KC_P                                13 Keyboard p and P
+KC_Q                                14 Keyboard q and Q
+KC_R                                15 Keyboard r and R
+KC_S                                16 Keyboard s and S
+KC_T                                17 Keyboard t and T
+KC_U                                18 Keyboard u and U
+KC_V                                19 Keyboard v and V
+KC_W                                1A Keyboard w and W
+KC_X                                1B Keyboard x and X
+KC_Y                                1C Keyboard y and Y
+KC_Z                                1D Keyboard z and Z
+KC_1                                1E Keyboard 1 and !
+KC_2                                1F Keyboard 2 and @
+KC_3                                20 Keyboard 3 and #
+KC_4                                21 Keyboard 4 and $
+KC_5                                22 Keyboard 5 and %
+KC_6                                23 Keyboard 6 and ^
+KC_7                                24 Keyboard 7 and &
+KC_8                                25 Keyboard 8 and *
+KC_9                                26 Keyboard 9 and (
+KC_0                                27 Keyboard 0 and )
+KC_ENTER            KC_ENT          28 Keyboard Return (ENTER)
+KC_ESCAPE           KC_ESC          29 Keyboard ESCAPE
+KC_BSPACE           KC_BSPC         2A Keyboard DELETE (Backspace)
+KC_TAB                              2B Keyboard Tab
+KC_SPACE            KC_SPC          2C Keyboard Spacebar
+KC_MINUS            KC_MINS         2D Keyboard - and (underscore)
+KC_EQUAL            KC_EQL          2E Keyboard = and +
+KC_LBRACKET         KC_LBRC         2F Keyboard [ and {
+KC_RBRACKET         KC_RBRC         30 Keyboard ] and }
+KC_BSLASH           KC_BSLS         31 Keyboard \ and |
+KC_NONUS_HASH       KC_NUHS         32 Keyboard Non-US # and ~
+KC_SCOLON           KC_SCLN         33 Keyboard ; and :
+KC_QUOTE            KC_QUOT         34 Keyboard ‘ and “
+KC_GRAVE            KC_GRV          35 Keyboard Grave Accent and Tilde
+KC_COMMA            KC_COMM         36 Keyboard , and <
+KC_DOT                              37 Keyboard . and >
+KC_SLASH            KC_SLSH         38 Keyboard / and ?
+KC_CAPSLOCK         KC_CAPS         39 Keyboard Caps Lock
+KC_F1                               3A Keyboard F1
+KC_F2                               3B Keyboard F2
+KC_F3                               3C Keyboard F3
+KC_F4                               3D Keyboard F4
+KC_F5                               3E Keyboard F5
+KC_F6                               3F Keyboard F6
+KC_F7                               40 Keyboard F7
+KC_F8                               41 Keyboard F8
+KC_F9                               42 Keyboard F9
+KC_F10                              43 Keyboard F10
+KC_F11                              44 Keyboard F11
+KC_F12                              45 Keyboard F12
+KC_PSCREEN          KC_PSCR         46 Keyboard PrintScreen
+KC_SCROLLLOCK       KC_SLCK         47 Keyboard Scroll Lock
+KC_PAUSE            KC_PAUS         48 Keyboard Pause
+KC_INSERT           KC_INS          49 Keyboard Insert
+KC_HOME                             4A Keyboard Home
+KC_PGUP                             4B Keyboard PageUp
+KC_DELETE           KC_DEL          4C Keyboard Delete Forward
+KC_END                              4D Keyboard End
+KC_PGDOWN           KC_PGDN         4E Keyboard PageDown
+KC_RIGHT            KC_RGHT         4F Keyboard RightArrow
+KC_LEFT                             50 Keyboard LeftArrow
+KC_DOWN                             51 Keyboard DownArrow
+KC_UP                               52 Keyboard UpArrow
+KC_NUMLOCK          KC_NLCK         53 Keypad Num Lock and Clear
+KC_KP_SLASH         KC_PSLS         54 Keypad /
+KC_KP_ASTERISK      KC_PAST         55 Keypad *
+KC_KP_MINUS         KC_PMNS         56 Keypad -
+KC_KP_PLUS          KC_PPLS         57 Keypad +
+KC_KP_ENTER         KC_PENT         58 Keypad ENTER
+KC_KP_1             KC_P1           59 Keypad 1 and End
+KC_KP_2             KC_P2           5A Keypad 2 and Down Arrow
+KC_KP_3             KC_P3           5B Keypad 3 and PageDn
+KC_KP_4             KC_P4           5C Keypad 4 and Left Arrow
+KC_KP_5             KC_P5           5D Keypad 5
+KC_KP_6             KC_P6           5E Keypad 6 and Right Arrow
+KC_KP_7             KC_P7           5F Keypad 7 and Home
+KC_KP_8             KC_P8           60 Keypad 8 and Up Arrow
+KC_KP_9             KC_P9           61 Keypad 9 and PageUp
+KC_KP_0             KC_P0           62 Keypad 0 and Insert
+KC_KP_DOT           KC_PDOT         63 Keypad . and Delete
+KC_NONUS_BSLASH     KC_NUBS         64 Keyboard Non-US \ and |
+KC_APPLICATION      KC_APP          65 Keyboard Application
+KC_POWER                            66 Keyboard Power
+KC_KP_EQUAL         KC_PEQL         67 Keypad =
+KC_F13                              68 Keyboard F13
+KC_F14                              69 Keyboard F14
+KC_F15                              6A Keyboard F15
+KC_F16                              6B Keyboard F16
+KC_F17                              6C Keyboard F17
+KC_F18                              6D Keyboard F18
+KC_F19                              6E Keyboard F19
+KC_F20                              6F Keyboard F20
+KC_F21                              70 Keyboard F21
+KC_F22                              71 Keyboard F22
+KC_F23                              72 Keyboard F23
+KC_F24                              73 Keyboard F24
+KC_EXECUTE                          74 Keyboard Execute
+KC_HELP                             75 Keyboard Help
+KC_MENU                             76 Keyboard Menu
+KC_SELECT                           77 Keyboard Select
+KC_STOP                             78 Keyboard Stop
+KC_AGAIN                            79 Keyboard Again
+KC_UNDO                             7A Keyboard Undo
+KC_CUT                              7B Keyboard Cut
+KC_COPY                             7C Keyboard Copy
+KC_PASTE                            7D Keyboard Paste
+KC_FIND                             7E Keyboard Find
+KC__MUTE                            7F Keyboard Mute
+KC__VOLUP                           80 Keyboard Volume Up
+KC__VOLDOWN                         81 Keyboard Volume Down
+KC_LOCKING_CAPS                     82 Keyboard Locking Caps Lock
+KC_LOCKING_NUM                      83 Keyboard Locking Num Lock
+KC_LOCKING_SCROLL                   84 Keyboard Locking Scroll Lock
+KC_KP_COMMA         KC_PCMM         85 Keypad Comma
+KC_KP_EQUAL_AS400                   86 Keypad Equal Sign
+KC_INT1             KC_RO           87 Keyboard International115
+KC_INT2             KC_KANA         88 Keyboard International216
+KC_INT3             KC_JYEN         89 Keyboard International317
+KC_INT4             KC_HENK         8A Keyboard International418
+KC_INT5             KC_MHEN         8B Keyboard International519
+KC_INT6                             8C Keyboard International620
+KC_INT7                             8D Keyboard International721
+KC_INT8                             8E Keyboard International822
+KC_INT9                             8F Keyboard International922
+KC_LANG1                            90 Keyboard LANG125
+KC_LANG2                            91 Keyboard LANG226
+KC_LANG3                            92 Keyboard LANG330
+KC_LANG4                            93 Keyboard LANG431
+KC_LANG5                            94 Keyboard LANG532
+KC_LANG6                            95 Keyboard LANG68
+KC_LANG7                            96 Keyboard LANG78
+KC_LANG8                            97 Keyboard LANG88
+KC_LANG9                            98 Keyboard LANG98
+KC_ALT_ERASE                        99 Keyboard Alternate Erase
+KC_SYSREQ                           9A Keyboard SysReq/Attention
+KC_CANCEL                           9B Keyboard Cancel
+KC_CLEAR                            9C Keyboard Clear
+KC_PRIOR                            9D Keyboard Prior
+KC_RETURN                           9E Keyboard Return
+KC_SEPARATOR                        9F Keyboard Separator
+KC_OUT                              A0 Keyboard Out
+KC_OPER                             A1 Keyboard Oper
+KC_CLEAR_AGAIN                      A2 Keyboard Clear/Again
+KC_CRSEL                            A3 Keyboard CrSel/Props
+KC_EXSEL                            A4 Keyboard ExSel
+/* Modifiers */
+KC_LCTRL            KC_LCTL         E0 Keyboard LeftControl
+KC_LSHIFT           KC_LSFT         E1 Keyboard LeftShift
+KC_LALT                             E2 Keyboard LeftAlt
+KC_LGUI                             E3 Keyboard Left GUI(Windows/Apple/Meta key)
+KC_RCTRL            KC_RCTL         E4 Keyboard RightControl
+KC_RSHIFT           KC_RSFT         E5 Keyboard RightShift
+KC_RALT                             E6 Keyboard RightAlt
+KC_RGUI                             E7 Keyboard Right GUI(Windows/Apple/Meta key)
+
+/* 
+ * Virtual keycodes
+ */
+/* System Control */
+KC_SYSTEM_POWER     KC_PWR          System Power Down
+KC_SYSTEM_SLEEP     KC_SLEP         System Sleep
+KC_SYSTEM_WAKE      KC_WAKE         System Wake
+/* Consumer Page */
+KC_AUDIO_MUTE       KC_MUTE
+KC_AUDIO_VOL_UP     KC_VOLU
+KC_AUDIO_VOL_DOWN   KC_VOLD
+KC_MEDIA_NEXT_TRACK KC_MNXT
+KC_MEDIA_PREV_TRACK KC_MPRV
+KC_MEDIA_STOP       KC_MSTP
+KC_MEDIA_PLAY_PAUSE KC_MPLY
+KC_MEDIA_SELECT     KC_MSEL
+KC_MAIL             KC_MAIL
+KC_CALCULATOR       KC_CALC
+KC_MY_COMPUTER      KC_MYCM
+KC_WWW_SEARCH       KC_WSCH
+KC_WWW_HOME         KC_WHOM
+KC_WWW_BACK         KC_WBAK
+KC_WWW_FORWARD      KC_WFWD
+KC_WWW_STOP         KC_WSTP
+KC_WWW_REFRESH      KC_WREF
+KC_WWW_FAVORITES    KC_WFAV
+/* Mousekey */
+KC_MS_UP            KC_MS_U         Mouse Cursor Up
+KC_MS_DOWN          KC_MS_D         Mouse Cursor Down
+KC_MS_LEFT          KC_MS_L         Mouse Cursor Left
+KC_MS_RIGHT         KC_MS_R         Mouse Cursor Right
+KC_MS_BTN1          KC_BTN1         Mouse Button 1
+KC_MS_BTN2          KC_BTN2         Mouse Button 2
+KC_MS_BTN3          KC_BTN3         Mouse Button 3
+KC_MS_BTN4          KC_BTN4         Mouse Button 4
+KC_MS_BTN5          KC_BTN5         Mouse Button 5
+KC_MS_WH_UP         KC_WH_U         Mouse Wheel Up
+KC_MS_WH_DOWN       KC_WH_D         Mouse Wheel Down
+KC_MS_WH_LEFT       KC_WH_L         Mouse Wheel Left
+KC_MS_WH_RIGHT      KC_WH_R         Mouse Wheel Right
+KC_MS_ACCEL0        KC_ACL0         Mouse Acceleration 0
+KC_MS_ACCEL1        KC_ACL1         Mouse Acceleration 1
+KC_MS_ACCEL2        KC_ACL2         Mouse Acceleration 2
+/* Fn key */
+KC_FN0
+KC_FN1
+KC_FN2
+KC_FN3
+KC_FN4
+KC_FN5
+KC_FN6
+KC_FN7
+KC_FN8
+KC_FN9
+KC_FN10
+KC_FN11
+KC_FN12
+KC_FN13
+KC_FN14
+KC_FN15
+KC_FN16
+KC_FN17
+KC_FN18
+KC_FN19
+KC_FN20
+KC_FN21
+KC_FN22
+KC_FN23
+KC_FN24
+KC_FN25
+KC_FN26
+KC_FN27
+KC_FN28
+KC_FN29
+KC_FN30
+KC_FN31
diff --git a/docs/keymap_config_h_example.h b/docs/keymap_config_h_example.h
new file mode 100644 (file)
index 0000000..8893d12
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+// place overrides here
+
+#endif
diff --git a/docs/keymap_makefile_example.mk b/docs/keymap_makefile_example.mk
new file mode 100644 (file)
index 0000000..f4671a9
--- /dev/null
@@ -0,0 +1,21 @@
+# Build Options
+#   change to "no" to disable the options, or define them in the Makefile in 
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE = no         # Console for debug(+400)
+COMMAND_ENABLE = yes        # Commands for debug and configuration
+NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
+MIDI_ENABLE = no            # MIDI controls
+AUDIO_ENABLE = no           # Audio output on port C6
+UNICODE_ENABLE = no         # Unicode
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
\ No newline at end of file
diff --git a/docs/keymap_old.md b/docs/keymap_old.md
new file mode 100644 (file)
index 0000000..3ea138e
--- /dev/null
@@ -0,0 +1,685 @@
+Keymap framework - how to define your keymap
+============================================
+***NOTE: This is updated for QMK but this is still work in progress.  This may still be inconsistent with the source code.***
+
+QMK is based on TMK.   Understanding the essential changes made should help you understand variable names etc.
+
+## TMK vs. QMK
+
+| Firmware                  |TMK                    |QMK                      |
+|---------------------------|-----------------------|-------------------------|
+| Maintainer                |hasu                   |Jack Humbert et al.      |
+| Build path customization  | `TMK_DIR = ...`       | `include .../Makefile`  |
+| `keymaps` data            | 3D array of `uint8_t` holding **keycode**      | 3D array of `uint16_t` holding **action code**  |
+| `fn_actions` data         | 1D array of `uint16_t` holding **action code** | 1D array of `uint16_t` holding **action code**  |
+
+Since QMK is based on TMK and uses major portion of TMK code as is, understanding the essential changes made should help you understand the code.
+
+## 0. Keymap and layers
+In 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.
+
+For 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**.
+
+Respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence.
+
+    Keymap: 32 Layers                   Layer: action code matrix
+    -----------------                   ---------------------
+    stack of layers                     array_of_action_code[row][column]
+           ____________ precedence               _______________________
+          /           / | high                  / ESC / F1  / F2  / F3   ....
+      31 /___________// |                      /-----/-----/-----/-----
+      30 /___________// |                     / TAB /  Q  /  W  /  E   ....
+      29 /___________/  |                    /-----/-----/-----/-----
+       :   _:_:_:_:_:__ |               :   /LCtrl/  A  /  S  /  D   ....
+       :  / : : : : : / |               :  /  :     :     :     :
+       2 /___________// |               2 `--------------------------
+       1 /___________// |               1 `--------------------------
+       0 /___________/  V low           0 `--------------------------
+
+
+Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history.
+
+### 0.1 Keymap layer status
+Keymap layer has its state in two 32 bit parameters:
+
+* **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred.
+* **`layer_state`** () has current on/off status of the layer on its each bit.
+
+Keymap 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.
+Keymap 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`.
+To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
+
+    Initial state of Keymap          Change base layout              
+    -----------------------          ------------------              
+
+      31                               31
+      30                               30
+      29                               29
+       :                                :
+       :                                :   ____________
+       2   ____________                 2  /           /
+       1  /           /              ,->1 /___________/
+    ,->0 /___________/               |  0
+    |                                |
+    `--- default_layer = 0           `--- default_layer = 1
+         layer_state   = 0x00000001       layer_state   = 0x00000002
+
+On 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.
+
+    Overlay feature layer
+    ---------------------      bit|status
+           ____________        ---+------
+      31  /           /        31 |   0
+      30 /___________// -----> 30 |   1
+      29 /___________/  -----> 29 |   1
+       :                        : |   :
+       :   ____________         : |   :
+       2  /           /         2 |   0
+    ,->1 /___________/  ----->  1 |   1
+    |  0                        0 |   0
+    |                                 +
+    `--- default_layer = 1            |
+         layer_state   = 0x60000002 <-'
+
+
+
+### 0.2 Layer Precedence and Transparency
+Note 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.
+
+You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer.
+Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead.
+See example below.
+
+
+### 0.3 Keymap Example
+Keymap in this QMK is **`static const uint16_t PROGMEM keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array.  It holds the 16 bit quantum keycode (action code).
+
+> Please note that keymap in the TMK, which QMK was forked from, is **`static const uint8_t PROGMEM keymaps[]`** C array which holds the 8 bit keycode (~USB HID usage code).
+
+This is a keymap example for [HHKB](http://en.wikipedia.org/wiki/Happy_Hacking_Keyboard) keyboard.
+This example has three layers, 'QWERTY' as base layer, 'FN' and  'MOUSE'.
+
+In this example,
+
+ `MO(layer)` is a **momentary layer switching** key.
+
+You can find other keymap definitions in file `keymap.c` located on project directories.
+```
+/*
+ * dbroqua HHKB Layout
+ */
+#include "hhkb.h"
+
+#define BASE 0
+#define FN 1
+#define MOUSE 2
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    /* BASE Level: Default Layer
+     * ,-----------------------------------------------------------------------------------------.
+     * | Esc |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  0  |  -  |  =  |  \  |  `  |
+     * |-----------------------------------------------------------------------------------------+
+     * | Tab    |  Q  |  W  |  E  |  R  |  T  |  Y  |  U  |  I  |  O  |  P  |  [  |  ]  |  Bksp  |
+     * |-----------------------------------------------------------------------------------------+
+     * | Ctrl    |  A  |  S  |  D  |  F  |  G  |  H  |  J  |  K  |  L  |  ;  |  '  |    Enter    |
+     * |-----------------------------------------------------------------------------------------+
+     * | Shift     |  Z  |  X  |  C  |  V  |  B  |  N  |  M  |  ,  |  .  |  /  | Shift     | fn  |
+     * +-----------------------------------------------------------------------------------------+
+     *         | Gui |  Alt   |               Space               | AltGr |Mouse|
+     *         `----------------------------------------------------------------´
+     */
+    [BASE] = KEYMAP(
+        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_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_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_LSFT,  KC_Z,  KC_X,  KC_C,  KC_V,  KC_B,  KC_N,  KC_M,  KC_COMM,  KC_DOT,  KC_SLSH,  KC_RSFT,  MO(FN),                    \
+                        KC_LGUI, KC_LALT,  /*        */ KC_SPC, KC_RALT, MO(MOUSE)
+    ),
+
+    /* FN Layer
+     * ,-----------------------------------------------------------------------------------------.
+     * | Pwr |  F1  | F2  | F3  | F4  | F5  | F6  | F7  | F8  | F9  | F0  | F11 | F12 | Ins | Del|
+     * |-----------------------------------------------------------------------------------------+
+     * | Caps   |     |     |     |     |     |     |     |PrtSc| Slck| Paus|  Up |     |        |
+     * |-----------------------------------------------------------------------------------------+
+     * |         | Vol-| Vol+| Mute|     |     | *   | /   | Home| PgUp| Left |Right|            |
+     * |-----------------------------------------------------------------------------------------+
+     * |           | Prev| Play| Next|     |     | +   | -   | End |PgDwn| Down|           |     |
+     * +-----------------------------------------------------------------------------------------+
+     *         |     |        |                                   | Stop  |     |
+     *         `----------------------------------------------------------------´
+     */
+    [FN] = KEYMAP(
+        KC_PWR,   KC_F1,    KC_F2,    KC_F3,    KC_F4,    KC_F5,    KC_F6,    KC_F7,    KC_F8,    KC_F9,    KC_F10,   KC_F11,   KC_F12,   KC_INS,   KC_DEL, \
+        KC_CAPS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_PSCR,  KC_SLCK,  KC_PAUS,  KC_UP,    KC_TRNS,  KC_TRNS,          \
+        KC_TRNS,  KC_VOLD,  KC_VOLU,  KC_MUTE,  KC_TRNS,  KC_TRNS,  KC_PAST,  KC_PSLS,  KC_HOME,  KC_PGUP,  KC_LEFT,  KC_RGHT,  KC_TRNS,                    \
+        KC_TRNS,  KC_MPRV,  KC_MPLY,  KC_MNXT,  KC_TRNS,  KC_TRNS,  KC_PPLS,  KC_PMNS,  KC_END,   KC_PGDN,  KC_DOWN,  KC_TRNS,  KC_TRNS,                    \
+                        KC_TRNS, KC_TRNS,           KC_TRNS,                KC_MSTP, KC_TRNS
+    ),
+
+    /* MOUSE Layer
+     * ,-----------------------------------------------------------------------------------------.
+     * |     |      |     |     |     |     |     |     |     |     |     |     |     |     |    |
+     * |-----------------------------------------------------------------------------------------+
+     * |        |     | WUp |     |     |     |     |     |     |     | Btn1|  Up | Btn2|        |
+     * |-----------------------------------------------------------------------------------------+
+     * |         | WLt | WDn | WRt |     |     |     |     |     |     | Left |Right|            |
+     * |-----------------------------------------------------------------------------------------+
+     * |           |     |     |     |     |     |     |     |     | Btn3| Down|           |     |
+     * +-----------------------------------------------------------------------------------------+
+     *         |     |        |                                   |       |     |
+     *         `----------------------------------------------------------------´
+     */
+    [MOUSE] = KEYMAP(
+        KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,   KC_TRNS, \
+        KC_TRNS,  KC_TRNS,  KC_WH_U,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_BTN1,  KC_MS_U,  KC_BTN2,  KC_TRNS,          \
+        KC_TRNS,  KC_WH_L,  KC_WH_D,  KC_WH_R,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_MS_L,  KC_MS_R,  KC_TRNS,                    \
+        KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_BTN3,  KC_MS_D,  KC_TRNS,  KC_TRNS,                    \
+                        KC_TRNS, KC_TRNS,           KC_TRNS,                KC_TRNS, KC_TRNS
+    )
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  // MACRODOWN only works in this function
+      switch(id) {
+        case 0:
+          if (record->event.pressed) {
+            register_code(KC_RSFT);
+          } else {
+            unregister_code(KC_RSFT);
+          }
+        break;
+      }
+    return MACRO_NONE;
+};
+```
+
+
+## 1. Keycode
+See [`tmk_core/common/keycode.h`](../tmk_core/common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap.  Keycodes are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) plus special codes in the `0xA5-DF` range.
+
+Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys.
+
+keymaps[]
+
+In `KEYMAP()` macro, TMK recommends you to keep prefix part `KC_` of keycode to keep keymap compact. For example, just use `A` instead you place `KC_A` in `KEYMAP()`.  But this doesn't apply for QMK. 
+
+The `KEYMAP()` macro defines correspondence between the physical key location to the electrical key connection.
+
+Some keycodes has 7-letter **short name** such as `KC_COMM` in addition to descriptive name `KC_COMMA`, you'll prefer short one in `KEYMAP()`.
+
+### 1.0 Other key
+- `KC_NO` for no action
+- `KC_TRNS` for layer transparency (See above)
+
+### 1.1 Normal key
+- `KC_A` to `KC_Z`, `KC_1` to `KC_0` for alpha numeric key
+- `KC_MINS`, `KC_EQL`, `KC_GRV`, `KC_RBRC`, `KC_LBRC`, `KC_COMM`, `KC_DOT`, `KC_BSLS`, `KC_SLSH`, `KC_SCLN`, `KC_QUOT`
+- `KC_ESC`, `KC_TAB`, `KC_SPC`, `KC_BSPC`, `KC_ENT`, `KC_DEL`, `KC_INS`
+- `KC_UP`, `KC_DOWN`, `KC_RGHT`, `KC_LEFT`, `KC_PGUP`, `KC_PGDN`, `KC_HOME`, `KC_END`
+- `KC_CAPS`, `KC_NLCK`, `KC_SLCK`, `KC_PSCR`, `KC_PAUS`, `KC_APP`, `KC_F1` to `KC_F24`
+- `KC_P1` to `KC_P0`, `KC_PDOT`, `KC_PCMM`, `KC_PSLS`, `KC_PAST`, `KC_PMNS`, `KC_PPLS`, `KC_PEQL`, `KC_PENT` for keypad.
+
+### 1.2 Modifier
+There are 8 modifiers which has discrimination between left and right. 
+
+- `KC_LCTL` and `KC_RCTL` for Control
+- `KC_LSFT` and `KC_RSFT` for Shift
+- `KC_LALT` and `KC_RALT` for Alt
+- `KC_LGUI` and `KC_RGUI` for Windows key or Command key in Mac
+
+### 1.3 Mousekey
+- `KC_MS_U`, `KC_MS_D`, `KC_MS_L`, `KC_MS_R` for mouse cursor
+- `KC_WH_U`, `KC_WH_D`, `KC_WH_L`, `KC_WH_R` for mouse wheel
+- `KC_BTN1`, `KC_BTN2`, `KC_BTN3`, `KC_BTN4`, `KC_BTN5` for mouse buttons
+
+### 1.4 System & Media key
+- `KC_PWR`, `KC_SLEP`, `KC_WAKE` for Power, Sleep, Wake
+- `KC_MUTE`, `KC_VOLU`, `KC_VOLD` for audio volume control
+- `KC_MNXT`, `KC_MPRV`, `KC_MSTP`, `KC_MPLY`, `KC_MSEL` for media control
+- `KC_MAIL`, `KC_CALC`, `KC_MYCM` for application launch
+- `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation
+
+### 1.5 Fn key
+You don't need to use this functionality under QMK since this is a backward compatibility functionality.  Unlike TMK, you can write action code itself directly in  **`static const uint16_t PROGMEM keymaps[]`** C array using `MO(layer)`, etc.
+
+`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***Only 32 `Fn` keys can be defined at most.***
+
+
+### 1.6 Keycode Table
+ See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes.
+
+ In regard to implementation side most of keycodes are identical with [HID usage][HID_usage](pdf) sent to host for real and some virtual keycodes are defined to support special actions.
+[HID_usage]: http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
+
+
+
+## 2. Action
+See [`common/action_code.h`](../common/action_code.h). Action is a **16bit code** and defines function to perform on events of a key like press, release, holding and tapping.
+
+Most of keys just register 8bit scancode to host, but to support other complex features needs 16bit extended action codes internally. However, using 16bit action codes in keymap results in double size in memory compared to using just keycodes. To avoid this waste 8bit keycodes are used in `KEYMAP()` instead of action codes.
+
+***You can just use keycodes of `Normal key`, `Modifier`, `Mousekey` and `System & Media key` in keymap*** to indicate corresponding actions instead of using action codes. While ***to use other special actions you should use keycode of `Fn` key defined in `fn_actions[]`.***
+
+
+### 2.1 Key Action
+This is a simple action that registers scancodes(HID usage in fact) to host on press event of key and unregister on release.
+
+#### Parameters
++ **mods**: { ` MOD_LCTL`, ` MOD_LSFT`, ` MOD_LALT`, ` MOD_LGUI`,
+              ` MOD_RCTL`, ` MOD_RSFT`, ` MOD_RALT`, ` MOD_RGUI` }
++ **key**: keycode
+
+
+#### 2.1.1 Normal key and Modifier
+***This action usually won't be used expressly in keymap*** because you can just use keycodes in `KEYMAP()` instead.
+
+You can define these actions on *'A'* key and *'left shift'* modifier with:
+
+    ACTION_KEY(KC_A)
+    ACTION_KEY(KC_LSFT)
+
+#### 2.1.2 Modified key
+This action is comprised of strokes of modifiers and a key. `Macro` action is needed if you want more complex key strokes.
+
+Say you want to assign a key to `Shift + 1` to get character *'!'* or `Alt + Tab` to switch application windows.
+
+    ACTION_MODS_KEY(MOD_LSFT, KC_1)
+    ACTION_MODS_KEY(MOD_LALT, KC_TAB)
+
+Or `Alt,Shift + Tab` can be defined. `ACTION_MODS_KEY(mods, key)` requires **4-bit modifier state** and a **keycode** as arguments. See `keycode.h` for `MOD_BIT()` macro.
+
+    ACTION_MODS_KEY(MOD_LALT | MOD_LSFT, KC_TAB)
+
+#### 2.1.3 Multiple Modifiers
+Registers multiple modifiers with pressing a key. To specify multiple modifiers use `|`.
+
+    ACTION_MODS(MOD_ALT | MOD_LSFT)
+
+#### 2.1.3 Modifier with Tap key([Dual role][dual_role])
+Works as a modifier key while holding, but registers a key on tap(press and release quickly).
+
+
+    ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT)
+
+
+
+### 2.2 Layer Action
+These actions operate layers of keymap.
+
+#### Parameters
+You can specify a **target layer** of action and **when the action is executed**. Some actions take a **bit value** for bitwise operation.
+
+
++ **layer**: `0`-`31`
++ **on**: { `ON_PRESS` | `ON_RELEASE` | `ON_BOTH` }
++ **bits**: 4-bit value and 1-bit mask bit
+
+
+#### 2.2.1 Default Layer
+Default Layer is a layer which always is valid and referred to when actions is not defined on other overlay layers.
+
+This sets Default Layer to given parameter `layer` and activate it.
+
+    ACTION_DEFAULT_LAYER_SET(layer)
+
+
+#### 2.2.2 Momentary 
+Turns on `layer` momentarily while holding, in other words it activates when key is pressed and deactivate when released.
+
+    ACTION_LAYER_MOMENTARY(layer)
+
+
+#### 2.2.3 Toggle Switch
+Turns on `layer` with first type(press and release) and turns off with next.
+
+    ACTION_LAYER_TOGGLE(layer)
+
+
+#### 2.2.4 Momentary Switch with tap key
+Turns on `layer` momentary while holding, but registers key on tap(press and release quickly).
+
+    ACTION_LAYER_TAP_KEY(layer, key)
+
+
+#### 2.2.5 Momentary Switch with tap toggle
+Turns on `layer` momentary while holding and toggles it with serial taps.
+
+    ACTION_LAYER_TAP_TOGGLE(layer)
+
+
+#### 2.2.6 Invert state of layer
+Inverts current state of `layer`. If the layer is on it becomes off with this action.
+
+    ACTION_LAYER_INVERT(layer, on)
+
+
+#### 2.2.7 Turn On layer
+Turns on layer state.
+
+    ACTION_LAYER_ON(layer, on)
+
+Turns on layer state on press and turns off on release.
+
+    ACTION_LAYER_ON_OFF(layer)
+
+
+#### 2.2.8 Turn Off layer
+Turns off layer state.
+
+    ACTION_LAYER_OFF(layer, on)
+
+Turns off layer state on press and activates on release.
+
+    ACTION_LAYER_OFF_ON(layer)
+
+
+#### 2.2.9 Set layer
+Turn on layer only.
+`layer_state = (1<<layer) [layer: 0-31]`
+
+    ACTION_LAYER_SET(layer, on)
+
+Turns on layer only and clear all layer on release..
+
+    ACTION_LAYER_SET_CLEAR(layer)
+
+
+#### 2.2.10 Bitwise operation
+
+**part** indicates which part of 32bit layer state(0-7). **bits** is 5-bit value. **on** indicates when the action is executed.
+
+    ACTION_LAYER_BIT_AND(part, bits, on)
+    ACTION_LAYER_BIT_OR(part, bits, on)
+    ACTION_LAYER_BIT_XOR(part, bits, on)
+    ACTION_LAYER_BIT_SET(part, bits, on)
+
+These actions works with parameters as following code.
+
+    uint8_t shift = part*4;
+    uint32_t mask = (bits&0x10) ? ~(0xf<<shift) : 0;
+    uint32_t layer_state = layer_state <bitop> ((bits<<shift)|mask);
+
+
+Default Layer also has bitwise operations, they are executed when key is released.
+
+    ACTION_DEFAULT_LAYER_BIT_AND(part, bits)
+    ACTION_DEFAULT_LAYER_BIT_OR(part, bits)
+    ACTION_DEFAULT_LAYER_BIT_XOR(part, bits)
+    ACTION_DEFAULT_LAYER_BIT_SET(part, bits)
+
+
+
+### 2.3 Macro action
+***TBD***
+
+`Macro` action indicates complex key strokes.
+    MACRO( D(LSHIFT), D(D), END )
+    MACRO( U(D), U(LSHIFT), END )
+    MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END )
+
+#### 2.3.1 Macro Commands
+- **I()**   change interval of stroke.
+- **D()**   press key
+- **U()**   release key
+- **T()**   type key(press and release)
+- **W()**   wait
+- **END**   end mark
+
+#### 2.3.2 Examples
+
+***TODO: sample implementation***
+See `keyboards/hhkb/keymap.c` for sample.
+
+
+
+### 2.4 Function action
+***TBD***
+
+There are two type of action, normal `Function` and tappable `Function`.
+These actions call user defined function with `id`, `opt`, and key event information as arguments.
+
+#### 2.4.1 Function
+To define normal `Function` action in keymap use this.
+
+    ACTION_FUNCTION(id, opt)
+
+#### 2.4.2 Function with tap
+To define tappable `Function` action in keymap use this.
+
+    ACTION_FUNCTION_TAP(id, opt)
+
+#### 2.4.3 Implement user function
+`Function` actions can be defined freely with C by user in callback function:
+
+    void keymap_call_function(keyrecord_t *event, uint8_t id, uint8_t opt)
+
+This C function is called every time key is operated, argument `id` selects action to be performed and `opt` can be used for option. Function `id` can be 0-255 and `opt` can be 0-15.
+
+ `keyrecord_t` is comprised of key event and tap count. `keyevent_t` indicates which and when key is pressed or released. From `tap_count` you can know tap state, 0 means no tap. These information will be used in user function to decide how action of key is performed.
+
+    typedef struct {
+        keyevent_t  event;
+        uint8_t     tap_count;
+    } keyrecord_t;
+
+    typedef struct {
+        key_t    key;
+        bool     pressed;
+        uint16_t time;
+    } keyevent_t;
+
+    typedef struct {
+        uint8_t col;
+        uint8_t row;
+    } key_t;
+
+***TODO: sample implementation***
+See `keyboards/hhkb/keymap.c` for sample.
+
+
+
+### 2.5 Backlight Action
+These actions control the backlight.
+
+#### 2.5.1 Change backlight level
+Increase backlight level.
+
+    ACTION_BACKLIGHT_INCREASE()
+
+Decrease backlight level.
+
+    ACTION_BACKLIGHT_DECREASE()
+
+Step through backlight levels.
+
+    ACTION_BACKLIGHT_STEP()
+
+Turn a specific backlight level on or off.
+
+    ACTION_BACKLIGHT_LEVEL(1)
+
+#### 2.5.2 Turn on / off backlight
+Turn the backlight on and off without changing level.
+
+    ACTION_BACKLIGHT_TOGGLE()
+
+
+
+### 2.6 Swap-Hands Action
+The swap-hands action allows support for one-handed keyboards without requiring a separate layer. Set `ONEHAND_ENABLE` in the Makefile and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd`
+
+### 2.6.1 Configuration
+The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck:
+
+```
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+  {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
+  {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
+  {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
+  {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
+};
+```
+
+Note that the array indices are reversed same as the matrix and the values are of type `keypos_t` which is `{col, row}` and all values are zero-based. In the example above, `hand_swap_config[2][4]` (third row, fifth column) would return {7, 2} (third row, eighth column).
+
+### 2.6.2 Advanced Swap Commands
+- **`ACTION_SWAP_HANDS()`** Swaps hands when pressed, returns to normal when released (momentary).
+- **`ACTION_SWAP_HANDS_TOGGLE()`** Toggles swap on and off with every keypress.
+- **`ACTION_SWAP_HANDS_TAP_TOGGLE()`** Toggles with a tap; momentary when held.
+- **`ACTION_SWAP_HANDS_TAP_KEY(key)`** Sends `key` with a tap; momentary swap when held.
+- **`ACTION_SWAP_HANDS_ON_OFF()`** Alias for `ACTION_SWAP_HANDS()`
+- **`ACTION_SWAP_HANDS_OFF_ON()`** Momentarily turns off swap.
+- **`ACTION_SWAP_HANDS_ON()`** Turns on swapping and leaves it on.
+- **`ACTION_SWAP_HANDS_OFF()`** Turn off swapping and leaves it off. Good for returning to a known state.
+
+
+
+## 3. Layer switching Example
+There are some ways to switch layer with 'Layer' actions.
+
+### 3.1 Momentary switching
+Momentary switching changes layer only while holding Fn key.
+
+This action makes 'Layer 1' active(valid) on key press event and inactive on release event. Namely you can overlay a layer on lower layers or default layer temporarily with this action.
+
+    ACTION_LAYER_MOMENTARY(1)
+
+
+Note that after switching on press the actions on destination layer(Layer 1) are performed.
+***Thus you shall need to place an action to go back on destination layer***, or you will be stuck in destination layer without way to get back. Usually you need to place same action or 'KC_TRNS` on destination layer to get back.
+
+
+### 3.2 Toggle switching
+Toggle switching performed after releasing a key. With this action you can keep staying on the destination layer until you type the key again to return.
+
+This performs toggle switching action of 'Layer 2'.
+
+    ACTION_LAYER_TOGGLE(2)
+
+
+
+### 3.3 Momentary switching with Tap key
+These actions switch a layer only while holding a key but register the key on tap. **Tap** means to press and release a key quickly.
+
+    ACTION_LAYER_TAP_KEY(2, KC_SCLN)
+
+With this you can place a layer switching action on normal key like ';' without losing its original key register function. This action allows you to have layer switching action without necessity of a dedicated key. It means you can have it even on home row of keyboard.
+
+
+
+### 3.4 Momentary switching with Tap Toggle
+This switches layer only while holding a key but toggle layer with several taps. **Tap** means to press and release key quickly.
+
+    ACTION_LAYER_TAP_TOGGLE(1)
+
+Number of taps can be configured with `TAPPING_TOGGLE` in `config.h`, `5` by default.
+
+
+
+### 3.5 Momentary switching with Modifiers
+This registers modifier key(s) simultaneously with layer switching.
+
+    ACTION_LAYER_MODS(2, MOD_LSFT | MOD_LALT)
+
+
+
+## 4. Tapping
+Tapping is to press and release a key quickly. Tapping speed is determined with setting of `TAPPING_TERM`, which can be defined in `config.h`, 200ms by default.
+
+### 4.1 Tap Key
+This is a feature to assign normal key action and modifier including layer switching to just same one physical key. This is a kind of [Dual role key][dual_role]. It works as modifier when holding the key but registers normal key when tapping.
+
+Modifier with tap key:
+
+    ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRV)
+
+Layer switching with tap key:
+
+    ACTION_LAYER_TAP_KEY(2, KC_SCLN)
+
+[dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
+
+When user hold a key after tap, it repeat the tapped key rather to hold a modifier key.
+If you prefer to hold a modifier instead, define `TAPPING_FORCE_HOLD` in `config.h`.
+See https://github.com/qmk/qmk_firmware/issues/889 for the detail.
+
+### 4.2 Tap Toggle
+This is a feature to assign both toggle layer and momentary switch layer action to just same one physical key. It works as momentary layer switch when holding a key but toggle switch with several taps.
+
+    ACTION_LAYER_TAP_TOGGLE(1)
+
+
+### 4.3 Oneshot Modifier
+This runs onetime effects which modify only on just one following key. It works as normal modifier key when holding down while oneshot modifier when tapping. The behavior of oneshot modifiers is similar to the [sticky keys](https://en.wikipedia.org/wiki/StickyKeys) functionality found in most operating systems.
+
+    ACTION_MODS_ONESHOT(MOD_LSFT)
+
+Oneshot layer key:
+
+    ACTION_LAYER_ONESHOT(MY_LAYER)
+
+Say you want to type 'The', you have to push and hold Shift key before type 't' then release it before type 'h' and 'e', otherwise you'll get 'THe' or 'the' unintentionally. With Oneshot Modifier you can tap Shift then type 't', 'h' and 'e' normally, you don't need to holding Shift key properly here. This mean you can release Shift before 't' is pressed down.
+
+Oneshot effect is cancel unless following key is pressed down within `ONESHOT_TIMEOUT` of `config.h`. No timeout when it is `0` or not defined.
+
+Most implementations of sticky keys allow you to lock a modifier by double tapping the modifier. The layer then remains locked untill the modifier is tapped again. To enable this behaviour for oneshot modifiers set `ONESHOT_TAP_TOGGLE` to the number taps required. The feature is disabled if `ONESHOT_TAP_TOGGLE<2` or not defined.
+
+
+### 4.4 Tap Toggle Mods
+Similar to layer tap toggle, this works as a momentary modifier when holding, but toggles on with several taps. A single tap will 'unstick' the modifier again.
+
+    ACTION_MODS_TAP_TOGGLE(MOD_LSFT)
+
+
+
+
+## 5. Legacy Keymap
+In QMK, `tmk_core/common/keymap.c` is missing and its replacement `quantum/keymap_common.c` lacks Legacy Keymap support.
+
+Legacy Keymap uses two arrays `fn_layer[]` and `fn_keycode[]` to define Fn key. The index of arrays corresponds with postfix number of `Fn` key. Array `fn_layer[]` indicates destination layer to switch and `fn_keycode[]` has keycodes to send when tapping `Fn` key.
+
+In the following legacy keymap setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key.
+
+    static const uint8_t PROGMEM fn_layer[] = {
+        1,              // Fn0
+        2,              // Fn1
+        2,              // Fn2
+    };
+
+    static const uint8_t PROGMEM fn_keycode[] = {
+        KC_NO,          // Fn0
+        KC_NO,          // Fn1
+        KC_SPC,         // Fn2
+    };
+
+Under QMK, these can be realized using action code ACTION_LAYER_TAP_KEY(1, KC_NO), ACTION_LAYER_TAP_KEY(2, KC_NO), and ACTION_LAYER_TAP_KEY(2, KC_SPC) in the `keymaps` directly.
+
+## 6. Terminology
+***TBD***
+### keymap
+is comprised of multiple layers.
+### layer
+is matrix of keycodes.
+### key
+is physical button on keyboard or logical switch on software.
+### keycode
+is codes used on firmware.
+### action
+is a function assigned on a key.
+### layer transparency
+Using transparent keycode one layer can refer key definition on other lower layer.
+### layer precedence
+Top layer has higher precedence than lower layers.
+### tapping
+is to press and release a key quickly.
+### Fn key
+is key which executes a special action like layer switching, mouse key, macro or etc.
+### dual role key
+<http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys>
diff --git a/docs/mbed-cortex-porting.md b/docs/mbed-cortex-porting.md
new file mode 100644 (file)
index 0000000..b4b1314
--- /dev/null
@@ -0,0 +1,36 @@
+## supported projects
+### PS/2 converter
+Confirmed it works on NXP LPC11U35.
+- http://developer.mbed.org/platforms/TG-LPC11U35-501/
+
+### Infinity keyboard
+It runs on Freescale MK20DX128.
+
+
+
+## compile error: cstddef
+Experienced this with arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2 on ubuntu 14.04.
+
+And resolved with 4.9.3 installed from:
+- https://launchpad.net/gcc-arm-embedded
+- https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded
+
+```
+$ make -f Makefile.mbed                                                                                                                                                         
+mkdir -p build/.
+arm-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
+In file included from ../../mbed-sdk/libraries/mbed/api/mbed.h:21:0,
+                 from main.cpp:1:
+../../mbed-sdk/libraries/mbed/api/platform.h:25:19: fatal error: cstddef: No such file or directory
+ #include <cstddef>
+                   ^
+compilation terminated.
+make: *** [build/./main.o] Error 1
+
+[13:13] noname@desk:/mnt/old_root/home/noname/tmp/tmk_keyboard/converter/ps2_usb
+$ arm-none-eabi-gcc --version
+arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2
+Copyright (C) 2013 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+```
\ No newline at end of file
diff --git a/docs/other_projects.md b/docs/other_projects.md
new file mode 100644 (file)
index 0000000..bf980b0
--- /dev/null
@@ -0,0 +1,62 @@
+Other Keyboard Firmware Projects
+================================
+## PJRC USB Keyboard/Mouse Example[USB][PJRC][Teensy][AVR]
+- <http://www.pjrc.com/teensy/usb_keyboard.html>
+- <http://www.pjrc.com/teensy/usb_mouse.html>
+
+## kbupgrade[USB][V-USB][AVR]
+- <http://github.com/rhomann/kbupgrade>
+- <http://geekhack.org/showwiki.php?title=Island:8406>
+
+## c64key[USB][V-USB][AVR]
+- <http://symlink.dk/projects/c64key/>
+
+## rump[USB][V-USB][AVR]
+- <http://mg8.org/rump/>
+- <http://github.com/clee/rump>
+
+## dulcimer[USB][V-USB][AVR]
+- <http://www.schatenseite.de/dulcimer.html>
+
+## humblehacker-keyboard[USB][LUFA][AVR][Ergo]
+- <http://github.com/humblehacker>
+- <http://www.humblehacker.com/keyboard/>
+- <http://geekhack.org/showwiki.php?title=Island:6292>
+
+## ps2avr[PS/2][AVR]
+- <http://sourceforge.net/projects/ps2avr/>
+
+## ErgoDox[Ergo][Split][USB][AVR]
+- <http://geekhack.org/index.php?topic=22780.0>
+- <https://github.com/benblazak/ergodox-firmware>
+- <https://github.com/cub-uanic/tmk_keyboard>
+
+## Suka's keyboard collection[Ergo][Split][3DPrinting][USB][AVR]
+- <http://deskthority.net/workshop-f7/my-diy-keyboard-collection-or-how-i-became-a-kb-geek-t2534.html>
+- <https://github.com/frobiac/adnw>
+
+## bpiphany's AVR-Keyboard[PJRC][AVR][USB]
+- <https://github.com/BathroomEpiphanies/AVR-Keyboard>
+- <http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions>
+- <http://deskthority.net/wiki/Phantom>
+
+## USB-USB keyboard remapper[converter][USB-USB][AVR][Arduino]
+- <http://forum.colemak.com/viewtopic.php?pid=10837>
+- <https://github.com/darkytoothpaste/keymapper>
+
+## USB-USB converter threads[converter][USB-USB]
+- <http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html>
+- <http://geekhack.org/index.php?topic=19458.0>
+
+## kbdbabel.org[converter][vintage][protocol][8051]
+Great resource of vintage keyboard protocol information and code
+
+- <http://www.kbdbabel.org/>
+
+## Haata's kiibohd Controller[converter][vintage][protocol][AVR][PJRC][Cortex]
+A lots of vintage keyboard protocol supports
+
+- <http://gitorious.org/kiibohd-controller>
+
+## Kinesis ergonomic keyboard firmware replacement[V-USB][LUFA][Ergo]
+- <https://github.com/chrisandreae/kinesis-firmware>
diff --git a/keyboards/M10A/M10A.c b/keyboards/M10A/M10A.c
deleted file mode 100644 (file)
index 9a3bd15..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "M10A.h"
-
-void matrix_init_kb(void) {
-       matrix_init_user();
-}
\ No newline at end of file
diff --git a/keyboards/M10A/M10A.h b/keyboards/M10A/M10A.h
deleted file mode 100644 (file)
index 6ec334f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef M10A_H
-#define M10A_H
-
-#include "quantum.h"
-
-#define M10A( \
-      k00, k01, k02, \
-      k10, k11, k12, \
-      k20, k21, k22, \
-      k30, k31, k32  \
-) \
-{ \
-    { k00, k01, k02 }, \
-    { k10, k11, k12 }, \
-    { k20, k21, k22 }, \
-    { k30, k31, k32 } \
-} 
-
-#endif
diff --git a/keyboards/M10A/Makefile b/keyboards/M10A/Makefile
deleted file mode 100644 (file)
index 4e2a6f0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ifndef MAKEFILE_INCLUDED
-       include ../../Makefile
-endif
\ No newline at end of file
diff --git a/keyboards/M10A/config.h b/keyboards/M10A/config.h
deleted file mode 100644 (file)
index f052ab6..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-Copyright 2012 Jun Wako <wakojun@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#include "config_common.h"
-
-/* USB Device descriptor parameter */
-#define VENDOR_ID       0xFEED
-#define PRODUCT_ID      0x0007
-#define DEVICE_VER             0x0001
-#define MANUFACTURER    Machine Industries
-#define PRODUCT         M10-A
-#define DESCRIPTION     RAMA x Machine Industries M10-A
-
-/* key matrix size */
-#define MATRIX_ROWS 4
-#define MATRIX_COLS 3
-
-/* Planck PCB default pin-out */
-#define MATRIX_ROW_PINS { B6, F7, F6, D6 }
-#define MATRIX_COL_PINS { F5, F1, F0 }
-#define UNUSED_PINS
-
-#define BACKLIGHT_PIN B7
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
-/* define if matrix has ghost */
-//#define MATRIX_HAS_GHOST
-
-/* number of backlight levels */
-#define BACKLIGHT_LEVELS 6
-
-/* Set 0 if debouncing isn't needed */
-#define DEBOUNCING_DELAY 5
-
-/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
-#define LOCKING_SUPPORT_ENABLE
-/* Locking resynchronize hack */
-#define LOCKING_RESYNC_ENABLE
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
-)
-
-/*
- * Feature disable options
- *  These options are also useful to firmware size reduction.
- */
-
-/* disable debug print */
-//#define NO_DEBUG
-
-/* disable print */
-//#define NO_PRINT
-
-/* disable action features */
-//#define NO_ACTION_LAYER
-//#define NO_ACTION_TAPPING
-//#define NO_ACTION_ONESHOT
-//#define NO_ACTION_MACRO
-//#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboards/M10A/keymaps/default/Makefile b/keyboards/M10A/keymaps/default/Makefile
deleted file mode 100644 (file)
index 457a3d0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ifndef QUANTUM_DIR
-       include ../../../../Makefile
-endif
diff --git a/keyboards/M10A/keymaps/default/keymap.c b/keyboards/M10A/keymaps/default/keymap.c
deleted file mode 100644 (file)
index 75abeb5..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
-// this is the style you want to emulate.
-
-#include "M10A.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-
-extern keymap_config_t keymap_config;
-
-// Each layer gets a name for readability, which is then used in the keymap matrix below.
-// The underscores don't mean anything - you can have a layer called STUFF or any other name.
-// Layer names don't all need to be of the same length, obviously, and you can also skip them
-// entirely and just use numbers.
-
-enum layers {
-  _LAYER0,
-  _LAYER1,
-  _LAYER2,
-  _LAYER3,
-  _LAYER4,
-  _LAYER5,
-  _LAYER6,
-  _LAYER7,
-  _LAYER8,
-  _LAYER9
-};
-
-// // Fillers to make layering more clear
-// #define _______ KC_TRNS
-// #define XXXXXXX KC_NO
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-  [_LAYER0] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
-  [_LAYER1] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
-  [_LAYER2] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
-  [_LAYER3] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
-  [_LAYER4] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
-  [_LAYER5] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
-  [_LAYER6] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
-  [_LAYER7] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
-  [_LAYER8] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
-  [_LAYER9] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}}
-};
-
-void matrix_init_user(void) {
-  #ifdef BACKLIGHT_ENABLE
-    backlight_level(0);
-  #endif
-}
diff --git a/keyboards/M10A/rules.mk b/keyboards/M10A/rules.mk
deleted file mode 100644 (file)
index f5a785d..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# Processor frequency.
-#     This will define a symbol, F_CPU, in all source code files equal to the
-#     processor frequency in Hz. You can then use this symbol in your source code to
-#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-#     automatically to create a 32-bit value in your source code.
-#
-#     This will be an integer division of F_USB below, as it is sourced by
-#     F_USB after it has run through any CPU prescalers. Note that this value
-#     does not *change* the processor frequency - it should merely be updated to
-#     reflect the processor speed set externally so that the code can use accurate
-#     software delays.
-F_CPU = 16000000
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-#     This will define a symbol, F_USB, in all source code files equal to the
-#     input clock frequency (before any prescaling is performed) in Hz. This value may
-#     differ from F_CPU if prescaling is used on the latter, and is required as the
-#     raw input clock is fed directly to the PLL sections of the AVR for high speed
-#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-#     at the end, this will be done automatically to create a 32-bit value in your
-#     source code.
-#
-#     If no clock division is performed on the input clock inside the AVR (via the
-#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-#   Teensy halfKay   512
-#   Teensy++ halfKay 1024
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-#   USBaspLoader     2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-# Build Options
-#   change to "no" to disable the options, or define them in the Makefile in 
-#   the appropriate keymap folder that will get included automatically
-#
-BOOTMAGIC_ENABLE ?= no       # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= yes       # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes       # Audio control and System control(+450)
-CONSOLE_ENABLE ?= no         # Console for debug(+400)
-COMMAND_ENABLE ?= no        # Commands for debug and configuration
-NKRO_ENABLE ?= yes            # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE ?= yes      # Enable keyboard backlight functionality
-MIDI_ENABLE ?= no            # MIDI controls
-AUDIO_ENABLE ?= no           # Audio output on port C6
-UNICODE_ENABLE ?= yes         # Unicode
-BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE ?= no        # Enable WS2812 RGB underlight.
-API_SYSEX_ENABLE = yes
-
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no    # Breathing sleep LED during USB suspend
index d10bfe3bfceb0be68684ee2aa45e0e0fbb1d153c..c324078dd9aa1b379a73e61bafdd39585f2c3bcd 100644 (file)
@@ -255,7 +255,7 @@ float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
 
 #endif /* AUDIO_ENABLE */
 
-void persistant_default_layer_set(uint16_t default_layer)
+void persistent_default_layer_set(uint16_t default_layer)
 {
     eeconfig_update_default_layer(default_layer);
     default_layer_set(default_layer);
@@ -366,7 +366,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
         case MACRO_QWERTY:
             if (record->event.pressed)
             {
-                persistant_default_layer_set(1UL<<LAYER_QWERTY);
+                persistent_default_layer_set(1UL<<LAYER_QWERTY);
             }
             break;
 
diff --git a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png b/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png
deleted file mode 100644 (file)
index 1d5bd78..0000000
Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-base.png and /dev/null 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 (file)
index cf4db3e..0000000
Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-extend.png and /dev/null 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 (file)
index 30e5621..0000000
Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-function.png and /dev/null 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 (file)
index 95f8be5..0000000
Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-game.png and /dev/null 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 (file)
index 3c445f9..0000000
Binary files a/keyboards/atreus/keymaps/replicaJunction/atreus-replica-num.png and /dev/null differ
index 6ac3cb00a4e8c734daaba218c34d87e402e3def4..6a330bdbfc2601b5ee046f5c379895ef53f0885e 100644 (file)
@@ -10,7 +10,7 @@ I won't claim that this layout is perfect for everyone. It does make several sig
 
 ## Base Layer ##
 
-![Atreus base layout](atreus-replica-base.png)
+![Atreus base layout](http://imgur.com/YbOjS7O)
 
 The letters on this layout are arranged in the [Colemak Mod-DH layout](https://colemakmods.github.io/mod-dh/).
 
@@ -22,7 +22,7 @@ In addition to the Shift keys, there are three dual-purpose keys: Ctrl (Delete),
 
 ## Extend Layer ##
 
-![Atreus extend layer](atreus-replica-extend.png)
+![Atreus extend layer](http://imgur.com/WiKkMQw)
 
 This 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.
 
@@ -34,7 +34,7 @@ The Space key exists to prevent going from this layer directly into the Number l
 
 ## Number and Symbol Layer ##
 
-![Atreus number and symbol layer](atreus-replica-num.png)
+![Atreus number and symbol layer](http://imgur.com/gfTXcjC)
 
 This 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.
 
@@ -42,7 +42,7 @@ This layer also provides plenty of symbol shortcuts. Most of these can be access
 
 ## Function Layer ##
 
-![Atreus function layer](atreus-replica-function.png)
+![Atreus function layer](http://imgur.com/m5x0MxZ)
 
 Function 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.
 
@@ -52,7 +52,7 @@ Finally, the reset key is on this layer, as well as toggles from Colemak to QWER
 
 ## Gaming Layer ##
 
-![Atreus gaming layer](atreus-replica-game.png)
+![Atreus gaming layer](http://imgur.com/4S5AO4E)
 
 This 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.
 
index ed943eb669718ec639e93d3a6dc918ea1aa0c195..347445ef6bc9e1393730037ba11c187d385ef013 100644 (file)
@@ -168,7 +168,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -177,25 +177,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   switch (keycode) {
         case QWERTY:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           return false;
           break;
         case COLEMAK:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
           }
           return false;
           break;
         case DVORAK:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_DVORAK);
+            persistent_default_layer_set(1UL<<_DVORAK);
           }
           return false;
           break;
         case DVORMAC:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_DVORMAC);
+            persistent_default_layer_set(1UL<<_DVORMAC);
           }
           return false;
           break;
index 7bb5da9fcb4f972a91ec03c702a2867f30780161..e65bf5de1c73e770558f00a9f1a064e558602a82 100644 (file)
@@ -21,7 +21,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym
 
 ## Base layer
 
-![Base layer](img/base.png)
+![Base layer](http://imgur.com/zTYxnE0)
 
 
 * 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
 
 ## Nav layer
 
-![Nav layer](img/fun.png)
+![Nav layer](http://imgur.com/cbMWVDC)
 
 Basic navigation on the right hand and modifiers close
 by for the left. The latter because I tend to use `ctrl+arrows` quite a lot.
 
 ## Sym layer
 
-![Sym layer](img/sym.png)
+![Sym layer](http://imgur.com/n2jmqFU)
 
 * 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.
 
diff --git a/keyboards/atreus62/keymaps/mneme/img/base.png b/keyboards/atreus62/keymaps/mneme/img/base.png
deleted file mode 100644 (file)
index 3e77a51..0000000
Binary files a/keyboards/atreus62/keymaps/mneme/img/base.png and /dev/null differ
diff --git a/keyboards/atreus62/keymaps/mneme/img/fun.png b/keyboards/atreus62/keymaps/mneme/img/fun.png
deleted file mode 100644 (file)
index 961a197..0000000
Binary files a/keyboards/atreus62/keymaps/mneme/img/fun.png and /dev/null differ
diff --git a/keyboards/atreus62/keymaps/mneme/img/sym.png b/keyboards/atreus62/keymaps/mneme/img/sym.png
deleted file mode 100644 (file)
index 5e2c803..0000000
Binary files a/keyboards/atreus62/keymaps/mneme/img/sym.png and /dev/null differ
index 7b7c69f57ae93bead0b18bf175577177e05a6e6c..67e66584a64fbe6f94aefd50eb44d08a3d7d2dbf 100644 (file)
@@ -119,7 +119,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -128,25 +128,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   switch (keycode) {
         case QWERTY:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           return false;
           break;
         case COLEMAK:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
           }
           return false;
           break;
         case DVORAK:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_DVORAK);
+            persistent_default_layer_set(1UL<<_DVORAK);
           }
           return false;
           break;
         case WOW:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_WOW);
+            persistent_default_layer_set(1UL<<_WOW);
           }
           return false;
           break;
diff --git a/keyboards/clueboard/keymaps/caps_fn/layout.png b/keyboards/clueboard/keymaps/caps_fn/layout.png
deleted file mode 100644 (file)
index a5bd57a..0000000
Binary files a/keyboards/clueboard/keymaps/caps_fn/layout.png and /dev/null differ
index 74ad01fca8e0399b5721bc0cf142fe778d198ac4..47a530a80b4eb59c675b96af3953cf4f078f8551 100644 (file)
@@ -1,13 +1,4 @@
-```
- ___     _____ _            _                         _     __    __ _   __
-|__ \   / ____| |          | |                       | |   / /   / /(_) / /
- ||) | | |    | |_   _  ___| |__   ___   __ _ _ __ __| |  / /_  / /_   / /
- |/ /  | |    | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
- |_|   | |____| | |_| |  __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
- (_)    \_____|_|\__,_|\___|_.__/ \___/ \__,_|_|  \__,_|  \___/ \___/_/ (_)
-```
-
-![Clueboard Layout Image](layout.png)
+![Clueboard Layout Image](http://i.imgur.com/kGADucy.png)
 
 # Caps Fn Layout
 
diff --git a/keyboards/clueboard/keymaps/default/layout.png b/keyboards/clueboard/keymaps/default/layout.png
deleted file mode 100644 (file)
index cd31816..0000000
Binary files a/keyboards/clueboard/keymaps/default/layout.png and /dev/null differ
index cede17ee17b099c44a4d98d118d06f35568df049..019131aeb199e8eb1330b9aacc472933625243fe 100644 (file)
@@ -1,13 +1,4 @@
-```
- ___     _____ _            _                         _     __    __ _   __
-|__ \   / ____| |          | |                       | |   / /   / /(_) / /
- ||) | | |    | |_   _  ___| |__   ___   __ _ _ __ __| |  / /_  / /_   / /
- |/ /  | |    | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
- |_|   | |____| | |_| |  __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
- (_)    \_____|_|\__,_|\___|_.__/ \___/ \__,_|_|  \__,_|  \___/ \___/_/ (_)
-```
-
-![Clueboard Layout Image](layout.png)
+![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png)
 
 # Default Clueboard Layout
 
diff --git a/keyboards/clueboard/keymaps/jokrik/keymap.c b/keyboards/clueboard/keymaps/jokrik/keymap.c
new file mode 100644 (file)
index 0000000..acde4d9
--- /dev/null
@@ -0,0 +1,86 @@
+#include "clueboard.h"
+
+// Helpful defines
+#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))
+#define _______ KC_TRNS
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _BL 0
+#define _FL 1
+#define _CL 2
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  /* Keymap _BL: Base Layer (Default Layer)
+   */
+[_BL] = KEYMAP(
+  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, \
+  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, \
+  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,                             \
+  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,            \
+  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),
+
+  /* Keymap _FL: Function Layer
+   */
+[_FL] = KEYMAP(
+  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, \
+  _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS,  _______,  _______,  _______,                   _______, \
+  _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                           \
+  _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,          KC_PGUP,         \
+  _______, _______, _______, _______,        _______,_______,                        _______,  _______,  MO(_FL),  _______, KC_HOME, KC_PGDN, KC_END),
+
+  /* Keymap _CL: Control layer
+   */
+[_CL] = KEYMAP(
+  _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______, RGB_TOG,             RGB_VAI, \
+  _______, _______, _______,_______,RESET,  _______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                   RGB_VAD, \
+  _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                         \
+  MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,          RGB_SAI,          \
+  _______, _______, _______,_______,        RGB_MOD,   RGB_MOD,                      _______,  _______,  MO(_FL),  _______, RGB_HUD,    RGB_SAD,    RGB_HUI),
+};
+
+/* This is a list of user defined functions. F(N) corresponds to item N
+   of this list.
+ */
+const uint16_t PROGMEM fn_actions[] = {
+  [0] = ACTION_FUNCTION(0),  // Calls action_function()
+};
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
+  static uint8_t mods_pressed;
+  static bool mod_flag;
+
+  switch (id) {
+    case 0:
+      /* Handle the combined Grave/Esc key
+       */
+      mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
+
+      if (record->event.pressed) {
+        /* The key is being pressed.
+         */
+        if (mods_pressed) {
+          mod_flag = true;
+          add_key(KC_GRV);
+          send_keyboard_report();
+        } else {
+          add_key(KC_ESC);
+          send_keyboard_report();
+        }
+      } else {
+        /* The key is being released.
+         */
+        if (mod_flag) {
+          mod_flag = false;
+          del_key(KC_GRV);
+          send_keyboard_report();
+        } else {
+          del_key(KC_ESC);
+          send_keyboard_report();
+        }
+      }
+      break;
+  }
+}
diff --git a/keyboards/clueboard/keymaps/jokrik/readme.md b/keyboards/clueboard/keymaps/jokrik/readme.md
new file mode 100644 (file)
index 0000000..a845e65
--- /dev/null
@@ -0,0 +1,2 @@
+# Jokrik's Clueboard Layout
+
index 7ea02d27e83dbe782c3f68d8e300fbb91b9b60b2..e72733092f21d6e5d03d73e2a74420c1714dce5a 100644 (file)
@@ -50,35 +50,28 @@ const uint16_t PROGMEM fn_actions[] = {
 
 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
   static uint8_t mods_pressed;
-  static bool mod_flag;
 
   switch (id) {
     case 0:
       /* Handle the combined Grave/Esc key
        */
-      mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
-
       if (record->event.pressed) {
         /* The key is being pressed.
          */
+        mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
         if (mods_pressed) {
-          mod_flag = true;
-          add_key(KC_GRV);
-          send_keyboard_report();
+          register_code(KC_GRV);
         } else {
-          add_key(KC_ESC);
-          send_keyboard_report();
+          register_code(KC_ESC);
         }
       } else {
         /* The key is being released.
          */
-        if (mod_flag) {
-          mod_flag = false;
-          del_key(KC_GRV);
-          send_keyboard_report();
+        if (mods_pressed) {
+          mods_pressed = false;
+          unregister_code(KC_GRV);
         } else {
-          del_key(KC_ESC);
-          send_keyboard_report();
+          unregister_code(KC_ESC);
         }
       }
       break;
diff --git a/keyboards/clueboard/keymaps/mac_optimized/layout.png b/keyboards/clueboard/keymaps/mac_optimized/layout.png
deleted file mode 100644 (file)
index e84ba54..0000000
Binary files a/keyboards/clueboard/keymaps/mac_optimized/layout.png and /dev/null differ
index 940e09125d016a7018785de04cc7b754c9ad5da0..282da369dc6ca868df9b02a8536e4d2bb5e38710 100644 (file)
@@ -1,13 +1,4 @@
-```
- ___     _____ _            _                         _     __    __ _   __
-|__ \   / ____| |          | |                       | |   / /   / /(_) / /
- ||) | | |    | |_   _  ___| |__   ___   __ _ _ __ __| |  / /_  / /_   / /
- |/ /  | |    | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
- |_|   | |____| | |_| |  __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
- (_)    \_____|_|\__,_|\___|_.__/ \___/ \__,_|_|  \__,_|  \___/ \___/_/ (_)
-```
-
-![Clueboard Layout Image](layout.png)
+![Clueboard Layout Image](http://i.imgur.com/7oZCsHF.png)
 
 # Default Clueboard Layout for Mac
 
diff --git a/keyboards/clueboard/keymaps/magicmonty/Makefile b/keyboards/clueboard/keymaps/magicmonty/Makefile
new file mode 100644 (file)
index 0000000..1ae7277
--- /dev/null
@@ -0,0 +1,2 @@
+MOUSEKEY_ENABLE = yes
+EXTRAKEY_ENABLE = yes
diff --git a/keyboards/clueboard/keymaps/magicmonty/keymap.c b/keyboards/clueboard/keymaps/magicmonty/keymap.c
new file mode 100644 (file)
index 0000000..6ca843a
--- /dev/null
@@ -0,0 +1,157 @@
+#include "clueboard.h"
+
+// Helpful defines
+#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))
+#define _______ KC_TRNS
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _BL 0
+#define _FL 1
+#define _ME 2
+#define _CL 3
+#define _ML 4
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  /* Keymap _BL: Base Layer (Default Layer)
+   */
+  [_BL] = KEYMAP(
+    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, \
+    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, \
+    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,                            \
+    KC_LSFT, KC_NUBS, KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM, KC_DOT,   KC_SLSH,  _______,  KC_RSFT,          KC_UP,           \
+    KC_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),
+
+  /* Keymap _FL: Function Layer
+   */
+  [_FL] = KEYMAP(
+    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, \
+    _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,_______, KC_PAUS,  _______,  _______,  _______,                   _______, \
+    MO(_FL), _______, MO(_CL),_______,_______,_______,KC_LEFT,KC_DOWN,  KC_UP,KC_RGHT, _______,  _______,  _______,  _______,                            \
+    _______, _______, _______,_______,_______,_______,_______,_______,MO(_ME),_______, _______,  _______,  _______,  _______,          KC_PGUP,          \
+    _______, _______, _______,_______,        _______,_______,                         _______,  _______,  _______,  MO(_FL), KC_HOME, KC_PGDN, KC_END),
+
+  /* Keymap _ME: Media layer
+    */
+  [_ME] = KEYMAP(
+    _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______, KC_MUTE,         KC_VOLU, \
+    _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                  KC_VOLD, \
+    _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                           \
+    MO(_FL), _______, _______,_______,_______,_______,_______,_______,MO(_ME),_______, _______,  _______,  _______,  MO(_FL),          _______,         \
+    _______, _______, _______,_______,                _______,_______,                 _______,  _______,  _______,  _______, KC_MPRV, KC_MPLY,KC_MNXT),
+
+  /* Keymap _CL: Control layer
+    */
+  [_CL] = KEYMAP(
+    _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______, RGB_TOG,          RGB_VAI, \
+    _______, _______, _______,_______,RESET,  _______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                   RGB_VAD, \
+    _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                            \
+    MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  MO(_FL),          RGB_SAI,          \
+    _______, _______, _______,_______,        RGB_MOD,RGB_MOD,                         _______,  _______,  _______,  _______, RGB_HUD, RGB_SAD, RGB_HUI),
+
+  /* Keymap _ML: Mouse layer
+    */
+  [_ML] = KEYMAP(
+    _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______, _______,         _______, \
+    _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,                  _______, \
+    _______, _______, KC_BTN3,KC_BTN2,KC_BTN1,_______,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R, _______,  _______,  _______,  _______,                           \
+    _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______,  _______,  _______,  _______,          KC_MS_U,         \
+    _______, _______, _______,_______,        LT(_ML, KC_SPC),LT(_ML, KC_SPC),         _______,  KC_BTN1,  KC_BTN2,  KC_BTN3, KC_MS_L, KC_MS_D,KC_MS_R),
+};
+
+/* This is a list of user defined functions. F(N) corresponds to item N
+   of this list.
+ */
+const uint16_t PROGMEM fn_actions[] = {
+  [0] = ACTION_FUNCTION(0),  // Calls action_function()
+};
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
+  static uint8_t mods_pressed;
+  static bool mod_flag;
+
+  switch (id) {
+    case 0:
+      /* Handle the combined Grave/Esc key
+       */
+      mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
+
+      if (record->event.pressed) {
+        /* The key is being pressed.
+         */
+        if (mods_pressed) {
+          mod_flag = true;
+          add_key(KC_GRV);
+          send_keyboard_report();
+        } else {
+          add_key(KC_ESC);
+          send_keyboard_report();
+        }
+      } else {
+        /* The key is being released.
+         */
+        if (mod_flag) {
+          mod_flag = false;
+          del_key(KC_GRV);
+          send_keyboard_report();
+        } else {
+          del_key(KC_ESC);
+          send_keyboard_report();
+        }
+      }
+      break;
+  }
+}
+
+enum layer_id {
+  LAYER_BASE,
+  LAYER_FUNCTION,
+  LAYER_MEDIA,
+  LAYER_CONTROL,
+  LAYER_MOUSE
+};
+
+void clueboard_set_led(uint8_t id) {
+  switch (id) {
+    case LAYER_BASE:
+      rgblight_sethsv_noeeprom(346, 0, 255);
+      break;
+    case LAYER_FUNCTION:
+      rgblight_sethsv_noeeprom(46, 255, 255);
+      break;
+    case LAYER_MEDIA:
+      rgblight_sethsv_noeeprom(86, 255, 255);
+      break;
+    case LAYER_CONTROL:
+      rgblight_sethsv_noeeprom(346, 255, 255);
+      break;
+    case LAYER_MOUSE:
+      rgblight_sethsv_noeeprom(206, 255, 255);
+      break;
+  }
+};
+
+void matrix_scan_user(void) {
+    rgblight_config_t rgblight_config;
+    rgblight_config.raw = eeconfig_read_rgblight();
+
+    if (!rgblight_config.enable || rgblight_config.mode != 1) { return; }
+
+    uint32_t layer = layer_state;
+
+    if (layer & (1<<_FL)) {
+      if (layer & (1<<_ME)) {
+        clueboard_set_led(LAYER_MEDIA);
+      } else if (layer & (1<<_CL)) {
+        clueboard_set_led(LAYER_CONTROL);
+      } else {
+        clueboard_set_led(LAYER_FUNCTION);
+      }
+    } else if (layer & (1<<_ML)) {
+        clueboard_set_led(LAYER_MOUSE);
+    } else {
+        clueboard_set_led(LAYER_BASE);
+    }
+};
diff --git a/keyboards/clueboard/keymaps/magicmonty/readme.md b/keyboards/clueboard/keymaps/magicmonty/readme.md
new file mode 100644 (file)
index 0000000..2959172
--- /dev/null
@@ -0,0 +1,23 @@
+![Clueboard Layout Image](http://i.imgur.com/ngg4EAY.png)
+
+# MouseKeys Layout
+
+This layout is a combination of the `mouse_keys` and the `win_optimized` layouts.
+This layout is optimized for an ISO layout.
+
+It adds a mouse layer. When you hold down the spacebar the arrow keys
+will move your mouse cursor. You can click using the 3 mods to the left of the
+arrow keys, or the 3 keys under your primary fingers on the home row.
+The Left, Down, Up and Right for the mouse movement are also VIM-Like on the HJKL keys
+
+The CapsLock is disabled and works as Function key.
+
+There is also a separate media layer with Volume/Play controls
+
+The different layers are signalled throug setting of the underlight:
+
+- Base layer: White
+- Function layer: Yellow
+- Media layer: Green
+- Mouse layer: Blue
+- Control layer: Red
diff --git a/keyboards/clueboard/keymaps/maximised/layout.png b/keyboards/clueboard/keymaps/maximised/layout.png
deleted file mode 100644 (file)
index bdc5d76..0000000
Binary files a/keyboards/clueboard/keymaps/maximised/layout.png and /dev/null differ
index b95d1750f40a37cde68f023c52b2500311b86421..fc82e68793563b395df023aa8e757f5b43bd1101 100644 (file)
@@ -1,13 +1,4 @@
-```
- ___     _____ _            _                         _     __    __ _   __
-|__ \   / ____| |          | |                       | |   / /   / /(_) / /
- ||) | | |    | |_   _  ___| |__   ___   __ _ _ __ __| |  / /_  / /_   / /
- |/ /  | |    | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
- |_|   | |____| | |_| |  __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
- (_)    \_____|_|\__,_|\___|_.__/ \___/ \__,_|_|  \__,_|  \___/ \___/_/ (_)
-```
-
-![Clueboard Layout Image](layout.png)
+![Clueboard Layout Image](http://i.imgur.com/7oZCsHF.png)
 
 # Maximised Clueboard Layout
 
diff --git a/keyboards/clueboard/keymaps/mouse_keys/layout.png b/keyboards/clueboard/keymaps/mouse_keys/layout.png
deleted file mode 100644 (file)
index 52e5c45..0000000
Binary files a/keyboards/clueboard/keymaps/mouse_keys/layout.png and /dev/null differ
index 97ac6dfa23f9cabd777a441ccb40f83062e54541..7fb038205a3adf52189b1e6c2fc49d86bcbfb755 100644 (file)
@@ -1,12 +1,3 @@
-```
- ___     _____ _            _                         _     __    __ _   __
-|__ \   / ____| |          | |                       | |   / /   / /(_) / /
- ||) | | |    | |_   _  ___| |__   ___   __ _ _ __ __| |  / /_  / /_   / /
- |/ /  | |    | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
- |_|   | |____| | |_| |  __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
- (_)    \_____|_|\__,_|\___|_.__/ \___/ \__,_|_|  \__,_|  \___/ \___/_/ (_)
-```
-
 ![Clueboard Layout Image](layout.png)
 
 # MouseKeys Layout
diff --git a/keyboards/clueboard/keymaps/serubin/layout-base.png b/keyboards/clueboard/keymaps/serubin/layout-base.png
deleted file mode 100644 (file)
index 8dcdc06..0000000
Binary files a/keyboards/clueboard/keymaps/serubin/layout-base.png and /dev/null differ
diff --git a/keyboards/clueboard/keymaps/serubin/layout-fn.png b/keyboards/clueboard/keymaps/serubin/layout-fn.png
deleted file mode 100644 (file)
index 3cff46a..0000000
Binary files a/keyboards/clueboard/keymaps/serubin/layout-fn.png and /dev/null differ
diff --git a/keyboards/clueboard/keymaps/serubin/layout-media.png b/keyboards/clueboard/keymaps/serubin/layout-media.png
deleted file mode 100644 (file)
index 753cb64..0000000
Binary files a/keyboards/clueboard/keymaps/serubin/layout-media.png and /dev/null differ
index e39adbb16926f485b8c7883f19cb1a3105d177dd..78eef53523c894d6c20ea10c2a8385a899f002fa 100644 (file)
@@ -1,23 +1,14 @@
-```
- ___     _____ _            _                         _     __    __ _   __
-|__ \   / ____| |          | |                       | |   / /   / /(_) / /
- ||) | | |    | |_   _  ___| |__   ___   __ _ _ __ __| |  / /_  / /_   / /
- |/ /  | |    | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
- |_|   | |____| | |_| |  __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
- (_)    \_____|_|\__,_|\___|_.__/ \___/ \__,_|_|  \__,_|  \___/ \___/_/ (_)
-```
-
 # Serubin's Clueboard Layout
 
 This 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. 
 
 #### Base Layer
-![Base Layout Image](layout-base.png)
+![Base Layout Image](http://i.imgur.com/qL78n1y.png)
 
 #### Fn Layer
-![Fn Layout Image](layout-fn.png)
+![Fn Layout Image](http://i.imgur.com/QuwxePw.png)
 
 #### Media Layer
-![Media Layer Image](layout-media.png)
+![Media Layer Image](http://i.imgur.com/oOfWXMf.png)
 
 
index fdec37a5401b27ac8af5fa2cec59f1b72faaeaed..83ae1d615490cb7842dcb4866a606d20836fe284 100644 (file)
@@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   /* Keymap _FL: Function Layer
    */
 [_FL] = KEYMAP(
-  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,    \
+  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,    \
   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), \
   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),                               \
   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 (file)
index 66d8541..0000000
Binary files a/keyboards/clueboard/keymaps/shift_fn/layout.png and /dev/null differ
index 369f556f88781540f5255bbd745bab3b9f3175e8..4bd920ad4ef322944e45b3a3ad8834d5fdf69048 100644 (file)
@@ -1,14 +1,3 @@
-```
- ___     _____ _            _                         _     __    __ _   __
-|__ \   / ____| |          | |                       | |   / /   / /(_) / /
- ||) | | |    | |_   _  ___| |__   ___   __ _ _ __ __| |  / /_  / /_   / /
- |/ /  | |    | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
- |_|   | |____| | |_| |  __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
- (_)    \_____|_|\__,_|\___|_.__/ \___/ \__,_|_|  \__,_|  \___/ \___/_/ (_)
-```
-
-![Clueboard Layout Image](layout.png)
-
 # Shift Fn Clueboard Layout
 
 This is an experimental layout. It makes the left shift key a dual roll key.
index df7757a92224080aabd9751e09ea72e61308286c..47dee8e6d4d92a93f532a0ea8c0480ab5ebbd152 100644 (file)
@@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   /* Keymap _FL: Function Layer
    */
 [_FL] = KEYMAP(
-  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,    \
+  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,    \
   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), \
   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),                               \
   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 (file)
index 64854aa..0000000
Binary files a/keyboards/clueboard/keymaps/skully/layout.png and /dev/null differ
index 08255dfbc575a34de68968f158b35ad22d317b95..b9ad1b09a9c6ec920367075128d53a140ada5f28 100644 (file)
@@ -1,16 +1,11 @@
-```
- ___     _____ _            _                         _     __    __ _   __
-|__ \   / ____| |          | |                       | |   / /   / /(_) / /
- ||) | | |    | |_   _  ___| |__   ___   __ _ _ __ __| |  / /_  / /_   / /
- |/ /  | |    | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
- |_|   | |____| | |_| |  __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
- (_)    \_____|_|\__,_|\___|_.__/ \___/ \__,_|_|  \__,_|  \___/ \___/_/ (_)
-```
-
-![Clueboard Layout Image](layout.png)
+![Clueboard Layout Image](http://i.imgur.com/VaoGn3M.png)
 
 # skullY's Clueboard Layout
 
 This layout is what I (@skullydazed) use on my personal Clueboards. I mostly use it for programming, CAD, and general typing.
 
-The 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.
+I've made the following changes from the default layout:
+
+* shift_fn on left shift
+* Change capslock to control
+* Swap Alt and Cmd
index 732086fb56bdde25872c68fe88e241bbbe1b9f20..f097afaa8d2999a037e965e4cde100b048b801b2 100644 (file)
@@ -151,7 +151,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
   }
 }
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -160,19 +160,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   switch (keycode) {
     case QWERTY:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
     case COLEMAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
     case DVORAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
diff --git a/keyboards/clueboard/keymaps/smt/layout.png b/keyboards/clueboard/keymaps/smt/layout.png
deleted file mode 100644 (file)
index 6c27277..0000000
Binary files a/keyboards/clueboard/keymaps/smt/layout.png and /dev/null differ
index 6a8b3edb44c161dbcf7f32471045b1c13a58573d..7fc0f0248d1dab05e003af4ae8d218a6ab2aadcd 100644 (file)
@@ -1,15 +1,6 @@
-```
- ___     _____ _            _                         _     __    __ _   __
-|__ \   / ____| |          | |                       | |   / /   / /(_) / /
- ||) | | |    | |_   _  ___| |__   ___   __ _ _ __ __| |  / /_  / /_   / /
- |/ /  | |    | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
- |_|   | |____| | |_| |  __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
- (_)    \_____|_|\__,_|\___|_.__/ \___/ \__,_|_|  \__,_|  \___/ \___/_/ (_)
-```
-
 # smt Clueboard Layout (HHKB variant)
 
-![Clueboard Layout Image](layout.png)
+![Clueboard Layout Image](http://i.imgur.com/Ll5gGte.png)
 
 This is smt's HHKB variant layout, based on the default layout that comes
 flashed 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 (file)
index ea7d30e..0000000
Binary files a/keyboards/clueboard/keymaps/unix_optimized/layout.png and /dev/null differ
index 3510e138bf1ada9f44f1b93a664c7ecb4a281e1f..9e6d0e902aa9bbbc6c981d858790b59bfbefae69 100644 (file)
@@ -1,13 +1,4 @@
-```
- ___     _____ _            _                         _     __    __ _   __
-|__ \   / ____| |          | |                       | |   / /   / /(_) / /
- ||) | | |    | |_   _  ___| |__   ___   __ _ _ __ __| |  / /_  / /_   / /
- |/ /  | |    | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
- |_|   | |____| | |_| |  __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
- (_)    \_____|_|\__,_|\___|_.__/ \___/ \__,_|_|  \__,_|  \___/ \___/_/ (_)
-```
-
-![Clueboard Layout Image](layout.png)
+![Clueboard Layout Image](http://i.imgur.com/BnWlOht.png)
 
 # Default Clueboard Layout
 
diff --git a/keyboards/clueboard/keymaps/win_optimized/layout.png b/keyboards/clueboard/keymaps/win_optimized/layout.png
deleted file mode 100644 (file)
index 7d8c82d..0000000
Binary files a/keyboards/clueboard/keymaps/win_optimized/layout.png and /dev/null differ
index cede17ee17b099c44a4d98d118d06f35568df049..703a37be0c1c73cbca0634981385882391760aa8 100644 (file)
@@ -1,13 +1,4 @@
-```
- ___     _____ _            _                         _     __    __ _   __
-|__ \   / ____| |          | |                       | |   / /   / /(_) / /
- ||) | | |    | |_   _  ___| |__   ___   __ _ _ __ __| |  / /_  / /_   / /
- |/ /  | |    | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
- |_|   | |____| | |_| |  __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
- (_)    \_____|_|\__,_|\___|_.__/ \___/ \__,_|_|  \__,_|  \___/ \___/_/ (_)
-```
-
-![Clueboard Layout Image](layout.png)
+![Clueboard Layout Image](http://i.imgur.com/fsqOqZo.png)
 
 # Default Clueboard Layout
 
index 592f7654ba541871bdd12e2c0744ecf1d8e103c1..47a5181ddef39bd474704d5edfffabe26eec34cb 100644 (file)
@@ -256,7 +256,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
     */
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -266,25 +266,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
     /* layout switcher */
     case LAY_QWE:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<QWE);
+        persistent_default_layer_set(1UL<<QWE);
       }
       return false;
       break;
     case LAY_COL:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<COL);
+        persistent_default_layer_set(1UL<<COL);
       }
       return false;
       break;
     case LAY_WOR:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<WOR);
+        persistent_default_layer_set(1UL<<WOR);
       }
       return false;
       break;
     case LAY_DVO:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<DVO);
+        persistent_default_layer_set(1UL<<DVO);
       }
       return false;
       break;
diff --git a/keyboards/dk60/Makefile b/keyboards/dk60/Makefile
new file mode 100644 (file)
index 0000000..4e2a6f0
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
\ No newline at end of file
diff --git a/keyboards/dk60/config.h b/keyboards/dk60/config.h
new file mode 100644 (file)
index 0000000..9c5232e
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+Copyright 2017 Damien Broqua <contact@darkou.fr>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+    #define CONFIG_H
+
+    #include "config_common.h"
+
+    /* USB Device descriptor parameter */
+    #define VENDOR_ID       0xFEED
+    #define PRODUCT_ID      0x6060
+    #define DEVICE_VER      0x0003
+    #define MANUFACTURER    DARKOU
+    #define PRODUCT         DK60
+    #define DESCRIPTION     QMK keyboard firmware for DK60 support
+
+    /* key matrix size */
+    #define MATRIX_ROWS 5
+    #define MATRIX_COLS 13
+
+    // ROWS: Top to bottom, COLS: Left to right
+    #define MATRIX_ROW_PINS { B6, B4, D7, D6, D4 }
+    #define MATRIX_COL_PINS { B0, B3, B2, B1, D3, D5, B5, B7, C6, C7, D0, D1, D2 }
+    #define UNUSED_PINS
+
+    /* COL2ROW or ROW2COL */
+    #define DIODE_DIRECTION COL2ROW
+
+    /* Set 0 if debouncing isn't needed */
+    #define DEBOUNCING_DELAY 5
+
+    /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+    #define LOCKING_SUPPORT_ENABLE
+    /* Locking resynchronize hack */
+    #define LOCKING_RESYNC_ENABLE
+
+    /* key combination for command */
+    #define IS_COMMAND() ( \
+        keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+    )
+#endif
diff --git a/keyboards/dk60/dk60.c b/keyboards/dk60/dk60.c
new file mode 100644 (file)
index 0000000..93aeb33
--- /dev/null
@@ -0,0 +1,34 @@
+#include "dk60.h"
+
+void dk60_blink_all_leds(void)
+{
+    dk60_led_all_off();
+    dk60_led_all_on();
+    _delay_ms(500);
+    dk60_led_all_off();
+}
+
+void matrix_init_kb(void) {
+    led_init_ports();
+    dk60_blink_all_leds();
+
+    matrix_init_user();
+}
+
+void led_init_ports(void) {
+    // * Set our LED pins as output
+    DDRE |= (1<<6);
+    DDRF |= (1<<0);
+}
+
+void led_set_kb(uint8_t usb_led) {
+       if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+               // Turn capslock on
+               dk60_caps_led_on();
+       } else {
+               // Turn capslock off
+               dk60_caps_led_off();
+       }
+
+       led_set_user(usb_led);
+}
diff --git a/keyboards/dk60/dk60.h b/keyboards/dk60/dk60.h
new file mode 100644 (file)
index 0000000..4b91599
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef DK60_H
+    #define DK60_H
+
+    #include "quantum.h"
+    #include <util/delay.h>
+
+    inline void dk60_caps_led_on(void)      {  PORTE |= (1<<6); }
+    inline void dk60_esc_led_on(void)          {  PORTF |= (1<<0); }
+
+    inline void dk60_caps_led_off(void)     { PORTE &= ~(1<<6); }
+    inline void dk60_esc_led_off(void)         { PORTF &= ~(1<<0); }
+
+    inline void dk60_led_all_on(void)
+    {
+        dk60_caps_led_on();
+        dk60_esc_led_on();
+    }
+
+    inline void dk60_led_all_off(void)
+    {
+        dk60_caps_led_off();
+        dk60_esc_led_off();
+    }
+
+    #define ___ KC_NO
+
+    #define KEYMAP( \
+        K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K4B, K4A, \
+        K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K4C, \
+        K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
+        K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
+             K41, K42,           K45,           K48, K49  \
+    ) { \
+        { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \
+        { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \
+        { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \
+        { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \
+        { ___, K41, K42, ___, ___, K45, ___, ___, K48, K49, K4A, K4B, K4C }  \
+    }
+
+#endif
diff --git a/keyboards/dk60/keymaps/default/keymap.c b/keyboards/dk60/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..a6a3b83
--- /dev/null
@@ -0,0 +1,80 @@
+#include "dk60.h"
+#include "action_layer.h"
+
+enum planck_layers {
+  _QWERTY,
+  _FN,
+  _DVORAK,
+  _LOWER,
+  _RAISE,
+  _PLOVER,
+  _ADJUST
+};
+
+enum planck_keycodes {
+  QWERTY = SAFE_RANGE,
+  FN
+};
+
+// Fillers to make layering more clear
+#define ______ KC_TRNS
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Qwerty gui/alt/space/alt/gui
+ * ,-----------------------------------------------------------------------------------------.
+ * | Esc |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  0  |  -  |  =  |  \  |  `  |
+ * |-----------------------------------------------------------------------------------------+
+ * | Tab    |  Q  |  W  |  E  |  R  |  T  |  Y  |  U  |  I  |  O  |  P  |  [  |  ]  |  Bksp  |
+ * |-----------------------------------------------------------------------------------------+
+ * | Ctrl    |  A  |  S  |  D  |  F  |  G  |  H  |  J  |  K  |  L  |  ;  |  '  |    Enter    |
+ * |-----------------------------------------------------------------------------------------+
+ * | Shift     |  Z  |  X  |  C  |  V  |  B  |  N  |  M  |  ,  |  .  |  /  | RShift    | FN  |
+ * |-----------------------------------------------------------------------------------------+
+ *         |LGUI | LAlt  |               Space                | RAlt   |RGUI |
+ *         `-----------------------------------------------------------------'
+ */
+  [_QWERTY] = KEYMAP( /* Basic QWERTY */
+      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_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_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_LSFT,  KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM, KC_DOT, KC_SLSH,    KC_RSFT,    FN, \
+                KC_LGUI,KC_LALT,                KC_SPC,                          KC_RALT,KC_RGUI \
+      ),
+
+/* FN Layer
+ * ,-----------------------------------------------------------------------------------------.
+ * |     | F1  | F2  | F3  | F4  | F5  | F6  | F7  | F8  | F9  | F10 | F11 | F12 | Ins | Del |
+ * |-----------------------------------------------------------------------------------------+
+ * |  CAPS  |     |     |     |     |     |     |     | Psc | Slck| Paus| Up  |     |        |
+ * |-----------------------------------------------------------------------------------------+
+ * |         | Vol-| Vol+| Mute|     |     | *   | /   | Home| PgUp| Left|Right|             |
+ * |-----------------------------------------------------------------------------------------+
+ * |           | Prev| Play| Next|     |     | +   | -   | End  |PgDn| Down|           |     |
+ * |-----------------------------------------------------------------------------------------+
+ *         |       |       |                                 | Stop  |       |
+ *         `-----------------------------------------------------------------'
+ */
+  [_FN] = KEYMAP( /* Layer 1 */
+      ______, 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, \
+      KC_CAPS,  ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP,   ______, ______,  \
+      ______,   KC_VOLD,KC_VOLU,KC_MUTE,______, ______, KC_PAST,KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______,   \
+      ______,   KC_MPRV,KC_MPLY,KC_MNXT,______, ______, KC_PPLS,KC_PMNS,KC_END,  KC_PGDN, KC_DOWN, ______,  ______,  \
+                ______, ______,                 ______,                 KC_MSTP, ______ \
+      )
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+    case FN:
+      if (record->event.pressed) {
+        layer_on(_FN);
+        dk60_esc_led_on();
+      } else {
+        layer_off(_FN);
+        dk60_esc_led_off();
+      }
+      return false;
+      break;
+  }
+  return true;
+}
diff --git a/keyboards/dk60/readme.md b/keyboards/dk60/readme.md
new file mode 100644 (file)
index 0000000..544b5b0
--- /dev/null
@@ -0,0 +1,8 @@
+DK60 keyboard firmware
+======================
+
+Another 60% keyboard with different HHKB layout
+
+More information here: https://github.com/Dbroqua/DK60
+
+Open Hardware project!
diff --git a/keyboards/dk60/rules.mk b/keyboards/dk60/rules.mk
new file mode 100644 (file)
index 0000000..36c6bed
--- /dev/null
@@ -0,0 +1,21 @@
+MCU = atmega32u4
+F_CPU = 16000000
+ARCH = AVR8
+F_USB = $(F_CPU)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+BOOTMAGIC_ENABLE ?= yes        # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= no  # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
+# CONSOLE_ENABLE ?= yes        # Console for debug(+400)
+# COMMAND_ENABLE ?= yes    # Commands for debug and configuration
+KEYBOARD_LOCK_ENABLE ?= yes    # Allow locking of keyboard via magic key
+NKRO_ENABLE ?= yes             # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+RGBLIGHT_ENABLE ?= no   # Enable keyboard underlight functionality (+4870)
+BACKLIGHT_ENABLE ?= no  # Enable keyboard backlight functionality (+1150)
+MIDI_ENABLE ?= no              # MIDI controls
+AUDIO_ENABLE ?= no
+UNICODE_ENABLE ?= yes          # Unicode
+BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
+SLEEP_LED_ENABLE ?= yes
index 994a8c64333249d013dd97e5c06b0c5fdb932183..2091999bb3a5852d41c3ea0ed799709aaeec92e9 100644 (file)
@@ -3,8 +3,8 @@
 
 #define MOUSEKEY_INTERVAL       20
 #define MOUSEKEY_DELAY          0
-#define MOUSEKEY_TIME_TO_MAX    5
-#define MOUSEKEY_MAX_SPEED      2
+#define MOUSEKEY_TIME_TO_MAX    60
+#define MOUSEKEY_MAX_SPEED      7
 #define MOUSEKEY_WHEEL_DELAY 0
 
 #define TAPPING_TOGGLE  1
index aa17c3e8d32692d210ad1c55a227050b2292d042..cc8aa3d40eef00efd415ea01859736aea49f3199 100644 (file)
@@ -60,6 +60,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Set 0 if debouncing isn't needed */
 #define DEBOUNCE    15
 
+#define PREVENT_STUCK_MODIFIERS
+
 #define USB_MAX_POWER_CONSUMPTION 500
 
 /*
diff --git a/keyboards/ergodox/keymaps/333fred/Makefile b/keyboards/ergodox/keymaps/333fred/Makefile
new file mode 100644 (file)
index 0000000..87985bd
--- /dev/null
@@ -0,0 +1,12 @@
+SUBPROJECT_DEFAULT = infinity
+LCD_BACKLIGHT_ENABLE = yes
+LCD_ENABLE = yes
+LED_ENABLE = yes
+BACKLIGHT_ENABLE = yes
+NKRO_ENABLE = yes
+TAP_DANCE_ENABLE = yes
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
+
diff --git a/keyboards/ergodox/keymaps/333fred/README.md b/keyboards/ergodox/keymaps/333fred/README.md
new file mode 100644 (file)
index 0000000..af8042d
--- /dev/null
@@ -0,0 +1,122 @@
+## Layout
+
+### Keymap 0: Basic layer
+```
+,--------------------------------------------------.           ,--------------------------------------------------.
+|   `    |   1  |   2  |   3  |   4  |   5  |  =   |           |  L1  |   6  |   7  |   8  |   9  |   0  |   -    |
+|--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+| TAB    |   Q  |   W  |   E  |   R  |   T  |  L2  |           |  L2  |   Y  |   U  |   I  |   O  |   P  |   \    |
+|--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+| Esc    |   A  |   S  |   D  |LT 3,F|   G  |------|           |------|   H  |   J  |   K  |   L  |; / : |   '    |
+|--------+------+------+------+------+------|  L1  |           |TT(3) |------+------+------+------+------+--------|
+| LShift |Z/Ctrl|   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |//Ctrl| RShift |
+`--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+  |LCTRL |  F4  |  F5  | LGUI | LALT |                                       | Left | Down |  Up  | Right| RGUI |
+  `----------------------------------'                                       `----------------------------------'
+                                       ,-------------.       ,-------------.
+                                       | Home | End  |       | Alt  |Ctrl/Esc|
+                                ,------|------|------|       |------+--------+------.
+                                |      |      | PgUp |       | PgDn |        |      |
+                                | Bcksp|OSL(2)|------|       |------|  Ent   |Space |
+                                |      |      | Del  |       |OSL(2)|        |      |
+                                `--------------------'       `----------------------'
+```
+* Double-click `;` to get a `:`
+* Press-and-hold `f` to go to the movement layer
+
+### Keymap 1: Code Layer
+```
+,--------------------------------------------------.           ,--------------------------------------------------.
+|        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+|--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+|        |      |      |      |      |      |  F10 |           |  F11 |      |      |      |      |      |        |
+|--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+|        |      |      |      |      |      |------|           |------|      |      |      |      |      |        |
+|--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+|        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+`--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+  |      |      |      |      |      |                                       |      |      |      |      |      |
+  `----------------------------------'                                       `----------------------------------'
+                                       ,-------------.       ,---------------.
+                                       |Format|      |       | Test | DTest  |
+                                ,------|------|------|       |------+--------+------.
+                                |      |      |Refact|       |      |        |      |
+                                |      |      |------|       |------|        |      |
+                                |      |      |      |       |      |        |      |
+                                `--------------------'       `----------------------'
+```
+* Format - Visual Studio Format. Sends `CTRL + K, CTRL + D`
+* Refact - Visual Studio Refactor. Sends `CTRL + R, R`
+* Test   - Visual Studio Run Test. Sends `CTRL + R, T`
+* DTest  - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T`
+
+### Keymap 2: Symbol Layer
+```
+,---------------------------------------------------.           ,--------------------------------------------------.
+|Version  |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 |   F11  |
+|---------+------+------+------+------+------+------|           |------+------+------+------+------+------+--------|
+|         |   !  |   @  |   (  |   )  |   |  |      |           |      |   Up |   7  |   8  |   9  |   *  |   F12  |
+|---------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+|         |   #  |   $  |   {  |   }  |   `  |------|           |------| Down |   4  |   5  |   6  |   +  |        |
+|---------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+|         |   %  |   ^  |   [  |   ]  |   ~  |      |           |      |   &  |   1  |   2  |   3  |   \  |        |
+`---------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+  | EPRM  |      |      |      |      |                                       |   0  |   0  |   .  |   =  |      |
+  `-----------------------------------'                                       `----------------------------------'
+                                       ,-------------.       ,-------------.
+                                       |      | Caps |       |      |      |
+                                ,------|------|------|       |------+------+------.
+                                |      |      |APscr |       |      |      |      |
+                                |      |      |------|       |------|      |      |
+                                |      |      | PScr |       |      |      |      |
+                                `--------------------'       `--------------------'
+```
+* APscr - Take a printscreen of the current app. Sends `Alt + Print Screen`
+
+### Keymap 3: Media and Mouse Keys
+```
+,--------------------------------------------------.           ,--------------------------------------------------.
+|        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+|--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+|        |      |      | MsUp |      |      |      |           |      |      |      |      |      |      |        |
+|--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+|        |      |MsLeft|MsDown|MsRght|      |------|           |------|      |      |      |      |      |        |
+|--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+|        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+`--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+  |      |      |      | Lclk | Rclk |                                       |      |      |      |      |      |
+  `----------------------------------'                                       `----------------------------------'
+                                       ,-------------.       ,-------------.
+                                       |      |      |       | Vol+ |      |
+                                ,------|------|------|       |------+------+------.
+                                |      |      |      |       | Vol- |      |      |
+                                |      |      |------|       |------| PL/PS| Next |
+                                |      |      |      |       | Back |      |      |
+                                `--------------------'       `--------------------'
+```
+
+### Keymap 4: Movement
+```
+,--------------------------------------------------.           ,--------------------------------------------------.
+|        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+|--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+|        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+|--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+|        |DLeft |DRight|LShift|      |      |------|           |------| Left | Down |  Up  | Right|      |        |
+|--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+|        |KOpen |KType |      |      |      |      |           |      |      |      |      |      |      |        |
+`--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+  |      |      |      |      |      |                                       |      |      |      |      |      |
+  `----------------------------------'                                       `----------------------------------'
+                                       ,-------------.       ,-------------.
+                                       |      |      |       |      |      |
+                                ,------|------|------|       |------+------+------.
+                                |      |      |      |       |      |      |      |
+                                |      | CTRL |------|       |------|      |      |
+                                |      |      |      |       |      |      |      |
+                                `--------------------'       `--------------------'
+```
+* DLeft - Move to the left Desktop. Sends `Ctrl + Win + Left Arrow`
+* DRight - Move to the right Desktop. Sends `Ctrl + Win + Right Arrow`
+* KOpen - Opens KeePass. Sends `Ctrl + Alt + k`
+* 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 (file)
index 0000000..070ad1f
--- /dev/null
@@ -0,0 +1,361 @@
+#include "ergodox.h"
+#include "debug.h"
+#include "action_layer.h"
+#include "version.h"
+
+#define BASE 0 // default layer
+#define CODE 1 // code layer
+#define SYMB 2 // symbols
+#define MDIA 3 // media keys
+#define MOVE 4 // movement layer
+
+enum custom_keycodes {
+  PLACEHOLDER = SAFE_RANGE, // can always be here
+  EPRM,
+  VRSN,
+};
+
+enum custom_macros {
+  VERSION,
+  EEPROM,
+
+  // Windows macros
+  DLEFT,
+  DRIGHT,
+  PSCREEN_APP,
+
+  // VS Macros
+  REFACTOR,
+  TEST,
+  DEBUG_TEST,
+  FORMAT,
+
+  // KeePass macros
+  KEEPASS_OPEN,
+  KEEPASS_TYPE,
+};
+
+// Tap Dance Definitions
+enum tap_dance_custom_keys {
+  TD_SEMICOLON_COLON = 0
+};
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+  [TD_SEMICOLON_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLON)
+};
+
+// NOTE: Cells marked with ACCESS must remain transparent, they're the keys that actually get to that layer
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: Basic layer
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |   `    |   1  |   2  |   3  |   4  |   5  |  =   |           |  L1  |   6  |   7  |   8  |   9  |   0  |   -    |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * | TAB    |   Q  |   W  |   E  |   R  |   T  |  L2  |           |  L2  |   Y  |   U  |   I  |   O  |   P  |   \    |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * | Esc    |   A  |   S  |   D  |LT 3,F|   G  |------|           |------|   H  |   J  |   K  |   L  |; / : |   '    |
+ * |--------+------+------+------+------+------|  L1  |           |MO(3) |------+------+------+------+------+--------|
+ * | LShift |Z/Ctrl|   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |//Ctrl| RShift |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |LCTRL |  F4  |  F5  | LGUI | LALT |                                       | Left | Down |  Up  | Right| RGUI |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        | Home | End  |       | Alt  |Ctrl/Esc|
+ *                                 ,------|------|------|       |------+--------+------.
+ *                                 |      |      | PgUp |       | PgDn |        |      |
+ *                                 | Bcksp|OSL(2)|------|       |------|  Ent   |Space |
+ *                                 |      |      | Del  |       |OSL(2)|        |      |
+ *                                 `--------------------'       `----------------------'
+ */
+// If it accepts an argument (i.e, is a function), it doesn't need KC_.
+// Otherwise, it needs KC_*
+[BASE] = KEYMAP(  // layer 0 : default
+        // left hand
+        KC_GRV,        KC_1,         KC_2,   KC_3,   KC_4,          KC_5,   KC_EQL,
+        KC_TAB,        KC_Q,         KC_W,   KC_E,   KC_R,          KC_T,   TG(SYMB),
+        KC_ESC,        KC_A,         KC_S,   KC_D,   LT(MOVE, KC_F),KC_G,
+        KC_LSFT,       CTL_T(KC_Z),  KC_X,   KC_C,   KC_V,          KC_B,   TG(CODE),
+        KC_LCTRL,      KC_F4,        KC_F5,  KC_LGUI,KC_LALT,
+                                                                             KC_HOME,  KC_END,
+                                                                                       KC_PGUP,
+                                                                     KC_BSPC,OSL(SYMB),KC_DEL,
+        // right hand
+             TG(CODE),    KC_6,   KC_7,   KC_8,   KC_9,   KC_0,                  KC_MINS,
+             TG(SYMB),    KC_Y,   KC_U,   KC_I,   KC_O,   KC_P,                  KC_BSLS,
+                          KC_H,   KC_J,   KC_K,   KC_L,   TD(TD_SEMICOLON_COLON),KC_QUOT,
+             MO(MDIA),    KC_N,   KC_M,   KC_COMM,KC_DOT, CTL_T(KC_SLSH),        KC_RSFT,
+                                  KC_LEFT,KC_DOWN,KC_UP,  KC_RIGHT,          KC_RGUI,
+             KC_RALT,        CTL_T(KC_ESC),
+             KC_PGDN,
+             OSL(SYMB),KC_ENT, KC_SPC
+    ),
+/* Keymap 1: Code Layer
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |      |      |      |      |      |      |           |ACCESS|      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |  F10 |           |  F11 |      |      |      |      |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |------|           |------|      |      |      |      |      |        |
+ * |--------+------+------+------+------+------|ACCESS|           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |      |      |      |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,---------------.
+ *                                        |Format|      |       | Test | DTest  |
+ *                                 ,------|------|------|       |------+--------+------.
+ *                                 |      |      |Refact|       |      |        |      |
+ *                                 |      |      |------|       |------|        |      |
+ *                                 |      |      |      |       |      |        |      |
+ *                                 `--------------------'       `----------------------'
+ */
+// If it accepts an argument (i.e, is a function), it doesn't need KC_.
+// Otherwise, it needs KC_*
+[CODE] = KEYMAP(  // layer 1 : code
+        // left hand
+        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F10,
+        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+                                                                             M(FORMAT), KC_TRNS,
+                                                                                      M(REFACTOR),
+                                                                    KC_TRNS, KC_TRNS, KC_TRNS,
+        // right hand
+
+            KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+            KC_F11,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+                     KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+            KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+                              KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+             M(TEST), M(DEBUG_TEST),
+             KC_TRNS,
+             KC_TRNS, KC_TRNS, KC_TRNS
+    ),
+/* Keymap 2: Symbol Layer
+ *
+ * ,---------------------------------------------------.           ,--------------------------------------------------.
+ * |Version  |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 |   F11  |
+ * |---------+------+------+------+------+------+------|           |------+------+------+------+------+------+--------|
+ * |         |   !  |   @  |   (  |   )  |   |  |ACCESS|           |ACCESS|   Up |   7  |   8  |   9  |   *  |   F12  |
+ * |---------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |         |   #  |   $  |   {  |   }  |   `  |------|           |------| Down |   4  |   5  |   6  |   +  |        |
+ * |---------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |         |   %  |   ^  |   [  |   ]  |   ~  |      |           |      |   &  |   1  |   2  |   3  |   \  |        |
+ * `---------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   | EPRM  |      |      |      |      |                                       |   0  |   0  |   .  |   =  |      |
+ *   `-----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      | Caps |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |APScr |       |      |      |      |
+ *                                 |      |ACCESS|------|       |------|      |      |
+ *                                 |      |      | PScr |       |ACCESS|      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// SYMBOLS
+[SYMB] = KEYMAP(
+       // left hand
+       VRSN,   KC_F1,  KC_F2,  KC_F3,  KC_F4,  KC_F5,  KC_TRNS,
+       KC_TRNS,KC_EXLM,KC_AT,  KC_LPRN,KC_RPRN,KC_PIPE,KC_TRNS,
+       KC_TRNS,KC_HASH,KC_DLR, KC_LCBR,KC_RCBR,KC_GRV,
+       KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
+          EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
+                                       KC_TRNS,KC_CAPS,
+                                               M(PSCREEN_APP),
+                               KC_TRNS,KC_TRNS,KC_PSCR,
+       // right hand
+       KC_TRNS, KC_F6,   KC_F7,  KC_F8,   KC_F9,   KC_F10,  KC_F11,
+       KC_TRNS, KC_UP,   KC_7,   KC_8,    KC_9,    KC_ASTR, KC_F12,
+                KC_DOWN, KC_4,   KC_5,    KC_6,    KC_PLUS, KC_TRNS,
+       KC_TRNS, KC_AMPR, KC_1,   KC_2,    KC_3,    KC_BSLS, KC_TRNS,
+                         KC_0,   KC_0,    KC_DOT,  KC_EQL,  KC_TRNS,
+       KC_TRNS, KC_TRNS,
+       KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS
+),
+/* Keymap 3: Media and mouse keys
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |      |      | MsUp |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |MsLeft|MsDown|MsRght|      |------|           |------|      |      |      |      |      |        |
+ * |--------+------+------+------+------+------|      |           |ACCESS|------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      | Lclk | Rclk |                                       |      |      |      |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       | Vol+ |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       | Vol- |      |      |
+ *                                 |      |      |------|       |------| PL/PS| Next |
+ *                                 |      |      |      |       | Back |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// MEDIA AND MOUSE
+[MDIA] = KEYMAP(
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
+                                           KC_TRNS, KC_TRNS,
+                                                    KC_TRNS,
+                                  KC_TRNS, KC_TRNS, KC_TRNS,
+    // right hand
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+                 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+                          KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_VOLU, KC_TRNS,
+       KC_VOLD,
+       KC_MPRV, KC_MPLY, KC_MNXT
+),
+/* Keymap 4: Movement
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |DLeft |DRight|LShift|ACCESS|      |------|           |------| Left | Down |  Up  | Right|      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |KOpen |KType |      |      |      |      |           |      |      |      |      |      |      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |      |      |      |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |      |
+ *                                 |      | CTRL |------|       |------|      |      |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// MEDIA AND MOUSE
+[MOVE] = KEYMAP(
+       KC_TRNS, KC_TRNS,        KC_TRNS,        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS,        KC_TRNS,        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, M(DLEFT),       M(DRIGHT),      KC_LSFT, KC_TRNS, KC_TRNS,
+       KC_TRNS, M(KEEPASS_OPEN),M(KEEPASS_TYPE),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS,        KC_TRNS,        KC_TRNS, KC_TRNS,
+                                             KC_TRNS, KC_TRNS,
+                                                      KC_TRNS,
+                                    KC_TRNS, KC_LCTRL,KC_TRNS,
+    // right hand
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+                 KC_LEFT, KC_DOWN, KC_UP,   KC_RIGHT,KC_TRNS, KC_TRNS,
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+                          KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS,
+       KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS
+
+)
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+    [1] = ACTION_LAYER_TAP_TOGGLE(SYMB)                // FN1 - Momentary Layer 1 (Symbols)
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  // MACRODOWN only works in this function
+      switch(id) {
+        case VERSION:
+          if (record->event.pressed) {
+            SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
+          }
+          break;
+        case EEPROM:
+          if (record->event.pressed) { // For resetting EEPROM
+            eeconfig_init();
+          }
+          break;
+        case DLEFT:
+          if (record->event.pressed) { // Windows move desktop left
+            return MACRO(D(LCTL), D(LGUI), T(LEFT), U(LGUI), U(LCTL), END);
+          }
+          break;
+        case DRIGHT:
+          if (record->event.pressed) { // Windows move desktop right
+            return MACRO(D(LCTL), D(LGUI), T(RIGHT), U(LGUI), U(LCTL), END);
+          }
+          break;
+        case PSCREEN_APP:
+          if (record->event.pressed) {
+            return MACRO(D(LALT), T(PSCR), U(LALT));
+          }
+          break;
+        case REFACTOR:
+          if (record->event.pressed) { // VS Refactor CTRL+R, R
+            return MACRO(D(LCTL), T(R), U(LCTL), T(R), END);
+          }
+          break;
+        case TEST:
+          if (record->event.pressed) { // VS Run Tests CTRL+R, T
+            return MACRO(D(LCTL), T(R), U(LCTL), T(T), END);
+          }
+          break;
+        case DEBUG_TEST:
+          if (record->event.pressed) { // VS Debug Tests CTRL+R, CTRL+T
+            return MACRO(D(LCTL), T(R), T(T), U(LCTL), END);
+          }
+          break;
+        case FORMAT:
+          if (record->event.pressed) { // VS Format Document, CTRL+K, CTRL+D
+            return MACRO(D(LCTL), T(K), T(D), U(LCTL), END);
+          }
+          break;
+        case KEEPASS_OPEN:
+          if (record->event.pressed) { // Keepass open application
+            return MACRO(D(LCTL), D(LALT), T(K), U(LALT), U(LCTL), END);
+          }
+          break;
+        case KEEPASS_TYPE:
+          if (record->event.pressed) { // Keepass autotype
+            return MACRO(D(LCTL), D(LALT), T(A), U(LALT), U(LCTL), END);
+          }
+          break;
+      }
+    return MACRO_NONE;
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+    // dynamically generate these.
+    case EPRM:
+      if (record->event.pressed) {
+        eeconfig_init();
+      }
+      return false;
+      break;
+    case VRSN:
+      if (record->event.pressed) {
+        SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
+      }
+      return false;
+      break;
+  }
+  return true;
+}
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+
+};
+
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+    ergodox_board_led_on();
+    ergodox_led_all_on();
+};
+
diff --git a/keyboards/ergodox/keymaps/333fred/visualizer.c b/keyboards/ergodox/keymaps/333fred/visualizer.c
new file mode 100644 (file)
index 0000000..2a30562
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+Note: this is a modified copy of ../default/visualizer.c, originally licensed GPL.
+*/
+
+#include "simple_visualizer.h"
+
+// This function should be implemented by the keymap visualizer
+// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing
+// that the simple_visualizer assumes that you are updating
+// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is
+// stopped. This can be done by either double buffering it or by using constant strings
+static void get_visualizer_layer_and_color(visualizer_state_t* state) {
+    uint8_t saturation = 60;
+    if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) {
+        saturation = 255;
+    }
+    if (state->status.layer & 0x10) {
+        state->target_lcd_color = LCD_COLOR(140, 100, 60);
+        state->layer_text = "Movement";
+    } else if (state->status.layer & 0x8) {
+        state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF);
+        state->layer_text = "Media";
+    } else if (state->status.layer & 0x4) {
+        state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF);
+        state->layer_text = "Symbol";
+    } else if (state->status.layer & 0x2) {
+        state->target_lcd_color = LCD_COLOR(216, 90, 0xFF);
+        state->layer_text = "Code";
+    } else {
+        state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF);
+        state->layer_text = "Default";
+    }
+}
diff --git a/keyboards/ergodox/keymaps/adam/config.h b/keyboards/ergodox/keymaps/adam/config.h
new file mode 100644 (file)
index 0000000..b3910bc
--- /dev/null
@@ -0,0 +1,6 @@
+#include "../../config.h"
+
+#undef TAPPING_TERM
+#define TAPPING_TERM 300 //At 500 some bad logic takes hold
+#define PREVENT_STUCK_MODIFIERS
+#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 (file)
index 0000000..432f0fb
--- /dev/null
@@ -0,0 +1,174 @@
+#include "ergodox.h"
+#include "debug.h"
+#include "action_layer.h"
+#include "version.h"
+
+
+#define BASE 0 // default layer
+#define FLOCK 1 // symbols arrows and F keys on F held down
+#define JLOCK 2 // same as Flock but with fall thru J and mapped to J held down
+#define CAPLOCK 3 //caps on until space / enter / esc
+#define SFLOCK 11 // symbols arrows and F keys on F held down
+#define SJLOCK 12 // same as Flock but with fall thru J and mapped to J held down
+
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+// Sends macro when key is tapped, presses mod when key is held
+#define tap_mod_macro(record, mod, macro) ( ((record)->event.pressed) ? \
+     ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? MACRO(D(mod), END) : MACRO_NONE ) : \
+     ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (macro) : MACRO(U(mod), END) ) )
+
+#define tap_mod_shift(record, mod, macro) ( ((record)->event.pressed) ? \
+          ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? MACRO(D(mod), END) : MACRO_NONE ) : \
+          ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (MACRO( D(LSFT), T(LBRC), U(LSFT), END)) : MACRO(U(mod), END) ) )
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Layout
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |   1  |   2  |   3  |   4  |   5  |      |           |      |   6  |   7  |   8  |   9  |   0  |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |   Q  |   W  |   E  |   R  |   T  |      |           |      |   Y  |   U  |   I  |   O  |   P  |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |;     |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |  Z   |   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |       |     |      |      |      |                                       |      |      |      |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |        |
+ *                                 ,------|------|------|       |------+--------+------.
+ *                                 |      |      |      |       |      |        |      |
+ *                                 |      |      |------|       |------|        |      |
+ *                                 |      |      |      |       |      |        |      |
+ *                                 `--------------------'       `----------------------'
+ */
+        [BASE] = KEYMAP(
+                // left hand
+                GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS,
+                _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB,
+                _______, SFT_T(KC_A), ALT_T(KC_S), CTL_T(KC_D), F(FLOCK), GUI_T(KC_G),
+                _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC,
+                _______, _______,  _______,  _______ ,_______,
+                _______,  _______,
+                _______,
+                KC_SPC, _______, _______ ,
+
+                // right hand
+                KC_EQL,     KC_6,   KC_7,   KC_8,   KC_9,   KC_0,             _______,
+                KC_TAB,     KC_Y,   KC_U,   KC_I,   KC_O,   KC_P,             _______,
+                GUI_T(KC_H),   F(JLOCK),   CTL_T(KC_K),   ALT_T(KC_L),   SFT_T(KC_SCLN),           _______,
+                KC_DELETE,  KC_N,   KC_M,   KC_COMM,KC_DOT, KC_QUOT,           _______,
+                _______,  _______,_______,_______,          _______,
+                _______,        _______,
+                _______,
+                _______,_______, KC_ENT
+        ),
+        [FLOCK] = KEYMAP(
+                // left hand
+                XXXXXXX,   KC_F1,  KC_F2,  KC_F3,  KC_F4,  KC_F5,  KC_F11,
+                XXXXXXX,KC_LBRC,XXXXXXX,  XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,
+                XXXXXXX,S(KC_LBRC),XXXXXXX, XXXXXXX,_______,XXXXXXX,
+                XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,TO(CAPLOCK),XXXXXXX,
+                XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,
+                XXXXXXX,XXXXXXX,
+                XXXXXXX,
+                KC_ESC,XXXXXXX,XXXXXXX,
+                // right hand
+                KC_F12, KC_F6,   KC_F7,  KC_F8,   KC_F9,   KC_F10,  XXXXXXX,
+                XXXXXXX, XXXXXXX, KC_HOME,   KC_PGUP,    XXXXXXX,    KC_RBRC, XXXXXXX,
+                KC_LEFT, KC_DOWN,   KC_UP,    KC_RIGHT,    S(KC_RBRC), XXXXXXX,
+                XXXXXXX, XXXXXXX, KC_END,   KC_PGDOWN,    KC_QUES,    KC_SLSH, XXXXXXX,
+                XXXXXXX, XXXXXXX,  XXXXXXX,    XXXXXXX,  XXXXXXX,
+                XXXXXXX, XXXXXXX,
+                XXXXXXX,
+                XXXXXXX, XXXXXXX, XXXXXXX
+        ),
+        [JLOCK] = KEYMAP(
+                // left hand
+                XXXXXXX,   KC_F1,  KC_F2,  KC_F3,  KC_F4,  KC_F5,  KC_F11,
+                XXXXXXX,KC_LBRC,KC_GRV,  KC_TILD,XXXXXXX,XXXXXXX,XXXXXXX,
+                XXXXXXX,S(KC_LBRC),XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,
+                XXXXXXX,KC_BSLS,KC_PIPE,XXXXXXX,XXXXXXX,TO(CAPLOCK),XXXXXXX,
+                XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,
+                XXXXXXX,XXXXXXX,
+                XXXXXXX,
+                KC_ESC,XXXXXXX,XXXXXXX,
+                // right hand
+                KC_F12, KC_F6,   KC_F7,  KC_F8,   KC_F9,   KC_F10,  XXXXXXX,
+                  XXXXXXX, XXXXXXX, XXXXXXX,   XXXXXXX,    XXXXXXX,    KC_RBRC, XXXXXXX,
+                XXXXXXX, _______,   XXXXXXX,  XXXXXXX,    S(KC_RBRC), XXXXXXX,
+                XXXXXXX, XXXXXXX, XXXXXXX,   XXXXXXX,    XXXXXXX,    XXXXXXX, XXXXXXX,
+                XXXXXXX,XXXXXXX,  XXXXXXX,    XXXXXXX,  XXXXXXX,
+                XXXXXXX, XXXXXXX,
+                XXXXXXX,
+                XXXXXXX, XXXXXXX, XXXXXXX
+        ),
+        [CAPLOCK] = KEYMAP(
+                // left hand
+                TO(BASE), _______, _______, _______, _______, _______, _______,
+                _______, S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), _______,
+                // _______, SFT_T(S(KC_A)), ALT_T(KC_S), CTL_T(KC_D), F(FLOCK), GUI_T(KC_G),
+                _______, S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G),
+                _______, S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), _______,
+                _______, _______,  _______,  _______ ,_______,
+                _______,  _______,
+                _______,
+                TO(BASE), _______, _______ ,
+
+                // right hand
+                _______,     _______,   _______,   _______,   _______,   _______,             _______,
+                _______,     S(KC_Y),   S(KC_U),   S(KC_I),   S(KC_O),   S(KC_P),             _______,
+                         S(KC_H),   S(KC_J),   S(KC_K),   S(KC_L),   S(KC_SCLN),           _______,
+                _______,  S(KC_N),   S(KC_M),   S(KC_COMM),S(KC_DOT), S(KC_QUOT),           _______,
+                _______,  _______,_______,_______,          _______,
+                _______,        _______,
+                _______,
+                _______,_______, TO(BASE)
+        )
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+        [1] = ACTION_LAYER_TAP_KEY(FLOCK,KC_F),
+        [2] = ACTION_LAYER_TAP_KEY(JLOCK,KC_J),
+        [11] = ACTION_LAYER_TAP_KEY(FLOCK,LSFT(KC_F)),
+        [12] = ACTION_LAYER_TAP_KEY(JLOCK,LSFT(KC_J))
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+        // MACRODOWN only works in this function
+        switch(id) {
+        case 0:
+                if (record->event.pressed) {
+                        SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
+                }
+                break;
+        }
+
+        return MACRO_NONE;
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+
+};
+
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+  uint8_t layer = biton32(layer_state);
+
+  switch (layer) {
+    // TODO: Make this relevant to the ErgoDox EZ.
+      case 1:
+          break;
+      case 2:
+          break;
+      default:
+          // none
+          break;
+  }
+};
diff --git a/keyboards/ergodox/keymaps/adam/readme.md b/keyboards/ergodox/keymaps/adam/readme.md
new file mode 100644 (file)
index 0000000..9d03df5
--- /dev/null
@@ -0,0 +1,3 @@
+# Adam's ErgoDox
+
+Currently 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 (file)
index 0000000..8d65f7c
--- /dev/null
@@ -0,0 +1,331 @@
+#include "ergodox.h"
+#include "debug.h"
+#include "action_layer.h"
+#include "version.h"
+#include "keymap_nordic.h"
+#include "keymap_norwegian.h"
+
+#define BASE 0 // default layer
+#define SYMB 1 // symbols
+#define MDIA 2 // mouse keys
+#define DEVL 3 // dev keys
+
+#define MACRO_PUBLIC 10
+#define MACRO_PRIVATE 11
+#define MACRO_PROT 12
+
+#define MACRO_SHARED 13
+#define MACRO_CONST 14
+#define MACRO_DIM 15
+#define MACRO_STRING 16
+#define MACRO_INT 17
+#define MACRO_DEC 18
+#define MACRO_BOOL 19
+
+#define MACRO_RETURN 20
+#define MACRO_NOTHING 21
+#define MACRO_TODO 22
+
+#define MACRO_SAVE 24
+#define MACRO_BUILD 25
+#define MACRO_DEBUG 26
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: Basic layer
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |   L3   |   1  |   2  |   3  |   4  |   5  | LEFT |           | RIGHT|   6  |   7  |   8  |   9  |   0  |   \    |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * | Del    |   -  |   ,  |   .  |   P  |   Y  |  LT1 |           |  LT1 |   F  |   G  |   C  |   R  |   L  |   Å    |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * | WIN    |   A  |   O  |   E  |   U  |   I  |------|           |------|   D  |   H  |   T  |   N  |   S  |   Ä    |
+ * |--------+------+------+------+------+------|  LT2 |           |  LT2 |------+------+------+------+------+--------|
+ * | LShift |   Ö  |   Q  |   J  |   K  |   X  |      |           |      |   B  |   M  |   W  |   V  |Z/Ctrl| RShift |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   | CTRL |  L1  |AltShf| Left | Right|                                       |  Up  | Down |   [  |   ]  | ~L1  |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        | App  | LGui |       | Alt  |Ctrl/Esc|
+ *                                 ,------|------|------|       |------+--------+------.
+ *                                 |      |      | Home |       | PgUp |        |      |
+ *                                 | Space|Backsp|------|       |------|  Tab   |Enter |
+ *                                 |      |ace   | End  |       | PgDn |        |      |
+ *                                 `--------------------'       `----------------------'
+ */
+// If it accepts an argument (i.e, is a function), it doesn't need KC_.
+// Otherwise, it needs KC_*
+[BASE] = KEYMAP(  // layer 0 : default
+        // left hand
+        MO(DEVL),       KC_1,           KC_2,    KC_3,   KC_4,   KC_5,   KC_LEFT,
+        KC_DELT,        NO_MINS,        KC_COMM, KC_DOT, KC_P,   KC_Y,   TG(SYMB),
+        KC_LGUI,        KC_A,           KC_O,    KC_E,   KC_U,   KC_I,
+        KC_LSFT,        CTL_T(KC_SCLN), KC_Q,    KC_J,   KC_K,   KC_X,   TG(MDIA),
+        CTL_T(KC_NO),   MO(SYMB),       LALT(KC_LSFT),  KC_LEFT,KC_RGHT,
+                                              ALT_T(KC_APP),  KC_LGUI,
+                                                              KC_HOME,
+                                               KC_SPC,KC_BSPC,KC_END,
+        // right hand
+             KC_RGHT,     KC_6,   KC_7,   KC_8,   KC_9,   KC_0,             KC_BSLASH,
+             TG(1),       KC_F,   KC_G,   KC_C,   KC_R,   KC_L,             NO_AM,
+                          KC_D,   KC_H,   KC_T,   KC_N,   KC_S,             NO_AE,
+             TG(MDIA),KC_B,   KC_M,   KC_W,   KC_V,   CTL_T(KC_Z),      KC_RSFT,
+                                  KC_UP,  KC_DOWN,KC_LBRC,KC_RBRC,          KC_FN1,
+             KC_LALT,        CTL_T(KC_ESC),
+             KC_PGUP,
+             KC_PGDN,KC_TAB, KC_ENT
+    ),
+/* Keymap 1: Symbol Layer
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 |   F11  |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |   @  |   {  |   }  |   [  |   ]  |      |           |      |   <  |   7  |   8  |   9  |   *  |   F12  |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |   #  |   (  |   )  |   \  |   /  |------|           |------|   >  |   4  |   5  |   6  |   +  |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      | UND  | CUT  | COP  | PAS  |      |           |      |   ?  |   1  |   2  |   3  |   %  |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |   .  |   0  |   =  |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |      |
+ *                                 |      |      |------|       |------|      |      |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// SYMBOLS
+[SYMB] = KEYMAP(
+       // left hand
+       M(0),      KC_F1,   KC_F2,    KC_F3,    KC_F4,     KC_F5,    KC_TRNS,
+       KC_TRNS,   NO_AT,   ALGR(KC_7),  ALGR(KC_0),  NO_LBRC,   NO_RBRC,  KC_TRNS,
+       KC_TRNS,   KC_HASH, NO_LPRN,  NO_RPRN,  ALGR(KC_MINS), NO_SLSH,
+       KC_TRNS,   KC_TRNS, LCTL(KC_Z),  LCTL(KC_X),  LCTL(KC_C),    LCTL(KC_V),  KC_TRNS,
+       KC_TRNS,   KC_TRNS, KC_TRNS,  KC_TRNS,  KC_TRNS,
+                                       KC_TRNS,KC_TRNS,
+                                               KC_TRNS,
+                               KC_TRNS,KC_TRNS,KC_TRNS,
+       // right hand
+       KC_TRNS, KC_F6,   KC_F7,  KC_F8,   KC_F9,   KC_F10,  KC_F11,
+       KC_TRNS, NO_LESS,   KC_7,   KC_8,    KC_9,    KC_KP_ASTERISK, KC_F12,
+                LSFT(NO_LESS), KC_4,   KC_5,    KC_6,    KC_KP_PLUS, KC_TRNS,
+       KC_TRNS, NO_QUES, KC_1,   KC_2,    KC_3,    LSFT(KC_5), KC_TRNS,
+                         KC_DOT,KC_0,  LSFT(KC_0),    KC_TRNS,  KC_TRNS,
+       KC_TRNS, KC_TRNS,
+       KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS
+),
+/* Keymap 2: Media and mouse keys
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |      |      | MsUp |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |MsLeft|MsDown|MsRght|      |------|           |------|      |      |      |      |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      | Lclk | Rclk |                                       |      |      |      |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |      |
+ *                                 |      |      |------|       |------|      |      |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// MEDIA AND MOUSE
+[MDIA] = KEYMAP(
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
+                                           KC_TRNS, KC_TRNS,
+                                                    KC_TRNS,
+                                  KC_TRNS, KC_TRNS, KC_TRNS,
+    // right hand
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+                 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+                          KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS,
+       KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS
+),
+/* Keymap 3: Developer keys in vb.net
+ * shortened in layout beneth, for example int-> integer
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        | Save |Build |Debug |      |      |      |           |      | bool | int  |string| dec  | Todo |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |------|           |------| priv | publ |shared| prot |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |      |           |      | const| dim  |return|nothin|      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |      |      |      |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |      |      |
+ *                                 |      |      |------|       |------|      |      |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// MEDIA AND MOUSE
+[DEVL] = KEYMAP(
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+                                           KC_TRNS, KC_TRNS,
+                                                    KC_TRNS,
+                                  KC_TRNS, KC_TRNS, KC_TRNS,
+    // right hand
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS,  M(MACRO_BOOL), M(MACRO_INT), M(MACRO_STRING), M(MACRO_DEC), M(MACRO_TODO), KC_TRNS,
+                 M(MACRO_PRIVATE), M(MACRO_PUBLIC), M(MACRO_SHARED), M(MACRO_PROT), KC_TRNS, KC_TRNS,
+       KC_TRNS,  M(MACRO_CONST), M(MACRO_DIM), M(MACRO_RETURN), M(MACRO_NOTHING), KC_TRNS, KC_TRNS,
+                          KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS,
+       KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS
+),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+    [1] = ACTION_LAYER_TAP_TOGGLE(SYMB)                // FN1 - Momentary Layer 1 (Symbols)
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  // MACRODOWN only works in this function
+      switch(id) {
+        case 0:
+            if (record->event.pressed) {
+                register_code(KC_RSFT);
+            } else {
+                unregister_code(KC_RSFT);
+            }
+            break;
+        case MACRO_PUBLIC:
+                       if (record->event.pressed) {
+                               return MACRO( T(P), T(U), T(B), T(L), T(I), T(C), T(SPACE),END);
+                       } 
+                       break;
+               case MACRO_PRIVATE:
+                       if (record->event.pressed) {
+                               return MACRO( T(P), T(R), T(I), T(V), T(A), T(T), T(E), T(SPACE),END);
+                       } 
+                       break;
+        case MACRO_PROT:
+                       if (record->event.pressed) {
+                               return MACRO( T(P), T(R), T(O), T(T), T(E), T(C), T(T), T(E), T(D), T(SPACE),END);
+                       } 
+                       break;
+               case MACRO_SHARED:
+                       if (record->event.pressed) {
+                               return MACRO( T(S), T(H), T(A), T(R), T(E), T(D), T(SPACE), END);
+                       } 
+                       break;
+               case MACRO_CONST:
+                       if (record->event.pressed) {
+                               return MACRO( T(C), T(O), T(N), T(S), T(T), T(SPACE), END);
+                       } 
+                       break;          
+               case MACRO_DIM:
+                       if (record->event.pressed) {
+                               return MACRO( T(D), T(I), T(M), T(SPACE), END);
+                       } 
+                       break;
+               case MACRO_STRING:
+                       if (record->event.pressed) {
+                               return MACRO( T(S), T(T), T(R), T(I), T(N), T(G), T(SPACE), END);
+                       } 
+                       break;          
+               case MACRO_BOOL:
+                       if (record->event.pressed) {
+                               return MACRO( T(B), T(O), T(O), T(L), T(E), T(A), T(N), T(SPACE), END);
+                       } 
+                       break;          
+               case MACRO_INT:
+                       if (record->event.pressed) {
+                               return MACRO( T(I), T(N), T(T), T(SPACE), END);
+                       } 
+                       break;
+               case MACRO_DEC:
+                       if (record->event.pressed) {
+                               return MACRO( T(D), T(E), T(C), T(I), T(M), T(A), T(L), T(SPACE), END);
+                       } 
+                       break;
+               case MACRO_RETURN:
+                       if (record->event.pressed) {
+                               return MACRO( T(R), T(E), T(T), T(U),T(R),T(N), T(SPACE), END);
+                       } 
+                       break;
+               case MACRO_NOTHING:
+                       if (record->event.pressed) {
+                               return MACRO( T(N), T(O), T(T), T(H), T(I), T(N), T(G), T(SPACE), END);
+                       }               
+               case MACRO_TODO:
+                       if (record->event.pressed) {
+                               return MACRO( KC_BSLASH, D(LSHIFT) ,T(T), T(O), T(D), T(O), KC_DOT, U(LSHIFT),  T(SPACE),END);
+                       } 
+                       break;  
+        case MACRO_SAVE:
+                       if (record->event.pressed) {
+                               return MACRO( D(LCTL) ,T(S), U(LCTL),END);
+                       } 
+                       break;  
+        case MACRO_BUILD:
+                       if (record->event.pressed) {
+                               return MACRO(  D(LCTL), D(LSHIFT) ,T(B), U(LSHIFT), U(LCTL),END);
+                       } 
+                       break;
+        case MACRO_DEBUG:
+                       if (record->event.pressed) {
+                               return MACRO( KC_F5 ,END);
+                       } 
+                       break;
+      }
+    return MACRO_NONE;
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+
+    uint8_t layer = biton32(layer_state);
+
+    ergodox_board_led_off();
+    ergodox_right_led_1_off();
+    ergodox_right_led_2_off();
+    ergodox_right_led_3_off();
+    switch (layer) {
+      // TODO: Make this relevant to the ErgoDox EZ.
+        case 1:
+            ergodox_right_led_1_on();
+            break;
+        case 2:
+            ergodox_right_led_2_on();
+            break;
+        default:
+            // none
+            break;
+    }
+
+};
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer_swe/readme.md b/keyboards/ergodox/keymaps/dvorak_programmer_swe/readme.md
new file mode 100644 (file)
index 0000000..552fa0e
--- /dev/null
@@ -0,0 +1,28 @@
+# ErgoDox EZ Dvorak Programmer SWEDISH
+
+Dvorak layout adjusted for a suitable programmer layout and swedish special characters added:
+
+* åäö characters added
+* Layout for common vb.net keywords
+* Common Visual Studio commands like Save, Build, Debug
+
+TODO:
+
+* (Layer 4 is qwerty (for easier gaming & less fortunate keyboard users)) Like this idea, will add it later on
+
+Known issues:
+
+* Keymap 2 modifier has not gotten its place yet..
+* Print screen, where?
+
+
+## Changelog
+
+* 2017-05-16
+  * Initial release
+
+# Author
+Christian Westerlund
+cwesterlund @ github
+
+Thanks to the author of keymap csharp_dev for inspiration!
\ No newline at end of file
index ec909ec53df4009813d59be61898db47bb312d7d..b186c70ba3cbff4ab82fa46d88dcb5dfea777a94 100644 (file)
@@ -254,7 +254,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -265,17 +265,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
       switch(id) {
         case _DV:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_DV);
+            persistent_default_layer_set(1UL<<_DV);
           }
           break;
         case _QW:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_QW);
+            persistent_default_layer_set(1UL<<_QW);
           }
           break;
         case _CM:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_CM);
+            persistent_default_layer_set(1UL<<_CM);
           }
           break;
       }
index 3d6fb455a00de761b4811db3f3274ebc5223a72f..90ede90ae78bf4a664400cce16adb585dc26171f 100644 (file)
@@ -78,7 +78,6 @@ Linux page].  Some distributions provide a binary, maybe called
 To flash the firmware:
 
   - Build the firmware with `make keymapname`, for example `make default`
-
   - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g.
     `ergodox_ez_default.hex`
 
diff --git a/keyboards/frosty_flake/keymaps/nikchi/Makefile b/keyboards/frosty_flake/keymaps/nikchi/Makefile
new file mode 100644 (file)
index 0000000..ad86e82
--- /dev/null
@@ -0,0 +1,23 @@
+# Build Options
+#   change to "no" to disable the options, or define them in the Makefile in 
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE = no         # Console for debug(+400)
+COMMAND_ENABLE = no         # Commands for debug and configuration
+NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
+MIDI_ENABLE = no            # MIDI controls
+AUDIO_ENABLE = no           # Audio output on port C6
+UNICODE_ENABLE = no         # Unicode
+UNICODEMAP_ENABLE = yes                # unicodemap
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+TAP_DANCE_ENABLE = yes
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/frosty_flake/keymaps/nikchi/config.h b/keyboards/frosty_flake/keymaps/nikchi/config.h
new file mode 100644 (file)
index 0000000..3f78526
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+#define TAPPING_TERM 200
+#define LEADER_TIMEOUT 800
+
+#define DISABLE_SPACE_CADET_ROLLOVER
+
+#define UNICODE_TYPE_DELAY 0
+
+#define LSPO_KEY KC_9
+#define RSPC_KEY KC_0
+
+#define MOUSEKEY_INTERVAL       20
+#define MOUSEKEY_DELAY          0
+#define MOUSEKEY_TIME_TO_MAX    60
+#define MOUSEKEY_MAX_SPEED      7
+#define MOUSEKEY_WHEEL_DELAY 0
+// place overrides here
+
+#endif
diff --git a/keyboards/frosty_flake/keymaps/nikchi/keymap.c b/keyboards/frosty_flake/keymaps/nikchi/keymap.c
new file mode 100644 (file)
index 0000000..fbabb48
--- /dev/null
@@ -0,0 +1,241 @@
+#include "frosty_flake.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+#include "process_unicode.h"
+#include "process_unicodemap.h"
+#include "quantum.h"
+
+#define _______ KC_TRNS
+#define EMOJIBLOCK 5
+
+
+//declarations for tap dancing emojis
+void register_hex32(uint32_t hex);
+void cycleEmojis(qk_tap_dance_state_t *state, void *user_data);
+void cycleAnimals(qk_tap_dance_state_t *state, void *user_data);
+void cycleHands(qk_tap_dance_state_t *state, void *user_data);
+void cycleMemes(qk_tap_dance_state_t *state, void *user_data);
+
+void tap(uint16_t keycode){
+    register_code(keycode);
+    unregister_code(keycode);
+};
+
+//Tap Dance Declarations
+enum taps{
+  TD_CTCPS = 0,
+  EMOJIS,
+  ANIMAL,
+  HAND,
+  MEMES
+};
+
+enum unicode_name { // split every five emojis
+  THINK = 1, // thinking face 🤔
+  GRIN, // grinning face 😊
+  SMRK, // smirk 😏
+  WEARY, // good shit 😩
+  UNAMU, // unamused 😒
+
+  SNEK, // snke 🐍
+  PENGUIN, // 🐧
+  DRAGON, // 🐉
+  MONKEY, // 🐒
+  CHICK, // 🐥
+
+  OKOK, // 👌
+  EFFU, // 🖕
+  INUP, // 👆
+  THUP, // 👍
+  THDN, // 👎
+
+  BBB, // dat B 🅱
+  POO, // poop 💩
+  HUNDR, // 100 💯
+  EGGPL, // EGGPLANT 🍆
+  WATER, // wet 💦
+
+  LIT // fire 🔥
+
+};
+
+enum my_macros {
+  NEWDESK = 0,
+  LEFTDESK,
+  RIGHTDESK,
+  CLOSEDESK
+};
+
+
+// Tap Dance Definitions
+qk_tap_dance_action_t tap_dance_actions[] = {
+  // Tap once for CTRL, twice for Caps Lock
+  [TD_CTCPS]  = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_CAPS),
+  [EMOJIS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleEmojis, NULL, NULL, 800),
+  [ANIMAL] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleAnimals, NULL, NULL, 800),
+  [HAND] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleHands, NULL, NULL, 800),
+  [MEMES] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleMemes, NULL, NULL, 800)
+// Other declarations would go here, separated by commas, if you have them
+};
+
+// macros
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
+  switch(id) {
+    case NEWDESK: // this would trigger when you hit a key mapped as M(0)
+      if (record->event.pressed) {
+        return MACRO( I(1), D(LGUI), D(LCTL), D(D), U(LGUI), U(LCTL), U(D), END  ); // NEW DESKTOP
+      }
+      break;
+    case LEFTDESK: // this would trigger when you hit a key mapped as M(0)
+      if (record->event.pressed) {
+        return MACRO( I(1), D(LGUI), D(LCTL), D(LEFT), U(LGUI), U(LCTL), U(LEFT), END  ); // LEFT DESKTOP
+      }
+      break;
+    case RIGHTDESK: // this would trigger when you hit a key mapped as M(0)
+      if (record->event.pressed) {
+        return MACRO( I(1), D(LGUI), D(LCTL), D(RGHT), U(LGUI), U(LCTL), U(RGHT), END  ); // RIGHT DESKTOP
+      }
+      break;
+    case CLOSEDESK: // this would trigger when you hit a key mapped as M(0)
+      if (record->event.pressed) {
+        return MACRO( I(1), D(LGUI), D(LCTL), D(F4), U(LGUI), U(LCTL), U(F4), END  ); // CLOSE DESKTOP
+      }
+      break;
+  }
+  return MACRO_NONE;
+};
+
+// emojis in unicode
+const uint32_t PROGMEM unicode_map[] = {
+  [THINK] = 0x1F914,
+  [GRIN] = 0x1F600,
+  [BBB] = 0x1F171,
+  [POO] = 0x1F4A9,
+  [HUNDR] = 0x1F4AF,
+  [SMRK] = 0x1F60F,
+  [WEARY] = 0x1F629,
+  [EGGPL] = 0x1F346,
+  [WATER] = 0x1F4A6,
+  [LIT] = 0x1F525,
+  [UNAMU] = 0x1F612,
+  [SNEK] = 0x1F40D,
+  [PENGUIN]   = 0x1F427,
+  [MONKEY]    = 0x1F412,
+  [CHICK]     = 0x1F425,
+  [DRAGON]    = 0x1F409,
+  [OKOK]  = 0x1F44C,
+  [EFFU]  = 0x1F595,
+  [INUP]  = 0x1F446,
+  [THDN]  = 0x1F44E,
+  [THUP]  = 0x1F44D
+ };
+// Layouts
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = KEYMAP(\
+      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,                        \
+      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, \
+      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, \
+      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,      \
+      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, \
+ 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),
+[1] = KEYMAP(\
+      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,                        \
+   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, \
+      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, \
+      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,      \
+      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, \
+      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),
+[2] = KEYMAP(\
+      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,                        \
+      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, \
+      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, \
+      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,      \
+      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, \
+      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),
+};
+
+LEADER_EXTERNS();
+
+void matrix_scan_user(void) {
+  LEADER_DICTIONARY() {
+    leading = false;
+    leader_end();
+
+    SEQ_TWO_KEYS(KC_A, KC_A) { // select all and copy
+      register_code(KC_LCTL);
+      tap(KC_A);
+      tap(KC_C);
+      unregister_code(KC_LCTL);
+    }
+    SEQ_THREE_KEYS(KC_L,KC_I,KC_T) { // 🔥🔥
+      unicode_input_start();
+      register_hex32(pgm_read_dword(&unicode_map[LIT]));
+      unicode_input_finish();
+    }
+
+  }
+}
+
+void matrix_init_user(void) {
+  _delay_ms(500);
+  set_unicode_input_mode(UC_WINC);
+};
+
+
+void cycleEmojis(qk_tap_dance_state_t *state, void *user_data) {
+  if(state->count == 1) {
+    unicode_input_start();
+    register_hex32(pgm_read_dword(&unicode_map[state->count]));
+    unicode_input_finish();
+  }
+  else if(state->count <= EMOJIBLOCK) {
+    tap(KC_BSPC);
+    unicode_input_start();
+    register_hex32(pgm_read_dword(&unicode_map[state->count]));
+    unicode_input_finish();
+  }
+};
+
+void cycleAnimals(qk_tap_dance_state_t *state, void *user_data) { 
+  if(state->count == 1) {
+    unicode_input_start();
+    register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
+    unicode_input_finish();
+  }
+  else if(state->count <= EMOJIBLOCK) {
+    tap(KC_BSPC);
+    unicode_input_start();
+    register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
+    unicode_input_finish();
+  }
+};
+
+void cycleHands(qk_tap_dance_state_t *state, void *user_data) {
+  if(state->count == 1) {
+    unicode_input_start();
+    register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
+    unicode_input_finish();
+  }
+  else if(state->count <= EMOJIBLOCK) {
+    tap(KC_BSPC);
+    unicode_input_start();
+    register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
+    unicode_input_finish();
+  }
+};
+
+void cycleMemes(qk_tap_dance_state_t *state, void *user_data) {
+  if(state->count == 1) {
+    unicode_input_start();
+    register_hex32(pgm_read_dword(&unicode_map[state->count+15]));
+    unicode_input_finish();
+  }
+  else if(state->count <= EMOJIBLOCK) {
+    tap(KC_BSPC);
+    unicode_input_start();
+    register_hex32(pgm_read_dword(&unicode_map[state->count+15]));
+    unicode_input_finish();
+  }
+};
+
+
diff --git a/keyboards/frosty_flake/keymaps/nikchi/readme.md b/keyboards/frosty_flake/keymaps/nikchi/readme.md
new file mode 100644 (file)
index 0000000..0b01f9d
--- /dev/null
@@ -0,0 +1,24 @@
+# The Nikchi's keymap for frosty_flake
+
+### FEATURING
+-SPACE CADET 
+-Caps Lock is now LCTRL
+-LCTRL is Tap(LCTRL, Caps Lock)
+
+### LEADER KEY - RALT
+COMBOS
+-a,a => Select All, Copy
+
+
+
+### FN REBINDS for Windows
+```
+   [W]                 [New Desktop]
+[A][S][D]   [Left Desk][Delete Desk][Right Desk]
+
+[Ins][Hom][PUp]     [RW][PP][FF]
+[Del][End][PDn]     [MU][VD][VU]
+
+Arrows are Mouskeys, left three mods are clicks
+
+```
\ 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 (file)
index 0000000..b2e5041
--- /dev/null
@@ -0,0 +1,9 @@
+# Tap Dancing to different beats.
+Tap 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".
+
+
+
+- `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.   
+
+
+`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.
index dd2f4b6eec375412106522db55e91bde2b394bd7..f878533fe92fd704aff9ce6b00d53e06610da41b 100644 (file)
@@ -54,8 +54,8 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
 BOOTMAGIC_ENABLE ?= no      # Virtual DIP switch configuration(+1000)
 MOUSEKEY_ENABLE ?= yes       # Mouse keys(+4700)
 EXTRAKEY_ENABLE ?= yes       # Audio control and System control(+450)
-CONSOLE_ENABLE ?= yes        # Console for debug(+400)
-COMMAND_ENABLE ?= yes        # Commands for debug and configuration
+CONSOLE_ENABLE ?= no        # Console for debug(+400)
+COMMAND_ENABLE ?= no        # Commands for debug and configuration
 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
 SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
 # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
index e83a7f5a32b9841b456d2d2f7774a22f16667694..6d1d8ab27461a951f22ccad47fc06291fea9dbfb 100644 (file)
@@ -121,7 +121,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -131,17 +131,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
       switch(id) {
         case _DV:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_DV);
+            persistent_default_layer_set(1UL<<_DV);
           }
           break;
         case _QW:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_QW);
+            persistent_default_layer_set(1UL<<_QW);
           }
           break;
         case _CM:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_CM);
+            persistent_default_layer_set(1UL<<_CM);
           }
           break;
       }
diff --git a/keyboards/gherkin/Makefile b/keyboards/gherkin/Makefile
new file mode 100644 (file)
index 0000000..57b2ef6
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
diff --git a/keyboards/gherkin/README.md b/keyboards/gherkin/README.md
new file mode 100644 (file)
index 0000000..0a3d6fa
--- /dev/null
@@ -0,0 +1,12 @@
+
+About
+------
+
+First pass at adding support for the gherkin keyboard. Compiles but completely
+untested. Intended to kick-start development.
+
+* [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html)
+* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gherkin)
+
+Credit to JadedC for the initial work.
+
diff --git a/keyboards/gherkin/config.h b/keyboards/gherkin/config.h
new file mode 100644 (file)
index 0000000..27919ef
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0xFEED
+#define PRODUCT_ID      0x6060
+#define DEVICE_VER      0x0001
+#define MANUFACTURER    qmkbuilder
+#define PRODUCT         keyboard
+#define DESCRIPTION     Keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 6
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 }
+#define MATRIX_COL_PINS { B4, E6, D7, C6, D4, D0 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* number of backlight levels */
+#define BACKLIGHT_PIN B5
+#ifdef BACKLIGHT_PIN
+#define BACKLIGHT_LEVELS 3
+#endif
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* prevent stuck modifiers */
+#define PREVENT_STUCK_MODIFIERS
+
+
+#ifdef RGB_DI_PIN
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 0
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
+#endif
+
+#endif
\ No newline at end of file
diff --git a/keyboards/gherkin/gherkin.c b/keyboards/gherkin/gherkin.c
new file mode 100644 (file)
index 0000000..2952d84
--- /dev/null
@@ -0,0 +1 @@
+#include "gherkin.h"
diff --git a/keyboards/gherkin/gherkin.h b/keyboards/gherkin/gherkin.h
new file mode 100644 (file)
index 0000000..ebb2303
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef GHERKIN_H
+#define GHERKIN_H
+
+#include "quantum.h"
+
+#define KEYMAP( \
+        K00,   K01,   K02,   K03,   K04,   K05,   K10,   K11,   K12,   K13 , \
+        K14,   K15,   K20,   K21,   K22,   K23,   K24,   K25,   K30,   K31 , \
+        K32,   K33,   K34,   K35,   K40,   K41,   K42,   K43,   K44,   K45   \
+) { \
+       { K00,   K01,   K02,   K03,   K04,   K05 }, \
+       { K10,   K11,   K12,   K13,   K14,   K15 }, \
+       { K20,   K21,   K22,   K23,   K24,   K25 }, \
+       { K30,   K31,   K32,   K33,   K34,   K35 }, \
+       { K40,   K41,   K42,   K43,   K44,   K45 }  \
+}
+
+#endif
diff --git a/keyboards/gherkin/keymaps/default/keymap.c b/keyboards/gherkin/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..7185046
--- /dev/null
@@ -0,0 +1,171 @@
+#include "gherkin.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+       KEYMAP(
+               LT(1, KC_Q), KC_W, KC_E, KC_R, KC_T, KC_Y, 
+               KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, 
+               KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, 
+               KC_L, KC_ESC, KC_Z, KC_X, KC_C, KC_V, 
+               KC_BSPC, KC_SPC, KC_B, KC_N, KC_M, KC_ENT),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, BL_DEC),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+       KEYMAP(
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
+               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
+       keyevent_t event = record->event;
+    (void)event;
+
+       switch (id) {
+
+       }
+       return MACRO_NONE;
+}
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+       return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+       if (usb_led & (1 << USB_LED_NUM_LOCK)) {
+               DDRD |= (1 << 5); PORTD &= ~(1 << 5);
+       } else {
+               DDRD &= ~(1 << 5); PORTD &= ~(1 << 5);
+       }
+
+       if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+               DDRB |= (1 << 0); PORTB &= ~(1 << 0);
+       } else {
+               DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
+       }
+
+       if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
+               
+       } else {
+               
+       }
+
+       if (usb_led & (1 << USB_LED_COMPOSE)) {
+               
+       } else {
+               
+       }
+
+       if (usb_led & (1 << USB_LED_KANA)) {
+               
+       } else {
+               
+       }
+
+}
diff --git a/keyboards/gherkin/rules.mk b/keyboards/gherkin/rules.mk
new file mode 100644 (file)
index 0000000..0e7a407
--- /dev/null
@@ -0,0 +1,56 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes        # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
+CONSOLE_ENABLE ?= no   # Console for debug(+400)
+COMMAND_ENABLE ?= no    # Commands for debug and configuration
+SLEEP_LED_ENABLE ?= no  # Breathing sleep LED during USB suspend
+NKRO_ENABLE ?= yes             # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE ?= yes  # Enable keyboard backlight functionality
+AUDIO_ENABLE ?= no
+RGBLIGHT_ENABLE ?= no
\ No newline at end of file
index 77cf942c3a249c6d3bd2fab955d3b71e5deea5c8..739fb268502959f65700e680ef084958a96ac15c 100644 (file)
@@ -147,7 +147,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
 #endif
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           return false;
           break;
@@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
           }
           return false;
           break;
@@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_DVORAK);
+            persistent_default_layer_set(1UL<<_DVORAK);
           }
           return false;
           break;
index 4f0ccecf996a98a97fafeda8cbdf06c7b8ae3b28..2877169ef47ab7a3bebce4f4e35427019c11198d 100644 (file)
@@ -5,7 +5,7 @@ This firmware is for a Magicforce 68 that's had its PCB removed and is handwired
 
 ## Wiring Layout
 
-![Wiring Layout](wiring-layout.png)
+![Wiring Layout](http://imgur.com/NmTCv5u)
 
 ## Pinout
 
diff --git a/keyboards/handwired/magicforce68/wiring-layout.png b/keyboards/handwired/magicforce68/wiring-layout.png
deleted file mode 100644 (file)
index 816b10b..0000000
Binary files a/keyboards/handwired/magicforce68/wiring-layout.png and /dev/null differ
index c1262a83d71efeb1afc496959c93742a3ed69fec..9710997472cad6f6485c29a54f55e380212e6bfb 100644 (file)
@@ -186,7 +186,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
 #endif
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           return false;
           break;
@@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
           }
           return false;
           break;
@@ -216,7 +216,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_DVORAK);
+            persistent_default_layer_set(1UL<<_DVORAK);
           }
           return false;
           break;
index d562c7bbf818c40a1bcef4e01e4caf60246b7ced..763fa5a27a81c154757b809a1d789e6a38e001d5 100644 (file)
@@ -955,7 +955,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 #ifdef RGBSPS_ENABLE
@@ -1134,14 +1134,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
     // layout switchers
     case QWERTY:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
 #ifdef LAYOUT_DVORAK
     case DVORAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
@@ -1149,7 +1149,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 #ifdef LAYOUT_COLEMAK
     case COLEMAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
@@ -1157,7 +1157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 #ifdef LAYOUT_WORKMAN
     case WORKMAN:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_WORKMAN);
+        persistent_default_layer_set(1UL<<_WORKMAN);
       }
       return false;
       break;
@@ -1165,7 +1165,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 #ifdef LAYOUT_NORMAN
     case NORMAN:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_NORMAN);
+        persistent_default_layer_set(1UL<<_NORMAN);
       }
       return false;
       break;
diff --git a/keyboards/handwired/trackpoint/Makefile b/keyboards/handwired/trackpoint/Makefile
new file mode 100644 (file)
index 0000000..191c6bb
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+       include ../../../Makefile
+endif
\ No newline at end of file
diff --git a/keyboards/handwired/trackpoint/README.md b/keyboards/handwired/trackpoint/README.md
new file mode 100644 (file)
index 0000000..bbfcaab
--- /dev/null
@@ -0,0 +1,10 @@
+# IBM Trackpoint demonstration
+
+This is just a simple demo to show how to integrate IBM Trackpoint in QMK.
+
+Wiring used in the demonstration:
+![Wiring example](http://imgur.com/8ghG2U8)
+
+Some documentation:
+* [How to wire IBM Trackpoint](https://github.com/alonswartz/trackpoint)
+* [QMK documentation](https://docs.qmk.fm/)
diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h
new file mode 100644 (file)
index 0000000..7558c03
--- /dev/null
@@ -0,0 +1,75 @@
+#ifndef CONFIG_H
+    #define CONFIG_H
+
+    #include "config_common.h"
+
+    #define VENDOR_ID       0x1234
+    #define PRODUCT_ID      0x5678
+    #define DEVICE_VER      0x0001
+    #define MANUFACTURER    QMK
+    #define PRODUCT         TRACKPOINT-DEMO
+    #define DESCRIPTION     Simple demonstration for IBM Trackpoint integration
+
+    #define MATRIX_ROWS 1
+    #define MATRIX_COLS 3
+
+    #ifdef PS2_USE_USART
+        #define PS2_CLOCK_PORT  PORTD
+        #define PS2_CLOCK_PIN   PIND
+        #define PS2_CLOCK_DDR   DDRD
+        #define PS2_CLOCK_BIT   5
+        #define PS2_DATA_PORT   PORTD
+        #define PS2_DATA_PIN    PIND
+        #define PS2_DATA_DDR    DDRD
+        #define PS2_DATA_BIT    2
+
+        /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
+        /* set DDR of CLOCK as input to be slave */
+        #define PS2_USART_INIT() do {   \
+            PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT);   \
+            PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT);     \
+            UCSR1C = ((1 << UMSEL10) |  \
+                      (3 << UPM10)   |  \
+                      (0 << USBS1)   |  \
+                      (3 << UCSZ10)  |  \
+                      (0 << UCPOL1));   \
+            UCSR1A = 0;                 \
+            UBRR1H = 0;                 \
+            UBRR1L = 0;                 \
+        } while (0)
+        #define PS2_USART_RX_INT_ON() do {  \
+            UCSR1B = ((1 << RXCIE1) |       \
+                      (1 << RXEN1));        \
+        } while (0)
+        #define PS2_USART_RX_POLL_ON() do { \
+            UCSR1B = (1 << RXEN1);          \
+        } while (0)
+        #define PS2_USART_OFF() do {    \
+            UCSR1C = 0;                 \
+            UCSR1B &= ~((1 << RXEN1) |  \
+                        (1 << TXEN1));  \
+        } while (0)
+        #define PS2_USART_RX_READY      (UCSR1A & (1<<RXC1))
+        #define PS2_USART_RX_DATA       UDR1
+        #define PS2_USART_ERROR         (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
+        #define PS2_USART_RX_VECT       USART1_RX_vect
+    #endif
+
+    #define MATRIX_COL_PINS { F1, F4, F5 }
+    #define MATRIX_ROW_PINS { F0 }
+    #define UNUSED_PINS
+
+    /* COL2ROW or ROW2COL */
+    #define DIODE_DIRECTION COL2ROW
+
+    #define DEBOUNCING_DELAY 5
+
+    #define LOCKING_SUPPORT_ENABLE
+    #define LOCKING_RESYNC_ENABLE
+
+    /* key combination for command */
+    #define IS_COMMAND() ( \
+        keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+    )
+
+#endif
diff --git a/keyboards/handwired/trackpoint/keymaps/default/keymap.c b/keyboards/handwired/trackpoint/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..22e46d9
--- /dev/null
@@ -0,0 +1,7 @@
+#include "trackpoint.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    [0] = KEYMAP(
+        KC_BTN1,    KC_BTN3,    KC_BTN2 \
+    )
+};
diff --git a/keyboards/handwired/trackpoint/rules.mk b/keyboards/handwired/trackpoint/rules.mk
new file mode 100644 (file)
index 0000000..0609dd3
--- /dev/null
@@ -0,0 +1,25 @@
+MCU = atmega32u4
+F_CPU = 16000000
+ARCH = AVR8
+F_USB = $(F_CPU)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+OPT_DEFS += -DBOOTLOADER_SIZE=512
+BOOTMAGIC_ENABLE ?= no      # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes       # Audio control and System control(+450)
+CONSOLE_ENABLE ?= yes        # Console for debug(+400)
+COMMAND_ENABLE ?= yes        # Commands for debug and configuration
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+NKRO_ENABLE ?= no            # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE ?= no            # MIDI controls
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
+
+PS2_MOUSE_ENABLE ?= yes
+PS2_USE_USART ?= yes
+
+ifndef QUANTUM_DIR
+       include ../../Makefile
+endif
diff --git a/keyboards/handwired/trackpoint/trackpoint.c b/keyboards/handwired/trackpoint/trackpoint.c
new file mode 100644 (file)
index 0000000..124995a
--- /dev/null
@@ -0,0 +1,5 @@
+#include "trackpoint.h"
+
+void matrix_init_kb(void) {
+
+}
diff --git a/keyboards/handwired/trackpoint/trackpoint.h b/keyboards/handwired/trackpoint/trackpoint.h
new file mode 100644 (file)
index 0000000..b5d73d7
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef TRACKPOINT_H
+#define TRACKPOINT_H
+
+#include "quantum.h"
+
+#define KEYMAP( \
+       k00, k01, k02  \
+) \
+{ \
+       { k00, k01, k02} \
+}
+
+#endif
index a7ea54de80a24e74fbf775059a212f215c1d60e3..484df851a522c34e341bd61855b2a98041e1d423 100644 (file)
@@ -146,7 +146,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
     return MACRO_NONE;
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -155,19 +155,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   switch (keycode) {
     case QWERTY:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
     case COLEMAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
     case DVORAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index 8d26cbde127855f5072023b7bff01f6ef0b213eb..0da114a1edc05fae0dad521d5b031a5a1efb4e8e 100644 (file)
@@ -283,7 +283,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 /*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
index 2e45a46d9b171849e89f1e0f7f66b061059d66ce..21651961483287210be729cce1452321ab78cdcb 100644 (file)
@@ -8,7 +8,7 @@ needed, they will be mapped to home row keys. The `keymap.c` file will contain
 the exact changes. The diagrams in this README shows the highlights of the
 changes from the default mappings.
 
-I also decided to change all calls to `persistant_default_layer_set()` to
+I also decided to change all calls to `persistent_default_layer_set()` to
 `default_layer_set()` since this is my personal perference.
 
 ## Macros
diff --git a/keyboards/kc60/keymaps/stanleylai/base_layer.png b/keyboards/kc60/keymaps/stanleylai/base_layer.png
deleted file mode 100644 (file)
index 97235c6..0000000
Binary files a/keyboards/kc60/keymaps/stanleylai/base_layer.png and /dev/null differ
diff --git a/keyboards/kc60/keymaps/stanleylai/rgb_layer.png b/keyboards/kc60/keymaps/stanleylai/rgb_layer.png
deleted file mode 100644 (file)
index 2bba028..0000000
Binary files a/keyboards/kc60/keymaps/stanleylai/rgb_layer.png and /dev/null 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 (file)
index cc6a630..0000000
Binary files a/keyboards/kc60/keymaps/workman-dead/kc60-wm-dead.png and /dev/null differ
index f1fcdc96062e7b33408b1f7b589701038111354a..7b4f543f770fdf357fa3a7223c053e7d4ed674b8 100644 (file)
@@ -1,7 +1,7 @@
 # Workman dead with spacefn (kc60 @ QMK)
 
 ## Layout reference
-![workman dead with spacefn](./kc60-wm-dead.png)
+![workman dead with spacefn](http://imgur.com/Ep8gePQ)
 
 ## Build
 
index 62f47773c70c5e4f98d40940111fdb3c7ec6eee3..fa181e03909e9f12765b75438f4a38aa645f8ac9 100644 (file)
@@ -269,7 +269,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -279,17 +279,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
       switch(id) {
         case _DV:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_DV);
+            persistent_default_layer_set(1UL<<_DV);
           }
           break;
         case _QW:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_QW);
+            persistent_default_layer_set(1UL<<_QW);
           }
           break;
         case _CM:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_CM);
+            persistent_default_layer_set(1UL<<_CM);
           }
           break;
       }
diff --git a/keyboards/kmac/Makefile b/keyboards/kmac/Makefile
new file mode 100644 (file)
index 0000000..840dc9a
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright 2013 Jun Wako <wakojun@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h
new file mode 100644 (file)
index 0000000..5c164bf
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+Copyright 2017 Mathias Andersson <wraul@dbox.se>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0xFEED
+#define PRODUCT_ID      0x6050
+#define DEVICE_VER      0x0104
+#define MANUFACTURER    KBDMania
+#define PRODUCT         KMAC
+#define DESCRIPTION     QMK keyboard firmware for KMAC
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+/*
+ * Keyboard Matrix Assignments
+ * The KMAC uses demultiplexers for the cols, they are only included here as documentation.
+ * See matrix.c for more details.
+*/
+#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, B7 }
+#define MATRIX_COL_PINS { C6, B6, F0, F1, C7, B5 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION CUSTOM_MATRIX
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1          H
+//#define MAGIC_KEY_HELP2          SLASH
+//#define MAGIC_KEY_DEBUG          D
+//#define MAGIC_KEY_DEBUG_MATRIX   X
+//#define MAGIC_KEY_DEBUG_KBD      K
+//#define MAGIC_KEY_DEBUG_MOUSE    M
+//#define MAGIC_KEY_VERSION        V
+//#define MAGIC_KEY_STATUS         S
+//#define MAGIC_KEY_CONSOLE        C
+//#define MAGIC_KEY_LAYER0_ALT1    ESC
+//#define MAGIC_KEY_LAYER0_ALT2    GRAVE
+//#define MAGIC_KEY_LAYER0         0
+//#define MAGIC_KEY_LAYER1         1
+//#define MAGIC_KEY_LAYER2         2
+//#define MAGIC_KEY_LAYER3         3
+//#define MAGIC_KEY_LAYER4         4
+//#define MAGIC_KEY_LAYER5         5
+//#define MAGIC_KEY_LAYER6         6
+//#define MAGIC_KEY_LAYER7         7
+//#define MAGIC_KEY_LAYER8         8
+//#define MAGIC_KEY_LAYER9         9
+//#define MAGIC_KEY_BOOTLOADER     PAUSE
+//#define MAGIC_KEY_LOCK           CAPS
+//#define MAGIC_KEY_EEPROM         E
+//#define MAGIC_KEY_NKRO           N
+//#define MAGIC_KEY_SLEEP_LED      Z
+
+/*
+ * Feature disable options
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+   - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+   - MIDI notes can be added to the keymap
+   - Octave shift and transpose
+   - Virtual sustain, portamento, and modulation wheel
+   - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+#endif
diff --git a/keyboards/kmac/keymaps/default/Makefile b/keyboards/kmac/keymaps/default/Makefile
new file mode 100644 (file)
index 0000000..a8a4488
--- /dev/null
@@ -0,0 +1,37 @@
+# Copyright 2013 Jun Wako <wakojun@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# QMK Build Options
+#   change to "no" to disable the options, or define them in the Makefile in 
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = yes      # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE = yes         # Console for debug(+400)
+COMMAND_ENABLE = yes        # Commands for debug and configuration
+NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes      # Enable keyboard backlight functionality
+MIDI_ENABLE = no            # MIDI support (+2400 to 4200, depending on config)
+AUDIO_ENABLE = no           # Audio output on port C6
+UNICODE_ENABLE = no         # Unicode
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/kmac/keymaps/default/config.h b/keyboards/kmac/keymaps/default/config.h
new file mode 100644 (file)
index 0000000..a3828f7
--- /dev/null
@@ -0,0 +1,24 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+// place overrides here
+
+#endif
diff --git a/keyboards/kmac/keymaps/default/keymap.c b/keyboards/kmac/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..3553e84
--- /dev/null
@@ -0,0 +1,97 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "kmac.h"
+
+// Helpful defines
+#define _______ KC_TRNS
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _BL 0
+#define _FL 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  [_BL] = KEYMAP(
+    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,  \
+    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_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_CAPS, KC_A,    KC_S,    KC_D,   KC_F,   KC_G,   KC_H,   KC_J,   KC_K,    KC_L,    KC_SCLN, KC_QUOT,          KC_ENT,                                  \
+    KC_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,            \
+    KC_LCTL, KC_LGUI, KC_LALT,                         KC_SPC,                           KC_RALT, KC_RGUI, MO(_FL), KC_RCTL,      KC_LEFT, KC_DOWN, KC_RGHT  \
+  ),
+  [_FL] = KEYMAP(
+    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),        _______, _______, _______, \
+    _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,      _______, _______, _______, \
+    _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,      _______, _______, _______, \
+    _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,          _______,                                 \
+    _______,          _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,          _______,               _______,          \
+    _______, _______, _______,                            _______,                            _______, _______, _______, _______,      _______, _______, _______  \
+  ),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  // MACRODOWN only works in this function
+      switch(id) {
+        case 0:
+          if (record->event.pressed) {
+            SEND_STRING("The");
+            return false;
+          }
+        break;
+        case 1:
+          if (record->event.pressed) {
+            SEND_STRING("Custom");
+            return false;
+          }
+        break;
+        case 2:
+          if (record->event.pressed) {
+            SEND_STRING("Keyboard");
+            return false;
+          }
+        break;
+        case 3:
+          if (record->event.pressed) {
+            return MACRO( D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END );
+          }
+        break;
+      }
+    return MACRO_NONE;
+};
+
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/kmac/keymaps/default/readme.md b/keyboards/kmac/keymaps/default/readme.md
new file mode 100644 (file)
index 0000000..d384e0d
--- /dev/null
@@ -0,0 +1,56 @@
+# Keymap for the winkey version of KMAC
+
+This is the default keymap for the winkey version of the PCB. It implements the same features as the official default KMAC firmware.
+
+See [keymap.c](keymap.c) for details.
+
+## Layers
+
+The keymap have two layers. To access the functions on the second layer, hold down caps lock and press the corresponding key.
+
+### Layer 1: Default Layer
+     ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
+     |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
+     `---'   `---------------' `---------------' `---------------' `-----------'
+     ,-----------------------------------------------------------. ,-----------.
+     |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |Ins|Hom|PgU|
+     |-----------------------------------------------------------| |-----------|
+     |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD|
+     |-----------------------------------------------------------| '-----------'
+     |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  |
+     |-----------------------------------------------------------|     ,---.
+     |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     |     |Up |
+     |-----------------------------------------------------------| ,-----------.
+     |Ctl|Gui|Alt|             Space             |Alt|Gui|Fn |Ctl| |Lef|Dow|Rig|
+     `-----------------------------------------------------------' `-----------'
+
+### Layer 2: Function Layer
+     ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
+     |Led|   |M1 |M2 |M3 |M4 | |M5 |M6 |M7 |M8 | |M9 |M10|M11|M12| |   |   |   |
+     `---'   `---------------' `---------------' `---------------' `-----------'
+     ,-----------------------------------------------------------. ,-----------.
+     |   |   |   |   |   |   |   |   |   |   |   |   |   |       | |   |   |   |
+     |-----------------------------------------------------------| |-----------|
+     |     |   |   |   |   |   |   |   |   |   |   |   |   |     | |   |   |   |
+     |-----------------------------------------------------------| '-----------'
+     |      |   |   |   |   |   |   |   |   |   |   |   |        |
+     |-----------------------------------------------------------|     ,---.
+     |        |   |   |   |   |   |   |   |   |   |   |          |     |   |
+     |-----------------------------------------------------------| ,-----------.
+     |   |   |   |                               |   |   |   |   | |   |   |   |
+     `-----------------------------------------------------------' `-----------'
+
+## Macros
+
+These are mostly useless and serve more like examples I guess.
+
+| Macro | Action                                 |
+|:-----:| -------------------------------------- |
+| 1     | Types `The`                            |
+| 2     | Types `Custom`                         |
+| 3     | Types `Keyboard`                       |
+| 4     | Inputs `<Ctrl+c>` `<Right>` `<Ctrl+v>` |
+
+## Building
+
+To 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 (file)
index 0000000..a8a4488
--- /dev/null
@@ -0,0 +1,37 @@
+# Copyright 2013 Jun Wako <wakojun@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# QMK Build Options
+#   change to "no" to disable the options, or define them in the Makefile in 
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = yes      # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE = yes         # Console for debug(+400)
+COMMAND_ENABLE = yes        # Commands for debug and configuration
+NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes      # Enable keyboard backlight functionality
+MIDI_ENABLE = no            # MIDI support (+2400 to 4200, depending on config)
+AUDIO_ENABLE = no           # Audio output on port C6
+UNICODE_ENABLE = no         # Unicode
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/kmac/keymaps/winkeyless/config.h b/keyboards/kmac/keymaps/winkeyless/config.h
new file mode 100644 (file)
index 0000000..a3828f7
--- /dev/null
@@ -0,0 +1,24 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+// place overrides here
+
+#endif
diff --git a/keyboards/kmac/keymaps/winkeyless/keymap.c b/keyboards/kmac/keymaps/winkeyless/keymap.c
new file mode 100644 (file)
index 0000000..f986dec
--- /dev/null
@@ -0,0 +1,97 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "kmac.h"
+
+// Helpful defines
+#define _______ KC_TRNS
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _BL 0
+#define _FL 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  [_BL] = KEYMAP_WINKEYLESS(
+    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,  \
+    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_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_CAPS, KC_A,    KC_S,    KC_D,   KC_F,   KC_G,   KC_H,   KC_J,   KC_K,    KC_L,    KC_SCLN, KC_QUOT,          KC_ENT,                                  \
+    KC_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,            \
+    KC_LCTL, KC_LGUI, KC_LALT,                         KC_SPC,                                    KC_RALT, MO(_FL), KC_RCTL,      KC_LEFT, KC_DOWN, KC_RGHT  \
+  ),
+  [_FL] = KEYMAP_WINKEYLESS(
+    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),        _______, _______, _______, \
+    _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,      _______, _______, _______, \
+    _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,      _______, _______, _______, \
+    _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,          _______,                                 \
+    _______,          _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,          _______,               _______,          \
+    _______, _______, _______,                            _______,                                     _______, _______, _______,      _______, _______, _______  \
+  ),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  // MACRODOWN only works in this function
+      switch(id) {
+        case 0:
+          if (record->event.pressed) {
+            SEND_STRING("The");
+            return false;
+          }
+        break;
+        case 1:
+          if (record->event.pressed) {
+            SEND_STRING("Custom");
+            return false;
+          }
+        break;
+        case 2:
+          if (record->event.pressed) {
+            SEND_STRING("Keyboard");
+            return false;
+          }
+        break;
+        case 3:
+          if (record->event.pressed) {
+            return MACRO( D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END );
+          }
+        break;
+      }
+    return MACRO_NONE;
+};
+
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/kmac/keymaps/winkeyless/readme.md b/keyboards/kmac/keymaps/winkeyless/readme.md
new file mode 100644 (file)
index 0000000..b921f7b
--- /dev/null
@@ -0,0 +1,57 @@
+# Keymap for the winkeyless version of KMAC
+
+This is the default keymap for the winkeyless version of the PCB. It implements the same features as the official default KMAC firmware.
+
+
+See [keymap.c](keymap.c) for details.
+
+## Layers
+
+The keymap have two layers. To access the functions on the second layer, hold down caps lock and press the corresponding key.
+
+### Layer 1: Default Layer
+     ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
+     |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
+     `---'   `---------------' `---------------' `---------------' `-----------'
+     ,-----------------------------------------------------------. ,-----------.
+     |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |Ins|Hom|PgU|
+     |-----------------------------------------------------------| |-----------|
+     |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD|
+     |-----------------------------------------------------------| '-----------'
+     |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  |
+     |-----------------------------------------------------------|     ,---.
+     |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     |     |Up |
+     |-----------------------------------------------------------| ,-----------.
+     |Ctl|Gui|Alt|               Space               |Alt|Fn |Ctl| |Lef|Dow|Rig|
+     `-----------------------------------------------------------' `-----------'
+
+### Layer 2: Function Layer
+     ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
+     |Led|   |M1 |M2 |M3 |M4 | |M5 |M6 |M7 |M8 | |M9 |M10|M11|M12| |   |   |   |
+     `---'   `---------------' `---------------' `---------------' `-----------'
+     ,-----------------------------------------------------------. ,-----------.
+     |   |   |   |   |   |   |   |   |   |   |   |   |   |       | |   |   |   |
+     |-----------------------------------------------------------| |-----------|
+     |     |   |   |   |   |   |   |   |   |   |   |   |   |     | |   |   |   |
+     |-----------------------------------------------------------| '-----------'
+     |      |   |   |   |   |   |   |   |   |   |   |   |        |
+     |-----------------------------------------------------------|     ,---.
+     |        |   |   |   |   |   |   |   |   |   |   |          |     |   |
+     |-----------------------------------------------------------| ,-----------.
+     |   |   |   |                                   |   |   |   | |   |   |   |
+     `-----------------------------------------------------------' `-----------'
+
+## Macros
+
+These are mostly useless and serve more like examples I guess.
+
+| Macro | Action                                 |
+|:-----:| -------------------------------------- |
+| 1     | Types `The`                            |
+| 2     | Types `Custom`                         |
+| 3     | Types `Keyboard`                       |
+| 4     | Inputs `<Ctrl+c>` `<Right>` `<Ctrl+v>` |
+
+## Building
+
+To 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 (file)
index 0000000..34647e8
--- /dev/null
@@ -0,0 +1,109 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "kmac.h"
+
+void matrix_init_kb(void) {
+       // put your keyboard start-up code here
+       // runs once when the firmware starts up
+       led_init_ports();
+       matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+       // put your looping keyboard code here
+       // runs every cycle (a lot)
+
+       matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+       // put your per-action keyboard code here
+       // runs for every action, just before processing by the firmware
+
+       return process_record_user(keycode, record);
+}
+
+void led_init_ports(void) {
+    DDRB |= (1<<0); // OUT
+    DDRE |= (1<<6); // OUT
+}
+
+/* LED pin configuration
+ * Scroll Lock: Low PE6
+ * Caps Lock: Low PB0
+ */
+void led_set_kb(uint8_t usb_led) {
+    if (usb_led & (1<<USB_LED_CAPS_LOCK))
+    {
+        PORTB &= ~(1<<0); // LO
+    }
+    else
+    {
+        PORTB |= (1<<0); // HI
+    }
+
+    if (usb_led & (1<<USB_LED_SCROLL_LOCK))
+    {
+        PORTE &= ~(1<<6); // LO
+    }
+    else
+    {
+        PORTE |= (1<<6); // HI
+    }
+
+       led_set_user(usb_led);
+}
+
+void backlight_init_ports(void) {
+       DDRB |= (1<<1) | (1<<2) | (1<<3) | (1<<4); // OUT
+       DDRD |= (1<<7); // OUT
+}
+
+/* Backlight pin configuration
+ * F-row: High PB1
+ * W: Low PB4
+ * A: Low PB2
+ * S: Low PB3
+ * D: Low PD7
+ */
+void backlight_set(uint8_t level)
+{
+    // F-row
+    if(level & (1<<0))
+    {
+        PORTB |= (1<<1); // HI
+    }
+    else
+    {
+        PORTB &= ~(1<<1); // LO
+    }
+
+    // WASD
+    if(level & (1<<1))
+    {
+        PORTB &= ~(1<<4); // LO
+        PORTB &= ~(1<<2); // LO
+        PORTB &= ~(1<<3); // LO
+        PORTD &= ~(1<<7); // LO
+    }
+    else
+    {
+        PORTB |= (1<<4); // HI
+        PORTB |= (1<<2); // HI
+        PORTB |= (1<<3); // HI
+        PORTD |= (1<<7); // HI
+    }
+}
diff --git a/keyboards/kmac/kmac.h b/keyboards/kmac/kmac.h
new file mode 100644 (file)
index 0000000..1d9d8e3
--- /dev/null
@@ -0,0 +1,56 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef KMAC_H
+#define KMAC_H
+
+#include "quantum.h"
+
+// Keymap for the winkey version of the PCB.
+#define KEYMAP( \
+    K00,      K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,      K0E, K0F, K0G, \
+    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D,      K1E, K1F, K1G, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,      K2E, K2F, K2G, \
+    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,      K3D,                     \
+    K40,      K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A,      K4D,           K4F,      \
+    K50, K51, K52,                K55,                K58, K5A, K5C, K5D,      K5E, K5F, K5G  \
+) { \
+/*        0      1      2      3      4      5      6      7      8      9      A      B      C      D      E      F      G    */  \
+/* 0 */ { K00,   KC_NO, K02,   K03,   K04,   K05,   K06,   K07,   K08,   K09,   K0A,   K0B,   K0C,   K0D,   K0E,   K0F,   K0G   }, \
+/* 1 */ { K10,   K11,   K12,   K13,   K14,   K15,   K16,   K17,   K18,   K19,   K1A,   K1B,   K1C,   K1D,   K1E,   K1F,   K1G   }, \
+/* 2 */ { K20,   K21,   K22,   K23,   K24,   K25,   K26,   K27,   K28,   K29,   K2A,   K2B,   K2C,   K2D,   K2E,   K2F,   K2G   }, \
+/* 3 */ { K30,   K31,   K32,   K33,   K34,   K35,   K36,   K37,   K38,   K39,   K3A,   K3B,   KC_NO, K3D,   KC_NO, KC_NO, KC_NO }, \
+/* 4 */ { K40,   K41,   K42,   K43,   K44,   K45,   K46,   K47,   K48,   K49,   K4A,   KC_NO, KC_NO, K4D,   KC_NO, K4F,   KC_NO }, \
+/* 5 */ { K50,   K51,   K52,   KC_NO, KC_NO, K55,   KC_NO, KC_NO, K58,   KC_NO, K5A,   KC_NO, K5C,   K5D,   K5E,   K5F,   K5G   }  \
+}
+
+// Keymap for the winkeyless version of the PCB.
+#define KEYMAP_WINKEYLESS( \
+    K00,      K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,      K0E, K0F, K0G, \
+    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D,      K1E, K1F, K1G, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,      K2E, K2F, K2G, \
+    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,      K3D,                     \
+    K40,      K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A,      K4D,           K4F,      \
+    K50, K51, K52,                K55,                     K58, K5A, K5D,      K5E, K5F, K5G  \
+) KEYMAP( \
+    K00,          K02,   K03,   K04,   K05,   K06,   K07,   K08,   K09,   K0A,   K0B,   K0C,   K0D,      K0E,   K0F,   K0G, \
+    K10,   K11,   K12,   K13,   K14,   K15,   K16,   K17,   K18,   K19,   K1A,   K1B,   K1C,   K1D,      K1E,   K1F,   K1G, \
+    K20,   K21,   K22,   K23,   K24,   K25,   K26,   K27,   K28,   K29,   K2A,   K2B,   K2C,   K2D,      K2E,   K2F,   K2G, \
+    K30,   K31,   K32,   K33,   K34,   K35,   K36,   K37,   K38,   K39,   K3A,   K3B,          K3D,                         \
+    K40,          K41,   K42,   K43,   K44,   K45,   K46,   K47,   K48,   K49,   K4A,          K4D,             K4F,        \
+    K50,   K51,   K52,                        K55,                        K58,   K5A,   KC_NO, K5D,      K5E,   K5F,   K5G  \
+)
+
+#endif
diff --git a/keyboards/kmac/matrix.c b/keyboards/kmac/matrix.c
new file mode 100644 (file)
index 0000000..bab638b
--- /dev/null
@@ -0,0 +1,311 @@
+/*
+Copyright 2017 Mathias Andersson <wraul@dbox.se>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#include <stdint.h>
+#include <stdbool.h>
+#if defined(__AVR__)
+#include <avr/io.h>
+#endif
+#include "wait.h"
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include "matrix.h"
+#include "timer.h"
+
+
+/* Set 0 if debouncing isn't needed */
+#ifndef DEBOUNCING_DELAY
+#   define DEBOUNCING_DELAY 5
+#endif
+
+#define COL_SHIFTER ((uint32_t)1)
+
+static uint16_t debouncing_time;
+static bool debouncing = false;
+
+
+static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
+static void init_rows(void);
+static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
+static void unselect_cols(void);
+static void select_col(uint8_t col);
+
+inline
+uint8_t matrix_rows(void) {
+    return MATRIX_ROWS;
+}
+
+inline
+uint8_t matrix_cols(void) {
+    return MATRIX_COLS;
+}
+
+void matrix_init(void) {
+    unselect_cols();
+    init_rows();
+
+    // initialize matrix state: all keys off
+    for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+        matrix[i] = 0;
+        matrix_debouncing[i] = 0;
+    }
+
+    matrix_init_quantum();
+}
+
+uint8_t matrix_scan(void)
+{
+    // Set col, read rows
+    for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+        bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col);
+        if (matrix_changed) {
+            debouncing = true;
+            debouncing_time = timer_read();
+        }
+    }
+
+    if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
+        for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+            matrix[i] = matrix_debouncing[i];
+        }
+        debouncing = false;
+    }
+
+    matrix_scan_quantum();
+    return 1;
+}
+
+inline
+bool matrix_is_on(uint8_t row, uint8_t col)
+{
+    return (matrix[row] & ((matrix_row_t)1<col));
+}
+
+inline
+matrix_row_t matrix_get_row(uint8_t row)
+{
+       return matrix[row];
+}
+
+void matrix_print(void)
+{
+    print("\nr/c 0123456789ABCDEFGHIJKLMNOPQRSTUV\n");
+
+    for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+        phex(row); print(": ");
+        print_bin_reverse32(matrix_get_row(row));
+        print("\n");
+    }
+}
+
+uint8_t matrix_key_count(void)
+{
+    uint8_t count = 0;
+    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+        count += bitpop32(matrix[i]);
+    }
+    return count;
+}
+
+static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
+{
+    bool matrix_changed = false;
+
+    // Select col and wait for col selecton to stabilize
+    select_col(current_col);
+    wait_us(30);
+
+    // For each row...
+    for(uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++)
+    {
+        // Store last value of row prior to reading
+        matrix_row_t last_row_value = current_matrix[row_index];
+
+        // Check row pin state
+        // Use the otherwise unused row: 3, col: 0 for caps lock
+        if (row_index == 3 && current_col == 0) {
+            // Pin E2 uses active low
+            if ((_SFR_IO8(E2 >> 4) & _BV(E2 & 0xF)) == 0)
+            {
+                // Pin LO, set col bit
+                current_matrix[row_index] |= (COL_SHIFTER << current_col);
+            }
+            else
+            {
+                // Pin HI, clear col bit
+                current_matrix[row_index] &= ~(COL_SHIFTER << current_col);
+            }
+        }
+        else {
+            if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)))
+            {
+                // Pin HI, set col bit
+                current_matrix[row_index] |= (COL_SHIFTER << current_col);
+            }
+            else
+            {
+                // Pin LO, clear col bit
+                current_matrix[row_index] &= ~(COL_SHIFTER << current_col);
+            }
+        }
+
+        // Determine if the matrix changed state
+        if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
+        {
+            matrix_changed = true;
+        }
+    }
+
+    // Unselect cols
+    unselect_cols();
+
+    return matrix_changed;
+}
+
+/* Row pin configuration
+ * row: 0   1   2   3   4   5
+ * pin: D0  D1  D2  D3  D5  B7
+ *
+ * Caps lock uses its own pin E2
+ */
+static void init_rows(void)
+{
+    DDRD  &= ~((1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<5)); // IN
+    PORTD &= ~((1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<5)); // LO
+    DDRB  &= ~(1<<7); // IN
+    PORTB &= ~(1<<7); // LO
+
+    DDRE &= ~(1<<2); // IN
+    PORTE |= (1<<2); // HI
+}
+
+/* Columns 0 - 15
+ * These columns uses two 74HC237D 3 to 8 bit demultiplexers.
+ * col / pin:    PC6  PB6  PF0  PF1  PC7
+ * 0:             1    0    0    0    0
+ * 1:             1    0    1    0    0
+ * 2:             1    0    0    1    0
+ * 3:             1    0    1    1    0
+ * 4:             1    0    0    0    1
+ * 5:             1    0    1    0    1
+ * 6:             1    0    0    1    1
+ * 7:             1    0    1    1    1
+ * 8:             0    1    0    0    0
+ * 9:             0    1    1    0    0
+ * 10:            0    1    0    1    0
+ * 11:            0    1    1    1    0
+ * 12:            0    1    0    0    1
+ * 13:            0    1    1    0    1
+ * 14:            0    1    0    1    1
+ * 15:            0    1    1    1    1
+ *
+ * col: 16
+ * pin: PB5
+ */
+static void unselect_cols(void)
+{
+    DDRB  |= (1<<5) | (1<<6); // OUT
+    PORTB &= ~((1<<5) | (1<<6)); // LO
+
+    DDRC  |= (1<<6) | (1<<7); // OUT
+    PORTC &= ~((1<<6) | (1<<7)); // LO
+
+    DDRF  |= (1<<0) | (1<<1); // OUT
+    PORTF &= ~((1<<0) | (1<<1)); // LO
+}
+
+static void select_col(uint8_t col)
+{
+    switch (col) {
+        case 0:
+            PORTC |= (1<<6); // HI
+            break;
+        case 1:
+            PORTC |= (1<<6); // HI
+            PORTF |= (1<<0); // HI
+            break;
+        case 2:
+            PORTC |= (1<<6); // HI
+            PORTF |= (1<<1); // HI
+            break;
+        case 3:
+            PORTC |= (1<<6); // HI
+            PORTF |= (1<<0) | (1<<1); // HI
+            break;
+        case 4:
+            PORTC |= (1<<6); // HI
+            PORTC |= (1<<7); // HI
+            break;
+        case 5:
+            PORTC |= (1<<6); // HI
+            PORTF |= (1<<0); // HI
+            PORTC |= (1<<7); // HI
+            break;
+        case 6:
+            PORTC |= (1<<6); // HI
+            PORTF |= (1<<1); // HI
+            PORTC |= (1<<7); // HI
+            break;
+        case 7:
+            PORTC |= (1<<6); // HI
+            PORTF |= (1<<0) | (1<<1); // HI
+            PORTC |= (1<<7); // HI
+            break;
+        case 8:
+            PORTB |= (1<<6); // HI
+            break;
+        case 9:
+            PORTB |= (1<<6); // HI
+            PORTF |= (1<<0); // HI
+            break;
+        case 10:
+            PORTB |= (1<<6); // HI
+            PORTF |= (1<<1); // HI
+            break;
+        case 11:
+            PORTB |= (1<<6); // HI
+            PORTF |= (1<<0) | (1<<1); // HI
+            break;
+        case 12:
+            PORTB |= (1<<6); // HI
+            PORTC |= (1<<7); // HI
+            break;
+        case 13:
+            PORTB |= (1<<6); // HI
+            PORTF |= (1<<0); // HI
+            PORTC |= (1<<7); // HI
+            break;
+        case 14:
+            PORTB |= (1<<6); // HI
+            PORTF |= (1<<1); // HI
+            PORTC |= (1<<7); // HI
+            break;
+        case 15:
+            PORTB |= (1<<6); // HI
+            PORTF |= (1<<0) | (1<<1); // HI
+            PORTC |= (1<<7); // HI
+            break;
+        case 16:
+            PORTB |= (1<<5); // HI
+            break;
+    }
+}
diff --git a/keyboards/kmac/readme.md b/keyboards/kmac/readme.md
new file mode 100644 (file)
index 0000000..e7d9777
--- /dev/null
@@ -0,0 +1,45 @@
+KMAC keyboard firmware
+======================
+
+A Korean custom keyboard designed by Byungho Kim and the KBDMania community.
+
+## Supported models
+
+All the tenkeyless models should be supported.
+
+## Bootloader
+
+The PCB is hardwired to run the bootloader if the key at the `Caps Lock` position is held down when connecting the keyboard.
+
+It is also possible to use Boot Magic and Command to access the bootloader.
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see the [documentation](https://docs.qmk.fm).
+
+## Building
+
+The 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.
+
+Depending 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.
+
+### Winkey keymap
+
+The [default keymap](keymaps/default) are designed for the winkey version of the PCB.
+
+### Winkeyless Keymap
+
+A [keymap](keymaps/winkeyless) for the winkeyless version of the PCB are also provided.
+
+### Custom keymaps
+
+To 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.
+
+To make it easy to define keymaps for the different versions of the PCB two macros are provided.
+
+| PCB            | Macro                 |
+| -------------- | --------------------- |
+| Winkey PCB     | `KEYMAP()`            |
+| Winkeyless PCB | `KEYMAP_WINKEYLESS()` |
+
+To 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 (file)
index 0000000..54c9aa2
--- /dev/null
@@ -0,0 +1,72 @@
+# Project specific files
+SRC = matrix.c
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 8000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE ?= yes      # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes       # Audio control and System control(+450)
+CONSOLE_ENABLE ?= yes        # Console for debug(+400)
+COMMAND_ENABLE ?= yes        # Commands for debug and configuration
+CUSTOM_MATRIX ?= yes         # Custom matrix file
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= yes           # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= no       # Enable keyboard backlight functionality
+MIDI_ENABLE ?= no            # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
+FAUXCLICKY_ENABLE ?= no      # Use buzzer to emulate clicky switches
index 493ebcd3f2c3001c00ad83903e8c6dd16deb83a0..274f917e21b269c5d969fab62bfbff1f6afef70f 100644 (file)
@@ -186,7 +186,7 @@ float tone_goodbye[][2]    = SONG(GOODBYE_SOUND);
 bool TOG_STATUS = false;
 int RGB_current_mode;
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -208,7 +208,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -217,7 +217,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
@@ -226,7 +226,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
diff --git a/keyboards/lets_split/keymaps/adam/config.h b/keyboards/lets_split/keymaps/adam/config.h
new file mode 100644 (file)
index 0000000..177dd22
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#define USE_SERIAL
+
+//#define MASTER_LEFT
+// #define MASTER_RIGHT
+#define EE_HANDS
+
+#ifdef SUBPROJECT_rev1
+    #include "../../rev1/config.h"
+#endif
+#ifdef SUBPROJECT_rev2
+    #include "../../rev2/config.h"
+    /* RGB Underglow */
+    #undef RGBLED_NUM
+    #define RGBLIGHT_ANIMATIONS
+    #define RGBLED_NUM 8
+#endif
+#ifdef SUBPROJECT_rev2fliphalf
+       #include "../../rev2fliphalf/config.h"
+#endif
+
+#undef TAPPING_TERM
+#define TAPPING_TERM 200 //At 500 some bad logic takes hold
+#define PREVENT_STUCK_MODIFIERS
+#define IGNORE_MOD_TAP_INTERRUPT
+#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 (file)
index 0000000..8aca732
--- /dev/null
@@ -0,0 +1,79 @@
+#include "lets_split.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define BASE 0 // default layer
+#define FLOCK 1 // symbols arrows and F keys on F held down
+#define JLOCK 2 // same as Flock but with fall thru J and mapped to J held down
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |Lower | Bksp |Space |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[BASE] = KEYMAP ( \
+  TD(1),         KC_2,       KC_3,         KC_4,     KC_5,         KC_MINS, KC_EQL,    KC_6,        KC_7,        KC_8,         KC_9,           KC_0,     \
+  KC_Q,         KC_W,       KC_E,         KC_R,     KC_T,         KC_TAB,  KC_TAB,    KC_Y,        KC_U,        KC_I,         KC_O,           KC_P,    \
+  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), \
+  KC_Z,         KC_X,       KC_C,         KC_V,     KC_B,         KC_SPC,  KC_ENT,    KC_N,        KC_M,        KC_COMM,      KC_DOT,         KC_QUOTE
+),
+[FLOCK] = KEYMAP ( \
+  KC_F1,      KC_F2,      KC_F3,       KC_F4,      KC_F5,      KC_F11,     KC_F12,     KC_F6,      KC_F7,      KC_F8,     KC_F9,    KC_F10, \
+  KC_LBRC,    KC_GRV,     KC_TILDE,    S(KC_1),    XXXXXXX,    XXXXXXX,    XXXXXXX,    XXXXXXX,    KC_HOME,    KC_PGUP,   XXXXXXX,  KC_RBRC, \
+  S(KC_LBRC), _______,    _______,     _______,    _______,    XXXXXXX,    XXXXXXX,    KC_LEFT,    KC_DOWN,    KC_UP,     KC_RIGHT, S(KC_RBRC), \
+  KC_BSLS,    KC_PIPE,    XXXXXXX,     XXXXXXX,    XXXXXXX,    KC_ESC,     KC_ESC,     XXXXXXX,    KC_END,     KC_PGDOWN, KC_QUES,  KC_SLASH \
+),
+[JLOCK] = KEYMAP ( \
+  KC_F1,      KC_F2,      KC_F3,       KC_F4,      KC_F5,      KC_F11,     KC_F12,     KC_F6,      KC_F7,      KC_F8,     KC_F9,    KC_F10, \
+  KC_LBRC,    KC_GRV,     KC_TILDE,    S(KC_1),    XXXXXXX,    XXXXXXX,    XXXXXXX,    XXXXXXX,    KC_HOME,    KC_PGUP,   XXXXXXX,  KC_RBRC, \
+  S(KC_LBRC), _______,    _______,     _______,    _______,    XXXXXXX,    XXXXXXX,    KC_LEFT,    _______,    KC_UP,     KC_RIGHT, S(KC_RBRC), \
+  KC_BSLS,    KC_PIPE,    XXXXXXX,     XXXXXXX,    XXXXXXX,    KC_ESC,     KC_ESC,     XXXXXXX,    KC_END,     KC_PGDOWN, KC_QUES,  KC_SLASH \
+)
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+  [FLOCK] = ACTION_LAYER_TAP_KEY(FLOCK,KC_F),
+  [JLOCK] = ACTION_LAYER_TAP_KEY(JLOCK,KC_J)
+};
+#ifdef TAP_DANCE_ENABLE
+void tap_1(qk_tap_dance_state_t *state, void *user_data) {
+  switch (state->count) {
+  case 1:
+    register_code (KC_1);
+    unregister_code (KC_1);
+    break;
+  case 2:
+    register_code (KC_ESC);
+    unregister_code (KC_ESC);
+    break;
+  case 3:
+    register_code (KC_LSFT);
+    register_code (KC_1);
+    unregister_code (KC_1);
+    unregister_code (KC_LSFT);
+  }
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+       [0]  = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_ESC),
+  [1]  = ACTION_TAP_DANCE_FN(tap_1)
+};
+#endif
diff --git a/keyboards/lets_split/keymaps/adam/makefile b/keyboards/lets_split/keymaps/adam/makefile
new file mode 100644 (file)
index 0000000..e5ddcae
--- /dev/null
@@ -0,0 +1 @@
+TAP_DANCE_ENABLE = yes
index fcf3cde7580ee3111edbd51e7cb5646462bd8f9d..1ef65c52b644609e7fbbe2b465f53846e5ecb598 100644 (file)
@@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   //,----+----+----+----+----+----.    ,----+----+----+----+----+----.
      TAB ,QUOT,COMM,DOT , P  , Y  ,      F  , G  , C  , R  , L  ,MINS,
   //|----+----+----+----+----+----|    |----+----+----+----+----+----|
-      X0 , A  , O  , E  , U  , I  ,      D  , H  , R  , N  , S  ,SLSH,
+      X0 , A  , O  , E  , U  , I  ,      D  , H  , T  , N  , S  ,SLSH,
   //|----+----+----+----+----+----|    |----+----+----+----+----+----|
      LSFT,SCLN, Q  , J  , K  , X  ,      B  , M  , W  , V  , Z  , X4 ,
   //|----+----+----+----+----+----|    |----+----+----+----+----+----|
@@ -138,7 +138,7 @@ float tone_dvorak[][2]     = SONG(DVORAK_SOUND);
 float tone_colemak[][2]    = SONG(COLEMAK_SOUND);
 #endif
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -150,7 +150,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
@@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index 0d2d94b67260497ea07446db5cac2aa5dab8af26..936312b2e032a911f2e201c0ab1159bb62398536 100644 (file)
@@ -147,7 +147,7 @@ float tone_dvorak[][2]     = SONG(DVORAK_SOUND);
 float tone_colemak[][2]    = SONG(COLEMAK_SOUND);
 #endif
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
@@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index 0d2d94b67260497ea07446db5cac2aa5dab8af26..936312b2e032a911f2e201c0ab1159bb62398536 100644 (file)
@@ -147,7 +147,7 @@ float tone_dvorak[][2]     = SONG(DVORAK_SOUND);
 float tone_colemak[][2]    = SONG(COLEMAK_SOUND);
 #endif
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -168,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
@@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index c4bdb7ebc461a6a22edf04106904a063ed33f4c6..18d409f089c8bdf3ffdc93205bfe3c9af3789e96 100644 (file)
@@ -152,7 +152,7 @@ float tone_dvorak[][2]     = SONG(DVORAK_SOUND);
 float tone_colemak[][2]    = SONG(COLEMAK_SOUND);
 #endif
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -164,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -173,7 +173,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
@@ -182,7 +182,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index 216e946964f3e7ee7a49927d044272df6f452056..45edf78c872c6088f5124e2089a4d4055015cee1 100644 (file)
@@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -150,19 +150,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   switch (keycode) {
     case QWERTY:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
     case COLEMAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
     case DVORAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index 79860ea35d5cbd9b1613812c7326e180afaa1d20..43eff99e71c2d37944f785548722e09c4c98aa29 100644 (file)
@@ -78,7 +78,7 @@ CUSTOM_MATRIX = yes
 avrdude: build
        ls /dev/tty* > /tmp/1; \
        echo "Reset your Pro Micro now"; \
-       while [[ -z $$USB ]]; do \
+       while [ -z $$USB ]; do \
          sleep 1; \
          ls /dev/tty* > /tmp/2; \
          USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
diff --git a/keyboards/m10a/Makefile b/keyboards/m10a/Makefile
new file mode 100644 (file)
index 0000000..4e2a6f0
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
\ No newline at end of file
diff --git a/keyboards/m10a/config.h b/keyboards/m10a/config.h
new file mode 100644 (file)
index 0000000..f052ab6
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0xFEED
+#define PRODUCT_ID      0x0007
+#define DEVICE_VER             0x0001
+#define MANUFACTURER    Machine Industries
+#define PRODUCT         M10-A
+#define DESCRIPTION     RAMA x Machine Industries M10-A
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 3
+
+/* Planck PCB default pin-out */
+#define MATRIX_ROW_PINS { B6, F7, F6, D6 }
+#define MATRIX_COL_PINS { F5, F1, F0 }
+#define UNUSED_PINS
+
+#define BACKLIGHT_PIN B7
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 6
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/*
+ * Feature disable options
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/m10a/keymaps/default/Makefile b/keyboards/m10a/keymaps/default/Makefile
new file mode 100644 (file)
index 0000000..457a3d0
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/m10a/keymaps/default/keymap.c b/keyboards/m10a/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..97434a4
--- /dev/null
@@ -0,0 +1,49 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include "m10a.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+
+enum layers {
+  _LAYER0,
+  _LAYER1,
+  _LAYER2,
+  _LAYER3,
+  _LAYER4,
+  _LAYER5,
+  _LAYER6,
+  _LAYER7,
+  _LAYER8,
+  _LAYER9
+};
+
+// // Fillers to make layering more clear
+// #define _______ KC_TRNS
+// #define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  [_LAYER0] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER1] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER2] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER3] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER4] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER5] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER6] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER7] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER8] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
+  [_LAYER9] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}}
+};
+
+void matrix_init_user(void) {
+  #ifdef BACKLIGHT_ENABLE
+    backlight_level(0);
+  #endif
+}
diff --git a/keyboards/m10a/m10a.c b/keyboards/m10a/m10a.c
new file mode 100644 (file)
index 0000000..9cc7f06
--- /dev/null
@@ -0,0 +1,5 @@
+#include "m10a.h"
+
+void matrix_init_kb(void) {
+       matrix_init_user();
+}
\ No newline at end of file
diff --git a/keyboards/m10a/m10a.h b/keyboards/m10a/m10a.h
new file mode 100644 (file)
index 0000000..6ec334f
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef M10A_H
+#define M10A_H
+
+#include "quantum.h"
+
+#define M10A( \
+      k00, k01, k02, \
+      k10, k11, k12, \
+      k20, k21, k22, \
+      k30, k31, k32  \
+) \
+{ \
+    { k00, k01, k02 }, \
+    { k10, k11, k12 }, \
+    { k20, k21, k22 }, \
+    { k30, k31, k32 } \
+} 
+
+#endif
diff --git a/keyboards/m10a/rules.mk b/keyboards/m10a/rules.mk
new file mode 100644 (file)
index 0000000..f5a785d
--- /dev/null
@@ -0,0 +1,68 @@
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# Build Options
+#   change to "no" to disable the options, or define them in the Makefile in 
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE ?= no       # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes       # Audio control and System control(+450)
+CONSOLE_ENABLE ?= no         # Console for debug(+400)
+COMMAND_ENABLE ?= no        # Commands for debug and configuration
+NKRO_ENABLE ?= yes            # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE ?= yes      # Enable keyboard backlight functionality
+MIDI_ENABLE ?= no            # MIDI controls
+AUDIO_ENABLE ?= no           # Audio output on port C6
+UNICODE_ENABLE ?= yes         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE ?= no        # Enable WS2812 RGB underlight.
+API_SYSEX_ENABLE = yes
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no    # Breathing sleep LED during USB suspend
diff --git a/keyboards/mechmini/Makefile b/keyboards/mechmini/Makefile
new file mode 100644 (file)
index 0000000..57b2ef6
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
diff --git a/keyboards/mechmini/README.md b/keyboards/mechmini/README.md
new file mode 100644 (file)
index 0000000..7274331
--- /dev/null
@@ -0,0 +1,56 @@
+mechmini keyboard firmware
+==========================
+
+This is a port of the QMK firmware for boards that are based on the
+ps2avrGB firmware, like the [ps2avrGB
+keyboard](https://www.keyclack.com/product/gb-ps2avrgb/) or the ones sold
+by [Winkeyless](http://winkeyless.kr/product/ps2avrgb-parts/).
+
+Note that this is a complete replacement for the firmware, so you won't be
+using Bootmapper Client to change any keyboard settings, since not all the
+USB report options are supported.
+
+
+## Installing
+
+First, install the requirements. These commands are for OSX, but all you
+need is the AVR toolchain and `bootloadHID` for flashing:
+
+```
+$ brew cask install crosspack-avr
+$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+```
+
+In order to use the `./program` script, which can reboot the board into
+the bootloader, you'll need Python 2 with PyUSB installed:
+
+```
+$ pip install pyusb
+```
+
+Then, with the keyboard plugged in, simply run this command from the
+`qmk_firmware` directory:
+
+```
+$ make mechmini-program
+```
+
+If you prefer, you can just build it and flash the firmware directly with
+`bootloadHID` if you boot the board while holding down `L_Ctrl` to keep it
+in the bootloader:
+
+```
+$ make mechmini
+$ bootloadHID -r mechmini_default.hex
+```
+
+## Troubleshooting
+
+From my experience, it's really hard to brick these boards. But these
+tricks have been useful when it got stuck in a weird scenario.
+
+1. Try plugging the board in while pressing `L_Ctrl`. This will force it
+   to boot only the bootloader without loading the firmware. Once this is
+   done, just reflash the board with the original firmware.
+2. Sometimes USB hubs can act weird, so try connecting the board directly
+   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 (file)
index 0000000..ecd50ca
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#define VENDOR_ID       0x20A0
+#define PRODUCT_ID      0x422D
+// TODO: share these strings with usbconfig.h
+// Edit usbconfig.h to change these.
+#define MANUFACTURER    winkeyless.kr
+#define PRODUCT         mechmini
+
+/* matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 15
+
+#define NO_UART 1
+#define BOOTLOADHID_BOOTLOADER 1
+
+/* key combination for command */
+#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+#endif
diff --git a/keyboards/mechmini/keymaps/default/keymap.c b/keyboards/mechmini/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..786132f
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "mechmini.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    KEYMAP(
+        TAB,  Q,    W,    E,    R,    T,    Y,    U,   I,    O,    P,    BSLS,
+        LCTL, A,    S,    D,    F,    G,    H,    J,   K,    L,    SCLN,
+        LSFT, Z,    X,    C,    V,    B,    N,    M,   COMM, DOT,  SLSH,
+        GRV,  LALT, LGUI,       SPC,        ENT,       RGUI, RALT, RCTL
+    )
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+};
diff --git a/keyboards/mechmini/matrix.c b/keyboards/mechmini/matrix.c
new file mode 100644 (file)
index 0000000..beaa54c
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <avr/io.h>
+#include <util/delay.h>
+
+#include "matrix.h"
+
+#ifndef DEBOUNCE
+#   define DEBOUNCE    5
+#endif
+
+static uint8_t debouncing = DEBOUNCE;
+
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
+void matrix_init(void) {
+    // all outputs for rows high
+    DDRB = 0xFF;
+    PORTB = 0xFF;
+    // all inputs for columns
+    DDRA = 0x00;
+    DDRC &= ~(0x111111<<2);
+    DDRD &= ~(1<<PIND7);
+    // all columns are pulled-up
+    PORTA = 0xFF;
+    PORTC |= (0b111111<<2);
+    PORTD |= (1<<PIND7);
+
+    // initialize matrix state: all keys off
+    for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+        matrix[row] = 0x00;
+        matrix_debouncing[row] = 0x00;
+    }
+}
+
+void matrix_set_row_status(uint8_t row) {
+    DDRB = (1 << row);
+    PORTB = ~(1 << row);
+}
+
+uint8_t bit_reverse(uint8_t x) {
+    x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
+    x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
+    x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
+    return x;
+}
+
+uint8_t matrix_scan(void) {
+    for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+        matrix_set_row_status(row);
+        _delay_us(5);
+
+        matrix_row_t cols = (
+            // cols 0..7, PORTA 0 -> 7
+            (~PINA) & 0xFF
+        ) | (
+            // cols 8..13, PORTC 7 -> 0
+            bit_reverse((~PINC) & 0xFF) << 8
+        ) | (
+            // col 14, PORTD 7
+            ((~PIND) & (1 << PIND7)) << 7
+        );
+
+        if (matrix_debouncing[row] != cols) {
+            matrix_debouncing[row] = cols;
+            debouncing = DEBOUNCE;
+        }
+    }
+
+    if (debouncing) {
+        if (--debouncing) {
+            _delay_ms(1);
+        } else {
+            for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+                matrix[i] = matrix_debouncing[i];
+            }
+        }
+    }
+
+    return 1;
+}
+
+inline matrix_row_t matrix_get_row(uint8_t row) {
+    return matrix[row];
+}
+
+void matrix_print(void) {
+}
diff --git a/keyboards/mechmini/mechmini.c b/keyboards/mechmini/mechmini.c
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/keyboards/mechmini/mechmini.h b/keyboards/mechmini/mechmini.h
new file mode 100644 (file)
index 0000000..4dc1e88
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef KEYMAP_COMMON_H
+#define KEYMAP_COMMON_H
+
+#include "keycode.h"
+#include "action.h"
+
+#define KEYMAP( \
+    K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, \
+    K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, \
+    K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, \
+    K00, K10, K20,      K56,      K57,      KB0, KC0, K66  \
+) \
+{ \
+    { 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 }, \
+    { 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 }, \
+    { 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 }, \
+    { 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 }, \
+    { 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 }, \
+    { 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 }, \
+    { 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 }, \
+    { 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 } \
+}
+
+#endif
diff --git a/keyboards/mechmini/program b/keyboards/mechmini/program
new file mode 100644 (file)
index 0000000..a88d9cd
--- /dev/null
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import print_function
+
+import os
+import sys
+import time
+import usb
+
+if len(sys.argv) < 2:
+    print('Usage: %s <firmware.hex>' % sys.argv[0])
+    sys.exit(1)
+
+print('Searching for ps2avrGB... ', end='')
+
+dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D)
+if dev is None:
+    raise ValueError('Device not found')
+
+print('Found', end='\n\n')
+
+print('Device Information:')
+print('  idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
+print('  idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
+print('Manufacturer: %s' % (dev.iManufacturer))
+print('Serial: %s' % (dev.iSerialNumber))
+print('Product: %s' % (dev.iProduct), end='\n\n')
+
+print('Transferring control to bootloader... ', end='')
+
+dev.set_configuration()
+
+request_type = usb.util.build_request_type(
+        usb.util.CTRL_OUT,
+        usb.util.CTRL_TYPE_CLASS,
+        usb.util.CTRL_RECIPIENT_DEVICE)
+
+USBRQ_HID_SET_REPORT = 0x09
+HID_REPORT_OPTION = 0x0301
+
+
+try:
+    dev.ctrl_transfer(
+            request_type,
+            USBRQ_HID_SET_REPORT,
+            HID_REPORT_OPTION,
+            0,
+            [0, 0, 0xFF] + [0] * 5
+            )
+except usb.core.USBError:
+    # for some reason I keep getting USBError, but it works!
+    pass
+
+# wait a bit until bootloader starts up
+time.sleep(2)
+
+print('OK')
+print('Programming...')
+if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0:
+    print('\nDone!')
diff --git a/keyboards/mechmini/rules.mk b/keyboards/mechmini/rules.mk
new file mode 100644 (file)
index 0000000..26dfe36
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# MCU name
+MCU = atmega32a
+PROTOCOL = VUSB
+
+# unsupported features for now
+NO_UART = yes
+NO_SUSPEND_POWER_DOWN = yes
+BACKLIGHT_ENABLE = no
+
+# processor frequency
+F_CPU = 12000000
+
+# build options
+BOOTMAGIC_ENABLE = yes
+MOUSEKEY_ENABLE = yes
+EXTRAKEY_ENABLE = yes
+CONSOLE_ENABLE = yes
+COMMAND_ENABLE = yes
+
+OPT_DEFS = -DDEBUG_LEVEL=0
+OPT_DEFS += -DBOOTLOADER_SIZE=2048
+
+# custom matrix setup
+CUSTOM_MATRIX = yes
+SRC = matrix.c
+
+# programming options
+PROGRAM_CMD = ./keyboards/mechmini/program $(TARGET).hex
diff --git a/keyboards/mechmini/usbconfig.h b/keyboards/mechmini/usbconfig.h
new file mode 100644 (file)
index 0000000..d2d848f
--- /dev/null
@@ -0,0 +1,396 @@
+/* Name: usbconfig.h
+ * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
+ * Author: Christian Starkjohann
+ * Creation Date: 2005-04-01
+ * Tabsize: 4
+ * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
+ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
+ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
+ */
+
+#ifndef __usbconfig_h_included__
+#define __usbconfig_h_included__
+
+#include "config.h"
+
+/*
+General Description:
+This file is an example configuration (with inline documentation) for the USB
+driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is
+also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may
+wire the lines to any other port, as long as D+ is also wired to INT0 (or any
+other hardware interrupt, as long as it is the highest level interrupt, see
+section at the end of this file).
+*/
+
+/* ---------------------------- Hardware Config ---------------------------- */
+
+#define USB_CFG_IOPORTNAME      D
+/* This is the port where the USB bus is connected. When you configure it to
+ * "B", the registers PORTB, PINB and DDRB will be used.
+ */
+#define USB_CFG_DMINUS_BIT      3
+/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
+ * This may be any bit in the port.
+ */
+#define USB_CFG_DPLUS_BIT       2
+/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
+ * This may be any bit in the port. Please note that D+ must also be connected
+ * to interrupt pin INT0! [You can also use other interrupts, see section
+ * "Optional MCU Description" below, or you can connect D- to the interrupt, as
+ * it is required if you use the USB_COUNT_SOF feature. If you use D- for the
+ * interrupt, the USB interrupt will also be triggered at Start-Of-Frame
+ * markers every millisecond.]
+ */
+#define USB_CFG_CLOCK_KHZ       (F_CPU/1000)
+/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000,
+ * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code
+ * require no crystal, they tolerate +/- 1% deviation from the nominal
+ * frequency. All other rates require a precision of 2000 ppm and thus a
+ * crystal!
+ * Since F_CPU should be defined to your actual clock rate anyway, you should
+ * not need to modify this setting.
+ */
+#define USB_CFG_CHECK_CRC       0
+/* Define this to 1 if you want that the driver checks integrity of incoming
+ * data packets (CRC checks). CRC checks cost quite a bit of code size and are
+ * currently only available for 18 MHz crystal clock. You must choose
+ * USB_CFG_CLOCK_KHZ = 18000 if you enable this option.
+ */
+
+/* ----------------------- Optional Hardware Config ------------------------ */
+
+/* #define USB_CFG_PULLUP_IOPORTNAME   D */
+/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
+ * V+, you can connect and disconnect the device from firmware by calling
+ * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
+ * This constant defines the port on which the pullup resistor is connected.
+ */
+/* #define USB_CFG_PULLUP_BIT          4 */
+/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
+ * above) where the 1.5k pullup resistor is connected. See description
+ * above for details.
+ */
+
+/* --------------------------- Functional Range ---------------------------- */
+
+#define USB_CFG_HAVE_INTRIN_ENDPOINT    1
+/* Define this to 1 if you want to compile a version with two endpoints: The
+ * default control endpoint 0 and an interrupt-in endpoint (any other endpoint
+ * number).
+ */
+#define USB_CFG_HAVE_INTRIN_ENDPOINT3   1
+/* Define this to 1 if you want to compile a version with three endpoints: The
+ * default control endpoint 0, an interrupt-in endpoint 3 (or the number
+ * configured below) and a catch-all default interrupt-in endpoint as above.
+ * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
+ */
+#define USB_CFG_EP3_NUMBER              3
+/* If the so-called endpoint 3 is used, it can now be configured to any other
+ * endpoint number (except 0) with this macro. Default if undefined is 3.
+ */
+/* #define USB_INITIAL_DATATOKEN           USBPID_DATA1 */
+/* The above macro defines the startup condition for data toggling on the
+ * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
+ * Since the token is toggled BEFORE sending any data, the first packet is
+ * sent with the oposite value of this configuration!
+ */
+#define USB_CFG_IMPLEMENT_HALT          0
+/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
+ * for endpoint 1 (interrupt endpoint). Although you may not need this feature,
+ * it is required by the standard. We have made it a config option because it
+ * bloats the code considerably.
+ */
+#define USB_CFG_SUPPRESS_INTR_CODE      0
+/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
+ * want to send any data over them. If this macro is defined to 1, functions
+ * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
+ * you need the interrupt-in endpoints in order to comply to an interface
+ * (e.g. HID), but never want to send any data. This option saves a couple
+ * of bytes in flash memory and the transmit buffers in RAM.
+ */
+#define USB_CFG_INTR_POLL_INTERVAL      1
+/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
+ * interval. The value is in milliseconds and must not be less than 10 ms for
+ * low speed devices.
+ */
+#define USB_CFG_IS_SELF_POWERED         0
+/* Define this to 1 if the device has its own power supply. Set it to 0 if the
+ * device is powered from the USB bus.
+ */
+#define USB_CFG_MAX_BUS_POWER           500
+/* Set this variable to the maximum USB bus power consumption of your device.
+ * The value is in milliamperes. [It will be divided by two since USB
+ * communicates power requirements in units of 2 mA.]
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITE      1
+/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
+ * transfers. Set it to 0 if you don't need it and want to save a couple of
+ * bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_READ       0
+/* Set this to 1 if you need to send control replies which are generated
+ * "on the fly" when usbFunctionRead() is called. If you only want to send
+ * data from a static buffer, set it to 0 and return the data from
+ * usbFunctionSetup(). This saves a couple of bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITEOUT   0
+/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
+ * You must implement the function usbFunctionWriteOut() which receives all
+ * interrupt/bulk data sent to any endpoint other than 0. The endpoint number
+ * can be found in 'usbRxToken'.
+ */
+#define USB_CFG_HAVE_FLOWCONTROL        0
+/* Define this to 1 if you want flowcontrol over USB data. See the definition
+ * of the macros usbDisableAllRequests() and usbEnableAllRequests() in
+ * usbdrv.h.
+ */
+#define USB_CFG_DRIVER_FLASH_PAGE       0
+/* If the device has more than 64 kBytes of flash, define this to the 64 k page
+ * where the driver's constants (descriptors) are located. Or in other words:
+ * Define this to 1 for boot loaders on the ATMega128.
+ */
+#define USB_CFG_LONG_TRANSFERS          0
+/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
+ * in a single control-in or control-out transfer. Note that the capability
+ * for long transfers increases the driver size.
+ */
+/* #define USB_RX_USER_HOOK(data, len)     if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
+/* This macro is a hook if you want to do unconventional things. If it is
+ * defined, it's inserted at the beginning of received message processing.
+ * If you eat the received message and don't want default processing to
+ * proceed, do a return after doing your things. One possible application
+ * (besides debugging) is to flash a status LED on each packet.
+ */
+/* #define USB_RESET_HOOK(resetStarts)     if(!resetStarts){hadUsbReset();} */
+/* This macro is a hook if you need to know when an USB RESET occurs. It has
+ * one parameter which distinguishes between the start of RESET state and its
+ * end.
+ */
+/* #define USB_SET_ADDRESS_HOOK()              hadAddressAssigned(); */
+/* This macro (if defined) is executed when a USB SET_ADDRESS request was
+ * received.
+ */
+#define USB_COUNT_SOF                   1
+/* define this macro to 1 if you need the global variable "usbSofCount" which
+ * counts SOF packets. This feature requires that the hardware interrupt is
+ * connected to D- instead of D+.
+ */
+/* #ifdef __ASSEMBLER__
+ * macro myAssemblerMacro
+ *     in      YL, TCNT0
+ *     sts     timer0Snapshot, YL
+ *     endm
+ * #endif
+ * #define USB_SOF_HOOK                    myAssemblerMacro
+ * This macro (if defined) is executed in the assembler module when a
+ * Start Of Frame condition is detected. It is recommended to define it to
+ * the name of an assembler macro which is defined here as well so that more
+ * than one assembler instruction can be used. The macro may use the register
+ * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
+ * immediately after an SOF pulse may be lost and must be retried by the host.
+ * What can you do with this hook? Since the SOF signal occurs exactly every
+ * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
+ * designs running on the internal RC oscillator.
+ * Please note that Start Of Frame detection works only if D- is wired to the
+ * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
+ */
+#define USB_CFG_CHECK_DATA_TOGGLING     0
+/* define this macro to 1 if you want to filter out duplicate data packets
+ * sent by the host. Duplicates occur only as a consequence of communication
+ * errors, when the host does not receive an ACK. Please note that you need to
+ * implement the filtering yourself in usbFunctionWriteOut() and
+ * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
+ * for each control- and out-endpoint to check for duplicate packets.
+ */
+#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH   0
+/* define this macro to 1 if you want the function usbMeasureFrameLength()
+ * compiled in. This function can be used to calibrate the AVR's RC oscillator.
+ */
+#define USB_USE_FAST_CRC                0
+/* The assembler module has two implementations for the CRC algorithm. One is
+ * faster, the other is smaller. This CRC routine is only used for transmitted
+ * messages where timing is not critical. The faster routine needs 31 cycles
+ * per byte while the smaller one needs 61 to 69 cycles. The faster routine
+ * may be worth the 32 bytes bigger code size if you transmit lots of data and
+ * run the AVR close to its limit.
+ */
+
+/* -------------------------- Device Description --------------------------- */
+
+#define USB_CFG_VENDOR_ID       (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF)
+/* USB vendor ID for the device, low byte first. If you have registered your
+ * own Vendor ID, define it here. Otherwise you may use one of obdev's free
+ * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc.  Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_ID       (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF)
+/* This is the ID of the product, low byte first. It is interpreted in the
+ * scope of the vendor ID. If you have registered your own VID with usb.org
+ * or if you have licensed a PID from somebody else, define it here. Otherwise
+ * you may use one of obdev's free shared VID/PID pairs. See the file
+ * USB-IDs-for-free.txt for details!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc.  Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_VERSION  0x00, 0x02
+/* Version number of the device: Minor number first, then major number.
+ */
+#define USB_CFG_VENDOR_NAME     'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r'
+#define USB_CFG_VENDOR_NAME_LEN 13
+/* These two values define the vendor name returned by the USB device. The name
+ * must be given as a list of characters under single quotes. The characters
+ * are interpreted as Unicode (UTF-16) entities.
+ * If you don't want a vendor name string, undefine these macros.
+ * ALWAYS define a vendor name containing your Internet domain name if you use
+ * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
+ * details.
+ */
+#define USB_CFG_DEVICE_NAME     'p', 's', '2', 'a', 'v', 'r', 'G', 'B'
+#define USB_CFG_DEVICE_NAME_LEN 8
+/* Same as above for the device name. If you don't want a device name, undefine
+ * the macros. See the file USB-IDs-for-free.txt before you assign a name if
+ * you use a shared VID/PID.
+ */
+/*#define USB_CFG_SERIAL_NUMBER   'N', 'o', 'n', 'e' */
+/*#define USB_CFG_SERIAL_NUMBER_LEN   0 */
+/* Same as above for the serial number. If you don't want a serial number,
+ * undefine the macros.
+ * It may be useful to provide the serial number through other means than at
+ * compile time. See the section about descriptor properties below for how
+ * to fine tune control over USB descriptors such as the string descriptor
+ * for the serial number.
+ */
+#define USB_CFG_DEVICE_CLASS        0
+#define USB_CFG_DEVICE_SUBCLASS     0
+/* See USB specification if you want to conform to an existing device class.
+ * Class 0xff is "vendor specific".
+ */
+#define USB_CFG_INTERFACE_CLASS     3   /* HID */
+#define USB_CFG_INTERFACE_SUBCLASS  1   /* Boot */
+#define USB_CFG_INTERFACE_PROTOCOL  1   /* Keyboard */
+/* See USB specification if you want to conform to an existing device class or
+ * protocol. The following classes must be set at interface level:
+ * HID class is 3, no subclass and protocol required (but may be useful!)
+ * CDC class is 2, use subclass 2 and protocol 1 for ACM
+ */
+#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH    0
+/* Define this to the length of the HID report descriptor, if you implement
+ * an HID device. Otherwise don't define it or define it to 0.
+ * If you use this define, you must add a PROGMEM character array named
+ * "usbHidReportDescriptor" to your code which contains the report descriptor.
+ * Don't forget to keep the array and this define in sync!
+ */
+
+/* #define USB_PUBLIC static */
+/* Use the define above if you #include usbdrv.c instead of linking against it.
+ * This technique saves a couple of bytes in flash memory.
+ */
+
+/* ------------------- Fine Control over USB Descriptors ------------------- */
+/* If you don't want to use the driver's default USB descriptors, you can
+ * provide our own. These can be provided as (1) fixed length static data in
+ * flash memory, (2) fixed length static data in RAM or (3) dynamically at
+ * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
+ * information about this function.
+ * Descriptor handling is configured through the descriptor's properties. If
+ * no properties are defined or if they are 0, the default descriptor is used.
+ * Possible properties are:
+ *   + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
+ *     at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
+ *     used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
+ *     you want RAM pointers.
+ *   + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
+ *     in static memory is in RAM, not in flash memory.
+ *   + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
+ *     the driver must know the descriptor's length. The descriptor itself is
+ *     found at the address of a well known identifier (see below).
+ * List of static descriptor names (must be declared PROGMEM if in flash):
+ *   char usbDescriptorDevice[];
+ *   char usbDescriptorConfiguration[];
+ *   char usbDescriptorHidReport[];
+ *   char usbDescriptorString0[];
+ *   int usbDescriptorStringVendor[];
+ *   int usbDescriptorStringDevice[];
+ *   int usbDescriptorStringSerialNumber[];
+ * Other descriptors can't be provided statically, they must be provided
+ * dynamically at runtime.
+ *
+ * Descriptor properties are or-ed or added together, e.g.:
+ * #define USB_CFG_DESCR_PROPS_DEVICE   (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
+ *
+ * The following descriptors are defined:
+ *   USB_CFG_DESCR_PROPS_DEVICE
+ *   USB_CFG_DESCR_PROPS_CONFIGURATION
+ *   USB_CFG_DESCR_PROPS_STRINGS
+ *   USB_CFG_DESCR_PROPS_STRING_0
+ *   USB_CFG_DESCR_PROPS_STRING_VENDOR
+ *   USB_CFG_DESCR_PROPS_STRING_PRODUCT
+ *   USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
+ *   USB_CFG_DESCR_PROPS_HID
+ *   USB_CFG_DESCR_PROPS_HID_REPORT
+ *   USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
+ *
+ * Note about string descriptors: String descriptors are not just strings, they
+ * are Unicode strings prefixed with a 2 byte header. Example:
+ * int  serialNumberDescriptor[] = {
+ *     USB_STRING_DESCRIPTOR_HEADER(6),
+ *     'S', 'e', 'r', 'i', 'a', 'l'
+ * };
+ */
+
+#define USB_CFG_DESCR_PROPS_DEVICE                  0
+#define USB_CFG_DESCR_PROPS_CONFIGURATION           USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_CONFIGURATION           0
+#define USB_CFG_DESCR_PROPS_STRINGS                 0
+#define USB_CFG_DESCR_PROPS_STRING_0                0
+#define USB_CFG_DESCR_PROPS_STRING_VENDOR           0
+#define USB_CFG_DESCR_PROPS_STRING_PRODUCT          0
+#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER    0
+#define USB_CFG_DESCR_PROPS_HID                     USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID                     0
+#define USB_CFG_DESCR_PROPS_HID_REPORT              USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID_REPORT              0
+#define USB_CFG_DESCR_PROPS_UNKNOWN                 0
+
+#define usbMsgPtr_t unsigned short
+/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
+ * a scalar type here because gcc generates slightly shorter code for scalar
+ * arithmetics than for pointer arithmetics. Remove this define for backward
+ * type compatibility or define it to an 8 bit type if you use data in RAM only
+ * and all RAM is below 256 bytes (tiny memory model in IAR CC).
+ */
+
+/* ----------------------- Optional MCU Description ------------------------ */
+
+/* The following configurations have working defaults in usbdrv.h. You
+ * usually don't need to set them explicitly. Only if you want to run
+ * the driver on a device which is not yet supported or with a compiler
+ * which is not fully supported (such as IAR C) or if you use a differnt
+ * interrupt than INT0, you may have to define some of these.
+ */
+/* #define USB_INTR_CFG            MCUCR */
+/* #define USB_INTR_CFG_SET        ((1 << ISC00) | (1 << ISC01)) */
+/* #define USB_INTR_CFG_CLR        0 */
+/* #define USB_INTR_ENABLE         GIMSK */
+/* #define USB_INTR_ENABLE_BIT     INT0 */
+/* #define USB_INTR_PENDING        GIFR */
+/* #define USB_INTR_PENDING_BIT    INTF0 */
+/* #define USB_INTR_VECTOR         INT0_vect */
+
+/* Set INT1 for D- falling edge to count SOF */
+/* #define USB_INTR_CFG            EICRA */
+#define USB_INTR_CFG_SET        ((1 << ISC11) | (0 << ISC10))
+/* #define USB_INTR_CFG_CLR        0 */
+/* #define USB_INTR_ENABLE         EIMSK */
+#define USB_INTR_ENABLE_BIT     INT1
+/* #define USB_INTR_PENDING        EIFR */
+#define USB_INTR_PENDING_BIT    INTF1
+#define USB_INTR_VECTOR         INT1_vect
+
+#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/nyquist/Makefile b/keyboards/nyquist/Makefile
new file mode 100644 (file)
index 0000000..0c519b3
--- /dev/null
@@ -0,0 +1,5 @@
+SUBPROJECT_DEFAULT = rev1
+
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
diff --git a/keyboards/nyquist/config.h b/keyboards/nyquist/config.h
new file mode 100644 (file)
index 0000000..55500df
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+Copyright 2017 Danny Nguyen <danny@hexwire.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+#ifdef SUBPROJECT_rev1
+    #include "rev1/config.h"
+#endif
+
+#endif  // CONFIG_H
diff --git a/keyboards/nyquist/i2c.c b/keyboards/nyquist/i2c.c
new file mode 100644 (file)
index 0000000..084c890
--- /dev/null
@@ -0,0 +1,162 @@
+#include <util/twi.h>
+#include <avr/io.h>
+#include <stdlib.h>
+#include <avr/interrupt.h>
+#include <util/twi.h>
+#include <stdbool.h>
+#include "i2c.h"
+
+#ifdef USE_I2C
+
+// Limits the amount of we wait for any one i2c transaction.
+// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
+// 9 bits, a single transaction will take around 90μs to complete.
+//
+// (F_CPU/SCL_CLOCK)  =>  # of μC cycles to transfer a bit
+// poll loop takes at least 8 clock cycles to execute
+#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
+
+#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
+
+volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
+
+static volatile uint8_t slave_buffer_pos;
+static volatile bool slave_has_register_set = false;
+
+// Wait for an i2c operation to finish
+inline static
+void i2c_delay(void) {
+  uint16_t lim = 0;
+  while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
+    lim++;
+
+  // easier way, but will wait slightly longer
+  // _delay_us(100);
+}
+
+// Setup twi to run at 100kHz
+void i2c_master_init(void) {
+  // no prescaler
+  TWSR = 0;
+  // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.
+  // Check datasheets for more info.
+  TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
+}
+
+// Start a transaction with the given i2c slave address. The direction of the
+// transfer is set with I2C_READ and I2C_WRITE.
+// returns: 0 => success
+//          1 => error
+uint8_t i2c_master_start(uint8_t address) {
+  TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);
+
+  i2c_delay();
+
+  // check that we started successfully
+  if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
+    return 1;
+
+  TWDR = address;
+  TWCR = (1<<TWINT) | (1<<TWEN);
+
+  i2c_delay();
+
+  if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
+    return 1; // slave did not acknowledge
+  else
+    return 0; // success
+}
+
+
+// Finish the i2c transaction.
+void i2c_master_stop(void) {
+  TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
+
+  uint16_t lim = 0;
+  while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)
+    lim++;
+}
+
+// Write one byte to the i2c slave.
+// returns 0 => slave ACK
+//         1 => slave NACK
+uint8_t i2c_master_write(uint8_t data) {
+  TWDR = data;
+  TWCR = (1<<TWINT) | (1<<TWEN);
+
+  i2c_delay();
+
+  // check if the slave acknowledged us
+  return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
+}
+
+// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,
+// if ack=0 the acknowledge bit is not set.
+// returns: byte read from i2c device
+uint8_t i2c_master_read(int ack) {
+  TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);
+
+  i2c_delay();
+  return TWDR;
+}
+
+void i2c_reset_state(void) {
+  TWCR = 0;
+}
+
+void i2c_slave_init(uint8_t address) {
+  TWAR = address << 0; // slave i2c address
+  // TWEN  - twi enable
+  // TWEA  - enable address acknowledgement
+  // TWINT - twi interrupt flag
+  // TWIE  - enable the twi interrupt
+  TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
+}
+
+ISR(TWI_vect);
+
+ISR(TWI_vect) {
+  uint8_t ack = 1;
+  switch(TW_STATUS) {
+    case TW_SR_SLA_ACK:
+      // this device has been addressed as a slave receiver
+      slave_has_register_set = false;
+      break;
+
+    case TW_SR_DATA_ACK:
+      // this device has received data as a slave receiver
+      // The first byte that we receive in this transaction sets the location
+      // of the read/write location of the slaves memory that it exposes over
+      // i2c.  After that, bytes will be written at slave_buffer_pos, incrementing
+      // slave_buffer_pos after each write.
+      if(!slave_has_register_set) {
+        slave_buffer_pos = TWDR;
+        // don't acknowledge the master if this memory loctaion is out of bounds
+        if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {
+          ack = 0;
+          slave_buffer_pos = 0;
+        }
+        slave_has_register_set = true;
+      } else {
+        i2c_slave_buffer[slave_buffer_pos] = TWDR;
+        BUFFER_POS_INC();
+      }
+      break;
+
+    case TW_ST_SLA_ACK:
+    case TW_ST_DATA_ACK:
+      // master has addressed this device as a slave transmitter and is
+      // requesting data.
+      TWDR = i2c_slave_buffer[slave_buffer_pos];
+      BUFFER_POS_INC();
+      break;
+
+    case TW_BUS_ERROR: // something went wrong, reset twi state
+      TWCR = 0;
+    default:
+      break;
+  }
+  // Reset everything, so we are ready for the next TWI interrupt
+  TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
+}
+#endif
diff --git a/keyboards/nyquist/i2c.h b/keyboards/nyquist/i2c.h
new file mode 100644 (file)
index 0000000..43e5969
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef I2C_H
+#define I2C_H
+
+#include <stdint.h>
+
+#ifndef F_CPU
+#define F_CPU 16000000UL
+#endif
+
+#define I2C_READ 1
+#define I2C_WRITE 0
+
+#define I2C_ACK 1
+#define I2C_NACK 0
+
+#define SLAVE_BUFFER_SIZE 0x10
+
+// i2c SCL clock frequency
+#define SCL_CLOCK  100000L
+
+extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
+
+void i2c_master_init(void);
+uint8_t i2c_master_start(uint8_t address);
+void i2c_master_stop(void);
+uint8_t i2c_master_write(uint8_t data);
+uint8_t i2c_master_read(int);
+void i2c_reset_state(void);
+void i2c_slave_init(uint8_t address);
+
+
+static inline unsigned char i2c_start_read(unsigned char addr) {
+  return i2c_master_start((addr << 1) | I2C_READ);
+}
+
+static inline unsigned char i2c_start_write(unsigned char addr) {
+  return i2c_master_start((addr << 1) | I2C_WRITE);
+}
+
+// from SSD1306 scrips
+extern unsigned char i2c_rep_start(unsigned char addr);
+extern void i2c_start_wait(unsigned char addr);
+extern unsigned char i2c_readAck(void);
+extern unsigned char i2c_readNak(void);
+extern unsigned char i2c_read(unsigned char ack);
+
+#define i2c_read(ack)  (ack) ? i2c_readAck() : i2c_readNak();
+
+#endif
diff --git a/keyboards/nyquist/keymaps/hexwire/Makefile b/keyboards/nyquist/keymaps/hexwire/Makefile
new file mode 100644 (file)
index 0000000..1e57612
--- /dev/null
@@ -0,0 +1,5 @@
+RGBLIGHT_ENABLE = yes
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/nyquist/keymaps/hexwire/README.md b/keyboards/nyquist/keymaps/hexwire/README.md
new file mode 100644 (file)
index 0000000..3ce3f6a
--- /dev/null
@@ -0,0 +1,116 @@
+Hexwire's Nyquist Layout
+============================
+
+### Changes from default layout
+
+- Main layer
+    - The right space bar key has been changed to backspace, as I only hit space with my left thumb
+    - Backtick is at the lower right and also serves goes to the 3rd function layer when held
+    - Enter key acts as shift when held
+    - Escape key acts as control when held
+    - Minus key at upper right
+- Lower layer
+    - Numbers are on the lower layer, to make it easier to use a numpad on the right hand
+    - Arrow keys
+    - Straight and curly brackets in the middle two columns
+    - Screenshot keys for MacOS
+- Upper layer
+    - Symbols are on the upper layer
+    - Media keys
+    - Page Up/Down, Home/End
+- 3rd function layer
+    - Function keys
+
+## Layouts
+
+### QWERTY
+
+```
+,----+----+----+----+----+----.    ,----+----+----+----+----+----.
+|ESC , 1  , 2  , 3  , 4  , 5  ,      6  , 7  , 8  , 9  , 0  ,BSPC|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|TAB , Q  , W  , E  , R  , T  ,      Y  , U  , I  , O  , P  ,MINS|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+| X0 , A  , S  , D  , F  , G  ,      H  , J  , K  , L  ,SCLN,QUOT|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|LSFT, Z  , X  , C  , V  , B  ,      N  , M  ,COMM,DOT ,SLSH, X4 |
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+| X3 ,LCTL,LALT,LGUI, X1 ,SPC ,     BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
+`----+----+----+----+----+----'    `----+----+----+----+----+----'
+```
+
+### Colemak
+```
+,----+----+----+----+----+----.    ,----+----+----+----+----+----.
+|ESC , 1  , 2  , 3  , 4  , 5  ,      6  , 7  , 8  , 9  , 0  ,BSPC|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|TAB , Q  , W  , F  , P  , G  ,      J  , L  , U  , Y  ,SCLN,MINS|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+| X0 , A  , R  , S  , T  , D  ,      H  , N  , E  , I  , O  ,QUOT|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|LSFT, Z  , X  , C  , V  , B  ,      K  , M  ,COMM,DOT ,SLSH, X4 |
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+| X3 ,LCTL,LALT,LGUI, X1 ,SPC ,     BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
+`----+----+----+----+----+----'    `----+----+----+----+----+----'
+```
+
+### Dvorak
+```
+,----+----+----+----+----+----.    ,----+----+----+----+----+----.
+|ESC , 1  , 2  , 3  , 4  , 5  ,      6  , 7  , 8  , 9  , 0  ,BSPC|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|TAB ,QUOT,COMM,DOT , P  , Y  ,      F  , G  , C  , R  , L  ,MINS|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+| X0 , A  , O  , E  , U  , I  ,      D  , H  , T  , N  , S  ,SLSH|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|LSFT,SCLN, Q  , J  , K  , X  ,      B  , M  , W  , V  , Z  , X4 |
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+| X3 ,LCTL,LALT,LGUI, X1 ,SPC ,     BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
+`----+----+----+----+----+----'    `----+----+----+----+----+----'
+```
+
+### Lower
+```
+,----+----+----+----+----+----.    ,----+----+----+----+----+----.
+|TILD,EXLM, AT ,HASH,DLR ,PERC,     CIRC,AMPR,ASTR,LPRN,RPRN,BSPC|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|    , 1  , 2  , 3  , 4  , 5  ,      6  , 7  , 8  , 9  , 0  ,    |
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|DEL ,CAPP,LEFT,RGHT, UP ,LBRC,     RBRC, P4 , P5 , P6 ,PLUS,PIPE|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|    ,CPYP,    ,    ,DOWN,LCBR,     RCBR, P1 , P2 , P3 ,MINS,    |
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|    ,    ,    ,    ,    ,    ,     DEL ,    , P0 ,PDOT,    ,   |
+`----+----+----+----+----+----'    `----+----+----+----+----+----'
+```
+
+### Raise
+```
+,----+----+----+----+----+----.    ,----+----+----+----+----+----.
+|TILD,EXLM, AT ,HASH,DLR ,PERC,     CIRC,AMPR,ASTR,LPRN,RPRN,BSPC|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|    ,EXLM, AT ,HASH,DLR ,PERC,     CIRC,AMPR,ASTR,LPRN,RPRN,    |
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|DEL ,MPRV,MNXT,VOLU,PGUP,UNDS,     EQL ,HOME,    ,    ,    ,BSLS|
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|MUTE,MSTP,MPLY,VOLD,PGDN,MINS,     PLUS,END ,    ,    ,    ,    |
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|    ,    ,    ,    ,    ,    ,         ,    ,    ,    ,    ,    |
+`----+----+----+----+----+----'    `----+----+----+----+----+----'
+```
+
+### 3rd function layer
+
+```
+,----+----+----+----+----+----.    ,----+----+----+----+----+----.
+|F12 , F1 , F2 , F3 , F4 , F5 ,      F6 , F7 , F8 , F9 ,F10 ,F11 |
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|    ,    ,    ,    ,    ,    ,         ,    ,    ,    ,    ,    |
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|    ,    ,    ,    ,    ,    ,         ,    ,    ,    ,    ,    |
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|    ,    ,    ,    ,    ,    ,         ,    ,    ,    ,    ,    |
+|----+----+----+----+----+----|    |----+----+----+----+----+----|
+|    ,    ,    ,    ,    ,    ,         ,    ,    ,    ,    ,    |
+`----+----+----+----+----+----'    `----+----+----+----+----+----'
+```
diff --git a/keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md b/keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md
new file mode 100644 (file)
index 0000000..9a7633a
--- /dev/null
@@ -0,0 +1,20 @@
+# Let's Split RGB Underglow
+
+## Master
+
+### Pro Micro
+- Red: LED +5V -> Pro Micro VCC
+- Green: LED Din -> Pro Micro TX0
+- Black: LED GND -> Pro Micro GND
+
+### TRRS
+- Red: LED +5V -> PCB VCC
+- Green: LED Do  -> PCB Extra Data
+- Black: LED GND -> PCB GND
+
+## Slave
+
+### TRRS
+- Red: LED +5V -> PCB VCC
+- Green: LED Din -> PCB Extra Data
+- 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 (file)
index 0000000..9da7ff6
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+Copyright 2017 Danny Nguyen <danny@hexwire.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define USE_SERIAL
+
+#define TAPPING_TERM 150
+
+#ifdef SUBPROJECT_rev1
+    #include "../../rev1/config.h"
+#endif
+
+#undef RGBLED_NUM
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 8
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#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 (file)
index 0000000..803d257
--- /dev/null
@@ -0,0 +1,218 @@
+#include "nyquist.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _LOWER 3
+#define _RAISE 4
+#define _FN3 5
+#define _FN4 6
+#define _ADJUST 16
+
+enum custom_keycodes {
+  QWERTY = SAFE_RANGE,
+  COLEMAK,
+  DVORAK,
+  LOWER,
+  RAISE,
+  FN3,
+  FN4,
+  ADJUST,
+};
+
+#define KC_ KC_TRNS
+#define _______ KC_TRNS
+
+#define KC_CAPW LGUI(LSFT(KC_3))        // Capture whole screen
+#define KC_CPYW LGUI(LSFT(LCTL(KC_3)))  // Copy whole screen
+#define KC_CAPP LGUI(LSFT(KC_4))        // Capture portion of screen
+#define KC_CPYP LGUI(LSFT(LCTL(KC_4)))  // Copy portion of screen
+#define KC_X0 MT(MOD_LCTL, KC_ESC)
+#define KC_X1 LOWER
+#define KC_X2 RAISE
+#define KC_X3 LT(_FN3, KC_GRV)
+#define KC_X4 MT(MOD_LSFT, KC_ENT)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+  [_QWERTY] = KC_KEYMAP(
+  //,----+----+----+----+----+----.    ,----+----+----+----+----+----.
+     ESC , 1  , 2  , 3  , 4  , 5  ,      6  , 7  , 8  , 9  , 0  ,BSPC,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+     TAB , Q  , W  , E  , R  , T  ,      Y  , U  , I  , O  , P  ,MINS,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+      X0 , A  , S  , D  , F  , G  ,      H  , J  , K  , L  ,SCLN,QUOT,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+     LSFT, Z  , X  , C  , V  , B  ,      N  , M  ,COMM,DOT ,SLSH, X4 ,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+      X3 ,LCTL,LALT,LGUI, X1 ,SPC ,     BSPC, X2 ,LEFT,DOWN, UP ,RGHT
+  //`----+----+----+----+----+----'    `----+----+----+----+----+----'
+  ),
+
+  [_COLEMAK] = KC_KEYMAP(
+  //,----+----+----+----+----+----.    ,----+----+----+----+----+----.
+     ESC , 1  , 2  , 3  , 4  , 5  ,      6  , 7  , 8  , 9  , 0  ,BSPC,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+     TAB , Q  , W  , F  , P  , G  ,      J  , L  , U  , Y  ,SCLN,MINS,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+      X0 , A  , R  , S  , T  , D  ,      H  , N  , E  , I  , O  ,QUOT,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+     LSFT, Z  , X  , C  , V  , B  ,      K  , M  ,COMM,DOT ,SLSH, X4 ,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+      X3 ,LCTL,LALT,LGUI, X1 ,SPC ,     BSPC, X2 ,LEFT,DOWN, UP ,RGHT
+  //`----+----+----+----+----+----'    `----+----+----+----+----+----'
+  ),
+
+  [_DVORAK] = KC_KEYMAP(
+  //,----+----+----+----+----+----.    ,----+----+----+----+----+----.
+     ESC , 1  , 2  , 3  , 4  , 5  ,      6  , 7  , 8  , 9  , 0  ,BSPC,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+     TAB ,QUOT,COMM,DOT , P  , Y  ,      F  , G  , C  , R  , L  ,MINS,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+      X0 , A  , O  , E  , U  , I  ,      D  , H  , T  , N  , S  ,SLSH,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+     LSFT,SCLN, Q  , J  , K  , X  ,      B  , M  , W  , V  , Z  , X4 ,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+      X3 ,LCTL,LALT,LGUI, X1 ,SPC ,     BSPC, X2 ,LEFT,DOWN, UP ,RGHT
+  //`----+----+----+----+----+----'    `----+----+----+----+----+----'
+  ),
+
+  [_LOWER] = KC_KEYMAP(
+  //,----+----+----+----+----+----.    ,----+----+----+----+----+----.
+     TILD,EXLM, AT ,HASH,DLR ,PERC,     CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+         , 1  , 2  , 3  , 4  , 5  ,      6  , 7  , 8  , 9  , 0  ,    ,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+     DEL ,CAPP,LEFT,RGHT, UP ,LBRC,     RBRC, P4 , P5 , P6 ,PLUS,PIPE,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+         ,CPYP,    ,    ,DOWN,LCBR,     RCBR, P1 , P2 , P3 ,MINS,    ,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+         ,    ,    ,    ,    ,    ,     DEL ,    , P0 ,PDOT,    ,   
+  //`----+----+----+----+----+----'    `----+----+----+----+----+----'
+  ),
+
+  [_RAISE] = KC_KEYMAP(
+  //,----+----+----+----+----+----.    ,----+----+----+----+----+----.
+     TILD,EXLM, AT ,HASH,DLR ,PERC,     CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+         ,EXLM, AT ,HASH,DLR ,PERC,     CIRC,AMPR,ASTR,LPRN,RPRN,    ,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+     DEL ,MPRV,MNXT,VOLU,PGUP,UNDS,     EQL ,HOME,    ,    ,    ,BSLS,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+     MUTE,MSTP,MPLY,VOLD,PGDN,MINS,     PLUS,END ,    ,    ,    ,    ,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+         ,    ,    ,    ,    ,    ,         ,    ,    ,    ,    ,    
+  //`----+----+----+----+----+----'    `----+----+----+----+----+----'
+  ),
+
+  [_FN3] = KC_KEYMAP(
+  //,----+----+----+----+----+----.    ,----+----+----+----+----+----.
+     F12 , F1 , F2 , F3 , F4 , F5 ,      F6 , F7 , F8 , F9 ,F10 ,F11 ,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+         ,    ,    ,    ,    ,    ,         ,    ,    ,    ,    ,    ,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+         ,    ,    ,    ,    ,    ,         ,    ,    ,    ,    ,    ,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+         ,    ,    ,    ,    ,    ,         ,    ,    ,    ,    ,    ,
+  //|----+----+----+----+----+----|    |----+----+----+----+----+----|
+         ,    ,    ,    ,    ,    ,         ,    ,    ,    ,    ,    
+  //`----+----+----+----+----+----'    `----+----+----+----+----+----'
+  ),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * |      | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn|      |      |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |      |      |      |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|      |      |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |      |      |      |      |      |      |      |      |      |      |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+  [_ADJUST] = KEYMAP( \
+    _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+    _______, RESET  , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \
+    _______, _______, _______, AU_ON,   AU_OFF,  AG_NORM, AG_SWAP, QWERTY,  COLEMAK, DVORAK,  _______, _______, \
+    _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+    _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+  )
+
+
+};
+
+#ifdef AUDIO_ENABLE
+float tone_qwerty[][2]     = SONG(QWERTY_SOUND);
+float tone_dvorak[][2]     = SONG(DVORAK_SOUND);
+float tone_colemak[][2]    = SONG(COLEMAK_SOUND);
+#endif
+
+void persistent_default_layer_set(uint16_t default_layer) {
+  eeconfig_update_default_layer(default_layer);
+  default_layer_set(default_layer);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+    case QWERTY:
+      if (record->event.pressed) {
+        #ifdef AUDIO_ENABLE
+          PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+        #endif
+        persistent_default_layer_set(1UL<<_QWERTY);
+      }
+      return false;
+      break;
+    case COLEMAK:
+      if (record->event.pressed) {
+        #ifdef AUDIO_ENABLE
+          PLAY_NOTE_ARRAY(tone_colemak, false, 0);
+        #endif
+        persistent_default_layer_set(1UL<<_COLEMAK);
+      }
+      return false;
+      break;
+    case DVORAK:
+      if (record->event.pressed) {
+        #ifdef AUDIO_ENABLE
+          PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
+        #endif
+        persistent_default_layer_set(1UL<<_DVORAK);
+      }
+      return false;
+      break;
+    case LOWER:
+      if (record->event.pressed) {
+        layer_on(_LOWER);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      } else {
+        layer_off(_LOWER);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      }
+      return false;
+      break;
+    case RAISE:
+      if (record->event.pressed) {
+        layer_on(_RAISE);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      } else {
+        layer_off(_RAISE);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      }
+      return false;
+      break;
+    case ADJUST:
+      if (record->event.pressed) {
+        layer_on(_ADJUST);
+      } else {
+        layer_off(_ADJUST);
+      }
+      return false;
+      break;
+  }
+  return true;
+}
diff --git a/keyboards/nyquist/keymaps/hexwire/keymap_converter.py b/keyboards/nyquist/keymaps/hexwire/keymap_converter.py
new file mode 100755 (executable)
index 0000000..683f64d
--- /dev/null
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+
+import re
+
+class KeymapConverter:
+
+  def __init__(self, filename):
+    self.filename = filename
+
+  def read_keymaps(self):
+    with open(self.filename) as f:
+      lines = f.readlines()
+
+    mode = 0
+    for line in lines:
+      line = line[:-1]
+      if mode == 0:
+        if "KC_KEYMAP" in line:
+          matches = re.match(r'.*\[(.*)\] = .*', line)
+          if matches:
+            layer_name = matches.group(1)
+            layer_name = layer_name[1:].capitalize()
+            print '###', layer_name
+            print '```'
+          mode = 1
+      elif mode == 1:
+        if "//" in line:
+          print line[4:]
+        elif ")" in line:
+          mode = 0
+          print '```'
+          print
+        elif line[-1] == ',':
+          print "|" + line[5:-1] + "|"
+        else:
+          print "|" + line[5:] + "|"
+
+converter = KeymapConverter('keymap.c')
+converter.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 (executable)
index 0000000..7285b00
--- /dev/null
@@ -0,0 +1,40 @@
+#!/usr/bin/env ruby
+
+class KeymapConverter
+
+  def initialize(filename)
+    @filename = filename
+    @mode = :search
+  end
+
+  def read_keymaps
+    lines = IO.readlines(@filename)
+    lines.each { |line| parse_line line[0..-2] }
+  end
+
+  def parse_line(line)
+    case @mode
+    when :search
+      if line =~ /KC_KEYMAP/
+        puts "### #{line}"
+        puts "```"
+        @mode = :parse
+      end
+    when :parse
+      if line =~ /\)/
+        @mode = :search
+        puts "```\n\n"
+      else 
+        line = line[4..-1]
+        line.sub!(/(,)^-/m, "|")
+        line.sub!(/( {4})/, "    |")
+
+        puts line
+      end
+    end
+  end
+
+end
+
+converter = KeymapConverter.new('keymap.c')
+converter.read_keymaps
diff --git a/keyboards/nyquist/keymaps/i2c/config.h b/keyboards/nyquist/keymaps/i2c/config.h
new file mode 100644 (file)
index 0000000..dc279f6
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+Copyright 2017 Danny Nguyen <danny@hexwire.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define USE_I2C
+
+#define MASTER_LEFT
+// #define _MASTER_RIGHT
+// #define EE_HANDS
+
+#ifdef SUBPROJECT_rev1
+    #include "../../rev1/config.h"
+#endif
diff --git a/keyboards/nyquist/keymaps/i2c/keymap.c b/keyboards/nyquist/keymaps/i2c/keymap.c
new file mode 100644 (file)
index 0000000..aa4b680
--- /dev/null
@@ -0,0 +1,231 @@
+#include "nyquist.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _LOWER 3
+#define _RAISE 4
+#define _ADJUST 16
+
+enum custom_keycodes {
+  QWERTY = SAFE_RANGE,
+  COLEMAK,
+  DVORAK,
+  LOWER,
+  RAISE,
+  ADJUST,
+};
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| Ctrl | Alt  | GUI  |Lower |Space |Space |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = KEYMAP( \
+  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC, \
+  KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_DEL, \
+  KC_ESC,  KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT, \
+  KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT , \
+  ADJUST,  KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT \
+),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab  |   Q  |   W  |   F  |   P  |   G  |   J  |   L  |   U  |   Y  |   ;  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   R  |   S  |   T  |   D  |   H  |   N  |   E  |   I  |   O  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   K  |   M  |   ,  |   .  |   /  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| Ctrl | Alt  | GUI  |Lower |Space |Space |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = KEYMAP( \
+  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC, \
+  KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_DEL, \
+  KC_ESC,  KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT, \
+  KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT , \
+  ADJUST,  KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT \
+),
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab  |   "  |   ,  |   .  |   P  |   Y  |   F  |   G  |   C  |   R  |   L  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   O  |   E  |   U  |   I  |   D  |   H  |   T  |   N  |   S  |  /   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   ;  |   Q  |   J  |   K  |   X  |   B  |   M  |   W  |   V  |   Z  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| Ctrl | Alt  | GUI  |Lower |Space |Space |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = KEYMAP( \
+  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC, \
+  KC_TAB,  KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,    KC_DEL, \
+  KC_ESC,  KC_A,    KC_O,    KC_E,    KC_U,    KC_I,    KC_D,    KC_H,    KC_T,    KC_N,    KC_S,    KC_SLSH, \
+  KC_LSFT, KC_SCLN, KC_Q,    KC_J,    KC_K,    KC_X,    KC_B,    KC_M,    KC_W,    KC_V,    KC_Z,    KC_ENT , \
+  ADJUST,  KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT \
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   _  |   +  |     |    \  |  |   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |ISO ~ |ISO | |      |      |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = KEYMAP( \
+  KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
+  KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
+  KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
+  _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
+  _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   -  |   =  |   [  |   ]  |  \   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |ISO # |ISO / |      |      |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = KEYMAP( \
+  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC, \
+  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_DEL, \
+  KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS, \
+  _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  KC_NUHS, KC_NUBS, _______, _______, _______, \
+  _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      | Reset|      |      |      |      |      |      |      |      |      |  Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |      |      |      |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|      |      |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |      |      |      |      |      |      |      |      |      |      |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] =  KEYMAP( \
+  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12, \
+  _______, RESET,   _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
+  _______, _______, _______, AU_ON,   AU_OFF,  AG_NORM, AG_SWAP, QWERTY,  COLEMAK, DVORAK,  _______, _______, \
+  _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+  _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+)
+
+};
+
+#ifdef AUDIO_ENABLE
+float tone_qwerty[][2]     = SONG(QWERTY_SOUND);
+float tone_dvorak[][2]     = SONG(DVORAK_SOUND);
+float tone_colemak[][2]    = SONG(COLEMAK_SOUND);
+#endif
+
+void persistent_default_layer_set(uint16_t default_layer) {
+  eeconfig_update_default_layer(default_layer);
+  default_layer_set(default_layer);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+    case QWERTY:
+      if (record->event.pressed) {
+        #ifdef AUDIO_ENABLE
+          PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+        #endif
+        persistent_default_layer_set(1UL<<_QWERTY);
+      }
+      return false;
+      break;
+    case COLEMAK:
+      if (record->event.pressed) {
+        #ifdef AUDIO_ENABLE
+          PLAY_NOTE_ARRAY(tone_colemak, false, 0);
+        #endif
+        persistent_default_layer_set(1UL<<_COLEMAK);
+      }
+      return false;
+      break;
+    case DVORAK:
+      if (record->event.pressed) {
+        #ifdef AUDIO_ENABLE
+          PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
+        #endif
+        persistent_default_layer_set(1UL<<_DVORAK);
+      }
+      return false;
+      break;
+    case LOWER:
+      if (record->event.pressed) {
+        layer_on(_LOWER);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      } else {
+        layer_off(_LOWER);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      }
+      return false;
+      break;
+    case RAISE:
+      if (record->event.pressed) {
+        layer_on(_RAISE);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      } else {
+        layer_off(_RAISE);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      }
+      return false;
+      break;
+    case ADJUST:
+      if (record->event.pressed) {
+        layer_on(_ADJUST);
+      } else {
+        layer_off(_ADJUST);
+      }
+      return false;
+      break;
+  }
+  return true;
+}
\ 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 (file)
index 0000000..ff79b6f
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+Copyright 2017 Danny Nguyen <danny@hexwire.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define USE_SERIAL
+
+#define MASTER_LEFT
+// #define _MASTER_RIGHT
+// #define EE_HANDS
+
+#ifdef SUBPROJECT_rev1
+    #include "../../rev1/config.h"
+#endif
diff --git a/keyboards/nyquist/keymaps/serial/keymap.c b/keyboards/nyquist/keymaps/serial/keymap.c
new file mode 100644 (file)
index 0000000..dcb68a6
--- /dev/null
@@ -0,0 +1,232 @@
+#include "nyquist.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _LOWER 3
+#define _RAISE 4
+#define _ADJUST 16
+
+enum custom_keycodes {
+  QWERTY = SAFE_RANGE,
+  COLEMAK,
+  DVORAK,
+  LOWER,
+  RAISE,
+  ADJUST,
+};
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| Ctrl | Alt  | GUI  |Lower |Space |Space |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = KEYMAP( \
+  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC, \
+  KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_DEL, \
+  KC_ESC,  KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT, \
+  KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT , \
+  ADJUST,  KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT \
+),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab  |   Q  |   W  |   F  |   P  |   G  |   J  |   L  |   U  |   Y  |   ;  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   R  |   S  |   T  |   D  |   H  |   N  |   E  |   I  |   O  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   K  |   M  |   ,  |   .  |   /  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| Ctrl | Alt  | GUI  |Lower |Space |Space |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = KEYMAP( \
+  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC, \
+  KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_DEL, \
+  KC_ESC,  KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT, \
+  KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT , \
+  ADJUST,  KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT \
+),
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab  |   "  |   ,  |   .  |   P  |   Y  |   F  |   G  |   C  |   R  |   L  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   O  |   E  |   U  |   I  |   D  |   H  |   T  |   N  |   S  |  /   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   ;  |   Q  |   J  |   K  |   X  |   B  |   M  |   W  |   V  |   Z  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| Ctrl | Alt  | GUI  |Lower |Space |Space |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = KEYMAP( \
+  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC, \
+  KC_TAB,  KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,    KC_DEL, \
+  KC_ESC,  KC_A,    KC_O,    KC_E,    KC_U,    KC_I,    KC_D,    KC_H,    KC_T,    KC_N,    KC_S,    KC_SLSH, \
+  KC_LSFT, KC_SCLN, KC_Q,    KC_J,    KC_K,    KC_X,    KC_B,    KC_M,    KC_W,    KC_V,    KC_Z,    KC_ENT , \
+  ADJUST,  KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT \
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   _  |   +  |     |    \  |  |   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |ISO ~ |ISO | |      |      |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = KEYMAP( \
+  KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
+  KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
+  KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
+  _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
+  _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   -  |   =  |   [  |   ]  |  \   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |ISO # |ISO / |      |      |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = KEYMAP( \
+  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC, \
+  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_DEL, \
+  KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS, \
+  _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  KC_NUHS, KC_NUBS, _______, _______, _______, \
+  _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      | Reset|      |      |      |      |      |      |      |      |      |  Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |      |      |      |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|      |      |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |      |      |      |      |      |      |      |      |      |      |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] =  KEYMAP( \
+  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12, \
+  _______, RESET,   _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
+  _______, _______, _______, AU_ON,   AU_OFF,  AG_NORM, AG_SWAP, QWERTY,  COLEMAK, DVORAK,  _______, _______, \
+  _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+  _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+)
+
+
+};
+
+#ifdef AUDIO_ENABLE
+float tone_qwerty[][2]     = SONG(QWERTY_SOUND);
+float tone_dvorak[][2]     = SONG(DVORAK_SOUND);
+float tone_colemak[][2]    = SONG(COLEMAK_SOUND);
+#endif
+
+void persistent_default_layer_set(uint16_t default_layer) {
+  eeconfig_update_default_layer(default_layer);
+  default_layer_set(default_layer);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+    case QWERTY:
+      if (record->event.pressed) {
+        #ifdef AUDIO_ENABLE
+          PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+        #endif
+        persistent_default_layer_set(1UL<<_QWERTY);
+      }
+      return false;
+      break;
+    case COLEMAK:
+      if (record->event.pressed) {
+        #ifdef AUDIO_ENABLE
+          PLAY_NOTE_ARRAY(tone_colemak, false, 0);
+        #endif
+        persistent_default_layer_set(1UL<<_COLEMAK);
+      }
+      return false;
+      break;
+    case DVORAK:
+      if (record->event.pressed) {
+        #ifdef AUDIO_ENABLE
+          PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
+        #endif
+        persistent_default_layer_set(1UL<<_DVORAK);
+      }
+      return false;
+      break;
+    case LOWER:
+      if (record->event.pressed) {
+        layer_on(_LOWER);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      } else {
+        layer_off(_LOWER);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      }
+      return false;
+      break;
+    case RAISE:
+      if (record->event.pressed) {
+        layer_on(_RAISE);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      } else {
+        layer_off(_RAISE);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      }
+      return false;
+      break;
+    case ADJUST:
+      if (record->event.pressed) {
+        layer_on(_ADJUST);
+      } else {
+        layer_off(_ADJUST);
+      }
+      return false;
+      break;
+  }
+  return true;
+}
\ No newline at end of file
diff --git a/keyboards/nyquist/matrix.c b/keyboards/nyquist/matrix.c
new file mode 100644 (file)
index 0000000..dcb94c6
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+Copyright 2017 Danny Nguyen <danny@hexwire.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * scan matrix
+ */
+#include <stdint.h>
+#include <stdbool.h>
+#include <avr/io.h>
+#include <avr/wdt.h>
+#include <avr/interrupt.h>
+#include <util/delay.h>
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include "matrix.h"
+#include "split_util.h"
+#include "pro_micro.h"
+#include "config.h"
+
+#ifdef USE_I2C
+#  include "i2c.h"
+#else // USE_SERIAL
+#  include "serial.h"
+#endif
+
+#ifndef DEBOUNCE
+#  define DEBOUNCE     5
+#endif
+
+#define ERROR_DISCONNECT_COUNT 5
+
+static uint8_t debouncing = DEBOUNCE;
+static const int ROWS_PER_HAND = MATRIX_ROWS/2;
+static uint8_t error_count = 0;
+
+static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
+static matrix_row_t read_cols(void);
+static void init_cols(void);
+static void unselect_rows(void);
+static void select_row(uint8_t row);
+
+__attribute__ ((weak))
+void matrix_init_quantum(void) {
+    matrix_init_kb();
+}
+
+__attribute__ ((weak))
+void matrix_scan_quantum(void) {
+    matrix_scan_kb();
+}
+
+__attribute__ ((weak))
+void matrix_init_kb(void) {
+    matrix_init_user();
+}
+
+__attribute__ ((weak))
+void matrix_scan_kb(void) {
+    matrix_scan_user();
+}
+
+__attribute__ ((weak))
+void matrix_init_user(void) {
+}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+}
+
+inline
+uint8_t matrix_rows(void)
+{
+    return MATRIX_ROWS;
+}
+
+inline
+uint8_t matrix_cols(void)
+{
+    return MATRIX_COLS;
+}
+
+void matrix_init(void)
+{
+    debug_enable = true;
+    debug_matrix = true;
+    debug_mouse = true;
+    // initialize row and col
+    unselect_rows();
+    init_cols();
+
+    TX_RX_LED_INIT;
+
+    // initialize matrix state: all keys off
+    for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+        matrix[i] = 0;
+        matrix_debouncing[i] = 0;
+    }
+
+    matrix_init_quantum();
+}
+
+uint8_t _matrix_scan(void)
+{
+    // Right hand is stored after the left in the matirx so, we need to offset it
+    int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
+
+    for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
+        select_row(i);
+        _delay_us(30);  // without this wait read unstable value.
+        matrix_row_t cols = read_cols();
+        if (matrix_debouncing[i+offset] != cols) {
+            matrix_debouncing[i+offset] = cols;
+            debouncing = DEBOUNCE;
+        }
+        unselect_rows();
+    }
+
+    if (debouncing) {
+        if (--debouncing) {
+            _delay_ms(1);
+        } else {
+            for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
+                matrix[i+offset] = matrix_debouncing[i+offset];
+            }
+        }
+    }
+
+    return 1;
+}
+
+#ifdef USE_I2C
+
+// Get rows from other half over i2c
+int i2c_transaction(void) {
+    int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
+
+    int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
+    if (err) goto i2c_error;
+
+    // start of matrix stored at 0x00
+    err = i2c_master_write(0x00);
+    if (err) goto i2c_error;
+
+    // Start read
+    err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
+    if (err) goto i2c_error;
+
+    if (!err) {
+        int i;
+        for (i = 0; i < ROWS_PER_HAND-1; ++i) {
+            matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
+        }
+        matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
+        i2c_master_stop();
+    } else {
+i2c_error: // the cable is disconnceted, or something else went wrong
+        i2c_reset_state();
+        return err;
+    }
+
+    return 0;
+}
+
+#else // USE_SERIAL
+
+int serial_transaction(void) {
+    int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
+
+    if (serial_update_buffers()) {
+        return 1;
+    }
+
+    for (int i = 0; i < ROWS_PER_HAND; ++i) {
+        matrix[slaveOffset+i] = serial_slave_buffer[i];
+    }
+    return 0;
+}
+#endif
+
+uint8_t matrix_scan(void)
+{
+    int ret = _matrix_scan();
+
+
+
+#ifdef USE_I2C
+    if( i2c_transaction() ) {
+#else // USE_SERIAL
+    if( serial_transaction() ) {
+#endif
+        // turn on the indicator led when halves are disconnected
+        TXLED1;
+
+        error_count++;
+
+        if (error_count > ERROR_DISCONNECT_COUNT) {
+            // reset other half if disconnected
+            int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
+            for (int i = 0; i < ROWS_PER_HAND; ++i) {
+                matrix[slaveOffset+i] = 0;
+            }
+        }
+    } else {
+        // turn off the indicator led on no error
+        TXLED0;
+        error_count = 0;
+    }
+    matrix_scan_quantum();
+    return ret;
+}
+
+void matrix_slave_scan(void) {
+    _matrix_scan();
+
+    int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2);
+
+#ifdef USE_I2C
+    for (int i = 0; i < ROWS_PER_HAND; ++i) {
+        /* i2c_slave_buffer[i] = matrix[offset+i]; */
+        i2c_slave_buffer[i] = matrix[offset+i];
+    }
+#else // USE_SERIAL
+    for (int i = 0; i < ROWS_PER_HAND; ++i) {
+        serial_slave_buffer[i] = matrix[offset+i];
+    }
+#endif
+}
+
+bool matrix_is_modified(void)
+{
+    if (debouncing) return false;
+    return true;
+}
+
+inline
+bool matrix_is_on(uint8_t row, uint8_t col)
+{
+    return (matrix[row] & ((matrix_row_t)1<<col));
+}
+
+inline
+matrix_row_t matrix_get_row(uint8_t row)
+{
+    return matrix[row];
+}
+
+void matrix_print(void)
+{
+    print("\nr/c 0123456789ABCDEF\n");
+    for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+        phex(row); print(": ");
+        pbin_reverse16(matrix_get_row(row));
+        print("\n");
+    }
+}
+
+uint8_t matrix_key_count(void)
+{
+    uint8_t count = 0;
+    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+        count += bitpop16(matrix[i]);
+    }
+    return count;
+}
+
+static void  init_cols(void)
+{
+    for(int x = 0; x < MATRIX_COLS; x++) {
+        _SFR_IO8((col_pins[x] >> 4) + 1) &=  ~_BV(col_pins[x] & 0xF);
+        _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF);
+    }
+}
+
+static matrix_row_t read_cols(void)
+{
+    matrix_row_t result = 0;
+    for(int x = 0; x < MATRIX_COLS; x++) {
+        result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
+    }
+    return result;
+}
+
+static void unselect_rows(void)
+{
+    for(int x = 0; x < ROWS_PER_HAND; x++) {
+        _SFR_IO8((row_pins[x] >> 4) + 1) &=  ~_BV(row_pins[x] & 0xF);
+        _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
+    }
+}
+
+static void select_row(uint8_t row)
+{
+    _SFR_IO8((row_pins[row] >> 4) + 1) |=  _BV(row_pins[row] & 0xF);
+    _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF);
+}
diff --git a/keyboards/nyquist/nyquist.c b/keyboards/nyquist/nyquist.c
new file mode 100644 (file)
index 0000000..2face09
--- /dev/null
@@ -0,0 +1 @@
+#include "nyquist.h"
diff --git a/keyboards/nyquist/nyquist.h b/keyboards/nyquist/nyquist.h
new file mode 100644 (file)
index 0000000..e8cccec
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef NYQUIST_H
+#define NYQUIST_H
+
+#ifdef SUBPROJECT_rev1
+    #include "rev1.h"
+#endif
+
+// Used to create a keymap using only KC_ prefixed keys
+#define KC_KEYMAP( \
+    L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+    L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+    L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+    L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
+    L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
+    ) \
+    KEYMAP( \
+        KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
+        KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
+        KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
+        KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
+        KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
+    )
+
+#include "quantum.h"
+
+#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 (file)
index 0000000..f9e7ed7
--- /dev/null
@@ -0,0 +1,362 @@
+/*
+  pins_arduino.h - Pin definition functions for Arduino
+  Part of Arduino - http://www.arduino.cc/
+
+  Copyright (c) 2007 David A. Mellis
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License, or (at your option) any later version.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General
+  Public License along with this library; if not, write to the
+  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+  Boston, MA  02111-1307  USA
+
+  $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
+*/
+
+#ifndef Pins_Arduino_h
+#define Pins_Arduino_h
+
+#include <avr/pgmspace.h>
+
+// Workaround for wrong definitions in "iom32u4.h".
+// This should be fixed in the AVR toolchain.
+#undef UHCON
+#undef UHINT
+#undef UHIEN
+#undef UHADDR
+#undef UHFNUM
+#undef UHFNUML
+#undef UHFNUMH
+#undef UHFLEN
+#undef UPINRQX
+#undef UPINTX
+#undef UPNUM
+#undef UPRST
+#undef UPCONX
+#undef UPCFG0X
+#undef UPCFG1X
+#undef UPSTAX
+#undef UPCFG2X
+#undef UPIENX
+#undef UPDATX
+#undef TCCR2A
+#undef WGM20
+#undef WGM21
+#undef COM2B0
+#undef COM2B1
+#undef COM2A0
+#undef COM2A1
+#undef TCCR2B
+#undef CS20
+#undef CS21
+#undef CS22
+#undef WGM22
+#undef FOC2B
+#undef FOC2A
+#undef TCNT2
+#undef TCNT2_0
+#undef TCNT2_1
+#undef TCNT2_2
+#undef TCNT2_3
+#undef TCNT2_4
+#undef TCNT2_5
+#undef TCNT2_6
+#undef TCNT2_7
+#undef OCR2A
+#undef OCR2_0
+#undef OCR2_1
+#undef OCR2_2
+#undef OCR2_3
+#undef OCR2_4
+#undef OCR2_5
+#undef OCR2_6
+#undef OCR2_7
+#undef OCR2B
+#undef OCR2_0
+#undef OCR2_1
+#undef OCR2_2
+#undef OCR2_3
+#undef OCR2_4
+#undef OCR2_5
+#undef OCR2_6
+#undef OCR2_7
+
+#define NUM_DIGITAL_PINS  30
+#define NUM_ANALOG_INPUTS 12
+
+#define TX_RX_LED_INIT  DDRD |= (1<<5), DDRB |= (1<<0)
+#define TXLED0          PORTD |= (1<<5)
+#define TXLED1          PORTD &= ~(1<<5)
+#define RXLED0          PORTB |= (1<<0)
+#define RXLED1          PORTB &= ~(1<<0)
+
+static const uint8_t SDA = 2;
+static const uint8_t SCL = 3;
+#define LED_BUILTIN 13
+
+// Map SPI port to 'new' pins D14..D17
+static const uint8_t SS   = 17;
+static const uint8_t MOSI = 16;
+static const uint8_t MISO = 14;
+static const uint8_t SCK  = 15;
+
+// Mapping of analog pins as digital I/O
+// A6-A11 share with digital pins
+static const uint8_t ADC0 = 18;
+static const uint8_t ADC1 = 19;
+static const uint8_t ADC2 = 20;
+static const uint8_t ADC3 = 21;
+static const uint8_t ADC4 = 22;
+static const uint8_t ADC5 = 23;
+static const uint8_t ADC6 = 24;   // D4
+static const uint8_t ADC7 = 25;   // D6
+static const uint8_t ADC8 = 26;   // D8
+static const uint8_t ADC9 = 27;   // D9
+static const uint8_t ADC10 = 28;  // D10
+static const uint8_t ADC11 = 29;  // D12
+
+#define digitalPinToPCICR(p)    ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
+#define digitalPinToPCICRbit(p) 0
+#define digitalPinToPCMSK(p)    ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
+#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))
+
+//  __AVR_ATmega32U4__ has an unusual mapping of pins to channels
+extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
+#define analogPinToChannel(P)  ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
+
+#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
+
+#ifdef ARDUINO_MAIN
+
+// On the Arduino board, digital pins are also used
+// for the analog output (software PWM).  Analog input
+// pins are a separate set.
+
+// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
+//
+// D0               PD2                 RXD1/INT2
+// D1               PD3                 TXD1/INT3
+// D2               PD1     SDA         SDA/INT1
+// D3#              PD0     PWM8/SCL    OC0B/SCL/INT0
+// D4       A6      PD4                 ADC8
+// D5#              PC6     ???         OC3A/#OC4A
+// D6#      A7      PD7     FastPWM     #OC4D/ADC10
+// D7               PE6                 INT6/AIN0
+//
+// D8       A8      PB4                 ADC11/PCINT4
+// D9#      A9      PB5     PWM16       OC1A/#OC4B/ADC12/PCINT5
+// D10#     A10     PB6     PWM16       OC1B/0c4B/ADC13/PCINT6
+// D11#             PB7     PWM8/16     0C0A/OC1C/#RTS/PCINT7
+// D12      A11     PD6                 T1/#OC4D/ADC9
+// D13#             PC7     PWM10       CLK0/OC4A
+//
+// A0       D18     PF7                 ADC7
+// A1       D19     PF6                 ADC6
+// A2       D20     PF5                 ADC5
+// A3       D21     PF4                 ADC4
+// A4       D22     PF1                 ADC1
+// A5       D23     PF0                 ADC0
+//
+// New pins D14..D17 to map SPI port to digital pins
+//
+// MISO     D14     PB3                 MISO,PCINT3
+// SCK      D15     PB1                 SCK,PCINT1
+// MOSI     D16     PB2                 MOSI,PCINT2
+// SS       D17     PB0                 RXLED,SS/PCINT0
+//
+// Connected LEDs on board for TX and RX
+// TXLED    D24     PD5                 XCK1
+// RXLED    D17     PB0
+// HWB              PE2                 HWB
+
+// these arrays map port names (e.g. port B) to the
+// appropriate addresses for various functions (e.g. reading
+// and writing)
+const uint16_t PROGMEM port_to_mode_PGM[] = {
+    NOT_A_PORT,
+    NOT_A_PORT,
+    (uint16_t) &DDRB,
+    (uint16_t) &DDRC,
+    (uint16_t) &DDRD,
+    (uint16_t) &DDRE,
+    (uint16_t) &DDRF,
+};
+
+const uint16_t PROGMEM port_to_output_PGM[] = {
+    NOT_A_PORT,
+    NOT_A_PORT,
+    (uint16_t) &PORTB,
+    (uint16_t) &PORTC,
+    (uint16_t) &PORTD,
+    (uint16_t) &PORTE,
+    (uint16_t) &PORTF,
+};
+
+const uint16_t PROGMEM port_to_input_PGM[] = {
+    NOT_A_PORT,
+    NOT_A_PORT,
+    (uint16_t) &PINB,
+    (uint16_t) &PINC,
+    (uint16_t) &PIND,
+    (uint16_t) &PINE,
+    (uint16_t) &PINF,
+};
+
+const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
+    PD, // D0 - PD2
+    PD, // D1 - PD3
+    PD, // D2 - PD1
+    PD, // D3 - PD0
+    PD, // D4 - PD4
+    PC, // D5 - PC6
+    PD, // D6 - PD7
+    PE, // D7 - PE6
+
+    PB, // D8 - PB4
+    PB, // D9 - PB5
+    PB, // D10 - PB6
+    PB, // D11 - PB7
+    PD, // D12 - PD6
+    PC, // D13 - PC7
+
+    PB, // D14 - MISO - PB3
+    PB, // D15 - SCK - PB1
+    PB, // D16 - MOSI - PB2
+    PB, // D17 - SS - PB0
+
+    PF, // D18 - A0 - PF7
+    PF, // D19 - A1 - PF6
+    PF, // D20 - A2 - PF5
+    PF, // D21 - A3 - PF4
+    PF, // D22 - A4 - PF1
+    PF, // D23 - A5 - PF0
+
+    PD, // D24 - PD5
+    PD, // D25 / D6 - A7 - PD7
+    PB, // D26 / D8 - A8 - PB4
+    PB, // D27 / D9 - A9 - PB5
+    PB, // D28 / D10 - A10 - PB6
+    PD, // D29 / D12 - A11 - PD6
+};
+
+const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
+    _BV(2), // D0 - PD2
+    _BV(3), // D1 - PD3
+    _BV(1), // D2 - PD1
+    _BV(0), // D3 - PD0
+    _BV(4), // D4 - PD4
+    _BV(6), // D5 - PC6
+    _BV(7), // D6 - PD7
+    _BV(6), // D7 - PE6
+
+    _BV(4), // D8 - PB4
+    _BV(5), // D9 - PB5
+    _BV(6), // D10 - PB6
+    _BV(7), // D11 - PB7
+    _BV(6), // D12 - PD6
+    _BV(7), // D13 - PC7
+
+    _BV(3), // D14 - MISO - PB3
+    _BV(1), // D15 - SCK - PB1
+    _BV(2), // D16 - MOSI - PB2
+    _BV(0), // D17 - SS - PB0
+
+    _BV(7), // D18 - A0 - PF7
+    _BV(6), // D19 - A1 - PF6
+    _BV(5), // D20 - A2 - PF5
+    _BV(4), // D21 - A3 - PF4
+    _BV(1), // D22 - A4 - PF1
+    _BV(0), // D23 - A5 - PF0
+
+    _BV(5), // D24 - PD5
+    _BV(7), // D25 / D6 - A7 - PD7
+    _BV(4), // D26 / D8 - A8 - PB4
+    _BV(5), // D27 / D9 - A9 - PB5
+    _BV(6), // D28 / D10 - A10 - PB6
+    _BV(6), // D29 / D12 - A11 - PD6
+};
+
+const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    TIMER0B,        /* 3 */
+    NOT_ON_TIMER,
+    TIMER3A,        /* 5 */
+    TIMER4D,        /* 6 */
+    NOT_ON_TIMER,
+
+    NOT_ON_TIMER,
+    TIMER1A,        /* 9 */
+    TIMER1B,        /* 10 */
+    TIMER0A,        /* 11 */
+
+    NOT_ON_TIMER,
+    TIMER4A,        /* 13 */
+
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+    NOT_ON_TIMER,
+};
+
+const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
+    7,  // A0               PF7                 ADC7
+    6,  // A1               PF6                 ADC6
+    5,  // A2               PF5                 ADC5
+    4,  // A3               PF4                 ADC4
+    1,  // A4               PF1                 ADC1
+    0,  // A5               PF0                 ADC0
+    8,  // A6       D4      PD4                 ADC8
+    10, // A7       D6      PD7                 ADC10
+    11, // A8       D8      PB4                 ADC11
+    12, // A9       D9      PB5                 ADC12
+    13, // A10      D10     PB6                 ADC13
+    9   // A11      D12     PD6                 ADC9
+};
+
+#endif /* ARDUINO_MAIN */
+
+// These serial port names are intended to allow libraries and architecture-neutral
+// sketches to automatically default to the correct port name for a particular type
+// of use.  For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+// the first hardware serial port whose RX/TX pins are not dedicated to another use.
+//
+// SERIAL_PORT_MONITOR        Port which normally prints to the Arduino Serial Monitor
+//
+// SERIAL_PORT_USBVIRTUAL     Port which is USB virtual serial
+//
+// SERIAL_PORT_LINUXBRIDGE    Port which connects to a Linux system via Bridge library
+//
+// SERIAL_PORT_HARDWARE       Hardware serial port, physical RX & TX pins.
+//
+// SERIAL_PORT_HARDWARE_OPEN  Hardware serial ports which are open for use.  Their RX & TX
+//                            pins are NOT connected to anything by default.
+#define SERIAL_PORT_MONITOR        Serial
+#define SERIAL_PORT_USBVIRTUAL     Serial
+#define SERIAL_PORT_HARDWARE       Serial1
+#define SERIAL_PORT_HARDWARE_OPEN  Serial1
+
+#endif /* Pins_Arduino_h */
diff --git a/keyboards/nyquist/readme.md b/keyboards/nyquist/readme.md
new file mode 100644 (file)
index 0000000..c70bf02
--- /dev/null
@@ -0,0 +1,167 @@
+The Nyquist Keyboard
+====================
+
+The 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.
+
+
+## Build Guide
+
+Since 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)
+
+There is additional information there about flashing and adding RGB underglow.
+
+## First Time Setup
+
+Download 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:
+
+```
+$ make serial
+```
+
+You will see a lot of output and if everything worked correctly you will see the built hex file:
+
+```
+nyquist_rev1_serial.hex
+```
+
+If 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:
+
+
+```
+$ make YOUR_KEYMAP_NAME
+```
+
+If everything worked correctly you will see a file:
+
+```
+nyquist_rev1_YOUR_KEYMAP_NAME.hex
+```
+
+For 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.
+
+Features
+--------
+
+For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md).
+
+Some features supported by the firmware:
+
+* Either half can connect to the computer via USB, or both halves can be used
+  independently.
+* You only need 3 wires to connect the two halves. Two for VCC and GND and one
+  for serial communication.
+* Optional support for I2C connection between the two halves if for some
+  reason you require a faster connection between the two halves. Note this
+  requires an extra wire between halves and pull-up resistors on the data lines.
+
+### 2u Support
+In 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.
+
+Required Hardware
+-----------------
+
+Apart from diodes and key switches for the keyboard matrix in each half, you
+will need:
+
+* 2 Arduino Pro Micro's. You can find theses on aliexpress for ≈3.50USD each.
+* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable
+
+Alternatively, you can use any sort of cable and socket that has at least 3
+wires. If you want to use I2C to communicate between halves, you will need a
+cable with at least 4 wires and 2x 4.7kΩ pull-up resistors
+
+Optional Hardware
+-----------------
+
+A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`.
+
+Wiring
+------
+
+The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e.
+PD0 on the ATmega32u4) between the two Pro Micros.
+
+Then wire your key matrix to any of the remaining 17 IO pins of the pro micro
+and modify the `matrix.c` accordingly.
+
+The wiring for serial:
+
+![serial wiring](http://imgur.com/BnCGU1Y)
+
+The wiring for i2c:
+
+![i2c wiring](http://imgur.com/5eiArDA)
+
+The pull-up resistors may be placed on either half. It is also possible
+to use 4 resistors and have the pull-ups in both halves, but this is
+unnecessary in simple use cases.
+
+Flashing
+-------
+From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing.
+Example: `make rev1-serial-avrdude`
+
+
+Choosing which board to plug the USB cable into (choosing Master)
+--------
+Because the two boards are identical, the firmware has logic to differentiate the left and right board.
+
+It 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.
+
+The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side.
+
+The 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.
+
+### Setting the left hand as master
+If 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.
+
+### Setting the right hand as master
+If you always plug the usb cable into the right board, add an extra flag to your `config.h`
+```
+ #define MASTER_RIGHT
+```
+
+### Setting EE_hands to use either hands as master
+If you define `EE_HANDS` in your `config.h`, you will need to set the
+EEPROM for the left and right halves.
+
+The EEPROM is used to store whether the
+half is left handed or right handed. This makes it so that the same firmware
+file will run on both hands instead of having to flash left and right handed
+versions of the firmware to each half. To flash the EEPROM file for the left
+half run:
+```
+avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep
+// or the equivalent in dfu-programmer
+
+```
+and similarly for right half
+```
+avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep
+// or the equivalent in dfu-programmer
+```
+
+NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`)
+
+After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash.
+
+Note that you need to program both halves, but you have the option of using
+different keymaps for each half. You could program the left half with a QWERTY
+layout and the right half with a Colemak layout using bootmagic's default layout option.
+Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the
+right half is connected.
+
+
+Notes on Using Pro Micro 3.3V
+-----------------------------
+
+Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects
+the frequency on the 3.3V board.
+
+Also, if the slave board is producing weird characters in certain columns,
+update the following line in `matrix.c` to the following:
+
+```
+// _delay_us(30);  // without this wait read unstable value.
+_delay_us(300);  // without this wait read unstable value.
+```
diff --git a/keyboards/nyquist/rev1/Makefile b/keyboards/nyquist/rev1/Makefile
new file mode 100644 (file)
index 0000000..4e2a6f0
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+       include ../../Makefile
+endif
\ No newline at end of file
diff --git a/keyboards/nyquist/rev1/config.h b/keyboards/nyquist/rev1/config.h
new file mode 100644 (file)
index 0000000..c2907cf
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+Copyright 2017 Danny Nguyen <danny@hexwire.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0xCEEB
+#define PRODUCT_ID      0x1156
+#define DEVICE_VER      0x0100
+#define MANUFACTURER    Keebio
+#define PRODUCT         The Nyquist Keyboard
+#define DESCRIPTION     Split 60 percent ortholinear keyboard
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 10
+#define MATRIX_COLS 6
+
+// wiring of each half
+#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 }
+#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
+
+#define CATERINA_BOOTLOADER
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+// #define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D3
+#define RGBLIGHT_TIMER
+#define RGBLED_NUM 16    // Number of LEDs
+#define ws2812_PORTREG  PORTD
+#define ws2812_DDRREG   DDRD
+
+/*
+ * Feature disable options
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+// #define NO_DEBUG
+
+/* disable print */
+// #define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboards/nyquist/rev1/rev1.c b/keyboards/nyquist/rev1/rev1.c
new file mode 100644 (file)
index 0000000..fc984e1
--- /dev/null
@@ -0,0 +1,39 @@
+#include "nyquist.h"
+
+#ifdef AUDIO_ENABLE
+    float tone_startup[][2] = SONG(STARTUP_SOUND);
+    float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
+#endif
+
+#ifdef SSD1306OLED
+void led_set_kb(uint8_t usb_led) {
+    // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+    led_set_user(usb_led);
+}
+#endif
+
+void matrix_init_kb(void) {
+
+    #ifdef AUDIO_ENABLE
+        _delay_ms(20); // gets rid of tick
+        PLAY_NOTE_ARRAY(tone_startup, false, 0);
+    #endif
+
+    // // green led on
+    // DDRD |= (1<<5);
+    // PORTD &= ~(1<<5);
+
+    // // orange led on
+    // DDRB |= (1<<0);
+    // PORTB &= ~(1<<0);
+
+       matrix_init_user();
+};
+
+void shutdown_user(void) {
+    #ifdef AUDIO_ENABLE
+        PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
+       _delay_ms(150);
+       stop_all_notes();
+    #endif
+}
diff --git a/keyboards/nyquist/rev1/rev1.h b/keyboards/nyquist/rev1/rev1.h
new file mode 100644 (file)
index 0000000..f2d0ece
--- /dev/null
@@ -0,0 +1,66 @@
+#ifndef REV1_H
+#define REV1_H
+
+#include "../nyquist.h"
+
+//void promicro_bootloader_jmp(bool program);
+#include "quantum.h"
+
+
+#ifdef USE_I2C
+#include <stddef.h>
+#ifdef __AVR__
+       #include <avr/io.h>
+       #include <avr/interrupt.h>
+#endif
+#endif
+
+//void promicro_bootloader_jmp(bool program);
+
+#ifndef FLIP_HALF
+// Standard Keymap
+// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
+#define KEYMAP( \
+       L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+       L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+       L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+       L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
+    L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
+       ) \
+       { \
+               { L00, L01, L02, L03, L04, L05 }, \
+               { L10, L11, L12, L13, L14, L15 }, \
+               { L20, L21, L22, L23, L24, L25 }, \
+               { L30, L31, L32, L33, L34, L35 }, \
+               { L40, L41, L42, L43, L44, L45 }, \
+               { R05, R04, R03, R02, R01, R00 }, \
+               { R15, R14, R13, R12, R11, R10 }, \
+               { R25, R24, R23, R22, R21, R20 }, \
+               { R35, R34, R33, R32, R31, R30 }, \
+               { R45, R44, R43, R42, R41, R40 } \
+       }
+#else
+// Keymap with right side flipped
+// (TRRS jack on both halves are to the right)
+#define KEYMAP( \
+       L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+       L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+       L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+       L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
+    L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
+       ) \
+       { \
+               { L00, L01, L02, L03, L04, L05 }, \
+               { L10, L11, L12, L13, L14, L15 }, \
+               { L20, L21, L22, L23, L24, L25 }, \
+               { L30, L31, L32, L33, L34, L35 }, \
+               { L40, L41, L42, L43, L44, L45 }, \
+               { R00, R01, R02, R03, R04, R05 }, \
+               { R10, R11, R12, R13, R14, R15 }, \
+               { R20, R21, R22, R23, R24, R25 }, \
+               { R30, R31, R32, R33, R34, R35 }, \
+               { R40, R41, R42, R43, R44, R45 } \
+       }
+#endif
+
+#endif
diff --git a/keyboards/nyquist/rev1/rules.mk b/keyboards/nyquist/rev1/rules.mk
new file mode 100644 (file)
index 0000000..80a942d
--- /dev/null
@@ -0,0 +1,5 @@
+BACKLIGHT_ENABLE = no
+
+ifndef QUANTUM_DIR
+       include ../../../Makefile
+endif
diff --git a/keyboards/nyquist/rules.mk b/keyboards/nyquist/rules.mk
new file mode 100644 (file)
index 0000000..0efa785
--- /dev/null
@@ -0,0 +1,87 @@
+SRC += matrix.c \
+          i2c.c \
+          split_util.c \
+          serial.c
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# Build Options
+#   change to "no" to disable the options, or define them in the Makefile in
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE ?= no       # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes       # Audio control and System control(+450)
+CONSOLE_ENABLE ?= no         # Console for debug(+400)
+COMMAND_ENABLE ?= yes        # Commands for debug and configuration
+NKRO_ENABLE ?= no            # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE ?= no      # Enable keyboard backlight functionality
+MIDI_ENABLE ?= no            # MIDI controls
+AUDIO_ENABLE ?= no           # Audio output on port C6
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE ?= no       # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+SUBPROJECT_rev1 ?= yes
+USE_I2C ?= yes
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no    # Breathing sleep LED during USB suspend
+
+CUSTOM_MATRIX = yes
+
+avrdude: build
+       ls /dev/tty* > /tmp/1; \
+       echo "Reset your Pro Micro now"; \
+       while [[ -z $$USB ]]; do \
+         sleep 1; \
+         ls /dev/tty* > /tmp/2; \
+         USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
+       done; \
+       avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
+
+.PHONY: avrdude
diff --git a/keyboards/nyquist/serial.c b/keyboards/nyquist/serial.c
new file mode 100644 (file)
index 0000000..6faed09
--- /dev/null
@@ -0,0 +1,228 @@
+/*
+ * WARNING: be careful changing this code, it is very timing dependent
+ */
+
+#ifndef F_CPU
+#define F_CPU 16000000
+#endif
+
+#include <avr/io.h>
+#include <avr/interrupt.h>
+#include <util/delay.h>
+#include <stdbool.h>
+#include "serial.h"
+
+#ifdef USE_SERIAL
+
+// Serial pulse period in microseconds. Its probably a bad idea to lower this
+// value.
+#define SERIAL_DELAY 24
+
+uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
+uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
+
+#define SLAVE_DATA_CORRUPT (1<<0)
+volatile uint8_t status = 0;
+
+inline static
+void serial_delay(void) {
+  _delay_us(SERIAL_DELAY);
+}
+
+inline static
+void serial_output(void) {
+  SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
+}
+
+// make the serial pin an input with pull-up resistor
+inline static
+void serial_input(void) {
+  SERIAL_PIN_DDR  &= ~SERIAL_PIN_MASK;
+  SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+inline static
+uint8_t serial_read_pin(void) {
+  return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
+}
+
+inline static
+void serial_low(void) {
+  SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
+}
+
+inline static
+void serial_high(void) {
+  SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+void serial_master_init(void) {
+  serial_output();
+  serial_high();
+}
+
+void serial_slave_init(void) {
+  serial_input();
+
+  // Enable INT0
+  EIMSK |= _BV(INT0);
+  // Trigger on falling edge of INT0
+  EICRA &= ~(_BV(ISC00) | _BV(ISC01));
+}
+
+// Used by the master to synchronize timing with the slave.
+static
+void sync_recv(void) {
+  serial_input();
+  // This shouldn't hang if the slave disconnects because the
+  // serial line will float to high if the slave does disconnect.
+  while (!serial_read_pin());
+  serial_delay();
+}
+
+// Used by the slave to send a synchronization signal to the master.
+static
+void sync_send(void) {
+  serial_output();
+
+  serial_low();
+  serial_delay();
+
+  serial_high();
+}
+
+// Reads a byte from the serial line
+static
+uint8_t serial_read_byte(void) {
+  uint8_t byte = 0;
+  serial_input();
+  for ( uint8_t i = 0; i < 8; ++i) {
+    byte = (byte << 1) | serial_read_pin();
+    serial_delay();
+    _delay_us(1);
+  }
+
+  return byte;
+}
+
+// Sends a byte with MSB ordering
+static
+void serial_write_byte(uint8_t data) {
+  uint8_t b = 8;
+  serial_output();
+  while( b-- ) {
+    if(data & (1 << b)) {
+      serial_high();
+    } else {
+      serial_low();
+    }
+    serial_delay();
+  }
+}
+
+// interrupt handle to be used by the slave device
+ISR(SERIAL_PIN_INTERRUPT) {
+  sync_send();
+
+  uint8_t checksum = 0;
+  for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
+    serial_write_byte(serial_slave_buffer[i]);
+    sync_send();
+    checksum += serial_slave_buffer[i];
+  }
+  serial_write_byte(checksum);
+  sync_send();
+
+  // wait for the sync to finish sending
+  serial_delay();
+
+  // read the middle of pulses
+  _delay_us(SERIAL_DELAY/2);
+
+  uint8_t checksum_computed = 0;
+  for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
+    serial_master_buffer[i] = serial_read_byte();
+    sync_send();
+    checksum_computed += serial_master_buffer[i];
+  }
+  uint8_t checksum_received = serial_read_byte();
+  sync_send();
+
+  serial_input(); // end transaction
+
+  if ( checksum_computed != checksum_received ) {
+    status |= SLAVE_DATA_CORRUPT;
+  } else {
+    status &= ~SLAVE_DATA_CORRUPT;
+  }
+}
+
+inline
+bool serial_slave_DATA_CORRUPT(void) {
+  return status & SLAVE_DATA_CORRUPT;
+}
+
+// Copies the serial_slave_buffer to the master and sends the
+// serial_master_buffer to the slave.
+//
+// Returns:
+// 0 => no error
+// 1 => slave did not respond
+int serial_update_buffers(void) {
+  // this code is very time dependent, so we need to disable interrupts
+  cli();
+
+  // signal to the slave that we want to start a transaction
+  serial_output();
+  serial_low();
+  _delay_us(1);
+
+  // wait for the slaves response
+  serial_input();
+  serial_high();
+  _delay_us(SERIAL_DELAY);
+
+  // check if the slave is present
+  if (serial_read_pin()) {
+    // slave failed to pull the line low, assume not present
+    sei();
+    return 1;
+  }
+
+  // if the slave is present syncronize with it
+  sync_recv();
+
+  uint8_t checksum_computed = 0;
+  // receive data from the slave
+  for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
+    serial_slave_buffer[i] = serial_read_byte();
+    sync_recv();
+    checksum_computed += serial_slave_buffer[i];
+  }
+  uint8_t checksum_received = serial_read_byte();
+  sync_recv();
+
+  if (checksum_computed != checksum_received) {
+    sei();
+    return 1;
+  }
+
+  uint8_t checksum = 0;
+  // send data to the slave
+  for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
+    serial_write_byte(serial_master_buffer[i]);
+    sync_recv();
+    checksum += serial_master_buffer[i];
+  }
+  serial_write_byte(checksum);
+  sync_recv();
+
+  // always, release the line when not in use
+  serial_output();
+  serial_high();
+
+  sei();
+  return 0;
+}
+
+#endif
diff --git a/keyboards/nyquist/serial.h b/keyboards/nyquist/serial.h
new file mode 100644 (file)
index 0000000..15fe4db
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef MY_SERIAL_H
+#define MY_SERIAL_H
+
+#include "config.h"
+#include <stdbool.h>
+
+/* TODO:  some defines for interrupt setup */
+#define SERIAL_PIN_DDR DDRD
+#define SERIAL_PIN_PORT PORTD
+#define SERIAL_PIN_INPUT PIND
+#define SERIAL_PIN_MASK _BV(PD0)
+#define SERIAL_PIN_INTERRUPT INT0_vect
+
+#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
+#define SERIAL_MASTER_BUFFER_LENGTH 1
+
+// Buffers for master - slave communication
+extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
+extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
+
+void serial_master_init(void);
+void serial_slave_init(void);
+int serial_update_buffers(void);
+bool serial_slave_data_corrupt(void);
+
+#endif
diff --git a/keyboards/nyquist/split_util.c b/keyboards/nyquist/split_util.c
new file mode 100644 (file)
index 0000000..39639c3
--- /dev/null
@@ -0,0 +1,84 @@
+#include <avr/io.h>
+#include <avr/wdt.h>
+#include <avr/power.h>
+#include <avr/interrupt.h>
+#include <util/delay.h>
+#include <avr/eeprom.h>
+#include "split_util.h"
+#include "matrix.h"
+#include "keyboard.h"
+#include "config.h"
+
+#ifdef USE_I2C
+#  include "i2c.h"
+#else
+#  include "serial.h"
+#endif
+
+volatile bool isLeftHand = true;
+
+static void setup_handedness(void) {
+  #ifdef EE_HANDS
+    isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
+  #else
+    // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c
+    #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
+      isLeftHand = !has_usb();
+    #else
+      isLeftHand = has_usb();
+    #endif
+  #endif
+}
+
+static void keyboard_master_setup(void) {
+#ifdef USE_I2C
+    i2c_master_init();
+#ifdef SSD1306OLED
+    matrix_master_OLED_init ();
+#endif
+#else
+    serial_master_init();
+#endif
+}
+
+static void keyboard_slave_setup(void) {
+#ifdef USE_I2C
+    i2c_slave_init(SLAVE_I2C_ADDRESS);
+#else
+    serial_slave_init();
+#endif
+}
+
+bool has_usb(void) {
+   USBCON |= (1 << OTGPADE); //enables VBUS pad
+   _delay_us(5);
+   return (USBSTA & (1<<VBUS));  //checks state of VBUS
+}
+
+void split_keyboard_setup(void) {
+   setup_handedness();
+
+   if (has_usb()) {
+      keyboard_master_setup();
+   } else {
+      keyboard_slave_setup();
+   }
+   sei();
+}
+
+void keyboard_slave_loop(void) {
+   matrix_init();
+
+   while (1) {
+      matrix_slave_scan();
+   }
+}
+
+// this code runs before the usb and keyboard is initialized
+void matrix_setup(void) {
+    split_keyboard_setup();
+
+    if (!has_usb()) {
+        keyboard_slave_loop();
+    }
+}
diff --git a/keyboards/nyquist/split_util.h b/keyboards/nyquist/split_util.h
new file mode 100644 (file)
index 0000000..3ae76c2
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef SPLIT_KEYBOARD_UTIL_H
+#define SPLIT_KEYBOARD_UTIL_H
+
+#include <stdbool.h>
+
+#ifdef EE_HANDS
+       #define EECONFIG_BOOTMAGIC_END      (uint8_t *)10
+       #define EECONFIG_HANDEDNESS         EECONFIG_BOOTMAGIC_END
+#endif
+
+#define SLAVE_I2C_ADDRESS           0x32
+
+extern volatile bool isLeftHand;
+
+// slave version of matix scan, defined in matrix.c
+void matrix_slave_scan(void);
+
+void split_keyboard_setup(void);
+bool has_usb(void);
+void keyboard_slave_loop(void);
+
+void matrix_master_OLED_init (void);
+
+#endif
index 4a152263865871300be8716d7d3fc1884f27d739..621271f9f62f1bcd7ff86a19f5b86c23ac71e294 100644 (file)
@@ -76,7 +76,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -86,17 +86,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
       switch(id) {
         case _DV:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_DV);
+            persistent_default_layer_set(1UL<<_DV);
           }
           break;
         case _QW:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_QW);
+            persistent_default_layer_set(1UL<<_QW);
           }
           break;
         case _CM:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_CM);
+            persistent_default_layer_set(1UL<<_CM);
           }
           break;
       }
index 4e631a3487f4030442c532b76340584d1c000d91..29ca73fb6f7567916d039c3865cadec446138050 100644 (file)
     {
       "f": 3
     },
-    "\n{\n\n\n\n\n\n\n\nH",
+    "\\\n\n\n\n\n\n\n\n\nH",
     {
       "c": "#c4bcbc",
       "f": 3
     },
-    "\n}\n\n\n\n\n\n\n\nJ",
+    "|\n\n\n\n\n\n\n\n\nJ",
     {
       "c": "#cccccc",
       "a": 7,
     },
     ";\n\n:",
     {
-      "a": 7,
       "f": 3
     },
-    "Enter"
+    "'\n\n\""
   ],
   [
     {
+      "a": 7,
       "f": 3
     },
     "Shift",
     "C",
     {
       "a": 4,
+      "fa": [
+        2,
+        2,
+        0,
+        2,
+        0,
+        0,
+        0,
+        0,
+        0,
+        2
+      ]
+    },
+    "\n[\n\n\n\n\n\n\n\nV",
+    "\n]\n\n\n\n\n\n\n\nB",
+    {
       "fa": [
         0,
         2,
         2
       ]
     },
-    "\\\n[\n\n\n\n\n\n\n\nV",
-    "|\n]\n\n\n\n\n\n\n\nB",
-    "`\n'\n\n\n\n\n\n\n\nN",
-    "~\n\"\n\n\n\n\n\n\n\nM",
+    "`\n{\n\n\n\n\n\n\n\nN",
+    "~\n}\n\n\n\n\n\n\n\nM",
     {
       "a": 6
     },
     {
       "a": 7
     },
-    "Shift\n\n\n\nEnter"
+    "Shift ↵"
   ],
   [
     {
index dcdbb726dfc056b478386a318ef39a79980d2e35..70e4c2bd47b5cc0a167e8a3674f8f2a04f4086b6 100644 (file)
Binary files a/keyboards/planck/keymaps/ab/keyboard-layout.png and b/keyboards/planck/keymaps/ab/keyboard-layout.png differ
index 8e1d28a65a5bcc35cea5fd81e472333f49ff6cf9..71512773b251d1918d6fa82b9ac04552e0863994 100644 (file)
@@ -56,20 +56,20 @@ const uint16_t PROGMEM fn_actions[] = {
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 [_QWERTY] = { /* QWERTY */
     {KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_BSPC},
-    {KC_LCTL, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_ENT},
+    {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_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, SFT_ENT},
     {KC_LCTL, KC_ESC,  KC_LGUI, KC_LALT, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
 },
 [_LOWER] = { /* LOWER */
     {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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
-    {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
+    {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
+    {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
     {BL,      ZM_NRM,  ZM_IN,   ZM_OUT,  KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
 },
 [_RAISE] = { /* RAISE */
     {KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12},
-    {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS},
-    {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV,  KC_TILD, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS},
+    {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
+    {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV,  KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
     {RESET,   KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, EM_UNDO, KC_VOLD, KC_VOLU, KC_MUTE}
 },
 [_CUSTOM] = { /* CUSTOM */
@@ -80,8 +80,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 }
 };
 
-// Set a layer persistantly.
-void persistant_default_layer_set(uint16_t default_layer) {
+// Set a layer persistently.
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
index d6280f074dc9c09a9040dff10bade568d7a956bb..94f930500ead7bd2e0afce349a9207833beca5a8 100644 (file)
@@ -4,7 +4,7 @@ A practical keymap that emulates standard QWERTY keyboard for Planck. Once you g
 ![Layout](keyboard-layout.png "Practical Keymap")
 ![Photo](keyboard-photo.jpg "Planck Keyboard")
 
-* Online keyboard layout editor: http://goo.gl/mlLAFZ
+* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/bda299020baaafe6a2a4a82e615e3cfc
 
 # Programming Instructions:
 Enter into programming mode and run the following command.
index 33929cb3afce4539e8c70af003d7df24180e9bd6..975017161b11b23aa8c5c6557271600b44aba9f2 100644 (file)
@@ -149,7 +149,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 #endif
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
index d149019fed2752b0580da99f13d7086eed91f1fd..61275cb26a53a1a0fb8f3753c226fa7e4593c366 100644 (file)
@@ -186,7 +186,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 #endif
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
@@ -216,7 +216,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index 9e18a3542eec4006809d3d23b02c959d44bc97ad..57144283e9a3816c2359d7b04e2691a148fb9100 100644 (file)
@@ -4,6 +4,7 @@ endif
 
 MOUSEKEY_ENABLE  = yes # Mouse keys(+4700)
 COMMAND_ENABLE   = yes # Commands for debug and configuration
+CONSOLE_ENABLE   = yes # Console for debug(+400)
 BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
 SLEEP_LED_ENABLE = no  # Breathing sleep LED during USB suspend
index 4d5be0a268b49548c968a12ca9a601a6360327ff..5f2810287bd41815814127f951b8646fb6297d33 100644 (file)
@@ -6,26 +6,47 @@
 #define _______ KC_TRNS
 #define XXXXXXX KC_NO
 
-#define ONESHOT_TAP_TOGGLE      2
-#define ONESHOT_TIMEOUT         500
+#define USB_MAX_POWER_CONSUMPTION 100
+#define ONESHOT_TAP_TOGGLE        2
+#define ONESHOT_TIMEOUT           500
 
-#define MOUSEKEY_INTERVAL       20
-#define MOUSEKEY_DELAY          0
-#define MOUSEKEY_TIME_TO_MAX    60
-#define MOUSEKEY_MAX_SPEED      7
-#define MOUSEKEY_WHEEL_DELAY    0
+#define MOUSEKEY_INTERVAL         20
+#define MOUSEKEY_DELAY            0
+#define MOUSEKEY_TIME_TO_MAX      40
+#define MOUSEKEY_MAX_SPEED        7
+#define MOUSEKEY_WHEEL_DELAY      0
 
+// dynamic macro keys
 #define DM_PLAY DYN_MACRO_PLAY1
 #define DM_STRT DYN_REC_START1
 #define DM_STOP DYN_REC_STOP
 
+// one-shot layer keys
 #define OSL_RSE OSL(RSE)
 #define OSL_LWR OSL(LWR)
 #define OSL_FUN OSL(FUN)
 
+// one-shot modifier keys
 #define OSM_CTL OSM(MOD_LCTL)
 #define OSM_ALT OSM(MOD_LALT)
 #define OSM_SFT OSM(MOD_LSFT)
 
+// tap dance keys
+#define TD_SCLN TD(TDK_SCLN)
+#define TD_COMM TD(TDK_COMM)
+#define TD_DOT  TD(TDK_DOT)
+#define TD_SLSH TD(TDK_SLSH)
+
+#define ACTION_TAP_DANCE_FN_KEYCODE(user_fn, kc) {  \
+    .fn = { NULL, user_fn, NULL }, \
+    .user_data = (void *)&((qk_tap_dance_pair_t) { kc, 0 }) \
+}
+
+#define ACTION_TAP_DANCE_FN_KEYCODE2(user_fn, kc1, kc2) {  \
+    .fn = { NULL, user_fn, NULL }, \
+    .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }) \
+}
+
+
 #endif
 
index ed7621c77beca351159437f7bae6d60a90e17042..09bdc3e407404856c378518f2b7c4ed6ae5698ed 100644 (file)
@@ -8,7 +8,7 @@ extern keymap_config_t keymap_config;
 
 enum planck_layers { DEF, LWR, RSE, FUN };
 enum planck_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE };
-enum tap_dance_keys { TD_SCLN };
+enum tap_dance_keys { TDK_SCLN, TDK_COMM, TDK_DOT, TDK_SLSH };
 
 #include "dynamic_macro.h"
 
@@ -26,8 +26,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
      */
     [DEF] = {
         {KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_ESC,  KC_BSPC, KC_Y,    KC_U,    KC_I,    KC_O,   KC_P},
-        {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)},
-        {KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    OSM_SFT, DM_PLAY, KC_N,    KC_M,    KC_COMM, KC_DOT, KC_SLSH},
+        {KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_TAB,  KC_ENT,  KC_H,    KC_J,    KC_K,    KC_L,   TD_SCLN},
+        {KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    OSM_SFT, DM_PLAY, KC_N,    KC_M,    TD_COMM, TD_DOT, TD_SLSH},
         {OSM_CTL, KC_LGUI, OSM_ALT, OSL_FUN, OSL_LWR, KC_SPC,  KC_SPC,  OSL_RSE, KC_LEFT, KC_DOWN, KC_UP,  KC_RGHT}
     },
     /* Lower
@@ -42,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
      * `-----------------------------------------------------------------------------------'
      */
     [LWR] = {
-        {KC_EXLM,   KC_AT,   KC_HASH, KC_DLR,  KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR,  KC_LPRN,    KC_RPRN},
-        {S(KC_GRV), _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______,  S(KC_LBRC), S(KC_RBRC)},
-        {_______,   _______, _______, _______, _______, _______, _______, _______, _______, _______,  S(KC_QUOT), S(KC_BSLS)},
-        {_______,   _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN,  KC_PGUP,    KC_END}
+        {KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
+        {KC_TILD, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, KC_LCBR, KC_RCBR},
+        {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DQUO, KC_PIPE},
+        {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
     },
     /* Raise
      * ,-----------------------------------------------------------------------------------.
@@ -59,10 +59,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
      * `-----------------------------------------------------------------------------------'
      */
     [RSE] = {
-        {KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    _______, _______, KC_6,    KC_7,    KC_8,     KC_9,    KC_0},
-        {KC_GRV,  _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL,  _______,  KC_LBRC, KC_RBRC},
-        {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,  KC_QUOT, KC_BSLS},
-        {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN,  KC_PGUP, KC_END}
+        {KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    _______, _______, KC_6,    KC_7,    KC_8,    KC_9,    KC_0},
+        {KC_GRV,  _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL,  _______, KC_LBRC, KC_RBRC},
+        {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_BSLS},
+        {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
     },
     /* Function
      * ,-----------------------------------------------------------------------------------.
@@ -84,8 +84,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
 };
 
+void tap(uint16_t keycode) {
+    register_code16(keycode);
+    unregister_code16(keycode);
+};
+
+void tap_dance_triple(qk_tap_dance_state_t *state, void *user_data) {
+    qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data;
+    uint16_t keycode = pair->kc1;
+
+    switch(state->count) {
+        case 2:
+            register_code(KC_LSFT);
+            tap(keycode);
+            unregister_code(KC_LSFT);
+            break;
+        case 3:
+            if (pair->kc2) {
+                keycode = pair->kc2;
+            }
+            tap(keycode);
+            tap(keycode);
+            break;
+        default:
+            tap(keycode);
+            break;
+    }
+}
+
 qk_tap_dance_action_t tap_dance_actions[] = {
-    [TD_SCLN]  = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, S(KC_SCLN))  // once for semi-colon, twice for colon
+    [TDK_SCLN]  = ACTION_TAP_DANCE_FN_KEYCODE2(tap_dance_triple, KC_SCLN, KC_COLN),
+    [TDK_COMM]  = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_COMM),
+    [TDK_DOT]   = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_DOT),
+    [TDK_SLSH]  = ACTION_TAP_DANCE_FN_KEYCODE (tap_dance_triple, KC_SLSH)
 };
 
 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
index a24ad9d485ff17157ecd2fa759def4a023d48874..feb9623314c10ad13ae6a925e761a8488d48bcd5 100644 (file)
@@ -88,8 +88,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 }
 };
 
-// Set a layer persistantly.
-void persistant_default_layer_set(uint16_t default_layer) {
+// Set a layer persistently.
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
index 569dbcc8aac396f8df88ae5f9df8499e4e63083d..17fad784e7c00d2889b9f6d0ae459d5edb5ee422 100644 (file)
@@ -204,7 +204,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -217,7 +217,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           break;
       return false;
@@ -226,7 +226,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
           }
           break;
       return false;
@@ -235,7 +235,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_DVORAK);
+            persistent_default_layer_set(1UL<<_DVORAK);
           }
           break;
       return false;
index 503976fa28e3a76fb60b517ed5315211aa419be6..6a649f2c8e40df32ce10222acb3167c4d9c7906e 100644 (file)
@@ -164,7 +164,7 @@ float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
 #endif
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -176,7 +176,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_workman, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_WORKMAN);
+        persistent_default_layer_set(1UL<<_WORKMAN);
       }
       return false;
       break;
@@ -185,7 +185,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         keymap_config.raw = eeconfig_read_keymap();
         keymap_config.nkro = 1;
         eeconfig_update_keymap(keymap_config.raw);
-        persistant_default_layer_set(1UL<<_PLOVER);
+        persistent_default_layer_set(1UL<<_PLOVER);
       }
       return false;
       break;
index cb7ccb58842f919a76bdcae9669dc1cd17570a51..7b9a68113c8f48f2c03e62f81af60ce195c98be9 100644 (file)
@@ -270,7 +270,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 #endif
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
index e1dd1dca511336b27ccde0d981c970674062a28c..7c4bf908c6cdb541f385140f20c3e9b9c3fe29aa 100644 (file)
@@ -6,7 +6,7 @@ needed, they will be mapped to home row keys. The `keymap.c` file will contain
 the exact changes. The diagrams in this README shows the highlights of the
 changes from the default mappings.
 
-I also decided to change all calls to `persistant_default_layer_set()` to
+I also decided to change all calls to `persistent_default_layer_set()` to
 `default_layer_set()` since this is my personal perference.
 
 ## Macros
index 2bda4b695659564b4505f06ea3b5d4ab4655a6f0..bf9735be8e168671caa7779eae3db3d881f46a4d 100644 (file)
@@ -183,7 +183,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 #endif
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -195,7 +195,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_workman, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_WORKMAN);
+        persistent_default_layer_set(1UL<<_WORKMAN);
       }
       return false;
       break;
@@ -212,7 +212,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
diff --git a/keyboards/planck/keymaps/johannes/Makefile b/keyboards/planck/keymaps/johannes/Makefile
new file mode 100644 (file)
index 0000000..0c0632d
--- /dev/null
@@ -0,0 +1,25 @@
+
+
+# Build Options
+#   change to "no" to disable the options, or define them in the Makefile in 
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE = no         # Console for debug(+400)
+COMMAND_ENABLE = no        # Commands for debug and configuration
+NKRO_ENABLE = yes            # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no      # Enable keyboard backlight functionality
+MIDI_ENABLE = no            # MIDI controls
+AUDIO_ENABLE = no           # Audio output on port C6
+UNICODE_ENABLE = no         # Unicode
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no    # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
\ 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 (file)
index 0000000..a337651
--- /dev/null
@@ -0,0 +1,99 @@
+#include "planck.h"
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+#define QWERTY 0
+#define LOWER 1
+#define RAISE 2
+#define FUNCTION 3
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |  '   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Ctrl |   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      | alt  |play/p| super|shift | Space|Raise | lower|  alt | altgr|      |fn    |
+ * `-----------------------------------------------------------------------------------'
+ */
+[QWERTY] = {
+  {KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_BSPC},
+  {KC_ESC,  KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT},
+  {KC_LCTRL, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT },
+  {_______, KC_LALT, LT(FUNCTION, KC_MPLY), KC_LGUI, KC_LSHIFT,    KC_SPC,  MO(RAISE),   MO(LOWER),   KC_LALT, KC_RALT, XXXXXXX,   MO(FUNCTION)}
+},
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  |      |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |      |      |  {   |  }   |  +   |      |      | Å    |  Ä   |  Ö   |   _  |      |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |      |      |      |      |      |      |      |      |      |   \  |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[LOWER] = {
+  {KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
+  {_______, _______,   KC_LCBR,   KC_RCBR,   KC_PLUS,   _______,   _______,   RALT(KC_W), RALT(KC_Q), RALT(KC_P), KC_UNDS, _______},
+  {_______, _______,   _______,   _______,   _______,  _______,  _______,_______, _______,_______, KC_BSLS, _______},
+  {_______,   _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+},
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  |  del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |      |      |  [   |  ]   |  =   |      |  left|  down|  up  | right|   -  |      |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |      |      |      |      |      |      |      |      |      |   |  |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[RAISE] = {
+  {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_DEL},
+  {_______,  _______,   KC_LBRC,   KC_RBRC,   KC_EQL,   _______,   KC_LEFT,   KC_DOWN, KC_UP,  KC_RIGHT, KC_MINS, _______},
+  {_______, _______,   _______,   _______,   _______,  _______,  _______,  _______, _______, _______, KC_PIPE, _______},
+  {_______,   _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+},
+
+/* Fn
+ * ,-----------------------------------------------------------------------------------.
+ * |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |  F7  |  F8  |  F9  | F10  |  F11 |  F12 '
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |      |      |      |      |      |      | prev | vol.d| vo.up| next |      |      |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |      |      |      |      |      | mute |      |      |      |      |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      | CAPS |      |      |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[FUNCTION] = {
+  {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_MEDIA_PREV_TRACK,  KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_NEXT_TRACK, _______, _______},
+  {_______,   _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, _______, _______, _______, _______},
+  {_______,  _______,   _______,   _______,   KC_CAPS,   _______,   _______,   _______, _______,  _______, _______, _______}
+},
+
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  return MACRO_NONE;
+};
diff --git a/keyboards/planck/keymaps/johannes/planck-layout.png b/keyboards/planck/keymaps/johannes/planck-layout.png
new file mode 100644 (file)
index 0000000..e863b80
Binary files /dev/null and b/keyboards/planck/keymaps/johannes/planck-layout.png differ
diff --git a/keyboards/planck/keymaps/johannes/readme.md b/keyboards/planck/keymaps/johannes/readme.md
new file mode 100644 (file)
index 0000000..bbb7acc
--- /dev/null
@@ -0,0 +1,6 @@
+# Planck layout for Swedish programmer
+I.e. easy access to special keys and åäö.
+
+![layout](planck-layout.png)
+
+[KBLE link](http://www.keyboard-layout-editor.com/#/gists/dc01cc2225899308a05ba3ef0031548b)
index e371e5b70b4923e0549cba495d29d85936ab5c6e..f9fa7318a04a9e9d2ce06ef48281271dfb15b95f 100644 (file)
@@ -213,7 +213,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 #endif
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -251,7 +251,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -260,7 +260,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
@@ -269,7 +269,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
diff --git a/keyboards/planck/keymaps/originerd/Makefile b/keyboards/planck/keymaps/originerd/Makefile
new file mode 100644 (file)
index 0000000..457a3d0
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/planck/keymaps/originerd/keymap.c b/keyboards/planck/keymaps/originerd/keymap.c
new file mode 100644 (file)
index 0000000..fb91983
--- /dev/null
@@ -0,0 +1,195 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include "planck.h"
+#include "action_layer.h"
+#ifdef AUDIO_ENABLE
+  #include "audio.h"
+#endif
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+
+enum planck_layers {
+  _NERD,
+  _LOWER,
+  _RAISE,
+  _ADJUST
+};
+
+enum planck_keycodes {
+  NERD = SAFE_RANGE,
+  LOWER,
+  RAISE
+};
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* NERD
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Tab  |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |Enter |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Shift |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | DEL  | Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_NERD] = {
+  {KC_ESC,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_BSPC},
+  {KC_TAB,  KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_ENT },
+  {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_DEL,  KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+},
+
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   _  |   +  |   {  |   }  |  \   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |ISO ~ |ISO | | Home | End  |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = {
+  {KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR,    KC_ASTR,    KC_LPRN, KC_RPRN, KC_BSPC},
+  {KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS,    KC_PLUS,    KC_LCBR, KC_RCBR, KC_BSLS},
+  {_______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END,  _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______,    KC_MNXT,    KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   -  |   =  |   [  |   ]  |  '   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |ISO # |ISO / |Pg Up |Pg Dn |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = {
+  {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
+  {KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_QUOT},
+  {_______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * |      | Reset|      |      |      |      |      |      |      |      |      |  Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |      |      |      |Aud on|Audoff|AGnorm|AGswap| NERD |      |      |      |      |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|      |      |      |      |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = {
+  {_______, RESET,   _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
+  {_______, _______, _______, AU_ON,   AU_OFF,  AG_NORM, AG_SWAP, NERD,    _______, _______, _______, _______},
+  {_______, MUV_DE,  MUV_IN,  MU_ON,   MU_OFF,  MI_ON,   MI_OFF,  _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+}
+
+
+};
+
+#ifdef AUDIO_ENABLE
+
+float tone_startup[][2]    = SONG(STARTUP_SOUND);
+float tone_nerd[][2]       = SONG(QWERTY_SOUND);
+float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
+
+float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
+#endif
+
+
+void persistent_default_layer_set(uint16_t default_layer) {
+  eeconfig_update_default_layer(default_layer);
+  default_layer_set(default_layer);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+    case NERD:
+      if (record->event.pressed) {
+        #ifdef AUDIO_ENABLE
+          PLAY_NOTE_ARRAY(tone_nerd, false, 0);
+        #endif
+        persistent_default_layer_set(1UL<<_NERD);
+      }
+      return false;
+      break;
+    case LOWER:
+      if (record->event.pressed) {
+        layer_on(_LOWER);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      } else {
+        layer_off(_LOWER);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      }
+      return false;
+      break;
+    case RAISE:
+      if (record->event.pressed) {
+        layer_on(_RAISE);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      } else {
+        layer_off(_RAISE);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+      }
+      return false;
+      break;
+  }
+  return true;
+}
+
+void matrix_init_user(void) {
+    #ifdef AUDIO_ENABLE
+        startup_user();
+    #endif
+}
+
+#ifdef AUDIO_ENABLE
+
+void startup_user()
+{
+    _delay_ms(20); // gets rid of tick
+    PLAY_NOTE_ARRAY(tone_startup, false, 0);
+}
+
+void shutdown_user()
+{
+    PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
+    _delay_ms(150);
+    stop_all_notes();
+}
+
+void music_on_user(void)
+{
+    music_scale_user();
+}
+
+void music_scale_user(void)
+{
+    PLAY_NOTE_ARRAY(music_scale, false, 0);
+}
+
+#endif
diff --git a/keyboards/planck/keymaps/originerd/readme.md b/keyboards/planck/keymaps/originerd/readme.md
new file mode 100644 (file)
index 0000000..6b62700
--- /dev/null
@@ -0,0 +1,58 @@
+# The Originerd Planck Layout
+- MIT Layout
+
+## Nerd - Qwerty
+
+```
+,-----------------------------------------------------------------------------------.
+| Esc  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Bksp |
+|------+------+------+------+------+-------------+------+------+------+------+------|
+| Tab  |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |Enter |
+|------+------+------+------+------+------|------+------+------+------+------+------|
+| Shift|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Shift |
+|------+------+------+------+------+------+------+------+------+------+------+------|
+| DEL  | Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
+`-----------------------------------------------------------------------------------'
+```
+
+## Lower
+
+```
+,-----------------------------------------------------------------------------------.
+|   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Bksp |
+|------+------+------+------+------+-------------+------+------+------+------+------|
+| Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   _  |   +  |   {  |   }  |  \   |
+|------+------+------+------+------+------|------+------+------+------+------+------|
+|      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |ISO ~ |ISO | | Home | End  |      |
+|------+------+------+------+------+------+------+------+------+------+------+------|
+|      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+`-----------------------------------------------------------------------------------'
+```
+
+## Upper Layer
+
+```
+,-----------------------------------------------------------------------------------.
+|   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+|------+------+------+------+------+-------------+------+------+------+------+------|
+| Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   -  |   =  |   [  |   ]  |  '   |
+|------+------+------+------+------+------|------+------+------+------+------+------|
+|      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |ISO # |ISO / |Pg Up |Pg Dn |      |
+|------+------+------+------+------+------+------+------+------+------+------+------|
+|      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+`-----------------------------------------------------------------------------------'
+```
+
+## Adjust
+
+```
+,-----------------------------------------------------------------------------------.
+|      | Reset|      |      |      |      |      |      |      |      |      |  Del |
+|------+------+------+------+------+-------------+------+------+------+------+------|
+|      |      |      |Aud on|Audoff|AGnorm|AGswap| NERD |      |      |      |      |
+|------+------+------+------+------+------|------+------+------+------+------+------|
+|      |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|      |      |      |      |      |
+|------+------+------+------+------+------+------+------+------+------+------+------|
+|      |      |      |      |      |             |      |      |      |      |      |
+`-----------------------------------------------------------------------------------'
+```
index 38275b40308e9c228736bcb194cf0b65997049d3..d991bece13aa0bf608da341e73226e4022a668dd 100644 (file)
@@ -143,7 +143,7 @@ float goodbye[][2] = SONG(GOODBYE_SOUND);
 #endif
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -156,7 +156,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           break;
         case _COLEMAK:
@@ -164,7 +164,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
           }
           break;
         case _DVORAK:
@@ -172,7 +172,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_DVORAK);
+            persistent_default_layer_set(1UL<<_DVORAK);
           }
           break;
         case _LOWER:
index 9b212ab25918fa4694d9c2aebeee0f305c1d2267..0eb35a9f8741db155d5e3be91b573ae0982d3dff 100644 (file)
@@ -100,7 +100,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 #endif
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -112,7 +112,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -121,7 +121,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
@@ -130,7 +130,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index 6ad95832d24ae27f07070159a73c400a18ba822e..741e8e6504ee59c2e2747955f5d3d60a9c7da3b2 100644 (file)
@@ -233,7 +233,7 @@ float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
 
 #endif /* AUDIO_ENABLE */
 
-void persistant_default_layer_set(uint16_t default_layer)
+void persistent_default_layer_set(uint16_t default_layer)
 {
     eeconfig_update_default_layer(default_layer);
     default_layer_set(default_layer);
@@ -344,7 +344,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
         case MACRO_QWERTY:
             if (record->event.pressed)
             {
-                persistant_default_layer_set(1UL<<LAYER_QWERTY);
+                persistent_default_layer_set(1UL<<LAYER_QWERTY);
             }
             break;
 
index 4d5d3d7ef6ea339ca2497f1bee5ec0f28c9c4c0a..bf8249cc8ae2b07741faf565383a9484a94ad7fb 100644 (file)
@@ -139,7 +139,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 #endif
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -151,7 +151,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -160,7 +160,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
index 708f699da9fddae77ad9f0bae60614902e057d1e..8cf24d472b447c93cc3875be3509ea792ee57d82 100644 (file)
@@ -162,7 +162,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 #endif
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -174,7 +174,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -183,7 +183,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
@@ -192,7 +192,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index e880597319c88582f3f4acfa052a25862963cee1..c047d56b3c038f4d6e40042019d429f235b5896e 100644 (file)
@@ -183,7 +183,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 #endif
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -195,7 +195,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -204,7 +204,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
@@ -213,7 +213,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index 1b4ca8ed7d914462b66812712b35783ad7068545..51b980e086eb3d3be833235d35e85b33ba44bda2 100644 (file)
@@ -209,7 +209,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -222,7 +222,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           break;
         case _COLEMAK:
@@ -230,7 +230,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
           }
           break;
         case _DVORAK:
@@ -238,7 +238,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_DVORAK);
+            persistent_default_layer_set(1UL<<_DVORAK);
           }
           break;
         case _LOWER:
index 329bb043a5b3957ae10a9e4cecd3d6f72cafffbc..c60c6e7194538804ee78130472e2da97a945caa4 100644 (file)
@@ -159,7 +159,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 #endif
 
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -171,7 +171,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
@@ -180,7 +180,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
@@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
           PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index 2c47b228969068ab28f9d3b9b732e95eb1083b9f..0b1dd7619c2553fab3f3bb94051838b43cbcdd96 100644 (file)
@@ -16,7 +16,7 @@ void tap(uint16_t keycode){
     unregister_code(keycode);
 };
 
-void persistant_default_layer_set(uint16_t default_layer){
+void persistent_default_layer_set(uint16_t default_layer){
     eeconfig_update_default_layer(default_layer);
     default_layer_set(default_layer);
 };
@@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   switch (keycode) {
     case COLEMAK:
         if(record->event.pressed){
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
@@ -209,7 +209,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         break;
     case SWCOLE:
         if(record->event.pressed){
-            persistant_default_layer_set(1UL<<_SWCOLE);
+            persistent_default_layer_set(1UL<<_SWCOLE);
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_swcole, false, 0);
             #endif
index 6c4b8a6fab327e0f88d13a32a1839bf68c9d3edf..2f06c8c314daf1ef051f2a41dd184c805ab640c6 100644 (file)
@@ -134,7 +134,7 @@ void matrix_init_user(void) {
   #endif
 }
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -146,7 +146,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
         PLAY_NOTE_ARRAY(tone_colemak, false, 0);
         #endif
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       break;
     case GAME:
@@ -154,7 +154,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         #ifdef AUDIO_ENABLE
         PLAY_NOTE_ARRAY(tone_game, false, STACCATO);
         #endif
-        persistant_default_layer_set(1UL<<_GAME);
+        persistent_default_layer_set(1UL<<_GAME);
       }
       break;
     case RAISE:
index a500a36494132b380ca594abff6f66e553170507..7b5be07344d1812a61ca771a8e4987f46193dce0 100644 (file)
@@ -225,7 +225,7 @@ float tone_colemak[][2]    = SONG(COLEMAK_SOUND);
 float goodbye[][2] = SONG(GOODBYE_SOUND);
 #endif
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -238,7 +238,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           break;
         case _COLEMAK:
@@ -246,7 +246,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
           }
           break;
         case _DVORAK:
@@ -254,7 +254,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_DVORAK);
+            persistent_default_layer_set(1UL<<_DVORAK);
           }
           break;
         case _GAME:
@@ -262,7 +262,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_GAME);
+            persistent_default_layer_set(1UL<<_GAME);
           }
           break;
         case _NUMPAD:
@@ -270,7 +270,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_NUMPAD);
+            persistent_default_layer_set(1UL<<_NUMPAD);
           }
           break;
         case _ARROW:
@@ -278,7 +278,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_LOWER);
+            persistent_default_layer_set(1UL<<_LOWER);
           }
           break;
         case _LOWER:
index 3313af945a7602a53190ad8a269e81a7807bbbd4..2516a726bdb2fbfebe4c1654c525f35b719c624a 100644 (file)
@@ -180,7 +180,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
 #endif
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -192,7 +192,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           return false;
           break;
@@ -201,7 +201,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
           }
           return false;
           break;
@@ -210,7 +210,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_DVORAK);
+            persistent_default_layer_set(1UL<<_DVORAK);
           }
           return false;
           break;
index 72ccc86cd2b0cd644baed085e1cc7135bcf277cb..09f465de1eb77c8d0c7252325fbbdb46802a543e 100644 (file)
@@ -196,7 +196,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
 #endif
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   switch (keycode) {
         case QWERTY:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           return false;
           break;
@@ -231,7 +231,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
           break;
         case MQWERTY:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_MQWERTY);
+            persistent_default_layer_set(1UL<<_MQWERTY);
           }
           return false;
           break;
index 9691be91d951472e2aefacbcb1404950c945fda9..214f51a46faaf75cd8ea67c654426c97993c2d22 100644 (file)
@@ -82,7 +82,7 @@ float tone_startup[][2] = {
 float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 float music_scale[][2]  = SONG(MUSIC_SCALE_SOUND);
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
diff --git a/keyboards/preonic/keymaps/nikchi/Makefile b/keyboards/preonic/keymaps/nikchi/Makefile
new file mode 100644 (file)
index 0000000..3d4659c
--- /dev/null
@@ -0,0 +1,3 @@
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
\ 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 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+   - MIDI notes can be sent when in Music mode is on
+*/
+#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+   - MIDI notes can be added to the keymap
+   - Octave shift and transpose
+   - Virtual sustain, portamento, and modulation wheel
+   - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
+
+#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 (file)
index 0000000..249dd1e
--- /dev/null
@@ -0,0 +1,221 @@
+#include "preonic.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+#ifdef AUDIO_ENABLE
+  #include "audio.h"
+#endif
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+
+enum preonic_layers {
+  _QWERTY,
+  _COLEMAK,
+  _DVORAK,
+  _LOWER,
+  _RAISE,
+  _ADJUST
+};
+
+enum preonic_keycodes {
+  QWERTY = SAFE_RANGE,
+  LOWER,
+  RAISE,
+  BACKLIT
+};
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | CTRL |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Lower|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Raise |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |BKSP  |SHIFT |ENTER |SPC   | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = {
+  {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
+  {KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_DEL},
+  {KC_LCTL, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT},
+  {LOWER  , KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, RAISE  },
+  {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_LSFT, KC_ENT,  KC_SPC,  KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+},
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   _  |   +  |   {  |   }  |  |   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |ISO ~ |ISO | |      |      |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = {
+  {KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
+  {KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
+  {KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
+  {_______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   -  |   =  |   [  |   ]  |  \   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |ISO # |ISO / |      |      |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = {
+  {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
+  {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_DEL},
+  {KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS},
+  {_______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  KC_NUHS, KC_NUBS, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      | Reset|      |      |      |      |      |      |      |      |      |  Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |      |      |      |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|      |      |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff|      |      |      |      |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = {
+  {KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12},
+  {_______, RESET,   _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
+  {_______, _______, _______, AU_ON,   AU_OFF,  AG_NORM, AG_SWAP, QWERTY,  _______, _______,  _______, _______},
+  {_______, MUV_DE,  MUV_IN,  MU_ON,   MU_OFF,  MI_ON,   MI_OFF,  _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+}
+
+
+};
+
+#ifdef AUDIO_ENABLE
+float tone_startup[][2] = {
+  {NOTE_B5, 20},
+  {NOTE_B6, 8},
+  {NOTE_DS6, 20},
+  {NOTE_B6, 8}
+};
+
+float tone_qwerty[][2]     = SONG(QWERTY_SOUND);
+float tone_dvorak[][2]     = SONG(DVORAK_SOUND);
+float tone_colemak[][2]    = SONG(COLEMAK_SOUND);
+
+float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
+
+float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
+#endif
+
+void persistent_default_layer_set(uint16_t default_layer) {
+  eeconfig_update_default_layer(default_layer);
+  default_layer_set(default_layer);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+        case QWERTY:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+            #endif
+            persistent_default_layer_set(1UL<<_QWERTY);
+          }
+          return false;
+          break;
+        case LOWER:
+          if (record->event.pressed) {
+            layer_on(_LOWER);
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+          } else {
+            layer_off(_LOWER);
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+          }
+          return false;
+          break;
+        case RAISE:
+          if (record->event.pressed) {
+            layer_on(_RAISE);
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+          } else {
+            layer_off(_RAISE);
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+          }
+          return false;
+          break;
+        case BACKLIT:
+          if (record->event.pressed) {
+            register_code(KC_RSFT);
+            #ifdef BACKLIGHT_ENABLE
+              backlight_step();
+            #endif
+          } else {
+            unregister_code(KC_RSFT);
+          }
+          return false;
+          break;
+      }
+    return true;
+};
+
+void matrix_init_user(void) {
+    #ifdef AUDIO_ENABLE
+        startup_user();
+    #endif
+}
+
+#ifdef AUDIO_ENABLE
+
+void startup_user()
+{
+    _delay_ms(20); // gets rid of tick
+    PLAY_NOTE_ARRAY(tone_startup, false, 0);
+}
+
+void shutdown_user()
+{
+    PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
+    _delay_ms(150);
+    stop_all_notes();
+}
+
+void music_on_user(void)
+{
+    music_scale_user();
+}
+
+void music_scale_user(void)
+{
+    PLAY_NOTE_ARRAY(music_scale, false, 0);
+}
+
+#endif
diff --git a/keyboards/preonic/keymaps/nikchi/readme.md b/keyboards/preonic/keymaps/nikchi/readme.md
new file mode 100644 (file)
index 0000000..e911968
--- /dev/null
@@ -0,0 +1 @@
+# The default Preonic layout - largely based on the Planck's
\ No newline at end of file
index a10deb7500099a0a41c3fd74aef11f83d16220d8..5972e918cf1dc46f8c1abcbbba28d316eac3d658 100644 (file)
@@ -183,7 +183,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
 #endif
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -195,7 +195,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           return false;
           break;
@@ -204,7 +204,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
           }
           return false;
           break;
@@ -213,7 +213,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_DVORAK);
+            persistent_default_layer_set(1UL<<_DVORAK);
           }
           return false;
           break;
index c8457cda1f220421f6148ffe0118db76d7762b71..1275aa18fc25c0e7ddce7bae90dae8ebbf293055 100644 (file)
@@ -177,7 +177,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
 #endif
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           return false;
           break;
@@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
           }
           return false;
           break;
@@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_DVORAK);
+            persistent_default_layer_set(1UL<<_DVORAK);
           }
           return false;
           break;
index 2c47b228969068ab28f9d3b9b732e95eb1083b9f..0b1dd7619c2553fab3f3bb94051838b43cbcdd96 100644 (file)
@@ -16,7 +16,7 @@ void tap(uint16_t keycode){
     unregister_code(keycode);
 };
 
-void persistant_default_layer_set(uint16_t default_layer){
+void persistent_default_layer_set(uint16_t default_layer){
     eeconfig_update_default_layer(default_layer);
     default_layer_set(default_layer);
 };
@@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   switch (keycode) {
     case COLEMAK:
         if(record->event.pressed){
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
@@ -209,7 +209,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
         break;
     case SWCOLE:
         if(record->event.pressed){
-            persistant_default_layer_set(1UL<<_SWCOLE);
+            persistent_default_layer_set(1UL<<_SWCOLE);
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_swcole, false, 0);
             #endif
index 5b7b28207c83a2a3b4b152835232603d117b09e0..4fa2a74de4de3f7348d600cc330f8188898508b9 100644 (file)
@@ -45,6 +45,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not
 * [JD45](/keyboards/jd45) &mdash; Another Geekhack community project, designed by jdcarpe.
 * [KC60](/keyboards/kc60) &mdash; A programmable Chinese-made keyboard, lost in the mists of time.
 * [Kinesis Advantage](/keyboards/kinesis) &mdash; Contoured ergonomic keyboard by Kinesis Computer Ergonomics.
+* [KMAC](/keyboards/kmac) &mdash; Korean custom keyboard.
 * [The Kitten Paw](/keyboards/kitten_paw) &mdash; A replacement controller (2016 revision) for the Filco Majestouch by [Bathroom Epiphanies](https://github.com/BathroomEpiphanies).
 * [Lets Split](/keyboards/lets_split) - Split ortholinear 40% keyboard.
 * [Phantom](/keyboards/phantom) &mdash; A tenkeyless kit by Teel, also from Geekhack.
index 3fc18915a8753f80ce81280f3be7ab59405b4d8f..048e8074810bafee92672a004e793a4935ab38f2 100644 (file)
@@ -31,7 +31,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -41,7 +41,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
       switch(id) {
         case _NP:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_NP);
+            persistent_default_layer_set(1UL<<_NP);
           }
           break;
       }
index 5ee7a752b8e3cfa79e2de46636ce90956aa40dd7..1c6aa7883f9e4c592684030d1f3dbf1416e65d8e 100644 (file)
@@ -38,7 +38,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -48,12 +48,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
       switch(id) {
         case _L1:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_L1);
+            persistent_default_layer_set(1UL<<_L1);
           }
           break;
         case _NP:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_NP);
+            persistent_default_layer_set(1UL<<_NP);
           }
           break;
       }
diff --git a/keyboards/satan/keymaps/colemak/Makefile b/keyboards/satan/keymaps/colemak/Makefile
new file mode 100644 (file)
index 0000000..2a7ff27
--- /dev/null
@@ -0,0 +1,21 @@
+# Build Options
+#   change to "no" to disable the options, or define them in the Makefile in 
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE = no         # Console for debug(+400)
+COMMAND_ENABLE = yes        # Commands for debug and configuration
+NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes       # Enable keyboard backlight functionality
+MIDI_ENABLE = no            # MIDI controls
+AUDIO_ENABLE = no           # Audio output on port C6
+UNICODE_ENABLE = no         # Unicode
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
diff --git a/keyboards/satan/keymaps/colemak/keymap.c b/keyboards/satan/keymaps/colemak/keymap.c
new file mode 100644 (file)
index 0000000..ffb0d10
--- /dev/null
@@ -0,0 +1,98 @@
+#include "satan.h"
+
+
+// Used for SHIFT_ESC
+#define MODS_CTRL_MASK  (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _BL 0
+#define _FL 1
+
+#define _______ KC_TRNS
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  /* Keymap _BL: (Base Layer) Default Layer
+   * ,-----------------------------------------------------------.
+   * |Esc~| 1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp |
+   * |-----------------------------------------------------------|
+   * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \  |
+   * |-----------------------------------------------------------|
+   * |CAPS   |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return |
+   * |-----------------------------------------------------------|
+   * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     |
+   * |-----------------------------------------------------------|
+   * |Ctrl|Gui |Alt |      Space            |Alt |Gui |FN  |Ctrl |
+   * `-----------------------------------------------------------'
+   */
+[_BL] = KEYMAP_ANSI(
+  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_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, \
+  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,  \
+  KC_LSFT,         KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,   KC_K,   KC_M,   KC_COMM,KC_DOT, KC_SLSH,         KC_RSFT, \
+  KC_LCTL, MO(_FL), KC_LGUI,                KC_SPC,                                 KC_RALT,KC_RGUI, MO(_FL),KC_RCTL),
+
+  /* Keymap _FL: Function Layer
+   * ,-----------------------------------------------------------.
+   * |   |   |   |   |   |   |   |   |   |   |   |   |   |  RESET|
+   * |-----------------------------------------------------------|
+   * |     |   |   |   |   |   |   |   |   |   |   |BL-|BL+|BL   |
+   * |--------------------------------------------ΩΩ---------------|
+   * |      |   |   |   |   |   |   |       |   |   |   |        |
+   * |-----------------------------------------------------------|
+   * |        | F1|F2 | F3|F4 | F5| F6| F7| F8|   |   |          |
+   * |-----------------------------------------------------------|
+   * |    |    |    |                        |    |    |    |    |
+   * `-----------------------------------------------------------'
+   */
+[_FL] = KEYMAP_ANSI(
+  #ifdef RGBLIGHT_ENABLE
+  KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,  \
+  _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG, \
+  _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,        _______, \
+  _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______, \
+  _______,_______,_______,                 _______,                       _______,_______,_______, _______),
+  #else
+  KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,  \
+  _______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, BL_DEC, BL_INC,BL_TOGG, \
+  KC_DEL, KC_VOLD,KC_MUTE,KC_VOLU,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,  KC_RGHT,_______,_______, \
+  _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
+  _______,_______,_______,                _______,                        _______,_______,_______,_______),
+  #endif
+};
+
+enum function_id {
+    SHIFT_ESC,
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+  [0]  = ACTION_FUNCTION(SHIFT_ESC),
+};
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
+  static uint8_t shift_esc_shift_mask;
+  switch (id) {
+    case SHIFT_ESC:
+      shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
+      if (record->event.pressed) {
+        if (shift_esc_shift_mask) {
+          add_key(KC_GRV);
+          send_keyboard_report();
+        } else {
+          add_key(KC_ESC);
+          send_keyboard_report();
+        }
+      } else {
+        if (shift_esc_shift_mask) {
+          del_key(KC_GRV);
+          send_keyboard_report();
+        } else {
+          del_key(KC_ESC);
+          send_keyboard_report();
+        }
+      }
+      break;
+  }
+}
diff --git a/keyboards/satan/keymaps/colemak/readme.md b/keyboards/satan/keymaps/colemak/readme.md
new file mode 100644 (file)
index 0000000..59bd4d1
--- /dev/null
@@ -0,0 +1 @@
+# Colemak layout for GH60 Satan
index d90849914eb1b31cc09913ab545381269a9c617a..bf919da87c73f84e0dc0abc87ee2f4a1d1542bd5 100644 (file)
@@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   )
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -120,19 +120,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   switch (keycode) {
     case QWERTY:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
     case COLEMAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
     case DVORAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index 628ade9b6162899372c019b4c4129b0910c13e16..f4aa50eba106a698df0afe75eaf5678f26fc207c 100644 (file)
@@ -177,7 +177,7 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
 float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
 #endif
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_QWERTY);
+            persistent_default_layer_set(1UL<<_QWERTY);
           }
           return false;
           break;
@@ -198,7 +198,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_colemak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_COLEMAK);
+            persistent_default_layer_set(1UL<<_COLEMAK);
           }
           return false;
           break;
@@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
             #ifdef AUDIO_ENABLE
               PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
             #endif
-            persistant_default_layer_set(1UL<<_DVORAK);
+            persistent_default_layer_set(1UL<<_DVORAK);
           }
           return false;
           break;
index b9fe33a7ce7ea75fca13caf80c78eee955bc93f7..b4a32d6f6e33a3c31ad8876c75d3e73fc7078b7d 100644 (file)
@@ -69,7 +69,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -79,17 +79,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
       switch(id) {
         case _DV:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_DV);
+            persistent_default_layer_set(1UL<<_DV);
           }
           break;
         case _QW:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_QW);
+            persistent_default_layer_set(1UL<<_QW);
           }
           break;
         case _CM:
           if (record->event.pressed) {
-            persistant_default_layer_set(1UL<<_CM);
+            persistent_default_layer_set(1UL<<_CM);
           }
           break;
       }
index 1bb1015c3649b28cd0d192a718066c3905e11e72..0d0c07164ae727f6fe450a48ce3c13a0fb2c9846 100644 (file)
@@ -285,7 +285,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 /*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
index 43d20958a6c7b377ce6676156f77f42a41ddb921..f781d55558752c86639a1a73bb2652142c4c39ba 100644 (file)
@@ -8,7 +8,7 @@ needed, they will be mapped to home row keys. The `keymap.c` file will contain
 the exact changes. The diagrams in this README shows the highlights of the
 changes from the default mappings.
 
-I also decided to change all calls to `persistant_default_layer_set()` to
+I also decided to change all calls to `persistent_default_layer_set()` to
 `default_layer_set()` since this is my personal perference.
 
 ## Macros
index 532e74de08ea7681fd8eba16b7887cc03e87070c..dfd6244668514cab18ff7732fd0587fb057889e6 100644 (file)
@@ -171,7 +171,7 @@ ALT_T(BACKLIT),   _______   , _______ ,     KC_MPLY    ,     KC_MNXT     , _____
 /*`---------+---------------+---------+-------^^^------+-------^^^-------+----------+--------+--------+--------------'*/
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -180,19 +180,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   switch (keycode) {
     case QWERTY:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
     case COLEMAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
     case DVORAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index 3ff16de35f091d10e02e40637c2fdf7b3d110e44..d710d80240279de192f27f937080b1bf87b1221e 100644 (file)
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   }
 };
 
-void persistant_default_layer_set(uint16_t default_layer) {
+void persistent_default_layer_set(uint16_t default_layer) {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
 }
@@ -80,19 +80,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
   switch (keycode) {
     case QWERTY:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_QWERTY);
+        persistent_default_layer_set(1UL<<_QWERTY);
       }
       return false;
       break;
     case COLEMAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_COLEMAK);
+        persistent_default_layer_set(1UL<<_COLEMAK);
       }
       return false;
       break;
     case DVORAK:
       if (record->event.pressed) {
-        persistant_default_layer_set(1UL<<_DVORAK);
+        persistent_default_layer_set(1UL<<_DVORAK);
       }
       return false;
       break;
index 3282761c0fb76b641ab38332488146f6f0389998..15ce688973fa812ff00f07b6bbc83ad836f772dd 100644 (file)
@@ -299,7 +299,7 @@ float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
 
 #endif /* AUDIO_ENABLE */
 
-void persistant_default_layer_set(uint16_t default_layer)
+void persistent_default_layer_set(uint16_t default_layer)
 {
   eeconfig_update_default_layer(default_layer);
   default_layer_set(default_layer);
@@ -427,7 +427,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
   case MACRO_QWERTY:
     if (record->event.pressed)
     {
-      persistant_default_layer_set(1UL<<LAYER_QWERTY);
+      persistent_default_layer_set(1UL<<LAYER_QWERTY);
     }
     break;
 
index f242405defbdcd7416371c87be7271a1a96e19b3..045ee95b5f170d5902157554ff73dbfdec04ebaa 100644 (file)
@@ -274,6 +274,10 @@ bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t *record)
                 macro_id = 0;
             }
             return false;
+        case DYN_MACRO_PLAY1:
+        case DYN_MACRO_PLAY2:
+            dprintln("dynamic macro: ignoring macro play key while recording");
+            return false;
         default:
             /* Store the key in the macro buffer and process it normally. */
             switch (macro_id) {
index b807ec3c30820e2e32a83c63a6d95d9419e2551d..4fd45810bb547828ba189c8fc817f4be919633c5 100644 (file)
@@ -127,14 +127,22 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
   return true;
 }
 
+
+
 void matrix_scan_tap_dance () {
   if (highest_td == -1)
     return;
+  uint16_t tap_user_defined;
 
-for (int i = 0; i <= highest_td; i++) {
+for (uint8_t i = 0; i <= highest_td; i++) {
     qk_tap_dance_action_t *action = &tap_dance_actions[i];
-
-    if (action->state.count && timer_elapsed (action->state.timer) > TAPPING_TERM) {
+    if(action->custom_tapping_term > 0 ) {
+      tap_user_defined = action->custom_tapping_term;
+    }
+    else{
+      tap_user_defined = TAPPING_TERM;
+    }
+    if (action->state.count && timer_elapsed (action->state.timer) > tap_user_defined) {
       process_tap_dance_action_on_dance_finished (action);
       reset_tap_dance (&action->state);
     }
index 330809f83a9ebd822c01af9b8dbce1026c49a35d..f42c154a056da303a3045b542600a7152ee59169 100644 (file)
@@ -44,6 +44,7 @@ typedef struct
     qk_tap_dance_user_fn_t on_reset;
   } fn;
   qk_tap_dance_state_t state;
+  uint16_t custom_tapping_term;
   void *user_data;
 } qk_tap_dance_action_t;
 
@@ -68,6 +69,12 @@ typedef struct
     .user_data = NULL, \
   }
 
+#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) { \
+    .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \
+    .user_data = NULL, \
+    .custom_tapping_term = tap_specific_tapping_term, \
+  }
+
 extern qk_tap_dance_action_t tap_dance_actions[];
 
 /* To be used internally */
index 0227fbdd7b148d5f4fc26378d0785632c1c7b216..75f35112b133db91c16d75a966a7b76d5afb2e12 100644 (file)
@@ -49,7 +49,7 @@ bool process_unicode_map(uint16_t keycode, keyrecord_t *record) {
   if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) {
     const uint32_t* map = unicode_map;
     uint16_t index = keycode - QK_UNICODE_MAP;
-    uint32_t code = pgm_read_dword_far(&map[index]);
+    uint32_t code = pgm_read_dword(&map[index]);
     if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) {
       // Convert to UTF-16 surrogate pair
       code -= 0x10000;
index f7bf14b6ab5b308369f37c5fa70951215d30868d..6cdce72400ccdabdb78a33a8131d46e89a9a138d 100644 (file)
--- a/readme.md
+++ b/readme.md
@@ -1,18 +1,21 @@
 # Quantum Mechanical Keyboard Firmware
 
-[![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)
+[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware)
+[![Gitter](https://img.shields.io/gitter/room/qmk/qmk_firmware.js.svg)](https://gitter.im/qmk/qmk_firmware)
+[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm)
+[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)
+[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/)
 
-This 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/).
+This 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/).
 
-## Official website (currently under construction with the move to the wiki)
+## Official website
 
-For 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.
+[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.
 
-## Included Keyboards
+## Supported Keyboards
 
 * [Planck](/keyboards/planck/)
 * [Preonic](/keyboards/preonic/)
-* [Atomic](/keyboards/atomic/)
 * [ErgoDox EZ](/keyboards/ergodox/)
 * [Clueboard](/keyboards/clueboard/)
 * [Cluepad](/keyboards/cluepad/)
@@ -21,19 +24,8 @@ The project also includes community support for [lots of other keyboards](/keybo
 
 ## Maintainers
 
-QMK 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 :)
+QMK 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).
 
-This 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).
+## Documentation
 
-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).
-
-## Documentation roadmap
-
-This 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:
-
-* [**The Wiki**](https://github.com/qmk/qmk_firmware/wiki) - the entirety of the readme has been moved here
-* 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.
-* The list of possible keycodes you can use in your keymap is actually spread out in a few different places:
-  * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes.
-  * [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.
-* The [TMK documentation](doc/TMK_README.md). QMK is based on TMK, and this explains how it works internally.
+[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.
diff --git a/secrets.tar.enc b/secrets.tar.enc
new file mode 100644 (file)
index 0000000..03fdf41
Binary files /dev/null and b/secrets.tar.enc differ
index 3e0bd7dbc8692fbe1cedf8ca021c0fbe76d4f3f8..edec2acb4a3b83c57610fd539c9626c6341bb6d5 100644 (file)
@@ -95,27 +95,35 @@ endif
 
 ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
     TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
+       TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
 endif
 
 ifeq ($(strip $(BLUETOOTH)), AdafruitBLE)
-               TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
-               TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_BLE
+       TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
+       TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_BLE
+       TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
 endif
 
 ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey)
-               TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
-               TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_EZKEY
+       TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
+       TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_EZKEY
+    TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
 endif
 
 ifeq ($(strip $(BLUETOOTH)), RN42)
-               TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
-               TMK_COMMON_DEFS += -DMODULE_RN42
+       TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE
+       TMK_COMMON_DEFS += -DMODULE_RN42
+       TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
 endif
 
 ifeq ($(strip $(ONEHAND_ENABLE)), yes)
     TMK_COMMON_DEFS += -DONEHAND_ENABLE
 endif
 
+ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes)
+    TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
+endif
+
 ifeq ($(strip $(KEYMAP_SECTION_ENABLE)), yes)
     TMK_COMMON_DEFS += -DKEYMAP_SECTION_ENABLE
 
index 8640dfab359ababdf9f32f44d26602c9b4cf6a04..cffc0b9ebe1c994ee53edad4a072c08b5d97fd30 100644 (file)
@@ -26,6 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "action_macro.h"
 #include "action_util.h"
 #include "action.h"
+#include "wait.h"
 
 #ifdef DEBUG_ACTION
 #include "debug.h"
@@ -33,6 +34,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "nodebug.h"
 #endif
 
+int tp_buttons;
+
 #ifdef FAUXCLICKY_ENABLE
 #include <fauxclicky.h>
 #endif
@@ -310,9 +313,35 @@ void process_action(keyrecord_t *record, action_t action)
         /* Mouse key */
         case ACT_MOUSEKEY:
             if (event.pressed) {
+                switch (action.key.code) {
+                    case KC_MS_BTN1:
+                        tp_buttons |= (1<<0);
+                        break;
+                    case KC_MS_BTN2:
+                        tp_buttons |= (1<<1);
+                        break;
+                    case KC_MS_BTN3:
+                        tp_buttons |= (1<<2);
+                        break;
+                    default:
+                        break;
+                }
                 mousekey_on(action.key.code);
                 mousekey_send();
             } else {
+                switch (action.key.code) {
+                    case KC_MS_BTN1:
+                        tp_buttons &= ~(1<<0);
+                        break;
+                    case KC_MS_BTN2:
+                        tp_buttons &= ~(1<<1);
+                        break;
+                    case KC_MS_BTN3:
+                        tp_buttons &= ~(1<<2);
+                        break;
+                    default:
+                        break;
+                }
                 mousekey_off(action.key.code);
                 mousekey_send();
             }
@@ -438,6 +467,9 @@ void process_action(keyrecord_t *record, action_t action)
                     } else {
                         if (tap_count > 0) {
                             dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n");
+                            if (action.layer_tap.code == KC_CAPS) {
+                                wait_ms(80);
+                            }
                             unregister_code(action.layer_tap.code);
                         } else {
                             dprint("KEYMAP_TAP_KEY: No tap: Off on release\n");
index bd9a69ae0a5b45d0f5bf1b29e3653f70c441dd2a..531a3ca345b69f5131370f93f31a6fa6ad756de8 100644 (file)
@@ -96,7 +96,7 @@ bool process_tapping(keyrecord_t *keyp)
                     // enqueue
                     return false;
                 }
-#if TAPPING_TERM >= 500
+#if TAPPING_TERM >= 500 || defined PERMISSIVE_HOLD
                 /* Process a key typed within TAPPING_TERM
                  * This can register the key before settlement of tapping,
                  * useful for long TAPPING_TERM but may prevent fast typing.
index eac1f1dd81d2475245cff2c16ef9d0629c439588..97a8f1cd8c4e2f88086cbaab490a51b58ecd5cc9 100644 (file)
@@ -61,23 +61,51 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #   include "visualizer/visualizer.h"
 #endif
 
+#ifdef MATRIX_HAS_GHOST
+extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
+static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata){
+    matrix_row_t out = 0;
+    for (uint8_t col = 0; col < MATRIX_COLS; col++) {
+        //read each key in the row data and check if the keymap defines it as a real key
+        if (pgm_read_byte(&keymaps[0][row][col]) && (rowdata & (1<<col))){
+            //this creates new row data, if a key is defined in the keymap, it will be set here
+            out |= 1<<col;
+        }
+    }
+    return out;
+}
 
+static inline bool popcount_more_than_one(matrix_row_t rowdata)
+{
+    rowdata &= rowdata-1; //if there are less than two bits (keys) set, rowdata will become zero
+    return rowdata;
+}
 
-#ifdef MATRIX_HAS_GHOST
-static bool has_ghost_in_row(uint8_t row)
+static inline bool has_ghost_in_row(uint8_t row, matrix_row_t rowdata)
 {
-    matrix_row_t matrix_row = matrix_get_row(row);
-    // No ghost exists when less than 2 keys are down on the row
-    if (((matrix_row - 1) & matrix_row) == 0)
+    /* No ghost exists when less than 2 keys are down on the row.
+    If there are "active" blanks in the matrix, the key can't be pressed by the user,
+    there is no doubt as to which keys are really being pressed.
+    The ghosts will be ignored, they are KC_NO.   */
+    rowdata = get_real_keys(row, rowdata);
+    if ((popcount_more_than_one(rowdata)) == 0){
         return false;
-
-    // Ghost occurs when the row shares column line with other row
+    }
+    /* Ghost occurs when the row shares a column line with other row,
+    and two columns are read on each row. Blanks in the matrix don't matter,
+    so they are filtered out.
+    If there are two or more real keys pressed and they match columns with
+    at least two of another row's real keys, the row will be ignored. Keep in mind,
+    we are checking one row at a time, not all of them at once.
+    */
     for (uint8_t i=0; i < MATRIX_ROWS; i++) {
-        if (i != row && (matrix_get_row(i) & matrix_row))
+        if (i != row && popcount_more_than_one(get_real_keys(i, matrix_get_row(i)) & rowdata)){
             return true;
+        }
     }
     return false;
 }
+
 #endif
 
 __attribute__ ((weak))
@@ -127,7 +155,7 @@ void keyboard_task(void)
 {
     static matrix_row_t matrix_prev[MATRIX_ROWS];
 #ifdef MATRIX_HAS_GHOST
-    static matrix_row_t matrix_ghost[MATRIX_ROWS];
+  //  static matrix_row_t matrix_ghost[MATRIX_ROWS];
 #endif
     static uint8_t led_status = 0;
     matrix_row_t matrix_row = 0;
@@ -139,18 +167,18 @@ void keyboard_task(void)
         matrix_change = matrix_row ^ matrix_prev[r];
         if (matrix_change) {
 #ifdef MATRIX_HAS_GHOST
-            if (has_ghost_in_row(r)) {
+            if (has_ghost_in_row(r, matrix_row)) {
                 /* Keep track of whether ghosted status has changed for
                  * debugging. But don't update matrix_prev until un-ghosted, or
                  * the last key would be lost.
                  */
-                if (debug_matrix && matrix_ghost[r] != matrix_row) {
-                    matrix_print();
-                }
-                matrix_ghost[r] = matrix_row;
+                //if (debug_matrix && matrix_ghost[r] != matrix_row) {
+                //    matrix_print();
+                //}
+                //matrix_ghost[r] = matrix_row;
                 continue;
             }
-            matrix_ghost[r] = matrix_row;
+            //matrix_ghost[r] = matrix_row;
 #endif
             if (debug_matrix) matrix_print();
             for (uint8_t c = 0; c < MATRIX_COLS; c++) {
index 7738251b646c08fddfe2bab69a97266058c6d631..f17003c2ff97c13e4c6585ed133b1e3bbb814463 100644 (file)
@@ -57,7 +57,6 @@ static inline bool IS_RELEASED(keyevent_t event) { return (!IS_NOEVENT(event) &&
     .time = (timer_read() | 1)                          \
 }
 
-
 /* it runs once at early stage of startup before keyboard_init. */
 void keyboard_setup(void);
 /* it runs once after initializing host side protocol, debug and MCU peripherals. */
index fd6edd42cfdca65aba802216ec80cfbdacd02386..bee6bb2c193a68039700052856dde1045351ed9d 100644 (file)
@@ -87,6 +87,7 @@ struct queue_item {
     uint16_t consumer;
     struct __attribute__((packed)) {
       int8_t x, y, scroll, pan;
+      uint8_t buttons;
     } mousemove;
   };
 };
@@ -699,6 +700,22 @@ static bool process_queue_item(struct queue_item *item, uint16_t timeout) {
       strcpy_P(fmtbuf, PSTR("AT+BLEHIDMOUSEMOVE=%d,%d,%d,%d"));
       snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->mousemove.x,
           item->mousemove.y, item->mousemove.scroll, item->mousemove.pan);
+      if (!at_command(cmdbuf, NULL, 0, true, timeout)) {
+        return false;
+      }
+      strcpy_P(cmdbuf, PSTR("AT+BLEHIDMOUSEBUTTON="));
+      if (item->mousemove.buttons & MOUSE_BTN1) {
+        strcat(cmdbuf, "L");
+      }
+      if (item->mousemove.buttons & MOUSE_BTN2) {
+        strcat(cmdbuf, "R");
+      }
+      if (item->mousemove.buttons & MOUSE_BTN3) {
+        strcat(cmdbuf, "M");
+      }
+      if (item->mousemove.buttons == 0) {
+        strcat(cmdbuf, "0");
+      }
       return at_command(cmdbuf, NULL, 0, true, timeout);
 #endif
     default:
@@ -757,7 +774,7 @@ bool adafruit_ble_send_consumer_key(uint16_t keycode, int hold_duration) {
 
 #ifdef MOUSE_ENABLE
 bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll,
-                                  int8_t pan) {
+                                  int8_t pan, uint8_t buttons) {
   struct queue_item item;
 
   item.queue_type = QTMouseMove;
@@ -765,6 +782,7 @@ bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll,
   item.mousemove.y = y;
   item.mousemove.scroll = scroll;
   item.mousemove.pan = pan;
+  item.mousemove.buttons = buttons;
 
   while (!send_buf.enqueue(item)) {
     send_buf_send_one();
index b3bab3ca0997b6ebc8d8957bb331f6202218c8f5..036b7d14ea7da25bbc0f24f0f38feca3c780ea3b 100644 (file)
@@ -43,7 +43,7 @@ extern bool adafruit_ble_send_consumer_key(uint16_t keycode, int hold_duration);
  * The parameters are signed and indicate positive of negative direction
  * change. */
 extern bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll,
-                                         int8_t pan);
+                                         int8_t pan, uint8_t buttons);
 #endif
 
 /* Compute battery voltage by reading an analog pin.
index ae6129d1a28dfe185129cbef44abdb4d2424f35d..e3f8724e81c01586e16f1640c56c4e46a297e2d5 100644 (file)
@@ -669,7 +669,7 @@ static void send_mouse(report_mouse_t *report)
   if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) {
     #ifdef MODULE_ADAFRUIT_BLE
       // FIXME: mouse buttons
-      adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h);
+      adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h, report->buttons);
     #else
       bluefruit_serial_send(0xFD);
       bluefruit_serial_send(0x00);
@@ -1180,7 +1180,7 @@ int main(void)
 
     print("Keyboard start.\n");
     while (1) {
-        #if !defined(BLUETOOTH_ENABLE)
+        #if !defined(NO_USB_STARTUP_CHECK)
         while (USB_DeviceState == DEVICE_STATE_Suspended) {
             print("[s]");
             suspend_power_down();
index d9ccbecb43a3f7f1848daed5e1093628db51c326..4ed3cae1fd0d859fa48f05513eaf3fc867596c5a 100644 (file)
@@ -72,12 +72,13 @@ void ps2_mouse_init_user(void) {
 
 void ps2_mouse_task(void) {
     static uint8_t buttons_prev = 0;
+    extern int tp_buttons;
 
     /* receives packet from mouse */
     uint8_t rcv;
     rcv = ps2_host_send(PS2_MOUSE_READ_DATA);
     if (rcv == PS2_ACK) {
-        mouse_report.buttons = ps2_host_recv_response();
+        mouse_report.buttons = ps2_host_recv_response() | tp_buttons;
         mouse_report.x = ps2_host_recv_response() * PS2_MOUSE_X_MULTIPLIER;
         mouse_report.y = ps2_host_recv_response() * PS2_MOUSE_Y_MULTIPLIER;
 #ifdef PS2_MOUSE_ENABLE_SCROLLING
@@ -106,34 +107,34 @@ void ps2_mouse_task(void) {
 #endif
         host_mouse_send(&mouse_report);
     }
-    
+
     ps2_mouse_clear_report(&mouse_report);
 }
 
 void ps2_mouse_disable_data_reporting(void) {
-    PS2_MOUSE_SEND(PS2_MOUSE_DISABLE_DATA_REPORTING, "ps2 mouse disable data reporting"); 
+    PS2_MOUSE_SEND(PS2_MOUSE_DISABLE_DATA_REPORTING, "ps2 mouse disable data reporting");
 }
 
 void ps2_mouse_enable_data_reporting(void) {
     PS2_MOUSE_SEND(PS2_MOUSE_ENABLE_DATA_REPORTING, "ps2 mouse enable data reporting");
 }
 
-void ps2_mouse_set_remote_mode(void) { 
-    PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_REMOTE_MODE, "ps2 mouse set remote mode"); 
+void ps2_mouse_set_remote_mode(void) {
+    PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_REMOTE_MODE, "ps2 mouse set remote mode");
     ps2_mouse_mode = PS2_MOUSE_REMOTE_MODE;
 }
 
-void ps2_mouse_set_stream_mode(void) { 
-    PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_STREAM_MODE, "ps2 mouse set stream mode"); 
+void ps2_mouse_set_stream_mode(void) {
+    PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_STREAM_MODE, "ps2 mouse set stream mode");
     ps2_mouse_mode = PS2_MOUSE_STREAM_MODE;
 }
 
 void ps2_mouse_set_scaling_2_1(void) {
-    PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_SCALING_2_1, "ps2 mouse set scaling 2:1"); 
+    PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_SCALING_2_1, "ps2 mouse set scaling 2:1");
 }
 
 void ps2_mouse_set_scaling_1_1(void) {
-    PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_SCALING_1_1, "ps2 mouse set scaling 1:1"); 
+    PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_SCALING_1_1, "ps2 mouse set scaling 1:1");
 }
 
 void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution) {
@@ -204,9 +205,9 @@ static inline void ps2_mouse_enable_scrolling(void) {
 #define PRESS_SCROLL_BUTTONS    mouse_report->buttons |= (PS2_MOUSE_SCROLL_BTN_MASK)
 #define RELEASE_SCROLL_BUTTONS  mouse_report->buttons &= ~(PS2_MOUSE_SCROLL_BTN_MASK)
 static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report) {
-    static enum { 
-        SCROLL_NONE, 
-        SCROLL_BTN, 
+    static enum {
+        SCROLL_NONE,
+        SCROLL_BTN,
         SCROLL_SENT,
     } scroll_state = SCROLL_NONE;
     static uint16_t scroll_button_time = 0;
@@ -228,10 +229,10 @@ static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report) {
             mouse_report->y = 0;
         }
     } else if (0 == (PS2_MOUSE_SCROLL_BTN_MASK & mouse_report->buttons)) {
-        // None of the scroll buttons are pressed 
+        // None of the scroll buttons are pressed
 
 #if PS2_MOUSE_SCROLL_BTN_SEND
-        if (scroll_state == SCROLL_BTN 
+        if (scroll_state == SCROLL_BTN
                 && timer_elapsed(scroll_button_time) < PS2_MOUSE_SCROLL_BTN_SEND) {
             PRESS_SCROLL_BUTTONS;
             host_mouse_send(mouse_report);
diff --git a/util/activate_wsl.sh b/util/activate_wsl.sh
new file mode 100644 (file)
index 0000000..e2312b5
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+function export_variables {
+    local util_dir=~/qmk_utils
+    local download_dir=$util_dir/wsl_downloaded
+
+    export DFU_PROGRAMMER=$download_dir/dfu-programmer/dfu-programmer.exe
+    export DFU_UTIL=$download_dir/dfu-util-0.9-win64/dfu-util.exe
+    export TEENSY_LOADER_CLI=$download_dir/teensy_loader_cli.exe
+    export BATCHISP=batchisp.exe
+}
+
+export_variables
+
+
+
+
diff --git a/util/drivers.txt b/util/drivers.txt
new file mode 100644 (file)
index 0000000..d21a748
--- /dev/null
@@ -0,0 +1,46 @@
+# The format is
+# driver,desc,vid,pid,guid
+# Use a comma as a separator without spaces
+# Driver can be one of winusb,libusb,libusbk
+# Use Windows Powershell and type [guid]::NewGuid() to generate guids
+winusb,Kiibohd DFU Bootloader,1C11,B007,aa5a3f86-b81e-4416-89ad-0c1ea1ed63af
+libusb,ATxmega16C4,03EB,2FD8,23266ee7-5423-4cc4-993b-034571c43a90
+libusb,ATxmega32C4,03EB,2FD9,d4b62886-2ac8-4534-aa24-eae0a2c3ce43
+libusb,ATxmega64C3,03EB,2FD6,08467ca7-9b5a-41d2-8d8a-4a26d0b5285b
+libusb,ATxmega128C3,03EB,2FD7,1ca69799-6d95-46cf-be69-5b3d0eb915e6
+libusb,ATxmega256C3,03EB,2FDA,216ddc8b-6c67-4cc0-b934-482829a483a0
+libusb,ATxmega384C3,03EB,2FDB,0e4e3347-6025-4d49-ba80-2375ea690c28
+libusb,ATxmega64A1U,03EB,2FE8,2553d8fa-7de1-44a6-bdbf-57be8bb37e28
+libusb,ATxmega128A1U,03EB,2FED,6d9fd0ff-755d-4e29-bd29-df0a9a7544b9
+libusb,ATxmega64A4U,03EB,2FDD,bcf5e7c3-44a1-4fd1-971f-9ef9843f6291
+libusb,ATxmega128A4U,03EB,2FDE,3f976bb6-36ca-44cc-a728-844bc1d0d168
+libusb,ATxmega64B3,03EB,2FDF,de280c81-c12a-4ca7-bf34-566151786418
+libusb,ATxmega128B3,03EB,2FE0,2ad1ffeb-eb83-4e78-b34a-d5633771991f
+libusb,ATxmega64B1,03EB,2FE1,002874a6-7fc7-413b-9ac4-2b52c5a230bd
+libusb,ATxmega128B1,03EB,2FEA,60ea9d08-2ae6-4434-b743-ce6f73537136
+libusb,ATxmega256A3BU,03EB,2FE2,5949bd0a-8bd4-417b-b1c5-7d249836bf0d
+libusb,ATxmega16A4U,03EB,2FE3,cc3172b0-e86a-4758-914e-951bca6ca7f5
+libusb,ATxmega32A4U,03EB,2FE4,f44c515f-7d17-4612-a532-ee620afb22b2
+libusb,ATxmega64A4U,03EB,2FE5,c1af4f1c-045f-40c9-893a-3ad4adb2e67d
+libusb,ATxmega128A3U,03EB,2FE6,26f275f0-d6b2-46d8-8334-e4de66996c74
+libusb,ATxmega192A3U,03EB,2FE7,b7b50d98-0429-4235-8f08-5466e4f83ed4
+libusb,UC3,03EB,2FDC,972d9af7-d71b-44c7-a895-9340b362f545
+libusb,ATUC3,03EB,2FE9,d5855d0a-f82e-4df5-9c14-2b0b1dcb65bd
+libusb,AT32UC3C,03EB,2FEB,1eeb52aa-fd24-47fd-8a76-056446d1a54f
+libusb,ATxmega256A3U,03EB,2FEC,198fa8ea-3157-4863-b9a8-a3f6fe027367
+libusb,ATmega8U2,03EB,2FEE,14018055-46f4-4c62-aa03-e8fafeedaf72
+libusb,ATmega16U2,03EB,2FEF,007274da-b75f-492e-a288-8fc0aff8339f
+libusb,ATmega32U2,03EB,2FF0,ddc2c572-cb6e-4f61-a6cc-1a5de941f063
+libusb,AT32UC3A3,03EB,2FF1,8b614283-36c0-46a2-890d-65f61b5b6201
+libusb,ATmega32U6,03EB,2FF2,a207dd90-2814-4418-b5b7-4b708fdf1bfd
+libusb,ATmega16U4,03EB,2FF3,3180d426-bf93-4578-a693-2efbc337da8e
+libusb,ATmega32U4,03EB,2FF4,5f9726fd-f9de-487a-9fbd-8b3524a7a56a
+libusb,AT32UC3B,03EB,2FF6,ef90068a-277a-44db-805a-9b83a6beb29a
+libusb,AT90USB82,03EB,2FF7,062fa2ab-f9d8-4a0d-83c1-df0521cfd0f6
+libusb,AT32UC3A,03EB,2FF8,24080a67-3874-4fb8-8808-fb4cc297c466
+libusb,AT90USB64,03EB,2FF9,c6a708ad-e97d-43cd-b04a-3180d737a71b
+libusb,AT90USB162,03EB,2FFA,de67bff5-6e39-4e9c-8dfe-de7fce113716
+libusb,AT90USB128,03EB,2FFB,fd217df3-59d0-440a-a8f3-4c0c8c84daa3
+libusb,AT89C5130,03EB,2FFD,31b69a56-9ac0-4fab-a3ae-cd7bb7021ec5
+libusb,AT8XC5122,03EB,2FFE,395a6118-8568-41b2-913a-d16912722342
+libusb,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 (file)
index 8e92866..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<html><head><meta http-equiv="refresh" content="0; url=http://qmk.fm/keyboards/ergodox/" /></head></html>
\ No newline at end of file
index 6bafd1941f0a620dc786bfdb376017a22b6834d9..5b0951c6e0b978975b80572424957b3f652dd7ae 100644 (file)
@@ -5,7 +5,7 @@ TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}"
 
 if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then 
        exit_code=0
-       NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l)
+       NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)'  | grep -Ev '^(docs/)' | wc -l)
        if [[ $NEFM -gt 0 ]] ; then
                echo "Making all keymaps for all keyboards"
                make all-keyboards AUTOGEN="true"
index 58334cb1f687c73b072fc07773929afbed6cb5cb..4e08be1206fb2b3d6c16621e60c118db0950c3ea 100644 (file)
@@ -4,11 +4,19 @@ set -o errexit -o nounset
 
 rev=$(git rev-parse --short HEAD)
 
-git config --global user.name "Travis CI"
-git config --global user.email "jack.humb+travis.ci@gmail.com"
-
 if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then
 
+git config --global user.name "QMK Bot"
+git config --global user.email "hello@qmk.fm"
+
+openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d
+tar xvf secrets.tar
+
+chmod 600 id_rsa_qmk_firmware
+chmod 600 qmk.fm
+eval `ssh-agent -s`
+ssh-add id_rsa_qmk_firmware
+
 increment_version ()
 {
   declare -a part=( ${1//\./ } )
@@ -17,14 +25,14 @@ increment_version ()
   echo -e "${new// /.}"
 } 
 
-NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l)
+NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l)
 if [[ $NEFM -gt 0 ]] ; then
        echo "Essential files modified."
        git fetch --tags
        lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1)
        newtag=$(increment_version $lasttag)
        git tag $newtag
-       git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware
+       git push --tags git@github.com:qmk/qmk_firmware.git
 else
        echo "No essential files modified."
 fi
@@ -33,22 +41,24 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
 
        make ergodox-ez AUTOGEN=true
 
-       find . -name ".build" | xargs rm -rf
        cd ..
-       git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git
+       git clone git@github.com:qmk/qmk.fm.git
        cd qmk.fm
-       git submodule update --init --recursive
+       ssh-add ../qmk_firmware/qmk.fm
+       #git submodule update --init --recursive
        #rm -rf keyboard
        #rm -rf keyboards
-       yes | cp -rf ../qmk_firmware/keyboards .
+       #yes | cp -rf ../qmk_firmware/keyboards .
        #mkdir keyboards/ergodox_ez/
-       cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html
-       cp ../qmk_firmware/readme.md qmk_readme.md
-       ./generate.sh
+       #cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html
+       #cp ../qmk_firmware/readme.md qmk_readme.md
+       #./generate.sh
+       rm -f _compiled/*.hex
+       for file in ../qmk_firmware/keyboards/*/keymaps/*/*.hex; do mv -v "$file" "_compiled/${file##*/}"; done
 
        git add -A
        git commit -m "generated from qmk/qmk_firmware@${rev}" 
-       git push
+       git push git@github.com:qmk/qmk.fm.git
 
 fi
 
diff --git a/util/wsl_install.sh b/util/wsl_install.sh
new file mode 100644 (file)
index 0000000..8999da8
--- /dev/null
@@ -0,0 +1,159 @@
+#!/bin/bash
+
+download_dir=wsl_downloaded
+
+function install_utils {
+    rm -f -r $download_dir
+    mkdir $download_dir
+
+    pushd $download_dir
+
+    echo "Installing dfu-programmer"
+    wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip'
+    unzip -d dfu-programmer dfu-programmer-win-0.7.2.zip
+
+    echo "Installing dfu-util"
+    wget 'http://dfu-util.sourceforge.net/releases/dfu-util-0.9-win64.zip'
+    unzip dfu-util-0.9-win64.zip
+
+    echo "Installing teensy_loader_cli"
+    wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip'
+    unzip teensy_loader_cli_windows.zip
+
+    echo "Installing Atmel Flip"
+    wget 'http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe'
+    mv Flip\ Installer\ \-\ 3.4.7.112.exe FlipInstaller.exe
+
+    echo "Downloading the QMK driver installer"
+    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 -
+
+    rm -f *.zip
+
+    popd > /dev/null
+}
+
+function install_drivers {
+    pushd $download_dir
+    cmd.exe /C qmk_driver_installer.exe $1 $2 ../drivers.txt
+    popd > /dev/null
+}
+
+dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
+
+if [[ $dir != /mnt/* ]];
+then
+    echo
+    echo "You need to clone the qmk_firmware repository outside the linux filesystem."
+    echo "Otherwise the windows executables can't be run."
+    exit 1
+fi
+
+pushd "$dir"
+
+while true; do
+    echo
+    echo "Do you want to install all toolchain dependencies needed for compiling QMK?"
+    echo "This will run install_dependencies.sh, which calls apt-get upgrade."
+    echo "If you don't want that, you can install the dependencies manually."
+    read -p "(Y/N) " res
+    case $res in
+        [Yy]* ) sudo ./install_dependencies.sh; break;;
+        [Nn]* ) break;;
+        * ) echo "Invalid answer";;
+    esac
+done
+
+echo "Installing dependencies needed for the installation (unzip, wget)"
+echo "This will ask for the sudo password"
+sudo apt-get install unzip wget
+
+
+if [ ! -d "$download_dir" ]; then
+    install_utils
+else
+    while true; do
+        echo
+        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
+        case $res in
+            [Yy]* ) install_utils; break;;
+            [Nn]* ) break;;
+            * ) echo "Invalid answer";;
+        esac
+    done
+fi
+
+while true; do
+    echo
+    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
+    case $res in
+        [Yy]* ) cmd.exe /c $download_dir\\FlipInstaller.exe; break;;
+        [Nn]* ) break;;
+        * ) echo "Invalid answer";;
+    esac
+done
+
+
+while true; do
+    echo
+    echo "Which USB drivers do you want to install?"
+    echo "(A)all - All supported drivers will be installed"
+    echo "(C)onnected - Only drivers for connected keyboards (in bootloader/flashing mode) will be installed"
+    echo "(F)force - Like all, but will also override existing drivers for connected keyboards"
+    echo "(N)one - No drivers will be installed, flashing your keyboard will most likely not work"
+    read -p "(A/C/F/N)? " res
+    case $res in
+        [Aa]* ) install_drivers --all; break;;
+        [Cc]* ) install_drivers; break;;
+        [Ff]* ) install_drivers --all --force; break;;
+        [Nn]* ) break;;
+        * ) echo "Invalid answer";;
+    esac
+done
+
+echo 
+echo "Creating a softlink to the utils directory as ~/qmk_utils."
+echo "This is needed so that the the make system can find all utils it need."
+read -p "Press any key to continue (ctrl-c to abort)"
+ln -sfn "$dir" ~/qmk_utils
+
+if grep "^source ~/qmk_utils/activate_wsl.sh$" ~/.bashrc
+then
+    echo
+    echo "The line source ~/qmk_utils/activate_wsl.sh is already added to your /.bashrc"
+    echo "Not adding it twice"
+else
+    while true; do
+        echo
+        echo "Do you want to add 'source ~/qmk_utils/activate_wsl.sh' to the end of you .bashrc file?"
+        echo "Without this make won't find the needed utils, so if you don't want to do it automatically,"
+        echo "then you have to do it manually."
+        read -p "(Y/N)? " res
+        case $res in
+            [Yy]* ) echo "source ~/qmk_utils/activate_wsl.sh" >> ~/.bashrc; break;;
+            [Nn]* ) break;;
+            * ) echo "Invalid answer";;
+        esac
+    done
+fi
+
+while true; do
+    echo
+    echo "Do you want to add a symlink to the QMK repository in your home directory for convenience?"
+    echo "This will create a folder 'qmk_firmware' in your home directory."
+    echo "In the future you can use this folder instead of the full path on your windows file system"
+    read -p "(Y/N)? " res
+    case $res in
+        [Yy]* ) ln -sfn "$dir/.." ~/qmk_firmware; break;;
+        [Nn]* ) break;;
+        * ) echo "Invalid answer";;
+    esac
+done
+
+echo
+echo "******************************************************************************"
+echo "Installation completed!"
+echo "You need to open a new batch command prompt for all the utils to work properly"
+echo "******************************************************************************"
+
+popd > /dev/null
+