]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge pull request #1915 from dondelelcaro/ergodox_ez_left_leds
authorErez Zukerman <bulk@ezuk.org>
Tue, 31 Oct 2017 18:33:09 +0000 (11:33 -0700)
committerGitHub <noreply@github.com>
Tue, 31 Oct 2017 18:33:09 +0000 (11:33 -0700)
Ergodox ez left leds support

58 files changed:
.editorconfig [new file with mode: 0644]
.vscode/extensions.json [new file with mode: 0644]
common_features.mk
docs/_summary.md
docs/config_options.md
docs/feature_auto_shift.md
docs/feature_stenography.md [new file with mode: 0644]
docs/feature_tap_dance.md
docs/features.md
docs/flashing.md [new file with mode: 0644]
docs/stenography.md [deleted file]
keyboards/chimera_ortho/chimera_ortho.c [new file with mode: 0644]
keyboards/chimera_ortho/chimera_ortho.h [new file with mode: 0644]
keyboards/chimera_ortho/config.h [new file with mode: 0644]
keyboards/chimera_ortho/keymaps/default/keymap.c [new file with mode: 0644]
keyboards/chimera_ortho/matrix.c [new file with mode: 0644]
keyboards/chimera_ortho/rules.mk [new file with mode: 0644]
keyboards/eco/eco.h
keyboards/eco/keymaps/hexwire/keymap.c [new file with mode: 0644]
keyboards/eco/keymaps/hexwire/rules.mk [new file with mode: 0644]
keyboards/ergodox_infinity/keymaps/dudeofawesome/README.md [new file with mode: 0644]
keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c [new file with mode: 0644]
keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c [new file with mode: 0644]
keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c [new file with mode: 0644]
keyboards/ergodox_infinity/keymaps/nordic_ergo/readme.md [new file with mode: 0644]
keyboards/ergodox_infinity/readme.md
keyboards/frosty_flake/keymaps/QFR_JM/config.h
keyboards/frosty_flake/keymaps/QFR_JM/keymap.c
keyboards/frosty_flake/keymaps/QFR_JM/readme.md
keyboards/gh60/keymaps/maxr1998/keymap.c
keyboards/handwired/terminus_mini/config.h
keyboards/handwired/terminus_mini/keymaps/default/config.h
keyboards/handwired/terminus_mini/keymaps/default/keymap.c
keyboards/handwired/terminus_mini/keymaps/default/readme.md
keyboards/nyquist/keymaps/DivergeJM/README.md
keyboards/nyquist/keymaps/DivergeJM/config.h
keyboards/nyquist/keymaps/DivergeJM/keymap.c
keyboards/planck/keymaps/dudeofawesome/config.h [new file with mode: 0644]
keyboards/planck/keymaps/dudeofawesome/keymap.c [new file with mode: 0644]
keyboards/planck/keymaps/dudeofawesome/readme.md [new file with mode: 0644]
keyboards/planck/keymaps/dudeofawesome/rules.mk [new file with mode: 0644]
keyboards/planck/keymaps/gunp/keymap.c
keyboards/planck/keymaps/gunp/readme.md
keyboards/ps2avrGB/README.md
keyboards/ps2avrGB/program
keyboards/tada68/keymaps/isoish/keymap.c [new file with mode: 0644]
keyboards/tada68/keymaps/isoish/readme.md [new file with mode: 0644]
keyboards/tada68/keymaps/isoish/rules.mk [new file with mode: 0644]
keyboards/tada68/tada68.h
layouts/community/ergodox/qwerty_code_friendly/keymap.c
layouts/community/ergodox/qwerty_code_friendly/readme.md
layouts/community/ergodox/zweihander-osx/keymap.c
quantum/pointing_device.h
quantum/process_keycode/process_combo.c
quantum/process_keycode/process_key_lock.c
tmk_core/common/action.c
tmk_core/common/action_tapping.h
tmk_core/protocol/chibios/usb_main.c

diff --git a/.editorconfig b/.editorconfig
new file mode 100644 (file)
index 0000000..82837f7
--- /dev/null
@@ -0,0 +1,18 @@
+# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
+indent_size = 4
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644 (file)
index 0000000..0543f3d
--- /dev/null
@@ -0,0 +1,6 @@
+// Suggested extensions
+{
+  "recommendations": [
+    "EditorConfig.EditorConfig"
+  ]
+}
index a7c366a109483b24e2d7c93695b7e2ca7198ec34..3c77f588edecdc816dfe275d94f64e3ac9ae1456 100644 (file)
@@ -70,7 +70,8 @@ ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
 endif
 
 ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
-       SRC += $(QUANTUM_DIR)/pointing_device.c
+    OPT_DEFS += -DPOINTING_DEVICE_ENABLE
+    SRC += $(QUANTUM_DIR)/pointing_device.c
 endif
 
 ifeq ($(strip $(UCIS_ENABLE)), yes)
index b433181a6066dc246ecbe103ca754d2eb88916d2..1a7e1fc96e9fc9c36ca4803676b27eb0b79cf968 100644 (file)
@@ -3,6 +3,7 @@
   * [Install Build Tools](getting_started_build_tools.md)
     * Alternative: [Vagrant Guide](getting_started_vagrant_guide.md)
   * [Build/Compile instructions](getting_started_make_guide.md)
+  * [Flashing instructions](flashing.md)
   * [Contributing to QMK](contributing.md)
   * [How to Use Github](getting_started_github.md)
 
@@ -21,6 +22,7 @@
 * [Features](features.md)
   * [Advanced Keycodes](feature_advanced_keycodes.md)
   * [Audio](feature_audio.md)
+  * [Auto Shift](feature_auto_shift.md)
   * [Backlight](feature_backlight.md)
   * [Bootmagic](feature_bootmagic.md)
   * [Dynamic Macros](feature_dynamic_macros.md)
@@ -31,6 +33,7 @@
   * [Mouse keys](feature_mouse_keys.md)
   * [Pointing Device](feature_pointing_device.md)
   * [PS2 Mouse](feature_ps2_mouse.md)
+  * [RGB Lighting](feature_rgblight.md)
   * [Space Cadet](feature_space_cadet.md)
   * [Stenography](feature_stenography.md)
   * [Tap Dance](feature_tap_dance.md)
     * [Basic](keycodes_basic.md)
     * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
     * [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
-    * [Layer Switching](feature_common_shortcuts.md#switching-and-toggling-layers)
-    * [Mod+Key](feature_common_shortcuts.md#modifier-keys)
-    * [Mod Tap](feature_common_shortcuts.md#mod-tap)
-    * [One Shot Keys](feature_common_shortcuts.md#one-shot-keys)
+    * [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
+    * [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
+    * [Mod Tap](feature_advanced_keycodes.md#mod-tap)
+    * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
     * [Quantum](quantum_keycodes.md)
     * [RGB Light](feature_rgblight.md#rgblight-keycodes)
-    * [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes)
+    * [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
     * [Stenography](feature_stenography.md#keycode-reference)
     * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
     * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
   * [Unit Testing](unit_testing.md)
 
 * For Makers and Modders
-  * [Hand Wiring Guide](hand_wiring.md)
+  * [Hand Wiring Guide](hand_wire.md)
   * [ISP flashing guide](isp_flashing_guide.md)
   * [Modding your keyboard](modding_your_keyboard.md)
 
index de67630adc4b71e983d21af4ff8a3fcf5b847f69..faa9c6481411edc15491c56cc77240670f9566e3 100644 (file)
@@ -109,6 +109,8 @@ If you define these options you will enable the associated feature, which may in
 
 * `#define TAPPING_TERM 200`
   * how long before a tap becomes a hold
+* `#define RETRO_TAPPING`
+  * tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
 * `#define TAPPING_TOGGLE 2`
   * how many taps before triggering the toggle
 * `#define PERMISSIVE_HOLD`
index 54052a74dbcb29203bf694ff38ef42c0a6b8709b..0f482ccaae26daa74a1db8de0447c54e79c96aef 100644 (file)
@@ -136,24 +136,22 @@ completely normal and with no intention of shifted keys.
 
 #### An example run
 
-'''
-hello world. my name is john doe. i am a computer programmer playing with
-keyboards right now.
+    hello world. my name is john doe. i am a computer programmer playing with
+    keyboards right now.
 
-[PRESS KC_ASDN quite a few times]
+    [PRESS KC_ASDN quite a few times]
 
-heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
-KEYboArDS RiGHT NOw.
+    heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
+    KEYboArDS RiGHT NOw.
 
-[PRESS KC_ASUP a few times]
+    [PRESS KC_ASUP a few times]
 
-hello world. my name is john Doe. i am a computer programmer playing with
-keyboarDs right now.
+    hello world. my name is john Doe. i am a computer programmer playing with
+    keyboarDs right now.
 
-[PRESS KC_ASRP]
+    [PRESS KC_ASRP]
 
-115
-'''
+    115
 
 The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT`
 value. You are now set! Practice on the *D* key a little bit that showed up
diff --git a/docs/feature_stenography.md b/docs/feature_stenography.md
new file mode 100644 (file)
index 0000000..5b457a2
--- /dev/null
@@ -0,0 +1,108 @@
+# Stenography in QMK
+
+[Stenography](https://en.wikipedia.org/wiki/Stenotype) is a method of writing most often used by court reports, closed-captioning, and real-time transcription for the deaf. In stenography words are chorded syllable by syllable with a mixture of spelling, phonetic, and shortcut (briefs) strokes. Professional stenographers can reach 200-300 WPM without any of the strain usually found in standard typing and with far fewer errors (>99.9% accuracy).
+
+The [Open Steno Project](http://www.openstenoproject.org/) has built an open-source program called Plover that provides real-time translation of steno strokes into words and commands. It has an established dictionary and supports
+
+## Plover with QWERTY Keyboard
+
+Plover can work with any standard QWERTY keyboard, although it is more efficient if the keyboard supports NKRO (n-key rollover) to allow Plover to see all the pressed keys at once. An example keymap for Plover can be found in `planck/keymaps/default`. Switching to the `PLOVER` layer adjusts the position of the keyboard to support the number bar.
+
+To use Plover with QMK just enable NKRO and optionally adjust your layout if you have anything other than a standard layout. You may also want to purchase some steno-friendly keycaps to make it easier to hit multiple keys.
+
+## Plover with Steno Protocol
+
+Plover also understands the language of several steno machines. QMK can speak a couple of these languages, TX Bolt and GeminiPR. An example layout can be found in `planck/keymaps/steno`.
+
+When QMK speaks to Plover over a steno protocol Plover will not use the keyboard as input. This means that you can switch back and forth between a standard keyboard and your steno keyboard, or even switch layers from Plover to standard and back without needing to activate/deactive Plover.
+
+In this mode Plover expects to speak with a steno machine over a serial port so QMK will present itself to the operating system as a virtual serial port in addition to a keyboard. By default QMK will speak the TX Bolt protocol but can be switched to GeminiPR; the last protocol used is stored in non-volatile memory so QMK will use the same protocol on restart.
+
+> Note: Due to hardware limitations you may not be able to run both a virtual serial port and mouse emulation at the same time.
+
+### TX Bolt
+
+TX Bolt communicates the status of 24 keys over a very simple protocol in variable-sized (1-5 byte) packets.
+
+### GeminiPR
+
+GeminiPR encodes 42 keys into a 6-byte packet. While TX Bolt contains everything that is necessary for standard stenography, GeminiPR opens up many more options, including supporting non-English theories.
+
+## Configuring QMK for Steno
+
+Firstly, enable steno in your keymap's Makefile. You may also need disable mousekeys, extra keys, or another USB endpoint to prevent conflicts. The builtin USB stack for some processors only supports a certain number of USB endpoints and the virtual serial port needed for steno fills 3 of them.
+
+```Makefile
+STENO_ENABLE = yes
+MOUSEKEY_ENABLE = no
+```
+
+In your keymap create a new layer for Plover. You will need to include `keymap_steno.h`. See `planck/keymaps/steno/keymap.c` for an example. Remember to create a key to switch to the layer as well as a key for exiting the layer. If you would like to switch modes on the fly you can use the keycodes `QK_STENO_BOLT` and `QK_STENO_GEMINI`. If you only want to use one of the protocols you may set it up in your initialization function:
+
+```C
+void matrix_init_user() {
+  steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT
+}
+```
+
+Once you have your keyboard flashed launch Plover. Click the 'Configure...' button. In the 'Machine' tab select the Stenotype Machine that corresponds to your desired protocol. Click the 'Configure...' button on this tab and enter the serial port or click 'Scan'. Baud rate is fine at 9600 (although you should be able to set as high as 115200 with no issues). Use the default settings for everything else (Data Bits: 8, Stop Bits: 1, Parity: N, no flow control).
+
+On the display tab click 'Open stroke display'. With Plover disabled you should be able to hit keys on your keyboard and see them show up in the stroke display window. Use this to make sure you have set up your keymap correctly. You are now ready to steno!
+
+## Learning Stenography
+
+* [Learn Plover!](https://sites.google.com/site/ploverdoc/)
+* [QWERTY Steno](http://qwertysteno.com/Home/)
+* [Steno Jig](https://joshuagrams.github.io/steno-jig/)
+* More resources at the Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki
+
+## Keycode Reference
+
+As defined in `keymap_steno.h`.
+
+> Note: TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK will map the GeminiPR keys to the nearest TX Bolt key so that one key map will work for both.
+
+|GeminiPR|TX Bolt|Steno Key|
+|--------|-------|-----------|
+|`STN_N1`|`STN_NUM`|Number bar #1|
+|`STN_N2`|`STN_NUM`|Number bar #2|
+|`STN_N3`|`STN_NUM`|Number bar #3|
+|`STN_N4`|`STN_NUM`|Number bar #4|
+|`STN_N5`|`STN_NUM`|Number bar #5|
+|`STN_N6`|`STN_NUM`|Number bar #6|
+|`STN_N7`|`STN_NUM`|Number bar #7|
+|`STN_N8`|`STN_NUM`|Number bar #8|
+|`STN_N9`|`STN_NUM`|Number bar #9|
+|`STN_NA`|`STN_NUM`|Number bar #A|
+|`STN_NB`|`STN_NUM`|Number bar #B|
+|`STN_NC`|`STN_NUM`|Number bar #C|
+|`STN_S1`|`STN_SL`| `S-` upper|
+|`STN_S2`|`STN_SL`| `S-` lower|
+|`STN_TL`|`STN_TL`| `T-`|
+|`STN_KL`|`STN_KL`| `K-`|
+|`STN_PL`|`STN_PL`| `P-`|
+|`STN_WL`|`STN_WL`| `W-`|
+|`STN_HL`|`STN_HL`| `H-`|
+|`STN_RL`|`STN_RL`| `R-`|
+|`STN_A`|`STN_A`| `A` vowel|
+|`STN_O`|`STN_O`| `O` vowel|
+|`STN_ST1`|`STN_STR`| `*` upper-left |
+|`STN_ST2`|`STN_STR`| `*` lower-left|
+|`STN_ST3`|`STN_STR`| `*` upper-right|
+|`STN_ST4`|`STN_STR`| `*` lower-right|
+|`STN_E`|`STN_E`| `E` vowel|
+|`STN_U`|`STN_U`| `U` vowel|
+|`STN_FR`|`STN_FR`| `-F`|
+|`STN_PR`|`STN_PR`| `-P`|
+|`STN_RR`|`STN_RR`| `-R`|
+|`STN_BR`|`STN_BR`| `-B`|
+|`STN_LR`|`STN_LR`| `-L`|
+|`STN_GR`|`STN_GR`| `-G`|
+|`STN_TR`|`STN_TR`| `-T`|
+|`STN_SR`|`STN_SR`| `-S`|
+|`STN_DR`|`STN_DR`| `-D`|
+|`STN_ZR`|`STN_ZR`| `-Z`|
+|`STN_FN`|| (GeminiPR only)|
+|`STN_RES1`||(GeminiPR only)|
+|`STN_RES2`||(GeminiPR only)|
+|`STN_PWR`||(GeminiPR only)|
index 32dffa9cd3fcbd7c669596edbab7d66f07302f40..24cd2b4407611fc586774ec98e20ea0cc39a0403 100644 (file)
@@ -200,12 +200,12 @@ typedef struct {
 int cur_dance (qk_tap_dance_state_t *state) {
   if (state->count == 1) {
     //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP
-    if (state->interrupted || state->!pressed) return SINGLE_TAP;
+    if (state->interrupted || state->pressed==0) return SINGLE_TAP;
     else return SINGLE_HOLD;
   }
   //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated
   //with single tap. In example below, that means to send `xx` instead of `Escape`.
-  else if (state->count = 2) {
+  else if (state->count == 2) {
     if (state->interrupted) return DOUBLE_SINGLE_TAP;
     else if (state->pressed) return DOUBLE_HOLD;
     else return DOUBLE_TAP;
index afffead4995798870d13610c9b1c4be684c8ca09..b315139bb7b931bd932ba3780d6a1dab966015a9 100644 (file)
@@ -5,20 +5,22 @@ QMK has a staggering number of features for building your keyboard. It can take
 
 * [Advanced Keycodes](feature_advanced_keycodes.md) - Change layers, type shifted keys, and more. Go beyond typing simple characters.
 * [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode.
-* [Backlight](feature_backlight.md) - LED lighting support for your keyboard
-* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys
+* [Auto Shift](feature_auto_shift.md) - Tap for the normal key, hold slightly longer for its shifted state.
+* [Backlight](feature_backlight.md) - LED lighting support for your keyboard.
+* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
 * [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
 * [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
 * [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
 * [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
-* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key
-* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard
+* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key.
+* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard.
 * [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
 * [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a ps2 mouse directly to your keyboard.
+* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
 * [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets.
 * [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
-* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want
-* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard
+* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want.
+* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard.
 * [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type.
 * [Unicode](feature_unicode.md) - Unicode input support.
-* [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards
+* [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards.
diff --git a/docs/flashing.md b/docs/flashing.md
new file mode 100644 (file)
index 0000000..a61634d
--- /dev/null
@@ -0,0 +1,74 @@
+# Flashing Intrustructions
+
+There are quite a few different types of bootloaders that keyboards use, and just about all of the use a different flashing method. Luckily, projects like the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) aim to be compatible with all the different types without having to think about it much, but this article will describe the different types of bootloaders, and available methods for flashing them.
+
+## DFU
+
+Atmel's DFU bootloader comes on all atmega32u4 chips by default, and is used by many keyboards that have their own ICs on their PCBs (Older OLKB boards, Clueboards). Some keyboards may also use LUFA's DFU bootloader (or QMK's fork) (Newer OLKB boards) that adds in additional features specific to that hardware.
+
+These bootloaders are usually 4096 bytes for the atmega32u4 chip. 
+
+Compatible flashers:
+
+* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
+* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended commandline)
+* [Atmel's Flip](http://www.atmel.com/tools/flip.aspx) (not recommended)
+
+Flashing sequence:
+
+1. Press the `RESET` keycode, or tap the RESET button (or short RST to GND).
+2. Wait for the OS to detect the device
+3. Erase the memory (may be done automatically)
+4. Flash a .hex file
+5. Reset the device into application mode (may be done automatically)
+
+or:
+
+    make <keyboard>:<keymap>:dfu
+
+## Caterina
+
+Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina.
+
+This block of code allows for Caterina compatibility in QMK:
+
+    #define CATERINA_BOOTLOADER
+
+These bootloaders are usually 4096 bytes for the atmega32u4 chip. 
+
+Compatible flashers:
+
+* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
+* [avrdude](http://www.nongnu.org/avrdude/) with avr109 / `:avrdude` (recommended commandline)
+* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
+
+Flashing sequence:
+
+1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
+2. Wait for the OS to detect the device
+4. Flash a .hex file
+5. Wait for the device to reset automatically
+
+or
+
+    make <keyboard>:<keymap>:avrdude
+
+## Halfkay
+
+Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0).
+
+This bootloader is 512 bytes.
+
+Compatible flashers:
+
+* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
+* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
+* [Teensy Loader Command Line](https://www.pjrc.com/teensy/loader_cli.html) (recommended commandline)
+
+Flashing sequence:
+
+1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
+2. Wait for the OS to detect the device
+4. Flash a .hex file
+5. Reset the device into application mode (may be done automatically)
+
diff --git a/docs/stenography.md b/docs/stenography.md
deleted file mode 100644 (file)
index 5b457a2..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-# Stenography in QMK
-
-[Stenography](https://en.wikipedia.org/wiki/Stenotype) is a method of writing most often used by court reports, closed-captioning, and real-time transcription for the deaf. In stenography words are chorded syllable by syllable with a mixture of spelling, phonetic, and shortcut (briefs) strokes. Professional stenographers can reach 200-300 WPM without any of the strain usually found in standard typing and with far fewer errors (>99.9% accuracy).
-
-The [Open Steno Project](http://www.openstenoproject.org/) has built an open-source program called Plover that provides real-time translation of steno strokes into words and commands. It has an established dictionary and supports
-
-## Plover with QWERTY Keyboard
-
-Plover can work with any standard QWERTY keyboard, although it is more efficient if the keyboard supports NKRO (n-key rollover) to allow Plover to see all the pressed keys at once. An example keymap for Plover can be found in `planck/keymaps/default`. Switching to the `PLOVER` layer adjusts the position of the keyboard to support the number bar.
-
-To use Plover with QMK just enable NKRO and optionally adjust your layout if you have anything other than a standard layout. You may also want to purchase some steno-friendly keycaps to make it easier to hit multiple keys.
-
-## Plover with Steno Protocol
-
-Plover also understands the language of several steno machines. QMK can speak a couple of these languages, TX Bolt and GeminiPR. An example layout can be found in `planck/keymaps/steno`.
-
-When QMK speaks to Plover over a steno protocol Plover will not use the keyboard as input. This means that you can switch back and forth between a standard keyboard and your steno keyboard, or even switch layers from Plover to standard and back without needing to activate/deactive Plover.
-
-In this mode Plover expects to speak with a steno machine over a serial port so QMK will present itself to the operating system as a virtual serial port in addition to a keyboard. By default QMK will speak the TX Bolt protocol but can be switched to GeminiPR; the last protocol used is stored in non-volatile memory so QMK will use the same protocol on restart.
-
-> Note: Due to hardware limitations you may not be able to run both a virtual serial port and mouse emulation at the same time.
-
-### TX Bolt
-
-TX Bolt communicates the status of 24 keys over a very simple protocol in variable-sized (1-5 byte) packets.
-
-### GeminiPR
-
-GeminiPR encodes 42 keys into a 6-byte packet. While TX Bolt contains everything that is necessary for standard stenography, GeminiPR opens up many more options, including supporting non-English theories.
-
-## Configuring QMK for Steno
-
-Firstly, enable steno in your keymap's Makefile. You may also need disable mousekeys, extra keys, or another USB endpoint to prevent conflicts. The builtin USB stack for some processors only supports a certain number of USB endpoints and the virtual serial port needed for steno fills 3 of them.
-
-```Makefile
-STENO_ENABLE = yes
-MOUSEKEY_ENABLE = no
-```
-
-In your keymap create a new layer for Plover. You will need to include `keymap_steno.h`. See `planck/keymaps/steno/keymap.c` for an example. Remember to create a key to switch to the layer as well as a key for exiting the layer. If you would like to switch modes on the fly you can use the keycodes `QK_STENO_BOLT` and `QK_STENO_GEMINI`. If you only want to use one of the protocols you may set it up in your initialization function:
-
-```C
-void matrix_init_user() {
-  steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT
-}
-```
-
-Once you have your keyboard flashed launch Plover. Click the 'Configure...' button. In the 'Machine' tab select the Stenotype Machine that corresponds to your desired protocol. Click the 'Configure...' button on this tab and enter the serial port or click 'Scan'. Baud rate is fine at 9600 (although you should be able to set as high as 115200 with no issues). Use the default settings for everything else (Data Bits: 8, Stop Bits: 1, Parity: N, no flow control).
-
-On the display tab click 'Open stroke display'. With Plover disabled you should be able to hit keys on your keyboard and see them show up in the stroke display window. Use this to make sure you have set up your keymap correctly. You are now ready to steno!
-
-## Learning Stenography
-
-* [Learn Plover!](https://sites.google.com/site/ploverdoc/)
-* [QWERTY Steno](http://qwertysteno.com/Home/)
-* [Steno Jig](https://joshuagrams.github.io/steno-jig/)
-* More resources at the Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki
-
-## Keycode Reference
-
-As defined in `keymap_steno.h`.
-
-> Note: TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK will map the GeminiPR keys to the nearest TX Bolt key so that one key map will work for both.
-
-|GeminiPR|TX Bolt|Steno Key|
-|--------|-------|-----------|
-|`STN_N1`|`STN_NUM`|Number bar #1|
-|`STN_N2`|`STN_NUM`|Number bar #2|
-|`STN_N3`|`STN_NUM`|Number bar #3|
-|`STN_N4`|`STN_NUM`|Number bar #4|
-|`STN_N5`|`STN_NUM`|Number bar #5|
-|`STN_N6`|`STN_NUM`|Number bar #6|
-|`STN_N7`|`STN_NUM`|Number bar #7|
-|`STN_N8`|`STN_NUM`|Number bar #8|
-|`STN_N9`|`STN_NUM`|Number bar #9|
-|`STN_NA`|`STN_NUM`|Number bar #A|
-|`STN_NB`|`STN_NUM`|Number bar #B|
-|`STN_NC`|`STN_NUM`|Number bar #C|
-|`STN_S1`|`STN_SL`| `S-` upper|
-|`STN_S2`|`STN_SL`| `S-` lower|
-|`STN_TL`|`STN_TL`| `T-`|
-|`STN_KL`|`STN_KL`| `K-`|
-|`STN_PL`|`STN_PL`| `P-`|
-|`STN_WL`|`STN_WL`| `W-`|
-|`STN_HL`|`STN_HL`| `H-`|
-|`STN_RL`|`STN_RL`| `R-`|
-|`STN_A`|`STN_A`| `A` vowel|
-|`STN_O`|`STN_O`| `O` vowel|
-|`STN_ST1`|`STN_STR`| `*` upper-left |
-|`STN_ST2`|`STN_STR`| `*` lower-left|
-|`STN_ST3`|`STN_STR`| `*` upper-right|
-|`STN_ST4`|`STN_STR`| `*` lower-right|
-|`STN_E`|`STN_E`| `E` vowel|
-|`STN_U`|`STN_U`| `U` vowel|
-|`STN_FR`|`STN_FR`| `-F`|
-|`STN_PR`|`STN_PR`| `-P`|
-|`STN_RR`|`STN_RR`| `-R`|
-|`STN_BR`|`STN_BR`| `-B`|
-|`STN_LR`|`STN_LR`| `-L`|
-|`STN_GR`|`STN_GR`| `-G`|
-|`STN_TR`|`STN_TR`| `-T`|
-|`STN_SR`|`STN_SR`| `-S`|
-|`STN_DR`|`STN_DR`| `-D`|
-|`STN_ZR`|`STN_ZR`| `-Z`|
-|`STN_FN`|| (GeminiPR only)|
-|`STN_RES1`||(GeminiPR only)|
-|`STN_RES2`||(GeminiPR only)|
-|`STN_PWR`||(GeminiPR only)|
diff --git a/keyboards/chimera_ortho/chimera_ortho.c b/keyboards/chimera_ortho/chimera_ortho.c
new file mode 100644 (file)
index 0000000..2a602cf
--- /dev/null
@@ -0,0 +1,31 @@
+#include "chimera_ortho.h"
+
+void uart_init(void) {
+       SERIAL_UART_INIT();
+}
+
+void led_init(void) {
+       DDRD  |= (1<<1);
+       PORTD |= (1<<1);
+       DDRF  |= (1<<4) | (1<<5);
+       PORTF |= (1<<4) | (1<<5);
+}
+
+
+void matrix_init_kb(void) {
+       // put your keyboard start-up code here
+       // runs once when the firmware starts up
+       matrix_init_user();
+       uart_init();
+       led_init();
+}
+
+void matrix_scan_kb(void) {
+       // put your looping keyboard code here
+       // runs every cycle (a lot)
+       matrix_scan_user();
+}
+
+void led_set_kb(uint8_t usb_led) {
+
+}
diff --git a/keyboards/chimera_ortho/chimera_ortho.h b/keyboards/chimera_ortho/chimera_ortho.h
new file mode 100644 (file)
index 0000000..c21b37f
--- /dev/null
@@ -0,0 +1,66 @@
+#ifndef CHIMERA_ORTHO_H
+#define CHIMERA_ORTHO_H
+
+#include "quantum.h"
+#include "matrix.h"
+#include "backlight.h"
+#include <stddef.h>
+
+#define red_led_off   PORTF |= (1<<5)
+#define red_led_on    PORTF &= ~(1<<5)
+#define blu_led_off   PORTF |= (1<<4)
+#define blu_led_on    PORTF &= ~(1<<4)
+#define grn_led_off   PORTD |= (1<<1)
+#define grn_led_on    PORTD &= ~(1<<1)
+
+#define set_led_off     red_led_off; grn_led_off; blu_led_off
+#define set_led_red     red_led_on;  grn_led_off; blu_led_off
+#define set_led_blue    red_led_off; grn_led_off; blu_led_on
+#define set_led_green   red_led_off; grn_led_on;  blu_led_off
+#define set_led_yellow  red_led_on;  grn_led_on;  blu_led_off
+#define set_led_magenta red_led_on;  grn_led_off; blu_led_on
+#define set_led_cyan    red_led_off; grn_led_on;  blu_led_on
+#define set_led_white   red_led_on;  grn_led_on;  blu_led_on
+
+/*
+#define LED_B 5
+#define LED_R 6
+#define LED_G 7
+
+#define all_leds_off PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
+
+#define red_led_on   PORTF |= (1<<LED_R)
+#define red_led_off  PORTF &= ~(1<<LED_R)
+#define grn_led_on   PORTF |= (1<<LED_G)
+#define grn_led_off  PORTF &= ~(1<<LED_G)
+#define blu_led_on   PORTF |= (1<<LED_B)
+#define blu_led_off  PORTF &= ~(1<<LED_B)
+
+#define set_led_off     PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
+#define set_led_red     PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_G) | (1<<LED_R)
+#define set_led_blue    PORTF = PORTF & ~(1<<LED_G) & ~(1<<LED_R) | (1<<LED_B)
+#define set_led_green   PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_R) | (1<<LED_G)
+#define set_led_yellow  PORTF = PORTF & ~(1<<LED_B) | (1<<LED_R) | (1<<LED_G)
+#define set_led_magenta PORTF = PORTF & ~(1<<LED_G) | (1<<LED_R) | (1<<LED_B)
+#define set_led_cyan    PORTF = PORTF & ~(1<<LED_R) | (1<<LED_B) | (1<<LED_G)
+#define set_led_white   PORTF |= (1<<LED_B) | (1<<LED_R) | (1<<LED_G)
+*/
+
+// This a shortcut to help you visually see your layout.
+// The first section contains all of the arguements
+// The second converts the arguments into a two-dimensional array
+#define KEYMAP( \
+  k00, k01, k02, k03, k04, k05, k06,      k07, k08, k09, k10, k11, k12, k13, \
+  k14, k15, k16, k17, k18, k19, k20,      k21, k22, k23, k24, k25, k26, k27, \
+  k28, k29, k31, k32, k33, k34, k35,      k36, k37, k38, k41, k42, k43, k44,\
+                      k45, k46,               k47, k48      \
+) \
+{ \
+       { KC_##k01,   KC_##k02, KC_##k03, KC_##k04, KC_##k05,      KC_##k08, KC_##k09, KC_##k10, KC_##k11, KC_##k12   }, \
+       { KC_##k15,   KC_##k16, KC_##k17, KC_##k18, KC_##k19,      KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26   }, \
+       { KC_##k29,   KC_##k31, KC_##k32, KC_##k33, KC_##k34,      KC_##k37, KC_##k38, KC_##k41, KC_##k42, KC_##k43   }, \
+       { KC_NO,      KC_##k06, KC_##k20, KC_##k35, KC_##k46,      KC_##k47, KC_##k36, KC_##k21, KC_##k07, KC_NO },  \
+       { KC_NO,      KC_##k28, KC_##k14, KC_##k00, KC_##k45,      KC_##k48, KC_##k13, KC_##k27, KC_##k44, KC_NO }, \
+}
+
+#endif
diff --git a/keyboards/chimera_ortho/config.h b/keyboards/chimera_ortho/config.h
new file mode 100644 (file)
index 0000000..44c6212
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+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      0x6060
+#define DEVICE_VER      0x0001
+#define MANUFACTURER    unknown
+#define PRODUCT         Chimera Ortho
+#define DESCRIPTION     q.m.k. keyboard firmware for Chimera Ortho
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 10
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+//#define BACKLIGHT_LEVELS 3
+
+#define ONESHOT_TIMEOUT 500
+
+
+/* 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.
+ */
+
+#define PREVENT_STUCK_MODIFIERS
+
+/* 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
+
+//UART settings for communication with the RF microcontroller
+#define SERIAL_UART_BAUD 1000000
+#define SERIAL_UART_DATA UDR1
+#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
+#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
+#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
+#define SERIAL_UART_INIT() do { \
+       /* baud rate */ \
+       UBRR1L = SERIAL_UART_UBRR; \
+       /* baud rate */ \
+       UBRR1H = SERIAL_UART_UBRR >> 8; \
+       /* enable TX and RX */ \
+       UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
+       /* 8-bit data */ \
+       UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
+       } while(0)
+
+#endif
diff --git a/keyboards/chimera_ortho/keymaps/default/keymap.c b/keyboards/chimera_ortho/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..ef477e6
--- /dev/null
@@ -0,0 +1,193 @@
+// this is the style you want to emulate.
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+
+#include "chimera_ortho.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.
+enum chimera_ortho_layers
+{
+       _QWERTY,
+       _CAPS,
+       _NUMPAD,
+       _SYMBOLS,
+       _MACROS,
+       _NAV
+};
+
+#define KC_NMPD TG(_NUMPAD)
+#define KC_SYMB TG(_SYMBOLS)
+#define KC_SPFN LT(_NAV,KC_EQL)
+#define KC_SCTL MT(MOD_LCTL, KC_LBRC)
+#define KC_SCTR MT(MOD_LCTL, KC_RBRC)
+#define KC_SPLT MT(MOD_LALT, KC_MINS)
+#define KC_SPRT MT(MOD_LALT, KC_1)
+#define KC_GBRC MT(MOD_RGUI, KC_8)
+#define KC_GQOT MT(MOD_LGUI, KC_QUOT)
+#define KC_MESC LT(_MACROS, KC_ESC)
+#define KC_INCL M(0)
+#define KC_PULL M(1)
+#define KC_PUSH M(2)
+#define KC_SCAP M(3)
+#define KC_SCOF M(4)
+#define KC_CAD LALT(LCTL(KC_DEL))
+
+#define LONGPRESS_DELAY 150
+//#define LAYER_TOGGLE_DELAY 300
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+#define KC_ KC_TRNS 
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+  [_QWERTY] = KEYMAP(  
+  //,----+----+----+----+----+----+----.     ,----+----+----+----+----+----+----.
+     MESC, Q  , W  , E  , R  , T  ,SCTL,      SCTR, Y  , U  , I  , O  , P  ,QUOT,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+     TAB , A  , S  , D  , F  , G  ,SPLT,      SPRT, H  , J  , K  , L  ,SCLN,ENT ,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+     LSPO, Z  , X  , C  , V  , B  ,SPFN,      GBRC, N  , M  ,COMM,DOT ,SLSH,RSPC,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+                         NMPD,BSPC,                SPC ,SYMB
+  // \------------------+----+----+---/       \---+----+----+-------------------/
+  ),
+
+  [_CAPS] = KEYMAP(  
+  //,----+----+----+----+----+----+----.     ,----+----+----+----+----+----+----.
+         ,    ,    ,    ,    ,    ,    ,          ,    ,    ,    ,    ,    ,    ,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+         ,    ,    ,    ,    ,    ,UNDS,          ,    ,    ,    ,    ,COLN,    ,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+     SCOF,    ,    ,    ,    ,    ,    ,          ,    ,    ,    ,    ,    ,SCOF,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+                             ,    ,                    ,    
+  // \------------------+----+----+---/       \---+----+----+-------------------/
+  ),
+
+  [_NUMPAD] = KEYMAP(  
+  //,----+----+----+----+----+----+----.     ,----+----+----+----+----+----+----.
+         ,    ,COLN ,    ,    ,    ,    ,          ,    , 7  , 8  , 9  ,ASTR,MINS,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+         ,    ,DOT ,    ,    ,    ,    ,          ,    , 4  , 5  , 6  ,PLUS,    ,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+         ,    ,    ,    ,    ,    ,    ,          ,    , 1  , 2  , 3  ,SLSH,    ,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+                             ,    ,                     , 0  
+  // \------------------+----+----+---/       \---+----+----+-------------------/
+  ),
+
+  [_SYMBOLS] = KEYMAP(  
+  //,----+----+----+----+----+----+----.     ,----+----+----+----+----+----+----.
+         ,EXLM, AT ,HASH,DLR ,PERC,    ,          ,CIRC,AMPR,ASTR,LPRN,RPRN,BSLS,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+         , F1 , F2 , F3 , F4 , F5 ,    ,          ,TILD,COLN,UNDS,LCBR,RCBR,    ,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+         , F6 , F7 , F8 , F9 ,F10 ,    ,          ,GRV ,SCLN,MINS,LBRC,RBRC,    ,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+                         PIPE,    ,                    ,
+  // \------------------+----+----+---/       \---+----+----+-------------------/
+  ),
+
+  [_NAV] = KEYMAP(  
+  //,----+----+----+----+----+----+----.     ,----+----+----+----+----+----+----.
+         ,    ,    ,    ,    ,    ,    ,          ,    ,    , UP ,    ,PSCR,    ,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+         ,    ,    ,    ,    ,    ,    ,          ,    ,LEFT,DOWN,RGHT,    ,    ,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+         ,    ,    ,    ,    ,    ,    ,          ,    ,PGUP,PGDN,    ,    ,    ,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+                             ,DEL ,                    ,    
+  // \------------------+----+----+---/       \---+----+----+-------------------/
+  ),
+
+  [_MACROS] = KEYMAP(  
+  //,----+----+----+----+----+----+----.     ,----+----+----+----+----+----+----.
+         ,    ,    ,    ,    ,    ,    ,          ,    ,    ,INCL,    ,    ,    ,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+         ,    ,    ,CAD ,    ,    ,    ,          ,    ,    ,    ,    ,    ,    ,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+     SCAP,    ,    ,    ,    ,    ,    ,          ,    ,    ,PULL,PUSH,    ,SCAP,
+  //|----+----+----+----+----+----+----|     |----+----+----+----+----+----+----|
+                             ,    ,                    ,    
+  // \------------------+----+----+---/       \---+----+----+-------------------/
+  )
+
+};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  switch(id) {
+    /* include some kind of library or header */
+    case 0:
+      if (record->event.pressed) {
+        SEND_STRING("#include <>");
+        return MACRO( T(LEFT), END);
+      }
+      break;
+    case 1:
+      if (record->event.pressed) {
+        SEND_STRING("git pull");
+        return MACRO( T(ENT), END );
+      }
+      break;
+    case 2:
+      if (record->event.pressed){
+        SEND_STRING("git push");
+        return MACRO( T(ENT), END );
+      }
+      break;
+    case 3:
+      if (record->event.pressed){
+        layer_on(_CAPS);
+        register_code(KC_CAPSLOCK);
+        unregister_code(KC_CAPSLOCK);
+      }
+      break;
+    case 4:
+      if (record->event.pressed){
+        layer_off(_CAPS);
+        register_code(KC_CAPSLOCK);
+        unregister_code(KC_CAPSLOCK);
+      }
+      break;
+  }
+  return MACRO_NONE;
+};
+
+void matrix_scan_user(void) {
+    uint8_t layer = biton32(layer_state);
+    
+    switch (layer) {
+       case _QWERTY:
+           set_led_green;
+           break;
+        case _CAPS:
+           set_led_white;
+           break;
+        case _NUMPAD:
+            set_led_blue;
+            break;
+        case _SYMBOLS:
+            set_led_red;
+            break;
+        case _NAV:
+           set_led_magenta;
+           break;
+        case _MACROS:
+           set_led_cyan;
+           break;
+       default:
+            set_led_green;
+            break;
+    }
+};
diff --git a/keyboards/chimera_ortho/matrix.c b/keyboards/chimera_ortho/matrix.c
new file mode 100644 (file)
index 0000000..0d04633
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+Copyright 2012 Jun Wako
+Copyright 2014 Jack Humbert
+
+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"
+
+#if (MATRIX_COLS <= 8)
+#    define print_matrix_header()  print("\nr/c 01234567\n")
+#    define print_matrix_row(row)  print_bin_reverse8(matrix_get_row(row))
+#    define matrix_bitpop(i)       bitpop(matrix[i])
+#    define ROW_SHIFTER ((uint8_t)1)
+#elif (MATRIX_COLS <= 16)
+#    define print_matrix_header()  print("\nr/c 0123456789ABCDEF\n")
+#    define print_matrix_row(row)  print_bin_reverse16(matrix_get_row(row))
+#    define matrix_bitpop(i)       bitpop16(matrix[i])
+#    define ROW_SHIFTER ((uint16_t)1)
+#elif (MATRIX_COLS <= 32)
+#    define print_matrix_header()  print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
+#    define print_matrix_row(row)  print_bin_reverse32(matrix_get_row(row))
+#    define matrix_bitpop(i)       bitpop32(matrix[i])
+#    define ROW_SHIFTER  ((uint32_t)1)
+#endif
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+
+__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) {
+
+    matrix_init_quantum();
+}
+
+uint8_t matrix_scan(void)
+{
+    SERIAL_UART_INIT();
+
+    uint32_t timeout = 0;
+
+    //the s character requests the RF slave to send the matrix
+    SERIAL_UART_DATA = 's';
+
+    //trust the external keystates entirely, erase the last data
+    uint8_t uart_data[11] = {0};
+
+    //there are 10 bytes corresponding to 10 columns, and an end byte
+    for (uint8_t i = 0; i < 11; i++) {
+        //wait for the serial data, timeout if it's been too long
+        //this only happened in testing with a loose wire, but does no
+        //harm to leave it in here
+        while(!SERIAL_UART_RXD_PRESENT){
+            timeout++;
+            if (timeout > 10000){
+                break;
+            }
+        } 
+        uart_data[i] = SERIAL_UART_DATA;
+    }
+
+    //check for the end packet, the key state bytes use the LSBs, so 0xE0
+    //will only show up here if the correct bytes were recieved
+    if (uart_data[10] == 0xE0)
+    {
+        //shifting and transferring the keystates to the QMK matrix variable
+        for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+            matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 5;
+        }
+    }
+
+
+    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_matrix_header();
+
+    for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+        phex(row); print(": ");
+        print_matrix_row(row);
+        print("\n");
+    }
+}
+
+uint8_t matrix_key_count(void)
+{
+    uint8_t count = 0;
+    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+        count += matrix_bitpop(i);
+    }
+    return count;
+}
diff --git a/keyboards/chimera_ortho/rules.mk b/keyboards/chimera_ortho/rules.mk
new file mode 100644 (file)
index 0000000..098bf28
--- /dev/null
@@ -0,0 +1,78 @@
+
+OPT_DEFS += -DCHIMERA_ORTHO_PROMICRO
+OPT_DEFS += -DCATERINA_BOOTLOADER
+CHIMERA_ORTHO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
+                         avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
+
+# # 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 = 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
+#   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
+CUSTOM_MATRIX = yes    # Remote matrix from the wireless bridge
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+# 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
+# MIDI_ENABLE = YES            # MIDI controls
+UNICODE_ENABLE = YES           # Unicode
+# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
+
+USB = /dev/ttyACM0
index 4f8cfabd88530f3f5828714fe451baf9a0739628..2615ac1ae821b42dad17b8880648a225a96bb802 100644 (file)
@@ -8,7 +8,20 @@
     #include "rev2.h"
 #endif
 
-
 #include "quantum.h"
 
-#endif
\ No newline at end of file
+// Used to create a keymap using only KC_ prefixed keys
+#define KC_KEYMAP( \
+    k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \
+    k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \
+    k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \
+    k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314  \
+    ) \
+    { \
+        { KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k010, KC_##k011, KC_##k012, KC_##k013, KC_##k014 }, \
+        { KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k110, KC_##k111, KC_##k112, KC_##k113, KC_##k114 }, \
+        { KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k210, KC_##k211, KC_##k212, KC_##k213, KC_##k214 }, \
+        { KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k310, KC_##k311, KC_##k312, KC_##k313, KC_##k314 }  \
+    }
+
+#endif
diff --git a/keyboards/eco/keymaps/hexwire/keymap.c b/keyboards/eco/keymaps/hexwire/keymap.c
new file mode 100644 (file)
index 0000000..c20d45c
--- /dev/null
@@ -0,0 +1,120 @@
+
+// Default ECO Layout
+// KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039
+
+#include "eco.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 _LOWER 1
+#define _RAISE 2
+#define _FN3 3
+
+enum eco_keycodes {
+  QWERTY = SAFE_RANGE,
+  LOWER,
+  RAISE,
+};
+
+// Fillers to make layering more clear
+#define KC_ KC_TRNS
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+#define KC_RST RESET
+#define KC_DBUG DEBUG
+#define KC_LOWR MO(_LOWER)
+#define KC_RASE MO(_RAISE)
+#define KC_ENTS MT(MOD_LSFT, KC_ENT)
+#define KC_ESCC MT(MOD_LCTL, KC_ESC)
+#define KC_GRVF LT(_FN3, KC_GRV)
+#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_RTOG RGB_TOG
+#define KC_RMOD RGB_MOD
+#define KC_RHUI RGB_HUI
+#define KC_RHUD RGB_HUD
+#define KC_RSAI RGB_SAI
+#define KC_RSAD RGB_SAD
+#define KC_RVAI RGB_VAI
+#define KC_RVAD RGB_VAD
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+  [_QWERTY] = KC_KEYMAP(
+  //,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
+     TAB , Q  , W  , E  , R  , T  ,LPRN,RPRN, Y  , U  , I  , O  , P  ,MINS,
+  //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
+     ESCC, A  , S  , D  , F  , G  ,LBRC,RBRC, H  , J  , K  , L  ,SCLN,QUOT,
+  //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
+     LSFT, Z  , X  , C  , V  , B  ,LCBR,RCBR, N  , M  ,COMM,DOT ,SLSH,ENTS,
+  //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
+     GRVF,LCTL,LALT,LGUI,LOWR,SPC ,SPC ,BSPC,BSPC,RASE,LEFT,DOWN, UP ,RGHT
+  //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
+  ),
+
+
+  [_LOWER] = KC_KEYMAP(
+  //,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
+         , 1  , 2  , 3  , 4  , 5  ,LPRN,RPRN, 6  , 7  , 8  , 9  , 0  ,    ,
+  //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
+     DEL ,CAPP,LEFT,RGHT, UP ,LBRC,LBRC,RBRC,RBRC, P4 , P5 , P6 ,PLUS,PIPE,
+  //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
+         ,CPYP,    ,    ,DOWN,LCBR,LCBR,RCBR,RCBR, P1 , P2 , P3 ,MINS,    ,
+  //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
+         ,    ,    ,    ,    ,    ,    ,DEL ,DEL ,    , P0 ,PDOT,    ,    
+  //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
+  ),
+
+  [_RAISE] = KC_KEYMAP(
+  //,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
+         ,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 ,
+  //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
+     RTOG,RMOD,RHUI,RSAI,RVAI,    ,    ,    ,    ,    ,    ,    ,    ,    ,
+  //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
+     RST ,DBUG,RHUD,RSAD,RVAD,    ,    ,    ,    ,    ,    ,    ,    ,    ,
+  //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
+         ,    ,    ,    ,    ,    ,    ,    ,    ,    ,    ,    ,    ,    
+  //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
+  ),
+
+};
+
+void persistant_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) {
+        persistant_default_layer_set(1UL<<_QWERTY);
+      }
+      return false;
+      break;
+  }
+  return true;
+}
+
diff --git a/keyboards/eco/keymaps/hexwire/rules.mk b/keyboards/eco/keymaps/hexwire/rules.mk
new file mode 100644 (file)
index 0000000..7dab979
--- /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
diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/README.md b/keyboards/ergodox_infinity/keymaps/dudeofawesome/README.md
new file mode 100644 (file)
index 0000000..98eb7ab
--- /dev/null
@@ -0,0 +1,25 @@
+# DudeOfAwesome's ErgoDox Infinity Layout
+
+A basic ErgoDox layout with Planck-like tri-layer support.
+
+![ErgoDox Layout](https://i.imgur.com/9zfKPV7.png)
+
+## Features
+
+- Planck-like tri-layer
+- Workman layout
+- In-progress gaming layer
+- Numpad
+- LCD colors are linked together, like the default KLL firmware
+
+## Building and flashing
+
+1. Put your board in DFU mode with either the button on the bottom, or with a software key in your current firmware
+1. Flash left half:
+    ```bash
+    $ make ergodox_infinity:dudeofawesome:dfu-util
+    ```
+1. Flash right half:
+    ```bash
+    $ make ergodox_infinity:dudeofawesome:dfu-util MASTER=right
+    ```
diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c b/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c
new file mode 100644 (file)
index 0000000..7d76b25
--- /dev/null
@@ -0,0 +1,568 @@
+#include QMK_KEYBOARD_H
+#include "debug.h"
+#include "action_layer.h"
+#include "version.h"
+
+enum custom_layers {
+    _QWERTY,
+    _DVORAK,
+    _WORKMAN,
+    _GAME,
+    _MOUSE,
+    _NUM,
+    _LOWER,
+    _RAISE,
+    _ADJUST,
+};
+
+enum custom_keycodes {
+    QWERTY = SAFE_RANGE,
+    DVORAK,
+    WORKMAN,
+    LOWER,
+    RAISE,
+    GAME,
+    MOUSE,
+    NUM,
+    EPRM,
+    VRSN,
+    RGB_SLD
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: Basic QWERTY layer
+ *
+ * ,---------------------------------------------.           ,---------------------------------------------.
+ * |   -    |  1  |  2  |  3  |  4  |  5  | Esc  |           | Esc  |  6  |  7  |  8  |  9  |  0  |   =    |
+ * |--------+-----+-----+-----+-----+------------|           |------+-----+-----+-----+-----+-----+--------|
+ * |  Tab   |  Q  |  W  |  E  |  R  |  T  |  [{  |           |  ]}  |  Y  |  U  |  I  |  O  |  P  |  BSPC  |
+ * |--------+-----+-----+-----+-----+-----|      |           |      |-----+-----+-----+-----+-----+--------|
+ * |  ESC   |  A  |  S  |  D  |  F  |  G  |------|           |------|  H  |  J  |  K  |  L  |  ;  |   '"   |
+ * |--------+-----+-----+-----+-----+-----|  L1  |           |  L1  |-----+-----+-----+-----+-----+--------|
+ * | LShift |  Z  |  X  |  C  |  V  |  B  |      |           |      |  N  |  M  |  ,  |  .  |  /  | Enter  |
+ * `--------+-----+-----+-----+-----+------------'           `------------+-----+-----+-----+-----+--------'
+ *   | Num  |Ctrl | Alt |LGUI |Lower|                                     |Raise|Left |Down | Up  |Right |
+ *   `------------------------------'                                     `------------------------------'
+ *                                   ,------------.          ,------------.
+ *                                   |Play |Mouse |          | Num  |Mouse|
+ *                              ,----|-----|------|          |------+-----+-----.
+ *                              |    |     | Alt  |          | Alt  |     |     |
+ *                              |BSPC|LOWER|------|          |------|RAISE|Space|
+ *                              |    |     | LGUI |          | LGUI |     |     |
+ *                              `-----------------'          `------------------'
+ */
+[_QWERTY] = LAYOUT_ergodox(
+  // left hand
+  KC_MINUS, KC_1,    KC_2,    KC_3,    KC_4,  KC_5, KC_ESC,
+  KC_TAB,   KC_Q,    KC_W,    KC_E,    KC_R,  KC_T, KC_LBRACKET,
+  KC_ESC,   KC_A,    KC_S,    KC_D,    KC_F,  KC_G,
+  KC_LSPO,  KC_Z,    KC_X,    KC_C,    KC_V,  KC_B, KC_FN1,
+  TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
+
+                                                  KC_MPLY,   TG(_MOUSE),
+                                                             KC_LALT,
+                                          LOWER,  KC_BSPACE, KC_LGUI,
+
+  // right hand
+  KC_ESC,      KC_6, KC_7,  KC_8,    KC_9,    KC_0,                KC_EQUAL,
+  KC_RBRACKET, KC_Y, KC_U,  KC_I,    KC_O,    KC_P,                KC_BSPACE,
+               KC_H, KC_J,  KC_K,    KC_L,    KC_SCOLON,           KC_QUOTE,
+  KC_FN1,      KC_N, KC_M,  KC_COMM, KC_DOT,  LT(_MOUSE, KC_SLSH), KC_ENTER,
+                     RAISE, KC_LEFT, KC_DOWN, KC_UP,               KC_RIGHT,
+
+  TG(_NUM), TG(_MOUSE),
+  KC_LALT,
+  KC_LGUI,  KC_SPACE,   RAISE
+),
+
+/* Keymap 0: Basic Dvorak layer
+ *
+ * ,---------------------------------------------.           ,--------------------------------------------.
+ * |   -    |  1  |  2  |  3  |  4  |  5  | Esc  |           | Esc  |  6  |  7  |  8  |  9  |  0  |   =    |
+ * |--------+-----+-----+-----+-----+------------|           |------+-----+-----+-----+-----+-----+--------|
+ * |  Tab   |  '  |  ,  |  .  |  P  |  Y  |  [{  |           |  ]}  |  F  |  G  |  C  |  R  |  L  |  BSPC  |
+ * |--------+-----+-----+-----+-----+-----|      |           |      |-----+-----+-----+-----+-----+--------|
+ * |  ESC   |  A  |  O  |  E  |  U  |  I  |------|           |------|  D  |  H  |  T  |  N  |  S  |   /    |
+ * |--------+-----+-----+-----+-----+-----|  L1  |           |  L1  |-----+-----+-----+-----+-----+--------|
+ * | LShift |  ;  |  Q  |  J  |  K  |  X  |      |           |      |  B  |  M  |  W  |  V  |  Z  | Enter  |
+ * `--------+-----+-----+-----+-----+------------'           `------------+-----+-----+-----+-----+--------'
+ *   | Num  |Ctrl | Alt |LGUI |Lower|                                     |Raise|Left |Down | Up  |Right |
+ *   `------------------------------'                                     `------------------------------'
+ *                                   ,------------.          ,------------.
+ *                                   |Play |Mouse |          | Num  |Mouse|
+ *                              ,----|-----|------|          |------+-----+-----.
+ *                              |    |     | Alt  |          | Alt  |     |     |
+ *                              |BSPC|LOWER|------|          |------|RAISE|Space|
+ *                              |    |     | LGUI |          | LGUI |     |     |
+ *                              `-----------------'          `------------------'
+ */
+[_DVORAK] = LAYOUT_ergodox(
+  // left hand
+  KC_MINUS, KC_1,      KC_2,    KC_3,    KC_4,  KC_5, KC_ESC,
+  KC_TAB,   KC_QUOT,   KC_COMM, KC_DOT,  KC_P,  KC_Y, KC_LBRACKET,
+  KC_ESC,   KC_A,      KC_O,    KC_E,    KC_U,  KC_I,
+  KC_LSPO,  KC_SCOLON, KC_Q,    KC_J,    KC_K,  KC_X, KC_FN1,
+  TG(_NUM), KC_LCTL,   KC_LALT, KC_LGUI, LOWER,
+
+                                                  KC_MPLY, TG(_MOUSE),
+                                                           KC_LALT,
+                                      KC_BSPACE,  LOWER,   KC_LGUI,
+
+  // right hand
+  KC_ESC,      KC_6, KC_7,  KC_8,    KC_9,    KC_0,  KC_EQUAL,
+  KC_RBRACKET, KC_F, KC_G,  KC_C,    KC_R,    KC_L,  KC_BSPACE,
+               KC_D, KC_H,  KC_T,    KC_N,    KC_S,  LT(MOUSE, KC_SLSH),
+  KC_FN1,      KC_B, KC_M,  KC_W,    KC_V,    KC_Z,  KC_ENTER,
+                     RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
+
+  TG(_NUM), TG(_MOUSE),
+  KC_LALT,
+  KC_LGUI,  RAISE,      KC_SPACE
+),
+
+/* Keymap 0: Basic Workman layer
+ *
+ * ,---------------------------------------------.           ,--------------------------------------------.
+ * |   -    |  1  |  2  |  3  |  4  |  5  | Esc  |           | Esc  |  6  |  7  |  8  |  9  |  0  |   =    |
+ * |--------+-----+-----+-----+-----+------------|           |------+-----+-----+-----+-----+-----+--------|
+ * |  Tab   |  Q  |  D  |  R  |  W  |  B  |  [{  |           |  ]}  |  J  |  F  |  U  |  P  |  ;  |  BSPC  |
+ * |--------+-----+-----+-----+-----+-----|      |           |      |-----+-----+-----+-----+-----+--------|
+ * |  ESC   |  A  |  S  |  H  |  T  |  G  |------|           |------|  Y  |  N  |  E  |  O  |  I  |   '"   |
+ * |--------+-----+-----+-----+-----+-----|  L1  |           |  L1  |-----+-----+-----+-----+-----+--------|
+ * | LShift |  Z  |  X  |  M  |  C  |  V  |      |           |      |  K  |  L  |  ,  |  .  |  /  | Enter  |
+ * `--------+-----+-----+-----+-----+------------'           `------------+-----+-----+-----+-----+--------'
+ *   | Num  |Ctrl | Alt |LGUI |Lower|                                     |Raise|Left |Down | Up  |Right |
+ *   `------------------------------'                                     `------------------------------'
+ *                                   ,------------.          ,------------.
+ *                                   |Play |Mouse |          | Num  |Mouse|
+ *                              ,----|-----|------|          |------+-----+-----.
+ *                              |    |     | Alt  |          | Alt  |     |     |
+ *                              |BSPC|LOWER|------|          |------|RAISE|Space|
+ *                              |    |     | LGUI |          | LGUI |     |     |
+ *                              `-----------------'          `------------------'
+ */
+[_WORKMAN] = LAYOUT_ergodox(
+  // left hand
+  KC_MINUS, KC_1,    KC_2,    KC_3,    KC_4,    KC_5, KC_ESC,
+  KC_TAB,   KC_Q,    KC_D,    KC_R,    KC_W,    KC_B, KC_LBRACKET,
+  KC_ESC,   KC_A,    KC_S,    KC_H,    KC_T,    KC_G,
+  KC_LSPO,  KC_Z,    KC_X,    KC_M,    KC_C,    KC_V, KC_FN1,
+  TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
+
+                                                  KC_MPLY, TG(_MOUSE),
+                                                            KC_LALT,
+                                      KC_BSPACE,  LOWER,   KC_LGUI,
+
+  // right hand
+  KC_ESC,      KC_6, KC_7,  KC_8,    KC_9,    KC_0,                KC_EQUAL,
+  KC_RBRACKET, KC_J, KC_F,  KC_U,    KC_P,    KC_SCOLON,           KC_BSPACE,
+               KC_Y, KC_N,  KC_E,    KC_O,    KC_I,                KC_QUOTE,
+  KC_FN1,      KC_K, KC_L,  KC_COMM, KC_DOT,  LT(_MOUSE, KC_SLSH), KC_ENTER,
+                     RAISE, KC_LEFT, KC_DOWN, KC_UP,               KC_RIGHT,
+
+  NUM,     TG(_MOUSE),
+  KC_LALT,
+  KC_LGUI, RAISE,      KC_SPACE
+),
+
+/* Lower
+ *
+ * ,---------------------------------------------------.           ,--------------------------------------------------.
+ * | Version |  F1  |  F2  |  F3  |  F4  |  F5  | F11  |           | F12  |  F6  |  F7  |  F8  |  F9  | F10  |        |
+ * |---------+------+------+------+------+------+------|           |------+------+------+------+------+------+--------|
+ * |    ~    |  !   |  @   |  #   |  $   |  %   |      |           |      |  ^   |  &   |  *   |  (   |  )   |        |
+ * |---------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |   Del   |  F1  |  F2  |  F3  |  F4  |  F5  |------|           |------|  F6  |  _   |  +   |  {   |  }   |   |    |
+ * |---------+------+------+------+------+------|  L2  |           |  L2  |------+------+------+------+------+--------|
+ * |         |  F7  |  F8  |  F9  | F10  | F11  |      |           |      | F12  |ISO ~ |ISO | | Home | End  |        |
+ * `---------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |       |      |      |      |      |                                       |      | Next | Vol- | Vol+ | Play |
+ *   `-----------------------------------'                                       `----------------------------------'
+ *                                       ,-------------.           ,-------------.
+ *                                       |Animat|      |           |Toggle|Solid |
+ *                                ,------|------|------|           |------+------+------.
+ *                                |Bright|Bright|      |           |      |Hue-  |Hue+  |
+ *                                |ness- |ness+ |------|           |------|      |      |
+ *                                |      |      |      |           |      |      |      |
+ *                                `--------------------'           `--------------------'
+ */
+[_LOWER] = LAYOUT_ergodox(
+  // left hand
+  VRSN,    KC_F1,   KC_F2,   KC_F3,   KC_F4,    KC_F5,   KC_F11,
+  KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,   KC_PERC, _______,
+  KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,    KC_F5,
+  _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,   KC_F11,  _______,
+  _______, _______, _______, _______, _______,
+
+                                       _______, _______,
+                                                _______,
+                              _______, _______, _______,
+
+  // right hand
+  KC_F12,  KC_F6,   KC_F7,      KC_F8,      KC_F9,   KC_F10,  KC_F11,
+  _______, KC_CIRC, KC_AMPR,    KC_ASTR,    KC_LPRN, KC_RPRN, _______,
+           KC_F6,   KC_UNDS,    KC_PLUS,    KC_LCBR, KC_RCBR, KC_PIPE,
+  _______, KC_F12,  S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END,  _______,
+                    _______,    KC_MNXT,    KC_VOLD, KC_VOLU, KC_MPLY,
+
+  _______, _______,
+  _______,
+  _______, _______, _______
+),
+
+/* Raise
+ *
+ * ,---------------------------------------------------.           ,--------------------------------------------------.
+ * | Version |  F1  |  F2  |  F3  |  F4  |  F5  | F11  |           | F12  |  F6  |  F7  |  F8  |  F9  | F10  |  F11   |
+ * |---------+------+------+------+------+------+------|           |------+------+------+------+------+------+--------|
+ * |    `    |  1   |  2   |  3   |  4   |  5   |      |           |      |  6   |  7   |  8   |  9   |  0   |        |
+ * |---------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |   Del   |  F1  |  F2  |  F3  |  F4  |  F5  |------|           |------|  F6  |  -   |  =   |  [   |  ]   |   \    |
+ * |---------+------+------+------+------+------|  L2  |           |  L2  |------+------+------+------+------+--------|
+ * |         |  F7  |  F8  |  F9  | F10  | F11  |      |           |      | F12  |ISO # |ISO / |Pg Up |Pg Dn |        |
+ * `---------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |       |      |      |      |      |                                       |      | Next | Vol- | Vol+ | Play |
+ *   `-----------------------------------'                                       `----------------------------------'
+ *                                       ,-------------.           ,-------------.
+ *                                       |Animat|      |           |Toggle|Solid |
+ *                                ,------|------|------|           |------+------+------.
+ *                                |Bright|Bright|      |           |      |Hue-  |Hue+  |
+ *                                |ness- |ness+ |------|           |------|      |      |
+ *                                |      |      |      |           |      |      |      |
+ *                                `--------------------'           `--------------------'
+ */
+[_RAISE] = LAYOUT_ergodox(
+  // left hand
+  VRSN,    KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F11,
+  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    _______,
+  KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,
+  _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  _______,
+  _______, _______, _______, _______, _______,
+
+                                               _______, _______,
+                                                        _______,
+                                      _______, _______, _______,
+
+  // right hand
+  KC_F12,  KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,
+  _______, KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    _______,
+           KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS,
+  _______, KC_F12,  KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
+                    _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
+
+  _______, _______,
+  _______,
+  _______, _______,  _______
+),
+
+/* Adjust
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |Version |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |Reset |Debug |      |      |      |      |           |      |      |TRM on|TRMoff|      |      |  Del   |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |AG Nrm|------|           |------|AG Swp|QWERTY|Wrkman|Dvorak|      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |      |           |      |      |      | Prev | Next |      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |VolUp |VolDn | Mute |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                      ,-------------.           ,-------------.
+ *                                      |      |      |           |      |      |
+ *                               ,------|------|------|           |------+------+------.
+ *                               |      |      |      |           |      |      |      |
+ *                               |      |      |------|           |------|      |      |
+ *                               |      |      |      |           |      |      |      |
+ *                               `--------------------'           `--------------------'
+ */
+[_ADJUST] = LAYOUT_ergodox(
+  // left hand
+  VRSN,    _______, _______, _______, _______, _______, _______,
+  _______, RESET,   DEBUG,   _______, _______, _______, _______,
+  _______, _______, _______, _______, _______, AG_NORM,
+  _______, _______, _______, _______, _______, _______, _______,
+  _______, _______, _______, _______, _______,
+
+                                               _______, _______,
+                                                        _______,
+                                      _______, _______, _______,
+
+  // right hand
+  _______, _______, _______, _______,  _______, _______, _______,
+  _______, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL,
+           AG_SWAP, QWERTY,  WORKMAN,  DVORAK,  _______, _______,
+  _______, _______, _______, _______,  _______, _______, _______,
+                    _______, _______,  _______, _______, _______,
+
+  _______, _______,
+  _______,
+  _______, _______,  _______
+),
+
+/* Keymap 2: Media and mouse keys
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |      | Lclk | MsUp | Rclk |Wh Up |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |MsLeft|MsDown|MsRght|Wh Dn |------|           |------|      |      |      |      |      |  Play  |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |      |           |      |      |      | Prev | Next |      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |VolUp |VolDn | Mute |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                      ,-------------.           ,-------------.
+ *                                      |      |      |           |      |      |
+ *                               ,------|------|------|           |------+------+------.
+ *                               |      |      |      |           |      |Brwser|Brwser|
+ *                               | Lclk | Rclk |------|           |------|Back  |Fwd   |
+ *                               |      |      |      |           |      |      |      |
+ *                               `--------------------'           `--------------------'
+ */
+// MOUSE
+[_MOUSE] = LAYOUT_ergodox(
+  // left hand
+  _______, _______, _______, _______, _______, _______, _______,
+  _______, _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_D, _______,
+  _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U,
+  _______, _______, KC_WH_L, KC_BTN3, KC_WH_R, _______, TO(_GAME),
+  _______, _______, _______, _______, _______,
+
+                                       _______, _______,
+                                                KC_WH_D,
+                              KC_BTN1, KC_BTN2, KC_WH_U,
+
+  // right hand
+  _______,   _______, _______, _______, _______, _______, _______,
+  _______,   _______, _______, _______, _______, _______, _______,
+             _______, _______, _______, _______, _______, KC_MPLY,
+  TO(_GAME), _______, _______, KC_MPRV, KC_MNXT, _______, _______,
+                      KC_VOLU, KC_VOLD, KC_MUTE, _______, _______,
+
+  _______, _______,
+  _______,
+  _______, KC_WBAK, KC_WFWD
+),
+
+/* Keymap 2: GAME
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |      | Lclk | MsUp | Rclk |      |      |           |      |      |      |      |      |      |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |MsLeft|MsDown|MsRght|      |------|           |------|      |      |      |      |      |  Play  |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |      |      |      |      |      |      |           |      |      |      | Prev | Next |      |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |VolUp |VolDn | Mute |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                      ,-------------.           ,-------------.
+ *                                      |      |      |           |      |      |
+ *                               ,------|------|------|           |------+------+------.
+ *                               |      |      |      |           |      |Brwser|Brwser|
+ *                               | Lclk | Rclk |------|           |------|Back  |Fwd   |
+ *                               |      |      |      |           |      |      |      |
+ *                               `--------------------'           `--------------------'
+ */
+[_GAME] = LAYOUT_ergodox(
+  // left hand
+  _______, _______, _______, _______, _______, _______, _______,
+  _______, _______, _______, _______, _______, _______, _______,
+  _______, _______, _______, _______, _______, _______,
+  _______, _______, _______, _______, _______, _______, _______,
+  _______, _______, _______, _______, _______,
+
+                                                  _______, _______,
+                                                           _______,
+                                        KC_SPACE, KC_LGUI, KC_LALT,
+
+  // right hand
+  _______, _______, _______, _______, _______, _______, _______,
+  _______, _______, _______, _______, _______, _______, _______,
+           _______, _______, _______, _______, _______, _______,
+  _______, _______, _______, _______, _______, _______, _______,
+                    _______, _______, _______, _______, _______,
+
+  TG(_MOUSE), TG(_NUM),
+  _______,
+  _______,    _______,  _______
+),
+
+
+/* Keymap 2: NUMPAD
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |  F1  |  F2  |  F3  |  F4  |  F5  | F11  |           | F12  |  F6  |  F7  |  F8  |  F9  |  F10 |        |
+ * |--------+------+------+------+------+------+------|           |------+------+------+------+------+------+--------|
+ * |        |  !   |  @   |  {   |  }   |  |   |      |           |      |      |  7   |  8   |  9   |  *   |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |  #   |  $   |  (   |  )   |  `   |------|           |------|      |  4   |  5   |  6   |  +   |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |  %   |  ^   |  [   |  ]   |  ~   |      |           |      |      |  1   |  2   |  3   |  \   |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |  .   |  0   |  0   |  =   |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                      ,-------------.           ,-------------.
+ *                                      |      |      |           |      |      |
+ *                               ,------|------|------|           |------+------+------.
+ *                               |      |      |      |           |      |      |      |
+ *                               |      |      |------|           |------|      |      |
+ *                               |      |      |      |           |      |      |      |
+ *                               `--------------------'           `--------------------'
+ */
+[_NUM] = LAYOUT_ergodox(
+  // left hand
+  _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F11,
+  _______, KC_EXLM, KC_AT,   KC_LCBR, KC_RCBR, KC_PIPE, _______,
+  _______, KC_HASH, KC_DLR,  KC_LPRN, KC_RPRN, KC_GRV,
+  _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______,
+  _______, _______, _______, _______, _______,
+
+                                               _______, _______,
+                                                        _______,
+                                      _______, _______, _______,
+
+  // right hand
+  KC_F12,  KC_F6,   KC_F7,     KC_F8,   KC_F9,   KC_F10,         KC_F11,
+  _______, _______, KC_KP_7,   KC_KP_8, KC_KP_9, KC_KP_ASTERISK, _______,
+           _______, KC_KP_4,   KC_KP_5, KC_KP_6, KC_KP_PLUS,     _______,
+  _______, _______, KC_KP_1,   KC_KP_2, KC_KP_3, KC_KP_SLASH,    _______,
+                    KC_KP_DOT, KC_KP_0, KC_KP_0, KC_KP_EQUAL,    _______,
+
+  _______, _______,
+  _______,
+  _______, _______,  _______
+),
+
+};
+
+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;
+    case 1:
+    if (record->event.pressed) { // For resetting EEPROM
+      eeconfig_init();
+    }
+    break;
+  }
+  return MACRO_NONE;
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+    case QWERTY:
+      if (record->event.pressed) {
+        print("mode just switched to qwerty and this is a huge string\n");
+        set_single_persistent_default_layer(_QWERTY);
+      }
+      return false;
+      break;
+    case WORKMAN:
+      if (record->event.pressed) {
+        set_single_persistent_default_layer(_WORKMAN);
+      }
+      return false;
+      break;
+    case DVORAK:
+      if (record->event.pressed) {
+        set_single_persistent_default_layer(_DVORAK);
+      }
+      return false;
+      break;
+    case LOWER:
+      if (record->event.pressed) {
+        layer_on(_LOWER);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+        if (IS_LAYER_ON(_ADJUST)) {
+          layer_off(_LOWER);
+          layer_off(_RAISE);
+        }
+      } else {
+        layer_off(_LOWER);
+        if (IS_LAYER_ON(_ADJUST)) {
+          layer_off(_ADJUST);
+          layer_on(_RAISE);
+        }
+      }
+      return false;
+      break;
+    case RAISE:
+      if (record->event.pressed) {
+        layer_on(_RAISE);
+        update_tri_layer(_LOWER, _RAISE, _ADJUST);
+        if (IS_LAYER_ON(_ADJUST)) {
+          layer_off(_RAISE);
+          layer_off(_LOWER);
+        }
+      } else {
+        layer_off(_RAISE);
+        if (IS_LAYER_ON(_ADJUST)) {
+          layer_off(_ADJUST);
+          layer_on(_LOWER);
+        }
+      }
+      return false;
+      break;
+    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;
+    case RGB_SLD:
+      if (record->event.pressed) {
+        #ifdef RGBLIGHT_ENABLE
+        rgblight_mode(1);
+        #endif
+      }
+      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) {
+  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) {
+    case _LOWER:
+      ergodox_right_led_1_on();
+      break;
+    case _RAISE:
+      ergodox_right_led_2_on();
+      break;
+    case _ADJUST:
+      ergodox_right_led_3_on();
+      break;
+  }
+};
diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c b/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c
new file mode 100644 (file)
index 0000000..034f152
--- /dev/null
@@ -0,0 +1,345 @@
+/*
+Copyright 2016 Fred Sundvik <fsundvik@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/>.
+*/
+
+/**
+ * Currently we are assuming that both the backlight and LCD are enabled
+ * But it's entirely possible to write a custom visualizer that use only
+ * one of them
+ */
+#ifndef LCD_BACKLIGHT_ENABLE
+#error This visualizer needs that LCD backlight is enabled
+#endif
+
+#ifndef LCD_ENABLE
+#error This visualizer needs that LCD is enabled
+#endif
+
+#include "visualizer.h"
+#include "visualizer_keyframes.h"
+#include "lcd_keyframes.h"
+#include "lcd_backlight_keyframes.h"
+#include "system/serial_link.h"
+#include "default_animations.h"
+
+static const uint32_t logo_background_color = LCD_COLOR(0, 0, 255);
+static const uint32_t initial_color = LCD_COLOR(84, 255, 255);
+
+static const uint32_t led_emulation_colors[4] = {
+  LCD_COLOR(0, 0, 255),
+  LCD_COLOR(141, 255, 255),
+  LCD_COLOR(18, 255, 255),
+  LCD_COLOR(194, 255, 255),
+};
+
+static uint32_t next_led_target_color = 0;
+
+typedef enum {
+  LCD_STATE_INITIAL,
+  LCD_STATE_LAYER_BITMAP,
+  LCD_STATE_BITMAP_AND_LEDS,
+} lcd_state_t;
+
+static lcd_state_t lcd_state = LCD_STATE_INITIAL;
+
+typedef struct {
+  uint8_t led_on;
+  uint8_t led1;
+  uint8_t led2;
+  uint8_t led3;
+} visualizer_user_data_t;
+
+/**
+ * Don't access from visualization function, use the visualizer state instead
+ */
+static visualizer_user_data_t user_data_keyboard = {
+  .led_on = 0,
+  .led1 = LED_BRIGHTNESS_HI,
+  .led2 = LED_BRIGHTNESS_HI,
+  .led3 = LED_BRIGHTNESS_HI,
+};
+
+_Static_assert(sizeof(visualizer_user_data_t) <= VISUALIZER_USER_DATA_SIZE,
+  "Please increase the VISUALIZER_USER_DATA_SIZE");
+
+// Feel free to modify the animations below, or even add new ones if needed
+
+// The color animation animates the LCD color when you change layers
+static keyframe_animation_t one_led_color = {
+  .num_frames = 1,
+  .loop = false,
+  .frame_lengths = {gfxMillisecondsToTicks(0)},
+  .frame_functions = {lcd_backlight_keyframe_set_color},
+};
+
+bool swap_led_target_color(keyframe_animation_t* animation, visualizer_state_t* state) {
+  uint32_t temp = next_led_target_color;
+  next_led_target_color = state->target_lcd_color;
+  state->target_lcd_color = temp;
+  return false;
+}
+
+// The color animation animates the LCD color when you change layers
+static keyframe_animation_t two_led_colors = {
+  .num_frames = 2,
+  .loop = true,
+  .frame_lengths = {gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(0)},
+  .frame_functions = {lcd_backlight_keyframe_set_color, swap_led_target_color},
+};
+
+/**
+ * The LCD animation alternates between the layer name display and a
+ * bitmap that displays all active layers
+ */
+static keyframe_animation_t lcd_bitmap_animation = {
+  .num_frames = 1,
+  .loop = false,
+  .frame_lengths = {gfxMillisecondsToTicks(0)},
+  .frame_functions = {lcd_keyframe_display_layer_bitmap},
+};
+
+static keyframe_animation_t lcd_bitmap_leds_animation = {
+  .num_frames = 2,
+  .loop = true,
+  .frame_lengths = {gfxMillisecondsToTicks(2000), gfxMillisecondsToTicks(2000)},
+  .frame_functions = {lcd_keyframe_display_layer_bitmap, lcd_keyframe_display_led_states},
+};
+
+void initialize_user_visualizer(visualizer_state_t* state) {
+  /**
+   * The brightness will be dynamically adjustable in the future
+   * But for now, change it here.
+   */
+  lcd_backlight_brightness(180);
+  state->current_lcd_color = initial_color;
+  state->target_lcd_color = logo_background_color;
+  lcd_state = LCD_STATE_INITIAL;
+  start_keyframe_animation(&default_startup_animation);
+}
+
+static inline bool is_led_on(visualizer_user_data_t* user_data, uint8_t num) {
+  return user_data->led_on & (1u << num);
+}
+
+static uint8_t get_led_index_master(visualizer_user_data_t* user_data) {
+  for (int i=0; i < 4; i++) {
+    if (is_led_on(user_data, i)) {
+      return i + 1;
+    }
+  }
+  return 0;
+}
+
+static uint8_t get_led_index_slave(visualizer_user_data_t* user_data) {
+  uint8_t master_index = get_led_index_master(user_data);
+  if (master_index!=0) {
+    for (int i=master_index; i < 4; i++) {
+      if (is_led_on(user_data, i)) {
+        return i + 1;
+      }
+    }
+  }
+
+  return 0;
+}
+
+static uint8_t get_secondary_led_index(visualizer_user_data_t* user_data) {
+  if (
+    is_led_on(user_data, 0) &&
+    is_led_on(user_data, 1) &&
+    is_led_on(user_data, 2)
+  ) {
+    return 3;
+  }
+  return 0;
+}
+
+static uint8_t get_brightness(visualizer_user_data_t* user_data, uint8_t index) {
+  switch (index) {
+    case 1:
+      return user_data->led1;
+    case 2:
+      return user_data->led2;
+    case 3:
+      return user_data->led3;
+  }
+  return 0;
+}
+
+static void update_emulated_leds(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
+  visualizer_user_data_t* user_data_new = (visualizer_user_data_t*)state->status.user_data;
+  visualizer_user_data_t* user_data_old = (visualizer_user_data_t*)prev_status->user_data;
+
+  uint8_t new_index;
+  uint8_t old_index;
+
+  if (true || is_serial_link_master()) {
+    new_index = get_led_index_master(user_data_new);
+    old_index = get_led_index_master(user_data_old);
+  } else {
+    new_index = get_led_index_slave(user_data_new);
+    old_index = get_led_index_slave(user_data_old);
+  }
+
+  uint8_t new_secondary_index = get_secondary_led_index(user_data_new);
+  uint8_t old_secondary_index = get_secondary_led_index(user_data_old);
+
+  uint8_t new_brightness = get_brightness(user_data_new, new_index);
+  uint8_t old_brightness = get_brightness(user_data_old, old_index);
+
+  uint8_t new_secondary_brightness = get_brightness(user_data_new, new_secondary_index);
+  uint8_t old_secondary_brightness = get_brightness(user_data_old, old_secondary_index);
+
+  if (
+    lcd_state == LCD_STATE_INITIAL ||
+    new_index != old_index ||
+    new_secondary_index != old_secondary_index ||
+    new_brightness != old_brightness ||
+    new_secondary_brightness != old_secondary_brightness
+  ) {
+    if (new_secondary_index != 0) {
+      state->target_lcd_color = change_lcd_color_intensity(
+        led_emulation_colors[new_index], new_brightness);
+      next_led_target_color = change_lcd_color_intensity(
+        led_emulation_colors[new_secondary_index], new_secondary_brightness);
+
+      stop_keyframe_animation(&one_led_color);
+      start_keyframe_animation(&two_led_colors);
+    } else {
+      state->target_lcd_color = change_lcd_color_intensity(
+        led_emulation_colors[new_index], new_brightness);
+
+      stop_keyframe_animation(&two_led_colors);
+      start_keyframe_animation(&one_led_color);
+    }
+  }
+}
+
+static void update_lcd_text(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
+  if (state->status.leds) {
+    if (
+      lcd_state != LCD_STATE_BITMAP_AND_LEDS ||
+      state->status.leds != prev_status->leds ||
+      state->status.layer != prev_status->layer ||
+      state->status.default_layer != prev_status->default_layer
+    ) {
+      // NOTE: that it doesn't matter if the animation isn't playing, stop will do nothing in that case
+      stop_keyframe_animation(&lcd_bitmap_animation);
+
+      lcd_state = LCD_STATE_BITMAP_AND_LEDS;
+      /**
+       * For information:
+       * The logic in this function makes sure that this doesn't happen, but if you call start on an
+       * animation that is already playing it will be restarted.
+       */
+      start_keyframe_animation(&lcd_bitmap_leds_animation);
+    }
+  } else {
+    if (
+      lcd_state != LCD_STATE_LAYER_BITMAP ||
+      state->status.layer != prev_status->layer ||
+      state->status.default_layer != prev_status->default_layer
+    ) {
+      stop_keyframe_animation(&lcd_bitmap_leds_animation);
+
+      lcd_state = LCD_STATE_LAYER_BITMAP;
+      start_keyframe_animation(&lcd_bitmap_animation);
+    }
+  }
+}
+
+void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
+  /**
+   * Check the status here to start and stop animations
+   * You might have to save some state, like the current animation here so that you can start the right
+   * This function is called every time the status changes
+   *
+   * NOTE that this is called from the visualizer thread, so don't access anything else outside the status
+   * This is also important because the slave won't have access to the active layer for example outside the
+   * status.
+   */
+
+  update_emulated_leds(state, prev_status);
+  update_lcd_text(state, prev_status);
+}
+
+void user_visualizer_suspend(visualizer_state_t* state) {
+  state->layer_text = "Suspending...";
+  uint8_t hue = LCD_HUE(state->current_lcd_color);
+  uint8_t sat = LCD_SAT(state->current_lcd_color);
+  state->target_lcd_color = LCD_COLOR(hue, sat, 0);
+  start_keyframe_animation(&default_suspend_animation);
+}
+
+void user_visualizer_resume(visualizer_state_t* state) {
+  state->current_lcd_color = initial_color;
+  state->target_lcd_color = logo_background_color;
+  lcd_state = LCD_STATE_INITIAL;
+  start_keyframe_animation(&default_startup_animation);
+}
+
+void ergodox_board_led_on(void){
+  // No board led support
+}
+
+void ergodox_right_led_1_on(void){
+  user_data_keyboard.led_on |= (1u << 0);
+  visualizer_set_user_data(&user_data_keyboard);
+}
+
+void ergodox_right_led_2_on(void){
+  user_data_keyboard.led_on |= (1u << 1);
+  visualizer_set_user_data(&user_data_keyboard);
+}
+
+void ergodox_right_led_3_on(void){
+  user_data_keyboard.led_on |= (1u << 2);
+  visualizer_set_user_data(&user_data_keyboard);
+}
+
+void ergodox_board_led_off(void){
+  // No board led support
+}
+
+void ergodox_right_led_1_off(void){
+  user_data_keyboard.led_on &= ~(1u << 0);
+  visualizer_set_user_data(&user_data_keyboard);
+}
+
+void ergodox_right_led_2_off(void){
+  user_data_keyboard.led_on &= ~(1u << 1);
+  visualizer_set_user_data(&user_data_keyboard);
+}
+
+void ergodox_right_led_3_off(void){
+  user_data_keyboard.led_on &= ~(1u << 2);
+  visualizer_set_user_data(&user_data_keyboard);
+}
+
+void ergodox_right_led_1_set(uint8_t n) {
+  user_data_keyboard.led1 = n;
+  visualizer_set_user_data(&user_data_keyboard);
+}
+
+void ergodox_right_led_2_set(uint8_t n) {
+  user_data_keyboard.led2 = n;
+  visualizer_set_user_data(&user_data_keyboard);
+}
+
+void ergodox_right_led_3_set(uint8_t n) {
+  user_data_keyboard.led3 = n;
+  visualizer_set_user_data(&user_data_keyboard);
+}
diff --git a/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c b/keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c
new file mode 100644 (file)
index 0000000..72ee2bc
--- /dev/null
@@ -0,0 +1,275 @@
+// Nordic layout for Ergodox infinity
+
+#include QMK_KEYBOARD_H
+#include "debug.h"
+#include "action_layer.h"
+#include "version.h"
+#include "keymap_nordic.h"
+#include "keymap_german.h"
+
+// Layer names
+#define BASE 0 // default layer
+#define FUNCL 1 // function layer
+#define SYMB 2 // symbol layer
+#define MDIA 3 // media keys
+
+#define _______ KC_TRNS
+
+enum custom_keycodes {
+    PLACEHOLDER = SAFE_RANGE, // can always be here
+    EPRM,
+    VRSN,
+    RGB_SLD
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: Basic layer
+ *
+ * 
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |  Esc   |   1  |   2  |   3  |   4  |   5  |  §½  |           | PRSC |   6  |   7  |   8  |   9  |   0  |   -    |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |  Tab   |   Q  |   W  |   E  |   R  |   T  |  L1  |           |  L1  |   Y  |   U  |   I  |   O  |   P  |   Å    |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |  Caps  |   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |   Ö  |   Ä    |
+ * |--------+------+------+------+------+------|  L2  |           |  L2  |------+------+------+------+------+--------|
+ * | LShift |   Z  |   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |  -   | RShift |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   | Ctrl |  ¨^  |  <|>  | Alt | LGui|                                       | Ctrl |  Alt  |  ´`  |   +  | RGui |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        | LEFT |RIGHT |       | DOWN | UP   |
+ *                                 ,------+------+------|       |------+--------+------.
+ *                                 |      |      | Home |       | PgUp |        |      |
+ *                                 | Space|Del   |------|       |------|  Enter | Bkspc|
+ *                                 |      |      | End  |       | PgDn |        |      |
+ *                                 `--------------------'       `----------------------'
+ */
+
+[BASE] = LAYOUT_ergodox(  // layer 0 : default
+        // left hand
+        KC_ESC,    KC_1,  KC_2,  KC_3,  KC_4,  KC_5,   KC_GRV,
+        KC_TAB,    KC_Q,  KC_W,  KC_E,  KC_R,  KC_T,   TG(1),
+        KC_CAPS,   KC_A,  KC_S,  KC_D,  KC_F,  KC_G,
+        KC_LSFT,   KC_Z,  KC_X,  KC_C,  KC_V,  KC_B,   MO(2),
+        KC_LCTRL,  KC_RBRC, KC_NONUS_BSLASH,  KC_LALT,  KC_LGUI,
+                                               KC_LEFT, KC_RIGHT,
+                                                              KC_HOME,
+                                               KC_SPC,KC_DELT,KC_END,
+        // right hand
+        KC_PSCREEN,  KC_6,   KC_7,    KC_8,    KC_9,   KC_0,        KC_MINS,
+        TG(1),   KC_Y,   KC_U,    KC_I,    KC_O,   KC_P,        KC_LBRC,
+                     KC_H,   KC_J,    KC_K,    KC_L,   KC_SCLN,     KC_QUOT,
+        MO(2),    KC_N,   KC_M,    KC_COMM, KC_DOT, KC_SLSH,     KC_RSFT,
+                             KC_RCTRL, KC_RALT,   KC_BSLS,  KC_EQL, KC_RGUI,
+        KC_DOWN, KC_UP,
+        KC_PGUP,
+        KC_PGDN, KC_ENT, KC_BSPC
+    ),
+
+/* Keymap 1: Basic layer with functions
+ *
+ * 
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |  Esc   |  F1  |  F2  |  F3  |  F4  |  F5  |  F11 |           | F12 |  F6  |  F7  |  F8  |  F9  |   0  |   -    |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |  Tab   |   Q  |   W  |   E  |   R  |   T  |  L1  |           |  L1  |   Y  |   U  |   I  |   O  |   P  |   Å    |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |  Caps  |   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |   Ö  |   Ä    |
+ * |--------+------+------+------+------+------|  L2  |           |  L2  |------+------+------+------+------+--------|
+ * | LShift |   Z  |   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |  -   | RShift |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   | Ctrl |  ¨^  |  <|>  | Alt | LGui|                                       | Ctrl |  Alt  |  ´`  |   +  | RGui |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        | LEFT |RIGHT |       | DOWN | UP   |
+ *                                 ,------+------+------|       |------+--------+------.
+ *                                 |      |      | Home |       | PgUp |        |      |
+ *                                 | Space|Del   |------|       |------|  Enter | Bkspc|
+ *                                 |      |      | End  |       | PgDn |        |      |
+ *                                 `--------------------'       `----------------------'
+ */
+
+[FUNCL] = LAYOUT_ergodox(  // layer 1 : functions
+  // left hand
+  _______,  KC_F1,     KC_F2,     KC_F3,     KC_F4,     KC_F5,     KC_F11,
+  _______,  _______,  _______,  _______,  _______,  _______,  _______,
+  _______,  _______,  _______,  _______,  _______,  _______,
+  _______,  _______,  _______,  _______,  _______,  _______,  _______,
+  _______,  _______,  _______,  _______,  _______,
+                                         _______, _______,
+                                                        _______,
+                                         _______,_______,_______,
+  // right hand
+  KC_F12,  KC_F6,   KC_F7,    KC_F8,    KC_F9,   KC_F10,     _______,
+  _______,    _______,  _______,  _______,  _______,  _______,  _______,
+  _______,  _______,  _______,  _______,  _______,  _______,
+  _______,    _______,  _______,  _______,  _______,  _______,  _______,
+                      _______,  _______,  _______,  _______,  _______,
+  _______, _______,
+  _______,
+  _______, _______, _______
+),
+
+/* Keymap 2: Symbol Layer
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * |        |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 |   F11  |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |   !  |   @  |   {  |   }  |   |  |      |           |      |   Up |   7  |   8  |   9  |   *  |   F12  |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |   #  |   $  |   (  |   )  |   `  |------|           |------| Down |   4  |   5  |   6  |   +  |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |   %  |   ^  |   [  |   ]  |   ~  |      |           |      |   &  |   1  |   2  |   3  |   \  |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |      |      |      |                                       |      |    . |   0  |   =  |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |Animat| BLTOG|       |Toggle|Solid |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |Bright|Bright|  BL+ |       |      |Hue-  |Hue+  |
+ *                                 |ness- |ness+ |------|       |------|      |      |
+ *                                 |      |      |  BL- |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// SYMBOLS
+[SYMB] = LAYOUT_ergodox(
+       // left hand
+       KC_TRNS,KC_F1,  KC_F2,  KC_F3,  KC_F4,  KC_F5,  KC_TRNS,
+       KC_TRNS,DE_EXLM,DE_AT,  DE_LCBR,DE_RCBR,DE_PIPE,KC_TRNS,
+       KC_TRNS,DE_HASH,DE_DLR, DE_LPRN,DE_RPRN,DE_GRV,
+       KC_TRNS,DE_PERC,DE_CIRC,DE_LBRC,DE_RBRC,DE_TILD,KC_TRNS,
+       KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
+                                       RGB_MOD,BL_TOGG,
+                                               BL_INC,
+                               RGB_VAD,RGB_VAI,BL_DEC,
+       // 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,    DE_ASTR, KC_F12,
+                KC_DOWN, KC_4,   KC_5,    KC_6,    DE_PLUS, KC_TRNS,
+       KC_TRNS, DE_AMPR, KC_1,   KC_2,    KC_3,    DE_BSLS, KC_TRNS,
+                         KC_TRNS,KC_DOT,  KC_0,    DE_EQL,  KC_TRNS,
+       RGB_TOG, RGB_SLD,
+       KC_TRNS,
+       KC_TRNS, RGB_HUD, RGB_HUI
+),
+
+/* Keymap 3: Media and mouse keys
+ *
+ * ,--------------------------------------------------.           ,--------------------------------------------------.
+ * | RESET  |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 |   F11  |
+ * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
+ * |        |      | Lclk | MsUp | Rclk |      |      |           |      |      |VolDwn| Mute |VolUp |      |   F12  |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        | Btn4 |MsLeft|MsDown|MsRght| Btn5 |------|           |------|      | Prev | Stop | Play | Next |        |
+ * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
+ * |        |WhRght|WhDown| WhUp |WhLeft|WhClk |      |           |      |BwSrch|BwBack|BwHome|BwRefr|BwFwd |        |
+ * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
+ *   |      |      |MsAcl0|MsAcl1|MsAcl2|                                       |      |      |      |      |      |
+ *   `----------------------------------'                                       `----------------------------------'
+ *                                        ,-------------.       ,-------------.
+ *                                        |      |      |       |      |      |
+ *                                 ,------|------|------|       |------+------+------.
+ *                                 |      |      |      |       |      |Brwser|Brwser|
+ *                                 | Lclk | Rclk |------|       |------|Back  |Forwd |
+ *                                 |      |      |      |       |      |      |      |
+ *                                 `--------------------'       `--------------------'
+ */
+// MEDIA AND MOUSE
+[MDIA] = LAYOUT_ergodox(
+       RESET, KC_F1  , KC_F2  , KC_F3  , KC_F4  , KC_F5  , KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5,
+       KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN3, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2,
+                                           KC_TRNS, KC_TRNS,
+                                                    KC_TRNS,
+                                  KC_BTN1, KC_BTN2, KC_TRNS,
+    // right hand
+       KC_TRNS, KC_F6  , KC_F7  , KC_F8  , KC_F9  , KC_F10 , KC_F11,
+       KC_TRNS, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_F12,
+                KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS,
+       KC_TRNS, KC_WSCH, KC_WBAK, KC_WHOM, KC_WREF, KC_WFWD, KC_TRNS,
+                         KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS,
+       KC_TRNS,
+       KC_TRNS, KC_WBAK, KC_WFWD
+),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+    [2] = ACTION_LAYER_TAP_TOGGLE(SYMB)                // FN1 - Momentary Layer 2 (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) {
+          SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
+        }
+        break;
+        case 1:
+        if (record->event.pressed) { // For resetting EEPROM
+          eeconfig_init();
+        }
+        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;
+    case RGB_SLD:
+      if (record->event.pressed) {
+        #ifdef RGBLIGHT_ENABLE
+          rgblight_mode(1);
+        #endif
+      }
+      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) {
+    
+    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) {
+        case 1:
+            ergodox_right_led_1_on();
+            break;
+        case 2:
+            ergodox_right_led_2_on();
+            break;
+        default:
+            // none
+            break;
+    }   
+};
\ No newline at end of file
diff --git a/keyboards/ergodox_infinity/keymaps/nordic_ergo/readme.md b/keyboards/ergodox_infinity/keymaps/nordic_ergo/readme.md
new file mode 100644 (file)
index 0000000..2ed5268
--- /dev/null
@@ -0,0 +1,9 @@
+# Nordic Ergodox Infinity layout
+
+QWERTY Nordic layout for ergodox infinity.
+
+Features:
+
+- Basic ISO Nordic qwerty layout.
+- Backlight control.
+- Still work in progress.
\ No newline at end of file
index 7b8c1df3a52d24f21f6ed3f7d45a836a6492bc95..d712bb880c3b9dbc8c075c08c44fc2d873fc5af0 100644 (file)
@@ -19,7 +19,7 @@ for the left and right halves seperately.  To flash them:
 
   - Press the program button (back of keyboard, above thumb pad).
 
-  - Install the firmware with `sudo make ergodox_infinity-keymapname-dfu-util MASTER=right`
+  - Install the firmware with `sudo make ergodox_infinity:keymapname:dfu-util MASTER=right`
 
 More information on the Infinity firmware is available in the [TMK/chibios for
 Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md)
index 8893d122e04be2b5675204802a059c4321f8fc73..b25194014b5bbd3512e78815b71853772c5c756b 100644 (file)
@@ -1,3 +1,6 @@
+
+#define TAPPING_TERM 150 //reduce time required to register a held key
+
 #ifndef CONFIG_USER_H
 #define CONFIG_USER_H
 
index 2b5444aff3c6453128a09efdb411fe6d3bea3a02..709ab6c21976fb3d10b3c478028742d1f1cbd55d 100644 (file)
@@ -7,12 +7,14 @@
 
 enum QFR_layers {
   _COLEMAK,
+  _QWERTY,
   _LOWER,
   _MOUSE
 };
 
 enum QFR_keycodes {
   COLEMAK = SAFE_RANGE,
+  QWERTY,
   LOWER,
   MOUSE
 };
@@ -40,8 +42,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
       KC_LCTL,KC_LGUI,      KC_LALT,                SPC_LW,                                  MSE,     KC_RGUI, KC_APP, KC_RCTL,  KC_LEFT,KC_DOWN,KC_RGHT
       ),
 
+[_QWERTY] = KEYMAP_TKL(\
+       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_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_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,                SPC_LW,                                 MSE,    KC_RGUI, KC_APP,  KC_RCTL,   KC_LEFT, KC_DOWN, KC_RGHT  
+       ),
+
 [_LOWER] = KEYMAP_TKL(\
-      RESET,    _______,    _______,   _______,  _______, _______,   _______,   _______,   _______,  _______, _______, _______, _______,           _______,_______,_______, \
+      RESET,    _______,    _______,   _______,  _______, _______,   _______,   _______,   _______,  _______, _______, _______, _______,           QWERTY, COLEMAK,_______, \
       KC_TILD,  KC_EXLM,    KC_AT,     KC_HASH,  KC_DLR,  KC_PERC,   KC_CIRC,   KC_AMPR,   KC_ASTR,  KC_LBRC, KC_RBRC, KC_UNDS, KC_PLUS, KC_BSPC,  _______,_______,_______, \
       KC_TAB,   KC_PGUP,    KC_HOME,   KC_UP,    KC_END,  XXXXXXX,   XXXXXXX,   KC_BTN3,   KC_BTN4,  KC_BTN5, XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE,  _______,_______,_______, \
       KC_CAPS,  KC_PGDN,    KC_LEFT,   KC_DOWN,  KC_RGHT, XXXXXXX,   XXXXXXX,   KC_BTN1,   KC_BTN2,  XXXXXXX, XXXXXXX, _______,          _______,                            \
@@ -58,3 +69,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
       _______,  _______,   _______,             KC_ACL2,                       MSE,       _______,  _______,  _______,                             _______,_______,_______  \
       )
 };
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+    case QWERTY:
+      if (record->event.pressed) {
+        //print("mode just switched to qwerty and this is a huge string\n");
+        set_single_persistent_default_layer(_QWERTY);
+      }
+      return false;
+      break;
+    case COLEMAK:
+      if (record->event.pressed) {
+        set_single_persistent_default_layer(_COLEMAK);
+      }
+      return false;
+      break;
+  }
+  return true;
+}
\ No newline at end of file
index 6c7fabd185ac27775ab80980a05be0a48c6f4302..396337440e4efb4f3b9649c5e758d1bb2f89d166 100644 (file)
@@ -1,7 +1,15 @@
-# TKL keymap for frosty_flake
 
-##Layers
+# TKL keymap for frosty\_flake
+```
+make frosty_flake:QFR_JM
+
+dfu-programmer atmega32u2 erase
+dfu-programmer atmega32u2 flash frosty_flake_QFR_JM.hex
+dfu-programmer atmega32u2 start
+```
 
+##Layers
+```
   ,----.    ,-------------------. ,-------------------. ,-------------------. ,--------------.
   |ESC |    | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |PrSc|ScLk|PsBk|
   '----'    '-------------------' '-------------------' '-------------------' '--------------'
   |Ctrl|LGUI|LAlt|             Space/Lower              |MSE |RGUI|Menu|Ctrl| |Left|Down|Rght|
   '-------------------------------------------------------------------------' '--------------'
 
+```
 ### Base Layer - Colemak
-       * The base layout is Colemak
-                       * I've implemented COLEMAK = SAFE_RANGE when enumerating the custom_keycodes, but I don't actually know what this does...
+The base layout is Colemak by default, but this can be changed to QWERTY via the *LOWER* layer
+* I've implemented COLEMAK = SAFE\_RANGE when enumerating the custom\_keycodes, but I don't actually know what this does...
 
-       * Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses)
+* Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses)
 
-       #### Layer Shifting
-       * The spacebar is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space.
-       * The Right hand ALT key is a **TAP_TOGGLE** macro for the *MOUSE* layer (RAlt is accessible through LOWER, if you want...)
+#### Layer Shifting
+* The spacebar is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space.
+* The Right hand ALT key is a **TAP_TOGGLE** macro for the *MOUSE* layer (RAlt is accessible through LOWER, if you want...)
        
 ### LOWER
-
+```
   ,----.    ,-------------------. ,-------------------. ,-------------------. ,--------------.
-  |ESC |    | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |PrSc|ScLk|PsBk|
+  |ESC |    | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |QWTY|CLMK|PsBk|
   '----'    '-------------------' '-------------------' '-------------------' '--------------'
   ,-------------------------------------------------------------------------. ,--------------. 
   |  ~ | !  |  @ |  # |  $ |  % |  ^ |  & |  * |  ( |  ) |  _ |  + |  Bspc  | | Ins|Home|PgUp| 
   |-------------------------------------------------------------------------|      ,----.     
   |   LSPO  | Z  | X  |  C | V  |    |    |    |  , |  . |  / |    RSPC     |      | Up |     
   |-------------------------------------------------------------------------| ,--------------.
-  |Ctrl|LGUI|LAlt|                                                 |MSE |RGUI|Menu|Ctrl| |Left|Down|Rght|
+  |Ctrl|LGUI|LAlt|                                                 |RAlt|RGUI|Menu|Ctrl| |Left|Down|Rght|
   '-------------------------------------------------------------------------' '--------------'
-
-       * The *LOWER* layer contains a navigation cluster on the left hand. This layer is momentary when the spacebar or LOWER (RAlt) key is held and toggled on/off when the LOWER key is tapped.
+```
+The *LOWER* layer contains a navigation cluster on the left hand. This layer is momentary when the spacebar or LOWER (RAlt) key is held and toggled on/off when the LOWER key is tapped.
        
-       * The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster.
+* The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster.
 
-       * All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC_NO), all modifiers (edge |_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (_______) to the Base layer.
+* All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC\_NO), all modifiers (edge |\_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (\_\_\_\_\_\_\_) to the Base layer.
 
-### MOUSE
+* The base layer can be switched to QWERTY or COLEMAK by pressing the Pause Break or Scroll Lock keys respectively
 
+### MOUSE
+```
   ,----.    ,-------------------. ,-------------------. ,-------------------. ,--------------.
   |ESC |    | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |PrSc|ScLk|PsBk|
   '----'    '-------------------' '-------------------' '-------------------' '--------------'
   |-------------------------------------------------------------------------| ,--------------.
   |Ctrl|LGUI|LAlt|               Accel ++               |MSE |RGUI|Menu|Ctrl| |Left|Down|Rght|
   '-------------------------------------------------------------------------' '--------------'
+```
+The *MOUSE* layer contains keys replicating functions found on the mouse. 
+
+* The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are analagous to the Page Up & Downkeys.
+* The primary click (right & left) buttons are on the right home row (index & middle fingers)
+* Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function.
 
-       * The *MOUSE* layer contains keys replicating functions found on the mouse. 
-               * The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are analagous to the Page Up & Down keys.
-               * The primary click (right & left) buttons are on the right home row (index & middle fingers)
-               * Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function.
index 74dab4910d10b4eacf70416da7115f3bb1450195..daddb18deaf33948ac6cb75acc003ab93ba3f431 100644 (file)
@@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   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_DEL, \
     KC_TRNS, KC_TRNS, KC_TRNS, KC_EURO, TP_REQ,  TP_ACC,  KC_TRNS, MCO_UE,  KC_TRNS, MCO_OE,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
-    KC_TRNS, MCO_AE,  MCO_SS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_SW,KC_TRNS, KC_TRNS, KC_TRNS,\
+    KC_TRNS, MCO_AE,  MCO_SS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_SW,KC_TRNS, KC_GRV,  KC_TRNS,\
     KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS,\
     KC_TRNS, KC_TRNS, KC_TRNS,                            KC_TRNS,                   KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
 };
index 5e32cbaf0aa63c8464844a3436e14816fce2c03c..ef9a26a19f52c8790f03c5b1d0a5ad5887bb74fd 100644 (file)
@@ -57,7 +57,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define TAPPING_TOGGLE 1
 
 //define maximum duration of hold required to register a tap vs hold default is 200
-#define TAPPING_TERM 150 //reduce time required so fast typing doesn't disrupt
+#define TAPPING_TERM 150 //reduce time required to register a held key
 
 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
 #define DEBOUNCING_DELAY 5
index f52a97bbc8653a337e8c17f4e292273151f5bbec..34ef6720746d0d204825ff78b05baa63c2b4e498 100644 (file)
@@ -14,6 +14,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#define TAPPING_TERM 150 //reduce time required to register a held key
+
 #ifndef CONFIG_USER_H
 #define CONFIG_USER_H
 
index f37989b10a2258b0691b59abd3312ee2abb8c7b7..b99280a917cb5fa15d39803dd3975b4d08cb56b4 100644 (file)
@@ -72,14 +72,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * |-----+------+------+------+------+-------------+------+------+------+------+------|
  * | LSPO|   Z  |   X  |   C  |   V  |   B  |   K  |   M  |   ,  |   .  |   /  | RSPC |
  * |-----+------+------+------+------+------+------+------+------+------+------+------|
- * | Ctrl| LGUI | LAlt | Lower|    SpaceLW  |    RSEnter  |  Fn  | Mouse| Menu | Ctrl |
+ * | Ctrl| LGUI | Lower| LAlt |    SpaceLW  |    RSEnter  |  Fn  | Mouse| Menu | Ctrl |
  * `----------------------------------------------------------------------------------'
  */
 [_COLEMAK] = TERMINUS_MINI(
   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_BSPC, KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,      KC_I,    KC_O,    KC_QUOT, \
   KC_LSPO, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM,   KC_DOT,  KC_SLSH, KC_RSPC, \
-  KC_LCTL, KC_LGUI, KC_LALT, LWR,          SPC_LW,           ENT_RS,      FNC,       MSE,     KC_APP,  KC_RCTL \
+  KC_LCTL, KC_LGUI, LWR,     KC_LALT,     SPC_LW,           ENT_RS,       FNC,       MSE,     KC_APP,  KC_RCTL \
   ),
 
 /* Lower
@@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * |------+------+------+------+------+------+------+------+------+------+------+------|
  * | LSPO |   Z  |   X  |   C  |   V  |   =  |   1  |   2  |   3  | Enter|      | RSPC |
  * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Ctrl | LGUI | Alt  | Lower| Space/Lower |      0      |   .  |  Fn  | Menu | Ctrl |
+ * | Ctrl | LGUI | Lower| LAlt | Space/Lower |      0      |   .  |  Fn  | Menu | Ctrl |
  * `-----------------------------------------------------------------------------------'
  Want to add tap-dance function to 0 key: Tap=0, doubleTap=Ent
  */
@@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * |------+------+------+------+------+------+------+------+------+------+------+------|
  * | LSPO |      |      |   {  |   [  |   `  |   \  |   ]  |   }  |   .  |   ?  | RSPC |
  * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Ctrl | LGUI | Alt  |      | Space/Lower | Raise/Enter |  Fn  | Mouse| Menu | Ctrl |
+ * | Ctrl | LGUI |      | LAlt | Space/Lower | Raise/Enter |  Fn  | Mouse| Menu | Ctrl |
  * `-----------------------------------------------------------------------------------'
   */
 
@@ -118,7 +118,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    KC_ESC,  KC_EXLM, KC_AT,   KC_HASH, KC_DLR,   KC_PERC, KC_CIRC,  KC_AMPR, KC_ASTR, KC_MINS, KC_EQL,  _______, \
    _______, KC_1,    KC_2,    KC_3,    KC_4,     KC_5,    KC_6,     KC_7,    KC_8,    KC_9,    KC_0,    _______, \
    _______, XXXXXXX, XXXXXXX, KC_LCBR, KC_LBRC,  KC_GRV,  KC_BSLS,  KC_RBRC, KC_RCBR, KC_DOT,  KC_SLSH, _______, \
-   _______, _______, _______, _______,        SPC_LW,            ENT_RS,     FNC,     MSE,     _______, _______ \
+   _______, _______, XXXXXXX, _______,        SPC_LW,            ENT_RS,     FNC,     MSE,     _______, _______ \
    ),
 
 /*Function
@@ -129,7 +129,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * |------+------+------+------+------+------+------+------+------+------+------+------|
  * | LSOB |      |      |      |      |      |      |  F9  | F10  | F11  | F12  |ScrLk |
  * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Ctrl | LGUI | Alt  |      | Space/Lower | Enter/Raise |  Fn  |      |      |PsBrk |
+ * | Ctrl | LGUI |      | Alt  | Space/Lower | Enter/Raise |  Fn  |      |      |PsBrk |
  * `-----------------------------------------------------------------------------------'
  */
 
index 66ca566ed6f1ca3fb3b3994d24a71b75c6434a8a..216cf41e269ddc893a790e98ffeb34ec0f87e1b6 100644 (file)
@@ -6,117 +6,114 @@ This keymap is modified from the Planck default layout. Credit for the layout na
 
 The terminus_mini is a handwired 4x12 ortholinear keyboard with two 2U thumb bar keys. The microcontroller is a Teensy 2.0
 
-The TERMINUS_MINI layout (../../../terminus_mini/terminus_mini.h) is handwired and the 2U keys are handled using KC_NO to detail that two columns do not have a 4th column.
-
->  .----------------------------------------.     .-----------------------------------------. \
->  | Tab |   Q  |   W  |   F  |   P  |   G  |     |   J  |   L  |   U  |   Y  |   ;  |  Del | \
->  |-----+------+------+------+------+------|     |------+------+------+------+------+------| \
->  | BS  |   A  |   R  |   S  |   T  |   D  |     |   H  |   N  |   E  |   I  |   O  |  '   | \
->  |-----+------+------+------+------+------|     |------+------+------+------+------+------| \
->  | LSPO|   Z  |   X  |   C  |   V  |   B  |     |   K  |   M  |   ,  |  \.  |   /  | RSPC | \
->  |-----+------+------+------+------+------|     |------+------+------+------+------+------| \
->  | Ctrl| LGUI | LAlt | Lower| Space/Lower |     | Enter/Raise |  Fn  | Mouse| Menu | Ctrl | \
->  '----------------------------------------'     '-----------------------------------------' \
-\
-> [_COLEMAK] = KEYMAP( \
->   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_BSPC, KC_A,    KC_R,    KC_S,    KC_T,   KC_D,         KC_H,   KC_N,    KC_E,      KC_I,    KC_O,    KC_QUOT, \
->   KC_LSPO, KC_Z,    KC_X,    KC_C,    KC_V,   KC_B,         KC_K,   KC_M,    KC_COMM,   KC_DOT,  KC_SLSH, KC_RSPC, \
->   KC_LCTL, KC_LGUI, KC_LALT, LWR,   SPC_LW, SPC_LW,       ENT_RS, ENT_RS,    FNC,       MSE,     KC_APP,  KC_RCTL \
->   ),
-
-##Layers
+The TERMINUS_MINI layout (../../../terminus\_mini/terminus\_mini.h) is handwired and the 2U keys are handled using KC\_NO to detail that two columns do not have a 4th column.
+```
+.----------------------------------------.     .-----------------------------------------. 
+| Tab |   Q  |   W  |   F  |   P  |   G  |     |   J  |   L  |   U  |   Y  |   ;  |  Del | 
+|-----+------+------+------+------+------|     |------+------+------+------+------+------| 
+| BS  |   A  |   R  |   S  |   T  |   D  |     |   H  |   N  |   E  |   I  |   O  |  '   | 
+|-----+------+------+------+------+------|     |------+------+------+------+------+------| 
+| LSPO|   Z  |   X  |   C  |   V  |   B  |     |   K  |   M  |   ,  |  \.  |   /  | RSPC | 
+|-----+------+------+------+------+------|     |------+------+------+------+------+------| 
+| Ctrl| LGUI | LAlt | Lower| Space/Lower |     | Enter/Raise |  Fn  | Mouse| Menu | Ctrl | 
+'----------------------------------------'     '-----------------------------------------' 
+```
+       
 
 ### Base Layer - Colemak
-       * The base layout is Colemak. Since the CapsLock key is replaced with BackSpace, this layout has the delete key in the traditional backspace location. 
-                       * QWERTY and Dvorak layers have been removed from the keymap that was initially developed from the default Planck keymap.
-                       * I've implemented COLEMAK = SAFE_RANGE when enumerating the custom_keycodes, but I don't actually know what this does...
+The base layout is Colemak. Since the CapsLock key is replaced with BackSpace, this layout has the delete key in the traditional backspace location. 
 
-       * Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses)
-       * I never find myself using the right-modifiers on a standard keyboard, so I've only implemented LGUI and LALT. I have intentions of improving my use of the ctrl key in correct hand alternation, so CTRL is implemented in both outside corners of the home row.
+* QWERTY and Dvorak layers have been removed from the keymap that was initially developed from the default Planck keymap.
+* I've implemented COLEMAK = SAFE\_RANGE when enumerating the custom\_keycodes, but I don't actually know what this does...
+* Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses)
+* I never find myself using the right-modifiers on a standard keyboard, so I've only implemented LGUI and LALT. I have intentions of improving my use of the ctrl key in correct hand alternation, so CTRL is implemented in both outside corners of the home row.
 
 
-       #### Layer Shifting
-               * The 4th key on the bottom row of the left hand PCB is a **TAP_TOGGLE** macro for the *LOWER* layer 
-               * The left 2U key is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space.
-               * The right 2U key is a **TAP_KEY** macro - Hold for momentary *RAISE* layer, Tap for Enter
-               * The 2nd key on the bottom row of the right hand PCB is a **LAYER_MOMENTARY** for the *FUNCTION* layer
-               * The 3rd key on the bottom row of the right hand PCB is a **TAP_TOGGLE** macro for the *MOUSE* layer
+#### Layer Shifting
+* The 4th key on the bottom row of the left hand PCB is a **TAP_TOGGLE** macro for the *LOWER* layer 
+* The left 2U key is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space.
+* The right 2U key is a **TAP_KEY** macro - Hold for momentary *RAISE* layer, Tap for Enter
+* The 2nd key on the bottom row of the right hand PCB is a **LAYER_MOMENTARY** for the *FUNCTION* layer
+* The 3rd key on the bottom row of the right hand PCB is a **TAP_TOGGLE** macro for the *MOUSE* layer
 
 ### LOWER - Numpad & Navigation keys
-
- ,-----------------------------------------.    .-----------------------------------------. \
- |  Tab | PgUp | Home |  Up  |  End |      |    |   7  |   8  |   9  |  \+  |      | Del  | \
- |------+------+------+------+------+------|    |------+------+------+------+------+------| \
- |  BS  | PgDn | Left | Down |Right |      |    |   4  |   5  |   6  | Enter|      |   '  | \
- |------+------+------+------+------+------|    |------+------+------+------+------+------| \
- | LSPO |   Z  |   X  |   C  |   V  |      |    |   1  |   2  |   3  | Enter|      | RSPC | \
- |------+------+------+------+-------------|    |-------------+------+------+------+------| \
- | Ctrl | LGUI | Alt  | LOWER| Space/Lower |    |      0      |  \.  |  Fn  | Menu | Ctrl | \
- '-----------------------------------------'    '-----------------------------------------' \
-
-       * The *LOWER* layer contains a navigation cluster on the left hand and a numpad on the right. This layer is momentary when the left thumb-bar or LOWER key is held and toggled on/off when the LOWER key is tapped.
+```
+,-----------------------------------------.    .-----------------------------------------.
+|  Tab | PgUp | Home |  Up  |  End |      |    |   7  |   8  |   9  |  \+  |      | Del  |
+|------+------+------+------+------+------|    |------+------+------+------+------+------|
+|  BS  | PgDn | Left | Down |Right |      |    |   4  |   5  |   6  | Enter|      |   '  |
+|------+------+------+------+------+------|    |------+------+------+------+------+------|
+| LSPO |   Z  |   X  |   C  |   V  |      |    |   1  |   2  |   3  | Enter|      | RSPC |
+|------+------+------+------+-------------|    |-------------+------+------+------+------|
+| Ctrl | LGUI | Alt  | LOWER| Space/Lower |    |      0      |  \.  |  Fn  | Menu | Ctrl |
+'-----------------------------------------'    '-----------------------------------------'
+```
+The *LOWER* layer contains a navigation cluster on the left hand and a numpad on the right. This layer is momentary when the left thumb-bar or LOWER key is held and toggled on/off when the LOWER key is tapped.
        
-       * The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster.
+* The Navigation cluster is offset to the right compared to the traditional WASD nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster.
 
+* All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC\_NO), all modifiers (edge |\_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (\_\_\_\_\_\_\_) to the Base layer.
 
-       * All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC_NO), all modifiers (edge |_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (_______) to the Base layer.
+[] TO DO!! - It would be nice to have a **TAP\_DANCE\_DOUBLE** implementation whereby a double tap of the right 2U key sends KC_PENT
 
-       - [] TO DO!! - It would be nice to have a **TAP_DANCE_DOUBLE** implementation whereby a double tap of the right 2U key sends KC_PENT
-               * Couldn't get this to work in Rev1, produced an error in the Make process.
-               * When this is done, I can remove the clunky double Enter on the 4th column of the right hand PCB.
+* Couldn't get this to work in Rev1, produced an error in the Make process.
+* When this is done, I can remove the clunky double Enter on the 4th column of the right hand PCB.
 
 ### RAISE - Symbol Layer
-
- > ,-----------------------------------------.     .-----------------------------------------. \
- > |  Esc |      |      |      |      |      |     |      |      |      |      |      |  Del | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > |  BS  |  \!  |   @  |  \#  |   $  |   %  |     |   ^  |   &  |  \*  |  \-  |  \+  |   '  | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > | LSBO |      |      |  \{  |  \[  |  \`  |     |   |  |  \]  |  \}  |  \.  |   ?  | RSBC | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > | Ctrl | LGUI | Alt  |      | Space/Lower |     | Enter/Raise |  Fn  | Mouse| Menu | Ctrl | \
- > '-----------------------------------------'     '-----------------------------------------' \
-
-       * The *RAISE* layer contains the symbols. This layer is momentary when the right thumb bar is held.
-                       * Standard symbols can be found on the home row, in the traditional number row order as they occur on a standard keyboard.
-                       * Shifted symbols can be found on the second-from bottom row, abovee the bars - these include brackets, braces, grave and pipe keys.
-                                       * At this stage, you need to shift to get to the Tilde key. I'd like to remove the shift requirement as I've done with the Pipe, but we'll see. 
-                       * The Terminus_Mini implements the symbols on the top row, with numbers implemented on the home row. Implementing a third set of number keys (Base, *LOWER*, *RAISE*) in this keymap is probably overkill, but the current *RAISE* layout replicates the standard number row, so I don't see reason to change it.
-                       * The bottom row of this layer is a replication of that of the Base layer, except that the **TAP_TOGGLE** *LOWER* key is blocked with **XXXXXXX**.
+```
+,-----------------------------------.     .-----------------------------------.
+| Tab |     |     |     |     |     |     |     |     |     |     |     |  \  |
+|-----+-----+-----+-----+-----+-----|     |-----+-----+-----+-----+-----+-----|
+| BS  |  !  |  @  |  #  |  $  |  %  |     |  ^  |  &  |  *  |  -  |  +  |  '  |
+|-----+-----+-----+-----+-----------|     |-----+-----+-----+-----+-----+-----|
+| LSPO|     |     |  {  |  [  |  `  |     |  |  |  ]  |  }  |  .  |  ?  |RSPC |
+|-----+-----+-----+-----+-----+-----|     |-----+-----+-----+-----+-----+-----|
+| Ctrl|LGUI |     |Lower|Space/Lower|     |Enter/Raise|  Fn |Mouse| Menu| Ctrl|
+'-----------------------------------'     '-----------------------------------'
+```
+The *RAISE* layer contains the symbols. This layer is momentary when the right thumb bar is held.
+
+* Standard symbols can be found on the home row, in the traditional number row order as they occur on a standard keyboard.
+* Shifted symbols can be found on the second-from bottom row, abovee the bars - these include brackets, braces, grave and pipe keys.
+       * At this stage, you need to shift to get to the Tilde key. I'd like to remove the shift requirement as I've done with the Pipe, but we'll see. 
+* The Terminus_Mini implements the symbols on the top row, with numbers implemented on the home row. Implementing a third set of number keys (Base, *LOWER*, * RAISE*) in this keymap is probably overkill, but the current *RAISE* layout replicates the standard number row, so I don't see reason to change it.
+* The bottom row of this layer is a replication of that of the Base layer, except that the **TAP_TOGGLE** *LOWER* key is blocked with XXXXXXX.
 
 ### FUNCTION - Function & Media keys
-
- > ,-----------------------------------------.     .-----------------------------------------. \
- > | Esc  | Mute | Vol- | Vol+ |      | RESET|     | POWER|      |      |      |      | Ins  | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > | Caps | Stop | |<<  | >/|| |  >>| |      |     |      |      |      |      |      |PrtSc | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > | LSOB |      |      |      |      |      |     |      |      |      |      |      |ScrLk | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > | Ctrl | LGUI | Alt  |      | Space/Lower |     | Enter/Raise |  Fn  | Mouse|      |PsBrk | \
- > '-----------------------------------------'     '-----------------------------------------' \
-
-       * The *FUNCTION* layer contains media keys as well as the F-row. This layer is momentary and requires Fn to be held.
-                       * The media cluster is based on the nav cluster in the *LOWER* layer, with RW, PP & FF in the Left, Down & Right positions.
-                       * Mute, and Vol +/- are next to each other in ascending (L->R) volume order, Stop is below Mute.
-                       * Insert, Print Screen, Scroll Lock & Pause Break are all implemented on the far right column.
-                                       I don't really use these keys so their position is not optimised.
-                       * Caps lock is implemented on this layer, in the traditional position, in place of BackSpace on the Base layer.
-                       * The RESET key will reset the Teensy for flashing and the Power key will initiate a shutdown of the PC. I've placed these in the far-reach index positions so that they are least likely to be pressed on accident. The power key is particularly dangerous, so I've placed it conciously on the right hand so that it becomes very awkward to activate with one hand (Fn needs to be held with the middle finger at the same time)
+```
+,-----------------------------------------.     .-----------------------------------------.
+| Esc  | Mute | Vol- | Vol+ |      | RESET|     | POWER|      |      |      |      | Ins  |
+|------+------+------+------+------+------|     |------+------+------+------+------+------|
+| Caps | Stop | |<<  | >/|| |  >>| |      |     |      |      |      |      |      |PrtSc |
+|------+------+------+------+------+------|     |------+------+------+------+------+------|
+| LSOB |      |      |      |      |      |     |      |      |      |      |      |ScrLk |
+|------+------+------+------+------+------|     |------+------+------+------+------+------|
+| Ctrl | LGUI | Alt  |      | Space/Lower |     | Enter/Raise |  Fn  | Mouse|      |PsBrk |
+'-----------------------------------------'     '-----------------------------------------'
+```
+The *FUNCTION* layer contains media keys as well as the F-row. This layer is momentary and requires Fn to be held.
+
+* The media cluster is based on the nav cluster in the *LOWER* layer, with RW, PP & FF in the Left, Down & Right positions.
+* Mute, and Vol +/- are next to each other in ascending (L->R) volume order, Stop is below Mute.
+* Insert, Print Screen, Scroll Lock & Pause Break are all implemented on the far right column. I don't really use these keys so their position is not optimised.
+* Caps lock is implemented on this layer, in the traditional position, in place of BackSpace on the Base layer.
+* The RESET key will reset the Teensy for flashing and the Power key will initiate a shutdown of the PC. I've placed these in the far-reach index positions so that they are least likely to be pressed on accident. The power key is particularly dangerous, so I've placed it conciously on the right hand so that it becomes very awkward to activate with one hand (Fn needs to be held with the middle finger at the same time)
 
 ### MOUSE - Mouse keys: The functionality of this layer is not as optimal as using a true mouse, generally slower but will work in a pinch.
- > ,----------------------------------------.     .----------------------------------------.
- > |  Tab | WhlU | WhlL | MsUp | WhlR |     |     |     |  M3  |  M4  |  M5  |      |      | \
- > |------+------+------+------+------+-----|     |-----+------+------+------+------+------| \
- > |      | WhlD | MsL  | MsDn | MsR  |     |     |     |LClick|RClick|      |      |      | \
- > |------+------+------+------+------+-----|     |-----+------+------+------+------+------| \
- > | LSPO |      |      |      |      |     |     |     |      |      |      |      | RSCB | \
- > |------+------+------+------+------+-----|     |-----+------+------+------+------+------| \
- > | Ctrl |      |      |      |Sensitivity |     | Sensitivity|      |MOUSE |      | Ctrl | \
- > '----------------------------------------'     '----------------------------------------' \
-
-       * The *MOUSE* layer contains keys replicating functions found on the mouse. 
-               * The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are nalagous to the Page Up & Down keys.
-               *) The primary click (right & left) buttons are on the right home row (index & middle fingers)
-               * Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function.
\ No newline at end of file
+```
+,----------------------------------------.     .----------------------------------------.
+|  Tab | WhlU | WhlL | MsUp | WhlR |     |     |     |  M3  |  M4  |  M5  |      |      |
+|------+------+------+------+------+-----|     |-----+------+------+------+------+------|
+|      | WhlD | MsL  | MsDn | MsR  |     |     |     |LClick|RClick|      |      |      |
+|------+------+------+------+------+-----|     |-----+------+------+------+------+------|
+| LSPO |      |      |      |      |     |     |     |      |      |      |      | RSCB |
+|------+------+------+------+------+-----|     |-----+------+------+------+------+------|
+| Ctrl |      |      |      |Sensitivity |     | Sensitivity|      |MOUSE |      | Ctrl |
+'----------------------------------------'     '----------------------------------------'
+```
+The *MOUSE* layer contains keys replicating functions found on the mouse. 
+
+* The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are nalagous to the Page Up & Down 
+keys.
+*) The primary click (right & left) buttons are on the right home row (index & middle fingers)
+* Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function.
index 6de6a1427d8370658541f3ec271afc6e493ff5f1..5b9732dbd6137f6459a1ff5936ce4ef7d22e2aa6 100644 (file)
 Copyright 2017 James Morgan <ja.morgan1@outlook.com>
 
-#MogranJM's nyquist layout
+#MogranJM's Nyquist layout
 
-       ***NOTE*** - As yet, this keymap has not been tested, I'm waiting on delivery of a plate and base before I assemble the keyboard. Though, the hex file does compile successfully...
-
-This keymap is based on my Terminus_Mini (../../../terminus_mini/default) layout (credit for the names of these layouts goes to UniKeyboard & reddit's /u/blahlicus)
+This keymap is based on my Terminus_Mini (../../../terminus\_mini/default) layout (credit for the names of these layouts goes to UniKeyboard & reddit's /u/blahlicus)
 
 The terminus_mini is a handwired 4x12 ortholinear keyboard with two 2U thumb bar keys. This implementation of the layout converts it to a split 5x12 (two halves, each 5x6) keyboard with a 2U thumb key on the inner bottom corner of each half. 
 
-The TERMINUS_MINI layout (../../../terminus_mini/terminus_mini.h) is handwired and the 2U keys are handled using KC_NO to detail that two columns do not have a 4th column. This layout is based on a PCB, so the keymap represents the 2U keys as duplicates of the same 1U key.
-
->  .----------------------------------------.     .-----------------------------------------. \
->  | Esc |   1  |   2  |   3  |   4  |   5  |     |   6  |   7  |   8  |   9  |   0  | Del  | \
->  |-----+------+------+------+------+------|     |------+------+------+------+------+------| \
->  | Tab |   Q  |   W  |   F  |   P  |   G  |     |   J  |   L  |   U  |   Y  |   ;  |  \\  | \
->  |-----+------+------+------+------+------|     |------+------+------+------+------+------| \
->  | BS  |   A  |   R  |   S  |   T  |   D  |     |   H  |   N  |   E  |   I  |   O  |  '   | \
->  |-----+------+------+------+------+------|     |------+------+------+------+------+------| \
->  | LSPO|   Z  |   X  |   C  |   V  |   B  |     |   K  |   M  |   ,  |  \.  |   /  | RSPC | \
->  |-----+------+------+------+------+------|     |------+------+------+------+------+------| \
->  | Ctrl| LGUI | LAlt | Lower| Space/Lower |     | Enter/Raise |  Fn  | Mouse| Menu | Ctrl | \
->  '----------------------------------------'     '-----------------------------------------' \
-\
-> [_COLEMAK] = KEYMAP( \
->   KC_ESC,  KC_1,    KC_2,    KC_3,    KC_4,   KC_5,         KC_6,   KC_7,    KC_8,      KC_9,    KC_0,    KC_DEL, \
->   KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,   KC_G,         KC_J,   KC_L,    KC_U,      KC_Y,    KC_SCLN, 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_LSPO, KC_Z,    KC_X,    KC_C,    KC_V,   KC_B,         KC_K,   KC_M,    KC_COMM,   KC_DOT,  KC_SLSH, KC_RSPC, \
->   KC_LCTL, KC_LGUI, KC_LALT, LWR,   SPC_LW, SPC_LW,       ENT_RS, ENT_RS,    FNC,       MSE,     KC_APP,  KC_RCTL \
->   ),
-
-##Layers
+The TERMINUS\_MINI layout (../../../terminus_mini/terminus_mini.h) is handwired and the 2U keys are handled using KC_NO to detail that two columns do not have a 4th column. This layout is based on a PCB, so the keymap represents the 2U keys as duplicates of the same 1U key.
+
+```
+.----------------------------------------.     .-----------------------------------------. 
+| Esc |   1  |   2  |   3  |   4  |   5  |     |   6  |   7  |   8  |   9  |   0  | Del  | 
+|-----+------+------+------+------+------|     |------+------+------+------+------+------| 
+| Tab |   Q  |   W  |   F  |   P  |   G  |     |   J  |   L  |   U  |   Y  |   ;  |  \\  | 
+|-----+------+------+------+------+------|     |------+------+------+------+------+------| 
+| BS  |   A  |   R  |   S  |   T  |   D  |     |   H  |   N  |   E  |   I  |   O  |  '   | 
+|-----+------+------+------+------+------|     |------+------+------+------+------+------| 
+| LSPO|   Z  |   X  |   C  |   V  |   B  |     |   K  |   M  |   ,  |  \.  |   /  | RSPC | 
+|-----+------+------+------+------+------|     |------+------+------+------+------+------| 
+| Ctrl| LGUI | LAlt | Lower| Space/Lower |     | Enter/Raise |  Fn  | Mouse| Menu | Ctrl | 
+'----------------------------------------'     '-----------------------------------------' 
+```
 
 ### Base Layer - Colemak
-       * The base layout is Colemak. Since the CapsLock key is replaced with BackSpace, this layout has the delete key in the traditional backspace location. 
-                       * QWERTY and Dvorak layers have been removed from the keymap that was initially developed from the default Planck keymap.
-                       * I've implemented COLEMAK = SAFE_RANGE when enumerating the custom_keycodes, but I don't actually know what this does...
-
-       * Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses)
-       * I never find myself using the right-modifiers on a standard keyboard, so I've only implemented LGUI and LALT. I have intentions of improving my use of the ctrl key in correct hand alternation, so CTRL is implemented in both outside corners of the home row.
-
-
-       #### Layer Shifting
-               * The 4th key on the bottom row of the left hand PCB is a **TAP_TOGGLE** macro for the *LOWER* layer 
-               * The left 2U key is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space.
-               * The right 2U key is a **TAP_KEY** macro - Hold for momentary *RAISE* layer, Tap for Enter
-               * The 2nd key on the bottom row of the right hand PCB is a **LAYER_MOMENTARY** for the *FUNCTION* layer
-               * The 3rd key on the bottom row of the right hand PCB is a **TAP_TOGGLE** macro for the *MOUSE* layer
+The base layout is Colemak. Since the CapsLock key is replaced with BackSpace, this layout has the delete key in the traditional backspace location. 
 
-### LOWER - Numpad & Navigation keys
+* QWERTY and Dvorak layers have been removed from the keymap that was initially developed from the default Planck keymap.
+* I've implemented COLEMAK = SAFE\_RANGE when enumerating the custom\_keycodes, but I don't actually know what this does...
 
- ,-----------------------------------------.    .-----------------------------------------. \
- |  Esc |      |      |      |      |      |    |   =  |   /  |   \* |  \-  |      | Del  | \
- |------+------+------+------+------+------|    |------+------+------+------+------+------| \
- |  Tab | PgUp | Home |  Up  |  End |      |    |   7  |   8  |   9  |  \+  |      |  \\  | \
- |------+------+------+------+------+------|    |------+------+------+------+------+------| \
- |  BS  | PgDn | Left | Down |Right |      |    |   4  |   5  |   6  | Enter|      |   '  | \
- |------+------+------+------+------+------|    |------+------+------+------+------+------| \
- | LSPO |   Z  |   X  |   C  |   V  |      |    |   1  |   2  |   3  | Enter|      | RSPC | \
- |------+------+------+------+-------------|    |-------------+------+------+------+------| \
- | Ctrl | LGUI | Alt  | LOWER| Space/Lower |    |      0      |  \.  |  Fn  | Menu | Ctrl | \
- `-----------------------------------------'    `-----------------------------------------' \
+* Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses)
+* I never find myself using the right-modifiers on a standard keyboard, so I've only implemented LGUI and LALT. I have intentions of improving my use of the ctrl key in correct hand alternation, so CTRL is implemented in both outside corners of the home row.
 
-       * The *LOWER* layer contains a navigation cluster on the left hand and a numpad on the right. This layer is momentary when the left thumb-bar or LOWER key is held and toggled on/off when the LOWER key is tapped.
-       
-       * The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster.
 
-       * All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC_NO), all modifiers (edge |_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (_______) to the Base layer.
+#### Layer Shifting
+* The 4th key on the bottom row of the left hand PCB is a **TAP_TOGGLE** macro for the *LOWER* layer 
+* The left 2U key is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space.
+* The right 2U key is a **TAP_KEY** macro - Hold for momentary *RAISE* layer, Tap for Enter
+* The 2nd key on the bottom row of the right hand PCB is a **LAYER_MOMENTARY** for the *FUNCTION* layer
+* The 3rd key on the bottom row of the right hand PCB is a **TAP_TOGGLE** macro for the *MOUSE* layer
 
-       - [] TO DO!! - It would be nice to have a **TAP_DANCE_DOUBLE** implementation whereby a double tap of the right 2U key sends KC_PENT
-               * Couldn't get this to work in Rev1, produced an error in the Make process.
-               * When this is done, I can remove the clunky double Enter on the 4th column of the right hand PCB.
+### LOWER - Numpad & Navigation keys
+```
+ ,-----------------------------------------.    .-----------------------------------------. 
+ |  Esc |      |      |      |      |      |    |   =  |   /  |   \* |  \-  |      | Del  | 
+ |------+------+------+------+------+------|    |------+------+------+------+------+------| 
+ |  Tab | PgUp | Home |  Up  |  End |      |    |   7  |   8  |   9  |  \+  |      |  \\  | 
+ |------+------+------+------+------+------|    |------+------+------+------+------+------| 
+ |  BS  | PgDn | Left | Down |Right |      |    |   4  |   5  |   6  | Enter|      |   '  | 
+ |------+------+------+------+------+------|    |------+------+------+------+------+------| 
+ | LSPO |   Z  |   X  |   C  |   V  |      |    |   1  |   2  |   3  | Enter|      | RSPC | 
+ |------+------+------+------+-------------|    |-------------+------+------+------+------| 
+ | Ctrl | LGUI | Alt  | LOWER| Space/Lower |    |      0      |  \.  |  Fn  | Menu | Ctrl | 
+ `-----------------------------------------'    `-----------------------------------------' 
+```
+The *LOWER* layer contains a navigation cluster on the left hand and a numpad on the right. This layer is momentary when the left thumb-bar or LOWER key is held and toggled on/off when the LOWER key is tapped.
+
+The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster.
+
+All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC_NO), all modifiers (edge |_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (_______) to the Base layer.
+
+[] TO DO!! - It would be nice to have a **TAP_DANCE_DOUBLE** implementation whereby a double tap of the right 2U key sends KC_PENT
+* Couldn't get this to work in Rev1, produced an error in the Make process.
+* When this is done, I can remove the clunky double Enter on the 4th column of the right hand PCB (numpad enter).
 
 ### RAISE - Symbol Layer
-
- > ,-----------------------------------------.     .-----------------------------------------. \
- > |  Esc |   1  |   2  |   3  |   4  |   5  |     |   6  |   7  |   8  |   9  |   0  | Del  | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > |  Tab |      |      |      |      |      |     |      |      |      |      |      |  \\  | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > |  BS  |  \!  |   @  |  \#  |   $  |   %  |     |   ^  |   &  |  \*  |  \-  |  \+  |   '  | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > | LSBO |      |      |  \{  |  \[  |  \`  |     |   |  |  \]  |  \}  |  \.  |   ?  | RSBC | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > | Ctrl | LGUI | Alt  |      | Space/Lower |     | Enter/Raise |  Fn  | Mouse| Menu | Ctrl | \
- > '-----------------------------------------'     '-----------------------------------------' \
-
-       * The *RAISE* layer contains the symbols. This layer is momentary when the right thumb bar is held.
-                       * Standard symbols can be found on the home row, in the traditional number row order as they occur on a standard keyboard.
-                       * Shifted symbols can be found on the second-from bottom row, abovee the bars - these include brackets, braces, grave and pipe keys.
-                                       * At this stage, you need to shift to get to the Tilde key. I'd like to remove the shift requirement as I've done with the Pipe, but we'll see. 
-                       * The Terminus_Mini implements the symbols on the top row, with numbers implemented on the home row. Implementing a third set of number keys (Base, *LOWER*, *RAISE*) in this keymap is probably overkill, but the current *RAISE* layout replicates the standard number row, so I don't see reason to change it.
-                       * The bottom row of this layer is a replication of that of the Base layer, except that the **TAP_TOGGLE** *LOWER* key is blocked with **XXXXXXX**.
+```
+ ,-----------------------------------.     .-----------------------------------.
+ | Esc |  1  |  2  |  3  |  4  |  5  |     |  6  |  7  |  8  |  9  |  0  | Del |
+ |-----+-----+-----+-----+-----+-----|     |-----+-----+-----+-----+-----+-----|
+ | Tab |     |     |     |     |     |     |     |     |     |     |     |  \  |
+ |-----+-----+-----+-----+-----+-----|     |-----+-----+-----+-----+-----+-----|
+ | BS  |  !  |  @  |  #  |  $  |  %  |     |  ^  |  &  |  *  |  -  |  +  |  '  |
+ |-----+-----+-----+-----+-----------|     |-----+-----+-----+-----+-----+-----|
+ | LSPO|     |     |  {  |  [  |  `  |     |  |  |  ]  |  }  |  .  |  ?  |RSPC |
+ |-----+-----+-----+-----+-----+-----|     |-----+-----+-----+-----+-----+-----|
+ | Ctrl|LGUI | Alt |     |Space/Lower|     |Enter/Raise|  Fn |Mouse| Menu| Ctrl|
+ '-----------------------------------'     '-----------------------------------'
+```
+The *RAISE* layer contains the symbols. This layer is momentary when the right thumb bar is held.
+
+* Standard symbols can be found on the home row, in the traditional number row order as they occur on a standard keyboard.
+* Shifted symbols can be found on the second-from bottom row, abovee the bars - these include brackets, braces, grave and pipe keys.
+       * At this stage, you need to shift to get to the Tilde key. I'd like to remove the shift requirement as I've done with the Pipe, but we'll see. 
+* The Terminus_Mini implements the symbols on the top row, with numbers implemented on the home row. Implementing a third set of number keys (Base, *LOWER*, *RAISE*) in this keymap is probably overkill, but the current *RAISE* layout replicates the standard number row, so I don't see reason to change it.
+* The bottom row of this layer is a replication of that of the Base layer, except that the **TAP_TOGGLE** *LOWER* key is blocked with **XXXXXXX**.
 
 ### FUNCTION - Function & Media keys
-
- > ,-----------------------------------------.     .-----------------------------------------. \
- > |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |     |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > | Esc  | Mute | Vol- | Vol+ |      | RESET|     | POWER|      |      |      |      | Ins  | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > | Caps | Stop | |<<  | >/|| |  >>| |      |     |      |      |      |      |      |PrtSc | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > | LSOB |      |      |      |      |      |     |      |      |      |      |      |ScrLk | \
- > |------+------+------+------+------+------|     |------+------+------+------+------+------| \
- > | Ctrl | LGUI | Alt  |      | Space/Lower |     | Enter/Raise |  Fn  | Mouse|      |PsBrk | \
- > '-----------------------------------------'     '-----------------------------------------' \
-
-       * The *FUNCTION* layer contains media keys as well as the F-row. This layer is momentary and requires Fn to be held.
-                       * The media cluster is based on the nav cluster in the *LOWER* layer, with RW, PP & FF in the Left, Down & Right positions.
-                       * Mute, and Vol +/- are next to each other in ascending (L->R) volume order, Stop is below Mute.
-                       * Insert, Print Screen, Scroll Lock & Pause Break are all implemented on the far right column.
-                                       I don't really use these keys so their position is not optimised.
-                       * Caps lock is implemented on this layer, in the traditional position, in place of BackSpace on the Base layer.
-                       * The RESET key will reset the board for flashing and the Power key will initiate a shutdown of the PC. I've placed these in the far-reach index positions so that they are least likely to be pressed on accident. The power key is particularly dangerous, so I've placed it conciously on the right hand so that it becomes very awkward to activate with one hand (Fn needs to be held with the middle finger at the same time)
+```
+,-----------------------------------------.     .-----------------------------------------.
+|  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |     |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |
+|------+------+------+------+------+------|     |------+------+------+------+------+------|
+| Esc  | Mute | Vol- | Vol+ |      | RESET|     | POWER|      |      |      |      | Ins  |
+|------+------+------+------+------+------|     |------+------+------+------+------+------|
+| Caps | Stop | |<<  | >/|| |  >>| |      |     |      |      |      |      |      |PrtSc |
+|------+------+------+------+------+------|     |------+------+------+------+------+------|
+| LSOB |      |      |      |      |      |     |      |      |      |      |      |ScrLk |
+|------+------+------+------+------+------|     |------+------+------+------+------+------|
+| Ctrl | LGUI | Alt  |      | Space/Lower |     | Enter/Raise |  Fn  | Mouse|      |PsBrk |
+'-----------------------------------------'     '-----------------------------------------'
+```
+The *FUNCTION* layer contains media keys as well as the F-row. This layer is momentary and requires Fn to be held.
+
+* The media cluster is based on the nav cluster in the *LOWER* layer, with RW, PP & FF in the Left, Down & Right positions.
+* Mute, and Vol +/- are next to each other in ascending (L->R) volume order, Stop is below Mute.
+* Insert, Print Screen, Scroll Lock & Pause Break are all implemented on the far right column. I don't really use these keys so their position is not optimised.
+* Caps lock is implemented on this layer, in the traditional position, in place of BackSpace on the Base layer.
+* The RESET key will reset the board for flashing and the Power key will initiate a shutdown of the PC. I've placed these in the far-reach index positions so that they are least likely to be pressed on accident. The power key is particularly dangerous, so I've placed it conciously on the right hand so that it becomes very awkward to activate with one hand (Fn needs to be held with the middle finger at the same time)
 
 ### MOUSE - Mouse keys: The functionality of this layer is not as optimal as using a true mouse, generally slower but will work in a pinch.
- > ,----------------------------------------.     .----------------------------------------. \
- > |  Esc |      |      |      |      |     |     |     |      |      |      |      |  Del | \
- > |------+------+------+------+------+-----|     |-----+------+------+------+------+------| \
- > |  Tab | WhlU | WhlL | MsUp | WhlR |     |     |     |  M3  |  M4  |  M5  |      |      | \
- > |------+------+------+------+------+-----|     |-----+------+------+------+------+------| \
- > |      | WhlD | MsL  | MsDn | MsR  |     |     |     |LClick|RClick|      |      |      | \
- > |------+------+------+------+------+-----|     |-----+------+------+------+------+------| \
- > | LSPO |      |      |      |      |     |     |     |      |      |      |      | RSCB | \
- > |------+------+------+------+------+-----|     |-----+------+------+------+------+------| \
- > | Ctrl |      |      |      |Sensitivity |     | Sensitivity|      |MOUSE |      | Ctrl | \
- > '----------------------------------------'     '----------------------------------------' \
-
-       * The *MOUSE* layer contains keys replicating functions found on the mouse. 
-               * The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are analagous to the Page Up & Down keys.
-
-               *) The primary click (right & left) buttons are on the right home row (index & middle fingers)
-
-               * Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function.
\ No newline at end of file
+```
+ ,----------------------------------------.     .----------------------------------------. 
+ |  Esc |      |      |      |      |     |     |     |      |      |      |      |  Del | 
+ |------+------+------+------+------+-----|     |-----+------+------+------+------+------| 
+ |  Tab | WhlU | WhlL | MsUp | WhlR |     |     |     |  M3  |  M4  |  M5  |      |      | 
+ |------+------+------+------+------+-----|     |-----+------+------+------+------+------| 
+ |      | WhlD | MsL  | MsDn | MsR  |     |     |     |LClick|RClick|      |      |      | 
+ |------+------+------+------+------+-----|     |-----+------+------+------+------+------| 
+ | LSPO |      |      |      |      |     |     |     |      |      |      |      | RSCB | 
+ |------+------+------+------+------+-----|     |-----+------+------+------+------+------| 
+ | Ctrl |      |      |      |Sensitivity |     | Sensitivity|      |MOUSE |      | Ctrl | 
+ '----------------------------------------'     '----------------------------------------'
+ ```
+The *MOUSE* layer contains keys replicating functions found on the mouse. 
+
+* The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are analagous to the Page Up & down keys.
+* The primary click (right & left) buttons are on the right home row (index & middle fingers)
+* Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function.
\ No newline at end of file
index 03f5b2de7605b13cbeb1e9496449568e5c975f3b..b77c6111c4bffefd2f238bda1e2e3233d2bc1652 100644 (file)
@@ -15,6 +15,9 @@ 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 TAPPING_TERM 150 //reduce time required to register a held key
+
 #define USE_SERIAL
 
 #define MASTER_LEFT
index 4bfff0d6c708223555ca6cf5f7df6762fa03c5c8..e77f1b99153ac2780adf8d854b3a2431ade13a02 100644 (file)
@@ -68,15 +68,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * |-----+------+------+------+------+------|     |------+------+------+------+------+------|
  * | LSPO|   Z  |   X  |   C  |   V  |   B  |     |   K  |   M  |   ,  |   .  |   /  | RSPC |
  * |-----+------+------+------+------+------|     |------+------+------+------+------+------|
- * | Ctrl| LGUI | LAlt | Lower| Space/Lower |     | Enter/Raise |  Fn  | Mouse| Menu | Ctrl |
+ * | Ctrl| LGUI | Lower| LAlt | Space/Lower |     | Enter/Raise |  Fn  | Mouse| Menu | Ctrl |
  * `----------------------------------------'     `-----------------------------------------'
  */
 [_COLEMAK] = KEYMAP( \
-  KC_ESC,  KC_1,    KC_2,    KC_3,    KC_4,   KC_5,    KC_6,   KC_7,    KC_8,      KC_9,    KC_0,    KC_DEL, \
-  KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,   KC_G,    KC_J,   KC_L,    KC_U,      KC_Y,    KC_SCLN, 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_LSPO, KC_Z,    KC_X,    KC_C,    KC_V,   KC_B,    KC_K,   KC_M,    KC_COMM,   KC_DOT,  KC_SLSH, KC_RSPC, \
-  KC_LCTL, KC_LGUI, KC_LALT, LWR,   SPC_LW, SPC_LW,  ENT_RS, ENT_RS,    FNC,       MSE,     KC_APP,  KC_RCTL \
+  KC_ESC,  KC_1,    KC_2,   KC_3,    KC_4,   KC_5,    KC_6,   KC_7,    KC_8,      KC_9,    KC_0,    KC_DEL,  \
+  KC_TAB,  KC_Q,    KC_W,   KC_F,    KC_P,   KC_G,    KC_J,   KC_L,    KC_U,      KC_Y,    KC_SCLN, 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_LSPO, KC_Z,    KC_X,   KC_C,    KC_V,   KC_B,    KC_K,   KC_M,    KC_COMM,   KC_DOT,  KC_SLSH, KC_RSPC, \
+  KC_LCTL, KC_LGUI, LWR,    KC_LALT, SPC_LW, SPC_LW,  ENT_RS, ENT_RS,  FNC,       MSE,     KC_APP,  KC_RCTL  \
   ),
 
 
@@ -90,37 +90,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * |------+------+------+------+------+------|    |------+------+------+------+------+------|
  * | LSPO |   Z  |   X  |   C  |   V  |      |    |   1  |   2  |   3  | Enter|      | RSPC |
  * |------+------+------+------+------+------|    |------+------+------+------+------+------|
- * | Ctrl | LGUI | Alt  | Lower| Space/Lower |    |      0      |   .  |  Fn  | Menu | Ctrl |
+ * | Ctrl | LGUI | Lower| LAlt | Space/Lower |    |      0      |   .  |  Fn  | Menu | Ctrl |
  * `-----------------------------------------'    `-----------------------------------------'
  */
 [_LOWER] = KEYMAP( \
-  _______,  XXXXXXX,  XXXXXXX,  XXXXXXX,  XXXXXXX, XXXXXXX,  KC_PEQL, KC_PSLS, KC_PAST, KC_MINS,  XXXXXXX, KC_DEL, \
-  _______,  KC_PGUP,  KC_HOME,  KC_UP,    KC_END,  XXXXXXX,  KC_7,    KC_8,    KC_9,    KC_PPLS,  XXXXXXX, _______, \
-  _______, KC_PGDN,  KC_LEFT,  KC_DOWN,  KC_RGHT, XXXXXXX,  KC_4,    KC_5,    KC_6,    KC_PENT,  XXXXXXX, _______, \
-  _______, _______,  _______,  _______,  _______, XXXXXXX,  KC_1,    KC_2,    KC_3,    KC_PENT,  XXXXXXX, _______, \
+  _______, XXXXXXX,  XXXXXXX,  XXXXXXX,  XXXXXXX, XXXXXXX,  KC_PEQL, KC_PSLS, KC_PAST, KC_MINS,  XXXXXXX, _______, \
+  _______, KC_PGUP,  KC_HOME,  KC_UP,    KC_END,  XXXXXXX,  KC_7,    KC_8,    KC_9,    KC_PPLS,  XXXXXXX, _______,\
+  _______, KC_PGDN,  KC_LEFT,  KC_DOWN,  KC_RGHT, XXXXXXX,  KC_4,    KC_5,    KC_6,    KC_PENT,  XXXXXXX, _______,\
+  _______, _______,  _______,  _______,  _______, XXXXXXX,  KC_1,    KC_2,    KC_3,    KC_PENT,  XXXXXXX, _______,\
   _______, _______,  _______,  _______,  _______, _______,  KC_0,    KC_0,    KC_DOT,  FNC,      _______, _______ \
 ),
 
-
 /* Raise
  * ,-----------------------------------------.     .-----------------------------------------.
  * |  Esc |   1  |   2  |   3  |   4  |   5  |     |   6  |   7  |   8  |   9  |   0  | Del  |
  * |------+------+------+------+------+------|     |------+------+------+------+------+------|
- * |  Tab |      |      |      |      |      |     |      |      |      |      |      |   \  |
+ * |  Tab |   !  |   @  |   #  |   $  |   %  |     |   ^  |   &  |   *  |   -  |   +  |   \  |
  * |------+------+------+------+------+------|     |------+------+------+------+------+------|
- * |  BS  |   !  |   @  |   #  |   $  |   %  |     |   ^  |   &  |   *  |   -  |   +  |   "  |
+ * |  BS  |      |      |      |      |      |     |      |      |      |      |      |   "  |
  * |------+------+------+------+------+------|     |------+------+------+------+------+------|
  * | LSBO |      |      |   {  |   [  |   `  |     |   |  |   ]  |   }  |   .  |   ?  | RSBC |
  * |------+------+------+------+------+------|     |------+------+------+------+------+------|
- * | Ctrl | LGUI | Alt  |      | Space/Lower |     | Enter/Raise |  Fn  | Mouse| Menu | Ctrl |
+ * | Ctrl | LGUI |      | LAlt | Space/Lower |     | Enter/Raise |  Fn  | Mouse| Menu | Ctrl |
  * `-----------------------------------------'     `-----------------------------------------' 
 */
 [_RAISE] = KEYMAP( \
   _______,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,     KC_7,    KC_8,    KC_9,    KC_0,    _______, \
-  _______,  XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,  XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, \
   _______,  KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC,  KC_AMPR, KC_ASTR, KC_MINS, KC_EQL,  _______, \
+  _______,  XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,  XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, \
   _______,  XXXXXXX, XXXXXXX, KC_LCBR, KC_LBRC, KC_GRV,  KC_PIPE,  KC_RBRC, KC_RCBR, KC_DOT,  KC_SLSH, _______, \
-  _______,  _______, _______, XXXXXXX, _______, _______, ENT_RS,   ENT_RS,  FNC,     MSE,     _______, _______ \
+  _______,  _______, XXXXXXX, _______, _______, _______, ENT_RS,   ENT_RS,  FNC,     MSE,     _______, _______ \
   ),
 
 
diff --git a/keyboards/planck/keymaps/dudeofawesome/config.h b/keyboards/planck/keymaps/dudeofawesome/config.h
new file mode 100644 (file)
index 0000000..68d447d
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+#define WORKMAN_SOUND COLEMAK_SOUND
+
+#ifdef AUDIO_ENABLE
+    #define STARTUP_SONG SONG(PLANCK_SOUND)
+    // #define STARTUP_SONG SONG(NO_SOUND)
+
+    #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+                                  SONG(COLEMAK_SOUND), \
+                                  SONG(DVORAK_SOUND) \
+                                }
+#endif
+
+#define MUSIC_MASK (keycode != KC_NO)
+
+/*
+ * 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
+
+#define RGB_DI_PIN B2     // The pin the LED strip is connected to (PB2 by default)
+#define RGBLED_NUM 3      // Number of LEDs in your strip
+#define RGBLIGHT_ANIMATIONS
+
+#endif
diff --git a/keyboards/planck/keymaps/dudeofawesome/keymap.c b/keyboards/planck/keymaps/dudeofawesome/keymap.c
new file mode 100644 (file)
index 0000000..3fa7399
--- /dev/null
@@ -0,0 +1,191 @@
+/* Copyright 2015-2017 Jack Humbert
+ *
+ * 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 "planck.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+enum planck_layers {
+  _QWERTY,
+  _DVORAK,
+  _WORKMAN,
+  _LOWER,
+  _RAISE,
+  _ADJUST
+};
+
+enum planck_keycodes {
+  QWERTY = SAFE_RANGE,
+  DVORAK,
+  WORKMAN,
+  LOWER,
+  RAISE,
+  BACKLIT
+};
+
+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  |   ;  |Enter |
+   * |------+------+------+------+------+------|------+------+------+------+------+------|
+   * | Shift|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |  '   |
+   * |------+------+------+------+------+------+------+------+------+------+------+------|
+   * | RGB  | Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
+   * `-----------------------------------------------------------------------------------'
+   */
+  [_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_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, RSFT_T(KC_ENT)},
+    {RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT       }
+  },
+
+  /* Dvorak
+   * ,-----------------------------------------------------------------------------------.
+   * | Tab  |   "  |   ,  |   .  |   P  |   Y  |   F  |   G  |   C  |   R  |   L  | Bksp |
+   * |------+------+------+------+------+-------------+------+------+------+------+------|
+   * | Esc  |   A  |   O  |   E  |   U  |   I  |   D  |   H  |   T  |   N  |   S  |Enter |
+   * |------+------+------+------+------+------|------+------+------+------+------+------|
+   * | Shift|   ;  |   Q  |   J  |   K  |   X  |   B  |   M  |   W  |   V  |   Z  |  /   |
+   * |------+------+------+------+------+------+------+------+------+------+------+------|
+   * | RGB  | Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
+   * `-----------------------------------------------------------------------------------'
+   */
+  [_DVORAK] = {
+    {KC_TAB,  KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,    KC_BSPC       },
+    {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,    RSFT_T(KC_ENT)},
+    {RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT       }
+  },
+
+  /* Workman
+   * ,-----------------------------------------------------------------------------------.
+   * | Tab  |   Q  |   W  |   R  |   W  |   B  |   J  |   F  |   U  |   P  |   ;  | Bksp |
+   * |------+------+------+------+------+-------------+------+------+------+------+------|
+   * | Esc  |   A  |   S  |   H  |   T  |   G  |   Y  |   N  |   E  |   O  |   I  |Enter |
+   * |------+------+------+------+------+------|------+------+------+------+------+------|
+   * | Shift|   Z  |   X  |   M  |   C  |   V  |   K  |   L  |   ,  |   .  |   /  |  '   |
+   * |------+------+------+------+------+------+------+------+------+------+------+------|
+   * | RGB  | Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
+   * `-----------------------------------------------------------------------------------'
+   */
+  [_WORKMAN] = {
+    {KC_TAB,  KC_Q,    KC_D,    KC_R,    KC_W,    KC_B,    KC_J,    KC_F,    KC_U,    KC_P,    KC_SCLN, KC_BSPC       },
+    {KC_ESC,  KC_A,    KC_S,    KC_H,    KC_T,    KC_G,    KC_Y,    KC_N,    KC_E,    KC_O,    KC_I,    KC_QUOT       },
+    {KC_LSFT, KC_Z,    KC_X,    KC_M,    KC_C,    KC_V,    KC_K,    KC_L,    KC_COMM, KC_DOT,  KC_SLSH, RSFT_T(KC_ENT)},
+    {RGB_TOG, 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  |      |
+   * |------+------+------+------+------+------+------+------+------+------+------+------|
+   * |      |      |      |      |      |             |      | Play | Vol- | Vol+ | Next |
+   * `-----------------------------------------------------------------------------------'
+   */
+  [_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_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_HOME, KC_END,  _______},
+    {_______, _______, _______, _______, _______, _______, _______, _______,    KC_MPLY,    KC_VOLD, KC_VOLU, KC_MNXT}
+  },
+
+  /* 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 |      |
+   * |------+------+------+------+------+------+------+------+------+------+------+------|
+   * |      |      |      |      |      |             |      | Play | Vol- | Vol+ | Next |
+   * `-----------------------------------------------------------------------------------'
+   */
+  [_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_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_PGUP, KC_PGDN, _______},
+    {_______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT}
+  },
+
+  /* Adjust (Lower + Raise)
+   * ,-----------------------------------------------------------------------------------.
+   * |      | Reset|      |      |      |      |      |      |      |      |      |  Del |
+   * |------+------+------+------+------+-------------+------+------+------+------+------|
+   * |      |      |      |Aud on|Audoff|AGnorm|AGswap|Qwerty|Wrkman|Dvorak|      |      |
+   * |------+------+------+------+------+------|------+------+------+------+------+------|
+   * |      |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|      |      |      |      |      |
+   * |------+------+------+------+------+------+------+------+------+------+------+------|
+   * |      |      |      |      |      |             |      |      |      |      |      |
+   * `-----------------------------------------------------------------------------------'
+   */
+  [_ADJUST] = {
+    {_______, RESET,   DEBUG,   _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL },
+    {_______, _______, MU_MOD,  AU_ON,   AU_OFF,  AG_NORM, AG_SWAP, QWERTY,  WORKMAN, DVORAK,  _______, _______},
+    {_______, MUV_DE,  MUV_IN,  MU_ON,   MU_OFF,  MI_ON,   MI_OFF,  RGB_M_R, _______, _______, _______, _______},
+    {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+  }
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  switch (keycode) {
+    case QWERTY:
+      if (record->event.pressed) {
+        print("mode just switched to qwerty and this is a huge string\n");
+        set_single_persistent_default_layer(_QWERTY);
+      }
+      return false;
+    case WORKMAN:
+      if (record->event.pressed) {
+        set_single_persistent_default_layer(_WORKMAN);
+      }
+      return false;
+    case DVORAK:
+      if (record->event.pressed) {
+        set_single_persistent_default_layer(_DVORAK);
+      }
+      return false;
+    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;
+    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;
+  }
+  return true;
+}
diff --git a/keyboards/planck/keymaps/dudeofawesome/readme.md b/keyboards/planck/keymaps/dudeofawesome/readme.md
new file mode 100644 (file)
index 0000000..7dccbaa
--- /dev/null
@@ -0,0 +1,22 @@
+# DudeOfAwesome's Planck Layout
+
+A basic Planck layout with simultaneous RGB and audio support.
+
+![Planck Layout](https://i.imgur.com/2p1TEEH.png)
+
+## Features
+
+- Base Layers
+  - QWERTY
+  - Workman
+  - Dvorak
+- Audio
+- WS2812b RGB backlight
+
+## Building and flashing
+
+1. Put your board in DFU mode with either the button on the bottom, or with a software key in your current firmware
+1. Flash:
+    ```bash
+    $ make make planck/rev4:dudeofawesome:dfu
+    ```
diff --git a/keyboards/planck/keymaps/dudeofawesome/rules.mk b/keyboards/planck/keymaps/dudeofawesome/rules.mk
new file mode 100644 (file)
index 0000000..42c370a
--- /dev/null
@@ -0,0 +1,10 @@
+ifndef QUANTUM_DIR
+       include ../../../../Makefile
+endif
+
+AUDIO_ENABLE = yes         # Audio output on port C6
+CONSOLE_ENABLE = no        # Console for debug(+400)
+MIDI_ENABLE = no           # MIDI controls
+MOUSEKEY_ENABLE = no       # Mouse keys(+4700)
+NKRO_ENABLE = no           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+RGBLIGHT_ENABLE = yes       # Enable WS2812 RGB underlight.
index 9d2fe3ecccbecfb2471a6ab239f7114e2caf59dd..1826c1e15f3ed6b93c153b7e70277b07eda2e393 100644 (file)
@@ -116,12 +116,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   {XXXXXXX, KC_MAIL, S(KC_VOLD),  KC_INS,   S(KC_VOLU),  KC_PSCR, MFN_R3},
   {XXXXXXX, MUV_DE,  MUV_IN,      AU_ON,    AU_OFF,      RESET,   MFN_R4},
 },
+[LY_0011] = {
+  {UC(L'็'),  UC(L'์'),  UC(L'่'),  UC(L'้'),  UC(L'๊'),  UC(L'๋'), MFN_R1},
+  {UC(L'โ'),  UC(L'แ'),  UC(L'เ'),  UC(L'า'),  UC(L'ั'),  UC(L'ะ'), MFN_R2},
+  {UC(L'ไ'),  UC(L'ใ'),  UC(L'ิ'),  UC(L'ี'),  UC(L'ึ'),  UC(L'ื'), MFN_R3},
+  {UC(L'ๅ'),  UC(L'ฺ'),  UC(L'ํ'),  UC(L'ุ'),  UC(L'ู'),  UC(L'ำ'), MFN_R4},
+},
+[LY_1011] = {
+  {UC(L'ฐ'),  UC(L'ฎ'),  UC(L'ฏ'),  UC(L'ฮ'),  UC(L'ข'),  UC(L'ฃ'), MFN_R1},
+  {UC(L'ถ'),  UC(L'ด'),  UC(L'ต'),  UC(L'อ'),  UC(L'ก'),  UC(L'จ'), MFN_R2},
+  {UC(L'ภ'),  UC(L'บ'),  UC(L'ป'),  UC(L'ส'),  UC(L'ห'),  UC(L'ฉ'), MFN_R3},
+  {UC(L'ฯ'),  UC(L'ผ'),  UC(L'ฝ'),  UC(L'ศ'),  UC(L'ษ'),  UC(L'ๆ'), MFN_R4},
+},
+[LY_0111] = {
+  {UC(L'ฒ'),  UC(L'ฤ'),  UC(L'ฦ'),  UC(L'ม'),  UC(L'ค'),  UC(L'ฅ'), MFN_R1},
+  {UC(L'ณ'),  UC(L'ร'),  UC(L'ล'),  UC(L'น'),  UC(L'ว'),  UC(L'ง'), MFN_R2},
+  {UC(L'ญ'),  UC(L'ช'),  UC(L'ซ'),  UC(L'ย'),  UC(L'ท'),  UC(L'ฑ'), MFN_R3},
+  {UC(L'ฌ'),  UC(L'ฬ'),  UC(L'ฟ'),  UC(L'พ'),  UC(L'ธ'),  UC(L'ฆ'), MFN_R4},
+},
 [LY_0001] = UNUSED_LAYER
-[LY_0011] = UNUSED_LAYER
 [LY_0101] = UNUSED_LAYER
-[LY_0111] = UNUSED_LAYER
 [LY_1001] = UNUSED_LAYER
-[LY_1011] = UNUSED_LAYER
 };
 
 #ifdef AUDIO_ENABLE
index 692bd3578ee83040bdef9db2c63ad38135678f73..aef41bef6bfb86a9c8decaa59c8ef3fc72302639 100644 (file)
    {0|  ∀ \ { ( [ <  |0}      {0|  ⊚ 0 1 2 3 ┃  |0}      {0|  → - , .\' =  |0}
    {0|  & | @ ~ $ ^  |0}      {0|  ┏ ┓ 4 5 6 ┳  |0}      {0|  ∘ + ; :\" _  |0}
    {0|  F1 ..... F6  |0}      {0|  ┗ ┛ ┫ ━ ┣ ╋  |0}      {0|  F7 .... F12  |0}
-                                                                           ```
+
+   {8| "with FN_ACD" |8}      {8| "with  FN_CD" |8}      {8| "with FN_BCD" |8}
+   {0|  ฐ ฎ ฏ ฮ ข ฃ  |0}      {0|  ็  ์ ่ ้ ๊ ๋  |0}      {0|  ฒ ฤ ฦ ม ค ฅ  |0}
+   {0|  ถ ด ต อ ก จ  |0}      {0|  โ แ เ า ั ะ  |0}      {0|  ณ ร ล  น ว ง  |0}
+   {0|  ภ บ ป ส ห ฉ  |0}      {0| ไ ใ ิ ี ึ ื  |0}      {0|  ญ ช ซ ย ท ฑ  |0}
+   {0|  ฯ ผ ฝ ศ ษ ๆ  |0}      {0|  ๅ ฺ ํ  ุ ู ำ  |0}      {0|  ฌ ฬ ฟ พ ธ ฆ  |0}
+```
index 8fd2af00f4eba3363bbf7bb803116c9562a3fc59..886e3aea89d19c36d95eb85207698c5daaaccd71 100644 (file)
@@ -49,13 +49,26 @@ $ make ps2avrGB
 $ bootloadHID -r ps2avrGB_default.hex
 ```
 
+## Setting the board to bootloader mode
+
+If you're lucky, the programming script does this automagically for you. If
+however this doesn't work for you, you need to enter the bootloader mode manually
+by plugging the keyboard in while holding the bootloader key. If you did this
+correctly the LEDs will blink and you'll be able to flash your firmware.
+
+The bootloader key is the top left key of your matrix. For a standard board
+from winkeyless.kr this is `L_Ctrl`, but for some custom boards running ps2avrGB
+this might be different. For the Pearl it's `Esc`, for a b.fake it is `q`. If 
+you're unsure you should be able to see the key in the bootmapper client.
+
+
 ## 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
+1. Try plugging the board in while holding the bootloader key. 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.
index 8593ae0bf23f628684563c4c31a9ec7981ccec99..298e645477de80090e561a00c85a86bccb55d3f8 100755 (executable)
@@ -76,7 +76,8 @@ if kb is not None:
     print('Found a keyboad in normal mode. Attempting to send it to bootloader mode ...', end='')
     sendDeviceToBootloaderMode(kb)
     print(' done.')
-    print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing left control to do so manually.")
+    print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.")
+    print("      You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode")
 
 attempts = 12  # 60 seconds
 found = False
diff --git a/keyboards/tada68/keymaps/isoish/keymap.c b/keyboards/tada68/keymaps/isoish/keymap.c
new file mode 100644 (file)
index 0000000..56f4a85
--- /dev/null
@@ -0,0 +1,48 @@
+#include "tada68.h"
+
+#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|  [|  ]|  \  |Del |
+   * |----------------------------------------------------------------|
+   * |CAPS   |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return |PgUp|
+   * |----------------------------------------------------------------|
+   * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /| <> | Up|PgDn|
+   * |----------------------------------------------------------------|
+   * |Ctrl|Win |Alt |        Space          |Alt| FN| APP|Lef|Dow|Rig |
+   * `----------------------------------------------------------------'
+   */
+[_BL] = KEYMAP_ISO(
+  KC_ESC,   KC_1,   KC_2,   KC_3,   KC_4,   KC_5,   KC_6,   KC_7,   KC_8,   KC_9,   KC_0,   KC_MINS, KC_EQL, KC_BSPC,KC_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_BSLS,KC_DEL, \
+  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_BSLS, KC_ENT,KC_PGUP,  \
+  KC_LSFT,         KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM,KC_DOT, KC_SLSH, KC_NONUS_BSLASH,KC_UP,KC_PGDN, \
+  KC_LCTL, KC_LGUI,KC_LALT,                KC_SPC,                        KC_RALT,MO(_FL),KC_APPLICATION, KC_LEFT,KC_DOWN,KC_RGHT),
+
+  /* Keymap _FL1: Function Layer 1
+   * ,----------------------------------------------------------------.
+   * |   | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|  RESET|PSCR|
+   * |----------------------------------------------------------------|
+   * |     |   |   |   |   |   |   |   |   |   |   |BL-|BL+|BL   | INS|
+   * |----------------------------------------------------------------|
+   * |      |   |   |   |   |   |   |   |   | PP|PLA| PN|        |HOME|
+   * |----------------------------------------------------------------|
+   * |        |   |   |   |   |   |   |   |  V-| MV| V+|     |   | END|
+   * |----------------------------------------------------------------|
+   * |    |    |    |                       |   |   |    |   |   |    |
+   * `----------------------------------------------------------------'
+   */
+[_FL] = KEYMAP_ISO(
+  _______, 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_PSCR,  \
+  _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,KC_INS, \
+  _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,KC_HOME, \
+  _______,_______,_______,_______,_______,_______,_______,_______,KC_VOLD,KC_MUTE,KC_VOLU,_______,_______,KC_END, \
+  _______,_______,_______,                 _______,               _______,_______,_______,_______,_______, _______),
+};
\ No newline at end of file
diff --git a/keyboards/tada68/keymaps/isoish/readme.md b/keyboards/tada68/keymaps/isoish/readme.md
new file mode 100644 (file)
index 0000000..48ad783
--- /dev/null
@@ -0,0 +1,3 @@
+# ISO(ish) - Basic ISO format layout for TADA68 #
+
+Basic layout with some edits to work better with ISO (nordic) layout. Due to the wide left shift it isn't quite Nordic iso though.
\ No newline at end of file
diff --git a/keyboards/tada68/keymaps/isoish/rules.mk b/keyboards/tada68/keymaps/isoish/rules.mk
new file mode 100644 (file)
index 0000000..4deca71
--- /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
\ No newline at end of file
index d0e027a6f4a74324f0da87770097f2f8a9ab2c53..bb41865ba0fa10f84fcc2ce6650595a11e2a5e92 100755 (executable)
        {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e}  \
 }
 
+/* TADA68 ISO layout
+   * ,----------------------------------------------------------------.
+   * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d    | 0e |
+   * |----------------------------------------------------------------|
+   * | 10  | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c|  1d | 1e |
+   * |----------------------------------------------------------------|
+   * | 20    | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c| 2d| 2e |
+   * |----------------------------------------------------------------|
+   * | 30     | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b|    3c| 3d| 3e |
+   * |----------------------------------------------------------------|
+   * | 40 | 41 | 42 |        45             | 49| 4a|  4b| 4c| 4d| 4e |
+   * `----------------------------------------------------------------'
+ */
+// The first section contains all of the arguments
+// The second converts the arguments into a two-dimensional array
+
+#define KEYMAP_ISO( \
+    k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
+       k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
+       k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \
+       k30,      k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
+       k40, k41, k42,           k45,                k49, k4a, k4b, k4c, k4d, k4e  \
+) \
+{ \
+       {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
+       {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \
+       {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \
+       {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \
+       {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e}  \
+}
+
 void matrix_init_user(void);
 void matrix_scan_user(void);
 
-#endif
+#endif
\ No newline at end of file
index 520985204f8e3de82a8c94f21007baf983c2c1d4..a55a1e8d90fe35878cef5816935d21592955a099 100644 (file)
 // #define CFQ_USE_MOMENTARY_LAYER_KEYS
 // #define CFQ_USE_EXPEREMENTAL_LAYER
 
+// keep enabled for now
+#define CFQ_USE_DYNAMIC_MACRO
+
 #if !defined(CFQ_USER_KEY1)
-#define CFQ_USER_KEY1 KC_F13
+#define CFQ_USER_KEY1 KC_SPC
 #endif
 #if !defined(CFQ_USER_KEY2)
-#define CFQ_USER_KEY2 KC_APP
+#define CFQ_USER_KEY2 KC_ENT
+#endif
+#if !defined(CFQ_USER_KEY3)
+#define CFQ_USER_KEY3 CFQ_KC_FN3
+#endif
+#if !defined(CFQ_USER_KEY4)
+#define CFQ_USER_KEY4 KC_APP
 #endif
 
 #define BASE 0 // default layer
@@ -29,9 +38,16 @@ enum custom_keycodes {
   PLACEHOLDER = SAFE_RANGE, // can always be here
   EPRM,
   VRSN,
-  RGB_SLD
+  RGB_SLD,
+#ifdef CFQ_USE_DYNAMIC_MACRO
+  DYNAMIC_MACRO_RANGE,
+#endif
 };
 
+#ifdef CFQ_USE_DYNAMIC_MACRO
+#include "dynamic_macro.h"
+#endif
+
 // macros
 #ifdef CFQ_USE_EXPEREMENTAL_LAYER
 #define M_SPACES_1 2
@@ -77,13 +93,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * |--------+------+------+------+------+------|   [  |           |  ]   |------+------+------+------+------+--------|
  * | LShift |   Z  |   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |   /  | RShift |
  * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
- *   | LCtl |Super | Alt  | USR2 |Space |                                       | Left | Down | Up   |Right | Del  |
+ *   | LCtl |Super | Alt  | USR4 |Space |                                       | Left | Down | Up   |Right | Del  |
  *   `----------------------------------'                                       `----------------------------------'
  *                                        ,-------------.       ,-------------.
- *                                        | Ins  | ~L3  |       | Home | End  |
+ *                                        | Ins  | USR3 |       | Home | End  |
  *                                 ,------|------|------|       |------+------+------.
  *                                 |      |      | ~L2  |       | PgUp |      |      |
- *                                 |Space | USR1 |------|       |------|Enter |Space |
+ *                                 | USR1 | USR2 |------|       |------|Enter |Space |
  *                                 |      |      | ~L1  |       | PgDn |      |      |
  *                                 `--------------------'       `--------------------'
  */
@@ -95,10 +111,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   KC_TAB,  KC_Q,    KC_W,    KC_E,          KC_R,   KC_T,    KC_LPRN,
   KC_ESC,  KC_A,    KC_S,    KC_D,          KC_F,   KC_G,
   KC_LSFT, KC_Z,    KC_X,    KC_C,          KC_V,   KC_B,    KC_LBRC,
-  KC_LCTL, KC_LGUI, KC_LALT, CFQ_USER_KEY2, KC_SPC,
-                                                    KC_INS,        CFQ_KC_FN3,
+  KC_LCTL, KC_LGUI, KC_LALT, CFQ_USER_KEY4, KC_SPC,
+                                                    KC_INS,        CFQ_USER_KEY3,
                                                                    CFQ_KC_FN2,
-                                            KC_SPC, CFQ_USER_KEY1, CFQ_KC_FN1,
+                                     CFQ_USER_KEY1, CFQ_USER_KEY2, CFQ_KC_FN1,
   // right hand
   KC_RCBR,     KC_CIRC, KC_AMPR, KC_ASTR,KC_MINS, KC_EQL,    KC_BSPC,
   KC_RPRN,     KC_Y,    KC_U,    KC_I,   KC_O,    KC_P,      KC_BSLS,
@@ -127,10 +143,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  *   |      |      |      |      |      |                                       |   0  |      |   .  |   +  |      |
  *   `----------------------------------'                                       `----------------------------------'
  *                                        ,-------------.       ,---------------.
- *                                        |      |      |       |      |        |
+ *                                        |Start1|Start2|       |      |        |
  *                                 ,------|------|------|       |------+--------+------.
- *                                 |      |      |      |       |      |        |      |
- *                                 |      |      |------|       |------|        |      |
+ *                                 |      |      | Stop |       |      |        |      |
+ *                                 |Play1 |Play2 |------|       |------|        |      |
  *                                 |      |      |      |       |      |        |      |
  *                                 `--------------------'       `----------------------'
  */
@@ -142,9 +158,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_ARROW_RMINUS),
   KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_BRACKET_IN_ANG), M(M_BRACKET_IN_BRC),
   KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+#ifdef CFQ_USE_DYNAMIC_MACRO
+                               DYN_REC_START1, DYN_REC_START2,
+                                               DYN_REC_STOP,
+                              DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_TRNS,
+#else
                                       KC_TRNS, KC_TRNS,
                                                KC_TRNS,
                              KC_TRNS, KC_TRNS, KC_TRNS,
+#endif
   // right hand
   M(M_BRACKET_OUT_CBR), KC_F6,                KC_F7,   KC_F8,   KC_F9,     KC_F10,         KC_TRNS,
   M(M_BRACKET_OUT_PRN), M(M_ARROW_LEQL),      KC_KP_7, KC_KP_8, KC_KP_9,   KC_KP_SLASH,    KC_F11,
@@ -201,13 +223,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 /* Keymap 3: My own testing keys!
  *
  * ,--------------------------------------------------.           ,--------------------------------------------------.
- * |        | Spc1 | Spc2 | Spc3 | Spc4 | Spc5 |      |           |      | Spc6 | Spc7 | Spc8 |      |      |        |
+ * |        |      |      |  {   |   }  |      |   }  |           |      |      |      |      |      |      |        |
  * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
- * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
- * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * |        |      |      |      |      |      |------|           |------|      |      |      |      |      |        |
+ * |        |      |      |  (   |   )  |      |   )  |           |      | Spc7 | Spc8 |      |      |      |        |
  * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
+ * |        |      |      |  [   |   ]  |      |------|           |------| Spc4 | Spc5 | Spc6 |      |      |        |
+ * |--------+------+------+------+------+------|   ]  |           |      |------+------+------+------+------+--------|
+ * |        |      |      |  <   |   >  |      |      |           |      | Spc1 | Spc2 | Spc3 |      |      |        |
  * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
  *   |      |      |      |      |      |                                       |      |      |      |      |      |
  *   `----------------------------------'                                       `----------------------------------'
@@ -220,23 +242,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  *                                 `--------------------'       `--------------------'
  */
 
-// EXPEREMENT
+// EXPERIMENT
 [EXPR] = LAYOUT_ergodox(
   // left hand
-  KC_TRNS, M(M_SPACES_1), M(M_SPACES_2), M(M_SPACES_3), M(M_SPACES_4), M(M_SPACES_5), KC_TRNS,
-  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,                               KC_TRNS,
-  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,                               KC_TRNS,
-  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-                                      KC_TRNS, KC_TRNS,
-                                               KC_TRNS,
-                             KC_TRNS, KC_TRNS, KC_TRNS,
+  KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR,    KC_RCBR,    KC_TRNS, KC_RCBR,
+  KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN,    KC_RPRN,    KC_TRNS, KC_RPRN,
+  KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC,    KC_RBRC,       KC_TRNS,
+  KC_TRNS, KC_TRNS, KC_TRNS, S(KC_COMM), S(KC_DOT),  KC_TRNS, KC_RBRC,
+  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, M(M_SPACES_6), M(M_SPACES_7), M(M_SPACES_8), KC_TRNS, KC_TRNS, KC_TRNS,
-  KC_TRNS, KC_TRNS,       KC_TRNS,       KC_TRNS,       KC_TRNS, KC_TRNS, KC_TRNS,
-           KC_TRNS,       KC_TRNS,       KC_TRNS,       KC_TRNS, KC_TRNS, KC_TRNS,
-  KC_TRNS, KC_TRNS,       KC_TRNS,       KC_TRNS,       KC_TRNS, KC_TRNS, KC_TRNS,
-  KC_TRNS, KC_TRNS,       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(M_SPACES_7), M(M_SPACES_8), KC_TRNS,       KC_TRNS, KC_TRNS,
+           KC_TRNS, M(M_SPACES_4), M(M_SPACES_5), M(M_SPACES_6), KC_TRNS, KC_TRNS,
+  KC_TRNS, KC_TRNS, M(M_SPACES_1), M(M_SPACES_2), M(M_SPACES_3), KC_TRNS, KC_TRNS,
+  KC_TRNS, KC_TRNS, KC_TRNS,       KC_TRNS,       KC_TRNS,
   KC_TRNS, KC_TRNS,
   KC_TRNS,
   KC_TRNS, KC_TRNS, KC_TRNS
@@ -314,6 +336,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
 };
 
 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+#ifdef CFQ_USE_DYNAMIC_MACRO
+  if (!process_record_dynamic_macro(keycode, record)) {
+    return false;
+  }
+#endif
   switch (keycode) {
     // dynamically generate these.
     case EPRM:
index cb5e96d69bbd088d6185e75b448521638e469053..52677310c072b78270fece2f23accf48db1c0f8c 100644 (file)
@@ -27,7 +27,7 @@
 Some optional behavior is configurable without editing the code
 using `CFQ_` prefixed defines which can be set by passing `EXTRAFLAGS` to make.
 
-- `CFQ_USER_KEY1`, `CFQ_USER_KEY2` are used for custom-keys
+- `CFQ_USER_KEY1` (1..4) are used for custom-keys
 - `CFQ_USE_MOMENTARY_LAYER_KEYS` is used to prevent layer keys from toggling when tapped.
 - `CFQ_USE_SWAP_RIGHT_SPACE_ENTER` swap Enter and Space on the right hand thumb cluster.
   While asymmetric, it makes Enter more easily accessible.
@@ -40,8 +40,10 @@ using `CFQ_` prefixed defines which can be set by passing `EXTRAFLAGS` to make.
 
 When undefined:
 
-- `USR1` defaults to `F13`, otherwise use `CFQ_USER_KEY1`.
-- `USR2` defaults to `APP`, otherwise use `CFQ_USER_KEY2`.
+- `USR1` defaults to `KC_SPC`, otherwise use `CFQ_USER_KEY1`.
+- `USR2` defaults to `KC_ENT`, otherwise use `CFQ_USER_KEY2`.
+- `USR3` defaults to `KC_FN3`, otherwise use `CFQ_USER_KEY3`.
+- `USR4` defaults to `APP`, otherwise use `CFQ_USER_KEY4`.
 
 ```
 ,--------------------------------------------------.           ,--------------------------------------------------.
@@ -53,21 +55,23 @@ When undefined:
 |--------+------+------+------+------+------|   [  |           |  ]   |------+------+------+------+------+--------|
 | LShift |   Z  |   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |   /  | RShift |
 `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
-  | LCtl |Super | Alt  | USR2 |Space |                                       | Left | Down | Up   |Right | Del  |
+  | LCtl |Super | Alt  | USR4 |Space |                                       | Left | Down | Up   |Right | Del  |
   `----------------------------------'                                       `----------------------------------'
                                        ,-------------.       ,-------------.
-                                       | Ins  | ~L3  |       | Home | End  |
+                                       | Ins  | USR3 |       | Home | End  |
                                 ,------|------|------|       |------+------+------.
                                 |      |      | ~L2  |       | PgUp |      |      |
-                                |Space | USR1 |------|       |------|Enter |Space |
+                                | USR1 | USR2 |------|       |------|Enter |Space |
                                 |      |      | ~L1  |       | PgDn |      |      |
                                 `--------------------'       `--------------------'
-
 ```
 
 ## Keymap 1: Symbol layer
 
-Note the double bracket keys on this layer press left to position the cursor between them.
+Notes:
+
+- The double bracket keys on this layer press left to position the cursor between them.
+- The left thumb cluster is used for macro record/replay.
 
 ```
 ,--------------------------------------------------.           ,--------------------------------------------------.
@@ -82,10 +86,10 @@ Note the double bracket keys on this layer press left to position the cursor bet
   |      |      |      |      |      |                                       |   0  |      |   .  |   +  |      |
   `----------------------------------'                                       `----------------------------------'
                                        ,-------------.       ,---------------.
-                                       |      |      |       |      |        |
+                                       |Start1|Start2|       |      |        |
                                 ,------|------|------|       |------+--------+------.
-                                |      |      |      |       |      |        |      |
-                                |      |      |------|       |------|        |      |
+                                |      |      | Stop |       |      |        |      |
+                                |Play1 |Play2 |------|       |------|        |      |
                                 |      |      |      |       |      |        |      |
                                 `--------------------'       `----------------------'
 ```
@@ -115,6 +119,10 @@ Note the double bracket keys on this layer press left to position the cursor bet
 
 ## Changelog
 
+- 2017/10/28
+  Make more keys user defined on the left thumb cluster.
+  Add macro record/replay keys.
+
 - 2017/10/4
   Move Insert key to the left thumb cluster (away from the modifier keys).
   Replace with `USR2` which defaults to `APP`.
index 2ace33ee2b9b674696aa70ca4ace755b4a157263..8c216b09b6c1cd8a09e5a0c66a977628ff6af78e 100644 (file)
@@ -6,12 +6,7 @@
 #define SYMB 1 // symbols
 #define MDIA 2 // media keys
 
-#define SGWK 0 // "sagewick", ⌘S ⌘⇥
-#define SGWF 1 // "sagewick freshly", ⌘S ⌘⇥ ⌘R
-#define BBED 2 // BBEdit
-#define TMNL 3 // Terminal
-#define SAFA 4 // Safari
-#define ALFRED_LEAD_TIME 250 // time, in milliseconds, to let Alfred come to the fore and accept keyboard input
+// Best viewed in Xcode in Menlo Regular.
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 /* Keymap 0: Basic layer
@@ -22,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * |   ⌦    |   Q  |   W  |   E  |   R  |   T  | ~L1  |           | ~L1  |   Y  |   U  |   I  |   O  |   P  |   \    |
  * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
  * |   ⌫    |   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |; / L2| ' / L⌘ |
- * |--------+------+------+------+------+------|  L⌘  |           |  L⌘  |------+------+------+------+------+--------|
+ * |--------+------+------+------+------+------|  L⌘  |           |  R⌘  |------+------+------+------+------+--------|
  * |  L⇧    |   Z  |   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  | / / ⌃|  R⇧    |
  * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
  *   |  L⌃  |  L⌥  |  L⌘  |   ←  |   →  |                                       |   ↑  |   ↓  |   [  |   ]  |      |
@@ -51,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
              TG(SYMB),  KC_6,   KC_7,   KC_8,   KC_9,   KC_0,             KC_MINS,
              MO(SYMB),  KC_Y,   KC_U,   KC_I,   KC_O,   KC_P,             KC_BSLS,
                         KC_H,   KC_J,   KC_K,   KC_L,   LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
-             KC_LGUI,   KC_N,   KC_M,   KC_COMM,KC_DOT, CTL_T(KC_SLSH),   KC_RSFT,
+             KC_RGUI,   KC_N,   KC_M,   KC_COMM,KC_DOT, CTL_T(KC_SLSH),   KC_RSFT,
                                 KC_UP,  KC_DOWN,KC_LBRC,KC_RBRC,          KC_SPC ,
              KC_ESC,            KC_BSPC,
              KC_PGDN,
@@ -102,13 +97,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 /* Keymap 2: Media keys
  *
  * ,--------------------------------------------------.           ,--------------------------------------------------.
- * |        |  F14 |  F15 |PrtScr|SclLck| Pause|      |           |  ⌘Q  |  ⌘W  | ⌘⇧`  |  ⌘`  |      |      |  Power |
+ * |        |  F14 |  F15 |PrtScr|SclLck| Pause|      |           |      |  ⌘W  | ⌘⇧`  |  ⌘`  |      |      |  Power |
  * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
- * |        |      |      | PgUp |⌘S⌘⇥⌘R| Term |      |           |      |  ⌘]  | ⌥⌘↑  |   ↑  | ⌥⌘↓  |      |        |
+ * |        |      |      | PgUp |      |      |      |           |      |  ⌘]  | ⌥⌘↑  |   ↑  | ⌥⌘↓  |      |        |
  * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * |        |      |Safari| PgDn |      |      |------|           |------|  ⌘[  |   ←  |   ↓  |   →  |      |    ⏯  |
+ * |        |      | Home | PgDn |  End |      |------|           |------|  ⌘[  |   ←  |   ↓  |   →  |      |   F16  |
  * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * |        |      |      |      |      |BBEdit|      |           |      |      |  ⏯  |  ⏮  |   ⏭ |      |        |
+ * |        |      |      |      |      |      |      |           |      |      |  ⏯  |  ⏮  |   ⏭ |      |        |
  * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
  *   |      |      |      |      |      |                                       |VolUp |VolDn | Mute |      |      |
  *   `----------------------------------'                                       `----------------------------------'
@@ -123,17 +118,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 // MEDIA AND MOUSE
 [MDIA] = LAYOUT_ergodox(
        KC_TRNS, KC_F14 , KC_F15 , KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS,  /* F14 dims screen, F15 brightens */
-       KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, M(SGWF), M(TMNL), KC_TRNS,
-       KC_TRNS, KC_TRNS, M(SAFA), KC_PGDN, KC_TRNS, KC_TRNS,
-       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(BBED), KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END , KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
                                            KC_TRNS, KC_TRNS,
                                                     KC_HOME,
                                   KC_TRNS, KC_TRNS, KC_TRNS,
     // right hand
-       LGUI(KC_Q),  LGUI(KC_W),     LGUI(LSFT(KC_GRV)), LGUI(KC_GRV),   KC_TRNS,                KC_TRNS,        KC_PWR ,
+       KC_TRNS,     LGUI(KC_W),     LGUI(LSFT(KC_GRV)), LGUI(KC_GRV),   KC_TRNS,                KC_TRNS,        KC_POWER,
        KC_TRNS,     LGUI(KC_RBRC),  LGUI(LALT(KC_UP)),  KC_UP  ,        LGUI(LALT(KC_DOWN)),    KC_TRNS,        KC_TRNS,
-                    LGUI(KC_LBRC),  KC_LEFT,            KC_DOWN,        KC_RGHT,                KC_TRNS,        KC_MPLY,
+                    LGUI(KC_LBRC),  KC_LEFT,            KC_DOWN,        KC_RGHT,                KC_TRNS,        KC_F16 ,
        KC_TRNS,     KC_TRNS,        KC_MPLY,            KC_MPRV,        KC_MNXT,                KC_TRNS,        KC_TRNS,
                                     KC_VOLU,            KC_VOLD,        KC_MUTE,                KC_TRNS,        KC_TRNS,
        KC_TRNS,     KC_TRNS,
@@ -149,57 +144,7 @@ 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 SGWK:
-              if (record->event.pressed) {
-                  return MACRO(
-                               I(10),
-                               D(LGUI), T(S),   U(LGUI),
-                               D(LGUI), T(TAB), U(LGUI),
-                               END);
-              }
-              break;
-          case SGWF:
-              if (record->event.pressed) {
-                  return MACRO(
-                               I(10),
-                               D(LGUI), T(S),   U(LGUI),
-                               D(LGUI), T(TAB), U(LGUI),
-                               D(LGUI), T(R),   U(LGUI),
-                               END);
-              }
-              break;
-          case BBED:
-              if (record->event.pressed) {
-                  return MACRO(
-                               I(10),
-                               D(LALT), T(SPC),   U(LALT), W(ALFRED_LEAD_TIME),
-                               T(B), T(B), T(E), T(D), T(I), T(T),
-                               T(ENT),
-                               END);
-              }
-              break;
-          case TMNL:
-              if (record->event.pressed) {
-                  return MACRO(
-                               I(10),
-                               D(LALT), T(SPC),   U(LALT), W(ALFRED_LEAD_TIME),
-                               T(T), T(E), T(R), T(M), T(I), T(N), T(A), T(L),
-                               T(ENT),
-                               END);
-              }
-              break;
-          case SAFA:
-              if (record->event.pressed) {
-                  return MACRO(
-                               I(10),
-                               D(LALT), T(SPC),   U(LALT), W(ALFRED_LEAD_TIME),
-                               T(S), T(A), T(F), T(A), T(R), T(I),
-                               T(ENT),
-                               END);
-              }
-              break;
-      }
+
     return MACRO_NONE;
 };
 
index 40d71f7419d89439e106d95e4751138852b7c265..1944d820659ba491aee5db518861c0270481cef7 100644 (file)
@@ -22,7 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "host.h"
 #include "report.h"
 
-void pointingdevice_init(void);
+void pointing_device_init(void);
 void pointing_device_task(void);
 void pointing_device_send(void);
 report_mouse_t pointing_device_get_report(void);
index 58d45add2288899de0805abeb487b2dafcf2bf13..1addd72e5ade966e121e8243a2b77d58f4787e4b 100644 (file)
@@ -127,8 +127,12 @@ bool process_combo(uint16_t keycode, keyrecord_t *record)
 void matrix_scan_combo(void)
 {
     for (int i = 0; i < COMBO_COUNT; ++i) {
+        // Do not treat the (weak) key_combos too strict.
+        #pragma GCC diagnostic push
+        #pragma GCC diagnostic ignored "-Warray-bounds"
         combo_t *combo = &key_combos[i];
-        if (combo->timer && 
+        #pragma GCC diagnostic pop
+        if (combo->timer &&
             combo->timer != COMBO_TIMER_ELAPSED && 
             timer_elapsed(combo->timer) > COMBO_TERM) {
             
index d7978f91c7a2784cb9eddc1010eb9413012f8201..50cc0a5ccbb2415c7091fb57655f2e72935e9abf 100644 (file)
@@ -51,7 +51,7 @@ uint64_t key_state[4] = { 0x0, 0x0, 0x0, 0x0 };
 bool watching = false;
 
 // Translate any OSM keycodes back to their unmasked versions.
-uint16_t inline translate_keycode(uint16_t keycode) {
+static inline uint16_t translate_keycode(uint16_t keycode) {
     if (keycode > QK_ONE_SHOT_MOD && keycode <= QK_ONE_SHOT_MOD_MAX) {
         return keycode ^ QK_ONE_SHOT_MOD;
     } else {
index 41de01485342a856edc11414249adc2942e36031..b39aa4cbc402125235f1df3e1a75f72e91d40e3b 100644 (file)
@@ -36,6 +36,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 int tp_buttons;
 
+#ifdef RETRO_TAPPING
+int retro_tapping_counter = 0;
+#endif
+
 #ifdef FAUXCLICKY_ENABLE
 #include <fauxclicky.h>
 #endif
@@ -45,6 +49,9 @@ void action_exec(keyevent_t event)
     if (!IS_NOEVENT(event)) {
         dprint("\n---- action_exec: start -----\n");
         dprint("EVENT: "); debug_event(event); dprintln();
+#ifdef RETRO_TAPPING
+        retro_tapping_counter++;
+#endif
     }
 
 #ifdef FAUXCLICKY_ENABLE
@@ -586,6 +593,32 @@ void process_action(keyrecord_t *record, action_t action)
     }
 #endif
 
+#ifndef NO_ACTION_TAPPING
+  #ifdef RETRO_TAPPING
+  if (!is_tap_key(record->event.key)) {
+    retro_tapping_counter = 0;
+  } else {
+    if (event.pressed) {
+        if (tap_count > 0) {
+          retro_tapping_counter = 0;
+        } else {
+
+        }
+    } else {
+      if (tap_count > 0) {
+        retro_tapping_counter = 0;
+      } else {
+        if (retro_tapping_counter == 2) {
+          register_code(action.layer_tap.code);
+          unregister_code(action.layer_tap.code);
+        }
+        retro_tapping_counter = 0;
+      }
+    }
+  }
+  #endif
+#endif
+
 #ifndef NO_ACTION_ONESHOT
     /* Because we switch layers after a oneshot event, we need to release the
      * key before we leave the layer or no key up event will be generated.
@@ -619,7 +652,7 @@ void register_code(uint8_t code)
 #endif
         add_key(KC_CAPSLOCK);
         send_keyboard_report();
-        wait_ms(100);        
+        wait_ms(100);
         del_key(KC_CAPSLOCK);
         send_keyboard_report();
     }
@@ -630,7 +663,7 @@ void register_code(uint8_t code)
 #endif
         add_key(KC_NUMLOCK);
         send_keyboard_report();
-        wait_ms(100);        
+        wait_ms(100);
         del_key(KC_NUMLOCK);
         send_keyboard_report();
     }
@@ -641,7 +674,7 @@ void register_code(uint8_t code)
 #endif
         add_key(KC_SCROLLLOCK);
         send_keyboard_report();
-        wait_ms(100);        
+        wait_ms(100);
         del_key(KC_SCROLLLOCK);
         send_keyboard_report();
     }
index 9b42d50dc3e464db41b4c5aaa480f616624d623b..2f143ae8b82d8e22720ba766e313023f831d4b21 100644 (file)
@@ -24,6 +24,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define TAPPING_TERM    200
 #endif
 
+//#define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, as long as there was no interruption
+
 /* tap count needed for toggling a feature */
 #ifndef TAPPING_TOGGLE
 #define TAPPING_TOGGLE  5
index 59edab9bd27f46016723e80650b68f22ce0e8e5d..9bfdf572a10f82b319bc44723df89dd4ae94ad80 100644 (file)
@@ -146,7 +146,7 @@ static const uint8_t keyboard_hid_report_desc_data[] = {
   0x95, KBD_REPORT_KEYS,          //   Report Count (),
   0x75, 0x08,                //   Report Size (8),
   0x15, 0x00,                //   Logical Minimum (0),
-  0x25, 0xFF,                //   Logical Maximum(255),
+  0x26, 0xFF, 0x00,          //   Logical Maximum(255),
   0x05, 0x07,                //   Usage Page (Key Codes),
   0x19, 0x00,                //   Usage Minimum (0),
   0x29, 0xFF,                //   Usage Maximum (255),