]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge https://github.com/jackhumbert/qmk_firmware
authorOlivier <olivier@gid0.org>
Sun, 17 Apr 2016 17:54:06 +0000 (19:54 +0200)
committerOlivier <olivier@gid0.org>
Sun, 17 Apr 2016 17:54:06 +0000 (19:54 +0200)
53 files changed:
README.md
keyboard/atomic/Makefile
keyboard/atomic/atomic.h
keyboard/atomic/backlight.c
keyboard/atomic/config.h
keyboard/atomic/keymaps/default.c
keyboard/atomic/keymaps/pvc/config.h [new file with mode: 0644]
keyboard/atomic/keymaps/pvc/keymap.c [new file with mode: 0644]
keyboard/atomic/keymaps/pvc/makefile.mk [new file with mode: 0644]
keyboard/ergodox_ez/keymaps/j3rn/keymap.c
keyboard/ergodox_ez/keymaps/j3rn/readme.md
keyboard/ergodox_ez/keymaps/ordinary/keymap.c
keyboard/ergodox_ez/keymaps/ordinary/ordinary-base.png
keyboard/ergodox_ez/keymaps/ordinary/ordinary-base.txt
keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.png
keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.txt
keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.png
keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.txt
keyboard/ergodox_ez/keymaps/ordinary/ordinary.hex
keyboard/ergodox_ez/keymaps/ordinary/readme.md
keyboard/planck/Makefile
keyboard/planck/config.h
keyboard/planck/keymaps/bone2planck.c [new file with mode: 0644]
keyboard/planck/keymaps/default/README.md
keyboard/planck/keymaps/default/keymap.c
keyboard/planck/keymaps/default/makefile.mk [new file with mode: 0644]
keyboard/planck/keymaps/pvc_planck.c [new file with mode: 0644]
keyboard/preonic/Makefile
keyboard/preonic/config.h
keyboard/preonic/keymaps/default/README.md
keyboard/preonic/keymaps/default/keymap.c
keyboard/preonic/keymaps/default/makefile.mk [new file with mode: 0644]
quantum/audio.c
quantum/audio.h
quantum/keymap_common.c
quantum/keymap_common.h
quantum/keymap_midi.h
quantum/musical_notes.h [new file with mode: 0644]
quantum/quantum.mk
quantum/tools/README.md [new file with mode: 0644]
quantum/tools/eeprom_reset.hex [new file with mode: 0644]
tmk_core/common.mk
tmk_core/common/action_code.h
tmk_core/common/action_layer.c
tmk_core/common/action_layer.h
tmk_core/common/avr/eeconfig.c
tmk_core/common/eeconfig.h
tmk_core/common/keyboard.c
tmk_core/common/keymap.c
tmk_core/common/keymap.h
tmk_core/common/magic.c [new file with mode: 0644]
tmk_core/common/magic.h [new file with mode: 0644]
tmk_core/protocol/lufa.mk

index ab7373023a02ef9922ff06671ff5ad7cf7ea219d..6e1ab9bc533bb98cf1383646fb77cce6009d7617 100644 (file)
--- a/README.md
+++ b/README.md
@@ -16,13 +16,21 @@ The documentation below explains QMK customizations and elaborates on some of th
 * If you're looking to customize a keyboard that currently runs QMK or TMK, find your keyboard's directory under `keyboard/` and run the make commands from there.
 * If you're looking to apply this firmware to an entirely new hardware project (a new kind of keyboard), you can create your own Quantum-based project by using `./new_project.sh <project_name>`, which will create `/keyboard/<project_name>` with all the necessary components for a Quantum project.
 
+### Makefile Options
+
 You have access to a bunch of goodies! Check out the Makefile to enable/disable some of the features. Uncomment the `#` to enable them. Setting them to `no` does nothing and will only confuse future you.
 
     BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
     MIDI_ENABLE = yes      # MIDI controls
-    # UNICODE_ENABLE = yes # Unicode support - this is commented out, just as an example. You have to use #, not //
+    UNICODE_ENABLE = no    # <-- This is how you disable an option, just set it to "no"
     BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
 
+### Customizing Makefile options on a per-keymap basis
+
+If your keymap directory has a file called `makefile.mk` (note the lowercase filename, and the `.mk` extension), any Makefile options you set in that file will take precedence over other Makefile options (those set for Quantum as a whole or for your particular keyboard).
+
+So let's say your keyboard's makefile has `CONSOLE_ENABLE = yes` (or maybe doesn't even list the `CONSOLE_ENABLE` option, which would cause it to revert to the global Quantum default). You want your particular keymap to not have the debug console, so you make a file called `makefile.mk` and specify `CONSOLE_ENABLE = no`.
+
 ## Quick aliases to common actions
 
 Your keymap can include shortcuts to common operations (called "function actions" in tmk).
@@ -199,6 +207,10 @@ This will clear all mods currently pressed.
 
 This will clear all keys besides the mods currently pressed.
 
+* `update_tri_layer(layer_1, layer_2, layer_3);`
+
+If the user attempts to activate layer 1 AND layer 2 at the same time (for example, by hitting their respective layer keys), layer 3 will be activated. Layers 1 and 2 will _also_ be activated, for the purposes of fallbacks (so a given key will fall back from 3 to 2, to 1 -- and only then to 0).
+
 #### Timer functionality
 
 It's possible to start timers and read values for time-specific events - here's an example:
@@ -292,7 +304,7 @@ For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring
 
 Please note that the underglow is not compatible with audio output. So you cannot enable both of them at the same time.
 
-Please add the following options into your config.h, and set them up according your hardware configuration.
+Please add the following options into your config.h, and set them up according your hardware configuration. These settings are for the F4 by default:
 
     #define ws2812_PORTREG  PORTF
     #define ws2812_DDRREG   DDRF
@@ -302,6 +314,12 @@ Please add the following options into your config.h, and set them up according y
     #define RGBLIGHT_SAT_STEP 17
     #define RGBLIGHT_VAL_STEP 17
 
+You'll need to edit `PORTF`, `DDRF`, and `PF4` on the first three lines to the port/pin you have your LED(s) wired to, eg for B3 change things to:
+
+    #define ws2812_PORTREG  PORTB
+    #define ws2812_DDRREG   DDRB
+    #define ws2812_pin PB3
+
 The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. For details, please check this keymap. `keyboard/planck/keymaps/yang/keymap.c`
 
 ### WS2812 Wiring
index da6d0ac60c241b7d6e87534af14e5918cc8f461d..3f066aebcdfa385ab24d312f94817d3ffb8b63d4 100644 (file)
@@ -27,7 +27,7 @@
 # make flip-ee = Download the eeprom file to the device, using Atmel FLIP
 #                (must have Atmel FLIP installed).
 #
-# make debug = Start either simulavr or avarice as specified for debugging, 
+# make debug = Start either simulavr or avarice as specified for debugging,
 #              with avr-gdb or avr-insight as the front end for debugging.
 #
 # make filename.s = Just compile filename.c into the assembler code only.
@@ -41,7 +41,6 @@
 # Target file name (without extension).
 TARGET = atomic
 
-
 # Directory common source filess exist
 TOP_DIR = ../..
 TMK_DIR = ../../tmk_core
@@ -50,15 +49,42 @@ TMK_DIR = ../../tmk_core
 TARGET_DIR = .
 
 # # project specific files
-SRC = atomic.c \
-       backlight.c 
+SRC = atomic.c
+
+ifdef keymap
+       KEYMAP = $(keymap)
+endif
 
 ifdef KEYMAP
-    SRC := keymaps/$(KEYMAP).c $(SRC)
+ifneq ("$(wildcard keymaps/$(KEYMAP).c)","")
+       KEYMAP_FILE = keymaps/$(KEYMAP).c
+else
+ifneq ("$(wildcard keymaps/$(KEYMAP)/keymap.c)","")
+       KEYMAP_FILE = keymaps/$(KEYMAP)/keymap.c
+ifneq ("$(wildcard keymaps/$(KEYMAP)/makefile.mk)","")
+       include keymaps/$(KEYMAP)/makefile.mk
+endif
+else
+$(error Keymap file does not exist)
+endif 
+endif
+
 else
-    SRC := keymaps/default.c $(SRC)
+
+ifneq ("$(wildcard keymaps/default.c)","")
+       KEYMAP_FILE = keymaps/default.c
+else
+       KEYMAP_FILE = keymaps/default/keymap.c
+endif
+
+ifneq ("$(wildcard keymaps/default/makefile.mk)","")
+       include keymaps/default/makefile.mk
 endif
 
+endif
+
+SRC := $(KEYMAP_FILE) $(SRC)
+
 CONFIG_H = config.h
 
 # MCU name
@@ -78,7 +104,6 @@ MCU = atmega32u4
 #     software delays.
 F_CPU = 16000000
 
-
 #
 # LUFA specific
 #
@@ -110,23 +135,45 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
 #   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
+#   change to "no" to disable the options, or define them in the makefile.mk in 
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE  = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE  = yes # Audio control and System control(+450)
+CONSOLE_ENABLE   = yes # Console for debug(+400)
+COMMAND_ENABLE   = yes # Commands for debug and configuration
+NKRO_ENABLE      = no  # 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.
+
 # 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
+SLEEP_LED_ENABLE = no  # Breathing sleep LED during USB suspend
+
+ifdef KEYMAP
+
+ifeq ("$(wildcard keymaps/$(KEYMAP).c)","")
+ifneq ("$(wildcard keymaps/$(KEYMAP)/makefile.mk)","")
+       include keymaps/$(KEYMAP)/makefile.mk
+endif 
+endif
 
+else
+
+ifneq ("$(wildcard keymaps/default/makefile.mk)","")
+       include keymaps/default/makefile.mk
+endif
+
+endif
+
+ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
+       SRC := backlight.c $(SRC)
+endif
 
 # Optimize size but this may cause error "relocation truncated to fit"
 #EXTRALDFLAGS = -Wl,--relax
@@ -136,5 +183,4 @@ VPATH += $(TARGET_DIR)
 VPATH += $(TOP_DIR)
 VPATH += $(TMK_DIR)
 
-include $(TOP_DIR)/quantum/quantum.mk
-
+include $(TOP_DIR)/quantum/quantum.mk
\ No newline at end of file
index d8574efa9397684f7543906d062beb0237cf7a75..d5461e424d4b56d13c0f84dd98900055b800c6ed 100644 (file)
@@ -26,5 +26,8 @@
 
 void matrix_init_user(void);
 void matrix_scan_user(void);
+void process_action_user(keyrecord_t *record);
+void led_set_user(uint8_t usb_led);
+void backlight_init_ports(void);
 
 #endif
\ No newline at end of file
index f69364b2afb619ea591cfc2577842c9e81b00b50..647b57e718544d1e0bc66209f0853ef5fe6c1c60 100644 (file)
@@ -1,6 +1,8 @@
 
 #include <avr/io.h>
 #include "backlight.h"
+#include "atomic.h"
+
 
 #define CHANNEL OCR1C
 
index 149aed4714989a6b7dc0b2f4010bf484b15d294b..1b34decf9c7b29007ab91e5d04bf5f8862201fb2 100644 (file)
@@ -32,36 +32,109 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define MATRIX_ROWS 5
 #define MATRIX_COLS 15
 
-// Planck PCB default pin-out
-// Change this to how you wired your keyboard
-// COLS: Left to right, ROWS: Top to bottom
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/ 
 #define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 }
 #define ROWS (int []){ D0, D5, B5, B6, C6 }
 
 /* COL2ROW or ROW2COL */
 #define DIODE_DIRECTION COL2ROW
 
-/* define if matrix has ghost */
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE    5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
 //#define MATRIX_HAS_GHOST
 
 /* number of backlight levels */
-/* NOTE: this is the max value of 0..BACKLIGHT_LEVELS so really 16 levels. */
 #define BACKLIGHT_LEVELS 3
 
-/* Set 0 if debouncing isn't needed */
-#define DEBOUNCE    5
-
 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
 #define LOCKING_SUPPORT_ENABLE
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
-/* key combination for command */
+/* 
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved 
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is 
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is 
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
 #define IS_COMMAND() ( \
     keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
 )
 
-
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1          H
+//#define MAGIC_KEY_HELP2          SLASH
+//#define MAGIC_KEY_DEBUG          D
+//#define MAGIC_KEY_DEBUG_MATRIX   X
+//#define MAGIC_KEY_DEBUG_KBD      K
+//#define MAGIC_KEY_DEBUG_MOUSE    M
+//#define MAGIC_KEY_VERSION        V
+//#define MAGIC_KEY_STATUS         S
+//#define MAGIC_KEY_CONSOLE        C
+//#define MAGIC_KEY_LAYER0_ALT1    ESC
+//#define MAGIC_KEY_LAYER0_ALT2    GRAVE
+//#define MAGIC_KEY_LAYER0         0
+//#define MAGIC_KEY_LAYER1         1
+//#define MAGIC_KEY_LAYER2         2
+//#define MAGIC_KEY_LAYER3         3
+//#define MAGIC_KEY_LAYER4         4
+//#define MAGIC_KEY_LAYER5         5
+//#define MAGIC_KEY_LAYER6         6
+//#define MAGIC_KEY_LAYER7         7
+//#define MAGIC_KEY_LAYER8         8
+//#define MAGIC_KEY_LAYER9         9
+#define MAGIC_KEY_BOOTLOADER       B
+//#define MAGIC_KEY_LOCK           CAPS
+//#define MAGIC_KEY_EEPROM         E
+//#define MAGIC_KEY_NKRO           N
+//#define MAGIC_KEY_SLEEP_LED      Z
 
 /*
  * Feature disable options
index f37d9d9a5177cb5a9336b6ec6d0b83de4a9905ca..0ede363a1f348d26c13b7e8dff1440fb19854c01 100644 (file)
 #include "atomic.h"
 
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define ___T___ KC_TRNS
+#define XXXXXXX KC_NO
+
+// Layer shorthand
+#define _QW 0
+#define _CM 1
+#define _DV 2
+#define _LW 3
+#define _RS 4
+#define _FN 5
+
+/* ROW 1 OPTIONS
+ * .--------------------------------------------------------------------------------------------------------------------------------------.
+ * |        |        |        |        |        |        |        |        |        |        |        |        |        |        |        |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ *                                                                                                                      .- 2u ------------.
+ *                                                                                                                      | KEY    . XXXXXX |
+ *                                                                                                                      '-----------------'
+ */
+/* ROW 2 OPTIONS
+ * .--------------------------------------------------------------------------------------------------------------------------------------.
+ * |        |        |        |        |        |        |        |        |        |        |        |        |        |        |        |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ * .- 2u ------------.                                                                                                  .- 2u ------------.
+ * | KEY    . XXXXXX |                                                                                                  | KEY    . XXXXXX |
+ * '-----------------'                                                                                                  '-----------------'
+ */
+/* ROW 3 OPTIONS
+ * .--------------------------------------------------------------------------------------------------------------------------------------.
+ * |        |        |        |        |        |        |        |        |        |        |        |        |        |        |        |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ * .- 2u ------------.                                                                                         .- 2u ------------.
+ * | KEY    . XXXXXX |                                                                                         |   X             |
+ * '-----------------'                                                                                         '-----------------'
+ *                                                                                                                      .- 2u ------------.
+ *                                                                                                                      |   X             |
+ *                                                                                                                      '-----------------'
+ */
+/* ROW 4 OPTIONS
+ * .--------------------------------------------------------------------------------------------------------------------------------------.
+ * |        |        |        |        |        |        |        |        |        |        |        |        |        |        |        |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ *                                                                                                    .- 2u ------------.
+ *                                                                                                    | KEY    . XXXXXX |
+ *                                                                                                    '-----------------'
+ * .- 2u ------------.                                                                                         .- 2u ------------.
+ * | KEY    . XXXXXX |                                                                                         | KEY    . XXXXXX |
+ * '-----------------'                                                                                         '-----------------'
+ *                                                                                                                      .- 2u ------------.
+ *                                                                                                                      | KEY    . XXXXXX |
+ *                                                                                                                      '-----------------'
+ */
+
+/* ROW 5 OPTIONS
+ * .--------------------------------------------------------------------------------------------------------------------------------------.
+ * |        |        |        |        |        |        |        |        |        |        |        |        |        |        |        |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ * .- 1.25u --+ 1.25u ------- 1.25u +--- 1.25u --- 2u -------------- 1.25u ---- 1.25u ------ 1.25u +---- 1.25u .
+ * |   X      | X        |        X |      X    |   X             |   X      | X        |        X |      X    |
+ * '-----------------------------------------------------------------------------------------------------------'
+ *                                                                .- 2u ------------.
+ *                                                                |   X             |
+ *                                                                '-----------------'
+ *                                  .--------------------- 6.25u ----------------------------.
+ *                                  |                        X                               |
+ *                                  '--------------------------------------------------------'
+ *                       .----------------------- 6.25u ---------------------------- 1.25u ---- 1.25u ---- 1.25u ------ 1.25u +-- 1.25u --.
+ *                       |                          X                             |     X    |   X      | X        |        X |      X    |
+ *                       '----------------------------------------------------------------------------------------------------------------'
+ */
+
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = { /* Qwerty */
-  { 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_DEL   },
-// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
-// │        │        │        │        │        │        │        │        │        │        │        │        │        │        │        │
-// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
-//                                                                                                                      ┌─ 2u ────────────┐
-//                                                                                                                      │   X             │
-//                                                                                                                      └─────────────────┘
+
+/* QWERTY - MIT ENHANCED / GRID COMPATIBLE
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * | `      | 1      | 2      | 3      | 4      | 5      | 6      | 7      | 8      | 9      | 0      | -      | =      | XXXXXX . BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB    | Q      | W      | E      | R      | T      | Y      | U      | I      | O      | P      | [      | ]      | \      | DEL    |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * | ESC    | A      | S      | D      | F      | G      | H      | J      | K      | L      | ;      | '      | XXXXXX . ENTER  | PG UP  |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * | LSHIFT | Z      | X      | C      | V      | B      | N      | M      | ,      | .      | /      | XXXXXX . RSHIFT | UP     | PG DN  |
+ * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * | BRITE  | LCTRL  | LALT   | LGUI   | RAISE  | XXXXXX . SPACE  | LOWER  | RGUI   | RALT   | RCTRL  | FN     | LEFT   | DOWN   | RIGHT  |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+       
+ [_QW] = { /* QWERTY */
+  { 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_BSPC  },
   { 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   },
-// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
-// │        │        │        │        │        │        │        │        │        │        │        │        │        │        │        │
-// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
-// ┌─ 2u ────────────┐                                                                                                  ┌─ 2u ────────────┐
-// │   X             │                                                                                                  │   X             │
-// └─────────────────┘                                                                                                  └─────────────────┘
   { 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_ENT,  KC_ENT,  KC_PGUP  },
-// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
-// │        │        │        │        │        │        │        │        │        │        │        │        │        │        │        │
-// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
-// ┌─ 2u ────────────┐                                                                                         ┌─ 2u ────────────┐
-// │   X             │                                                                                         │   X             │
-// └─────────────────┘                                                                                         └─────────────────┘
-//                                                                                                                      ┌─ 2u ────────────┐
-//                                                                                                                      │   X             │
-//                                                                                                                      └─────────────────┘
-  { KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM,  KC_DOT,  KC_SLSH, KC_RSFT, KC_RSFT, KC_UP,  KC_PGDN  },
-// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
-// │        │        │        │        │        │        │        │        │        │        │        │        │        │        │        │
-// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
-//                                                                                                    ┌─ 2u ────────────┐
-//                                                                                                    │   X             │
-//                                                                                                    └─────────────────┘
-// ┌─ 2u ────────────┐                                                                                         ┌─ 2u ────────────┐
-// │   X             │                                                                                         │   X             │
-// └─────────────────┘                                                                                         └─────────────────┘
-//                                                                                                                      ┌─ 2u ────────────┐
-//                                                                                                                      │   X             │
-//                                                                                                                      └─────────────────┘
-  { BL_STEP, KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI,  KC_SPC,  KC_SPC,  KC_RGUI, KC_RGUI,  KC_RALT, KC_RCTL, BL_STEP, KC_LEFT, KC_DOWN, KC_RGHT  },
-// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
-// │        │        │        │        │        │        │        │        │        │        │        │        │        │        │        │
-// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
-// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐
-// │   X      │ X        │        X │      X    │   X             │   X      │ X        │        X │      X    │
-// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘
-//                                                                ┌─ 2u ────────────┐
-//                                                                │   X             │
-//                                                                └─────────────────┘
-//                                  ┌───────────────────── 6.25u ────────────────────────────┐
-//                                  │                        X                               │
-//                                  └────────────────────────────────────────────────────────┘
-//                       ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐
-//                       │                          X                             │     X    │   X      │ X        │        X │      X    │
-//                       └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘
- }
+  { KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_RSFT, KC_RSFT, KC_UP,   KC_PGDN  },
+  { M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC,  KC_SPC,  MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT  },
+ },
+
+/* COLEMAK - MIT ENHANCED / GRID COMPATIBLE
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * | `      | 1      | 2      | 3      | 4      | 5      | 6      | 7      | 8      | 9      | 0      | -      | =      | XXXXXX . BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB    | Q      | W      | F      | P      | G      | J      | L      | U      | Y      | ;      | [      | ]      | \      | DEL    |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * | ESC    | A      | R      | S      | T      | D      | H      | N      | E      | I      | O      | '      | XXXXXX . ENTER  | PG UP  |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * | LSHIFT | Z      | X      | C      | V      | B      | K      | M      | ,      | .      | /      | XXXXXX . RSHIFT | UP     | PG DN  |
+ * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * | BRITE  | LCTRL  | LALT   | LGUI   | RAISE  | XXXXXX . SPACE  | LOWER  | RGUI   | RALT   | RCTRL  | FN     | LEFT   | DOWN   | RIGHT  |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+       
+ [_CM] = { /* COLEMAK */
+  { 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_BSPC  },
+  { KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL   },
+  { KC_ESC,  KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT, KC_ENT,  KC_ENT,  KC_PGUP  },
+  { KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_RSFT, KC_RSFT, KC_UP,   KC_PGDN  },
+  { M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC,  KC_SPC,  MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT  },
+ },
+       
+/* DVORAK - MIT ENHANCED / GRID COMPATIBLE
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * | `      | 1      | 2      | 3      | 4      | 5      | 6      | 7      | 8      | 9      | 0      | -      | =      | XXXXXX . BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB    | '      | ,      | .      | P      | Y      | F      | G      | C      | R      | L      | [      | ]      | \      | DEL    |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * | ESC    | A      | O      | E      | U      | I      | D      | H      | T      | N      | S      | /      | XXXXXX . ENTER  | PG UP  |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * | LSHIFT | ;      | Q      | J      | K      | X      | B      | M      | W      | V      | Z      | XXXXXX . RSHIFT | UP     | PG DN  |
+ * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * | BRITE  | LCTRL  | LALT   | LGUI   | RAISE  | XXXXXX . SPACE  | LOWER  | RGUI   | RALT   | RCTRL  | FN     | LEFT   | DOWN   | RIGHT  |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_DV] = { /* DVORAK */
+  { 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_BSPC  },
+  { KC_TAB,  KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,    KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL   },
+  { KC_ESC,  KC_A,    KC_O,    KC_E,    KC_U,    KC_I,    KC_D,    KC_H,    KC_T,    KC_N,    KC_S,    KC_SLSH, KC_ENT,  KC_ENT,  KC_PGUP  },
+  { KC_LSFT, KC_SCLN, KC_Q,    KC_J,    KC_K,    KC_X,    KC_B,    KC_M,    KC_W,    KC_V,    KC_Z,    KC_RSFT, KC_RSFT, KC_UP,   KC_PGDN  },
+  { M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC,  KC_SPC,  MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT  },
+ },
+
+/* LOWERED
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * |        | F1     | F2     | F3     | F4     | F5     | F6     | F7     | F8     | F9     | F10    | F11    | F12    | XXXXXX .        |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * |        | !      | @      | #      | $      | %      | ^      | &      | *      | (      | )      |        |        |        | INS    |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * |        | F1     | F2     | F3     | F4     | F5     | F6     | _      | +      | {      | }      | |      | XXXXXX .        |        |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * |        | F7     | F8     | F9     | F10    | F11    | F12    |        |        |        |        | XXXXXX .        |        |        |
+ * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * |        |        |        |        |        | XXXXXX .        |        |        |        |        |        |        |        |        |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+ [_LW] = { /* LOWERED */
+  { _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  ___T___, ___T___  },
+  { _______, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_INS   },
+  { _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, ___T___, ___T___, _______  },
+  { _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, _______, _______, _______, ___T___, ___T___, _______, _______  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______  },
+ },
+
+/* RAISED
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * |        | F1     | F2     | F3     | F4     | F5     | F6     | F7     | F8     | F9     | F10    | F11    | F12    | XXXXXX .        |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * |        | 1      | 2      | 3      | 4      | 5      | 6      | 7      | 8      | 9      | 0      |        |        |        | INS    |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * |        | F1     | F2     | F3     | F4     | F5     | F6     | -      | =      | [      | ]      | \      | XXXXXX .        |        |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * |        | F7     | F8     | F9     | F10    | F11    | F12    |        |        |        |        | XXXXXX .        |        |        |
+ * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * |        |        |        |        |        | XXXXXX .        |        |        |        |        |        |        |        |        |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+ [_RS] = { /* RAISED */
+  { _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  ___T___, ___T___  },
+  { _______, KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    _______, _______, _______, KC_INS   },
+  { _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___, _______  },
+  { _______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, _______, _______, _______, ___T___, ___T___, _______, _______  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______  },
+ },
+/* FUNCTION
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * | NUM LK | F1     | F2     | F3     | F4     | F5     | F6     | F7     | F8     | F9     | F10    | F11    | F12    | XXXXXX .        |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | SCR LK | F13    | F14    | F15    | F16    | F17    | F18    | F19    | F20    | F21    | F22    | F23    | F24    | PAUSE  | PR SCR |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT   | VOL+   | VOL-   | PLAY   |        | XXXXXX .        | WHEEL+ |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * |        |        | QWERTY | COLEMK | DVORAK |        |        |        |        |        |        | XXXXXX .        | MOUS U | WHEEL- |
+ * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * |        |        |        |        |        | XXXXXX . MS BT1 |        |        |        |        |        | MOUS L | MOUS D | MOUS R |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+ [_FN] = { /* FUNCTION */
+  { KC_NLCK, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  ___T___, ___T___  },
+  { KC_SLCK, KC_F13,  KC_F14,  KC_F15,  KC_F16,  KC_F17,  KC_F18,  KC_F19,  KC_F20,  KC_F21,  KC_F22,  KC_F23,  KC_F24,  KC_PAUS, KC_PSCR  },
+  { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U  },
+  { _______, _______, DF(_QW), DF(_CM), DF(_DV), _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D  },
+  { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R  },
+ },
 };
 
 const uint16_t PROGMEM fn_actions[] = {
-    [1] = ACTION_LAYER_MOMENTARY(2),  // to RAISE
-    [2] = ACTION_LAYER_MOMENTARY(3),  // to LOWER
-
-    [3] = ACTION_DEFAULT_LAYER_SET(0),
-    [4] = ACTION_DEFAULT_LAYER_SET(1),
 
 };
 
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) 
+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:
-        return MACRODOWN(TYPE(KC_T), END);
-      break;
-    } 
+      switch(id) {
+        case 0:
+          if (record->event.pressed) {
+            register_code(KC_RSFT);
+            #ifdef BACKLIGHT_ENABLE
+              backlight_step();
+            #endif
+          } else {
+            unregister_code(KC_RSFT);
+          }
+        break;
+      }
     return MACRO_NONE;
 };
diff --git a/keyboard/atomic/keymaps/pvc/config.h b/keyboard/atomic/keymaps/pvc/config.h
new file mode 100644 (file)
index 0000000..8449fa0
--- /dev/null
@@ -0,0 +1,157 @@
+/*
+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    Ortholinear Keyboards
+#define PRODUCT         The Atomic Keyboard
+#define DESCRIPTION     A compact ortholinear keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/ 
+#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 }
+#define ROWS (int []){ D0, D5, B5, B6, B3 }
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE    5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* 
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved 
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is 
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is 
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1          H
+//#define MAGIC_KEY_HELP2          SLASH
+//#define MAGIC_KEY_DEBUG          D
+//#define MAGIC_KEY_DEBUG_MATRIX   X
+//#define MAGIC_KEY_DEBUG_KBD      K
+//#define MAGIC_KEY_DEBUG_MOUSE    M
+//#define MAGIC_KEY_VERSION        V
+//#define MAGIC_KEY_STATUS         S
+//#define MAGIC_KEY_CONSOLE        C
+//#define MAGIC_KEY_LAYER0_ALT1    ESC
+//#define MAGIC_KEY_LAYER0_ALT2    GRAVE
+//#define MAGIC_KEY_LAYER0         0
+//#define MAGIC_KEY_LAYER1         1
+//#define MAGIC_KEY_LAYER2         2
+//#define MAGIC_KEY_LAYER3         3
+//#define MAGIC_KEY_LAYER4         4
+//#define MAGIC_KEY_LAYER5         5
+//#define MAGIC_KEY_LAYER6         6
+//#define MAGIC_KEY_LAYER7         7
+//#define MAGIC_KEY_LAYER8         8
+//#define MAGIC_KEY_LAYER9         9
+#define MAGIC_KEY_BOOTLOADER       B
+//#define MAGIC_KEY_LOCK           CAPS
+//#define MAGIC_KEY_EEPROM         E
+//#define MAGIC_KEY_NKRO           N
+//#define MAGIC_KEY_SLEEP_LED      Z
+
+/*
+ * Feature disable options
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboard/atomic/keymaps/pvc/keymap.c b/keyboard/atomic/keymaps/pvc/keymap.c
new file mode 100644 (file)
index 0000000..c2081f5
--- /dev/null
@@ -0,0 +1,309 @@
+#include "atomic.h"
+#include "action_layer.h"
+
+#ifdef AUDIO_ENABLE
+#include "audio.h"
+#include "musical_notes.h"
+#endif
+
+
+#define _QW 0
+#define _LW 1
+#define _RS 2
+#define _AD 3
+#define _FN 4
+
+#define M_QW 0
+#define M_LW 1
+#define M_RS 2
+#define M_FN 3
+
+
+#define _______ KC_TRNS
+#define ___T___ KC_TRNS
+#define XXXXXXX KC_NO
+
+/*
+ * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
+ * | ESC    | 1      | 2      | 3      | 4      | 5      | 6      | 7      | 8      | 9      | 0      | -      | =      | XXXXXX . BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB    | Q      | W      | E      | R      | T      | Y      | U      | I      | O      | P      | [      | ]      | \      | DEL    |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
+ * | CAPS   | A      | S      | D      | F      | G      | H      | J      | K      | L      | ;      | '      | XXXXXX . ENTER  | PG UP  |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
+ * | LSHIFT | Z      | X      | C      | V      | B      | N      | M      | ,      | .      | /      | XXXXXX . RSHIFT | UP     | PG DN  |
+ * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * | LCTRL  | LWIN   | FN     | LALT   | RAISED | XXXXXX . SPACE  | LOWER  | RALT   | HOME   | END    | RCTRL  | LEFT   | DOWN   | RIGHT  |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QW] = { /* QWERTY */
+  { KC_ESC,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_MINS, KC_EQL,  KC_BSPC, XXXXXXX  },
+  { 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_ENT,  XXXXXXX, 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_RSFT, XXXXXXX, KC_UP,   KC_PGDN  },
+  { KC_LCTL, KC_LGUI, M(M_FN), KC_LALT, M(M_RS), KC_SPC,  XXXXXXX, M(M_LW), KC_RALT, KC_HOME, KC_END,  KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT  },
+ },
+ [_LW] = { /* LOWERED */
+  { KC_GRV,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  ___T___, ___T___  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS   },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______  },
+ },
+ [_RS] = { /* RAISED */
+  { KC_TILD, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  ___T___, ___T___  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS   },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______  },
+ },
+ [_FN] = { /* FUNCTION */
+  { KC_NLCK, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  ___T___, ___T___  },
+  { KC_SLCK, KC_F13,  KC_F14,  KC_F15,  KC_F16,  KC_F17,  KC_F18,  KC_F19,  KC_F20,  KC_F21,  KC_F22,  KC_F23,  KC_F24,  KC_PAUS, KC_PSCR  },
+  { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D  },
+  { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R  },
+ },
+ [_AD] = { /* ADJUST */
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______  },
+  { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______  },
+ },
+};
+
+
+#ifdef AUDIO_ENABLE
+
+
+
+
+float tone_lw[][2] = {
+/*
+Q_NOTE(_C1   ) ,
+Q_NOTE(_CS1  ) ,
+Q_NOTE(_D1   ) ,
+Q_NOTE(_DS1  ) ,
+Q_NOTE(_E1   ) ,
+Q_NOTE(_F1   ) ,
+Q_NOTE(_FS1  ) ,
+Q_NOTE(_G1   ) ,
+Q_NOTE(_GS1  ) ,
+Q_NOTE(_A1   ) ,
+Q_NOTE(_AS1  ) ,
+Q_NOTE(_B1   ) ,
+*/
+
+Q_NOTE(_C4   ) ,
+Q_NOTE(_CS4  ) ,
+Q_NOTE(_D4   ) ,
+Q_NOTE(_DS4  ) ,
+Q_NOTE(_E4   ) ,
+Q_NOTE(_F4   ) ,
+Q_NOTE(_FS4  ) ,
+Q_NOTE(_G4   ) ,
+Q_NOTE(_GS4  ) ,
+Q_NOTE(_A4   ) ,
+Q_NOTE(_AS4  ) ,
+Q_NOTE(_B1   ) ,
+
+
+Q_NOTE(_C2   ) ,
+Q_NOTE(_CS2  ) ,
+Q_NOTE(_D2   ) ,
+Q_NOTE(_DS2  ) ,
+Q_NOTE(_E2   ) ,
+Q_NOTE(_F2   ) ,
+Q_NOTE(_FS2  ) ,
+Q_NOTE(_G2   ) ,
+Q_NOTE(_GS2  ) ,
+Q_NOTE(_A2   ) ,
+Q_NOTE(_AS2  ) ,
+Q_NOTE(_B2   ) ,
+Q_NOTE(_C3   ) ,
+Q_NOTE(_CS3  ) ,
+Q_NOTE(_D3   ) ,
+Q_NOTE(_DS3  ) ,
+Q_NOTE(_E3   ) ,
+Q_NOTE(_F3   ) ,
+Q_NOTE(_FS3  ) ,
+Q_NOTE(_G3   ) ,
+Q_NOTE(_GS3  ) ,
+Q_NOTE(_A3   ) ,
+Q_NOTE(_AS3  ) ,
+Q_NOTE(_B3   ) ,
+Q_NOTE(_C4   ) ,
+Q_NOTE(_CS4  ) ,
+Q_NOTE(_D4   ) ,
+Q_NOTE(_DS4  ) ,
+Q_NOTE(_E4   ) ,
+Q_NOTE(_F4   ) ,
+Q_NOTE(_FS4  ) ,
+Q_NOTE(_G4   ) ,
+Q_NOTE(_GS4  ) ,
+Q_NOTE(_A4   ) ,
+Q_NOTE(_AS4  ) ,
+Q_NOTE(_B4   ) ,
+Q_NOTE(_C5   ) ,
+Q_NOTE(_CS5  ) ,
+Q_NOTE(_D5   ) ,
+Q_NOTE(_DS5  ) ,
+Q_NOTE(_E5   ) ,
+Q_NOTE(_F5   ) ,
+Q_NOTE(_FS5  ) ,
+Q_NOTE(_G5   ) ,
+Q_NOTE(_GS5  ) ,
+Q_NOTE(_A5   ) ,
+Q_NOTE(_AS5  ) ,
+Q_NOTE(_B5   ) ,
+Q_NOTE(_C6   ) ,
+Q_NOTE(_CS6  ) ,
+Q_NOTE(_D6   ) ,
+Q_NOTE(_DS6  ) ,
+Q_NOTE(_E6   ) ,
+Q_NOTE(_F6   ) ,
+Q_NOTE(_FS6  ) ,
+Q_NOTE(_G6   ) ,
+Q_NOTE(_GS6  ) ,
+Q_NOTE(_A6   ) ,
+Q_NOTE(_AS6  ) ,
+Q_NOTE(_B6   ) ,
+Q_NOTE(_C7   ) ,
+Q_NOTE(_CS7  ) ,
+Q_NOTE(_D7   ) ,
+Q_NOTE(_DS7  ) ,
+Q_NOTE(_E7   ) ,
+Q_NOTE(_F7   ) ,
+Q_NOTE(_FS7  ) ,
+Q_NOTE(_G7   ) ,
+Q_NOTE(_GS7  ) ,
+Q_NOTE(_A7   ) ,
+Q_NOTE(_AS7  ) ,
+Q_NOTE(_B7   ) ,
+Q_NOTE(_C8   ) ,
+Q_NOTE(_CS8  ) ,
+Q_NOTE(_D8   ) ,
+Q_NOTE(_DS8  ) ,
+Q_NOTE(_E8   ) ,
+Q_NOTE(_F8   ) ,
+Q_NOTE(_FS8  ) ,
+Q_NOTE(_G8   ) ,
+Q_NOTE(_GS8  ) ,
+Q_NOTE(_A8   ) ,
+Q_NOTE(_AS8  ) ,
+Q_NOTE(_B8   ) ,
+
+};
+
+float tone_rs[][2] = {
+Q_NOTE(_A4   ) ,
+Q_NOTE(_A4   ) ,
+Q_NOTE(_A4   ) ,
+Q_NOTE(_A4   ) ,
+Q_NOTE(_AS8  ) ,
+Q_NOTE(_B8   ) ,
+};
+
+#endif
+
+void update_quad_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3, uint8_t layer4, bool order)
+{
+       if (order)
+       {
+               if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2))
+               {
+                       layer_on(layer3);
+               }
+               else
+               {
+                   layer_off(layer3);
+                   layer_off(layer4);
+               }
+       }
+       else
+       {
+               if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2))
+               {
+                       layer_on(layer4);
+               }
+               else
+               {
+                       layer_off(layer3);
+                   layer_off(layer4);
+               }
+       }
+}
+
+
+const uint16_t PROGMEM fn_actions[] = {
+};
+
+//#define MUSIC_ARRAY_SIZE(x) (((int)(sizeof(x) / (sizeof(x[0][0])))) / 2)
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+
+  // MACRODOWN only works in this function
+      switch(id) {
+        case M_LW:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              println("PlayNotes LW");
+              PLAY_NOTE_ARRAY(tone_lw, false, STACCATO);
+            #endif
+            layer_on(_LW);
+            update_tri_layer(_LW, _RS, _FN);
+          } else {
+            layer_off(_LW);
+            update_tri_layer(_LW, _RS, _FN);
+          }
+          break;
+        case M_RS:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              println("PlayNotes RS");
+              PLAY_NOTE_ARRAY(tone_rs, false, LEGATO);
+            #endif
+            layer_on(_RS);
+            update_tri_layer(_LW, _RS, _FN);
+          } else {
+            layer_off(_RS);
+            update_tri_layer(_LW, _RS, _FN);
+          }
+          break;
+               default:
+               break;
+      }
+    return MACRO_NONE;
+};
+
+#ifdef AUDIO_ENABLE
+float start_up[][2] = {
+Q_NOTE(_E4   ) ,
+Q_NOTE(_E4   ) ,
+Q_NOTE(_F4   ) ,
+Q_NOTE(_G4   ) ,
+Q_NOTE(_G4   ) ,
+Q_NOTE(_F4   ) ,
+Q_NOTE(_E4   ) ,
+Q_NOTE(_D4   ) ,
+Q_NOTE(_C4   ) ,
+Q_NOTE(_C4   ) ,
+Q_NOTE(_D4   ) ,
+Q_NOTE(_E4   ) ,
+H_NOTE(_E4   ) ,
+Q_NOTE(_D4   ) ,
+H_NOTE(_D4   ) ,
+};
+#endif
+
+void matrix_init_user(void) {
+  #ifdef AUDIO_ENABLE
+    init_notes();
+    PLAY_NOTE_ARRAY(start_up, false, STACCATO);
+    println("Matrix Init");
+  #endif
+}
diff --git a/keyboard/atomic/keymaps/pvc/makefile.mk b/keyboard/atomic/keymaps/pvc/makefile.mk
new file mode 100644 (file)
index 0000000..d469966
--- /dev/null
@@ -0,0 +1,17 @@
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE  = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE  = yes # Audio control and System control(+450)
+CONSOLE_ENABLE   = yes # Console for debug(+400)
+COMMAND_ENABLE   = yes # Commands for debug and configuration
+NKRO_ENABLE      = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no  # Enable keyboard backlight functionality
+MIDI_ENABLE      = no  # MIDI controls
+AUDIO_ENABLE     = yes # 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
+
+CONFIG_H = keymaps/$(KEYMAP)/config.h
\ No newline at end of file
index b5463cb72d82595ce4659f3e000131306c5e2d6e..6e271321d5c3360167dcb6d9450eb80d41671ece 100644 (file)
@@ -14,11 +14,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
  * | Tab    |   Q  |   W  |   E  |   R  |   T  |  -   |           |  =   |   Y  |   U  |   I  |   O  |   P  |   \    |
  * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * |Ctrl/Esc|   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |; / L2|   '    |
+ * |Ctrl/Esc|A / L2|   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |   ;  |   '    |
  * |--------+------+------+------+------+------| Hyper|           | Meh  |------+------+------+------+------+--------|
  * | LShift |Z/Ctrl|   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |//Ctrl| RShift |
  * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
- *   | ~L1  |  '"  |AltShf| Left | Right|                                       |  Up  | Down |   [  |   ]  | ~L1  |
+ *   | ~L1  | ~L2  |AltShf| Left | Right|                                       |  Up  | Down |   [  |   ]  | ~L1  |
  *   `----------------------------------'                                       `----------------------------------'
  *                                        ,-------------.       ,-------------.
  *                                        | App  | Home |       | PgUp |Ctrl/Esc|
@@ -34,9 +34,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
         // left hand
         KC_GRV,         KC_1,         KC_2,   KC_3,   KC_4,   KC_5,   KC_LBRC,
         KC_TAB,         KC_Q,         KC_W,   KC_E,   KC_R,   KC_T,   KC_MINS,
-        CTL_T(KC_ESC),  KC_A,         KC_S,   KC_D,   KC_F,   KC_G,
+        CTL_T(KC_ESC),  LT(MDIA, KC_A),KC_S,   KC_D,   KC_F,   KC_G,
         KC_LSFT,        CTL_T(KC_Z),  KC_X,   KC_C,   KC_V,   KC_B,   ALL_T(KC_NO),
-        KC_FN1,         KC_QUOT,      LALT(KC_LSFT),  KC_LEFT,KC_RGHT,
+        KC_FN1,         KC_FN2,       LALT(KC_LSFT),  KC_LEFT,KC_RGHT,
 
                                               ALT_T(KC_APP),  KC_HOME,
                                                               KC_END,
@@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
         // right hand
              KC_RBRC,     KC_6,   KC_7,   KC_8,   KC_9,   KC_0,             KC_BSPC,
              KC_EQL,      KC_Y,   KC_U,   KC_I,   KC_O,   KC_P,             KC_BSLS,
-                          KC_H,   KC_J,   KC_K,   KC_L,   LT(MDIA, KC_SCLN),KC_QUOT,
+                          KC_H,   KC_J,   KC_K,   KC_L,   KC_SCLN,          KC_QUOT,
              MEH_T(KC_NO),KC_N,   KC_M,   KC_COMM,KC_DOT, CTL_T(KC_SLSH),   KC_RSFT,
                                   KC_UP,  KC_DOWN,KC_LBRC,KC_RBRC,          KC_FN1,
 
@@ -99,13 +99,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * ,--------------------------------------------------.           ,--------------------------------------------------.
  * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
  * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
- * |        |      |      | MsUp |      |      |      |           |      |      |      |      |      |      |        |
+ * |        |      |      |      |      |      |      |           |      |      |      | Lclk | Rclk |      |        |
  * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * |        |      |MsLeft|MsDown|MsRght|      |------|           |------|      |      |      |      |      |  Play  |
+ * |        |      |      |      |      |      |------|           |------|MsLeft|MsDown| MsUp |MsRght|      |  Play  |
  * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
  * |        |      |      |      |      |      |      |           |      |      |      | Prev | Next |      |        |
  * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
- *   |      |      |      | Lclk | Rclk |                                       |VolUp |VolDn | Mute |      |      |
+ *   |      |      |      |      |      |                                       |VolUp |VolDn | Mute |      |      |
  *   `----------------------------------'                                       `----------------------------------'
  *                                        ,-------------.       ,-------------.
  *                                        |      |      |       |      |      |
@@ -116,19 +116,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  *                                 `--------------------'       `--------------------'
  */
 // MEDIA AND MOUSE
-KEYMAP(
+[MDIA] = KEYMAP(
        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-       KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
-       KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-       KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
                                            KC_TRNS, KC_TRNS,
                                                     KC_TRNS,
                                   KC_TRNS, KC_TRNS, KC_TRNS,
     // right hand
        KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-       KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
-                 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
+       KC_TRNS,  KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS,
+                 KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_TRNS, KC_MPLY,
        KC_TRNS,  KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
                           KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
        KC_TRNS, KC_TRNS,
@@ -138,7 +138,8 @@ KEYMAP(
 };
 
 const uint16_t PROGMEM fn_actions[] = {
-    [1] = ACTION_LAYER_TAP_TOGGLE(SYMB)                // FN1 - Momentary Layer 1 (Symbols)
+    [1] = ACTION_LAYER_TAP_TOGGLE(SYMB),               // FN1 - Momentary Layer 1 (Symbols)
+    [2] = ACTION_LAYER_TAP_TOGGLE(MDIA)                // FN2 - Momentary Layer 2 (Media)
 };
 
 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
index b0c4d267bdbf405437db2736e78c628a58f1b64e..fc4b640426652c48b51b95c541cf637b0efbf917 100644 (file)
@@ -1,10 +1,10 @@
-# J3RN's Mac-centric Ergodox EZ keymap
+# J3RN's Mac-centric ErgoDox EZ keymap
 
 ## Motivation
 
-Essentially, I wanted to switch to a layout that was less jarring than the default Ergodox EZ layout, and did not require finger gymnastics to perform common OS X shortcuts (most of which involve the CMD (LGui) key).
+Essentially, I wanted to switch to a layout that was less jarring than the default ErgoDox EZ layout, and did not require finger gymnastics to perform common OS X shortcuts (most of which involve the CMD (LGui) key).
 
-## How is it different from the default Ergodox EZ layout?
+## How is it different from the default ErgoDox EZ layout?
 
 This layout more closely resembles that of the Mac keyboard, and has some other goodness baked in. Here is a rundown of what that means:
 
@@ -18,6 +18,7 @@ This layout more closely resembles that of the Mac keyboard, and has some other
 ### Other changes
 
 - **The button to the left of "A" is Ctrl/Esc instead of Backspace.** This is actually how I have the keyboard on my Macbook set up to be, since it's loads more convenient than a  CAPS LOCK key. This is the Ctrl key I find myself using most.
+- **Mouse uses Vim-style navigation**. To activate "Media mode," hold the 'a' key. This allows you to move the mouse around with hjkl just like in Vim. Additionally, right and left click are the conveniently placed 'i' and 'o' keys.
 - **The key to the right of "5" and the key to left of "6" are "[" and "]", respectively, instead of Left and Right.** There is a more convenient set of Left and Right already present. Truth be told, I don't really use these keys, as they are a stretch to reach.
 - **The Toggle L1 keys have been replaced by the otherwise displaced "-" and "=".** They are laid out, left-to-right, in the same order as on the Mac keyboard. Honestly, they are not terribly conveniently placed, and their placement might change in a later version. I found that I did not toggle L1 frequently at all, and found using the momentary keys to access L1 to fit my workflow better.
 - **The "~"/L1 key in the bottom-left is now just momentary L1.** The "~" key was moved to the top-left as mentioned before, and I like to keep my multi-use keys to a minimum due to the latency for them to switch from "press" to "hold."
index 4dd6d883ca8ff59718995088bae258a772937276..3a999f2665bed69279be8c6b80ee45d866c39486 100644 (file)
 #include "ergodox_ez.h"
+#include "led.h"
 #include "debug.h"
 #include "action_layer.h"
 
-#define BASE 0 // default layer
-#define SYMB 1 // symbols
-#define MDIA 2 // media keys
+#define BASE 0    // default layer
+#define LOCK 1    // layer lock keys
+#define SYMB_MO 2 // symbols momentary layer
+#define SYMB_TG 3 // symbols lock layer
+#define SYMB_XX 4 // symbols exit layer
+#define MDIA_MO 5 // media momentary layer
+#define MDIA_TG 6 // media lock layer
+#define MDIA_XX 7 // media exit layer
+#define UNLOCK 8  // clear to base layer
 
 /*
- * Ordinary Ergodox EZ keyboard layout, v2
+ * Ordinary Ergodox EZ keyboard layout, v3
  * modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com
  * Details: http://nicholas.rinard.us/2016/03/ergodox-ez-layout.html
  */
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
 /* Keymap 0: Basic layer
  *
- * ,--------------------------------------------------.           ,--------------------------------------------------.
- * |  Grv   |   1  |   2  |   3  |   4  |   5  | ESC  |           |  -   |   6  |   7  |   8  |   9  |   0  |   =    |
- * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
- * | Tab    |   Q  |   W  |   E  |   R  |   T  |   [  |           |  ]   |   Y  |   U  |   I  |   O  |   P  | MDIA \ |
- * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * | SYMB   |   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |  ;   | SYMB ' |
- * |--------+------+------+------+------+------|Shift |           | Tab  |------+------+------+------+------+--------|
- * | LShift |   Z  |   X  |   C  |   V  |   B  | -Tab |           |      |   N  |   M  |   ,  |   .  |  /   | RShift |
- * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
- *   |LCtrl | Meh  |Hyper | LAlt | LGui |                                       | RGui | RAlt | Hyper|  Meh |RCtrl |
- *   `----------------------------------'                                       `----------------------------------'
- *                                      ,---------------.       ,---------------.
- *                                      | Home   | End  |       | Left | Right  |
- *                               ,------|--------|------|       |------+--------+------.
- *                               |      |        | PgUp |       |  Up  |        |      |
- *                               |Backsp|   Del  |------|       |------| Enter  | Space|
- *                               |      |        | PgDn |       | Down |        |      |;
- *                               `----------------------'       `----------------------'
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * | LOCK  Grv |   1  |   2  |   3  |   4  |   5  | ESC  |           |  -   |   6  |   7  |   8  |   9  |   0  | =    LOCK |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * | Media Tab |   Q  |   W  |   E  |   R  |   T  |   [  |           |  ]   |   Y  |   U  |   I  |   O  |   P  | \   Media |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * | Symbol    |   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |  ;   | '  Symbol |
+ * |-----------+------+------+------+------+------|Shift |           | Tab  |------+------+------+------+------+-----------|
+ * | LShift    |   Z  |   X  |   C  |   V  |   B  | -Tab |           |      |   N  |   M  |   ,  |   .  |  /   |    RShift |
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *      |LCtrl | Meh  |Hyper | LAlt | LGui |                                       | RGui | RAlt | Hyper|  Meh |RCtrl |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         | Home | End  |           | Left | Right|
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      | PgUp |           |  Up  |      |      |
+ *                                  |Backsp| Del  |------|           |------| Enter| Space|
+ *                                  |      |      | PgDn |           | Down |      |      |
+ *                                  `--------------------'           `--------------------'
  */
-// If it accepts an argument (i.e, is a function), it doesn't need KC_.
-// Otherwise, it needs KC_*
-[BASE] = KEYMAP(  // layer 0 : default
-   // left hand
-   KC_GRV,   KC_1,        KC_2,  KC_3, KC_4,   KC_5, KC_ESC,
-   KC_TAB,   KC_Q,        KC_W,  KC_E, KC_R,   KC_T, KC_LBRC,
-   MO(SYMB), KC_A,        KC_S,  KC_D, KC_F,   KC_G,
-   KC_LSFT,  CTL_T(KC_Z), KC_X,  KC_C, KC_V,   KC_B, LSFT(KC_TAB),
-   KC_LCTL,  MEH_T(KC_NO),ALL_T(KC_NO),KC_LALT,KC_LGUI,
-                                          KC_HOME, KC_END,
-                                                   KC_PGUP,
-                                 KC_BSPC, KC_DEL,  KC_PGDN,
+[BASE] = KEYMAP(
+// left hand
+ LT(LOCK, KC_GRV),KC_1        ,KC_2        ,KC_3   ,KC_4   ,KC_5   ,KC_ESC
+,LT(MDIA_MO, KC_TAB),KC_Q     ,KC_W        ,KC_E   ,KC_R   ,KC_T   ,KC_LBRC
+,MO(SYMB_MO)     ,KC_A        ,KC_S        ,KC_D   ,KC_F   ,KC_G
+,KC_LSFT         ,KC_Z        ,KC_X        ,KC_C   ,KC_V   ,KC_B   ,LSFT(KC_TAB)
+,KC_LCTL         ,MEH_T(KC_NO),ALL_T(KC_NO),KC_LALT,KC_LGUI
+
+                                                           ,KC_HOME,KC_END
+                                                                   ,KC_PGUP
+                                                   ,KC_BSPC,KC_DEL ,KC_PGDN
 
                                                                 // right hand
-                                                                KC_MINS, KC_6, KC_7,    KC_8,    KC_9,        KC_0,          KC_EQL,
-                                                                KC_RBRC, KC_Y, KC_U,    KC_I,    KC_O,        KC_P,          LT(MDIA, KC_BSLS),
-                                                                         KC_H, KC_J,    KC_K,    KC_L,        KC_SCLN,       LT(SYMB, KC_QUOT),
-                                                                KC_TAB,  KC_N, KC_M,    KC_COMM, KC_DOT,      CTL_T(KC_SLSH),KC_RSFT,
-                                                                               KC_RGUI, KC_RALT, ALL_T(KC_NO),MEH_T(KC_NO),  KC_RCTL,
-                                                                KC_LEFT, KC_RGHT,
-                                                                KC_UP,
-                                                                KC_DOWN, KC_ENT, KC_SPC
+                                                               ,KC_MINS ,KC_6   ,KC_7   ,KC_8   ,KC_9        ,KC_0        ,LT(LOCK, KC_EQL)
+                                                               ,KC_RBRC ,KC_Y   ,KC_U   ,KC_I   ,KC_O        ,KC_P        ,LT(MDIA_MO, KC_BSLS)
+                                                                        ,KC_H   ,KC_J   ,KC_K   ,KC_L        ,KC_SCLN     ,LT(SYMB_MO, KC_QUOT)
+                                                               ,KC_TAB  ,KC_N   ,KC_M   ,KC_COMM,KC_DOT      ,KC_SLSH     ,KC_RSFT
+                                                                                ,KC_RGUI,KC_RALT,ALL_T(KC_NO),MEH_T(KC_NO),KC_RCTL
+
+                                                               ,KC_LEFT ,KC_RGHT
+                                                               ,KC_UP
+                                                               ,KC_DOWN ,KC_ENT ,KC_SPC
     ),
-/* Keymap 1: Symbol Layer
+
+/* Keymap 1: Layer Lock Keys
  *
- * ,--------------------------------------------------.           ,--------------------------------------------------.
- * |  Esc   |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 |   F11  |
- * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
- * |  MDIA  |   !  |   @  |   {  |   }  |   &  |  <   |           |  >   |   |  |   7  |   8  |   9  |   /  |   F12  |
- * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * |        |   #  |   $  |   (  |   )  |   `  |------|           |------|   /  |   4  |   5  |   6  |   *  |        |
- * |--------+------+------+------+------+------| Tab  |           | Shift|------+------+------+------+------+--------|
- * |        |   %  |   ^  |   [  |   ]  |   ~  |      |           |  -Tab|   \  |   1  |   2  |   3  |   -  |  CAPS  |
- * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
- *   |      |      |      |      |      |                                       |   0  |    . |   =  |   +  |      |
- *   `----------------------------------'                                       `----------------------------------'
- *                                        ,-------------.       ,-------------.
- *                                        | Left | Right|       | Home | End  |
- *                                 ,------|------|------|       |------+------+------.
- *                                 |      |      |  Up  |       | PgUp |      |      |
- *                                 |Space |Enter |------|       |------|BackSp| Del  |
- *                                 |      |      | Down |       | PgDn |      |      |
- *                                 `--------------------'       `--------------------'
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * |           |  Esc |      |      |      |      |      |           |      |      |      |      |      |      |           |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * | Media LOCK|      |      |      |      |      |      |           |      |      |      |      |      |      | Media LOCK|
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |Symbol LOCK|      |      |      |      |      |------|           |------|      |      |      |      |      |Symbol LOCK|
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |  Caps LOCK|      |      |      |      |      |      |           |      |      |      |      |      |      |  Caps LOCK|
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *      |      |      |      |      |      |                                       |      |      |      |      |      |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         |      |      |           |      |      |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      |      |           |      |      |      |
+ *                                  |      |      |------|           |------|      |      |
+ *                                  |      |      |      |           |      |      |      |
+ *                                  `--------------------'           `--------------------'
  */
-// SYMBOLS
-[SYMB] = KEYMAP(
-       // left hand
-       KC_ESC,           KC_F1,  KC_F2,  KC_F3,  KC_F4,  KC_F5,  KC_TRNS,
-       MO(MDIA),         KC_EXLM,KC_AT,  KC_LCBR,KC_RCBR,KC_AMPR,LSFT(KC_COMM),
-       KC_TRNS,          KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
-       KC_TRNS,          KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TAB,
-       KC_TRNS,          KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
-                                                         KC_LEFT,KC_RGHT,
-                                                                 KC_UP,
-                                                   KC_SPC,KC_ENT,KC_DOWN,
-                                                                     // right hand
-                                                                     KC_TRNS,      KC_F6,   KC_F7,  KC_F8,   KC_F9,   KC_F10,  KC_F11,
-                                                                     LSFT(KC_DOT), KC_PIPE, KC_P7,  KC_P8,   KC_P9,   KC_PSLS, KC_F12,
-                                                                                   KC_SLSH, KC_P4,  KC_P5,   KC_P6,   KC_PAST, KC_TRNS,
-                                                                     LSFT(KC_TAB), KC_BSLS, KC_P1,  KC_P2,   KC_P3,   KC_PMNS, KC_CAPS,
-                                                                                            KC_P0,  KC_DOT,  KC_PEQL, KC_PPLS, KC_PENT,
-                                                                     KC_HOME,      KC_END,
-                                                                     KC_PGUP,
-                                                                     KC_PGDN,      KC_BSPC, KC_DEL
+[LOCK] = KEYMAP(
+// left hand
+ KC_TRNS      ,KC_ESC    ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+,KC_FN3       ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+,KC_FN2       ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS
+,KC_CAPS      ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+,KC_TRNS      ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS
+
+                                                        ,KC_TRNS  ,KC_TRNS
+                                                                  ,KC_TRNS
+                                                ,KC_TRNS,KC_TRNS  ,KC_TRNS
+
+                                                                // right hand
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_TRNS
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_FN3
+                                                                        ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_FN2
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_CAPS
+                                                                                  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_TRNS
+
+                                                               ,KC_TRNS ,KC_TRNS
+                                                               ,KC_TRNS
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+    ),
+
+/* Keymap 2: Symbol Momentary Layer
+ *
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * |           |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 |           |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * | Media     |   !  |   @  |   {  |   }  |   &  |  <   |           |  >   |   |  |   7  |   8  |   9  |   /  | Media     |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * | Symbol    |   #  |   $  |   (  |   )  |   `  |------|           |------|   /  |   4  |   5  |   6  |   *  | Symbol    |
+ * |-----------+------+------+------+------+------| Tab  |           | Shift|------+------+------+------+------+-----------|
+ * | Shift     |   %  |   ^  |   [  |   ]  |   ~  |      |           |  -Tab|   \  |   1  |   2  |   3  |   -  | Shift     |
+ * `-----------+------+------+------+------+-------------'           `------------+------+------+------+------+------------'
+ *      |      |      |      |      |      |                                       |   0  |    . |   =  |   +  | Entr |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         | Left | Right|           | Home | End  |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      |  Up  |           | PgUp |      |      |
+ *                                  |Space |Enter |------|           |------|BackSp| Del  |
+ *                                  |      |      | Down |           | PgDn |      |      |
+ *                                  `--------------------'           `--------------------'
+ */
+[SYMB_MO] = KEYMAP(
+// left hand
+ KC_FN2        ,KC_F1   ,KC_F2   ,KC_F3   ,KC_F4   ,KC_F5   ,KC_TRNS
+,MO(MDIA_MO)   ,KC_EXLM ,KC_AT   ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM)
+,MO(SYMB_MO)   ,KC_HASH ,KC_DLR  ,KC_LPRN ,KC_RPRN ,KC_GRV 
+,KC_LSFT       ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB
+,KC_TRNS       ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+                                                   ,KC_LEFT ,KC_RGHT
+                                                            ,KC_UP
+                                          ,KC_SPC  ,KC_ENT  ,KC_DOWN
+                                                                    // right hand
+                                                                    ,KC_TRNS     ,KC_F6   ,KC_F7 ,KC_F8  ,KC_F9 ,KC_F10  ,KC_FN2
+                                                                    ,LSFT(KC_DOT),KC_PIPE ,KC_7  ,KC_8   ,KC_9  ,KC_SLSH ,MO(MDIA_MO)
+                                                                                 ,KC_SLSH ,KC_4  ,KC_5   ,KC_6  ,KC_ASTR ,MO(SYMB_MO)
+                                                                    ,LSFT(KC_TAB),KC_BSLS ,KC_1  ,KC_2   ,KC_3  ,KC_MINS ,KC_RSFT
+                                                                                          ,KC_0  ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT
+                                                                    ,KC_HOME     ,KC_END
+                                                                    ,KC_PGUP
+                                                                    ,KC_PGDN     ,KC_BSPC ,KC_DEL
 ),
-/* Keymap 2: Media and mouse keys
+
+/* Keymap 3: Symbol Lock Layer
+ *
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * | Lock      |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 | Lock      |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * | Media     |   !  |   @  |   {  |   }  |   &  |  <   |           |  >   |   |  |   7  |   8  |   9  |   /  | Media     |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |   #  |   $  |   (  |   )  |   `  |------|           |------|   /  |   4  |   5  |   6  |   *  |           |
+ * |-----------+------+------+------+------+------| Tab  |           | Shift|------+------+------+------+------+-----------|
+ * | Shift     |   %  |   ^  |   [  |   ]  |   ~  |      |           |  -Tab|   \  |   1  |   2  |   3  |   -  | Shift     |
+ * `-----------+------+------+------+------+-------------'           `------------+------+------+------+------+------------'
+ *      |      |      |      |      |      |                                       |   0  |    . |   =  |   +  | Entr |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         | Left | Right|           | Home | End  |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      |  Up  |           | PgUp |      |      |
+ *                                  |Space |Enter |------|           |------|BackSp| Del  |
+ *                                  |      |      | Down |           | PgDn |      |      |
+ *                                  `--------------------'           `--------------------'
+ */
+[SYMB_TG] = KEYMAP(  // layer 3 : return key for symbol lock layer
+// left hand
+ MO(SYMB_XX)  ,KC_F1   ,KC_F2   ,KC_F3   ,KC_F4   ,KC_F5   ,KC_TRNS
+,MO(MDIA_MO)  ,KC_EXLM ,KC_AT   ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM)
+,MO(UNLOCK)   ,KC_HASH ,KC_DLR  ,KC_LPRN ,KC_RPRN ,KC_GRV
+,KC_LSFT      ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB
+,KC_TRNS      ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+                                                  ,KC_LEFT ,KC_RGHT
+                                                           ,KC_UP
+                                         ,KC_SPC  ,KC_ENT  ,KC_DOWN
+                                                                    // right hand
+                                                                    ,KC_TRNS     ,KC_F6   ,KC_F7 ,KC_F8  ,KC_F9 ,KC_F10  ,MO(SYMB_XX)
+                                                                    ,LSFT(KC_DOT),KC_PIPE ,KC_7  ,KC_8   ,KC_9  ,KC_SLSH ,MO(MDIA_MO)
+                                                                                 ,KC_SLSH ,KC_4  ,KC_5   ,KC_6  ,KC_ASTR ,MO(UNLOCK)
+                                                                    ,LSFT(KC_TAB),KC_BSLS ,KC_1  ,KC_2   ,KC_3  ,KC_MINS ,KC_RSFT
+                                                                                          ,KC_0  ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT
+                                                                    ,KC_HOME     ,KC_END
+                                                                    ,KC_PGUP
+                                                                    ,KC_PGDN     ,KC_BSPC ,KC_DEL
+    ),
+
+/* Keymap 4: Symbol Unlock Layer
  *
- * ,--------------------------------------------------.           ,--------------------------------------------------.
- * |  Esc   |ShutDn| Sleep| Mute |Vol Dn|Vol Up|      |           |      |      |PrtSc | PgUp |MyComp| Mail |        |
- * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
- * |        |      |      | MsUp |ScrlUp|      |ScrlUp|           |ScrlUp|      |ScrlUp|  Up  |      |      |        |
- * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * |        |      |MsLeft|MsDown|MsRght|      |------|           |------| Home | Left | Down | Right| End  |        |
- * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
- * |        |      |      |MsDown|ScrlDn|      |ScrlDn|           |ScrlDn|      |ScrlDn| Down |      |      |        |
- * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
- *   |      |      |      | Lclk | Rclk |                                       |      | PgDn |      |      |      |
- *   `----------------------------------'                                       `----------------------------------'
- *                                        ,-------------.       ,-------------.
- *                                        | Stop |Refrsh|       | Prev | Next |
- *                                 ,------|------|------|       |------+------+------.
- *                                 |Brwser|Brwser|Search|       |VolUp |      |      |
- *                                 |Back  | Fwd  |------|       |------| Stop | Play-|
- *                                 |      |      | Home |       |VolDn |      | Pause|
- *                                 `--------------------'       `--------------------'
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * |           | Esc  |      |      |      |      |      |           |      |      |      |      |      |      |           |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * | Unlock    |      |      |      |      |      |      |           |      |      |      |      |      |      |  Unlock   |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |      |      |      |      |      |------|           |------|      |      |      |      |      |           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * | Caps LOCK |      |      |      |      |      |      |           |      |      |      |      |      |      | Caps LOCK |
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *      |      |      |      |      |      |                                       |      |      |      |      |      |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         |      |      |           |      |      |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      |      |           |      |      |      |
+ *                                  |      |      |------|           |------|      |      |
+ *                                  |      |      |      |           |      |      |      |
+ *                                  `--------------------'           `--------------------'
  */
-// MEDIA AND MOUSE
-[MDIA] = KEYMAP(
-       KC_ESC,  KC_PWR,  KC_SLEP, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS,
-       MO(MDIA), KC_TRNS, KC_TRNS, KC_MS_U, KC_WH_U, KC_TRNS, KC_WH_U,
-       KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
-       KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_D, KC_TRNS, KC_TRNS, KC_WH_D,
-       KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_WH_D,
-                                                    KC_WSTP, KC_WREF,
-                                                             KC_WSCH,
-                                           KC_WBAK, KC_TRNS, KC_WHOM,
+[SYMB_XX] = KEYMAP(
+// left hand
+ KC_TRNS      ,KC_ESC    ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+,TG(MDIA_TG)  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+,KC_FN1       ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS
+,KC_CAPS      ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+,KC_TRNS      ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS
+                                                       ,KC_TRNS  ,KC_TRNS
+                                                                 ,KC_TRNS
+                                               ,KC_TRNS,KC_TRNS  ,KC_TRNS
+                                                                                       // right hand
+                                                                          ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_TRNS
+                                                                          ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,TG(MDIA_TG)
+                                                                                   ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_FN1
+                                                                          ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_CAPS
+                                                                          ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS
+                                                                          ,KC_TRNS ,KC_TRNS
+                                                                          ,KC_TRNS
+                                                                          ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+       ),
+
+/* Keymap 5: Media Momentary Layer
+ *
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * |           | F11  | F12  | F13  | F14  | F15  |      |           |      | F16  | F17  | F18  | F19  | F20  |           |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * |           |ShutDn|      | MsUp |      |      |ScrlUp|           |ScrlUp|PrtScr| Home |  Up  | PgUp | Mail |           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           | Sleep|MsLeft|MsDown|MsRght|      |------|           |------|NumLok| Left | Down | Right|MyComp|           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |      |      |MsDown|      |      |ScrlDn|           |ScrlDn|      | End  | Down | PgDn |      |           |
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *      | Mute |Vol Dn|Vol Up| Lclk | Rclk |                                       |Insert|Delete|      |      |      |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         | Stop |Refrsh|           | Prev | Next |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |Brwser|Brwser|Search|           |VolUp |      |      |
+ *                                  |Back  | Fwd  |------|           |------| Stop | Play-|
+ *                                  |      |      | Home |           |VolDn |      | Pause|
+ *                                  `--------------------'           `--------------------'
+ */
+[MDIA_MO] = KEYMAP(
+// left hand
+ KC_FN3        ,KC_F11  ,KC_F12  ,KC_F13  ,KC_F14  ,KC_F15  ,KC_TRNS
+,MO(MDIA_MO)   ,KC_POWER,KC_TRNS ,KC_MS_U ,KC_TRNS ,KC_TRNS ,KC_WH_U
+,MO(SYMB_MO)   ,KC_SLEP ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_TRNS
+,KC_LSFT       ,KC_TRNS ,KC_TRNS ,KC_MS_D ,KC_TRNS ,KC_TRNS ,KC_WH_D
+,KC_MUTE       ,KC_VOLD ,KC_VOLU ,KC_BTN1 ,KC_BTN2
+                                                   ,KC_WSTP ,KC_WREF
+                                                            ,KC_WSCH
+                                          ,KC_WBAK ,KC_TRNS ,KC_WHOM
                                                                      // right hand
-                                                                     KC_TRNS,  KC_TRNS, KC_PSCR, KC_PGUP, KC_MYCM, KC_MAIL, KC_TRNS,
-                                                                     KC_WH_U,  KC_TRNS, KC_WH_U, KC_UP,   KC_TRNS, KC_TRNS, KC_TRNS,
-                                                                               KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT,KC_END, KC_TRNS,
-                                                                     KC_WH_D,  KC_TRNS, KC_WH_D, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS,
-                                                                                        KC_TRNS, KC_PGDN, KC_TRNS,KC_TRNS, KC_TRNS,
-                                                                     KC_MPRV, KC_MNXT,
-                                                                     KC_VOLU,
-                                                                     KC_VOLD, KC_MSTP, KC_MPLY
+                                                                     ,KC_TRNS  ,KC_F16  ,KC_F17 ,KC_F18  ,KC_F19  ,KC_F20  ,KC_FN3
+                                                                     ,KC_WH_U  ,KC_PSCR ,KC_HOME,KC_UP   ,KC_PGUP ,KC_MAIL ,MO(MDIA_MO)
+                                                                               ,KC_NLCK ,KC_LEFT,KC_DOWN ,KC_RIGHT,KC_MYCM ,MO(SYMB_MO)
+                                                                     ,KC_WH_D  ,KC_TRNS ,KC_END ,KC_DOWN ,KC_PGDN ,KC_TRNS ,KC_RSFT
+                                                                                        ,KC_INS ,KC_DEL  ,KC_TRNS ,KC_TRNS ,KC_TRNS
+                                                                     ,KC_MPRV  ,KC_MNXT
+                                                                     ,KC_VOLU
+                                                                     ,KC_VOLD  ,KC_MSTP ,KC_MPLY
 ),
+
+/* Keymap 6: Media Lock Layer
+ *
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * |           | F11  | F12  | F13  | F14  | F15  |      |           |      | F16  | F17  | F18  | F19  | F20  |           |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * |           |ShutDn|      | MsUp |      |      |ScrlUp|           |ScrlUp|PrtScr| Home |  Up  | PgUp | Mail |           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           | Sleep|MsLeft|MsDown|MsRght|      |------|           |------|NumLok| Left | Down | Right|MyComp|           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |      |      |MsDown|      |      |ScrlDn|           |ScrlDn|      | End  | Down | PgDn |      |           |
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *      | Mute |Vol Dn|Vol Up| Lclk | Rclk |                                       |Insert|Delete|      |      |      |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         | Stop |Refrsh|           | Prev | Next |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |Brwser|Brwser|Search|           |VolUp |      |      |
+ *                                  |Back  | Fwd  |------|           |------| Stop | Play-|
+ *                                  |      |      | Home |           |VolDn |      | Pause|
+ *                                  `--------------------'           `--------------------'
+ */
+[MDIA_TG] = KEYMAP(
+// left hand
+ MO(MDIA_XX)  ,KC_F11  ,KC_F12  ,KC_F13  ,KC_F14  ,KC_F15  ,KC_TRNS
+,MO(UNLOCK)   ,KC_POWER,KC_TRNS ,KC_MS_U ,KC_TRNS ,KC_TRNS ,KC_WH_U
+,KC_NO        ,KC_SLEP ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_TRNS
+,KC_LSFT      ,KC_TRNS ,KC_TRNS ,KC_MS_D ,KC_TRNS ,KC_TRNS ,KC_WH_D
+,KC_MUTE      ,KC_VOLD ,KC_VOLU ,KC_BTN1 ,KC_BTN2
+                                                    ,KC_WSTP ,KC_WREF
+                                                             ,KC_WSCH
+                                           ,KC_WBAK ,KC_TRNS ,KC_WHOM
+                                                                     // right hand
+                                                                     ,KC_TRNS  ,KC_F16  ,KC_F17 ,KC_F18  ,KC_F19  ,KC_F20  ,MO(MDIA_XX)
+                                                                     ,KC_WH_U  ,KC_PSCR ,KC_HOME,KC_UP   ,KC_PGUP ,KC_MAIL ,MO(UNLOCK)
+                                                                               ,KC_NLCK ,KC_LEFT,KC_DOWN ,KC_RIGHT,KC_MYCM ,KC_NO
+                                                                     ,KC_WH_D  ,KC_TRNS ,KC_END ,KC_DOWN ,KC_PGDN ,KC_TRNS ,KC_RSFT
+                                                                                        ,KC_INS ,KC_DEL  ,KC_TRNS ,KC_TRNS ,KC_TRNS
+                                                                     ,KC_MPRV  ,KC_MNXT
+                                                                     ,KC_VOLU
+                                                                     ,KC_VOLD  ,KC_MSTP ,KC_MPLY
+    ),
+
+/* Keymap 7: Media Unlock Layer
+ *
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * |           | Esc  |      |      |      |      |      |           |      |      |      |      |      |      |           |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * | Unlock    |      |      |      |      |      |      |           |      |      |      |      |      |      | Unlock    |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |      |      |      |      |      |------|           |------|      |      |      |      |      |           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * | Caps LOCK |      |      |      |      |      |      |           |      |      |      |      |      |      | Caps LOCK |
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *      |      |      |      |      |      |                                       |      |      |      |      |      |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         |      |      |           |      |      |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      |      |           |      |      |      |
+ *                                  |      |      |------|           |------|      |      |
+ *                                  |      |      |      |           |      |      |      |
+ *                                  `--------------------'           `--------------------'
+ */
+[MDIA_XX] = KEYMAP(
+// left hand
+ KC_TRNS      ,KC_ESC    ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+,KC_FN1       ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+,KC_TRNS      ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS
+,KC_CAPS      ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+,KC_TRNS      ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS
+
+                                                        ,KC_TRNS  ,KC_TRNS
+                                                                  ,KC_TRNS
+                                                ,KC_TRNS,KC_TRNS  ,KC_TRNS
+
+                                                                // right hand
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_TRNS
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_FN1
+                                                                        ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_TRNS
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_CAPS
+                                                                                  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_TRNS
+
+                                                               ,KC_TRNS ,KC_TRNS
+                                                               ,KC_TRNS
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+    ),
+
+/* Keymap 8: Unlock Layer
+ *
+ * ,-----------------------------------------------------.           ,-----------------------------------------------------.
+ * | Unlock    |      |      |      |      |      |      |           |      |      |      |      |      |      | Unlock    |
+ * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
+ * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |      |      |      |      |      |------|           |------|      |      |      |      |      |           |
+ * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
+ * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
+ * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
+ *      |      |      |      |      |      |                                       |      |      |      |      |      |
+ *      `----------------------------------'                                       `----------------------------------'
+ *                                         ,-------------.           ,-------------.
+ *                                         |      |      |           |      |      |
+ *                                  ,------|------|------|           |------+------+------.
+ *                                  |      |      |      |           |      |      |      |
+ *                                  |      |      |------|           |------|      |      |
+ *                                  |      |      |      |           |      |      |      |
+ *                                  `--------------------'           `--------------------'
+ */
+[UNLOCK] = KEYMAP(
+// left hand
+ KC_FN1       ,KC_ESC    ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+,KC_TRNS       ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+,KC_TRNS      ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS
+,KC_TRNS      ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+,KC_TRNS      ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS
+
+                                                        ,KC_TRNS  ,KC_TRNS
+                                                                  ,KC_TRNS
+                                                ,KC_TRNS,KC_TRNS  ,KC_TRNS
+
+                                                                // right hand
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_FN1
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_TRNS
+                                                                        ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_TRNS
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_TRNS
+                                                                                  ,KC_TRNS   ,KC_TRNS   ,KC_TRNS   ,KC_TRNS  ,KC_TRNS
+
+                                                               ,KC_TRNS ,KC_TRNS
+                                                               ,KC_TRNS
+                                                               ,KC_TRNS ,KC_TRNS  ,KC_TRNS
+    )
 };
 
 const uint16_t PROGMEM fn_actions[] = {
-    [1] = ACTION_LAYER_TAP_TOGGLE(SYMB)                // FN1 - Momentary Layer 1 (Symbols)
+         [1] = ACTION_LAYER_CLEAR(ON_PRESS)                // FN1 - clear to base layer
+       ,[2] = ACTION_LAYER_INVERT(SYMB_TG, ON_PRESS)      // FN2 - toggle to Symbols on press
+       ,[3] = ACTION_LAYER_INVERT(MDIA_TG, ON_PRESS)      // FN3 - toggle to Media on press
 };
 
 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
@@ -168,25 +440,31 @@ void matrix_init_user(void) {
 
 // Runs constantly in the background, in a loop.
 void matrix_scan_user(void) {
+       uint8_t layer = biton32(layer_state);
 
-    uint8_t layer = biton32(layer_state);
+    // do not change lights for locking and unlocking
+    if(layer == UNLOCK || layer == LOCK || layer == SYMB_XX || layer == MDIA_XX) {
+        return;
+    }
 
     ergodox_board_led_off();
     ergodox_right_led_1_off();
     ergodox_right_led_2_off();
     ergodox_right_led_3_off();
-    switch (layer) {
-      // TODO: Make this relevant to the ErgoDox EZ.
-        case 1:
-            ergodox_right_led_1_on();
-            break;
-        case 2:
-            ergodox_right_led_2_on();
-            break;
-        default:
-            // none
-            break;
+
+    // caps lock turns on red light
+    if(host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
+        ergodox_right_led_1_on();
     }
 
+    // symbol lock turns on green light
+    if(layer == SYMB_MO || layer == SYMB_TG) {
+        ergodox_right_led_2_on();
+    }
+
+    // media lock turns on blue light
+    if(layer == MDIA_MO || layer == MDIA_TG) {
+        ergodox_right_led_3_on();
+    }
 };
 
index d5d00f2403b8d7c51f476ddb4e426a25ddc7af18..69af8df4e1db1a1b6ebc95ca8c15367500c60557 100644 (file)
Binary files a/keyboard/ergodox_ez/keymaps/ordinary/ordinary-base.png and b/keyboard/ergodox_ez/keymaps/ordinary/ordinary-base.png differ
index 046b75786a4cd509039edf32f164f9278bc1e5b6..04792f2dfc535607e039db85dc24c933de995ff4 100644 (file)
@@ -1,24 +1,24 @@
 [{x:3.5},"#\n3",{x:10.5},"*\n8"],
 [{y:-0.875,x:2.5},"@\n2",{x:1},"$\n4",{x:8.5},"&\n7",{x:1},"(\n9"],
 [{y:-0.875,x:5.5},"%\n5",{c:"#ff4444"},"Esc",{x:4.5,c:"#cccccc"},"_\n\n\n\n\n\n-","^\n6"],
-[{y:-0.875,c:"#73ab6a",w:1.5},"~\n\n\n\n\n\n`",{c:"#cccccc"},"!\n1",{x:14.5},")\n0",{w:1.5},"+\n\n\n\n\n\n="],
-[{y:-0.375,x:3.5},"E",{x:10.5},"I"],
+[{y:-0.875,c:"#2277ff",w:1.5},"Shift\n\n~\n\n\n\nLock\n`",{c:"#cccccc"},"!\n1",{x:14.5},")\n0",{c:"#2277ff",w:1.5},"+\n\nShift\n\n\n\n=\nLock"],
+[{y:-0.375,x:3.5,c:"#cccccc"},"E",{x:10.5},"I"],
 [{y:-0.875,x:2.5},"W",{x:1},"R",{x:8.5},"U",{x:1},"O"],
 [{y:-0.875,x:5.5},"T",{h:1.5},"{\n\n\n\n\n\n[",{x:4.5,h:1.5},"}\n\n\n\n\n\n]","Y"],
-[{y:-0.875,c:"#73ab6a",w:1.5},"Tab",{c:"#cccccc"},"Q",{x:14.5},"P",{c:"#2277ff",fa:[0,0,0,1],w:1.5},"|\n\\\nMedia\nL2"],
+[{y:-0.875,c:"#2277ff",w:1.5},"Media\n\nTab\n\n\n\nShift",{c:"#cccccc"},"Q",{x:14.5},"P",{c:"#2277ff",w:1.5},"|\n\\\nMedia\n\n\n\n\nShift"],
 [{y:-0.375,x:3.5,c:"#cccccc"},"D",{x:10.5},"K"],
 [{y:-0.875,x:2.5},"S",{x:1},"F",{x:8.5},"J",{x:1},"L"],
 [{y:-0.875,x:5.5},"G",{x:6.5},"H"],
-[{y:-0.875,c:"#2277ff",w:1.5},"Symbols\n\n\nL1",{c:"#cccccc"},"A",{x:14.5},":\n;",{c:"#2277ff",w:1.5},"\"\n'\nSymbols\nL1"],
-[{y:-0.625,x:6.5,c:"#bfbf67",h:1.5},"< Tab\n\n\nShift Tab",{x:4.5,h:1.5},"Tab >\n\n\nTab"],
+[{y:-0.875,c:"#2277ff",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#cccccc"},"A",{x:14.5},":\n;",{c:"#2277ff",w:1.5},"\"\n'\nSymbols\n\n\n\n\nShift"],
+[{y:-0.625,x:6.5,c:"#54d6de",fa:[0,0,0,1],h:1.5},"< Tab\n\n\nShift Tab",{x:4.5,h:1.5},"Tab >\n\n\nTab"],
 [{y:-0.75,x:3.5,c:"#cccccc"},"C",{x:10.5},"<\n,"],
 [{y:-0.875,x:2.5},"X",{x:1},"V",{x:8.5},"M",{x:1},">\n."],
 [{y:-0.875,x:5.5},"B",{x:6.5},"N"],
-[{y:-0.875,c:"#2277ff",w:1.5},"Capitals\n\n\nShift",{c:"#cccccc"},"Z",{x:14.5},"?\n/",{c:"#2277ff",w:1.5},"\n\nCapitals\nShift"],
+[{y:-0.875,c:"#2277ff",fa:[0,1,0,1,0,0,0],w:1.5},"Capitals\nShift\n\n\n\n\nShift",{c:"#cccccc"},"Z",{x:14.5,f:3},"?\n/",{c:"#2277ff",w:1.5},"\n\nCapitals\nShift\n\n\n\nShift"],
 [{y:-0.375,x:3.5,c:"#77aaff"},"Option\n\n\nLAlt",{x:10.5},"Option\n\n\nRAlt"],
 [{y:-0.875,x:2.5},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5},"Cmd\n\n\nSuper",{x:1},"Hyper"],
 [{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Ctrl\n\n\nRCtrl"],
-[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#bfbf67"},"Home","End"],
+[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#54d6de"},"Home","End"],
 [{h:2},"< Del\n\n\nBackspace",{h:2},"Del >\n\n\nDelete","Page\n\n\n\n\n\nUp"],
 [{x:2},"Page\n\n\n\n\n\nDown"],
 [{r:-30,rx:13,y:-1,x:-3},"Left","Right"],
index 89d15e45069a0237c023e77315068b932b33fe5f..9c0e8bba39b372c7e68299cb06c8dfa5e00906ce 100644 (file)
Binary files a/keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.png and b/keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.png differ
index 4237f082018e742ed9cf73d60dcd63052be0ea96..c7bd272eca44f6253066943dde4600834f87f546 100644 (file)
@@ -1,27 +1,27 @@
-[{x:3.5,c:"#9988bb"},"Vol\n\n\n\n\n\nMute",{x:10.5,c:"#ccffff"},"Page\n\n\n\n\n\nUp"],
-[{y:-0.875,x:2.5,c:"#9988bb"},"Sleep",{x:1},"Vol\n\n\n\n\n\nDown",{x:8.5},"Print\n\n\n\n\n\nScreen",{x:1},"Home\n\n\n\n\n\nDir"],
-[{y:-0.875,x:5.5},"Vol\n\n\n\n\n\nUp",{c:"#ff4444"},"Esc",{x:4.5,c:"#cccccc",a:7},"",""],
-[{y:-0.875,c:"#ff4444",a:4,w:1.5},"Esc",{c:"#9988bb"},"Shut\n\n\n\n\n\nDown",{x:14.5},"Email",{c:"#cccccc",a:7,w:1.5},""],
-[{y:-0.375,x:3.5,c:"#ccffff",a:4},"Mouse\n\n\n\n\n\nUp",{x:10.5},"Cursor\n\n\n\n\n\nUp"],
-[{y:-0.875,x:2.5,c:"#cccccc",a:7},"",{x:1,c:"#99ffff",a:4},"Scroll\n\n\n\n\n\nUp",{x:8.5},"Scroll\n\n\n\n\n\nUp",{x:1,c:"#cccccc",a:7},""],
-[{y:-0.875,x:5.5},"",{c:"#99ffff",a:4,h:1.5},"Scroll\n\n\n\n\n\nUp",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nUp",{c:"#cccccc",a:7},""],
-[{y:-0.875,c:"#000000",t:"#ff0000",a:4,fa:[0,0,0,1],w:1.5},"Media\n\n\nL2",{c:"#cccccc",t:"#000000",a:7},"",{x:14.5},"",{c:"#000000",t:"#ff0000",a:4,w:1.5},"\n\nMedia\nL2"],
-[{y:-0.375,x:3.5,c:"#ccffff",t:"#000000"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
+[{x:3.5,c:"#99de2a"},"F13",{x:10.5},"F18"],
+[{y:-0.875,x:2.5},"F12",{x:1},"F14",{x:8.5},"F17",{x:1},"F19"],
+[{y:-0.875,x:5.5},"F15",{c:"#ff4444"},"Esc",{x:4.5,c:"#cccccc",a:7},"",{c:"#99de2a",a:4},"F16"],
+[{y:-0.875,c:"#2277ff",w:1.5},"Shift\n\n\n\n\n\nLock",{c:"#99de2a"},"F11",{x:14.5},"F20",{c:"#2277ff",w:1.5},"\n\nShift\n\n\n\n\nLock"],
+[{y:-0.375,x:3.5,c:"#ff8500"},"Mouse\n\n\n\n\n\nUp",{x:10.5},"Cursor\n\n\n\n\n\nUp"],
+[{y:-0.875,x:2.5,c:"#cccccc",a:7},"",{x:1,c:"#ffb063",a:4},"Scroll\n\n\n\n\n\nUp",{x:8.5},"Home",{x:1},"Page\n\n\n\n\n\nUp"],
+[{y:-0.875,x:5.5,c:"#cccccc",a:7},"",{c:"#ffb063",a:4,h:1.5},"Scroll\n\n\n\n\n\nUp",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nUp",{c:"#e6e067"},"Print\n\n\n\n\n\nScreen"],
+[{y:-0.875,c:"#000000",t:"#ff0000",w:1.5},"Media\n\n\n\n\n\nShift",{c:"#e6e067",t:"#000000"},"Shut\n\n\n\n\n\nDown",{x:14.5},"Mail",{c:"#000000",t:"#ff0000",w:1.5},"\n\nMedia\n\n\n\n\nShift"],
+[{y:-0.375,x:3.5,c:"#ff8500",t:"#000000"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
 [{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nLeft",{x:1},"Mouse\n\n\n\n\n\nRight",{x:8.5},"Cursor\n\n\n\n\n\nLeft",{x:1},"Cursor\n\n\n\n\n\nRight"],
-[{y:-0.875,x:5.5,c:"#cccccc",a:7},"",{x:6.5,c:"#ccffff",a:4},"Home"],
-[{y:-0.875,c:"#000000",t:"#ff0000",w:1.5},"Symbols\n\n\nL1",{c:"#cccccc",t:"#000000",a:7},"",{x:14.5,c:"#ccffff",a:4},"End",{c:"#cccccc",a:7,w:1.5},""],
-[{y:-0.625,x:6.5,c:"#99ffff",a:4,h:1.5},"Scroll\n\n\n\n\n\nDown",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nDown"],
-[{y:-0.75,x:3.5,c:"#ccffff"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
-[{y:-0.875,x:2.5,c:"#cccccc",a:7},"",{x:1,c:"#99ffff",a:4},"Scroll\n\n\n\n\n\nDown",{x:8.5},"Scroll\n\n\n\n\n\nDown",{x:1,c:"#cccccc",a:7},""],
-[{y:-0.875,x:5.5},"",{x:6.5},""],
-[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""],
-[{y:-0.375,x:3.5,c:"#ccffff",a:4},"Left\n\n\n\n\n\nClick",{x:10.5},"Page\n\n\n\n\n\nDown"],
-[{y:-0.875,x:2.5,c:"#cccccc",a:7},"",{x:1,c:"#ccffff",a:4},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#cccccc",a:7},"",{x:1},""],
-[{y:-0.75,x:0.5},"","",{x:14.5},"",""],
-[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#bbaacc",a:4},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"],
+[{y:-0.875,x:5.5,c:"#cccccc",a:7},"",{x:6.5,c:"#e6e067",a:4},"Num\n\n\n\n\n\nLock"],
+[{y:-0.875,c:"#cccccc",a:7,w:1.5},"",{c:"#e6e067",a:4},"Sleep",{x:14.5},"My\n\n\n\n\n\nComp",{c:"#cccccc",a:7,w:1.5},""],
+[{y:-0.625,x:6.5,c:"#ffb063",a:4,h:1.5},"Scroll\n\n\n\n\n\nDown",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nDown"],
+[{y:-0.75,x:3.5,c:"#ff8500"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
+[{y:-0.875,x:2.5,c:"#cccccc",a:7},"",{x:1,c:"#ffb063",a:4},"Scroll\n\n\n\n\n\nDown",{x:8.5},"End",{x:1},"Page\n\n\n\n\n\nDown"],
+[{y:-0.875,x:5.5,c:"#cccccc",a:7},"",{x:6.5},""],
+[{y:-0.875,c:"#2277ff",a:4,fa:[0,1,0,0,0,0,0],w:1.5},"Capitals\nShift\n\n\n\n\nShift",{c:"#cccccc",a:7},"",{x:14.5},"",{c:"#2277ff",a:4,fa:[0,1,0,1],w:1.5},"\n\nCapitals\nShift\n\n\n\nShift"],
+[{y:-0.375,x:3.5,c:"#ff8500"},"Left\n\n\n\n\n\nClick",{x:10.5,c:"#ffb063"},"Delete"],
+[{y:-0.875,x:2.5,c:"#e6e067"},"Vol\n\n\n\n\n\nUp",{x:1,c:"#ff8500"},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#ffb063"},"Insert",{x:1,c:"#cccccc",a:7},""],
+[{y:-0.75,x:0.5,c:"#e6e067",a:4},"Mute","Vol\n\n\n\n\n\nDown",{x:14.5,c:"#cccccc",a:7},"",""],
+[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#cfc82b",a:4},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"],
 [{h:2},"< Web\n\n\nBrowser",{h:2},"Web >\n\n\nBrowser","Search\n\n\nBrowser"],
 [{x:2},"Home\n\n\nBrowser"],
 [{r:-30,rx:13,y:-1,x:-3},"Prev\n\n\nAudio\n\n\nTrack","Next\n\n\nAudio\n\n\nTrack"],
-[{x:-3,c:"#9988bb"},"Vol\n\n\n\n\n\nUp",{c:"#bbaacc",h:2},"Stop\n\n\nAudio",{h:2},"Play\n\n\nAudio\n\n\nPause"],
-[{x:-3,c:"#9988bb"},"Vol\n\n\n\n\n\nDown"]
+[{x:-3,c:"#e6e067"},"Vol\n\n\n\n\n\nUp",{c:"#cfc82b",h:2},"Stop\n\n\nAudio",{h:2},"Play\n\n\nAudio\n\n\nPause"],
+[{x:-3,c:"#e6e067"},"Vol\n\n\n\n\n\nDown"]
 
index 7522af3330a21dba81e3bdad2f7f868b2b294680..2538fbeb30874542445ee8fe73c0be7108c5e240 100644 (file)
Binary files a/keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.png and b/keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.png differ
index dda15f71be4808b54961d182d4e05b9d7dfaf180..098a08d2f1b7bd985fb3b8b86fd983b68fac087e 100644 (file)
@@ -1,24 +1,24 @@
-[{x:3.5,c:"#a3a3a3"},"F3",{x:10.5},"F8"],
+[{x:3.5,c:"#99de2a"},"F3",{x:10.5},"F8"],
 [{y:-0.875,x:2.5},"F2",{x:1},"F4",{x:8.5},"F7",{x:1},"F9"],
-[{y:-0.875,x:5.5},"F5",{c:"#ff4444"},"Esc",{x:4.5,c:"#cccccc",a:7},"",{c:"#a3a3a3",a:4},"F6"],
-[{y:-0.875,c:"#ff4444",w:1.5},"Esc",{c:"#a3a3a3"},"F1",{x:14.5},"F10",{w:1.5},"F11"],
-[{y:-0.375,x:3.5,c:"#bbc6ed"},"{",{x:10.5,c:"#bed4ba"},"8"],
-[{y:-0.875,x:2.5,c:"#bbc6ed"},"@",{x:1},"}",{x:8.5,c:"#bed4ba"},"7",{x:1},"9"],
-[{y:-0.875,x:5.5,c:"#bbc6ed"},"&",{h:1.5},"<",{x:4.5,h:1.5},">","|"],
-[{y:-0.875,c:"#2277ff",fa:[0,0,0,1],w:1.5},"Media\n\n\nL2",{c:"#bbc6ed"},"!",{x:14.5,c:"#bed4ba"},"/",{c:"#a3a3a3",w:1.5},"F12"],
-[{y:-0.375,x:3.5,c:"#bbc6ed"},"(",{x:10.5,c:"#bed4ba"},"5"],
-[{y:-0.875,x:2.5,c:"#bbc6ed"},"$",{x:1},")",{x:8.5,c:"#bed4ba"},"4",{x:1},"6"],
-[{y:-0.875,x:5.5,c:"#bbc6ed"},"`",{x:6.5},"/"],
-[{y:-0.875,c:"#000000",t:"#ff0000",w:1.5},"Symbols\n\n\nL1",{c:"#bbc6ed",t:"#000000"},"#",{x:14.5,c:"#bed4ba"},"*",{c:"#000000",t:"#ff0000",w:1.5},"\n\nSymbols\nL1"],
-[{y:-0.625,x:6.5,c:"#bfbf67",t:"#000000",h:1.5},"Tab >\n\n\nTab",{x:4.5,h:1.5},"< Tab\n\n\nShift Tab"],
-[{y:-0.75,x:3.5,c:"#bbc6ed"},"[",{x:10.5,c:"#bed4ba"},"2"],
-[{y:-0.875,x:2.5,c:"#bbc6ed"},"^",{x:1},"]",{x:8.5,c:"#bed4ba"},"1",{x:1},"3"],
-[{y:-0.875,x:5.5,c:"#bbc6ed"},"~",{x:6.5},"\\"],
-[{y:-0.875,c:"#cccccc",a:7,w:1.5},"",{c:"#bbc6ed",a:4},"%",{x:14.5,c:"#bed4ba"},"-",{c:"#2277ff",w:1.5},"\n\nCaps Lock"],
-[{y:-0.375,x:3.5,c:"#cccccc",a:7},"",{x:10.5,c:"#bed4ba",a:4},"."],
-[{y:-0.875,x:2.5,c:"#cccccc",a:7},"",{x:1},"",{x:8.5,c:"#bed4ba",a:4},"0",{x:1},"="],
-[{y:-0.75,x:0.5,c:"#cccccc",a:7},"","",{x:14.5,c:"#bed4ba",a:4},"+","Enter"],
-[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#bfbf67"},"Left","Right"],
+[{y:-0.875,x:5.5},"F5",{c:"#ff4444"},"Esc",{x:4.5,c:"#cccccc",a:7},"",{c:"#99de2a",a:4},"F6"],
+[{y:-0.875,c:"#2277ff",w:1.5},"Shift\n\n\n\n\n\nLock",{c:"#99de2a"},"F1",{x:14.5},"F10",{c:"#2277ff",w:1.5},"\n\nShift\n\n\n\n\nLock"],
+[{y:-0.375,x:3.5,c:"#c4e0bf"},"{",{x:10.5,c:"#89b087"},"8"],
+[{y:-0.875,x:2.5,c:"#c4e0bf"},"@",{x:1},"}",{x:8.5,c:"#89b087"},"7",{x:1},"9"],
+[{y:-0.875,x:5.5,c:"#c4e0bf"},"&",{h:1.5},"<",{x:4.5,h:1.5},">","|"],
+[{y:-0.875,c:"#2277ff",w:1.5},"Media\n\n\n\n\n\nShift",{c:"#c4e0bf"},"!",{x:14.5,c:"#89b087"},"/",{c:"#2277ff",w:1.5},"\n\nMedia\n\n\n\n\nShift"],
+[{y:-0.375,x:3.5,c:"#c4e0bf"},"(",{x:10.5,c:"#89b087"},"5"],
+[{y:-0.875,x:2.5,c:"#c4e0bf"},"$",{x:1},")",{x:8.5,c:"#89b087"},"4",{x:1},"6"],
+[{y:-0.875,x:5.5,c:"#c4e0bf"},"`",{x:6.5},"/"],
+[{y:-0.875,c:"#000000",t:"#ff0000",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#c4e0bf",t:"#000000"},"#",{x:14.5,c:"#89b087"},"*",{c:"#000000",t:"#ff0000",w:1.5},"\n\nSymbols\n\n\n\n\nShift"],
+[{y:-0.625,x:6.5,c:"#54d6de",t:"#000000",fa:[0,0,0,1],h:1.5},"Tab >\n\n\nTab",{x:4.5,h:1.5},"< Tab\n\n\nShift Tab"],
+[{y:-0.75,x:3.5,c:"#c4e0bf"},"[",{x:10.5,c:"#89b087"},"2"],
+[{y:-0.875,x:2.5,c:"#c4e0bf"},"^",{x:1},"]",{x:8.5,c:"#89b087"},"1",{x:1},"3"],
+[{y:-0.875,x:5.5,c:"#c4e0bf"},"~",{x:6.5},"\\"],
+[{y:-0.875,c:"#2277ff",f2:1,w:1.5},"Capitals\nShift\n\n\n\n\nShift",{c:"#c4e0bf"},"%",{x:14.5,c:"#89b087"},"-",{c:"#2277ff",fa:[0,1,0,1],w:1.5},"\n\nCapitals\nShift\n\n\n\nShift"],
+[{y:-0.375,x:3.5,c:"#cccccc",a:7},"",{x:10.5,c:"#89b087",a:4},"."],
+[{y:-0.875,x:2.5,c:"#cccccc",a:7},"",{x:1},"",{x:8.5,c:"#89b087",a:4},"0",{x:1},"="],
+[{y:-0.75,x:0.5,c:"#cccccc",a:7},"","",{x:14.5,c:"#89b087",a:4},"+","Enter"],
+[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#54d6de"},"Left","Right"],
 [{h:2},"Space",{h:2},"Enter","Up"],
 [{x:2},"Down"],
 [{r:-30,rx:13,y:-1,x:-3},"Home","End"],
index 1a085984655e4baea9e5d09be3f77c640368d2ff..b726e5e92a7b654006e7035de8ee4586a88e7511 100644 (file)
-:100000000C9465020C94A9020C94A9020C94A90208\r
-:100010000C94A9020C94A9020C94A9020C94A902B4\r
-:100020000C94A9020C94A9020C94B00B0C94820CB1\r
-:100030000C94A9020C94A9020C94A9020C94A90294\r
-:100040000C94A9020C940B210C94A9020C94A90203\r
-:100050000C94A9020C94AD1A0C94A9020C94A90258\r
-:100060000C94A9020C94A9020C94A9020C94A90264\r
-:100070000C94A9020C94A9020C94A9020C94A90254\r
-:100080000C94A9020C94A9020C94A9020C94A90244\r
-:100090000C94A9020C94A9020C94A9020C94A90234\r
-:1000A0000C94A9020C94A9020C94A902E70C090D66\r
-:1000B000F40D090DF40D4B0D6E0DF40DC30DD60DA1\r
-:1000C000C310C310F110F11033116F116F136F13C0\r
-:1000D00087116F137E127E1249136F136F135D1316\r
-:1000E0000000F0A135002B000152E100E00000000B\r
-:1000F0001E00140004001D7100774E001F001A003E\r
-:1001000016001B00007F4C002000080007000600BE\r
-:10011000E2002A002100150009001900E3004B004D\r
-:10012000220017000A00050000004A0029002F00E5\r
-:1001300000002B0200004D002D00300000002B00BD\r
-:100140000000500023001C000B00110000004F00B5\r
-:10015000240018000D001000E700520025000C00DC\r
-:100160000E003600E6002C00260012000F003700BB\r
-:10017000007F2800270013003300387100775100FA\r
-:100180002E0031823481E500E40000002900025293\r
-:1001900001000100010000003A001E0220022202BC\r
-:1001A000010051003B001F02210223020100280030\r
-:1001B0003C002F0226022F0001002C003D003002DF\r
-:1001C00027023000010052003E00240235003502B3\r
-:1001D000000050000100360200002B0000004F001C\r
-:1001E0000100370200002B0200004A003F003102EC\r
-:1001F0003800310000004D0040005F005C005900F5\r
-:1002000062004B00410060005D005A0037004C0066\r
-:10021000420061005E005B0067002A00430054005A\r
-:100220005500560057004E004400450001003900BB\r
-:1002300058000000290002520100010001000000E6\r
-:10024000A5000100010001000100B500A6000100A9\r
-:10025000F200010001000100A800F000F100F1002F\r
-:10026000F400B600AA00F900F3000100FA00B4009F\r
-:10027000A9000100010001000000B8000100F90020\r
-:100280000000FA000000B9000100F9000000FA00C7\r
-:100290000000AC00010001004A0001000000AB00BA\r
-:1002A0004600F9005000FA000100A9004B0052007E\r
-:1002B000510051004E00AE00B30001004F0001009C\r
-:1002C0000100AD00B10001004D0001000100AA00D5\r
-:1002D00001000100010001000100000016034500BB\r
-:1002E000720067006F0044006F0078002000450036\r
-:1002F0005A00000016034500720067006F004400BA\r
-:100300006F007800200045005A0000000403090433\r
-:1003100009026D00040100A0FA09040000010301B4\r
-:100320000100092111010001223F00070581030896\r
-:10033000000A090401000103010200092111010062\r
-:1003400001224D000705820308000A09040200018A\r
-:100350000300000009211101000122360007058376\r
-:100360000308000A09040300010300000009211129\r
-:100370000100012239000705840310000112011059\r
-:100380000100000008EDFE07130100010200010555\r
-:10039000010906A101050719E029E71500250195C6\r
-:1003A0000875018102050819012905950575019156\r
-:1003B000029501750391010507190029771500259C\r
-:1003C00001957875018102C005010980A1018502AE\r
-:1003D00016010026B7001A01002AB7007510950112\r
-:1003E0008100C0050C0901A1018503160100269CAE\r
-:1003F000021A01002A9C02751095018100C00501B6\r
-:100400000902A1010901A100050919012905150029\r
-:10041000250195057501810295017503810105018D\r
-:10042000093009311581257F950275088106093843\r
-:100430001581257F950175088106050C0A3802157E\r
-:1004400081257F950175088106C0C005010906A1B7\r
-:1004500001050719E029E7150025019508750181B7\r
-:100460000295017508810105081901290595057591\r
-:100470000191029501750391010507190029FF15E6\r
-:100480000025FF950675088100C0000000000000EF\r
-:100490000000000000010204060A0F17202C3A4A4F\r
-:1004A0005D71879DB3C7DAE9F5FCFFFCF5E9DAC7B2\r
-:1004B000B39D87715D4A3A2C20170F0A060402018A\r
-:1004C0000000000000000000000011241FBECFEF5C\r
-:1004D000DAE0DEBFCDBF04B603FE24C08091EE019A\r
-:1004E0009091EF01A091F001B091F1018730904B14\r
-:1004F000A740B04BB9F41092EE011092EF011092A8\r
-:10050000F0011092F10114BE84B7877F84BF88E1A7\r
-:100510000FB6F89480936000109260000FBEE0E088\r
-:10052000FFE3099511E0A0E0B1E0EAE9F5E402C0DB\r
-:1005300005900D92A433B107D9F721E0A4E3B1E00F\r
-:1005400001C01D92AE3EB207E1F70E94F6080C947E\r
-:10055000CB220C94000061110BC0FC018281882326\r
-:1005600021F085EE0E94570F03C085EE0E941F10F8\r
-:1005700080E090E0089508956091B1017091B2011A\r
-:100580008091B3019091B4010E94D91956985E9858\r
-:1005900025982D9826982E9827982F98813019F015\r
-:1005A000823021F00895259A2D9A0895269A2E9A40\r
-:1005B00008950C94BC0256985E9825982D9826981C\r
-:1005C0002E9827982F988FEF90E090938900809332\r
-:1005D000880090938B0080938A0090938D00809385\r
-:1005E0008C00259A2D9A2FEF80E792E021508040D1\r
-:1005F0009040E1F700C00000269A2E9A2FEF80E786\r
-:1006000092E0215080409040E1F700C00000279A1E\r
-:100610002F9A2FEF80E792E0215080409040E1F741\r
-:1006200000C0000025982D982FEF80E792E0215020\r
-:1006300080409040E1F700C0000026982E982FEFF0\r
-:1006400080E792E0215080409040E1F700C0000038\r
-:1006500027982F9856985E9825982D9826982E982A\r
-:1006600027982F98089589EA8093800089E08093E5\r
-:10067000810024982C983F988AB18F748AB96E981B\r
-:10068000479A8BB1806B8BB9769A0E94DB020C94EF\r
-:10069000BB0280E2809300018091340181110EC081\r
-:1006A0000E94980381E0809334012FEF83ED90E363\r
-:1006B000215080409040E1F700C0000080E40E949B\r
-:1006C0009E038093000181112EC00E94C803809375\r
-:1006D0000001811128C00E94C8038093000181118C\r
-:1006E00022C08FE30E94C8038093000181111BC0C8\r
-:1006F0000E94C00380E40E949E0380930001811148\r
-:1007000012C08CE00E94C8038093000181110BC0CD\r
-:100710000E94C80380930001811105C08FE30E94ED\r
-:10072000C803809300010E94C003809100010895D6\r
-:100730001092B9008AE08093B800089594EA9093EB\r
-:10074000BC009091BC0097FFFCCF9091B900987FBE\r
-:10075000983021F0903111F081E008958093BB0032\r
-:1007600084E88093BC008091BC0087FFFCCF80911F\r
-:10077000B900887F883111F0803471F780E00895E6\r
-:1007800084E98093BC008091BC0084FDFCCF089577\r
-:100790008093BB0084E88093BC008091BC0087FFFD\r
-:1007A000FCCF9091B900987F81E0983209F480E005\r
-:1007B000089584E88093BC008091BC0087FFFCCF43\r
-:1007C0008091BB00089580910001811115C080E4E3\r
-:1007D0000E949E038093000181110CC082E10E945F\r
-:1007E000C80380930001811105C08FEF0E94C803E8\r
-:1007F000809300010E94C00384B1807F84B985B1D9\r
-:10080000807F85B98AB1837F8AB98BB1837F8BB9A9\r
-:100810003E98469808950E944903809300010E94E3\r
-:10082000E30380B38C7080BB81B3836F81BBE4E44E\r
-:10083000F1E0A6E3B1E011921D9281E0E235F80704\r
-:10084000D1F70C943303BF92CF92DF92EF92FF92D5\r
-:100850000F931F93CF93DF9380910001882379F04A\r
-:10086000809135018F5F80933501811108C00E940E\r
-:10087000490380930001811102C00E94DB0206E35C\r
-:1008800011E0C0E0D0E0DD24D39482E0C82EEE2455\r
-:10089000E394F12CC73000F580910001811162C012\r
-:1008A00080E40E949E0380930001811112C082E1C6\r
-:1008B0000E94C8038093000181110BC0C7010C2E58\r
-:1008C00001C0880F0A94EAF780950E94C8038093BC\r
-:1008D00000010E94C00346C0CA30A1F028F4C8300D\r
-:1008E00059F0C93061F005C0CC3089F070F0CD30DE\r
-:1008F00089F0209A289810C0219A29980DC0229A30\r
-:100900002A980AC0239A2B9807C0529A01C0539A7A\r
-:100910005B9802C03E9A4698E0EAEA95F1F78FB1FB\r
-:1009200079995AC092E081708D25892B7C9B02C0F9\r
-:1009300090E001C094E0892B7D9B02C090E001C053\r
-:1009400098E0892B7E9B02C090E001C090E1892B4A\r
-:100950009FB19095991F9927991F9295990F907E15\r
-:10096000892B0FC08091000181114BC080E40E944F\r
-:100970009E0380930001882389F1B12C0E94C0035B\r
-:100980008B2DF8019081981719F08083C092010196\r
-:100990000E94E30321960F5F1F4FCE30D10509F06F\r
-:1009A00079CF80910101882371F1815080930101F9\r
-:1009B000882339F08FE99FE00197F1F700C000002C\r
-:1009C00022C0A4E4B1E0E6E3F1E081918D9391E0EF\r
-:1009D000E434F907D1F717C090E0A5CF83E10E9476\r
-:1009E000C803809300018111C8CF81E40E949E0357\r
-:1009F000809300018111C1CF0E94D903B82EB09419\r
-:100A0000BDCF80E0BECF0E94D90281E0DF91CF91BF\r
-:100A10001F910F91FF90EF90DF90CF90BF900895BE\r
-:100A2000E82FF0E0EC5BFE4F8081089508958B3B4A\r
-:100A3000910578F4883A910540F5853A9105D0F40E\r
-:100A40008430910508F0B1C08130910509F4ADC042\r
-:100A50006BC0803E910508F467C0883E910508F49C\r
-:100A6000A4C09C01205F31092031310508F05CC031\r
-:100A700090650895853A910509F459C0863A910523\r
-:100A800009F458C083E890E40895883A910509F480\r
-:100A900054C0893A910509F453C08A3A910509F482\r
-:100AA00052C08B3A910509F451C08C3A910509F472\r
-:100AB00050C08D3A910509F44FC0803B910509F46F\r
-:100AC0004EC08E3A910509F44DC08F3A910509F454\r
-:100AD0004CC0813B910509F44BC0823B910509F460\r
-:100AE0004AC0833B910509F449C0843B910509F450\r
-:100AF00048C0853B910509F447C0863B910509F440\r
-:100B000046C0873B910509F445C0883B910509F42F\r
-:100B100044C0893B910509F443C08A3B910509F023\r
-:100B200042C08AE296E4089580E090E0089581E86A\r
-:100B300090E4089582E890E4089582EE94E40895A4\r
-:100B400089EE94E408958AEE94E4089585EB94E4A4\r
-:100B5000089586EB94E4089587EB94E408958CEC73\r
-:100B600094E408958DEC94E4089583E895E4089561\r
-:100B70008AE895E4089582E995E4089584E995E486\r
-:100B8000089581E296E4089583E296E4089584E26C\r
-:100B900096E4089585E296E4089586E296E4089541\r
-:100BA00087E296E4089580E094E40895089596E03D\r
-:100BB000799FF001112494E5899FE00DF11D112426\r
-:100BC000E60FF11DEE0FFF1FEC51FF4F8591949141\r
-:100BD0000895880F991F805A9040FC018591949147\r
-:100BE0000895880F991F80529F4FFC018591949121\r
-:100BF000089526E0729FF001112444E5849FE00DE2\r
-:100C0000F11D1124E60FF11DEE0FFF1FEC51FF4FF8\r
-:100C100025913491C9019A9581159F4110F4C9011C\r
-:100C20000895C90190528115904128F4C9019F701F\r
-:100C30000E94F1050895C90190538115904120F457\r
-:100C4000C9019927906C0895211580E5380769F44A\r
-:100C50000E9490139FEF24E34CE0915020404040CD\r
-:100C6000E1F700C000000C94D21A213080E538076B\r
-:100C700031F48091CC0181608093CC010895C90149\r
-:100C800090558115904108F050C0832F99278F709F\r
-:100C9000992781309105D9F4A9014370552702C0E5\r
-:100CA000880F991F4A95E2F79C68A90164E0440FF8\r
-:100CB000551F6A95E1F744275370842B952B73E0F9\r
-:100CC000220F331F7A95E1F7207633271DC082303B\r
-:100CD000910529F4922F8827816F906A08958330B7\r
-:100CE0009105A9F4A9014370552781E090E002C065\r
-:100CF000880F991F4A95E2F79C6843E0220F331F43\r
-:100D00004A95E1F7207E3770822B932B0895049744\r
-:100D1000F1F4A9014370552781E090E002C0880FEB\r
-:100D2000991F4A95E2F79A68E8CFC9019057811553\r
-:100D3000904120F4C9019F7090620895C9019058B4\r
-:100D40008115904120F4C9019F70906A0895203E5A\r
-:100D50003105E0F4203C310558F52133310509F423\r
-:100D600070C048F42932310509F464C02A323105D3\r
-:100D700009F46EC074C029333105F1F02238310511\r
-:100D8000D9F02533310509F44EC069C0233E310541\r
-:100D900089F138F4203E3105C1F0223E3105E1F001\r
-:100DA0005EC0263E310569F1273E3105A9F157C0E5\r
-:100DB000C9010E94E90508958091DF0180FD02C00C\r
-:100DC00081FF4DC080EE90E04BC08091DF0180FF3D\r
-:100DD000F9CF89E390E044C08091DF0182FF0EC02B\r
-:100DE0008091DF0184FF03C080E090E039C083EE92\r
-:100DF00090E036C08091DF0182FFF2CF82EE90E07A\r
-:100E00002FC08091DF0183FF0BC08091DF0184FD43\r
-:100E1000EBCF87EE90E024C08091DF0183FFF5CF18\r
-:100E200086EE90E01DC08091DF0185FF07C089E25A\r
-:100E300090E016C08091DF0185FFF9CF85E390E057\r
-:100E40000FC08091DF0186FF07C08AE290E008C0F2\r
-:100E50008091DF0186FFF9CF81E390E001C0C901F5\r
-:100E60000E941705089508950C943307809162013C\r
-:100E70000895CF93DF9300D01F92CDB7DEB72091B6\r
-:100E8000E501243019F523E029839B838A8320938D\r
-:100E9000E9008FEF9091E800815095FD06C095ED37\r
-:100EA0009A95F1F700008111F5CF8091E80085FF58\r
-:100EB0000DC040E050E063E070E0CE0101960E947A\r
-:100EC000A3098091E8008E778093E8000F900F903F\r
-:100ED0000F90DF91CF910895CF93DF9300D01F92B1\r
-:100EE000CDB7DEB72091E501243021F522E029833A\r
-:100EF0009B838A8383E08093E9008FEF9091E800E1\r
-:100F0000815095FD06C095ED9A95F1F7000081118D\r
-:100F1000F5CF8091E80085FF0DC040E050E063E030\r
-:100F200070E0CE0101960E94A3098091E8008E77BF\r
-:100F30008093E8000F900F900F90DF91CF9108956C\r
-:100F40002091E5012430F1F422E02093E9002FEF15\r
-:100F50003091E800215035FD06C035ED3A95F1F7A6\r
-:100F600000002111F5CF2091E80025FF0BC040E0E3\r
-:100F700050E065E070E00E94A3098091E8008E7760\r
-:100F80008093E8000895CF93DF93EC018091E50111\r
-:100F9000843009F046C090910C019923D9F09091CA\r
-:100FA0000D019923B9F08093E9008FEF9091E8004B\r
-:100FB000815095FD06C095E19A95F1F700008111E9\r
-:100FC000F5CF8091E80085FF2CC040E050E060E163\r
-:100FD00070E017C081E08093E9008FEF9091E80006\r
-:100FE000815095FD06C095ED9A95F1F700008111AD\r
-:100FF000F5CF8091E80085FF14C040E050E068E044\r
-:1010000070E0CE010E94A3098091E8008E77809362\r
-:10101000E80080E1FE01A2E5B1E001900D928A9521\r
-:10102000E1F7DF91CF9108958091E401811109C02A\r
-:101030000E94350B0E94920B8091E20084608093A5\r
-:10104000E20008951092E401089508950C94F820A8\r
-:101050000E94691A0E94FE200E942F0E0C943407F1\r
-:1010600042E061EC81E00E94AF0A42E061EC82E084\r
-:101070000E94AF0A42E061EC83E00E94AF0A42E1C5\r
-:1010800061EC84E00C94AF0A8091E701833009F4AD\r
-:1010900055C030F4813071F0823009F48EC008956B\r
-:1010A0008A3009F47AC08B3009F460C0893009F0C5\r
-:1010B0009CC020C08091E601813A09F096C08091E1\r
-:1010C000E800877F8093E8008091EA019091EB012E\r
-:1010D000892B21F060E080E090E003C060E182E5D0\r
-:1010E00091E070E00E94EC098091E8008B7780939A\r
-:1010F000E80008958091E601813209F076C0809180\r
-:10110000EA019091EB01009719F0039709F06DC087\r
-:101110008091E800877F8093E8008091E80082FD5D\r
-:1011200005C08091E5018111F8CF5FC08091F10089\r
-:10113000809362018091E8008B7753C08091E60133\r
-:10114000813A09F052C08091EA019091EB01892B1C\r
-:1011500009F04BC08091E800877F8093E800809180\r
-:10116000E80080FFFCCF80910C0136C08091E60141\r
-:101170008132D9F58091EA019091EB01892BA9F593\r
-:101180008091E800877F8093E8000E94E40A8091C4\r
-:10119000E80180930C010C9490138091E601813258\r
-:1011A00021F58091E800877F8093E8000E94E40A9F\r
-:1011B0008091E9018093630108958091E601813A6D\r
-:1011C000A1F48091E800877F8093E8008091E80097\r
-:1011D00080FFFCCF809163018093F1008091E80053\r
-:1011E0008E778093E8000C94E40A089584B7877F93\r
-:1011F00084BF88E10FB6F89480936000109260007D\r
-:101200000FBE90E080E80FB6F89480936100909351\r
-:1012100061000FBE0E947E0E0E94350B0E94920B51\r
-:101220008091E20084608093E20078940E940D0E29\r
-:101230000E94800E82E091E00E942A0E0E94E62029\r
-:101240008091E501853069F40E942C1A8091E301B8\r
-:101250008823B1F30E94541A882391F30E948D09C8\r
-:10126000EFCF0E94860EECCF292F33272330310594\r
-:10127000A9F06CF42130310509F442C02230310567\r
-:1012800009F043C08DE690E020E133E042C0213216\r
-:101290003105C9F02232310519F137C09927813063\r
-:1012A000910541F08230910541F0892B71F5ECE018\r
-:1012B000F3E005C0E4EFF2E002C0ECEDF2E084916F\r
-:1012C00090E09F0126C0643000F5E62FF0E0EE0FBD\r
-:1012D000FF1FEE5DFE4F2081318189E090E019C053\r
-:1012E000643098F4E62FF0E0DF01AA0FBB1FA65E82\r
-:1012F000BE4F2D913C91EA5EFE4F808190E009C087\r
-:1013000082E190E02DE733E004C080E090E020E04F\r
-:1013100030E0FA0131832083089580E189BD82E1C4\r
-:1013200089BD09B400FEFDCF8091D8008F7D8093E8\r
-:10133000D8008091E00082608093E0008091E0001E\r
-:1013400081FDFCCF0895CF92DF92EF92FF920F9331\r
-:101350001F93CF93DF937C018B01EA010E94050B61\r
-:10136000811131C0209731F088819981081B190BB8\r
-:10137000E80EF91EC12CD12C0115110519F180912F\r
-:10138000E80085FD14C08091E8008E778093E80026\r
-:10139000209741F0888199818C0D9D1D99838883C8\r
-:1013A00085E011C00E94050B882331F30CC0F701C2\r
-:1013B00081917F018093F10001501109FFEFCF1A55\r
-:1013C000DF0ADACF80E0DF91CF911F910F91FF907C\r
-:1013D000EF90DF90CF9008952091EC013091ED01D6\r
-:1013E0002617370748F06115710539F42091E80098\r
-:1013F0002E772093E80001C0B901FC0120E06115BF\r
-:101400007105B9F18091E501882309F440C0853068\r
-:1014100009F43FC08091E80083FD3DC08091E80061\r
-:1014200082FF06C08091E80082FF26C080E0089518\r
-:101430008091E80080FFE3CF2091F3008091F200DB\r
-:1014400090E0922B6115710551F08830910538F4C8\r
-:1014500021912093F100615071090196F3CF21E0B1\r
-:10146000089709F020E08091E8008E778093E800EB\r
-:10147000C6CF2111C7CFD6CF8091E501882339F09F\r
-:10148000853039F08091E80083FFCCCF04C082E042\r
-:10149000089583E0089581E008952091EC01309152\r
-:1014A000ED012617370748F06115710539F42091D1\r
-:1014B000E8002E772093E80001C0B901FC0120E08C\r
-:1014C00061157105C1F18091E501882309F441C0DE\r
-:1014D000853009F440C08091E80083FD3EC08091D2\r
-:1014E000E80082FF06C08091E80082FF27C080E00C\r
-:1014F00008958091E80080FFE3CF2091F300809170\r
-:10150000F20090E0922B6115710559F08830910539\r
-:1015100040F424912093F1003196615071090196B5\r
-:10152000F2CF21E0089709F020E08091E8008E7763\r
-:101530008093E800C5CF2111C6CFD5CF8091E501BA\r
-:10154000882339F0853039F08091E80083FFCBCFD4\r
-:1015500004C082E0089583E0089581E00895982F03\r
-:10156000973058F59093E900981739F07091EC0096\r
-:101570002091ED005091F00003C0242F762F50E011\r
-:1015800021FF19C03091EB003E7F3093EB0030918A\r
-:10159000ED003D7F3093ED003091EB0031603093F2\r
-:1015A000EB007093EC002093ED005093F00020913D\r
-:1015B000EE0027FF07C09F5FD3CF8F708093E900B5\r
-:1015C00081E0089580E008958091E60187FD05C0DF\r
-:1015D0008091E80080FF0EC012C08091E80082FD7B\r
-:1015E00005C08091E5018111F8CF08958091E80050\r
-:1015F0008B7708C08091E5018111EACF0895809131\r
-:10160000E8008E778093E80008958091E40090913F\r
-:10161000E50045E62091EC0020FF21C02091E80084\r
-:1016200020FD21C02091E501222389F0253089F099\r
-:101630002091EB0025FD0FC02091E4003091E500E2\r
-:101640002817390739F3415041F0C901E3CF82E04F\r
-:10165000089583E0089581E0089584E0089520913D\r
-:10166000E80022FFDFCF80E008950E94A30B0E94D4\r
-:10167000AB0BE0EEF0E0808181608083E8EDF0E08C\r
-:1016800080818F77808319BCA7EDB0E08C918E7F2D\r
-:101690008C9380818F7E80831092E40108950F9354\r
-:1016A0001F93CF93DF930E94A30B0E94AB0BC8ED57\r
-:1016B000D0E088818F77888388818068888388815B\r
-:1016C0008F7D888319BC1092E5011092E101109280\r
-:1016D000E3011092E20100EE10E0F80180818B7FBF\r
-:1016E000808388818160888342E060E080E00E949E\r
-:1016F000AF0AE1EEF0E080818E7F8083E2EEF0E0E1\r
-:10170000808181608083808188608083F80180810E\r
-:101710008E7F8083888180618883DF91CF911F9144\r
-:101720000F910895E8EDF0E080818F7E8083E7EDF2\r
-:10173000F0E080818160808384E082BF81E08093DB\r
-:10174000E4010C944F0BE8EDF0E080818E7F808304\r
-:101750001092E20008951092DA001092E1000895CC\r
-:101760001F920F920FB60F9211242F933F934F9316\r
-:101770005F936F937F938F939F93AF93BF93EF93F9\r
-:10178000FF938091E10082FF0BC08091E20082FF15\r
-:1017900007C08091E1008B7F8093E1000E940C0ED6\r
-:1017A0008091DA0080FF1FC08091D80080FF1BC0AD\r
-:1017B0008091DA008E7F8093DA008091D90080FFDB\r
-:1017C0000DC080E189BD82E189BD09B400FEFDCF75\r
-:1017D00081E08093E5010E94140805C019BC1092B5\r
-:1017E000E5010E9422088091E10080FF19C08091EC\r
-:1017F000E20080FF15C08091E2008E7F8093E200BE\r
-:101800008091E20080618093E2008091D800806244\r
-:101810008093D80019BC85E08093E5010E942608DA\r
-:101820008091E10084FF30C08091E20084FF2CC0F1\r
-:1018300080E189BD82E189BD09B400FEFDCF8091C0\r
-:10184000D8008F7D8093D8008091E1008F7E8093B7\r
-:10185000E1008091E2008F7E8093E2008091E200BF\r
-:1018600081608093E2008091E101882311F084E09F\r
-:1018700007C08091E30087FF02C083E001C081E0E0\r
-:101880008093E5010E9428088091E10083FF29C030\r
-:101890008091E20083FF25C08091E100877F8093E3\r
-:1018A000E10082E08093E5011092E1018091E10086\r
-:1018B0008E7F8093E1008091E2008E7F8093E20032\r
-:1018C0008091E20080618093E20042E060E080E08D\r
-:1018D0000E94AF0A8091F00088608093F0000E941F\r
-:1018E0002508FF91EF91BF91AF919F918F917F91CB\r
-:1018F0006F915F914F913F912F910F900FBE0F907D\r
-:101900001F9018951F920F920FB60F9211242F93CC\r
-:101910003F934F935F936F937F938F939F93AF9377\r
-:10192000BF93CF93EF93FF93C091E900CF70809165\r
-:10193000EC001092E9008091F000877F8093F00026\r
-:1019400078940E94BE0C1092E9008091F0008860AB\r
-:101950008093F000C093E900FF91EF91CF91BF9188\r
-:10196000AF919F918F917F916F915F914F913F9137\r
-:101970002F910F900FBE0F901F9018951F93CF932C\r
-:10198000DF93CDB7DEB7AA970FB6F894DEBF0FBED0\r
-:10199000CDBFE6EEF1E08091F100819321E0EE3ED3\r
-:1019A000F207C9F70E9444088091E80083FF1CC138\r
-:1019B0002091E6013091E701832F90E08A30910574\r
-:1019C00008F012C1FC01EA5AFF4F0C948022203823\r
-:1019D00081F0223809F008C18091EA018F7080936C\r
-:1019E000E9008091EB0085FB882780F91092E900DF\r
-:1019F00006C08091E2019091E30191118260909183\r
-:101A0000E800977F9093E8008093F1001092F10036\r
-:101A1000C5C0822F8D7F09F0E7C0222319F0223044\r
-:101A200061F0E2C08091E801813009F0DDC033301F\r
-:101A300009F080E08093E30128C08091E8018111E2\r
-:101A400024C02091EA012F7009F4CEC02093E90050\r
-:101A50008091EB0080FF19C08091EB00333011F4CE\r
-:101A6000806211C080618093EB0081E090E0022EE3\r
-:101A700001C0880F0A94EAF78093EA001092EA0006\r
-:101A80008091EB0088608093EB001092E9008091D8\r
-:101A9000E800877F86C02111A7C01091E8011F7759\r
-:101AA0008091E3008078812B8093E3008091E800AF\r
-:101AB000877F8093E8000E94E40A8091E80080FF1D\r
-:101AC000FCCF8091E30080688093E300112311F044\r
-:101AD00083E001C082E08093E50186C02058223077\r
-:101AE00008F082C08091E8019091E9018C3D23E0EB\r
-:101AF000920779F583E08A838AE289834FB7F89465\r
-:101B0000DE01139620E03EE051E2E32FF0E0509337\r
-:101B10005700E49120FF03C0E295EF703F5FEF7044\r
-:101B20008E2F90E0EA3010F0C79601C0C0968D93DA\r
-:101B30009D932F5F243149F74FBF8091E800877F45\r
-:101B40008093E8006AE270E0CE0101960E94EC0901\r
-:101B500014C0AE014F5F5F4F6091EA010E943409EB\r
-:101B6000009709F441C02091E800277F2093E80006\r
-:101B7000BC0189819A810E944D0A8091E8008B778F\r
-:101B80008093E80031C0203879F58091E800877FA4\r
-:101B90008093E8008091E1018093F1008091E8005A\r
-:101BA0008E778093E8000E94E40A1EC021111CC0B9\r
-:101BB0009091E8019230C0F48091E800877F809393\r
-:101BC000E8009093E1010E94E40A8091E101811113\r
-:101BD00004C08091E30087FF02C084E001C081E07F\r
-:101BE0008093E5010E9430088091E80083FF0AC0DD\r
-:101BF0008091E800877F8093E8008091EB0080620D\r
-:101C00008093EB00AA960FB6F894DEBF0FBECDBF4F\r
-:101C1000DF91CF911F9108950895CF938091E501B1\r
-:101C20008823B1F08091E9008F709091EC0090FFD3\r
-:101C300002C090E801C090E0C92FC82B1092E900C3\r
-:101C40008091E80083FD0E94BE0CCF70C093E90034\r
-:101C5000CF91089590936901809368010895E09170\r
-:101C60006801F0916901309721F00190F081E02D39\r
-:101C7000099480E00895E0916801F091690130973E\r
-:101C800021F00280F381E02D09940895E09168012C\r
-:101C9000F0916901309721F00480F581E02D0994DD\r
-:101CA000089520916601309167018217930771F0C2\r
-:101CB0009093670180936601E0916801F09169015A\r
-:101CC000309721F00680F781E02D09940895209146\r
-:101CD0006401309165018217930771F0909365015B\r
-:101CE00080936401E0916801F0916901309721F0DF\r
-:101CF0000084F185E02D0994089508950C947D0EDB\r
-:101D00000E946F1A0E940B040C94351BCF92DF9235\r
-:101D1000EF92FF920F931F93CF93DF93CDB7DEB770\r
-:101D20002B970FB6F894DEBF0FBECDBF0E942304E1\r
-:101D30003BE6E32E31E0F32E00E010E0C02E802FD2\r
-:101D40000E941005F701D1907F01D826B1F40F5FF2\r
-:101D50001F4F0E30110591F78FEF89838A831B8205\r
-:101D60000E94781A8160782F9D838C8349815A81E3\r
-:101D70006B818D810E94290F41C09091CC0191FF10\r
-:101D800004C08B870E9416058B8520E030E04D2D26\r
-:101D900050E0922FBA01022E02C0759567950A9401\r
-:101DA000E2F760FF25C02E83CF82EE24E394F12C6E\r
-:101DB00002C0EE0CFF1C9A95E2F790E08E219F2165\r
-:101DC00021E0892B09F420E028870E94781A81609D\r
-:101DD000782F9A8789874E815F8168858A850E94DE\r
-:101DE000290FF801E559FE4F80818E25808306C0BA\r
-:101DF0002F5F3F4F2630310561F6A9CF0E94191E93\r
-:101E000010916A010E942F0E1817A1F00E942F0E48\r
-:101E100080936A012B960FB6F894DEBF0FBECDBF3C\r
-:101E2000DF91CF911F910F91FF90EF90DF90CF90B6\r
-:101E30000C9434072B960FB6F894DEBF0FBECDBFBF\r
-:101E4000DF91CF911F910F91FF90EF90DF90CF9096\r
-:101E50000895CF93DF93CDB7DEB72B970FB6F894E5\r
-:101E6000DEBF0FBECDBF4F83588769877A878B87C8\r
-:101E7000DE01119686E0FD0111928A95E9F785E071\r
-:101E8000FE01379601900D928A95E1F749815A81BA\r
-:101E90006B817C818D819E810E945C162B960FB692\r
-:101EA000F894DEBF0FBECDBFDF91CF910895CF93E1\r
-:101EB000C82F882309F4C1C0823859F40E942F0E1C\r
-:101EC00081FDBBC089E30E94F9180E94B31989E320\r
-:101ED0000CC0833879F40E942F0E80FDAEC083E5DC\r
-:101EE0000E94F9180E94B31983E50E943919CF9115\r
-:101EF0000C94B319843859F40E942F0E82FD9DC0B2\r
-:101F000087E40E94F9180E94B31987E4EECF8CEFA2\r
-:101F10008C0F813A48F48C2F0E944E2081118DC085\r
-:101F20008C2F0E94F918E3CF80E28C0F883048F4A0\r
-:101F3000C77081E001C0880FCA95EAF70E947A193C\r
-:101F4000D6CF8BE58C0F833078F4C53A29F0C63AAA\r
-:101F500031F482E890E005C081E890E002C083E8B7\r
-:101F600090E0CF910C94510E88E58C0F833108F0EE\r
-:101F700064C0C83A39F1C93A41F1CA3A49F1CB3A99\r
-:101F800051F1CC3A59F1CD3A61F1C03B69F1CE3A09\r
-:101F900071F1CF3A79F1C13B81F1C23B89F1C33B89\r
-:101FA00091F1C43B99F1C53BA1F1C63BA9F1C73BF7\r
-:101FB000B1F1C83BB9F1C93BC1F1CA3BC9F58AE2ED\r
-:101FC00092E038C082EE90E035C089EE90E032C0F9\r
-:101FD0008AEE90E02FC085EB90E02CC086EB90E07D\r
-:101FE00029C087EB90E026C08CEC90E023C08DECFC\r
-:101FF00090E020C083E891E01DC08AE891E01AC01B\r
-:1020000082E991E017C084E991E014C081E292E096\r
-:1020100011C083E292E00EC084E292E00BC085E240\r
-:1020200092E008C086E292E005C087E292E002C03A\r
-:1020300080E090E0CF910C94670ECF9108958823B3\r
-:1020400009F44BC0823859F40E942F0E81FF45C01D\r
-:1020500089E30E94F9180E94B31989E30CC0833800\r
-:1020600071F40E942F0E80FF38C083E50E94F9189A\r
-:102070000E94B31983E50E9439190C94B31984386E\r
-:1020800059F40E942F0E82FF28C087E40E94F9189D\r
-:102090000E94B31987E4EFCF9CEF980F913A58F361\r
-:1020A00090E2980F983050F4877091E001C0990F3A\r
-:1020B0008A95EAF7892F0E948019DFCF9BE5980F58\r
-:1020C000933020F480E090E00C94510E885A8331D4\r
-:1020D00020F480E090E00C94670E0895882321F0AE\r
-:1020E0000E947A190C94B3190895882321F00E9454\r
-:1020F00080190C94B3190895CF92DF92EF92FF925A\r
-:102100000F931F93CF93DF93CDB7DEB728970FB60A\r
-:10211000F894DEBF0FBECDBF8C0185E0F801DE0173\r
-:10212000119601900D928A95E1F7F8014081318175\r
-:10213000F280258122952F7083819481892B31F043\r
-:102140003F3F31F481E04F3F19F403C081E001C00B\r
-:1021500080E080FDC4C249833A8389819A812F83BC\r
-:102160000E94B7189E8388870E94B6180E9489171C\r
-:102170004E81E42FE295EF70F0E0E05AFF4F2F819F\r
-:1021800068850C948022842F807F142F1F708823F1\r
-:1021900011F01295107FFF2059F0112309F454C259\r
-:1021A000812F68870E948A190E94B31968854CC2E2\r
-:1021B000862F0E941F10112309F491C2812F0E94C3\r
-:1021C000901928960FB6F894DEBF0FBECDBFDF91F1\r
-:1021D000CF911F910F91FF90EF90DF90CF900C94D3\r
-:1021E000B319342F307F842F8F70303211F08295E5\r
-:1021F000807F662319F0613019F12BC0FF20B1F008\r
-:10220000222309F493C1213009F090C128960FB61A\r
-:10221000F894DEBF0FBECDBFDF91CF911F910F911C\r
-:10222000FF90EF90DF90CF900C949A19222319F031\r
-:10223000213009F454C28E830E949D198E8189C178\r
-:10224000FF2021F0223008F04AC270C1211147C29C\r
-:1022500080C1FF2021F0222309F468C1F5C12223A7\r
-:1022600009F477C105C2242F26952695237030E006\r
-:102270002115310521F021303105C9F030C2FF2090\r
-:1022800021F0862F942F937002C080E090E0289672\r
-:102290000FB6F894DEBF0FBECDBFDF91CF911F9177\r
-:1022A0000F91FF90EF90DF90CF900C94510EFF2094\r
-:1022B00021F0862F942F937002C080E090E0289642\r
-:1022C0000FB6F894DEBF0FBECDBFDF91CF911F9147\r
-:1022D0000F91FF90EF90DF90CF900C94670E862FB8\r
-:1022E000FF2019F00E94211D02C00E94891D28961E\r
-:1022F0000FB6F894DEBF0FBECDBFDF91CF911F9117\r
-:102300000F91FF90EF90DF90CF900C940E1E842FD2\r
-:10231000837009F076C0F110E2C1262F2295269530\r
-:102320002770220F220F862F8F70C82ED12CE12C00\r
-:10233000F12C022E04C0CC0CDD1CEE1CFF1C0A94F8\r
-:10234000D2F764FF10C06FE070E080E090E004C05E\r
-:10235000660F771F881F991F2A95D2F76095709591\r
-:102360008095909503C060E070E0CB01242F269506\r
-:1023700026952370422F50E042305105D1F0433072\r
-:10238000510559F16C297D298E299F29413051052C\r
-:1023900041F128960FB6F894DEBF0FBECDBFDF9196\r
-:1023A000CF911F910F91FF90EF90DF90CF900C9401\r
-:1023B000AE176C297D298E299F2928960FB6F8948F\r
-:1023C000DEBF0FBECDBFDF91CF911F910F91FF9068\r
-:1023D000EF90DF90CF900C94C8170E94AE17C70102\r
-:1023E000B60128960FB6F894DEBF0FBECDBFDF91C1\r
-:1023F000CF911F910F91FF90EF90DF90CF900C94B1\r
-:102400009417FF2019F0842F817001C086958823CE\r
-:1024100009F465C1262F229526952770220F220FD9\r
-:10242000862F8F70C82ED12CE12CF12C022E04C0E7\r
-:10243000CC0CDD1CEE1CFF1C0A94D2F764FF10C00C\r
-:102440006FE070E080E090E004C0660F771F881FA7\r
-:10245000991F2A95D2F7609570958095909503C045\r
-:1024600060E070E0CB01242F269526952370422F43\r
-:1024700050E042305105D1F04330510559F16C29FB\r
-:102480007D298E299F294130510541F128960FB6AB\r
-:10249000F894DEBF0FBECDBFDF91CF911F910F919A\r
-:1024A000FF90EF90DF90CF900C9482186C297D29DB\r
-:1024B0008E299F2928960FB6F894DEBF0FBECDBF98\r
-:1024C000DF91CF911F910F91FF90EF90DF90CF9010\r
-:1024D0000C949C180E948218C701B60128960FB66A\r
-:1024E000F894DEBF0FBECDBFDF91CF911F910F914A\r
-:1024F000FF90EF90DF90CF900C946818603FC9F187\r
-:1025000018F4603E50F49BC0623F09F460C008F4C8\r
-:102510004AC0633F09F46FC092C0162F1F70842F0A\r
-:102520008F71FF2099F00E940118812F28960FB615\r
-:10253000F894DEBF0FBECDBFDF91CF911F910F91F9\r
-:10254000FF90EF90DF90CF900C946E100E942218B5\r
-:10255000812F28960FB6F894DEBF0FBECDBFDF9156\r
-:10256000CF911F910F91FF90EF90DF90CF900C943F\r
-:102570007510FF20A1F02111B2C0842F8F71289611\r
-:102580000FB6F894DEBF0FBECDBFDF91CF911F9184\r
-:102590000F91FF90EF90DF90CF900C94471822306E\r
-:1025A00008F09DC0EACFFF20A1F0842F8F712896FC\r
-:1025B0000FB6F894DEBF0FBECDBFDF91CF911F9154\r
-:1025C0000F91FF90EF90DF90CF900C940118FF20B7\r
-:1025D00061F3842F8F7128960FB6F894DEBF0FBE7B\r
-:1025E000CDBFDF91CF911F910F91FF90EF90DF90C2\r
-:1025F000CF900C942218FF2091F0842F8F71289691\r
-:102600000FB6F894DEBF0FBECDBFDF91CF911F9103\r
-:102610000F91FF90EF90DF90CF900C94EC172896DD\r
-:102620000FB6F894DEBF0FBECDBFDF91CF911F91E3\r
-:102630000F91FF90EF90DF90CF900C94E217FF2066\r
-:10264000A1F0222309F4B1CF862F28960FB6F89473\r
-:10265000DEBF0FBECDBFDF91CF911F910F91FF90D5\r
-:10266000EF90DF90CF900C94570F222309F4B1CF55\r
-:10267000862F28960FB6F894DEBF0FBECDBFDF9130\r
-:10268000CF911F910F91FF90EF90DF90CF900C941E\r
-:102690001F104F70C8010E94AB0228960FB6F89425\r
-:1026A000DEBF0FBECDBFDF91CF911F910F91FF9085\r
-:1026B000EF90DF90CF900C9409174F70C8012896C7\r
-:1026C0000FB6F894DEBF0FBECDBFDF91CF911F9143\r
-:1026D0000F91FF90EF90DF90CF900C94D605289645\r
-:1026E0000FB6F894DEBF0FBECDBFDF91CF911F9123\r
-:1026F0000F91FF90EF90DF90CF9008950E9497196F\r
-:102700000E946C190E94B3190E94BA1E0E940E1EEC\r
-:1027100080E090E00E94510E80E090E00C94670E03\r
-:102720000E9487190C947E130E94B718292F2295B6\r
-:102730002F7030E02C3031054CF42A3031056CF428\r
-:10274000225031092230310590F407C02C30310578\r
-:1027500051F02F30310539F00AC0803E10F0803F33\r
-:1027600031F481E0089593FB882780F9089580E093\r
-:102770000895CF93DF9300D000D01F92CDB7DEB77E\r
-:102780000F900F900F900F900F90DF91CF910895C1\r
-:10279000CF93DF9300D000D000D0CDB7DEB7269620\r
-:1027A0000FB6F894DEBF0FBECDBFDF91CF91089575\r
-:1027B0001F93CF93DF93C091790116E080917A0146\r
-:1027C000C81799F0D0E01C9FF0011D9FF00D112457\r
-:1027D000E558FE4F408151816281738184819581EA\r
-:1027E0000E94C8132196C770E9CFDF91CF911F9146\r
-:1027F00008954091AB015091AC016091AD01709191\r
-:10280000AE018091AF019091B0010C94C813CF93A9\r
-:102810008091B00182958F7009F05FC08091AD0109\r
-:10282000882309F45AC020917901A0917A0160911E\r
-:10283000AB017091AC018091AE019091AF0131E09C\r
-:102840006F3F09F030E0B32FC6E02A1709F445C006\r
-:10285000009721F07F3F21F44B2F03C041E001C0DE\r
-:1028600040E030E040FD35C0C29FF001C39FF00D55\r
-:102870001124E558FE4F418174132BC0408164132D\r
-:1028800028C04281411125C043815481481759070E\r
-:1028900010F441505109481B590B483C5105C8F4EC\r
-:1028A0008091B0018F7080618093B00186E0829F3B\r
-:1028B000F001839FF00D1124E058FE4F80818F704E\r
-:1028C000806180838BEA91E00E947C10CF910C9410\r
-:1028D000D8132F5F3F4F2770B8CFCF910895CF9275\r
-:1028E000DF92EF92FF920F931F93CF93DF93CDB7B9\r
-:1028F000DEB762970FB6F894DEBF0FBECDBF8C0176\r
-:1029000085E0F801DE011D9601900D928A95E1F7B0\r
-:10291000D8014C9111965C91119712966C91129777\r
-:102920001396ED90FC9014977091AB01E091AC017F\r
-:102930002091AE013091AF012115310531F0EF3F0B\r
-:1029400031F481E07F3F19F403C081E001C080E0F1\r
-:10295000B82FB170CB2E80FD6CC1D090AD01DD20C1\r
-:1029600009F4F5C0F091B001E216F30638F0C701A2\r
-:10297000821B930B883C910548F09BC020953095B5\r
-:102980002E0D3F1D283C310508F093C08F2F807F0E\r
-:1029900009F052C0E51314C0741312C0D62E611191\r
-:1029A0000FC0FF70F061F093B0010E94F9138BEA41\r
-:1029B00091E00E947C108091B001F80185836CC188\r
-:1029C000EF2831F05F3F31F481E04F3F19F403C04D\r
-:1029D00081E001C080E080FD03C081E0862701C066\r
-:1029E00080E0F82FF170FF2E80FF1CC080917901EC\r
-:1029F00020917A0136E0821709F428C190E0389FCF\r
-:102A0000F001399FF00D1124E558FE4F71815713E5\r
-:102A100006C07081471303C07281671303C001961B\r
-:102A20008770E9CFD62E662309F436C18091B001B4\r
-:102A300081608093B00153C0E51308C0741306C0D1\r
-:102A4000611104C0D8011596FC93AEC04D875E8716\r
-:102A50008D859E856A8B0E9494136A89882329F14B\r
-:102A6000D62E662311F12091B001822F82958F70AE\r
-:102A700090E002970CF460C08091AB019091AC01A2\r
-:102A800098878F831986FB86EA862C87CE01079666\r
-:102A900051C0E51731F14D875E878D859E856A8B24\r
-:102AA0000E9494136A8981112EC0C8010E947C1073\r
-:102AB000A4C08F2F807F69F77E2DF98AE88A8989E3\r
-:102AC0000E94B9138BEA91E00E947C10EBEAF1E0DE\r
-:102AD00086E0DF011D928A95E9F70E94F913D12C57\r
-:102AE000DBC07413D8CF6111D6CFD8011596FC93F3\r
-:102AF000C8010E947C10EBEAF1E086E0DF011D9244\r
-:102B00008A95E9F7C9C0D62E662379F22091B001E3\r
-:102B1000822F82958F7090E0029774F08091AB01C4\r
-:102B20009091AC019A8389831B82FD82EC822E8373\r
-:102B3000CE0101960E947C1086E0F801ABEAB1E07C\r
-:102B400001900D928A95E1F70E9407146FC0E2167A\r
-:102B5000F30628F0C701821B930B9C0104C020954B\r
-:102B600030952E0D3F1D283C310508F052C0D62E61\r
-:102B7000662309F49ACFE5132CC074132AC0809100\r
-:102B8000B00180FD1DC0982F92959F70C9F0D801AB\r
-:102B900015968C9315979F3039F09F5F9295907F93\r
-:102BA0008F70892B15968C93C8010E947C1086E04B\r
-:102BB000F801ABEAB1E001900D928A95E1F736C0D9\r
-:102BC00086E0F801ABEAB1E001900D928A95E1F759\r
-:102BD00063C04D875E878D859E850E9494138823F0\r
-:102BE00079F086E0F801ABEAB1E001900D928A95A8\r
-:102BF000E1F70E9407140E94F913DD24D3944CC01E\r
-:102C00008091B00181608093B001C8010E947C1066\r
-:102C100043C07E2DF98AE88A89890E94B913EBEABC\r
-:102C2000F1E086E0DF011D928A95E9F70E94F91331\r
-:102C300033C0662309F439CF4D875E878D859E8525\r
-:102C40000E949413882309F430CFCBCF4D875E8741\r
-:102C50008D859E850E94B718292F22952F7030E010\r
-:102C6000223031052CF49F7041F0811106C00CC058\r
-:102C7000243031052CF49F7049F4805E883020F0B8\r
-:102C8000C8010E947C10CF2CDC2C06C0D801159600\r
-:102C90009C91907F91F7F8CF8D2D62960FB6F894A6\r
-:102CA000DEBF0FBECDBFDF91CF911F910F91FF907F\r
-:102CB000EF90DF90CF9008951F93CF93DF93CDB720\r
-:102CC000DEB72C970FB6F894DEBF0FBECDBF4F8393\r
-:102CD000588769877A878B879C87CE0107960E94E1\r
-:102CE0006F148823C1F02F8138858A859B85892BB5\r
-:102CF00031F03F3F11F080E003C02F3FE1F781E06A\r
-:102D0000811147C04F81588569857A858B859C855F\r
-:102D10000E94C8133EC086E0FE013796DE01119680\r
-:102D200001900D928A95E1F7FF81E8854A855B85E0\r
-:102D30004115510531F0EF3F31F481E0FF3F19F4C7\r
-:102D400003C081E001C080E080FD23C020917A01B2\r
-:102D500030E0C9010196877099276091790170E090\r
-:102D600086179707F1F1F983EA835D834C8396E038\r
-:102D7000929FD001939FB00D1124A558BE4FFE0124\r
-:102D8000319601900D929A95E1F780937A010E9415\r
-:102D9000D81316E08091790190917A01891779F121\r
-:102DA000189FC001112485589E4F0E946F148823DC\r
-:102DB00031F1E09179011E9FF0011124E558FE4F99\r
-:102DC0004081518162817381848195810E94C81301\r
-:102DD0008091790190E0019687709927809379011D\r
-:102DE000D9CF0E94901310927A0110927901EBEAE8\r
-:102DF000F1E086E0DF011D928A95E9F7CACF2C96B3\r
-:102E00000FB6F894DEBF0FBECDBFDF91CF911F91FB\r
-:102E10000895EF92FF920F931F93CF93DF93FC01DE\r
-:102E2000009709F46FC0F12CEE24E394EF01219692\r
-:102E30008491843740F4843008F055C0813081F0AB\r
-:102E4000823021F15FC0853709F447C0C0F19CE7AB\r
-:102E5000980F903708F056C08F770E941F1045C01A\r
-:102E60008F010E5F1F4FFE01849190E2980F983002\r
-:102E700050F48770FE2D01C0FF0F8A95EAF78F2F5F\r
-:102E80000E948A1915C00E94570F14C08F010E5F4F\r
-:102E90001F4FFE01849190E2980F983068F487707C\r
-:102EA000FE2D01C0FF0F8A95EAF78F2F0E9490191F\r
-:102EB0000E94B319E80119C00E941F10FBCFCF0177\r
-:102EC0000296FE01C491CC2361F0EFE9FFE0319757\r
-:102ED000F1F700C00000C150F6CFCF010296FE010D\r
-:102EE000F490EC0102C00E94570F8F2D882341F00F\r
-:102EF000EFE9FFE03197F1F700C000008150F6CF15\r
-:102F0000FE0194CFDF91CF911F910F91FF90EF9031\r
-:102F1000089508956093B5017093B6018093B70149\r
-:102F20009093B8010C947E130F931F930091B501F9\r
-:102F30001091B6012091B7013091B801062B172BE3\r
-:102F4000282B392B0093B5011093B6012093B701BC\r
-:102F50003093B8011F910F910C947E130F931F9320\r
-:102F60000091B5011091B6012091B7013091B801DF\r
-:102F700006231723282339230093B5011093B601A4\r
-:102F80002093B7013093B8011F910F910C947E13D9\r
-:102F90000F931F930091B5011091B6012091B701D5\r
-:102FA0003091B80106271727282739270093B50144\r
-:102FB0001093B6012093B7013093B8011F910F9180\r
-:102FC0000C947E131092B1011092B2011092B301D1\r
-:102FD0001092B4010C947E1341E050E060E070E088\r
-:102FE00004C0440F551F661F771F8A95D2F7409380\r
-:102FF000B1015093B2016093B3017093B4010C948A\r
-:103000007E1341E050E060E070E004C0440F551FC3\r
-:10301000661F771F8A95D2F78091B1019091B20116\r
-:10302000A091B301B091B401842B952BA62BB72BA3\r
-:103030008093B1019093B201A093B301B093B40116\r
-:103040000C947E1341E050E060E070E004C0440F57\r
-:10305000551F661F771F8A95D2F74095509560954A\r
-:1030600070958091B1019091B201A091B301B0919E\r
-:10307000B40184239523A623B7238093B1019093B1\r
-:10308000B201A093B301B093B4010C947E1341E05C\r
-:1030900050E060E070E004C0440F551F661F771FCA\r
-:1030A0008A95D2F78091B1019091B201A091B301BC\r
-:1030B000B091B40184279527A627B7278093B10143\r
-:1030C0009093B201A093B301B093B4010C947E131A\r
-:1030D0000F931F930091B1011091B2012091B301A0\r
-:1030E0003091B401062B172B282B392B0093B101FB\r
-:1030F0001093B2012093B3013093B4011F910F914B\r
-:103100000C947E130F931F930091B1011091B201A3\r
-:103110002091B3013091B4010623172328233923CA\r
-:103120000093B1011093B2012093B3013093B40125\r
-:103130001F910F910C947E130F931F930091B10177\r
-:103140001091B2012091B3013091B40106271727E5\r
-:10315000282739270093B1011093B2012093B301BE\r
-:103160003093B4011F910F910C947E130895CF9268\r
-:10317000DF92EF92FF920F931F93CF93DF93EC01B7\r
-:10318000C090B501D090B601E090B701F090B801C1\r
-:103190008091B1019091B201A091B301B091B401BD\r
-:1031A000C82AD92AEA2AFB2A0FE110E0B701A601B2\r
-:1031B000002E04C076956795579547950A94D2F7E7\r
-:1031C00040FF07C0BE01802F0E94F90581309105A4\r
-:1031D00039F40150110950F7BE0180E00E94F90551\r
-:1031E000DF91CF911F910F91FF90EF90DF90CF90E3\r
-:1031F000089590910C019923D9F090910D01992394\r
-:10320000B9F0982F9695969596959F3088F5E09110\r
-:103210000E01F0910F01E90FF11D877021E030E000\r
-:1032200001C0220F8A95EAF78181822B818308955C\r
-:1032300040910E0150910F0120E030E09FEFFA0124\r
-:10324000E20FF31F6281681799F09F3F19F4611133\r
-:1032500001C0922F2F5F3F4F2E30310581F79F3FE6\r
-:1032600039F0FA01E90FF11D97FDFA95828308956F\r
-:10327000089590910C019923E1F090910D0199230B\r
-:10328000C1F0982F9695969596959F3020F5E091F0\r
-:103290000E01F0910F01E90FF11D877021E030E080\r
-:1032A00001C0220F8A95EAF7209581812823218386\r
-:1032B000089540910E0150910F0120E030E0FA0195\r
-:1032C000E20FF31F9281981301C012822F5F3F4FCC\r
-:1032D0002E303105A1F7089581E090E0E0910E01D4\r
-:1032E000F0910F01E80FF91F1082019680319105CE\r
-:1032F000A9F708959091CB01982B9093CB01089555\r
-:1033000080959091CB0198239093CB0108951092D2\r
-:10331000CB0108959091CA01982B9093CA0108950A\r
-:1033200080959091CA0198239093CA0108951092B4\r
-:10333000CA0108958093B90108951092B9010895C2\r
-:1033400040910E0150910F0120E030E080E0FA0141\r
-:10335000E20FF31F918191118F5F2F5F3F4F2F304D\r
-:103360003105A9F70895E0910E01F0910F018091C8\r
-:10337000CB018083E0910E01F0910F01808190914B\r
-:10338000CA01892B80839091B901992361F0E09162\r
-:103390000E01F0910F018081892B80830E94A0197A\r
-:1033A00081111092B90180910E0190910F010C943E\r
-:1033B0003B0ECF92DF92EF92FF920F931F936C011F\r
-:1033C000EE24FF24C114D104E104F10421F46B01C3\r
-:1033D0007C0180E001C080E133272F2D1E2D0D2DB3\r
-:1033E000011511052105310519F0885F6801790182\r
-:1033F00097018601A4E03695279517950795AA951C\r
-:10340000D1F7011511052105310519F08C5F68010F\r
-:10341000790197018601F2E0369527951795079572\r
-:10342000FA95D1F7011511052105310519F08E5FC7\r
-:1034300068017901B701A60176956795579547957B\r
-:10344000452B462B472B09F08F5F1F910F91FF9063\r
-:10345000EF90DF90CF9008958091E501843009F1DD\r
-:103460001092CD0120E488E190E00FB6F894A89581\r
-:10347000809360000FBE2093600083B7817F8460DB\r
-:1034800083BF83B7816083BF7894889583B78E7F2D\r
-:1034900083BF88E10FB6F8948093600010926000BB\r
-:1034A0000FBE089508950895CF930E94521A0E9466\r
-:1034B00023040E94531AC0E08C2F0E941005811132\r
-:1034C00005C0CF5FCE30C1F780E001C081E0CF9171\r
-:1034D00008950E9490130E942F0E0C94340782E0EE\r
-:1034E00084BD93E095BD9AEF97BD80936E000895DB\r
-:1034F0002FB7F8948091CE019091CF01A091D00187\r
-:10350000B091D1012FBF0895CF92DF92EF92FF9239\r
-:103510000F931F932FB7F8944091CE015091CF0194\r
-:103520006091D0017091D1012FBF6A017B01EE241F\r
-:10353000FF248C0120E030E0C016D106E206F3063D\r
-:1035400010F441505109481B590BCA011F910F91AA\r
-:10355000FF90EF90DF90CF9008951F920F920FB6DB\r
-:103560000F9211248F939F93AF93BF938091CE01BD\r
-:103570009091CF01A091D001B091D1010196A11DF0\r
-:10358000B11D8093CE019093CF01A093D001B09351\r
-:10359000D101BF91AF919F918F910F900FBE0F906E\r
-:1035A0001F9018950E94350BF8942FEF87EA91E64B\r
-:1035B000215080409040E1F700C0000087E090EB90\r
-:1035C000DC018093EE019093EF01A093F001B093A2\r
-:1035D000F1012CE088E190E00FB6F894A895809373\r
-:1035E00060000FBE20936000FFCFEF92FF920F9319\r
-:1035F0001F93CF93DF93E82EF12C8F2D0E9410059F\r
-:10360000C0E0D0E0082F10E098010C2E02C03595E4\r
-:1036100027950A94E2F720FD05C02196C630D10512\r
-:1036200099F709C06C2F7F2D80E00E94D705E81222\r
-:10363000F4CF81E005C0F3948EE0F812DECF80E095\r
-:10364000DF91CF911F910F91FF90EF900895CF934D\r
-:10365000C82F8CE20E94F51A882321F08C2FCF917D\r
-:103660000C94F51A80E0CF910895CF930E947A1CB4\r
-:10367000811102C00E94601CC5E6C15049F00E9441\r
-:1036800023048FE39CE90197F1F700C00000F5CF18\r
-:1036900089E20E94271B811111C18AE20E94271B27\r
-:1036A00081110E94601C85E00E94271B81110E94ED\r
-:1036B000D21A0E94851C8093CC0187E00E94271BB0\r
-:1036C000882399F18BE10E94271B882351F0909168\r
-:1036D000CC0191FB882780F921E0822780FB91F9BA\r
-:1036E00022C08EE00E94271B882351F09091CC01CC\r
-:1036F00092FB882780F921E0822780FB92F913C092\r
-:1037000080E10E94271B9091CC01882341F093FB1C\r
-:10371000882780F921E0822780FB93F904C0892F54\r
-:10372000809580FB90F99093CC018091CC010E9410\r
-:10373000891C0E94971C8093DF0180EE0E94271B4A\r
-:10374000882341F08091DF01982F909590FB80F9BC\r
-:103750008093DF0189E30E94271B882359F0909111\r
-:10376000DF0191FB882780F921E0822780FB91F916\r
-:103770009093DF0182EE0E94271B882359F09091DD\r
-:10378000DF0192FB882780F921E0822780FB92F9F4\r
-:103790009093DF0186EE0E94271B882359F09091B9\r
-:1037A000DF0193FB882780F921E0822780FB93F9D2\r
-:1037B0009093DF0183EE0E94271B882359F090919C\r
-:1037C000DF0194FB882780F921E0822780FB94F9B0\r
-:1037D0009093DF0185E30E94271B882359F0909185\r
-:1037E000DF0195FB882780F921E0822780FB95F98E\r
-:1037F0009093DF0181E30E94271B882359F0909169\r
-:10380000DF0196FB882780F921E0822780FB96F96B\r
-:103810009093DF0181E10E94271B882359F090914A\r
-:10382000DF0197FB882780F921E0822780FB97F949\r
-:103830009093DF018091DF010E949B1C8091DF014A\r
-:1038400087FB882780F980930D0187E20E94271B60\r
-:10385000C82F8EE10E94271B8111C2608FE10E9458\r
-:10386000271B8111C46080E20E94271B8111C86060\r
-:1038700081E20E94271B8111C06182E20E94271B06\r
-:103880008111C06283E20E94271B8111C06484E21F\r
-:103890000E94271B882311F0C06802C0CC2329F0A6\r
-:1038A0008C2F0E94921C6C2F03C00E948E1C682FCC\r
-:1038B00070E080E090E0CF910C948A17CF9108954A\r
-:1038C0006DEE7EEF80E090E00E94B62260E082E044\r
-:1038D00090E00E94A82260E083E090E00E94A8228D\r
-:1038E00060E084E090E00E94A82260E085E090E043\r
-:1038F0000C94A82280E090E00E94A22221E08D3E5C\r
-:103900009E4F09F020E0822F089582E090E00C9411\r
-:103910009A22682F82E090E00C94A82283E090E045\r
-:103920000C949A22682F83E090E00C94A82284E003\r
-:1039300090E00C949A22682F84E090E00C94A822E6\r
-:103940008091D40180FF0BC06091130185E0689FD6\r
-:10395000B001112475956795759567952AC081FF0B\r
-:1039600009C06091130185E0689FB001112475952D\r
-:1039700067951FC082FF07C06091130185E0689FB3\r
-:10398000B001112416C04091D5014423C9F06091C3\r
-:103990001201461788F72091130185E0289F9001B6\r
-:1039A0001124429FC001439F900D112470E00E949A\r
-:1039B0006C226038710540F46115710539F002C060\r
-:1039C00065E070E0862F08958FE7089581E00895FF\r
-:1039D0008091D40180FF08C06091110170E075955D\r
-:1039E00067957595679521C081FF06C060911101AB\r
-:1039F00070E07595679519C082FF04C06091110150\r
-:103A000070E010C08091D5018823C1F06091100151\r
-:103A10008617A0F790911101989FC001112470E0C2\r
-:103A20000E946C226038710528F46115710521F03F\r
-:103A3000862F08958FE7089581E0089561E070E092\r
-:103A4000F4CF803F21F40E94A01C819504C0813FE7\r
-:103A500029F40E94A01C8093D8010895823F21F48C\r
-:103A60000E94A01C819504C0833F29F40E94A01CE1\r
-:103A70008093D7010895893F19F40E94E81C05C07E\r
-:103A80008A3F31F40E94E81C81958093D901089502\r
-:103A90008B3F21F40E94E81C819504C08C3F29F4DF\r
-:103AA0000E94E81C8093DA010895843F21F48091FC\r
-:103AB000D601816017C0853F21F48091D6018260D4\r
-:103AC00011C0863F21F48091D60184600BC0873FEE\r
-:103AD00021F48091D601886005C0883F31F480913F\r
-:103AE000D60180618093D60108958D3F21F48091A5\r
-:103AF000D40181600BC08E3F21F48091D40182609B\r
-:103B000005C08F3F29F48091D40184608093D40153\r
-:103B10000895803F39F48091D80187FF6CC01092DE\r
-:103B2000D80169C0813F29F48091D8011816BCF3EF\r
-:103B300062C09091D701823F29F497FF5CC0109238\r
-:103B4000D70159C0833F19F41916CCF354C0893FEB\r
-:103B500041F48091D90118160CF04DC01092D90192\r
-:103B60004AC08A3F29F48091D90187FF44C0F6CF2B\r
-:103B70008B3F39F48091DA0187FF3DC01092DA0162\r
-:103B80003AC08C3F29F48091DA011816BCF333C097\r
-:103B9000843F21F48091D6018E7F17C0853F21F4A8\r
-:103BA0008091D6018D7F11C0863F21F48091D6018E\r
-:103BB0008B7F0BC0873F21F48091D601877F05C0A2\r
-:103BC000883F31F48091D6018F7E8093D60113C057\r
-:103BD0008D3F21F48091D4018E7F0BC08E3F21F464\r
-:103BE0008091D4018D7F05C08F3F29F48091D4014D\r
-:103BF0008B7F8093D4018091D70181110EC0809179\r
-:103C0000D80181110AC08091D901811106C080912B\r
-:103C1000DA01811102C01092D501089586ED91E07C\r
-:103C20000E94460E0E94781A9093D3018093D2018D\r
-:103C300008951F93CF93DF938091D2019091D30188\r
-:103C40000E94841A4091D501442321F0209114014F\r
-:103C500030E006C0209115015AE0259F9001112403\r
-:103C60008217930708F482C08091D7011091D80180\r
-:103C7000D091D901C091DA01811107C0111105C09D\r
-:103C8000D11103C0CC2309F471C04F3F19F04F5F2D\r
-:103C90004093D501181624F40E94A01C8093D701EC\r
-:103CA0008091D70187FF05C00E94A01C8195809359\r
-:103CB000D701111624F40E94A01C8093D801809192\r
-:103CC000D80187FF05C00E94A01C81958093D80170\r
-:103CD0006091D701662339F11091D801112319F1B0\r
-:103CE000772767FD7095872F972F0E947D2123E30B\r
-:103CF00033E343E35FE30E94E1210E944A216093A2\r
-:103D0000D701612F772767FD7095872F972F0E9426\r
-:103D10007D2123E333E343E35FE30E94E1210E943B\r
-:103D20004A216093D8011D1624F40E94E81C809358\r
-:103D3000D9018091D90187FF05C00E94E81C8195B7\r
-:103D40008093D9011C1624F40E94E81C8093DA01A8\r
-:103D50008091DA0187FF05C00E94E81C819580935D\r
-:103D6000DA01DF91CF911F910C940E1EDF91CF915C\r
-:103D70001F910895E6EDF1E085E0DF011D928A953F\r
-:103D8000E9F71092D5011092D4010895833081F1A2\r
-:103D900028F4813059F08230D1F00895853009F44B\r
-:103DA00049C0B8F1863009F456C008952091150134\r
-:103DB000862F90E0820F911D8F3F910520F4620FB6\r
-:103DC0006093150108958FEF809315010895209158\r
-:103DD0001401862F90E0820F911D8F3F910520F4F2\r
-:103DE000620F6093140108958FEF8093140108957A\r
-:103DF00020911301862F90E0820F911D8F3F910536\r
-:103E000020F4620F6093130108958FEF80931301E4\r
-:103E1000089520911201862F90E0820F911D8F3F0F\r
-:103E2000910520F4620F6093120108958FEF809343\r
-:103E30001201089520911101862F90E0820F911DAB\r
-:103E40008F3F910520F4620F6093110108958FEF69\r
-:103E500080931101089520911001862F90E0820F28\r
-:103E6000911D8F3F910520F4620F6093100108951A\r
-:103E70008FEF809310010895833011F128F4813081\r
-:103E800049F0823091F00895853081F120F186303B\r
-:103E9000C1F1089580911501681720F4861B809365\r
-:103EA0001501089510921501089580911401681765\r
-:103EB00020F4861B80931401089510921401089534\r
-:103EC00080911301681720F4861B809313010895D5\r
-:103ED00010921301089580911201681720F4861B37\r
-:103EE000809312010895109212010895809111019A\r
-:103EF000681720F4861B8093110108951092110118\r
-:103F0000089580911001681720F4861B809310019A\r
-:103F100008951092100108958D3109F442C020F5E2\r
-:103F20008E3009F479C070F4873009F45EC020F453\r
-:103F3000863009F442C033C08830D1F18B3009F4A7\r
-:103F4000A7C02DC0863109F4A3C038F4803109F42C\r
-:103F50006DC0813109F47BC022C0893109F498C059\r
-:103F60008B3109F44FC01BC0853309F479C048F484\r
-:103F7000873209F475C008F478C0893209F470C03A\r
-:103F80000EC0833438F48A3308F071C0883309F4E2\r
-:103F90007FC005C0833409F463C08834C1F080E079\r
-:103FA00008950E9404210E942F0E0E94340770C0C1\r
-:103FB0000E94851C0E94971C6BC08091CC01817F60\r
-:103FC0008E7F8093CC0181E08093DC0108950E9474\r
-:103FD00090132FEF83ED90E3215080409040E1F764\r
-:103FE00000C000000E94D21A53C09091CC01892FCA\r
-:103FF000817090FF03C0917F9E7F26C09160909357\r
-:10400000CC0146C09091CC0191FB882780F921E03A\r
-:10401000822780FB91F913C09091CC0192FB8827F5\r
-:1040200080F921E0822780FB92F909C09091CC01B0\r
-:1040300093FB882780F921E0822780FB93F99093F6\r
-:10404000CC01882329F191609093CC0108950E94BE\r
-:10405000901380910D0191E0892780930D0118C084\r
-:1040600061E070E080E090E00FC023EE01C027EC3B\r
-:10407000280F61E070E080E090E004C0660F771FD9\r
-:10408000881F991F2A95D2F70E948A170E949013C1\r
-:1040900081E0089580E0089580E00895CF93C82FCF\r
-:1040A0008091DC01813079F018F08230D1F184C048\r
-:1040B000A0910E01B0910F018C91813169F0823293\r
-:1040C00009F07CC009C0A0910E01B0910F018C9144\r
-:1040D000813111F0823249F48C2F0E944A208111E3\r
-:1040E0001DC08C2F0E948C1F1AC08C2F0E944C2048\r
-:1040F000811114C0C43179F048F4CB3079F0C0316B\r
-:1041000009F060C082E08093DC0108C0C93219F078\r
-:10411000C83321F057C01092DC0154C081E0817097\r
-:1041200053C0C93289F118F5C43171F1A8F4C73010\r
-:1041300009F046C08AE08093150194E19093140140\r
-:1041400093E0909313018093120188E08093110112\r
-:1041500088E28093100134C0CE51C63088F5EC2F30\r
-:10416000F0E0E65DFE4F80818093DB0129C0CE3414\r
-:10417000E9F020F4CB3421F56AE013C0C13579F0C1\r
-:10418000C235F1F461E00DC08091DB01882319F0A4\r
-:104190001092DB0115C081E08093DC0115C061E065\r
-:1041A00006C08091DB010E94C61E0AC06AE08091B1\r
-:1041B000DB010E943C1F04C01092DC0180E004C0BF\r
-:1041C00081E002C080E0ABCFCF910895E1E8F0E05C\r
-:1041D0008081886080838081816080838FB7F8943C\r
-:1041E00093E09093890090ED909388008FBF08959D\r
-:1041F000EFE6F0E08081826080830895EFE6F0E0F2\r
-:1042000080818D7F80830895EFE6F0E0808192E0E9\r
-:104210008927808308951F920F920FB60F92112461\r
-:104220002F933F934F935F936F937F938F939F93BE\r
-:10423000AF93BF93EF93FF938091DD019091DE01E7\r
-:1042400001969093DE018093DD01811103C082E02D\r
-:104250000E943407E091DE01E695E695F0E0E6572E\r
-:10426000FB4FE4918091DD018E1303C080E00E943A\r
-:104270003407FF91EF91BF91AF919F918F917F9103\r
-:104280006F915F914F913F912F910F900FBE0F90C3\r
-:104290001F90189504D06894B1118DC0089570D006\r
-:1042A00088F09F5790F0B92F9927B751A0F0D1F01F\r
-:1042B000660F771F881F991F1AF0BA95C9F712C0A9\r
-:1042C000B13081F077D0B1E0089574C0672F782FB6\r
-:1042D0008827B85F39F0B93FCCF386957795679515\r
-:1042E000B395D9F73EF490958095709561957F4F81\r
-:1042F0008F4F9F4F0895E89409C097FB3EF4909527\r
-:104300008095709561957F4F8F4F9F4F9923A9F0AE\r
-:10431000F92F96E9BB279395F6958795779567953D\r
-:10432000B795F111F8CFFAF4BB0F11F460FF1BC081\r
-:104330006F5F7F4F8F4F9F4F16C0882311F096E914\r
-:1043400011C0772321F09EE8872F762F05C06623C2\r
-:1043500071F096E8862F70E060E02AF09A95660F7B\r
-:10436000771F881FDAF7880F9695879597F9089534\r
-:1043700057FD9058440F551F59F05F3F71F0479516\r
-:10438000880F97FB991F61F09F3F79F087950895FB\r
-:10439000121613061406551FF2CF4695F1DF08C01A\r
-:1043A000161617061806991FF1CF86957105610537\r
-:1043B00008940895E894BB2766277727CB0197F9DF\r
-:1043C00008950BD078C069D028F06ED018F09523EE\r
-:1043D00009F05AC05FC01124EECFCADFA0F3959F49\r
-:1043E000D1F3950F50E0551F629FF001729FBB27DC\r
-:1043F000F00DB11D639FAA27F00DB11DAA1F649F88\r
-:104400006627B00DA11D661F829F2227B00DA11D3A\r
-:10441000621F739FB00DA11D621F839FA00D611DC0\r
-:10442000221F749F3327A00D611D231F849F600DE1\r
-:10443000211D822F762F6A2F11249F5750408AF01A\r
-:10444000E1F088234AF0EE0FFF1FBB1F661F771FA6\r
-:10445000881F91505040A9F79E3F510570F014C03D\r
-:10446000AACF5F3FECF3983EDCF38695779567958E\r
-:10447000B795F795E7959F5FC1F7FE2B880F911DC4\r
-:104480009695879597F9089597F99F6780E870E06A\r
-:1044900060E008959FEF80EC089500240A941616BA\r
-:1044A000170618060906089500240A941216130622\r
-:1044B000140605060895092E0394000C11F48823B0\r
-:1044C00052F0BB0F40F4BF2B11F460FF04C06F5FCC\r
-:1044D0007F4F8F4F9F4F089597FB072E16F4009440\r
-:1044E00007D077FD09D00E94862207FC05D03EF454\r
-:1044F000909581959F4F0895709561957F4F089590\r
-:10450000EE0FFF1F0590F491E02D0994AA1BBB1B31\r
-:1045100051E107C0AA1FBB1FA617B70710F0A61BC3\r
-:10452000B70B881F991F5A95A9F780959095BC01E4\r
-:10453000CD010895F999FECF92BD81BDF89A9927D2\r
-:1045400080B50895A8E1B0E042E050E00C94BD22AF\r
-:10455000262FF999FECF1FBA92BD81BD20BD0FB69F\r
-:10456000F894FA9AF99A0FBE019608950E94A8222B\r
-:10457000272F0C94A922DC01CB01FC01F999FECF75\r
-:1045800006C0F2BDE1BDF89A319600B40D924150DB\r
-:0A4590005040B8F70895F894FFCFEB\r
-:10459A0020023607C307A0076C0739070101BA01D1\r
-:1045AA0028080A03140A3F4D36394B04FE03C80390\r
-:1045BA008F0322033B0354036D0301020304050620\r
-:0445CA0007080900D5\r
+:100000000C945F040C94A3040C94A3040C94A30418\r
+:100010000C94A3040C94A3040C94A3040C94A304C4\r
+:100020000C94A3040C94A3040C94BC0D0C948E0E9D\r
+:100030000C94A3040C94A3040C94A3040C94A304A4\r
+:100040000C94A3040C9439230C94A3040C94A304DF\r
+:100050000C94A3040C94DB1C0C94A3040C94A30434\r
+:100060000C94A3040C94A3040C94A3040C94A30474\r
+:100070000C94A3040C94A3040C94A3040C94A30464\r
+:100080000C94A3040C94A3040C94A3040C94A30454\r
+:100090000C94A3040C94A3040C94A3040C94A30444\r
+:1000A0000C94A3040C94A3040C94A304F30E150F56\r
+:1000B0000010150F0010570F7A0F0010CF0FE20F2E\r
+:1000C000D612D61204130413461382138215821516\r
+:1000D0009A138215911491145C158215821570156E\r
+:1000E000000000810889248935812B850252E100B6\r
+:1000F000E00000001E00140004001D0000774E0008\r
+:100100001F001A0016001B00007F4C002000080092\r
+:1001100007000600E2002A0021001500090019006E\r
+:10012000E3004B00220017000A00050000004A000F\r
+:1001300029002F0000002B0200004D002D00300090\r
+:1001400000002B000000500023001C000B001100D9\r
+:1001500000004F00240018000D001000E7005200BE\r
+:1001600025000C000E003600E6002C0026001200D0\r
+:100170000F003700007F28002700130033003800ED\r
+:10018000007751002E8131853482E500E4000000C3\r
+:100190000100C300C2003900010000002900010075\r
+:1001A0000100010001000100010001000100010047\r
+:1001B0000100010001000100010001000100010037\r
+:1001C0000100010001000100010001000100010027\r
+:1001D0000100010000000100010001000000010019\r
+:1001E000000001000100010000000100000001000A\r
+:1001F00001000100010001000000010001000100F8\r
+:1002000001000100010001000100010001000100E6\r
+:1002100001000100010001000100010001000100D6\r
+:100220000100010001000100010001000100C30004\r
+:10023000C200390001000000C20005520252E10074\r
+:10024000010000003A001E022002220201005100BB\r
+:100250003B001F0221022302010028003C002F0264\r
+:1002600026022F0001002C003D0030022702300042\r
+:10027000010052003E00240235003502000050000B\r
+:100280000100360200002B0000004F000100370281\r
+:1002900000002B0200004A003F003102380031000C\r
+:1002A00000004D004000240021001E0027004B00EC\r
+:1002B0004100250022001F0037004C0042002600AC\r
+:1002C000230020002E002A004300380025022D00C4\r
+:1002D0002E024E00C20005520252E5002800000026\r
+:1002E000045205520852E100010000003A001E02CB\r
+:1002F00020022202010051003B001F0221022302C2\r
+:10030000010028003C002F0226022F0001002C00D3\r
+:100310003D00300227023000010052003E0024025E\r
+:1003200035003502000050000100360200002B00AD\r
+:1003300000004F000100370200002B0200004A00BD\r
+:100340003F0031023800310000004D004000240021\r
+:1003500021001E0027004B004100250022001F0045\r
+:1003600037004C0042002600230020002E002A0007\r
+:100370004300380025022D002E024E000452055283\r
+:100380000852E5002800000001000654C1003900B1\r
+:10039000010000002900010001000100010001002E\r
+:1003A0000100010001000100010001000100010045\r
+:1003B0000100010001000100010001000100010035\r
+:1003C0000100010001000100010001000000010026\r
+:1003D0000100010000000100000001000100010017\r
+:1003E0000000010000000100010001000100010007\r
+:1003F00000000100010001000100010001000100F6\r
+:1004000001000100010001000100010001000100E4\r
+:1004100001000100010001000100010001000100D4\r
+:100420000100010001000654C10039000100000074\r
+:10043000C30005520252E100A8000000440066001B\r
+:10044000A6000100AA00B50045000100F20001006D\r
+:10045000A90001006800F000F100F100F400B6000E\r
+:1004600069000100F3000100F500B4006A0001001A\r
+:10047000010001000000B8000100F9000000FA00CE\r
+:100480000000B9000100F9000000FA000000AC0013\r
+:100490006B004600530001000000AB006C004A00F6\r
+:1004A00050004D004900A9006D005200510051005C\r
+:1004B0004C00AE006E004B004F004E000100AD003E\r
+:1004C0006F00B100B30001000100AA00C300055293\r
+:1004D0000252E50001000000075208520000E1004E\r
+:1004E000A800000044006600A6000100AA00B500B4\r
+:1004F00045000100F2000100A90001006800F000C1\r
+:10050000F100F100F400B60069000100F300010001\r
+:10051000F500B4006A000100010001000000B8000D\r
+:100520000100F9000000FA000000B9000100F90024\r
+:100530000000FA000000AC006B0046005300010010\r
+:100540000000AB006C004A0050004D004900A900BB\r
+:100550006D005200510051004C00AE006E004B0087\r
+:100560004F004E000100AD006F00B100B30001006C\r
+:100570000100AA00075208520000E5000100000037\r
+:100580000100C10001003900010000002900010044\r
+:100590000100010001000100010001000100010053\r
+:1005A0000100010001000100010001000100010043\r
+:1005B0000100010001000100010001000100010033\r
+:1005C0000100010000000100010001000000010025\r
+:1005D0000000010001000100000001000000010016\r
+:1005E0000100010001000100000001000100010004\r
+:1005F00001000100010001000100010001000100F3\r
+:1006000001000100010001000100010001000100E2\r
+:100610000100010001000100010001000100C10012\r
+:100620000100390001000000C100010001000100CB\r
+:10063000010000002900010001000100010001008B\r
+:1006400001000100010001000100010001000100A2\r
+:100650000100010001000100010001000100010092\r
+:100660000100010001000100010001000000010083\r
+:100670000100010000000100000001000100010074\r
+:100680000000010000000100010001000100010064\r
+:100690000000010001000100010001000100010053\r
+:1006A0000100010001000100010001000100010042\r
+:1006B0000100010001000100010001000100010032\r
+:1006C00001000100C1000100010001000100000063\r
+:1006D00016034500720067006F0044006F00780049\r
+:1006E000200045005A000000160345007200670014\r
+:1006F0006F0044006F007800200045005A000000A1\r
+:100700000403090409026D00040100A0FA090400B1\r
+:10071000000103010100092111010001223F00072E\r
+:1007200005810308000A0904010001030102000910\r
+:100730002111010001224D000705820308000A096A\r
+:10074000040200010300000009211101000122360A\r
+:10075000000705830308000A0904030001030000E1\r
+:10076000000921110100012239000705840310004E\r
+:10077000011201100100000008EDFE071301000145\r
+:1007800002000105010906A101050719E029E71585\r
+:1007900000250195087501810205081901290595B3\r
+:1007A000057501910295017503910105071900294D\r
+:1007B0007715002501957875018102C00501098032\r
+:1007C000A101850216010026B7001A01002AB70010\r
+:1007D000751095018100C0050C0901A10185031662\r
+:1007E0000100269C021A01002A9C027510950181C5\r
+:1007F00000C005010902A1010901A10005091901B3\r
+:1008000029051500250195057501810295017503DE\r
+:1008100081010501093009311581257F950275088F\r
+:10082000810609381581257F950175088106050C1B\r
+:100830000A38021581257F950175088106C0C0051B\r
+:10084000010906A101050719E029E7150025019511\r
+:1008500008750181029501750881010508190129B2\r
+:10086000059505750191029501750391010507191B\r
+:100870000029FF150025FF950675088100C00000BE\r
+:10088000000000000000000000010204060A0F172B\r
+:10089000202C3A4A5D71879DB3C7DAE9F5FCFFFC6D\r
+:1008A000F5E9DAC7B39D87715D4A3A2C20170F0A24\r
+:1008B00006040201000000000000000000001124F6\r
+:1008C0001FBECFEFDAE0DEBFCDBF04B603FE24C00B\r
+:1008D0008091EF019091F001A091F101B091F201AE\r
+:1008E0008730904BA740B04BB9F41092EF011092B3\r
+:1008F000F0011092F1011092F20114BE84B7877FCB\r
+:1009000084BF88E10FB6F894809360001092600075\r
+:100910000FBEE0E0FFE3099511E0A0E0B1E0E6EFF3\r
+:10092000F9E402C005900D92A433B107D9F721E094\r
+:10093000A4E3B1E001C01D92AF3EB207E1F70E940F\r
+:10094000020B0C94F9240C94000061110BC0FC0103\r
+:100950008281882321F085EE0E94631103C085EE19\r
+:100960000E942B1280E090E008950895CF9360914B\r
+:10097000B1017091B2018091B3019091B4010E94D4\r
+:10098000071CC82F8130F9F08430E9F089EF8C0F13\r
+:100990008230C8F056985E9825982D9826982E9803\r
+:1009A00027982F980E943B1081FF02C0259A2D9A0C\r
+:1009B0008EEF8C0F823010F4269A2E9AC550C230DA\r
+:1009C00010F4279A2F9ACF9108950C94B604569854\r
+:1009D0005E9825982D9826982E9827982F988FEF17\r
+:1009E00090E0909389008093880090938B0080938F\r
+:1009F0008A0090938D0080938C00259A2D9A2FEF7A\r
+:100A000080E792E0215080409040E1F700C0000074\r
+:100A1000269A2E9A2FEF80E792E021508040904056\r
+:100A2000E1F700C00000279A2F9A2FEF80E792E0AD\r
+:100A3000215080409040E1F700C0000025982D989B\r
+:100A40002FEF80E792E0215080409040E1F700C016\r
+:100A5000000026982E982FEF80E792E021508040EA\r
+:100A60009040E1F700C0000027982F9856985E98B4\r
+:100A700025982D9826982E9827982F98089589EADA\r
+:100A80008093800089E08093810024982C983F987F\r
+:100A90008AB18F748AB96E98479A8BB1806B8BB983\r
+:100AA000769A0E94E7040C94B50480E280930001DA\r
+:100AB0008091340181110EC00E94A40581E08093D1\r
+:100AC00034012FEF83ED90E3215080409040E1F717\r
+:100AD00000C0000080E40E94AA05809300018111FB\r
+:100AE0002EC00E94D40580930001811128C00E946D\r
+:100AF000D40580930001811122C08FE30E94D405A8\r
+:100B00008093000181111BC00E94CC0580E40E94EB\r
+:100B1000AA0580930001811112C08CE00E94D405C7\r
+:100B20008093000181110BC00E94D40580930001C5\r
+:100B3000811105C08FE30E94D405809300010E94BB\r
+:100B4000CC058091000108951092B9008AE080934D\r
+:100B5000B800089594EA9093BC009091BC0097FF70\r
+:100B6000FCCF9091B900987F983021F0903111F02E\r
+:100B700081E008958093BB0084E88093BC0080915D\r
+:100B8000BC0087FFFCCF8091B900887F883111F0CD\r
+:100B9000803471F780E0089584E98093BC008091EF\r
+:100BA000BC0084FDFCCF08958093BB0084E8809353\r
+:100BB000BC008091BC0087FFFCCF9091B900987F6A\r
+:100BC00081E0983209F480E0089584E88093BC00C5\r
+:100BD0008091BC0087FFFCCF8091BB00089580917D\r
+:100BE0000001811115C080E40E94AA0580930001D4\r
+:100BF00081110CC082E10E94D40580930001811113\r
+:100C000005C08FEF0E94D405809300010E94CC059F\r
+:100C100084B1807F84B985B1807F85B98AB1837FB3\r
+:100C20008AB98BB1837F8BB93E98469808950E940C\r
+:100C30005505809300010E94EF0580B38C7080BB46\r
+:100C400081B3836F81BBE4E4F1E0A6E3B1E01192EC\r
+:100C50001D9281E0E235F807D1F70C943F05BF9271\r
+:100C6000CF92DF92EF92FF920F931F93CF93DF9378\r
+:100C700080910001882379F0809135018F5F809306\r
+:100C80003501811108C00E94550580930001811132\r
+:100C900002C00E94E70406E311E0C0E0D0E0DD24DA\r
+:100CA000D39482E0C82EEE24E394F12CC73000F5F3\r
+:100CB00080910001811162C080E40E94AA058093A6\r
+:100CC0000001811112C082E10E94D40580930001CD\r
+:100CD00081110BC0C7010C2E01C0880F0A94EAF7DE\r
+:100CE00080950E94D405809300010E94CC0546C0E7\r
+:100CF000CA30A1F028F4C83059F0C93061F005C0FD\r
+:100D0000CC3089F070F0CD3089F0209A289810C04E\r
+:100D1000219A29980DC0229A2A980AC0239A2B98C2\r
+:100D200007C0529A01C0539A5B9802C03E9A4698F7\r
+:100D3000E0EAEA95F1F78FB179995AC092E08170B3\r
+:100D40008D25892B7C9B02C090E001C094E0892B0B\r
+:100D50007D9B02C090E001C098E0892B7E9B02C081\r
+:100D600090E001C090E1892B9FB19095991F992740\r
+:100D7000991F9295990F907E892B0FC08091000149\r
+:100D800081114BC080E40E94AA0580930001882352\r
+:100D900089F1B12C0E94CC058B2DF8019081981718\r
+:100DA00019F08083C09201010E94EF0521960F5F28\r
+:100DB0001F4FCE30D10509F079CF809101018823F2\r
+:100DC00071F1815080930101882339F08FE99FE010\r
+:100DD0000197F1F700C0000022C0A4E4B1E0E6E30F\r
+:100DE000F1E081918D9391E0E434F907D1F717C0D8\r
+:100DF00090E0A5CF83E10E94D4058093000181118A\r
+:100E0000C8CF81E40E94AA05809300018111C1CF5F\r
+:100E10000E94E505B82EB094BDCF80E0BECF0E9401\r
+:100E2000E50481E0DF91CF911F910F91FF90EF904A\r
+:100E3000DF90CF90BF900895E82FF0E0EC5BFE4F7D\r
+:100E40008081089508958B3B910578F4883A910547\r
+:100E500040F5853A9105D0F48430910508F0B1C091\r
+:100E60008130910509F4ADC06BC0803E910508F456\r
+:100E700067C0883E910508F4A4C09C01205F310939\r
+:100E80002031310508F05CC090650895853A9105E0\r
+:100E900009F459C0863A910509F458C083E890E4F2\r
+:100EA0000895883A910509F454C0893A910509F4E6\r
+:100EB00053C08A3A910509F452C08B3A910509F45E\r
+:100EC00051C08C3A910509F450C08D3A910509F44E\r
+:100ED0004FC0803B910509F44EC08E3A910509F44C\r
+:100EE0004DC08F3A910509F44CC0813B910509F43E\r
+:100EF0004BC0823B910509F44AC0833B910509F43C\r
+:100F000049C0843B910509F448C0853B910509F42B\r
+:100F100047C0863B910509F446C0873B910509F41B\r
+:100F200045C0883B910509F444C0893B910509F40B\r
+:100F300043C08A3B910509F042C08AE296E40895D5\r
+:100F400080E090E0089581E890E4089582E890E4DC\r
+:100F5000089582EE94E4089589EE94E408958AEE6B\r
+:100F600094E4089585EB94E4089586EB94E4089561\r
+:100F700087EB94E408958CEC94E408958DEC94E46C\r
+:100F8000089583E895E408958AE895E4089582E950\r
+:100F900095E4089584E995E4089581E296E408953E\r
+:100FA00083E296E4089584E296E4089585E296E467\r
+:100FB000089586E296E4089587E296E4089580E035\r
+:100FC00094E40895089596E0799FF001112494E542\r
+:100FD000899FE00DF11D1124E60FF11DEE0FFF1F9B\r
+:100FE000E851FF4F859194910895880F991F805A79\r
+:100FF0009040FC01859194910895880F991F80522B\r
+:101000009F4FFC0185919491089526E0729FF00115\r
+:10101000112444E5849FE00DF11D1124E60FF11D1C\r
+:10102000EE0FFF1FE851FF4F25913491C9019A95AA\r
+:1010300081159F4110F4C9010895C901905281158D\r
+:10104000904128F4C9019F700E94FD070895C901CD\r
+:1010500090538115904120F4C9019927906C08950F\r
+:10106000211580E5380769F40E94A5159FEF24E358\r
+:101070004CE0915020404040E1F700C000000C944B\r
+:10108000001D213080E5380731F48091CD01816069\r
+:101090008093CD010895C90190558115904108F0C4\r
+:1010A00050C0832F99278F70992781309105D9F4EB\r
+:1010B000A9014370552702C0880F991F4A95E2F78E\r
+:1010C0009C68A90164E0440F551F6A95E1F7442725\r
+:1010D0005370842B952B73E0220F331F7A95E1F721\r
+:1010E000207633271DC08230910529F4922F88275E\r
+:1010F000816F906A089583309105A9F4A901437026\r
+:10110000552781E090E002C0880F991F4A95E2F7C9\r
+:101110009C6843E0220F331F4A95E1F7207E377029\r
+:10112000822B932B08950497F1F4A901437055275E\r
+:1011300081E090E002C0880F991F4A95E2F79A6813\r
+:10114000E8CFC90190578115904120F4C9019F70E3\r
+:1011500090620895C90190588115904120F4C90109\r
+:101160009F70906A0895203E3105E0F4203C3105DF\r
+:1011700058F52133310509F470C048F4293231059E\r
+:1011800009F464C02A32310509F46EC074C02933F1\r
+:101190003105F1F022383105D9F02533310509F454\r
+:1011A0004EC069C0233E310589F138F4203E310537\r
+:1011B000C1F0223E3105E1F05EC0263E310569F105\r
+:1011C000273E3105A9F157C0C9010E94F5070895CE\r
+:1011D0008091E00180FD02C081FF4DC080EE90E073\r
+:1011E0004BC08091E00180FFF9CF89E390E044C0DB\r
+:1011F0008091E00182FF0EC08091E00184FF03C076\r
+:1012000080E090E039C083EE90E036C08091E0014C\r
+:1012100082FFF2CF82EE90E02FC08091E00183FF49\r
+:101220000BC08091E00184FDEBCF87EE90E024C0FD\r
+:101230008091E00183FFF5CF86EE90E01DC08091A4\r
+:10124000E00185FF07C089E290E016C08091E001CF\r
+:1012500085FFF9CF85E390E00FC08091E00186FF24\r
+:1012600007C08AE290E008C08091E00186FFF9CFD4\r
+:1012700081E390E001C0C9010E9423070895089509\r
+:101280000C943F09809162010895CF93DF9300D0C1\r
+:101290001F92CDB7DEB72091E601243019F523E087\r
+:1012A00029839B838A832093E9008FEF9091E80044\r
+:1012B000815095FD06C095ED9A95F1F700008111DA\r
+:1012C000F5CF8091E80085FF0DC040E050E063E07D\r
+:1012D00070E0CE0101960E94AF0B8091E8008E77FE\r
+:1012E0008093E8000F900F900F90DF91CF910895B9\r
+:1012F000CF93DF9300D01F92CDB7DEB72091E601E8\r
+:10130000243021F522E029839B838A8383E0809324\r
+:10131000E9008FEF9091E800815095FD06C095EDB2\r
+:101320009A95F1F700008111F5CF8091E80085FFD3\r
+:101330000DC040E050E063E070E0CE0101960E94F5\r
+:10134000AF0B8091E8008E778093E8000F900F90AC\r
+:101350000F90DF91CF9108952091E6012430F1F4B0\r
+:1013600022E02093E9002FEF3091E800215035FD75\r
+:1013700006C035ED3A95F1F700002111F5CF209127\r
+:10138000E80025FF0BC040E050E065E070E00E94FF\r
+:10139000AF0B8091E8008E778093E8000895CF939B\r
+:1013A000DF93EC018091E601843009F046C0909112\r
+:1013B0000C019923D9F090910D019923B9F08093F4\r
+:1013C000E9008FEF9091E800815095FD06C095E10E\r
+:1013D0009A95F1F700008111F5CF8091E80085FF23\r
+:1013E0002CC040E050E060E170E017C081E08093E5\r
+:1013F000E9008FEF9091E800815095FD06C095EDD2\r
+:101400009A95F1F700008111F5CF8091E80085FFF2\r
+:1014100014C040E050E068E070E0CE010E94AF0BE5\r
+:101420008091E8008E778093E80080E1FE01A2E5DC\r
+:10143000B1E001900D928A95E1F7DF91CF91089587\r
+:101440008091E501811109C00E94410D0E949E0D0D\r
+:101450008091E20084608093E20008951092E5019B\r
+:10146000089508950C9426230E94971C0E942C2313\r
+:101470000E943B100C94400942E061EC81E00E9424\r
+:10148000BB0C42E061EC82E00E94BB0C42E061ECEC\r
+:1014900083E00E94BB0C42E161EC84E00C94BB0C45\r
+:1014A0008091E801833009F455C030F4813071F047\r
+:1014B000823009F48EC008958A3009F47AC08B30E6\r
+:1014C00009F460C0893009F09CC020C08091E70118\r
+:1014D000813A09F096C08091E800877F8093E80008\r
+:1014E0008091EB019091EC01892B21F060E080E08C\r
+:1014F00090E003C060E182E591E070E00E94F80BAB\r
+:101500008091E8008B778093E80008958091E7014F\r
+:10151000813209F076C08091EB019091EC01009747\r
+:1015200019F0039709F06DC08091E800877F8093E0\r
+:10153000E8008091E80082FD05C08091E6018111FC\r
+:10154000F8CF5FC08091F100809362018091E80044\r
+:101550008B7753C08091E701813A09F052C08091A6\r
+:10156000EB019091EC01892B09F04BC08091E800D0\r
+:10157000877F8093E8008091E80080FFFCCF809116\r
+:101580000C0136C08091E7018132D9F58091EB01E1\r
+:101590009091EC01892BA9F58091E800877F8093D9\r
+:1015A000E8000E94F00C8091E90180930C010C94FA\r
+:1015B000A5158091E701813221F58091E800877FB0\r
+:1015C0008093E8000E94F00C8091EA01809363010F\r
+:1015D00008958091E701813AA1F48091E800877F26\r
+:1015E0008093E8008091E80080FFFCCF8091630148\r
+:1015F0008093F1008091E8008E778093E8000C944E\r
+:10160000F00C089584B7877F84BF88E10FB6F89403\r
+:1016100080936000109260000FBE90E080E80FB6EB\r
+:10162000F89480936100909361000FBE0E948A102D\r
+:101630000E94410D0E949E0D8091E2008460809383\r
+:10164000E20078940E9419100E948C1082E091E0D0\r
+:101650000E9436100E9414238091E601853069F4BF\r
+:101660000E945A1C8091E4018823B1F30E94821CDD\r
+:10167000882391F30E94990BEFCF0E949210ECCF38\r
+:10168000292F332723303105A9F06CF4213031059F\r
+:1016900009F442C02230310509F043C08DE690E0E4\r
+:1016A00024E037E042C021323105C9F02232310551\r
+:1016B00019F137C099278130910541F082309105A9\r
+:1016C00041F0892B71F5E0E0F7E005C0E8EEF6E0C7\r
+:1016D00002C0E0EDF6E0849190E09F0126C0643006\r
+:1016E00000F5E62FF0E0EE0FFF1FEE5DFE4F2081CC\r
+:1016F000318189E090E019C0643098F4E62FF0E081\r
+:10170000DF01AA0FBB1FA65EBE4F2D913C91EA5E82\r
+:10171000FE4F808190E009C082E190E021E737E050\r
+:1017200004C080E090E020E030E0FA0131832083C3\r
+:10173000089580E189BD82E189BD09B400FEFDCF35\r
+:101740008091D8008F7D8093D8008091E0008260E6\r
+:101750008093E0008091E00081FDFCCF0895CF925E\r
+:10176000DF92EF92FF920F931F93CF93DF937C0151\r
+:101770008B01EA010E94110D811131C0209731F0D7\r
+:1017800088819981081B190BE80EF91EC12CD12CF8\r
+:101790000115110519F18091E80085FD14C08091B3\r
+:1017A000E8008E778093E800209741F08881998146\r
+:1017B0008C0D9D1D9983888385E011C00E94110DB9\r
+:1017C000882331F30CC0F70181917F018093F100F0\r
+:1017D00001501109FFEFCF1ADF0ADACF80E0DF9165\r
+:1017E000CF911F910F91FF90EF90DF90CF900895D0\r
+:1017F0002091ED013091EE012617370748F0611571\r
+:10180000710539F42091E8002E772093E80001C09B\r
+:10181000B901FC0120E061157105B9F18091E60183\r
+:10182000882309F440C0853009F43FC08091E80066\r
+:1018300083FD3DC08091E80082FF06C08091E800F2\r
+:1018400082FF26C080E008958091E80080FFE3CF0A\r
+:101850002091F3008091F20090E0922B61157105C8\r
+:1018600051F08830910538F421912093F1006150B6\r
+:1018700071090196F3CF21E0089709F020E08091EB\r
+:10188000E8008E778093E800C6CF2111C7CFD6CF6E\r
+:101890008091E601882339F0853039F08091E800A5\r
+:1018A00083FFCCCF04C082E0089583E0089581E0F7\r
+:1018B00008952091ED013091EE012617370748F089\r
+:1018C0006115710539F42091E8002E772093E80026\r
+:1018D00001C0B901FC0120E061157105C1F18091E1\r
+:1018E000E601882309F441C0853009F440C08091A5\r
+:1018F000E80083FD3EC08091E80082FF06C0809131\r
+:10190000E80082FF27C080E008958091E80080FF12\r
+:10191000E3CF2091F3008091F20090E0922B6115CB\r
+:10192000710559F08830910540F424912093F1001D\r
+:101930003196615071090196F2CF21E0089709F0C4\r
+:1019400020E08091E8008E778093E800C5CF2111D8\r
+:10195000C6CFD5CF8091E601882339F0853039F0A4\r
+:101960008091E80083FFCBCF04C082E0089583E03C\r
+:10197000089581E00895982F973058F59093E900E5\r
+:10198000981739F07091EC002091ED005091F00023\r
+:1019900003C0242F762F50E021FF19C03091EB00B7\r
+:1019A0003E7F3093EB003091ED003D7F3093ED00B2\r
+:1019B0003091EB0031603093EB007093EC0020939A\r
+:1019C000ED005093F0002091EE0027FF07C09F5FCD\r
+:1019D000D3CF8F708093E90081E0089580E008956F\r
+:1019E0008091E70187FD05C08091E80080FF0EC06F\r
+:1019F00012C08091E80082FD05C08091E60181114E\r
+:101A0000F8CF08958091E8008B7708C08091E601B7\r
+:101A10008111EACF08958091E8008E778093E800E5\r
+:101A200008958091E4009091E50045E62091EC0056\r
+:101A300020FF21C02091E80020FD21C02091E60177\r
+:101A4000222389F0253089F02091EB0025FD0FC07D\r
+:101A50002091E4003091E5002817390739F341500F\r
+:101A600041F0C901E3CF82E0089583E0089581E069\r
+:101A7000089584E008952091E80022FFDFCF80E000\r
+:101A800008950E94AF0D0E94B70DE0EEF0E0808156\r
+:101A900081608083E8EDF0E080818F77808319BCDE\r
+:101AA000A7EDB0E08C918E7F8C9380818F7E8083B8\r
+:101AB0001092E50108950F931F93CF93DF930E9437\r
+:101AC000AF0D0E94B70DC8EDD0E088818F77888375\r
+:101AD00088818068888388818F7D888319BC109273\r
+:101AE000E6011092E2011092E4011092E30100EE8F\r
+:101AF00010E0F80180818B7F8083888181608883FA\r
+:101B000042E060E080E00E94BB0CE1EEF0E080810A\r
+:101B10008E7F8083E2EEF0E080818160808380812F\r
+:101B200088608083F80180818E7F808388818061D6\r
+:101B30008883DF91CF911F910F910895E8EDF0E038\r
+:101B400080818F7E8083E7EDF0E0808181608083FB\r
+:101B500084E082BF81E08093E5010C945B0DE8EDA9\r
+:101B6000F0E080818E7F80831092E20008951092D1\r
+:101B7000DA001092E10008951F920F920FB60F92B3\r
+:101B800011242F933F934F935F936F937F938F9382\r
+:101B90009F93AF93BF93EF93FF938091E10082FFF8\r
+:101BA0000BC08091E20082FF07C08091E1008B7F33\r
+:101BB0008093E1000E9418108091DA0080FF1FC01E\r
+:101BC0008091D80080FF1BC08091DA008E7F8093C7\r
+:101BD000DA008091D90080FF0DC080E189BD82E1EB\r
+:101BE00089BD09B400FEFDCF81E08093E6010E942B\r
+:101BF000200A05C019BC1092E6010E942E0A8091AD\r
+:101C0000E10080FF19C08091E20080FF15C0809143\r
+:101C1000E2008E7F8093E2008091E20080618093F9\r
+:101C2000E2008091D80080628093D80019BC85E0E2\r
+:101C30008093E6010E94320A8091E10084FF30C067\r
+:101C40008091E20084FF2CC080E189BD82E189BDE2\r
+:101C500009B400FEFDCF8091D8008F7D8093D8001D\r
+:101C60008091E1008F7E8093E1008091E2008F7E81\r
+:101C70008093E2008091E20081608093E200809195\r
+:101C8000E201882311F084E007C08091E30087FF20\r
+:101C900002C083E001C081E08093E6010E94340A23\r
+:101CA0008091E10083FF29C08091E20083FF25C07D\r
+:101CB0008091E100877F8093E10082E08093E601DC\r
+:101CC0001092E2018091E1008E7F8093E10080918B\r
+:101CD000E2008E7F8093E2008091E2008061809339\r
+:101CE000E20042E060E080E00E94BB0C8091F000E6\r
+:101CF00088608093F0000E94310AFF91EF91BF91BC\r
+:101D0000AF919F918F917F916F915F914F913F9193\r
+:101D10002F910F900FBE0F901F9018951F920F924A\r
+:101D20000FB60F9211242F933F934F935F936F93AE\r
+:101D30007F938F939F93AF93BF93CF93EF93FF9333\r
+:101D4000C091E900CF708091EC001092E900809181\r
+:101D5000F000877F8093F00078940E94CA0E109262\r
+:101D6000E9008091F00088608093F000C093E90062\r
+:101D7000FF91EF91CF91BF91AF919F918F917F9103\r
+:101D80006F915F914F913F912F910F900FBE0F90E8\r
+:101D90001F9018951F93CF93DF93CDB7DEB7AA9707\r
+:101DA0000FB6F894DEBF0FBECDBFE7EEF1E0809135\r
+:101DB000F100819321E0EF3EF207C9F70E94500A3B\r
+:101DC0008091E80083FF1CC12091E7013091E80178\r
+:101DD000832F90E08A30910508F012C1FC01EA5A85\r
+:101DE000FF4F0C94AE24203881F0223809F008C14E\r
+:101DF0008091EB018F708093E9008091EB0085FB6F\r
+:101E0000882780F91092E90006C08091E301909143\r
+:101E1000E401911182609091E800977F9093E8002F\r
+:101E20008093F1001092F100C5C0822F8D7F09F0E0\r
+:101E3000E7C0222319F0223061F0E2C08091E9016D\r
+:101E4000813009F0DDC0333009F080E08093E40197\r
+:101E500028C08091E901811124C02091EB012F70ED\r
+:101E600009F4CEC02093E9008091EB0080FF19C0F7\r
+:101E70008091EB00333011F4806211C08061809357\r
+:101E8000EB0081E090E0022E01C0880F0A94EAF78F\r
+:101E90008093EA001092EA008091EB0088608093C2\r
+:101EA000EB001092E9008091E800877F86C0211145\r
+:101EB000A7C01091E9011F778091E3008078812B02\r
+:101EC0008093E3008091E800877F8093E8000E9480\r
+:101ED000F00C8091E80080FFFCCF8091E3008068E7\r
+:101EE0008093E300112311F083E001C082E080932E\r
+:101EF000E60186C02058223008F082C08091E901B6\r
+:101F00009091EA018C3D23E0920779F583E08A8382\r
+:101F10008AE289834FB7F894DE01139620E03EE011\r
+:101F200051E2E32FF0E050935700E49120FF03C00B\r
+:101F3000E295EF703F5FEF708E2F90E0EA3010F087\r
+:101F4000C79601C0C0968D939D932F5F243149F7AA\r
+:101F50004FBF8091E800877F8093E8006AE270E0DD\r
+:101F6000CE0101960E94F80B14C0AE014F5F5F4F87\r
+:101F70006091EB010E94400B009709F441C0209151\r
+:101F8000E800277F2093E800BC0189819A810E94A4\r
+:101F9000590C8091E8008B778093E80031C020389D\r
+:101FA00079F58091E800877F8093E8008091E201D5\r
+:101FB0008093F1008091E8008E778093E8000E9482\r
+:101FC000F00C1EC021111CC09091E9019230C0F4A8\r
+:101FD0008091E800877F8093E8009093E2010E945F\r
+:101FE000F00C8091E201811104C08091E30087FF31\r
+:101FF00002C084E001C081E08093E6010E943C0AB7\r
+:102000008091E80083FF0AC08091E800877F809379\r
+:10201000E8008091EB0080628093EB00AA960FB6F7\r
+:10202000F894DEBF0FBECDBFDF91CF911F91089511\r
+:102030000895CF938091E6018823B1F08091E90063\r
+:102040008F709091EC0090FF02C090E801C090E08A\r
+:10205000C92FC82B1092E9008091E80083FD0E94EF\r
+:10206000CA0ECF70C093E900CF9108959093690193\r
+:10207000809368010895E0916801F09169013097BB\r
+:1020800021F00190F081E02D099480E00895E09125\r
+:102090006801F0916901309721F00280F381E02D11\r
+:1020A00009940895E0916801F0916901309721F059\r
+:1020B0000480F581E02D0994089520916601309106\r
+:1020C00067018217930771F090936701809366010F\r
+:1020D000E0916801F0916901309721F00680F78165\r
+:1020E000E02D0994089520916401309165018217D3\r
+:1020F000930771F09093650180936401E09168010A\r
+:10210000F0916901309721F00084F185E02D099468\r
+:10211000089508950C9489100E949D1C0E94170632\r
+:102120000C94631DCF92DF92EF92FF920F931F9357\r
+:10213000CF93DF93CDB7DEB72B970FB6F894DEBF02\r
+:102140000FBECDBF0E942F063BE6E32E31E0F32EFB\r
+:1021500000E010E0C02E802F0E941C07F701D190F4\r
+:102160007F01D826B1F40F5F1F4F0E30110591F794\r
+:102170008FEF89838A831B820E94A61C8160782F3F\r
+:102180009D838C8349815A816B818D810E94351199\r
+:1021900041C09091CD0191FF04C08B870E9422071E\r
+:1021A0008B8520E030E04D2D50E0922FBA01022EB9\r
+:1021B00002C0759567950A94E2F760FF25C02E83EB\r
+:1021C000CF82EE24E394F12C02C0EE0CFF1C9A9512\r
+:1021D000E2F790E08E219F2121E0892B09F420E095\r
+:1021E00028870E94A61C8160782F9A8789874E8154\r
+:1021F0005F8168858A850E943511F801E559FE4F97\r
+:1022000080818E25808306C02F5F3F4F26303105A9\r
+:1022100061F6A9CF0E94472010916A010E943B10ED\r
+:102220001817A1F00E943B1080936A012B960FB6FD\r
+:10223000F894DEBF0FBECDBFDF91CF911F910F91FC\r
+:10224000FF90EF90DF90CF900C9440092B960FB643\r
+:10225000F894DEBF0FBECDBFDF91CF911F910F91DC\r
+:10226000FF90EF90DF90CF900895CF93DF93CDB79D\r
+:10227000DEB72B970FB6F894DEBF0FBECDBF4F83EE\r
+:10228000588769877A878B87DE01119686E0FD0182\r
+:1022900011928A95E9F785E0FE01379601900D923B\r
+:1022A0008A95E1F749815A816B817C818D819E817C\r
+:1022B0000E9471182B960FB6F894DEBF0FBECDBFEB\r
+:1022C000DF91CF910895CF93C82F882309F4C1C01F\r
+:1022D000823859F40E943B1081FDBBC089E30E9403\r
+:1022E0000E1B0E94D81B89E30CC0833879F40E942E\r
+:1022F0003B1080FDAEC083E50E940E1B0E94D81BE0\r
+:1023000083E50E944E1BCF910C94D81B843859F45E\r
+:102310000E943B1082FD9DC087E40E940E1B0E941C\r
+:10232000D81B87E4EECF8CEF8C0F813A48F48C2FCA\r
+:102330000E947C2281118DC08C2F0E940E1BE3CF46\r
+:1023400080E28C0F883048F4C77081E001C0880FAC\r
+:10235000CA95EAF70E948F1BD6CF8BE58C0F83308E\r
+:1023600078F4C53A29F0C63A31F482E890E005C025\r
+:1023700081E890E002C083E890E0CF910C945D107A\r
+:1023800088E58C0F833108F064C0C83A39F1C93A46\r
+:1023900041F1CA3A49F1CB3A51F1CC3A59F1CD3A2F\r
+:1023A00061F1C03B69F1CE3A71F1CF3A79F1C13BAD\r
+:1023B00081F1C23B89F1C33B91F1C43B99F1C53B2B\r
+:1023C000A1F1C63BA9F1C73BB1F1C83BB9F1C93B8B\r
+:1023D000C1F1CA3BC9F58AE292E038C082EE90E0D2\r
+:1023E00035C089EE90E032C08AEE90E02FC085EBD8\r
+:1023F00090E02CC086EB90E029C087EB90E026C0EF\r
+:102400008CEC90E023C08DEC90E020C083E891E05C\r
+:102410001DC08AE891E01AC082E991E017C084E902\r
+:1024200091E014C081E292E011C083E292E00EC01C\r
+:1024300084E292E00BC085E292E008C086E292E07E\r
+:1024400005C087E292E002C080E090E0CF910C945A\r
+:102450007310CF910895882309F44BC0823859F442\r
+:102460000E943B1081FF45C089E30E940E1B0E9421\r
+:10247000D81B89E30CC0833871F40E943B1080FFA5\r
+:1024800038C083E50E940E1B0E94D81B83E50E9482\r
+:102490004E1B0C94D81B843859F40E943B1082FFC9\r
+:1024A00028C087E40E940E1B0E94D81B87E4EFCF50\r
+:1024B0009CEF980F913A58F390E2980F983050F4AF\r
+:1024C000877091E001C0990F8A95EAF7892F0E94E1\r
+:1024D000951BDFCF9BE5980F933020F480E090E0D0\r
+:1024E0000C945D10885A833120F480E090E00C94C5\r
+:1024F00073100895882321F00E948F1B0C94D81B21\r
+:102500000895882321F00E94951B0C94D81B0895F0\r
+:10251000CF92DF92EF92FF920F931F93CF93DF93AF\r
+:10252000CDB7DEB728970FB6F894DEBF0FBECDBF8C\r
+:102530008C0185E0F801DE01119601900D928A95DB\r
+:10254000E1F7F80140813181F280258122952F70D9\r
+:1025500083819481892B31F03F3F31F481E04F3FFB\r
+:1025600019F403C081E001C080E080FDCBC2498343\r
+:102570003A8389819A812F830E94CC1A9E8388870F\r
+:102580000E94CB1A0E949E192F814E816885FF20E0\r
+:1025900029F00E94AC1B68854E812F81E42FE295C3\r
+:1025A000EF70F0E0E05AFF4F0C94AE24842F807F50\r
+:1025B000142F1F70882311F01295107FFF2059F0FF\r
+:1025C000112309F454C2812F68870E949F1B0E9427\r
+:1025D000D81B68854CC2862F0E942B12112309F448\r
+:1025E00091C2812F0E94A51B28960FB6F894DEBFDA\r
+:1025F0000FBECDBFDF91CF911F910F91FF90EF9054\r
+:10260000DF90CF900C94D81B342F307F842F8F70A5\r
+:10261000303211F08295807F662319F0613019F114\r
+:102620002BC0FF20B1F0222309F493C1213009F01F\r
+:1026300090C128960FB6F894DEBF0FBECDBFDF91D4\r
+:10264000CF911F910F91FF90EF90DF90CF900C945E\r
+:10265000BF1B222319F0213009F454C28E830E943B\r
+:10266000C21B8E8189C1FF2021F0223008F04AC2AE\r
+:1026700070C1211147C280C1FF2021F0222309F43B\r
+:1026800068C1F5C1222309F477C105C2242F26951C\r
+:102690002695237030E02115310521F021303105D8\r
+:1026A000C9F030C2FF2021F0862F942F937002C012\r
+:1026B00080E090E028960FB6F894DEBF0FBECDBF45\r
+:1026C000DF91CF911F910F91FF90EF90DF90CF900E\r
+:1026D0000C945D10FF2021F0862F942F937002C080\r
+:1026E00080E090E028960FB6F894DEBF0FBECDBF15\r
+:1026F000DF91CF911F910F91FF90EF90DF90CF90DE\r
+:102700000C947310862FFF2019F00E944F1F02C0F7\r
+:102710000E94B71F28960FB6F894DEBF0FBECDBF3C\r
+:10272000DF91CF911F910F91FF90EF90DF90CF90AD\r
+:102730000C943C20842F837009F076C0F110E2C124\r
+:10274000262F229526952770220F220F862F8F7015\r
+:10275000C82ED12CE12CF12C022E04C0CC0CDD1C97\r
+:10276000EE1CFF1C0A94D2F764FF10C06FE070E00B\r
+:1027700080E090E004C0660F771F881F991F2A959C\r
+:10278000D2F7609570958095909503C060E070E0F9\r
+:10279000CB01242F269526952370422F50E04230FE\r
+:1027A0005105D1F04330510559F16C297D298E290D\r
+:1027B0009F294130510541F128960FB6F894DEBFAC\r
+:1027C0000FBECDBFDF91CF911F910F91FF90EF9082\r
+:1027D000DF90CF900C94C3196C297D298E299F29F5\r
+:1027E00028960FB6F894DEBF0FBECDBFDF91CF9114\r
+:1027F0001F910F91FF90EF90DF90CF900C94DD1917\r
+:102800000E94C319C701B60128960FB6F894DEBF1F\r
+:102810000FBECDBFDF91CF911F910F91FF90EF9031\r
+:10282000DF90CF900C94A919FF2019F0842F8170AC\r
+:1028300001C08695882309F465C1262F2295269527\r
+:102840002770220F220F862F8F70C82ED12CE12CDB\r
+:10285000F12C022E04C0CC0CDD1CEE1CFF1C0A94D3\r
+:10286000D2F764FF10C06FE070E080E090E004C039\r
+:10287000660F771F881F991F2A95D2F7609570956C\r
+:102880008095909503C060E070E0CB01242F2695E1\r
+:1028900026952370422F50E042305105D1F043304D\r
+:1028A000510559F16C297D298E299F294130510507\r
+:1028B00041F128960FB6F894DEBF0FBECDBFDF9171\r
+:1028C000CF911F910F91FF90EF90DF90CF900C94DC\r
+:1028D000971A6C297D298E299F2928960FB6F8947E\r
+:1028E000DEBF0FBECDBFDF91CF911F910F91FF9043\r
+:1028F000EF90DF90CF900C94B11A0E94971AC70105\r
+:10290000B60128960FB6F894DEBF0FBECDBFDF919B\r
+:10291000CF911F910F91FF90EF90DF90CF900C948B\r
+:102920007D1A603FC9F118F4603E50F49BC0623FCD\r
+:1029300009F460C008F44AC0633F09F46FC092C054\r
+:10294000162F1F70842F8F71FF2099F00E94161A86\r
+:10295000812F28960FB6F894DEBF0FBECDBFDF9152\r
+:10296000CF911F910F91FF90EF90DF90CF900C943B\r
+:102970007A120E94371A812F28960FB6F894DEBF7C\r
+:102980000FBECDBFDF91CF911F910F91FF90EF90C0\r
+:10299000DF90CF900C948112FF20A1F02111B2C0E2\r
+:1029A000842F8F7128960FB6F894DEBF0FBECDBF6F\r
+:1029B000DF91CF911F910F91FF90EF90DF90CF901B\r
+:1029C0000C945C1A223008F09DC0EACFFF20A1F0E1\r
+:1029D000842F8F7128960FB6F894DEBF0FBECDBF3F\r
+:1029E000DF91CF911F910F91FF90EF90DF90CF90EB\r
+:1029F0000C94161AFF2061F3842F8F7128960FB65E\r
+:102A0000F894DEBF0FBECDBFDF91CF911F910F9124\r
+:102A1000FF90EF90DF90CF900C94371AFF2091F049\r
+:102A2000842F8F7128960FB6F894DEBF0FBECDBFEE\r
+:102A3000DF91CF911F910F91FF90EF90DF90CF909A\r
+:102A40000C94011A28960FB6F894DEBF0FBECDBFC6\r
+:102A5000DF91CF911F910F91FF90EF90DF90CF907A\r
+:102A60000C94F719FF20A1F0222309F4B1CF862F8F\r
+:102A700028960FB6F894DEBF0FBECDBFDF91CF9181\r
+:102A80001F910F91FF90EF90DF90CF900C94631106\r
+:102A9000222309F4B1CF862F28960FB6F894DEBF13\r
+:102AA0000FBECDBFDF91CF911F910F91FF90EF909F\r
+:102AB000DF90CF900C942B124F70C8010E94A50498\r
+:102AC00028960FB6F894DEBF0FBECDBFDF91CF9131\r
+:102AD0001F910F91FF90EF90DF90CF900C941E19F3\r
+:102AE0004F70C80128960FB6F894DEBF0FBECDBF59\r
+:102AF000DF91CF911F910F91FF90EF90DF90CF90DA\r
+:102B00000C94E20728960FB6F894DEBF0FBECDBF37\r
+:102B1000DF91CF911F910F91FF90EF90DF90CF90B9\r
+:102B200008950E94AC1B0E94BC1B0E94811B0E9446\r
+:102B3000D81B0E94E8200E943C2080E090E00E9488\r
+:102B40005D1080E090E00C9473100E949C1B0C942C\r
+:102B500091150E94CC1A292F22952F7030E02C302D\r
+:102B600031054CF42A3031056CF422503109223001\r
+:102B7000310590F407C02C30310551F02F3031056C\r
+:102B800039F00AC0803E10F0803F31F481E00895B2\r
+:102B900093FB882780F9089580E00895CF93DF9311\r
+:102BA00000D000D01F92CDB7DEB70F900F900F90DE\r
+:102BB0000F900F90DF91CF910895CF93DF9300D0C6\r
+:102BC00000D000D0CDB7DEB726960FB6F894DEBFA2\r
+:102BD0000FBECDBFDF91CF9108951F93CF93DF93A9\r
+:102BE000C091790116E080917A01C81799F0D0E080\r
+:102BF0001C9FF0011D9FF00D1124E558FE4F4081F0\r
+:102C0000518162817381848195810E94DD152196B5\r
+:102C1000C770E9CFDF91CF911F9108954091AB012B\r
+:102C20005091AC016091AD017091AE018091AF0106\r
+:102C30009091B0010C94DD15CF938091B0018295F5\r
+:102C40008F7009F05FC08091AD01882309F45AC0EC\r
+:102C500020917901A0917A016091AB017091AC0152\r
+:102C60008091AE019091AF0131E06F3F09F030E00B\r
+:102C7000B32FC6E02A1709F445C0009721F07F3F23\r
+:102C800021F44B2F03C041E001C040E030E040FDA3\r
+:102C900035C0C29FF001C39FF00D1124E558FE4FCF\r
+:102CA000418174132BC04081641328C042814111BB\r
+:102CB00025C0438154814817590710F441505109E8\r
+:102CC000481B590B483C5105C8F48091B0018F70E6\r
+:102CD00080618093B00186E0829FF001839FF00DB8\r
+:102CE0001124E058FE4F80818F70806180838BEAD1\r
+:102CF00091E00E948812CF910C94ED152F5F3F4F09\r
+:102D00002770B8CFCF910895CF92DF92EF92FF92C4\r
+:102D10000F931F93CF93DF93CDB7DEB762970FB6B4\r
+:102D2000F894DEBF0FBECDBF8C0185E0F801DE0157\r
+:102D30001D9601900D928A95E1F7D8014C9111965C\r
+:102D40005C91119712966C9112971396ED90FC90EE\r
+:102D500014977091AB01E091AC012091AE013091DC\r
+:102D6000AF012115310531F0EF3F31F481E07F3FB4\r
+:102D700019F403C081E001C080E0B82FB170CB2E00\r
+:102D800080FD6CC1D090AD01DD2009F4F5C0F0915B\r
+:102D9000B001E216F30638F0C701821B930B883CA2\r
+:102DA000910548F09BC0209530952E0D3F1D283C85\r
+:102DB000310508F093C08F2F807F09F052C0E513D2\r
+:102DC00014C0741312C0D62E61110FC0FF70F061D1\r
+:102DD000F093B0010E940E168BEA91E00E948812D7\r
+:102DE0008091B001F80185836CC1EF2831F05F3F1D\r
+:102DF00031F481E04F3F19F403C081E001C080E06D\r
+:102E000080FD03C081E0862701C080E0F82FF170CB\r
+:102E1000FF2E80FF1CC08091790120917A0136E05D\r
+:102E2000821709F428C190E0389FF001399FF00D16\r
+:102E30001124E558FE4F7181571306C07081471366\r
+:102E400003C07281671303C001968770E9CFD62E45\r
+:102E5000662309F436C18091B00181608093B0018E\r
+:102E600053C0E51308C0741306C0611104C0D80133\r
+:102E70001596FC93AEC04D875E878D859E856A8BC7\r
+:102E80000E94A9156A89882329F1D62E662311F19B\r
+:102E90002091B001822F82958F7090E002970CF400\r
+:102EA00060C08091AB019091AC0198878F831986A7\r
+:102EB000FB86EA862C87CE01079651C0E51731F1D3\r
+:102EC0004D875E878D859E856A8B0E94A9156A89CC\r
+:102ED00081112EC0C8010E948812A4C08F2F807F4C\r
+:102EE00069F77E2DF98AE88A89890E94CE158BEAD6\r
+:102EF00091E00E948812EBEAF1E086E0DF011D928A\r
+:102F00008A95E9F70E940E16D12CDBC07413D8CF36\r
+:102F10006111D6CFD8011596FC93C8010E94881282\r
+:102F2000EBEAF1E086E0DF011D928A95E9F7C9C07E\r
+:102F3000D62E662379F22091B001822F82958F7070\r
+:102F400090E0029774F08091AB019091AC019A836C\r
+:102F500089831B82FD82EC822E83CE0101960E9422\r
+:102F6000881286E0F801ABEAB1E001900D928A95F3\r
+:102F7000E1F70E941C166FC0E216F30628F0C701A5\r
+:102F8000821B930B9C0104C0209530952E0D3F1D94\r
+:102F9000283C310508F052C0D62E662309F49ACF9A\r
+:102FA000E5132CC074132AC08091B00180FD1DC0B0\r
+:102FB000982F92959F70C9F0D80115968C9315970C\r
+:102FC0009F3039F09F5F9295907F8F70892B159677\r
+:102FD0008C93C8010E94881286E0F801ABEAB1E048\r
+:102FE00001900D928A95E1F736C086E0F801ABEAD0\r
+:102FF000B1E001900D928A95E1F763C04D875E873D\r
+:103000008D859E850E94A915882379F086E0F801B8\r
+:10301000ABEAB1E001900D928A95E1F70E941C168F\r
+:103020000E940E16DD24D3944CC08091B0018160C3\r
+:103030008093B001C8010E94881243C07E2DF98A96\r
+:10304000E88A89890E94CE15EBEAF1E086E0DF018B\r
+:103050001D928A95E9F70E940E1633C0662309F483\r
+:1030600039CF4D875E878D859E850E94A91588235F\r
+:1030700009F430CFCBCF4D875E878D859E850E942A\r
+:10308000CC1A292F22952F7030E0223031052CF4F4\r
+:103090009F7041F0811106C00CC0243031052CF422\r
+:1030A0009F7049F4805E883020F0C8010E94881229\r
+:1030B000CF2CDC2C06C0D80115969C91907F91F7FF\r
+:1030C000F8CF8D2D62960FB6F894DEBF0FBECDBF40\r
+:1030D000DF91CF911F910F91FF90EF90DF90CF90F4\r
+:1030E00008951F93CF93DF93CDB7DEB72C970FB61C\r
+:1030F000F894DEBF0FBECDBF4F83588769877A87AC\r
+:103100008B879C87CE0107960E9484168823C1F086\r
+:103110002F8138858A859B85892B31F03F3F11F0BF\r
+:1031200080E003C02F3FE1F781E0811147C04F816C\r
+:10313000588569857A858B859C850E94DD153EC002\r
+:1031400086E0FE013796DE01119601900D928A9578\r
+:10315000E1F7FF81E8854A855B854115510531F02E\r
+:10316000EF3F31F481E0FF3F19F403C081E001C07B\r
+:1031700080E080FD23C020917A0130E0C9010196F2\r
+:10318000877099276091790170E086179707F1F1B0\r
+:10319000F983EA835D834C8396E0929FD001939FED\r
+:1031A000B00D1124A558BE4FFE01319601900D922D\r
+:1031B0009A95E1F780937A010E94ED1516E08091CF\r
+:1031C000790190917A01891779F1189FC001112432\r
+:1031D00085589E4F0E948416882331F1E091790131\r
+:1031E0001E9FF0011124E558FE4F408151816281FC\r
+:1031F0007381848195810E94DD158091790190E031\r
+:1032000001968770992780937901D9CF0E94A515DF\r
+:1032100010927A0110927901EBEAF1E086E0DF0189\r
+:103220001D928A95E9F7CACF2C960FB6F894DEBFA7\r
+:103230000FBECDBFDF91CF911F910895EF92FF9206\r
+:103240000F931F93CF93DF93FC01009709F46FC096\r
+:10325000F12CEE24E394EF0121968491843740F41D\r
+:10326000843008F055C0813081F0823021F15FC098\r
+:10327000853709F447C0C0F19CE7980F903708F0F4\r
+:1032800056C08F770E942B1245C08F010E5F1F4FD3\r
+:10329000FE01849190E2980F983050F48770FE2DD3\r
+:1032A00001C0FF0F8A95EAF78F2F0E94AF1B15C050\r
+:1032B0000E94631114C08F010E5F1F4FFE018491A5\r
+:1032C00090E2980F983068F48770FE2D01C0FF0FD0\r
+:1032D0008A95EAF78F2F0E94B51B0E94D81BE80140\r
+:1032E00019C00E942B12FBCFCF010296FE01C491A0\r
+:1032F000CC2361F0EFE9FFE03197F1F700C0000067\r
+:10330000C150F6CFCF010296FE01F490EC0102C04D\r
+:103310000E9463118F2D882341F0EFE9FFE0319780\r
+:10332000F1F700C000008150F6CFFE0194CFDF918D\r
+:10333000CF911F910F91FF90EF90089508956093A2\r
+:10334000B5017093B6018093B7019093B8010C94C6\r
+:1033500091150F931F930091B5011091B601209123\r
+:10336000B7013091B801062B172B282B392B00936E\r
+:10337000B5011093B6012093B7013093B8011F91A6\r
+:103380000F910C9491150F931F930091B50110911B\r
+:10339000B6012091B7013091B801062317232823E5\r
+:1033A00039230093B5011093B6012093B7013093F0\r
+:1033B000B8011F910F910C9491150F931F930091D9\r
+:1033C000B5011091B6012091B7013091B8010627DF\r
+:1033D0001727282739270093B5011093B6012093AA\r
+:1033E000B7013093B8011F910F910C949115109271\r
+:1033F000B1011092B2011092B3011092B4010C9479\r
+:10340000911541E050E060E070E004C0440F551FAA\r
+:10341000661F771F8A95D2F74093B1015093B2018E\r
+:103420006093B3017093B4010C94911541E050E0A6\r
+:1034300060E070E004C0440F551F661F771F8A9537\r
+:10344000D2F78091B1019091B201A091B301B091F6\r
+:10345000B401842B952BA62BB72B8093B1019093AD\r
+:10346000B201A093B301B093B4010C94911541E063\r
+:1034700050E060E070E004C0440F551F661F771FE6\r
+:103480008A95D2F740955095609570958091B101DD\r
+:103490009091B201A091B301B091B401842395231E\r
+:1034A000A623B7238093B1019093B201A093B301F7\r
+:1034B000B093B4010C94911541E050E060E070E0ED\r
+:1034C00004C0440F551F661F771F8A95D2F780915D\r
+:1034D000B1019091B201A091B301B091B4018427E0\r
+:1034E0009527A627B7278093B1019093B201A093A7\r
+:1034F000B301B093B4010C9491150F931F930091F5\r
+:10350000B1011091B2012091B3013091B401062BA9\r
+:10351000172B282B392B0093B1011093B201209364\r
+:10352000B3013093B4011F910F910C9491150F9337\r
+:103530001F930091B1011091B2012091B30130911C\r
+:10354000B40106231723282339230093B1011093D4\r
+:10355000B2012093B3013093B4011F910F910C94E9\r
+:1035600091150F931F930091B1011091B201209119\r
+:10357000B3013091B4010627172728273927009374\r
+:10358000B1011093B2012093B3013093B4011F91A4\r
+:103590000F910C9491150895CF92DF92EF92FF92C4\r
+:1035A0000F931F93CF93DF93EC01C090B501D090A0\r
+:1035B000B601E090B701F090B8018091B10190910F\r
+:1035C000B201A091B301B091B401C82AD92AEA2A64\r
+:1035D000FB2A0FE110E0B701A601002E04C076958A\r
+:1035E0006795579547950A94D2F740FF07C0BE01EB\r
+:1035F000802F0E9405088130910539F4015011098E\r
+:1036000050F7BE0180E00E940508DF91CF911F9125\r
+:103610000F91FF90EF90DF90CF90089590910C0163\r
+:103620009923D9F090910D019923B9F0982F96958F\r
+:10363000969596959F3088F5E0910E01F0910F01D7\r
+:10364000E90FF11D877021E030E001C0220F8A955B\r
+:10365000EAF78181822B8183089540910E01509178\r
+:103660000F0120E030E09FEFFA01E20FF31F6281CB\r
+:10367000681799F09F3F19F4611101C0922F2F5FD5\r
+:103680003F4F2E30310581F79F3F39F0FA01E90FA6\r
+:10369000F11D97FDFA9582830895089590910C018C\r
+:1036A0009923E1F090910D019923C1F0982F9695FF\r
+:1036B000969596959F3020F5E0910E01F0910F01BF\r
+:1036C000E90FF11D877021E030E001C0220F8A95DB\r
+:1036D000EAF72095818128232183089540910E01E6\r
+:1036E00050910F0120E030E0FA01E20FF31F9281C8\r
+:1036F000981301C012822F5F3F4F2E303105A1F782\r
+:10370000089581E090E0E0910E01F0910F01E80F43\r
+:10371000F91F1082019680319105A9F708959091C3\r
+:10372000CC01982B9093CC01089580959091CC0179\r
+:1037300098239093CC0108951092CC010895909114\r
+:10374000CB01982B9093CB01089580959091CB015C\r
+:1037500098239093CB0108951092CB0108959091F6\r
+:10376000CA01982B9093CA01089580959091CA013F\r
+:1037700098239093CA0108951092CA0108958093E6\r
+:10378000B90108951092B901089540910E01509128\r
+:103790000F0120E030E080E0FA01E20FF31F918199\r
+:1037A00091118F5F2F5F3F4F2F303105A9F708959B\r
+:1037B000E0910E01F0910F018091CC018083E091A6\r
+:1037C0000E01F0910F0180819091CB01892B8083B4\r
+:1037D000E0910E01F0910F0180819091CA01892B37\r
+:1037E00080839091B901992361F0E0910E01F091ED\r
+:1037F0000F018081892B80830E94C51B811110924B\r
+:10380000B90180910E0190910F010C944710CF9255\r
+:10381000DF92EF92FF920F931F936C01EE24FF242F\r
+:10382000C114D104E104F10421F46B017C0180E0B6\r
+:1038300001C080E133272F2D1E2D0D2D01151105FF\r
+:103840002105310519F0885F68017901970186012A\r
+:10385000A4E03695279517950795AA95D1F70115F8\r
+:1038600011052105310519F08C5F68017901970177\r
+:103870008601F2E03695279517950795FA95D1F7C9\r
+:10388000011511052105310519F08E5F68017901D7\r
+:10389000B701A6017695679557954795452B462B19\r
+:1038A000472B09F08F5F1F910F91FF90EF90DF90F2\r
+:1038B000CF9008958091E601843009F11092CE01F5\r
+:1038C00020E488E190E00FB6F894A895809360001A\r
+:1038D0000FBE2093600083B7817F846083BF83B76E\r
+:1038E000816083BF7894889583B78E7F83BF88E19A\r
+:1038F0000FB6F89480936000109260000FBE089598\r
+:1039000008950895CF930E94801C0E942F060E9464\r
+:10391000811CC0E08C2F0E941C07811105C0CF5F65\r
+:10392000CE30C1F780E001C081E0CF9108950E94C0\r
+:10393000A5150E943B100C94400982E084BD93E0E1\r
+:1039400095BD9AEF97BD80936E0008952FB7F894B8\r
+:103950008091CF019091D001A091D101B091D2017D\r
+:103960002FBF0895CF92DF92EF92FF920F931F9394\r
+:103970002FB7F8944091CF015091D0016091D101BF\r
+:103980007091D2012FBF6A017B01EE24FF248C01CC\r
+:1039900020E030E0C016D106E206F30610F44150F4\r
+:1039A0005109481B590BCA011F910F91FF90EF90CD\r
+:1039B000DF90CF9008951F920F920FB60F921124AF\r
+:1039C0008F939F93AF93BF938091CF019091D0013C\r
+:1039D000A091D101B091D2010196A11DB11D80939A\r
+:1039E000CF019093D001A093D101B093D201BF91A8\r
+:1039F000AF919F918F910F900FBE0F901F901895D0\r
+:103A00000E94410DF8942FEF87EA91E62150804003\r
+:103A10009040E1F700C0000087E090EBDC0180936C\r
+:103A2000EF019093F001A093F101B093F2012CE02B\r
+:103A300088E190E00FB6F894A895809360000FBEDF\r
+:103A400020936000FFCFEF92FF920F931F93CF93CD\r
+:103A5000DF93E82EF12C8F2D0E941C07C0E0D0E0F0\r
+:103A6000082F10E098010C2E02C0359527950A9476\r
+:103A7000E2F720FD05C02196C630D10599F709C0AF\r
+:103A80006C2F7F2D80E00E94E307E812F4CF81E0E5\r
+:103A900005C0F3948EE0F812DECF80E0DF91CF9185\r
+:103AA0001F910F91FF90EF900895CF93C82F8CE254\r
+:103AB0000E94231D882321F08C2FCF910C94231D6D\r
+:103AC00080E0CF910895CF930E94A81E811102C07B\r
+:103AD0000E948E1EC5E6C15049F00E942F068FE35A\r
+:103AE0009CE90197F1F700C00000F5CF89E20E9440\r
+:103AF000551D811111C18AE20E94551D81110E943C\r
+:103B00008E1E85E00E94551D81110E94001D0E949D\r
+:103B1000B31E8093CD0187E00E94551D882399F143\r
+:103B20008BE10E94551D882351F09091CD0191FBAE\r
+:103B3000882780F921E0822780FB91F922C08EE05E\r
+:103B40000E94551D882351F09091CD0192FB88274A\r
+:103B500080F921E0822780FB92F913C080E10E9466\r
+:103B6000551D9091CD01882341F093FB882780F962\r
+:103B700021E0822780FB93F904C0892F809580FB88\r
+:103B800090F99093CD018091CD010E94B71E0E94C3\r
+:103B9000C51E8093E00180EE0E94551D882341F0F0\r
+:103BA0008091E001982F909590FB80F98093E0013F\r
+:103BB00089E30E94551D882359F09091E00191FB03\r
+:103BC000882780F921E0822780FB91F99093E0011A\r
+:103BD00082EE0E94551D882359F09091E00192FBDE\r
+:103BE000882780F921E0822780FB92F99093E001F9\r
+:103BF00086EE0E94551D882359F09091E00193FBB9\r
+:103C0000882780F921E0822780FB93F99093E001D7\r
+:103C100083EE0E94551D882359F09091E00194FB9A\r
+:103C2000882780F921E0822780FB94F99093E001B6\r
+:103C300085E30E94551D882359F09091E00195FB82\r
+:103C4000882780F921E0822780FB95F99093E00195\r
+:103C500081E30E94551D882359F09091E00196FB65\r
+:103C6000882780F921E0822780FB96F99093E00174\r
+:103C700081E10E94551D882359F09091E00197FB46\r
+:103C8000882780F921E0822780FB97F99093E00153\r
+:103C90008091E0010E94C91E8091E00187FB882786\r
+:103CA00080F980930D0187E20E94551DC82F8EE197\r
+:103CB0000E94551D8111C2608FE10E94551D811126\r
+:103CC000C46080E20E94551D8111C86081E20E949B\r
+:103CD000551D8111C06182E20E94551D8111C06293\r
+:103CE00083E20E94551D8111C06484E20E94551D2B\r
+:103CF000882311F0C06802C0CC2329F08C2F0E94C9\r
+:103D0000C01E6C2F03C00E94BC1E682F70E080E0B4\r
+:103D100090E0CF910C949F19CF9108956DEE7EEFB6\r
+:103D200080E090E00E94E42460E082E090E00E9465\r
+:103D3000D62460E083E090E00E94D62460E084E036\r
+:103D400090E00E94D62460E085E090E00C94D624B8\r
+:103D500080E090E00E94D02421E08D3E9E4F09F04B\r
+:103D600020E0822F089582E090E00C94C824682F10\r
+:103D700082E090E00C94D62483E090E00C94C82478\r
+:103D8000682F83E090E00C94D62484E090E00C94BB\r
+:103D9000C824682F84E090E00C94D6248091D5014B\r
+:103DA00080FF0BC06091130185E0689FB001112472\r
+:103DB00075956795759567952AC081FF09C06091D3\r
+:103DC000130185E0689FB0011124759567951FC0A8\r
+:103DD00082FF07C06091130185E0689FB001112444\r
+:103DE00016C04091D6014423C9F0609112014617D4\r
+:103DF00088F72091130185E0289F90011124429FAC\r
+:103E0000C001439F900D112470E00E949A246038F5\r
+:103E1000710540F46115710539F002C065E070E08C\r
+:103E2000862F08958FE7089581E008958091D50148\r
+:103E300080FF08C06091110170E0759567957595D8\r
+:103E4000679521C081FF06C06091110170E07595F2\r
+:103E5000679519C082FF04C06091110170E010C025\r
+:103E60008091D6018823C1F0609110018617A0F7D8\r
+:103E700090911101989FC001112470E00E949A2432\r
+:103E80006038710528F46115710521F0862F0895B9\r
+:103E90008FE7089581E0089561E070E0F4CF803FFE\r
+:103EA00021F40E94CE1E819504C0813F29F40E9416\r
+:103EB000CE1E8093D9010895823F21F40E94CE1E28\r
+:103EC000819504C0833F29F40E94CE1E8093D801BF\r
+:103ED0000895893F19F40E94161F05C08A3F31F4E6\r
+:103EE0000E94161F81958093DA0108958B3F21F47B\r
+:103EF0000E94161F819504C08C3F29F40E94161F52\r
+:103F00008093DB010895843F21F48091D701816083\r
+:103F100017C0853F21F48091D701826011C0863F90\r
+:103F200021F48091D70184600BC0873F21F48091F8\r
+:103F3000D701886005C0883F31F48091D701806146\r
+:103F40008093D70108958D3F21F48091D501816040\r
+:103F50000BC08E3F21F48091D501826005C08F3F58\r
+:103F600029F48091D50184608093D5010895803F24\r
+:103F700039F48091D90187FF6CC01092D90169C0D2\r
+:103F8000813F29F48091D9011816BCF362C0909149\r
+:103F9000D801823F29F497FF5CC01092D80159C024\r
+:103FA000833F19F41916CCF354C0893F41F4809132\r
+:103FB000DA0118160CF04DC01092DA014AC08A3F9F\r
+:103FC00029F48091DA0187FF44C0F6CF8B3F39F4A2\r
+:103FD0008091DB0187FF3DC01092DB013AC08C3F2E\r
+:103FE00029F48091DB011816BCF333C0843F21F41F\r
+:103FF0008091D7018E7F17C0853F21F48091D70132\r
+:104000008D7F11C0863F21F48091D7018B7F0BC03B\r
+:10401000873F21F48091D701877F05C0883F31F425\r
+:104020008091D7018F7E8093D70113C08D3F21F4FB\r
+:104030008091D5018E7F0BC08E3F21F48091D501F8\r
+:104040008D7F05C08F3F29F48091D5018B7F8093B0\r
+:10405000D5018091D80181110EC08091D9018111C3\r
+:104060000AC08091DA01811106C08091DB018111C3\r
+:1040700002C01092D601089587ED91E00E9452107F\r
+:104080000E94A61C9093D4018093D30108951F939E\r
+:10409000CF93DF938091D3019091D4010E94B21C01\r
+:1040A0004091D601442321F02091140130E006C054\r
+:1040B000209115015AE0259F900111248217930742\r
+:1040C00008F482C08091D8011091D901D091DA0111\r
+:1040D000C091DB01811107C0111105C0D11103C0CE\r
+:1040E000CC2309F471C04F3F19F04F5F4093D601C4\r
+:1040F000181624F40E94CE1E8093D8018091D80116\r
+:1041000087FF05C00E94CE1E81958093D8011116AD\r
+:1041100024F40E94CE1E8093D9018091D90187FF9B\r
+:1041200005C00E94CE1E81958093D9016091D8016F\r
+:10413000662339F11091D901112319F1772767FD11\r
+:104140007095872F972F0E94AB2323E333E343E33C\r
+:104150005FE30E940F240E9478236093D801612FAF\r
+:10416000772767FD7095872F972F0E94AB2323E356\r
+:1041700033E343E35FE30E940F240E9478236093BC\r
+:10418000D9011D1624F40E94161F8093DA01809134\r
+:10419000DA0187FF05C00E94161F81958093DA011E\r
+:1041A0001C1624F40E94161F8093DB018091DB0112\r
+:1041B00087FF05C00E94161F81958093DB01DF9168\r
+:1041C000CF911F910C943C20DF91CF911F910895C6\r
+:1041D000E7EDF1E085E0DF011D928A95E9F71092A5\r
+:1041E000D6011092D5010895833081F128F48130F1\r
+:1041F00059F08230D1F00895853009F449C0B8F102\r
+:10420000863009F456C0089520911501862F90E05C\r
+:10421000820F911D8F3F910520F4620F609315016D\r
+:1042200008958FEF80931501089520911401862F32\r
+:1042300090E0820F911D8F3F910520F4620F6093F3\r
+:10424000140108958FEF80931401089520911301B4\r
+:10425000862F90E0820F911D8F3F910520F4620F11\r
+:104260006093130108958FEF8093130108952091B7\r
+:104270001201862F90E0820F911D8F3F910520F44F\r
+:10428000620F6093120108958FEF809312010895D9\r
+:1042900020911101862F90E0820F911D8F3F910593\r
+:1042A00020F4620F6093110108958FEF8093110144\r
+:1042B000089520911001862F90E0820F911D8F3F6D\r
+:1042C000910520F4620F6093100108958FEF8093A1\r
+:1042D00010010895833011F128F4813049F08230C3\r
+:1042E00091F00895853081F120F18630C1F1089573\r
+:1042F00080911501681720F4861B8093150108959D\r
+:1043000010921501089580911401681720F4861BFE\r
+:10431000809314010895109214010895809113015F\r
+:10432000681720F4861B80931301089510921301DF\r
+:10433000089580911201681720F4861B8093120162\r
+:10434000089510921201089580911101681720F4C8\r
+:10435000861B809311010895109211010895809198\r
+:104360001001681720F4861B8093100108951092A5\r
+:10437000100108958D3109F442C020F58E3009F402\r
+:1043800079C070F4873009F45EC020F4863009F4F7\r
+:1043900042C033C08830D1F18B3009F4A7C02DC0A2\r
+:1043A000863109F4A3C038F4803109F46DC081313D\r
+:1043B00009F47BC022C0893109F498C08B3109F41B\r
+:1043C0004FC01BC0853309F479C048F4873209F423\r
+:1043D00075C008F478C0893209F470C00EC0833407\r
+:1043E00038F48A3308F071C0883309F47FC005C0FF\r
+:1043F000833409F463C08834C1F080E008950E94DA\r
+:1044000032230E943B100E94400970C00E94B31EDC\r
+:104410000E94C51E6BC08091CD01817F8E7F8093ED\r
+:10442000CD0181E08093DD0108950E94A5152FEF55\r
+:1044300083ED90E3215080409040E1F700C0000000\r
+:104440000E94001D53C09091CD01892F817090FF73\r
+:1044500003C0917F9E7F26C091609093CD0146C09E\r
+:104460009091CD0191FB882780F921E0822780FB84\r
+:1044700091F913C09091CD0192FB882780F921E03A\r
+:10448000822780FB92F909C09091CD0193FB882788\r
+:1044900080F921E0822780FB93F99093CD01882356\r
+:1044A00029F191609093CD0108950E94A515809106\r
+:1044B0000D0191E0892780930D0118C061E070E043\r
+:1044C00080E090E00FC023EE01C027EC280F61E0F0\r
+:1044D00070E080E090E004C0660F771F881F991F8E\r
+:1044E0002A95D2F70E949F190E94A51581E0089590\r
+:1044F00080E0089580E00895CF93C82F8091DD017A\r
+:10450000813079F018F08230D1F184C0A0910E0191\r
+:10451000B0910F018C91813169F0823209F07CC039\r
+:1045200009C0A0910E01B0910F018C91813111F061\r
+:10453000823249F48C2F0E94782281111DC08C2F69\r
+:104540000E94BA211AC08C2F0E947A22811114C0B5\r
+:10455000C43179F048F4CB3079F0C03109F060C053\r
+:1045600082E08093DD0108C0C93219F0C83321F020\r
+:1045700057C01092DD0154C081E0817053C0C93230\r
+:1045800089F118F5C43171F1A8F4C73009F046C0BB\r
+:104590008AE08093150194E19093140193E0909345\r
+:1045A00013018093120188E08093110188E28093C7\r
+:1045B000100134C0CE51C63088F5EC2FF0E0E65D36\r
+:1045C000FE4F80818093DC0129C0CE34E9F020F4D5\r
+:1045D000CB3421F56AE013C0C13579F0C235F1F46E\r
+:1045E00061E00DC08091DC01882319F01092DC019C\r
+:1045F00015C081E08093DD0115C061E006C08091A7\r
+:10460000DC010E94F4200AC06AE08091DC010E9473\r
+:104610006A2104C01092DD0180E004C081E002C084\r
+:1046200080E0ABCFCF910895E1E8F0E08081886031\r
+:1046300080838081816080838FB7F89493E090932A\r
+:10464000890090ED909388008FBF0895EFE6F0E029\r
+:104650008081826080830895EFE6F0E080818D7F25\r
+:1046600080830895EFE6F0E0808192E089278083DF\r
+:1046700008951F920F920FB60F9211242F933F931C\r
+:104680004F935F936F937F938F939F93AF93BF935A\r
+:10469000EF93FF938091DE019091DF01019690935B\r
+:1046A000DF018093DE01811103C082E00E94400996\r
+:1046B000E091DF01E695E695F0E0E258F74FE491EE\r
+:1046C0008091DE018E1303C080E00E944009FF91BB\r
+:1046D000EF91BF91AF919F918F917F916F915F917A\r
+:1046E0004F913F912F910F900FBE0F901F901895F3\r
+:1046F00004D06894B1118DC0089570D088F09F5790\r
+:1047000090F0B92F9927B751A0F0D1F0660F771F1D\r
+:10471000881F991F1AF0BA95C9F712C0B13081F0FD\r
+:1047200077D0B1E0089574C0672F782F8827B85FDD\r
+:1047300039F0B93FCCF3869577956795B395D9F75E\r
+:104740003EF490958095709561957F4F8F4F9F4F68\r
+:104750000895E89409C097FB3EF490958095709574\r
+:1047600061957F4F8F4F9F4F9923A9F0F92F96E9BD\r
+:10477000BB279395F695879577956795B795F11132\r
+:10478000F8CFFAF4BB0F11F460FF1BC06F5F7F4FCF\r
+:104790008F4F9F4F16C0882311F096E911C07723E1\r
+:1047A00021F09EE8872F762F05C0662371F096E8EA\r
+:1047B000862F70E060E02AF09A95660F771F881FB9\r
+:1047C000DAF7880F9695879597F9089557FD9058D1\r
+:1047D000440F551F59F05F3F71F04795880F97FBC5\r
+:1047E000991F61F09F3F79F087950895121613067F\r
+:1047F0001406551FF2CF4695F1DF08C016161706AE\r
+:104800001806991FF1CF86957105610508940895E2\r
+:10481000E894BB2766277727CB0197F908950BD03B\r
+:1048200078C069D028F06ED018F0952309F05AC0EE\r
+:104830005FC01124EECFCADFA0F3959FD1F3950F8F\r
+:1048400050E0551F629FF001729FBB27F00DB11D14\r
+:10485000639FAA27F00DB11DAA1F649F6627B00DA4\r
+:10486000A11D661F829F2227B00DA11D621F739F8D\r
+:10487000B00DA11D621F839FA00D611D221F749F9B\r
+:104880003327A00D611D231F849F600D211D822FE2\r
+:10489000762F6A2F11249F5750408AF0E1F0882329\r
+:1048A0004AF0EE0FFF1FBB1F661F771F881F915036\r
+:1048B0005040A9F79E3F510570F014C0AACF5F3F4A\r
+:1048C000ECF3983EDCF3869577956795B795F79569\r
+:1048D000E7959F5FC1F7FE2B880F911D96958795F1\r
+:1048E00097F9089597F99F6780E870E060E0089570\r
+:1048F0009FEF80EC089500240A94161617061806F8\r
+:104900000906089500240A941216130614060506D3\r
+:104910000895092E0394000C11F4882352F0BB0F64\r
+:1049200040F4BF2B11F460FF04C06F5F7F4F8F4FC7\r
+:104930009F4F089597FB072E16F4009407D077FD3C\r
+:1049400009D00E94B42407FC05D03EF490958195CF\r
+:104950009F4F0895709561957F4F0895EE0FFF1F4B\r
+:104960000590F491E02D0994AA1BBB1B51E107C0EF\r
+:10497000AA1FBB1FA617B70710F0A61BB70B881FEF\r
+:10498000991F5A95A9F780959095BC01CD0108957E\r
+:10499000F999FECF92BD81BDF89A992780B5089507\r
+:1049A000A8E1B0E042E050E00C94EB24262FF99906\r
+:1049B000FECF1FBA92BD81BD20BD0FB6F894FA9A02\r
+:1049C000F99A0FBE019608950E94D624272F0C94C1\r
+:1049D000D724DC01CB01FC01F999FECF06C0F2BD62\r
+:1049E000E1BDF89A319600B40D9241505040B8F7AD\r
+:0649F0000895F894FFCFCA\r
+:1049F60020024209CF09AC09780945090101BA012B\r
+:104A060028080A03140A3F4D36393F08F207BC0747\r
+:104A1600830716072F0748076107010203040506E7\r
+:044A26000708090074\r
 :00000001FF\r
index 6534f481a14275dff4d3ff59229af043502e72f6..f100dd1c5c048d1757fdcd7e47988ffd0a491517 100644 (file)
@@ -10,54 +10,66 @@ no rights reserved, use for any purposes, credit me if you are a nice person
 
 ## The Base Layout ##
 
-* The yellow keys are text navigation and manipulation
-* The dark blue keys are shift keys: case shift (traditional shift), symbol shift, and media shift
-* The light blue keys are modifiers: traditional Control, Option, and C        ommand keys, plus Hyper and Meh
-* The two green keys, tab and tilde, are in the typical places to ease use of the Application Switcher
-* The red keys is Escape, one of the few buttons which is in an atypical position
+* The light blue keys are modifiers: traditional Control, Option, and Command keys, plus Hyper and Meh
+* The dark blue keys are Shift keys: Capitals Shift (traditional shift), Symbol Shift, and Media Shift; plus a Shift Lock key
+* Several dark blue keys double for entry of characters which would typically be in those locations
+* The turquoise keys are text navigation and manipulation
+* The red keys is Escape and it is always found in that location no matter what
 
 ![Ordinary base layout](ordinary-base.png)
 
-This layout puts the modifier keys along the bottom of the keyboard where they are on most layouts. They are in the regular order, with the addition of Hyper and Meh keys. The shift key (case shift) is in the prevalent location. The primo slots usually wasted on Caps Lock and Enter are instead used for the Symbol Shift key which promotes use of the Symbols layer. On the right side of the layout, the Symbol and Media shift keys also double as character keys -- quote and backslash, respectively -- so that touch typists can continue to find those punctuation marks in the right place.
+This layout puts the modifier keys along the bottom of the keyboard where they are on most keyboards. They are in the regular order, with the addition of Hyper and Meh keys. On the outside edges are the Shift keys. The traditional shift key is called Capitals Shift and it is in the normal location. Above that are Symbols Shift and Media Shift. Each Shift key momentarily switches the layout to that layer, and if you use the Shift Lock button you can lock the layout to that layer.
 
-Other than the yellow keys, the only buttons which move to new locations are the Brackets and Dash and Escape. Most touch typists dont touch-type brackets or dash anyway, so only Escape really requires retraining of muscle memory.
+Touch typists will also find tilde, tab, equals/plus, slash/pipe, and quote/double-quote sharing space on those Shift keys where they would probably be on a common keyboard. Other than the turquoise keys the only buttons which move to new locations are the Brackets and Dash and Escape. Most touch typists dont touch-type brackets or dash anyway so only Escape really requires retraining of muscle memory, and see below for the Special Escape Sequence.
 
-The four big yellow keys are arranged differently than in the default Ergodox EZ layout. The Ordinary Layout here copies the design of the old Fingerworks TouchStream keyboard, but also reflects the natural presumptions of the author -- me!; I type the space character with my right hand, and to me it makes sense for the two delete keys to be next to one another.
+The four big turquoise keys are arranged differently than in the default Ergodox EZ layout. The Ordinary Layout here copies the design of the old Fingerworks TouchStream keyboard, but also reflects the natural presumptions of the author -- me! I type the space character with my right hand, and to me it makes sense for the two delete keys to be next to one another.
 
-The Forward Tab and Backward Tab keys are there mostly because I ended up with two extra buttons and needed something to do with them. My muscle memory from using the Truly Ergonomic Keyboard makes me look for the Tab key with my right index finger, so it is handy to have this redundant Tab, and the idea with the Backward Tab key is that it becomes easy to navigate text fields in forms, or to indent/unindent code.
+The Forward Tab and Backward Tab keys are in their locations mostly because I ended up with two extra buttons and needed something to do with them. My muscle memory from using the Truly Ergonomic Keyboard makes me look for the Tab key with my right index finger, so it is handy to have this redundant Tab, and the idea with the Backward Tab key is that it becomes easy to navigate text fields in forms, or to indent/unindent code.
 
-## The Symbols Layout ##
+## The Symbols Layer ##
 
-* The periwinkle keys are the eponymous symbols
-* The gray keys are F-Keys
-* The green keys are a proper number pad
-* The red Escape key is found in the "right" location on this layer
-* The yellow keys are the *reverse* of the yellow keys on the base layer
-* The dark blue Media key means that the Media layer is accessible with the left hand
+* The light green keys are the eponymous symbols
+* The bright green keys are F-Keys
+* The dark green keys constitute a number pad
+* The turquoise keys are the *reverse* of the turquoise keys on the base layer
 
 ![Ordinary symbol layout](ordinary-symbol.png)
 
 The Ergodox EZ ships with the "Coder Layer" which I like to call the Symbols layer. There are some significant improvements in The Ordinary Layout over the default layout.
 
 The symbol keys are mostly the same as on the default layout, which did a good job in this regard, but with a few enhancements:
+
 * Angle brackets on this layer mean that curly, square, and angle brackets are all available on different layers of the same two buttons. Also, they mean that all kinds of brackets, including parentheses, are available on both the Base and Symbols layers.
 * The slash, backslash, and pipe characters are grouped together as a memory aid.
 * The & and | symbols are juxtaposed as a memory aid
 
-The number pad area here, in green, includes all four arithmetic operations in the same order found on most number pads. This layout also has an Enter key, and importantly the key codes emitted by this number pad are *number pad specific key codes*, not regular keyboard key codes. Some software distinguishes keypad codes so users now have access to a fully realized number pad when using The Ordinary Layout.
-
-The Escape key's true home is in the top left corner of the keyboard, so on this layer it can be found there. And on the Symbols layer, the Tab key switches to become a Media key, so press Symbols then Media to access the Media layer using the left hand.
+The number pad area here, in green, includes all four arithmetic operations in the same order found on most number pads and features an Enter key. The keycodes emitted here are normal numeric keycodes, not the number-pad specific keycodes emitted by most number pads, because this layout does not use a Num Lock key to switch the buttons between numeric keycodes and navigational keycodes. See the explanation in The Media Layout section about navigation using these same buttons.
 
-Finally, consider the yellow text-nav keys. In the Symbols layer, these are *reversed* from the base layer, with most keys mirrored, but the Delete keys shifted to maintain the directional significance of their arrangement. This is powerful! Often I find myself using the mouse with my right hand, and the left hand needs to press Enter. Instead of reaching the left hand over to the right side of the keyboard, now I simply tap Symbols to reverse the yellow keys, and Enter is right where it should be.
+Finally, consider the turquoise text-nav keys. Here in the Symbols layer, these are *reversed* from the base layer, with most keys mirrored, but the Delete keys shifted to maintain the directional significance of their arrangement. This is powerful! Often I find myself using the mouse with my right hand, and the left hand needs to press Enter. Instead of reaching the left hand over to the right side of the keyboard, now I simply tap Symbols to reverse the yellow keys, and Enter is right where it should be.
 
-## The Media Layout ##
+## The Media Layer ##
 
-* The light turquoise keys move the mouse or the text cursor
-* The dark turquoise keys scroll
-* The light purple keys signal Web and Audio applications
-* The dark purple keys signal the operating system
-* The red Escape key is, again, found in the "right" location
+* The dark orange keys on the left move the mouse cursor
+* The dark orange keys on the right move the text cursor
+* The light orange keys are for scrolling and paging
+* The bright green keys are more F-keys
+* The dark yellow keys signal Web and Audio applications
+* The light yellow keys signal the operating system
 
 ![Ordinary media layout](ordinary-media.png)
 
-This layer was inspired by the Media layer on the Ergodox EZ but takes it farther. The Fingerworks TouchStream had a very useful feature for controlling the text cursor easily and this layer does something similar. The left hand can move the mouse, the right hand moves the text cursor, in all four directions, in small or large increments. This greatly enhances navigation in text documents.
+This layer was inspired by the Media layer on the Ergodox EZ but takes it farther. The Fingerworks TouchStream keyboard had a very useful feature for controlling the text cursor easily and this layer does something similar. The left hand can move the mouse, the right hand moves the text cursor, in all four directions, in small or large increments. This greatly enhances navigation in text documents.
+
+Moreover, the orange keys on the right overlay the numberpad from the Symbols Layer, such that in the Media Layer the same keys can be used as if they were a number pad in navigational mode (Num Lock off). For instance, in traditional number pads the '3' key became 'Page Down', and so it is here. This means a user can do text navigation without moving either hand.
+
+## Switching Between Layers ##
+
+The three Shift keys correspond to three logical layers on top of the ever-present base layer, and are represented in the three LEDs on the keyboard: Capitals (red), Symbols (green), Media (blue). The color of a layer illuminates when the layer is active. Shift keys work in the expected way: press them and the keys shift to that layer; release them and the keys shift back to the base layer. The Ordinary Layout also features a Shift Lock key to keep a layer active indefinitely. Hold down the Shift Lock key then press any Shift key to lock to that layer. Or, hold down the Shift key and press the Shift Lock key; either way works. To revert to the base layer, use the Shift Lock key again in combination with the Shift key.
+
+This layout attempts to treat the Capitals Shift layer the same as the other two Shift layers, but internally they are different which causes some inconsistencies. For instance, it is possible to switch from any layer to any other layer, and to lock to any layer, *except* it is not possible to go from Media to Symbols. You must exit the Media layer before engaging the Symbols layer. Also, the Caps Lock feature must be triggered by first pressing the Shift Lock key then a Capitals Shift key; it doesn't work if you press the Shift key first (instead you get the secondary symbol associated with the Shift Lock button).
+
+## Special Escape Sequence ##
+
+In the Ordinary Layout, the most unsatisfying key location is the Escape key which rightly belongs segregated on its own way up on the top left of the keyboard. The Ergodox does not have a physical button in such a location and the nearest one, in the top left corner, was assigned to the tilde button which is traditionally found in that location. The Escape key is important so it features prominently on the other top corner on the left side of the keyboard, and is always there in all layers. Nevertheless, alas, it isn't Ordinary to put the escape in that different corner!
+
+That tilde key has a second function as the Shift Lock key and that makes possible a special feature. To make this layout as Ordinary as possible, the Escape key can *also* be accessed by pressing Shift Lock then the 1 button right next to it. This easy gesture is a way to partially maintain the ease of flicking your wrist to the left and tapping Escape. This gesture works in all layers.
index 03d26017617f4ce625924b6bac352c4177bc4188..01d9e3ce9a504e75dcd6b498dfa2f90074b7d0e5 100644 (file)
@@ -41,7 +41,6 @@
 # Target file name (without extension).
 TARGET = planck
 
-
 # Directory common source filess exist
 TOP_DIR = ../..
 TMK_DIR = ../../tmk_core
@@ -62,17 +61,28 @@ ifneq ("$(wildcard keymaps/$(KEYMAP).c)","")
 else
 ifneq ("$(wildcard keymaps/$(KEYMAP)/keymap.c)","")
        KEYMAP_FILE = keymaps/$(KEYMAP)/keymap.c
+ifneq ("$(wildcard keymaps/$(KEYMAP)/makefile.mk)","")
+       include keymaps/$(KEYMAP)/makefile.mk
+endif
 else
 $(error Keymap file does not exist)
+endif 
 endif
-endif
+
 else
+
 ifneq ("$(wildcard keymaps/default.c)","")
        KEYMAP_FILE = keymaps/default.c
 else
        KEYMAP_FILE = keymaps/default/keymap.c
 endif
+
+ifneq ("$(wildcard keymaps/default/makefile.mk)","")
+       include keymaps/default/makefile.mk
+endif
+
 endif
+
 SRC := $(KEYMAP_FILE) $(SRC)
 
 CONFIG_H = config.h
@@ -94,7 +104,6 @@ MCU = atmega32u4
 #     software delays.
 F_CPU = 16000000
 
-
 #
 # LUFA specific
 #
@@ -126,29 +135,45 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
 #   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
+#   change to "no" to disable the options, or define them in the makefile.mk in 
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE = no         # Console for debug(+400)
+COMMAND_ENABLE = yes        # Commands for debug and configuration
+NKRO_ENABLE = no            # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = 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.
+
 # 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 - 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 = YES            # MIDI controls
-# AUDIO_ENABLE = YES           # Audio output on port C6
-# UNICODE_ENABLE = YES                 # Unicode
-# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
-# RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
-
-ifdef BACKLIGHT_ENABLE
-       SRC += backlight.c
+SLEEP_LED_ENABLE = no    # Breathing sleep LED during USB suspend
+
+ifdef KEYMAP
+
+ifeq ("$(wildcard keymaps/$(KEYMAP).c)","")
+ifneq ("$(wildcard keymaps/$(KEYMAP)/makefile.mk)","")
+       include keymaps/$(KEYMAP)/makefile.mk
+endif 
 endif
 
+else
+
+ifneq ("$(wildcard keymaps/default/makefile.mk)","")
+       include keymaps/default/makefile.mk
+endif
+
+endif
+
+ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
+       SRC := backlight.c $(SRC)
+endif
 
 # Optimize size but this may cause error "relocation truncated to fit"
 #EXTRALDFLAGS = -Wl,--relax
@@ -158,4 +183,4 @@ VPATH += $(TARGET_DIR)
 VPATH += $(TOP_DIR)
 VPATH += $(TMK_DIR)
 
-include $(TOP_DIR)/quantum/quantum.mk
+include $(TOP_DIR)/quantum/quantum.mk
\ No newline at end of file
index d3719e0cb173c20cbd8ac3989d8ae2af2f89a0fe..7d64f09773f97c5c32539dc2157a590d8833a8bf 100644 (file)
@@ -73,10 +73,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 /* disable debug print */
-#define NO_DEBUG
+//#define NO_DEBUG
 
 /* disable print */
-#define NO_PRINT
+//#define NO_PRINT
 
 /* disable action features */
 //#define NO_ACTION_LAYER
diff --git a/keyboard/planck/keymaps/bone2planck.c b/keyboard/planck/keymaps/bone2planck.c
new file mode 100644 (file)
index 0000000..a99e771
--- /dev/null
@@ -0,0 +1,112 @@
+
+#include "planck.h"
+#ifdef BACKLIGHT_ENABLE
+#include "backlight.h"
+#endif
+#include "..\..\quantum\keymap_extras\keymap_german.h"
+
+/* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout.
+   It has Umlauts and "ß" as it is optimized for a mix of German & English.
+   My favourite features are the placement of the special characters often used for programming right on the home row 
+   and the number & navigation block combo, so you never have to move your hands from their home position.
+   
+   Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone
+*/
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+       /* Bone2
+       * ,-----------------------------------------------------------------------------------.
+       * | Q    |   J  |   D  |   U  |   A  |   X  |   P  |   H  |   L  |   M  |   W  |  ẞ   |
+       * |------+------+------+------+------+-------------+------+------+------+------+------|
+       * | M1   |   C  |   T  |   I  |   E  |   O  |   B  |   N  |   R  |   S  |   G  |  M1  |
+       * |------+------+------+------+------+------|------+------+------+------+------+------|
+       * | Shift|   F  |   V  |   Ü  |   Ä  |   Ö  |   Y  |   Z  |   ,  |   .  |   K  |Shift |
+       * |------+------+------+------+------+------+------+------+------+------+------+------|
+       * | Ctrl | GUI  | Alt  |  M3  |  M2  |    Space    |  M2  |  M3  |  Esc |  Tab |Enter |
+       * `-----------------------------------------------------------------------------------'
+       */
+       [0] = {
+               { DE_Q,    DE_J,        DE_D,    DE_U,    DE_A,    DE_X,    DE_P,    DE_H,    DE_L,    DE_M,    DE_W,    DE_SS  },
+               { MO(1),   DE_C,    DE_T,    DE_I,    DE_E,    DE_O,    DE_B,    DE_N,    DE_R,    DE_S,    DE_G,    MO(1)  },
+               { DE_S,    DE_F,    DE_V,    DE_UE,   DE_AE,   DE_OE,   DE_Y,    DE_Z,    DE_COMM, DE_DOT,  DE_K,    DE_S   },
+               { KC_LCTL, KC_LGUI, KC_LALT, MO(3),   MO(2),   KC_SPC,  KC_SPC,  MO(2),   MO(3),   KC_ESC,  KC_TAB,  KC_ENT }
+       },
+
+       /* M1 Special Characters
+       * ,-----------------------------------------------------------------------------------.
+       * | °    |   @  |   _  |   [  |   ]  |   ^  |   !  |   <  |   >  |   =  |   &  |      |
+       * |------+------+------+------+------+-------------+------+------+------+------+------|
+       * | M1   |   \  |   /  |   {  |   }  |   *  |   ?  |   (  |   )  |   -  |   :  |  M1  |
+       * |------+------+------+------+------+------|------+------+------+------+------+------|
+       * |      |   #  |   $  |   |  |   ~  |   €  |   +  |   %  |   "  |   '  |   ;  |      |
+       * |------+------+------+------+------+------+------+------+------+------+------+------|
+       * | Ctrl | GUI  | Alt  |  M3  |  M2  |    Space    |  M2  |  M3  |  Esc |  Tab |Enter |
+       * `-----------------------------------------------------------------------------------'
+       */
+       [1] = {
+               { DE_RING, DE_AT,   DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL,  DE_AMPR, KC_NO   },
+               { KC_TRNS, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST,  DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, KC_TRNS },
+               { KC_NO  , DE_HASH, DE_DLR,  DE_PIPE, DE_TILD, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, KC_NO   },
+               { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }
+       },
+
+       /* Navigation & Number Blocks
+       * ,-----------------------------------------------------------------------------------.
+       * |      | PgUp | Bksp |  Up  |  DEL | PgDn |      |   7  |   8  |   9  |      |      |
+       * |------+------+------+------+------+-------------+------+------+------+------+------|
+       * |      | Home |  Lft | Down | Right| End  |   .  |   4  |   5  |   6  |   ,  |      |
+       * |------+------+------+------+------+------|------+------+------+------+------+------|
+       * | Shift|      |  Tab | Ins  | Enter|      |   0  |   1  |   2  |   3  |   ;  |Shift |
+       * |------+------+------+------+------+------+------+------+------+------+------+------|
+       * | Ctrl | GUI  | Alt  |  M3  |  M2  |    Space    |  M2  |  M3  |  Esc |  Tab |Enter |
+       * `-----------------------------------------------------------------------------------'
+       */
+       [2] = {
+               { KC_NO,   KC_PGUP, KC_BSPC, KC_UP,   KC_DEL,  KC_PGDN, KC_NO,   DE_7,    DE_8,    DE_9,    KC_NO,   KC_NO   },
+               { KC_NO,   KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END,  DE_DOT,  DE_4,    DE_5,    DE_6,    DE_COMM, KC_NO   },
+               { DE_S,    KC_NO,   KC_TAB,  KC_INS,  KC_ENT,  KC_NO,   KC_0,    DE_1,    DE_2,    DE_3,    DE_SCLN, DE_S    },
+               { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }
+       },
+
+       /* Function & Media Keys
+       * ,-----------------------------------------------------------------------------------.
+       * |      |      | Print|Scroll|Pause |      |      |  F7  |  F8  |  F9  |  F12 |      |
+       * |------+------+------+------+------+-------------+------+------+------+------+------|
+       * |      |      | Mute | Vol- | Vol+ |      |   ³  |  F4  |  F5  |  F6  |  F11 |      |
+       * |------+------+------+------+------+------|------+------+------+------+------+------|
+       * | Shift|      | Prev | Play | Next |      |   ²  |  F1  |  F2  |  F3  |  F10 |Shift |
+       * |------+------+------+------+------+------+------+------+------+------+------+------|
+       * | Ctrl | GUI  | Alt  |  M3  |      |    Space    |      |  M3  |  Esc |  Tab |Enter |
+       * `-----------------------------------------------------------------------------------'
+       */
+       [3] = {
+               { KC_NO,   KC_NO,   KC_PSCR, KC_SLCK, KC_PAUS, KC_NO,   KC_NO,   KC_F7,   KC_F8,   KC_F9,   KC_F12,  KC_NO      },
+               { KC_NO,   KC_NO,   KC_MUTE, KC_VOLD, KC_VOLU, KC_NO,   DE_SQ3,  KC_F4,   KC_F5,   KC_F6,   KC_F11,  KC_NO  },
+               { KC_TRNS, KC_NO,   KC_MPRV, KC_MPLY, KC_MNXT, KC_NO,   DE_SQ2,  KC_F1,   KC_F2,   KC_F3,   KC_F10,  KC_TRNS},
+               { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO,   KC_TRNS, KC_TRNS, KC_NO,   KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
+       }
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+       // MACRODOWN only works in this function
+       switch (id) {
+       case 0:
+               if (record->event.pressed) {
+                       register_code(KC_RSFT);
+#ifdef BACKLIGHT_ENABLE
+                       backlight_step();
+#endif
+               }
+               else {
+                       unregister_code(KC_RSFT);
+               }
+               break;
+       }
+       return MACRO_NONE;
+};
index d2f43bbdb85d11ff9784e06035a087f62251c840..de9680b49851aafde557a35790acebe69f8c2c54 100644 (file)
@@ -1,34 +1,2 @@
 # The Default Planck Layout
 
-    const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    [_QW] = { /* 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, KC_ENT },
-      {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
-    },
-    [_CM] = { /* Colemak */
-      {KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_BSPC},
-      {KC_ESC,  KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT},
-      {KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT },
-      {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
-    },
-    [_DV] = { /* 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,    KC_ENT },
-      {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
-    },
-    [_RS] = { /* 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_TRNS, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS},
-      {KC_TRNS, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  DF(_QW), DF(_CM), DF(_DV), RESET,   KC_TRNS},
-      {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-    },
-    [_LW] = { /* 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_TRNS, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
-      {KC_TRNS, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  DF(_QW), DF(_CM), DF(_DV), RESET,   KC_TRNS},
-      {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-    }
-    };
\ No newline at end of file
index a7541b0b87411f39b94b35a33959f72326a032c3..aecddec4a161f746e0a66f1dc2e9224e50e96b6c 100644 (file)
@@ -2,19 +2,40 @@
 // this is the style you want to emulate.
 
 #include "planck.h"
-#ifdef BACKLIGHT_ENABLE
-  #include "backlight.h"
+#include "action_layer.h"
+#ifdef AUDIO_ENABLE
+  #include "audio.h"
 #endif
 
 // Each layer gets a name for readability, which is then used in the keymap matrix below.
 // The underscores don't mean anything - you can have a layer called STUFF or any other name.
 // Layer names don't all need to be of the same length, obviously, and you can also skip them
 // entirely and just use numbers.
-#define _QW 0
-#define _CM 1
-#define _DV 2
-#define _LW 3
-#define _RS 4
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _LOWER 3
+#define _RAISE 4
+#define _ADJUST 5
+#define _MUSIC 6
+
+// Macro name shortcuts
+#define QWERTY M(_QWERTY)
+#define COLEMAK M(_COLEMAK)
+#define DVORAK M(_DVORAK)
+#define LOWER M(_LOWER)
+#define RAISE M(_RAISE)
+#define M_BL 5
+#ifdef AUDIO_ENABLE
+  #define AUD_OFF M(6)
+  #define AUD_ON M(7)
+#endif
+#define MUS_OFF M(8)
+#define MUS_ON M(9)
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
@@ -29,11 +50,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * | Brite| Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
  * `-----------------------------------------------------------------------------------'
  */
-[_QW] = {
+[_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, KC_ENT },
-  {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+  {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
 },
 
 /* Colemak
@@ -47,11 +68,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * | Brite| Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
  * `-----------------------------------------------------------------------------------'
  */
-[_CM] = {
+[_COLEMAK] = {
   {KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_BSPC},
   {KC_ESC,  KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT},
   {KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT },
-  {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+  {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
 },
 
 /* Dvorak
@@ -65,47 +86,75 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * | Brite| Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
  * `-----------------------------------------------------------------------------------'
  */
-[_DV] = {
+[_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,    KC_ENT },
-  {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+  {M(M_BL), 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 |      |      |      |      |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = {
+  {KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
+  {KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
+  {_______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
 },
 
 /* Raise
  * ,-----------------------------------------------------------------------------------.
  * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
  * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | Esc  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   -  |   =  |   [  |   ]  |  \   |
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   -  |   =  |   [  |   ]  |  \   |
  * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | Shift|  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |Qwerty|Colemk|Dvorak| Reset|Enter |
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |      |      |      |      |Enter |
  * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Brite| Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Next | Vol- | Vol+ | Play |
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
  * `-----------------------------------------------------------------------------------'
  */
-[_RS] = {
+[_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_TRNS, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS},
-  {KC_TRNS, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  DF(_QW), DF(_CM), DF(_DV), RESET,   KC_TRNS},
-  {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+  {KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS},
+  {_______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
 },
 
-/* Lower
+/* Adjust (Lower + Raise)
  * ,-----------------------------------------------------------------------------------.
- * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Bksp |
+ * |      | Reset|      |      |      |      |      |      |      |      |      |  Del |
  * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | Esc  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   _  |   +  |   {  |   }  |  |   |
+ * |      |      |      |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|      |      |
  * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | Shift|  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |Qwerty|Colemk|Dvorak| Reset|Enter |
+ * |      |      |      |      |      |      |      |      |      |      |      |      |
  * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Brite| Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Next | Vol- | Vol+ | Play |
+ * |      |      |      |      |      |             |      |      |      |      |      |
  * `-----------------------------------------------------------------------------------'
  */
-[_LW] = {
-  {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_TRNS, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
-  {KC_TRNS, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  DF(_QW), DF(_CM), DF(_DV), RESET,   KC_TRNS},
-  {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+[_ADJUST] = {
+  {_______, RESET,   _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
+  {_______, _______, _______, AUD_ON,  AUD_OFF, AG_NORM, AG_SWAP, QWERTY,  COLEMAK, DVORAK,  _______, _______},
+  {_______, _______, _______, MUS_ON,  MUS_OFF, _______, _______, _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+},
+
+/* Music (reserved for process_action_user)
+ *
+ */
+[_MUSIC] = {
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
 }
 };
 
@@ -113,11 +162,106 @@ const uint16_t PROGMEM fn_actions[] = {
 
 };
 
+#ifdef AUDIO_ENABLE
+float tone_startup[][2] = {
+  {440.0*pow(2.0,(31)/12.0), 12},
+  {440.0*pow(2.0,(28)/12.0), 8},
+  {440.0*pow(2.0,(19)/12.0), 8},
+  {440.0*pow(2.0,(24)/12.0), 8},
+  {440.0*pow(2.0,(28)/12.0), 20}
+};
+
+float tone_qwerty[][2] = {
+  {440.0*pow(2.0,(23)/12.0), 8},
+  {440.0*pow(2.0,(24)/12.0), 8},
+  {0, 4},
+  {440.0*pow(2.0,(31)/12.0), 16}
+};
+
+float tone_colemak[][2] = {
+  {440.0*pow(2.0,(23)/12.0), 8},
+  {440.0*pow(2.0,(24)/12.0), 8},
+  {0, 4},
+  {440.0*pow(2.0,(31)/12.0), 12},
+  {0, 4},
+  {440.0*pow(2.0,(35)/12.0), 12}
+};
+
+float tone_dvorak[][2] = {
+  {440.0*pow(2.0,(23)/12.0), 8},
+  {440.0*pow(2.0,(24)/12.0), 8},
+  {0, 4},
+  {440.0*pow(2.0,(31)/12.0), 8},
+  {0, 4},
+  {440.0*pow(2.0,(33)/12.0), 8},
+  {0, 4},
+  {440.0*pow(2.0,(31)/12.0), 8}
+};
+
+float tone_music[][2] = {
+  {440.0*pow(2.0,(12)/12.0), 8},
+  {440.0*pow(2.0,(14)/12.0), 8},
+  {440.0*pow(2.0,(16)/12.0), 8},
+  {440.0*pow(2.0,(17)/12.0), 8},
+  {440.0*pow(2.0,(19)/12.0), 8},
+  {440.0*pow(2.0,(21)/12.0), 8},
+  {440.0*pow(2.0,(23)/12.0), 8},
+  {440.0*pow(2.0,(24)/12.0), 8}
+};
+#endif
+
+
+void persistant_default_layer_set(uint16_t default_layer) {
+  eeconfig_write_default_layer(default_layer);
+  default_layer_set(default_layer);
+}
+
 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:
+        case _QWERTY:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+            #endif
+            persistant_default_layer_set(1UL<<_QWERTY);
+          }
+          break;
+        case _COLEMAK:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              PLAY_NOTE_ARRAY(tone_colemak, false, 0);
+            #endif
+            persistant_default_layer_set(1UL<<_COLEMAK);
+          }
+          break;
+        case _DVORAK:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
+            #endif
+            persistant_default_layer_set(1UL<<_DVORAK);
+          }
+          break;
+        case _LOWER:
+          if (record->event.pressed) {
+            layer_on(_LOWER);
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+          } else {
+            layer_off(_LOWER);
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+          }
+          break;
+        case _RAISE:
+          if (record->event.pressed) {
+            layer_on(_RAISE);
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+          } else {
+            layer_off(_RAISE);
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+          }
+          break;
+        case M_BL:
           if (record->event.pressed) {
             register_code(KC_RSFT);
             #ifdef BACKLIGHT_ENABLE
@@ -127,6 +271,59 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             unregister_code(KC_RSFT);
           }
         break;
+        case 6:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              audio_off();
+            #endif
+          }
+        break;
+        case 7:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              audio_on();
+              PLAY_NOTE_ARRAY(tone_startup, false, 0);
+            #endif
+          }
+        break;
+        case 8:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              layer_off(_MUSIC);
+              stop_all_notes();
+            #endif
+          }
+        break;
+        case 9:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              PLAY_NOTE_ARRAY(tone_music, false, 0);
+              layer_on(_MUSIC);
+            #endif
+          }
+        break;
       }
     return MACRO_NONE;
 };
+
+uint8_t starting_note = 0x0C;
+int offset = 7;
+
+void process_action_user(keyrecord_t *record) {
+
+  if (IS_LAYER_ON(_MUSIC)) {
+    if (record->event.pressed) {
+        play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF);
+    } else {
+        stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)));
+    }
+  }
+
+}
+
+void matrix_init_user(void) {
+  #ifdef AUDIO_ENABLE
+    init_notes();
+    PLAY_NOTE_ARRAY(tone_startup, false, 0);
+  #endif
+}
diff --git a/keyboard/planck/keymaps/default/makefile.mk b/keyboard/planck/keymaps/default/makefile.mk
new file mode 100644 (file)
index 0000000..8cbec4a
--- /dev/null
@@ -0,0 +1 @@
+AUDIO_ENABLE = yes 
\ No newline at end of file
diff --git a/keyboard/planck/keymaps/pvc_planck.c b/keyboard/planck/keymaps/pvc_planck.c
new file mode 100644 (file)
index 0000000..20bb5d8
--- /dev/null
@@ -0,0 +1,193 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include "planck.h"
+#include "print.h"
+#include "action_layer.h"
+#ifdef BACKLIGHT_ENABLE
+  #include "backlight.h"
+#endif
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QW 0
+#define _CM 1
+#define _DV 2
+#define _LW 3
+#define _RS 4
+#define _FN 5
+
+#define XXXXXXX KC_NO
+#define _______ KC_TRNS
+
+#define ASFT(kc) LSFT(RSFT(kc))
+#define MG_B ASFT(KC_B)
+#define MG_H ASFT(KC_H)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |  Up  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | GUI  | Alt  | Del  |Raise |    Space    |Lower |   /  | Left | Down |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QW] = {
+  {RESET,   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_UP,   KC_ENT },
+  {KC_LCTL, KC_LGUI, KC_LALT, KC_DEL,  M(_LW),  KC_SPC,  KC_SPC,  M(_RS),  KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT}
+},
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab  |   Q  |   W  |   F  |   P  |   G  |   J  |   L  |   U  |   Y  |   ;  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   R  |   S  |   T  |   D  |   H  |   N  |   E  |   I  |   O  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   K  |   M  |   ,  |   .  |   /  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |Raise |    Space    |Lower | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_CM] = {
+  {KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_BSPC},
+  {KC_ESC,  KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT},
+  {KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT },
+  {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), 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  |  /   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   ;  |   Q  |   J  |   K  |   X  |   B  |   M  |   W  |   V  |   Z  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |Raise |    Space    |Lower | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DV] = {
+  {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,    KC_ENT },
+  {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+},
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   -  |   =  |   [  |   ]  |  \   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |Qwerty|Colemk|Dvorak| Reset|Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |Raise |    Space    |Lower | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RS] = {
+  {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,  XXXXXXX, XXXXXXX, XXXXXXX,   RESET, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   _  |   +  |   {  |   }  |  |   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |Qwerty|Colemk|Dvorak| Reset|Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |Raise |    Space    |Lower | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LW] = {
+  {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,  XXXXXXX, XXXXXXX, XXXXXXX,    MG_B, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+/* Function
+ * ,-----------------------------------------------------------------------------------.
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   _  |   +  |   {  |   }  |  |   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |Qwerty|Colemk|Dvorak| Reset|Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |Raise |    Space    |Lower | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_FN] = {
+  {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
+  {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,    MG_H, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
+  {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
+  {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
+}
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+
+int tri_layer = 0;
+void update_tri_layer(int layer) {
+  if (tri_layer > 1) {
+    layer_on(layer);
+  } else {
+    layer_off(layer);
+  }
+}
+
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+       // MACRODOWN only works in this function
+       switch(id)
+       {
+               case _RS:
+                       if (record->event.pressed) {
+                               print("RS_DN");
+                               layer_on(_RS);
+                               tri_layer++;
+                               update_tri_layer(_FN);
+                       } else {
+                               print("RS_UP");
+                               layer_off(_RS);
+                               tri_layer--;
+                               update_tri_layer(_FN);
+                               phex(layer_state);
+                       }
+                       break;
+
+               case _LW:
+                       if (record->event.pressed) {
+                               print("LW_DN");
+                               layer_on(_LW);
+                               tri_layer++;
+                               update_tri_layer(_FN);
+                       } else {
+                               print("LW_UP");
+                               layer_off(_LW);
+                               tri_layer--;
+                               update_tri_layer(_FN);
+                       }
+                       break;
+
+               default:
+                       break;
+       }
+       return MACRO_NONE;
+};
index 664aff7321513479678306a283a16ee691b6d60f..3504e27201b7c021dd57fda1404016b45662ee96 100644 (file)
@@ -126,27 +126,44 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
 #   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
+#   change to "no" to disable the options, or define them in the makefile.mk in 
+#   the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE = no        # Console for debug(+400)
+COMMAND_ENABLE = yes        # Commands for debug and configuration
+NKRO_ENABLE = no            # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = 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.
+
 # 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 - 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 = YES              # MIDI controls
-AUDIO_ENABLE = YES             # Audio output on port C6
-# UNICODE_ENABLE = YES                 # Unicode
-# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
-# RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.  Do not enable this with MIDI at the same time.
-
-ifdef BACKLIGHT_ENABLE
-       SRC += backlight.c
+SLEEP_LED_ENABLE = no    # Breathing sleep LED during USB suspend
+
+ifdef KEYMAP
+
+ifeq ("$(wildcard keymaps/$(KEYMAP).c)","")
+ifneq ("$(wildcard keymaps/$(KEYMAP)/makefile.mk)","")
+       include keymaps/$(KEYMAP)/makefile.mk
+endif 
+endif
+
+else
+
+ifneq ("$(wildcard keymaps/default/makefile.mk)","")
+       include keymaps/default/makefile.mk
+endif
+
+endif
+
+ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
+       SRC := backlight.c $(SRC)
 endif
 
 
index 5528667fa726187d1743571b4b343476a71cfcb7..bb9d29dab771309978ac5e3208dc943b9abd3bf1 100644 (file)
@@ -73,10 +73,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 /* disable debug print */
-#define NO_DEBUG
+// #define NO_DEBUG
 
 /* disable print */
-#define NO_PRINT
+// #define NO_PRINT
 
 /* disable action features */
 //#define NO_ACTION_LAYER
index d2f43bbdb85d11ff9784e06035a087f62251c840..e911968dd964906479d4c7243c7ee049041f2062 100644 (file)
@@ -1,34 +1 @@
-# The Default Planck Layout
-
-    const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    [_QW] = { /* 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, KC_ENT },
-      {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
-    },
-    [_CM] = { /* Colemak */
-      {KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_BSPC},
-      {KC_ESC,  KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT},
-      {KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT },
-      {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
-    },
-    [_DV] = { /* 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,    KC_ENT },
-      {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
-    },
-    [_RS] = { /* 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_TRNS, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS},
-      {KC_TRNS, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  DF(_QW), DF(_CM), DF(_DV), RESET,   KC_TRNS},
-      {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-    },
-    [_LW] = { /* 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_TRNS, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
-      {KC_TRNS, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  DF(_QW), DF(_CM), DF(_DV), RESET,   KC_TRNS},
-      {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-    }
-    };
\ No newline at end of file
+# The default Preonic layout - largely based on the Planck's
\ No newline at end of file
index 784670784809bd20fb80235ae4918f852cea7fab..48bc72dab7b4b5681109712b3ce8bfd2c9e4d360 100644 (file)
-// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
-// this is the style you want to emulate.
-
 #include "preonic.h"
-#ifdef BACKLIGHT_ENABLE
-  #include "backlight.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+#ifdef AUDIO_ENABLE
+  #include "audio.h"
 #endif
 
 // Each layer gets a name for readability, which is then used in the keymap matrix below.
 // The underscores don't mean anything - you can have a layer called STUFF or any other name.
 // Layer names don't all need to be of the same length, obviously, and you can also skip them
 // entirely and just use numbers.
-#define _QW 0
-#define _CM 1
-#define _DV 2
-#define _LW 3
-#define _RS 4
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _LOWER 3
+#define _RAISE 4
+#define _ADJUST 5
+#define _MUSIC 6
+
+// Macro name shortcuts
+#define QWERTY M(_QWERTY)
+#define COLEMAK M(_COLEMAK)
+#define DVORAK M(_DVORAK)
+#define LOWER M(_LOWER)
+#define RAISE M(_RAISE)
+#define M_BL 5
+#ifdef AUDIO_ENABLE
+  #define AUD_OFF M(6)
+  #define AUD_ON M(7)
+#endif
+#define MUS_OFF M(8)
+#define MUS_ON M(9)
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QW] = { /* Qwerty */
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = {
   {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
-  {KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_BSPC},
+  {KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_DEL},
   {KC_ESC,  KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT},
   {KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT },
-  {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+  {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
 },
-[_CM] = { /* Colemak */
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab  |   Q  |   W  |   F  |   P  |   G  |   J  |   L  |   U  |   Y  |   ;  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   R  |   S  |   T  |   D  |   H  |   N  |   E  |   I  |   O  |  "   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   Z  |   X  |   C  |   V  |   B  |   K  |   M  |   ,  |   .  |   /  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = {
   {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
-  {KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_BSPC},
+  {KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN, KC_DEL},
   {KC_ESC,  KC_A,    KC_R,    KC_S,    KC_T,    KC_D,    KC_H,    KC_N,    KC_E,    KC_I,    KC_O,    KC_QUOT},
   {KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_K,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_ENT },
-  {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+  {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
 },
-[_DV] = { /* Dvorak */
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab  |   "  |   ,  |   .  |   P  |   Y  |   F  |   G  |   C  |   R  |   L  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc  |   A  |   O  |   E  |   U  |   I  |   D  |   H  |   T  |   N  |   S  |  /   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift|   ;  |   Q  |   J  |   K  |   X  |   B  |   M  |   W  |   V  |   Z  |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = {
   {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
-  {KC_TAB,  KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,    KC_BSPC},
+  {KC_TAB,  KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,    KC_DEL},
   {KC_ESC,  KC_A,    KC_O,    KC_E,    KC_U,    KC_I,    KC_D,    KC_H,    KC_T,    KC_N,    KC_S,    KC_SLSH},
   {KC_LSFT, KC_SCLN, KC_Q,    KC_J,    KC_K,    KC_X,    KC_B,    KC_M,    KC_W,    KC_V,    KC_Z,    KC_ENT },
-  {M(0),    KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC,  KC_SPC,  MO(_RS), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
+  {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER,   KC_SPC,  KC_SPC,  RAISE,   KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT}
 },
-[_RS] = { /* RAISE */
-  {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
-  {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
-  {KC_TRNS, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS},
-  {KC_TRNS, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  DF(_QW), DF(_CM), DF(_DV), RESET,   KC_TRNS},
-  {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |   ~  |   !  |   @  |   #  |   $  |   %  |   ^  |   &  |   *  |   (  |   )  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   _  |   +  |   {  |   }  |  |   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |      |      |      |      |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = {
+  {KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
+  {KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
+  {KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
+  {_______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
 },
-[_LW] = { /* LOWER */
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |   `  |   1  |   2  |   3  |   4  |   5  |   6  |   7  |   8  |   9  |   0  | Del  |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del  |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |   -  |   =  |   [  |   ]  |  \   |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |      |      |      |      |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = {
   {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC},
-  {KC_TILD, KC_EXLM, KC_AT,   KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
-  {KC_TRNS, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
-  {KC_TRNS, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  DF(_QW), DF(_CM), DF(_DV), RESET,   KC_TRNS},
-  {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+  {KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_DEL},
+  {KC_DEL,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS},
+  {_______, KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
+},
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      | Reset|      |      |      |      |      |      |      |      |      |  Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * |      |      |      |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak|      |      |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |      |      |      |Musoff|Mus on|      |      |      |      |      |      |      |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |      |      |      |      |      |             |      |      |      |      |      |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = {
+  {KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12},
+  {_______, RESET,   _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
+  {_______, _______, _______, AUD_ON,  AUD_OFF, AG_NORM, AG_SWAP,  QWERTY,  COLEMAK, DVORAK,  _______, _______},
+  {_______, _______, _______, MUS_ON,  MUS_OFF, _______, _______, _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+},
+
+/* Music (reserved for process_action_user)
+ *
+ */
+[_MUSIC] = {
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+  {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
 }
 };
 
@@ -58,19 +179,104 @@ const uint16_t PROGMEM fn_actions[] = {
 
 };
 
+#ifdef AUDIO_ENABLE
 float start_up[][2] = {
-  {440.0*pow(2.0,(67)/12.0), 600},
-  {440.0*pow(2.0,(64)/12.0), 400},
-  {440.0*pow(2.0,(55)/12.0), 400},
-  {440.0*pow(2.0,(60)/12.0), 400},
-  {440.0*pow(2.0,(64)/12.0), 1000},
+  {440.0*pow(2.0,(14)/12.0), 20},
+  {440.0*pow(2.0,(26)/12.0), 8},
+  {440.0*pow(2.0,(18)/12.0), 20},
+  {440.0*pow(2.0,(26)/12.0), 8}
 };
 
+float tone_qwerty[][2] = {
+  {440.0*pow(2.0,(23)/12.0), 8},
+  {440.0*pow(2.0,(24)/12.0), 8},
+  {0, 4},
+  {440.0*pow(2.0,(31)/12.0), 16}
+};
+
+float tone_colemak[][2] = {
+  {440.0*pow(2.0,(23)/12.0), 8},
+  {440.0*pow(2.0,(24)/12.0), 8},
+  {0, 4},
+  {440.0*pow(2.0,(31)/12.0), 12},
+  {0, 4},
+  {440.0*pow(2.0,(35)/12.0), 12}
+};
+
+float tone_dvorak[][2] = {
+  {440.0*pow(2.0,(23)/12.0), 8},
+  {440.0*pow(2.0,(24)/12.0), 8},
+  {0, 4},
+  {440.0*pow(2.0,(31)/12.0), 8},
+  {0, 4},
+  {440.0*pow(2.0,(33)/12.0), 8},
+  {0, 4},
+  {440.0*pow(2.0,(31)/12.0), 8}
+};
+
+float tone_music[][2] = {
+  {440.0*pow(2.0,(12)/12.0), 8},
+  {440.0*pow(2.0,(14)/12.0), 8},
+  {440.0*pow(2.0,(16)/12.0), 8},
+  {440.0*pow(2.0,(17)/12.0), 8},
+  {440.0*pow(2.0,(19)/12.0), 8},
+  {440.0*pow(2.0,(21)/12.0), 8},
+  {440.0*pow(2.0,(23)/12.0), 8},
+  {440.0*pow(2.0,(24)/12.0), 8}
+};
+#endif
+
+void persistant_default_layer_set(uint16_t default_layer) {
+  eeconfig_write_default_layer(default_layer);
+  default_layer_set(default_layer);
+}
+
 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:
+        case _QWERTY:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+            #endif
+            persistant_default_layer_set(1UL<<_QWERTY);
+          }
+          break;
+        case _COLEMAK:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              PLAY_NOTE_ARRAY(tone_colemak, false, 0);
+            #endif
+            persistant_default_layer_set(1UL<<_COLEMAK);
+          }
+          break;
+        case _DVORAK:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
+            #endif
+            persistant_default_layer_set(1UL<<_DVORAK);
+          }
+          break;
+        case _LOWER:
+          if (record->event.pressed) {
+            layer_on(_LOWER);
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+          } else {
+            layer_off(_LOWER);
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+          }
+          break;
+        case _RAISE:
+          if (record->event.pressed) {
+            layer_on(_RAISE);
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+          } else {
+            layer_off(_RAISE);
+            update_tri_layer(_LOWER, _RAISE, _ADJUST);
+          }
+          break;
+        case M_BL:
           if (record->event.pressed) {
             register_code(KC_RSFT);
             #ifdef BACKLIGHT_ENABLE
@@ -80,13 +286,59 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
             unregister_code(KC_RSFT);
           }
         break;
+        case 6:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              audio_off();
+            #endif
+          }
+        break;
+        case 7:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              audio_on();
+              PLAY_NOTE_ARRAY(start_up, false, 0);
+            #endif
+          }
+        break;
+        case 8:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              layer_off(_MUSIC);
+              stop_all_notes();
+            #endif
+          }
+        break;
+        case 9:
+          if (record->event.pressed) {
+            #ifdef AUDIO_ENABLE
+              PLAY_NOTE_ARRAY(tone_music, false, 0);
+              layer_on(_MUSIC);
+            #endif
+          }
+        break;
       }
     return MACRO_NONE;
 };
 
+uint8_t starting_note = 0x0C;
+int offset = 7;
+
+void process_action_user(keyrecord_t *record) {
+
+  if (IS_LAYER_ON(_MUSIC)) {
+    if (record->event.pressed) {
+        play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF);
+    } else {
+        stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)));
+    }
+  }
+
+}
+
 void matrix_init_user(void) {
-#ifdef AUDIO_ENABLE
+  #ifdef AUDIO_ENABLE
     init_notes();
-    play_notes(&start_up, 5, false);
-#endif
+    play_notes(&start_up, false, 0);
+  #endif
 }
diff --git a/keyboard/preonic/keymaps/default/makefile.mk b/keyboard/preonic/keymaps/default/makefile.mk
new file mode 100644 (file)
index 0000000..628167f
--- /dev/null
@@ -0,0 +1 @@
+AUDIO_ENABLE = yes
\ No newline at end of file
index f29d941d7cce0be321a060b38ae2278806a9223c..6bd6532a3abcec328a5bd0dda520642d6ec957b6 100644 (file)
@@ -8,8 +8,12 @@
 #include "audio.h"
 #include "keymap_common.h"
 
+#include "eeconfig.h"
+
 #define PI 3.14159265
 
+#define CPU_PRESCALER 8
+
 // #define PWM_AUDIO
 
 #ifdef PWM_AUDIO
@@ -30,6 +34,8 @@ int voice_place = 0;
 double frequency = 0;
 int volume = 0;
 long position = 0;
+int duty_place = 1;
+int duty_counter = 0;
 
 double frequencies[8] = {0, 0, 0, 0, 0, 0, 0, 0};
 int volumes[8] = {0, 0, 0, 0, 0, 0, 0, 0};
@@ -55,7 +61,30 @@ uint16_t note_position = 0;
 float (* notes_pointer)[][2];
 uint8_t notes_length;
 bool notes_repeat;
+float notes_rest;
+bool note_resting = false;
+
 uint8_t current_note = 0;
+uint8_t rest_counter = 0;
+
+audio_config_t audio_config;
+
+
+void audio_toggle(void) {
+    audio_config.enable ^= 1;
+    eeconfig_write_audio(audio_config.raw);
+}
+
+void audio_on(void) {
+    audio_config.enable = 1;
+    eeconfig_write_audio(audio_config.raw);
+}
+
+void audio_off(void) {
+    audio_config.enable = 0;
+    eeconfig_write_audio(audio_config.raw);
+}
+
 
 void stop_all_notes() {
     voices = 0;
@@ -77,58 +106,66 @@ void stop_all_notes() {
 }
 
 void stop_note(double freq) {
-    #ifdef PWM_AUDIO
-        freq = freq / SAMPLE_RATE;
-    #endif
-    for (int i = 7; i >= 0; i--) {
-        if (frequencies[i] == freq) {
-            frequencies[i] = 0;
-            volumes[i] = 0;
-            for (int j = i; (j < 7); j++) {
-                frequencies[j] = frequencies[j+1];
-                frequencies[j+1] = 0;
-                volumes[j] = volumes[j+1];
-                volumes[j+1] = 0;
-            }
-        }
-    }
-    voices--;
-    if (voices < 0)
-        voices = 0;
-    if (voices == 0) {
+    if (note) {
         #ifdef PWM_AUDIO
-            TIMSK3 &= ~_BV(OCIE3A);
-        #else
-            TIMSK3 &= ~_BV(OCIE3A);
-            TCCR3A &= ~_BV(COM3A1);
+            freq = freq / SAMPLE_RATE;
         #endif
-        frequency = 0;
-        volume = 0;
-        note = false;
-    } else {
-        double freq = frequencies[voices - 1];
-        int vol = volumes[voices - 1];
-        double starting_f = frequency;
-        if (frequency < freq) {
-            sliding = true;
-            for (double f = starting_f; f <= freq; f += ((freq - starting_f) / 2000.0)) {
-                frequency = f;
+        for (int i = 7; i >= 0; i--) {
+            if (frequencies[i] == freq) {
+                frequencies[i] = 0;
+                volumes[i] = 0;
+                for (int j = i; (j < 7); j++) {
+                    frequencies[j] = frequencies[j+1];
+                    frequencies[j+1] = 0;
+                    volumes[j] = volumes[j+1];
+                    volumes[j+1] = 0;
+                }
             }
-            sliding = false;
-        } else if (frequency > freq) {
-            sliding = true;
-            for (double f = starting_f; f >= freq; f -= ((starting_f - freq) / 2000.0)) {
-                frequency = f;
+        }
+        voices--;
+        if (voices < 0)
+            voices = 0;
+        if (voices == 0) {
+            #ifdef PWM_AUDIO
+                TIMSK3 &= ~_BV(OCIE3A);
+            #else
+                TIMSK3 &= ~_BV(OCIE3A);
+                TCCR3A &= ~_BV(COM3A1);
+            #endif
+            frequency = 0;
+            volume = 0;
+            note = false;
+        } else {
+            double freq = frequencies[voices - 1];
+            int vol = volumes[voices - 1];
+            double starting_f = frequency;
+            if (frequency < freq) {
+                sliding = true;
+                for (double f = starting_f; f <= freq; f += ((freq - starting_f) / 2000.0)) {
+                    frequency = f;
+                }
+                sliding = false;
+            } else if (frequency > freq) {
+                sliding = true;
+                for (double f = starting_f; f >= freq; f -= ((starting_f - freq) / 2000.0)) {
+                    frequency = f;
+                }
+                sliding = false;
             }
-            sliding = false;
+            frequency = freq;
+            volume = vol;
         }
-        frequency = freq;
-        volume = vol;
     }
 }
 
 void init_notes() {
 
+    /* check signature */
+    if (!eeconfig_is_enabled()) {
+        eeconfig_init();
+    }
+    audio_config.raw = eeconfig_read_audio();
+
     #ifdef PWM_AUDIO
         PLLFRQ = _BV(PDIV2);
         PLLCSR = _BV(PLLE);
@@ -144,7 +181,7 @@ void init_notes() {
         DDRC |= _BV(PORTC6);
 
         TIMSK3 &= ~_BV(OCIE3A); // Turn off 3A interputs
-        
+
         TCCR3A = 0x0; // Options not needed
         TCCR3B = _BV(CS31) | _BV(CS30) | _BV(WGM32); // 64th prescaling and CTC
         OCR3A = SAMPLE_DIVIDER - 1; // Correct count/compare, related to sample playback
@@ -160,20 +197,19 @@ void init_notes() {
 
 
 ISR(TIMER3_COMPA_vect) {
-
     if (note) {
         #ifdef PWM_AUDIO
             if (voices == 1) {
                 // SINE
                 OCR4A = pgm_read_byte(&sinewave[(uint16_t)place]) >> 2;
-            
+
                 // SQUARE
                 // if (((int)place) >= 1024){
                 //     OCR4A = 0xFF >> 2;
                 // } else {
                 //     OCR4A = 0x00;
                 // }
-                
+
                 // SAWTOOTH
                 // OCR4A = (int)place / 4;
 
@@ -213,13 +249,19 @@ ISR(TIMER3_COMPA_vect) {
             if (frequency > 0) {
                 // ICR3 = (int)(((double)F_CPU) / frequency); // Set max to the period
                 // OCR3A = (int)(((double)F_CPU) / frequency) >> 1; // Set compare to half the period
-                if (place > 10) {
+                voice_place %= voices;
+                if (place > (frequencies[voice_place] / 50)) {
                     voice_place = (voice_place + 1) % voices;
                     place = 0.0;
                 }
-                ICR3 = (int)(((double)F_CPU) / frequencies[voice_place]); // Set max to the period
-                OCR3A = (int)(((double)F_CPU) / frequencies[voice_place]) >> 1; // Set compare to half the period
+                ICR3 = (int)(((double)F_CPU) / (frequencies[voice_place] * CPU_PRESCALER)); // Set max to the period
+                OCR3A = (int)(((double)F_CPU) / (frequencies[voice_place] * CPU_PRESCALER)) >> 1 * duty_place; // Set compare to half the period
                 place++;
+                // if (duty_counter > (frequencies[voice_place] / 500)) {
+                //     duty_place = (duty_place % 3) + 1;
+                //     duty_counter = 0;
+                // }
+                // duty_counter++;
             }
         #endif
     }
@@ -245,8 +287,8 @@ ISR(TIMER3_COMPA_vect) {
                 place -= SINE_LENGTH;
         #else
             if (note_frequency > 0) {
-                ICR3 = (int)(((double)F_CPU) / note_frequency); // Set max to the period
-                OCR3A = (int)(((double)F_CPU) / note_frequency) >> 1; // Set compare to half the period
+                ICR3 = (int)(((double)F_CPU) / (note_frequency * CPU_PRESCALER)); // Set max to the period
+                OCR3A = (int)(((double)F_CPU) / (note_frequency * CPU_PRESCALER)) >> 1; // Set compare to half the period
             } else {
                 ICR3 = 0;
                 OCR3A = 0;
@@ -255,7 +297,12 @@ ISR(TIMER3_COMPA_vect) {
 
 
         note_position++;
-        if (note_position >= note_length) {
+        bool end_of_note = false;
+        if (ICR3 > 0)
+            end_of_note = (note_position >= (note_length / ICR3 * 0xFFFF));
+        else
+            end_of_note = (note_position >= (note_length * 0x7FF));
+        if (end_of_note) {
             current_note++;
             if (current_note >= notes_length) {
                 if (notes_repeat) {
@@ -271,28 +318,43 @@ ISR(TIMER3_COMPA_vect) {
                     return;
                 }
             }
-            #ifdef PWM_AUDIO
-                note_frequency = (*notes_pointer)[current_note][0] / SAMPLE_RATE;
-                note_length = (*notes_pointer)[current_note][1];
-            #else
-                note_frequency = (*notes_pointer)[current_note][0];
-                note_length = (*notes_pointer)[current_note][1] / 4;
-            #endif
+            if (!note_resting && (notes_rest > 0)) {
+                note_resting = true;
+                note_frequency = 0;
+                note_length = notes_rest;
+                current_note--;
+            } else {
+                note_resting = false;
+                #ifdef PWM_AUDIO
+                    note_frequency = (*notes_pointer)[current_note][0] / SAMPLE_RATE;
+                    note_length = (*notes_pointer)[current_note][1];
+                #else
+                    note_frequency = (*notes_pointer)[current_note][0];
+                    note_length = (*notes_pointer)[current_note][1] / 4;
+                #endif
+            }
             note_position = 0;
         }
 
     }
 
+    if (!audio_config.enable) {
+        notes = false;
+        note = false;
+    }
 }
 
-void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat) {
+void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat, float n_rest) {
+
+if (audio_config.enable) {
+
     if (note)
         stop_all_notes();
-    notes = true;
 
     notes_pointer = np;
     notes_length = n_length;
     notes_repeat = n_repeat;
+    notes_rest = n_rest;
 
     place = 0;
     current_note = 0;
@@ -312,9 +374,16 @@ void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat) {
         TIMSK3 |= _BV(OCIE3A);
         TCCR3A |= _BV(COM3A1);
     #endif
+
+    notes = true;
+}
+
 }
 
 void play_sample(uint8_t * s, uint16_t l, bool r) {
+
+if (audio_config.enable) {
+
     stop_all_notes();
     place_int = 0;
     sample = s;
@@ -325,12 +394,17 @@ void play_sample(uint8_t * s, uint16_t l, bool r) {
         TIMSK3 |= _BV(OCIE3A);
     #else
     #endif
+
+}
+
 }
 
 void play_note(double freq, int vol) {
+
+if (audio_config.enable && voices < 8) {
+
     if (notes)
         stop_all_notes();
-    note = true;
     #ifdef PWM_AUDIO
         freq = freq / SAMPLE_RATE;
     #endif
@@ -338,7 +412,7 @@ void play_note(double freq, int vol) {
         if (frequency != 0) {
             double starting_f = frequency;
             if (frequency < freq) {
-                for (double f = starting_f; f <= freq; f += ((freq - starting_f) / 2000.0)) {   
+                for (double f = starting_f; f <= freq; f += ((freq - starting_f) / 2000.0)) {
                     frequency = f;
                 }
             } else if (frequency > freq) {
@@ -362,4 +436,7 @@ void play_note(double freq, int vol) {
         TCCR3A |= _BV(COM3A1);
     #endif
 
+    note = true;
+}
+
 }
\ No newline at end of file
index 99203cea7ab2ff1a613ba4ba661284a3b643ca7a..e1bc23ffed35fc25fe3b70e8615783aa37848b88 100644 (file)
@@ -2,10 +2,42 @@
 #include <stdbool.h>
 #include <avr/io.h>
 #include <util/delay.h>
+#include "musical_notes.h"
+
+#ifndef AUDIO_H
+#define AUDIO_H
+
+typedef union {
+    uint8_t raw;
+    struct {
+        bool    enable :1;
+        uint8_t level  :7;
+    };
+} audio_config_t;
+
+void audio_toggle(void);
+void audio_on(void);
+void audio_off(void);
 
 void play_sample(uint8_t * s, uint16_t l, bool r);
 void play_note(double freq, int vol);
 void stop_note(double freq);
-void stop_all_notes();
-void init_notes();
-void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat);
\ No newline at end of file
+void stop_all_notes(void);
+void init_notes(void);
+void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat, float n_rest);
+
+
+#define SCALE (int []){ 0 + (12*0), 2 + (12*0), 4 + (12*0), 5 + (12*0), 7 + (12*0), 9 + (12*0), 11 + (12*0), \
+                                               0 + (12*1), 2 + (12*1), 4 + (12*1), 5 + (12*1), 7 + (12*1), 9 + (12*1), 11 + (12*1), \
+                                               0 + (12*2), 2 + (12*2), 4 + (12*2), 5 + (12*2), 7 + (12*2), 9 + (12*2), 11 + (12*2), \
+                                               0 + (12*3), 2 + (12*3), 4 + (12*3), 5 + (12*3), 7 + (12*3), 9 + (12*3), 11 + (12*3), \
+                                               0 + (12*4), 2 + (12*4), 4 + (12*4), 5 + (12*4), 7 + (12*4), 9 + (12*4), 11 + (12*4), }
+
+// These macros are used to allow play_notes to play an array of indeterminate
+// length. This works around the limitation of C's sizeof operation on pointers.
+// The global float array for the song must be used here.
+#define NOTE_ARRAY_SIZE(x) ((int)(sizeof(x) / (sizeof(x[0]))))
+#define PLAY_NOTE_ARRAY(note_array, note_repeat, note_rest_style) play_notes(&note_array, NOTE_ARRAY_SIZE((note_array)), (note_repeat), (note_rest_style));
+
+
+#endif
\ No newline at end of file
index 2eef4f15a7cf6e3f2803cb84006339fdfe11ae90..d38e6fdb20210c064e0aba2b33580d3ca89b7cd5 100644 (file)
@@ -27,18 +27,20 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "keymap_midi.h"
 #include "bootloader.h"
 
+extern keymap_config_t keymap_config;
+
 #include <stdio.h>
 #include <inttypes.h>
 #ifdef AUDIO_ENABLE
     #include "audio.h"
-
-    float goodbye[][2] = {
-        {440.0*pow(2.0,(67)/12.0), 400},
-        {0, 50},
-        {440.0*pow(2.0,(60)/12.0), 400},
-        {0, 50},
-        {440.0*pow(2.0,(55)/12.0), 600},
-    };
+    #ifndef TONE_GOODBYE
+    #define TONE_GOODBYE { \
+        {440.0*pow(2.0,(31)/12.0), 8}, \
+        {440.0*pow(2.0,(24)/12.0), 8}, \
+        {440.0*pow(2.0,(19)/12.0), 12}, \
+    } 
+    #endif
+    float tone_goodbye[][2] = TONE_GOODBYE;
 #endif
 
 static action_t keycode_to_action(uint16_t keycode);
@@ -49,118 +51,9 @@ action_t action_for_key(uint8_t layer, keypos_t key)
        // 16bit keycodes - important
     uint16_t keycode = keymap_key_to_keycode(layer, key);
 
-    if (keycode >= 0x0100 && keycode < 0x2000) {
-       // Has a modifier
-       action_t action;
-       // Split it up
-       action.code = ACTION_MODS_KEY(keycode >> 8, keycode & 0xFF); // adds modifier to key
-       return action;
-       } else if (keycode >= 0x2000 && keycode < 0x3000) {
-        // Is a shortcut for function layer, pull last 12bits
-        // This means we have 4,096 FN macros at our disposal
-        return keymap_func_to_action(keycode & 0xFFF);
-       } else if (keycode >= 0x3000 && keycode < 0x4000) {
-      // When the code starts with 3, it's an action macro.
-       action_t action;
-       action.code = ACTION_MACRO(keycode & 0xFF);
-       return action;
-#ifdef BACKLIGHT_ENABLE
-       } else if (keycode >= BL_0 && keycode <= BL_15) {
-        action_t action;
-        action.code = ACTION_BACKLIGHT_LEVEL(keycode & 0x000F);
-        return action;
-    } else if (keycode == BL_DEC) {
-        action_t action;
-        action.code = ACTION_BACKLIGHT_DECREASE();
-        return action;
-    } else if (keycode == BL_INC) {
-        action_t action;
-        action.code = ACTION_BACKLIGHT_INCREASE();
-        return action;
-    } else if (keycode == BL_TOGG) {
-        action_t action;
-        action.code = ACTION_BACKLIGHT_TOGGLE();
-        return action;
-    } else if (keycode == BL_STEP) {
-        action_t action;
-        action.code = ACTION_BACKLIGHT_STEP();
-        return action;
-#endif
-    } else if (keycode == RESET) { // RESET is 0x5000, which is why this is here
-        clear_keyboard();
-        #ifdef AUDIO_ENABLE
-            play_notes(&goodbye, 5, false);
-        #endif
-        _delay_ms(250);
-        #ifdef ATREUS_ASTAR
-            *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
-        #endif
-        bootloader_jump();
-        return;
-    } else if (keycode == DEBUG) { // DEBUG is 0x5001
-      // TODO: Does this actually work?
-        print("\nDEBUG: enabled.\n");
-        debug_enable = true;
-        return;
-    } else if (keycode >= 0x5000 && keycode < 0x6000) {
-        // Layer movement shortcuts
-        // See .h to see constraints/usage
-        int type = (keycode >> 0x8) & 0xF;
-        if (type == 0x1) {
-            // Layer set "GOTO"
-            int when = (keycode >> 0x4) & 0x3;
-            int layer = keycode & 0xF;
-            action_t action;
-            action.code = ACTION_LAYER_SET(layer, when);
-            return action;
-        } else if (type == 0x2) {
-            // Momentary layer
-            int layer = keycode & 0xFF;
-            action_t action;
-            action.code = ACTION_LAYER_MOMENTARY(layer);
-            return action;
-        } else if (type == 0x3) {
-            // Set default layer
-            int layer = keycode & 0xFF;
-            action_t action;
-            action.code = ACTION_DEFAULT_LAYER_SET(layer);
-            return action;
-        } else if (type == 0x4) {
-            // Set default layer
-            int layer = keycode & 0xFF;
-            action_t action;
-            action.code = ACTION_LAYER_TOGGLE(layer);
-            return action;
-        }
-#ifdef MIDI_ENABLE
-    } else if (keycode >= 0x6000 && keycode < 0x7000) {
-        action_t action;
-        action.code =  ACTION_FUNCTION_OPT(keycode & 0xFF, (keycode & 0x0F00) >> 8);
-        return action;
-#endif
-    } else if (keycode >= 0x7000 && keycode < 0x8000) {
-        action_t action;
-        action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
-        return action;
-    } else if (keycode >= 0x8000 && keycode < 0x9000) {
-        action_t action;
-        action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
-        return action;
-#ifdef UNICODE_ENABLE
-    } else if (keycode >= 0x8000000) {
-        action_t action;
-        uint16_t unicode = keycode & ~(0x8000);
-        action.code =  ACTION_FUNCTION_OPT(unicode & 0xFF, (unicode & 0xFF00) >> 8);
-        return action;
-#endif
-    } else {
-
-    }
-
     switch (keycode) {
         case KC_FN0 ... KC_FN31:
             return keymap_fn_to_action(keycode);
-#ifdef BOOTMAGIC_ENABLE
         case KC_CAPSLOCK:
         case KC_LOCKING_CAPS:
             if (keymap_config.swap_control_capslock || keymap_config.capslock_to_control) {
@@ -224,7 +117,6 @@ action_t action_for_key(uint8_t layer, keypos_t key)
                 return keycode_to_action(KC_BSLASH);
             }
             return keycode_to_action(KC_BSPACE);
-#endif
         default:
             return keycode_to_action(keycode);
     }
@@ -265,6 +157,142 @@ static action_t keycode_to_action(uint16_t keycode)
         case KC_TRNS:
             action.code = ACTION_TRANSPARENT;
             break;
+        case 0x0100 ... 0x1FFF: ;
+            // Has a modifier
+            // Split it up
+            action.code = ACTION_MODS_KEY(keycode >> 8, keycode & 0xFF); // adds modifier to key
+            break;
+        case 0x2000 ... 0x2FFF:
+            // Is a shortcut for function layer, pull last 12bits
+            // This means we have 4,096 FN macros at our disposal
+            return keymap_func_to_action(keycode & 0xFFF);
+            break;
+        case 0x3000 ... 0x3FFF: ;
+            // When the code starts with 3, it's an action macro.
+            action.code = ACTION_MACRO(keycode & 0xFF);
+            break;
+    #ifdef BACKLIGHT_ENABLE
+        case BL_0 ... BL_15:
+            action.code = ACTION_BACKLIGHT_LEVEL(keycode & 0x000F);
+            break;
+        case BL_DEC:
+            action.code = ACTION_BACKLIGHT_DECREASE();
+            break;
+        case BL_INC:
+            action.code = ACTION_BACKLIGHT_INCREASE();
+            break;
+        case BL_TOGG:
+            action.code = ACTION_BACKLIGHT_TOGGLE();
+            break;
+        case BL_STEP:
+            action.code = ACTION_BACKLIGHT_STEP();
+            break;
+    #endif
+        case RESET: ; // RESET is 0x5000, which is why this is here
+            clear_keyboard();
+            #ifdef AUDIO_ENABLE
+                PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
+            #endif
+            _delay_ms(250);
+            #ifdef ATREUS_ASTAR
+                *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
+            #endif
+            bootloader_jump();
+            break;
+        case DEBUG: ; // DEBUG is 0x5001
+            print("\nDEBUG: enabled.\n");
+            debug_enable = true;
+            break;
+        case 0x5002 ... 0x50FF:
+            // MAGIC actions (BOOTMAGIC without the boot)
+            if (!eeconfig_is_enabled()) {
+                eeconfig_init();
+            }
+            /* keymap config */
+            keymap_config.raw = eeconfig_read_keymap();
+            if (keycode == MAGIC_SWAP_CONTROL_CAPSLOCK) {
+                keymap_config.swap_control_capslock = 1;
+            } else if (keycode == MAGIC_CAPSLOCK_TO_CONTROL) {
+                keymap_config.capslock_to_control = 1;
+            } else if (keycode == MAGIC_SWAP_LALT_LGUI) {
+                keymap_config.swap_lalt_lgui = 1;
+            } else if (keycode == MAGIC_SWAP_RALT_RGUI) {
+                keymap_config.swap_ralt_rgui = 1;
+            } else if (keycode == MAGIC_NO_GUI) {
+                keymap_config.no_gui = 1;
+            } else if (keycode == MAGIC_SWAP_GRAVE_ESC) {
+                keymap_config.swap_grave_esc = 1;
+            } else if (keycode == MAGIC_SWAP_BACKSLASH_BACKSPACE) {
+                keymap_config.swap_backslash_backspace = 1;
+            } else if (keycode == MAGIC_HOST_NKRO) {
+                keymap_config.nkro = 1;
+            } else if (keycode == MAGIC_SWAP_ALT_GUI) {
+                keymap_config.swap_lalt_lgui = 1;
+                keymap_config.swap_ralt_rgui = 1;
+            }
+            /* UNs */
+            else if (keycode == MAGIC_UNSWAP_CONTROL_CAPSLOCK) {
+                keymap_config.swap_control_capslock = 0;
+            } else if (keycode == MAGIC_UNCAPSLOCK_TO_CONTROL) {
+                keymap_config.capslock_to_control = 0;
+            } else if (keycode == MAGIC_UNSWAP_LALT_LGUI) {
+                keymap_config.swap_lalt_lgui = 0;
+            } else if (keycode == MAGIC_UNSWAP_RALT_RGUI) {
+                keymap_config.swap_ralt_rgui = 0;
+            } else if (keycode == MAGIC_UNNO_GUI) {
+                keymap_config.no_gui = 0;
+            } else if (keycode == MAGIC_UNSWAP_GRAVE_ESC) {
+                keymap_config.swap_grave_esc = 0;
+            } else if (keycode == MAGIC_UNSWAP_BACKSLASH_BACKSPACE) {
+                keymap_config.swap_backslash_backspace = 0;
+            } else if (keycode == MAGIC_UNHOST_NKRO) {
+                keymap_config.nkro = 0;
+            } else if (keycode == MAGIC_UNSWAP_ALT_GUI) {
+                keymap_config.swap_lalt_lgui = 0;
+                keymap_config.swap_ralt_rgui = 0;
+            }
+            eeconfig_write_keymap(keymap_config.raw);
+            break;
+        case 0x5100 ... 0x5FFF: ;
+            // Layer movement shortcuts
+            // See .h to see constraints/usage
+            int type = (keycode >> 0x8) & 0xF;
+            if (type == 0x1) {
+                // Layer set "GOTO"
+                int when = (keycode >> 0x4) & 0x3;
+                int layer = keycode & 0xF;
+                action.code = ACTION_LAYER_SET(layer, when);
+            } else if (type == 0x2) {
+                // Momentary layer
+                int layer = keycode & 0xFF;
+                action.code = ACTION_LAYER_MOMENTARY(layer);
+            } else if (type == 0x3) {
+                // Set default layer
+                int layer = keycode & 0xFF;
+                action.code = ACTION_DEFAULT_LAYER_SET(layer);
+            } else if (type == 0x4) {
+                // Set default layer
+                int layer = keycode & 0xFF;
+                action.code = ACTION_LAYER_TOGGLE(layer);
+            }
+            break;
+    #ifdef MIDI_ENABLE
+        case 0x6000 ... 0x6FFF:
+            action.code =  ACTION_FUNCTION_OPT(keycode & 0xFF, (keycode & 0x0F00) >> 8);
+            break;
+    #endif
+        case 0x7000 ... 0x7FFF:
+            action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
+            break;
+        case 0x8000 ... 0x8FFF:
+            action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
+            break;
+    #ifdef UNICODE_ENABLE
+        case 0x8000000 ... 0x8FFFFFF:
+            uint16_t unicode = keycode & ~(0x8000);
+            action.code =  ACTION_FUNCTION_OPT(unicode & 0xFF, (unicode & 0xFF00) >> 8);
+            break;
+    #endif
         default:
             action.code = ACTION_NO;
             break;
@@ -291,3 +319,11 @@ action_t keymap_func_to_action(uint16_t keycode)
        // For FUNC without 8bit limit
     return (action_t){ .code = pgm_read_word(&fn_actions[(int)keycode]) };
 }
+
+void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
+  if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
+    layer_on(layer3);
+  } else {
+    layer_off(layer3);
+  }
+}
index 3db40772e038863bfa87c00066474137c522ceba..ce87e4770e4394db65d22770351338f6e1a42084 100644 (file)
@@ -30,7 +30,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 // #include "print.h"
 #include "debug.h"
 
-#ifdef BOOTMAGIC_ENABLE
 /* NOTE: Not portable. Bit field order depends on implementation */
 typedef union {
     uint16_t raw;
@@ -45,8 +44,6 @@ typedef union {
         bool nkro:1;
     };
 } keymap_config_t;
-keymap_config_t keymap_config;
-#endif
 
 
 /* translates key to keycode */
@@ -168,6 +165,30 @@ extern const uint16_t fn_actions[];
 #define RESET 0x5000
 #define DEBUG 0x5001
 
+// MAGIC keycodes
+#define MAGIC_SWAP_CONTROL_CAPSLOCK      0x5002
+#define MAGIC_UNSWAP_CONTROL_CAPSLOCK    0x5003
+#define MAGIC_CAPSLOCK_TO_CONTROL        0x5004
+#define MAGIC_UNCAPSLOCK_TO_CONTROL      0x5005
+#define MAGIC_SWAP_LALT_LGUI             0x5006
+#define MAGIC_UNSWAP_LALT_LGUI           0x5007
+#define MAGIC_SWAP_RALT_RGUI             0x5008
+#define MAGIC_UNSWAP_RALT_RGUI           0x5009
+#define MAGIC_NO_GUI                     0x500a
+#define MAGIC_UNNO_GUI                   0x500b
+#define MAGIC_SWAP_GRAVE_ESC             0x500c
+#define MAGIC_UNSWAP_GRAVE_ESC           0x500d
+#define MAGIC_SWAP_BACKSLASH_BACKSPACE   0x500e
+#define MAGIC_UNSWAP_BACKSLASH_BACKSPACE 0x500f
+#define MAGIC_HOST_NKRO                  0x5010
+#define MAGIC_UNHOST_NKRO                0x5011
+#define MAGIC_SWAP_ALT_GUI               0x5012
+#define MAGIC_UNSWAP_ALT_GUI             0x5013
+
+#define AG_SWAP MAGIC_SWAP_ALT_GUI
+#define AG_NORM MAGIC_UNSWAP_ALT_GUI
+
+
 // GOTO layer - 16 layers max
 // when:
 // ON_PRESS    = 1
@@ -184,8 +205,6 @@ extern const uint16_t fn_actions[];
 // Toggle to layer - 256 layer max
 #define TG(layer) (layer | 0x5400)
 
-#define MIDI(n) (n | 0x6000)
-
 // M-od, T-ap - 256 keycode max
 #define MT(mod, kc) (kc | 0x7000 | ((mod & 0xF) << 8))
 #define CTL_T(kc) MT(0x1, kc)
@@ -210,5 +229,10 @@ extern const uint16_t fn_actions[];
 #define UNICODE(n) (n | 0x8000)
 #define UC(n) UNICODE(n)
 
+// For tri-layer
+void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3);
+#define IS_LAYER_ON(layer)  ((layer_state) & (1UL<<(layer)))
+#define IS_LAYER_OFF(layer) ((!layer_state) & (1UL<<(layer)))
+
 
 #endif
index a89420ce2a26f89d510e1555df32fe5b0318ccce..795f26380ed8fb5eb53ac5b2999e358769cb1f09 100644 (file)
@@ -20,7 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <lufa.h>
 
-#define MIDI 0x6000
+#define MIDI(n) ((n) | 0x6000)
 #define MIDI12 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000
 
 #define CHNL(note, channel) (note + (channel << 8))
diff --git a/quantum/musical_notes.h b/quantum/musical_notes.h
new file mode 100644 (file)
index 0000000..837f6a0
--- /dev/null
@@ -0,0 +1,187 @@
+#ifndef MUSICAL_NOTES_H
+#define MUSICAL_NOTES_H
+
+// Tempo Placeholder
+#define TEMPO 120
+
+
+// Note Types
+#define WHOLE_NOTE(note)     {(NOTE##note), 64}
+#define HALF_NOTE(note)      {(NOTE##note), 32}
+#define QUARTER_NOTE(note)   {(NOTE##note), 16}
+#define EIGHTH_NOTE(note)    {(NOTE##note), 8}
+#define SIXTEENTH_NOTE(note) {(NOTE##note), 4}
+
+// Note Types Short
+#define W_NOTE(n) WHOLE_NOTE(n)
+#define H_NOTE(n) HALF_NOTE(n)
+#define Q_NOTE(n) QUARTER_NOTE(n)
+#define E_NOTE(n) EIGTH_NOTE(n)
+#define S_NOTE(n) SIXTEENTH_NOTE(n)
+
+// Note Styles
+// Staccato makes sure there is a rest between each note. Think: TA TA TA
+// Legato makes notes flow together. Think: TAAA
+#define STACCATO 0.01
+#define LEGATO   0
+
+// Notes - # = Octave
+#define NOTE_REST         0.00
+#define NOTE_C0          16.35
+#define NOTE_CS0         17.32
+#define NOTE_D0          18.35
+#define NOTE_DS0         19.45
+#define NOTE_E0          20.60
+#define NOTE_F0          21.83
+#define NOTE_FS0         23.12
+#define NOTE_G0          24.50
+#define NOTE_GS0         25.96
+#define NOTE_A0          27.50
+#define NOTE_AS0         29.14
+#define NOTE_B0          30.87
+#define NOTE_C1          32.70
+#define NOTE_CS1         34.65
+#define NOTE_D1          36.71
+#define NOTE_DS1         38.89
+#define NOTE_E1          41.20
+#define NOTE_F1          43.65
+#define NOTE_FS1         46.25
+#define NOTE_G1          49.00
+#define NOTE_GS1         51.91
+#define NOTE_A1          55.00
+#define NOTE_AS1         58.27
+#define NOTE_B1          61.74
+#define NOTE_C2          65.41
+#define NOTE_CS2         69.30
+#define NOTE_D2          73.42
+#define NOTE_DS2         77.78
+#define NOTE_E2          82.41
+#define NOTE_F2          87.31
+#define NOTE_FS2         92.50
+#define NOTE_G2          98.00
+#define NOTE_GS2        103.83
+#define NOTE_A2         110.00
+#define NOTE_AS2        116.54
+#define NOTE_B2         123.47
+#define NOTE_C3         130.81
+#define NOTE_CS3        138.59
+#define NOTE_D3         146.83
+#define NOTE_DS3        155.56
+#define NOTE_E3         164.81
+#define NOTE_F3         174.61
+#define NOTE_FS3        185.00
+#define NOTE_G3         196.00
+#define NOTE_GS3        207.65
+#define NOTE_A3         220.00
+#define NOTE_AS3        233.08
+#define NOTE_B3         246.94
+#define NOTE_C4         261.63
+#define NOTE_CS4        277.18
+#define NOTE_D4         293.66
+#define NOTE_DS4        311.13
+#define NOTE_E4         329.63
+#define NOTE_F4         349.23
+#define NOTE_FS4        369.99
+#define NOTE_G4         392.00
+#define NOTE_GS4        415.30
+#define NOTE_A4         440.00
+#define NOTE_AS4        466.16
+#define NOTE_B4         493.88
+#define NOTE_C5         523.25
+#define NOTE_CS5        554.37
+#define NOTE_D5         587.33
+#define NOTE_DS5        622.25
+#define NOTE_E5         659.26
+#define NOTE_F5         698.46
+#define NOTE_FS5        739.99
+#define NOTE_G5         783.99
+#define NOTE_GS5        830.61
+#define NOTE_A5         880.00
+#define NOTE_AS5        932.33
+#define NOTE_B5         987.77
+#define NOTE_C6        1046.50
+#define NOTE_CS6       1108.73
+#define NOTE_D6        1174.66
+#define NOTE_DS6       1244.51
+#define NOTE_E6        1318.51
+#define NOTE_F6        1396.91
+#define NOTE_FS6       1479.98
+#define NOTE_G6        1567.98
+#define NOTE_GS6       1661.22
+#define NOTE_A6        1760.00
+#define NOTE_AS6       1864.66
+#define NOTE_B6        1975.53
+#define NOTE_C7        2093.00
+#define NOTE_CS7       2217.46
+#define NOTE_D7        2349.32
+#define NOTE_DS7       2489.02
+#define NOTE_E7        2637.02
+#define NOTE_F7        2793.83
+#define NOTE_FS7       2959.96
+#define NOTE_G7        3135.96
+#define NOTE_GS7       3322.44
+#define NOTE_A7        3520.00
+#define NOTE_AS7       3729.31
+#define NOTE_B7        3951.07
+#define NOTE_C8        4186.01
+#define NOTE_CS8       4434.92
+#define NOTE_D8        4698.64
+#define NOTE_DS8       4978.03
+#define NOTE_E8        5274.04
+#define NOTE_F8        5587.65
+#define NOTE_FS8       5919.91
+#define NOTE_G8        6271.93
+#define NOTE_GS8       6644.88
+#define NOTE_A8        7040.00
+#define NOTE_AS8       7458.62
+#define NOTE_B8        7902.13
+
+// Flat Aliases
+#define NOTE_DF0 NOTE_CS0
+#define NOTE_EF0 NOTE_DS0
+#define NOTE_GF0 NOTE_FS0
+#define NOTE_AF0 NOTE_GS0
+#define NOTE_BF0 NOTE_AS0
+#define NOTE_DF1 NOTE_CS1
+#define NOTE_EF1 NOTE_DS1
+#define NOTE_GF1 NOTE_FS1
+#define NOTE_AF1 NOTE_GS1
+#define NOTE_BF1 NOTE_AS1
+#define NOTE_DF2 NOTE_CS2
+#define NOTE_EF2 NOTE_DS2
+#define NOTE_GF2 NOTE_FS2
+#define NOTE_AF2 NOTE_GS2
+#define NOTE_BF2 NOTE_AS2
+#define NOTE_DF3 NOTE_CS3
+#define NOTE_EF3 NOTE_DS3
+#define NOTE_GF3 NOTE_FS3
+#define NOTE_AF3 NOTE_GS3
+#define NOTE_BF3 NOTE_AS3
+#define NOTE_DF4 NOTE_CS4
+#define NOTE_EF4 NOTE_DS4
+#define NOTE_GF4 NOTE_FS4
+#define NOTE_AF4 NOTE_GS4
+#define NOTE_BF4 NOTE_AS4
+#define NOTE_DF5 NOTE_CS5
+#define NOTE_EF5 NOTE_DS5
+#define NOTE_GF5 NOTE_FS5
+#define NOTE_AF5 NOTE_GS5
+#define NOTE_BF5 NOTE_AS5
+#define NOTE_DF6 NOTE_CS6
+#define NOTE_EF6 NOTE_DS6
+#define NOTE_GF6 NOTE_FS6
+#define NOTE_AF6 NOTE_GS6
+#define NOTE_BF6 NOTE_AS6
+#define NOTE_DF7 NOTE_CS7
+#define NOTE_EF7 NOTE_DS7
+#define NOTE_GF7 NOTE_FS7
+#define NOTE_AF7 NOTE_GS7
+#define NOTE_BF7 NOTE_AS7
+#define NOTE_DF8 NOTE_CS8
+#define NOTE_EF8 NOTE_DS8
+#define NOTE_GF8 NOTE_FS8
+#define NOTE_AF8 NOTE_GS8
+#define NOTE_BF8 NOTE_AS8
+
+
+#endif
\ No newline at end of file
index de93af7e8cbe0af3863052bca27f34cb064bf939..1fe7390ebacb51062f41be9f9231b49dc5606679 100644 (file)
@@ -23,19 +23,19 @@ ifndef CUSTOM_MATRIX
        SRC += $(QUANTUM_DIR)/matrix.c
 endif
 
-ifdef MIDI_ENABLE
+ifeq ($(strip $(MIDI_ENABLE)), yes)
        SRC += $(QUANTUM_DIR)/keymap_midi.c
 endif
 
-ifdef AUDIO_ENABLE
+ifeq ($(strip $(AUDIO_ENABLE)), yes)
        SRC += $(QUANTUM_DIR)/audio.c
 endif
 
-ifdef UNICODE_ENABLE
+ifeq ($(strip $(UNICODE_ENABLE)), yes)
        SRC += $(QUANTUM_DIR)/keymap_unicode.c
 endif
 
-ifdef RGBLIGHT_ENABLE
+ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
        SRC += $(QUANTUM_DIR)/light_ws2812.c
        SRC += $(QUANTUM_DIR)/rgblight.c
        OPT_DEFS += -DRGBLIGHT_ENABLE
@@ -46,6 +46,7 @@ endif
 
 # Search Path
 VPATH += $(TOP_DIR)/$(QUANTUM_DIR)
+VPATH += $(TOP_DIR)/$(QUANTUM_DIR)/keymap_extras
 
 include $(TMK_DIR)/protocol/lufa.mk
 
diff --git a/quantum/tools/README.md b/quantum/tools/README.md
new file mode 100644 (file)
index 0000000..0702144
--- /dev/null
@@ -0,0 +1,6 @@
+`eeprom_reset.hex` is to reset the eeprom on the Atmega32u4, like this:
+
+    dfu-programmer atmega32u4 erase
+    dfu-programmer atmega32u4 flash --eeprom eeprom-reset.bin
+
+ You'll need to reflash afterwards, because DFU requires the flash to be erased before messing with the eeprom.
\ No newline at end of file
diff --git a/quantum/tools/eeprom_reset.hex b/quantum/tools/eeprom_reset.hex
new file mode 100644 (file)
index 0000000..a8a7538
--- /dev/null
@@ -0,0 +1,9 @@
+:10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
+:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
+:10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
+:10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0
+:10004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0
+:10005000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0
+:10006000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0
+:10007000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF90
+:00000001FF
index 89c366f5547dcf2dc1c44b435ec692caaa98ca9a..9cb2eb8ecd0916b3bff2bddf7962425a38e40f94 100644 (file)
@@ -17,66 +17,70 @@ SRC +=      $(COMMON_DIR)/host.c \
 
 
 # Option modules
-ifdef BOOTMAGIC_ENABLE
+ifeq ($(strip $(BOOTMAGIC_ENABLE)), yes)
     SRC += $(COMMON_DIR)/bootmagic.c
     SRC += $(COMMON_DIR)/avr/eeconfig.c
     OPT_DEFS += -DBOOTMAGIC_ENABLE
+else
+    SRC += $(COMMON_DIR)/magic.c
+    SRC += $(COMMON_DIR)/avr/eeconfig.c
 endif
 
-ifdef MOUSEKEY_ENABLE
+ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
     SRC += $(COMMON_DIR)/mousekey.c
     OPT_DEFS += -DMOUSEKEY_ENABLE
     OPT_DEFS += -DMOUSE_ENABLE
 endif
 
-ifdef EXTRAKEY_ENABLE
+ifeq ($(strip $(EXTRAKEY_ENABLE)), yes)
     OPT_DEFS += -DEXTRAKEY_ENABLE
 endif
 
-ifdef CONSOLE_ENABLE
+ifeq ($(strip $(CONSOLE_ENABLE)), yes)
     OPT_DEFS += -DCONSOLE_ENABLE
 else
     OPT_DEFS += -DNO_PRINT
     OPT_DEFS += -DNO_DEBUG
 endif
 
-ifdef COMMAND_ENABLE
+ifeq ($(strip $(COMMAND_ENABLE)), yes)
     SRC += $(COMMON_DIR)/command.c
     OPT_DEFS += -DCOMMAND_ENABLE
 endif
 
-ifdef NKRO_ENABLE
+ifeq ($(strip $(NKRO_ENABLE)), yes)
     OPT_DEFS += -DNKRO_ENABLE
 endif
 
-ifdef MIDI_ENABLE
+ifeq ($(strip $(MIDI_ENABLE)), yes)
     OPT_DEFS += -DMIDI_ENABLE
 endif
 
-ifdef AUDIO_ENABLE
+ifeq ($(strip $(AUDIO_ENABLE)), yes)
     OPT_DEFS += -DAUDIO_ENABLE
 endif
 
-ifdef USB_6KRO_ENABLE
+ifeq ($(strip $(USB_6KRO_ENABLE)), yes)
     OPT_DEFS += -DUSB_6KRO_ENABLE
 endif
 
-ifdef SLEEP_LED_ENABLE
+ifeq ($(strip $(SLEEP_LED_ENABLE)), yes)
     SRC += $(COMMON_DIR)/sleep_led.c
     OPT_DEFS += -DSLEEP_LED_ENABLE
     OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
 endif
 
-ifdef BACKLIGHT_ENABLE
+ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
     SRC += $(COMMON_DIR)/backlight.c
+    SRC += $(COMMON_DIR)/avr/eeconfig.c
     OPT_DEFS += -DBACKLIGHT_ENABLE
 endif
 
-ifdef BLUETOOTH_ENABLE
+ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
     OPT_DEFS += -DBLUETOOTH_ENABLE
 endif
 
-ifdef KEYMAP_SECTION_ENABLE
+ifeq ($(strip $(KEYMAP_SECTION_ENABLE)), yes)
     OPT_DEFS += -DKEYMAP_SECTION_ENABLE
 
     ifeq ($(strip $(MCU)),atmega32u2)
index 4fe9c1d581fcf19064c563bad186e46ec2172847..2b0b0b077ef16292006588f5f0e3e7cecbf55615 100644 (file)
@@ -301,7 +301,7 @@ enum backlight_opt {
 #define ACTION_BACKLIGHT_DECREASE()     ACTION(ACT_BACKLIGHT, BACKLIGHT_DECREASE << 8)
 #define ACTION_BACKLIGHT_TOGGLE()       ACTION(ACT_BACKLIGHT, BACKLIGHT_TOGGLE << 8)
 #define ACTION_BACKLIGHT_STEP()         ACTION(ACT_BACKLIGHT, BACKLIGHT_STEP << 8)
-#define ACTION_BACKLIGHT_LEVEL(level)   ACTION(ACT_BACKLIGHT, BACKLIGHT_LEVEL << 8 | level)
+#define ACTION_BACKLIGHT_LEVEL(level)   ACTION(ACT_BACKLIGHT, BACKLIGHT_LEVEL << 8 | (level))
 /* Command */
 #define ACTION_COMMAND(id, opt)         ACTION(ACT_COMMAND,  (opt)<<8 | (addr))
 /* Function */
index fc721a732300b2f4ecb74cbde069f41fa8c816e9..e817c0d515220649db7576f777e9def4cacd1953 100644 (file)
@@ -111,7 +111,7 @@ void layer_debug(void)
 #endif
 
 #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
-uint8_t source_layers_cache[MAX_LAYER_BITS][(MATRIX_ROWS * MATRIX_COLS + 7) / 8] = {0};
+uint8_t source_layers_cache[(MATRIX_ROWS * MATRIX_COLS + 7) / 8][MAX_LAYER_BITS] = {0};
 
 void update_source_layers_cache(keypos_t key, uint8_t layer)
 {
@@ -120,9 +120,9 @@ void update_source_layers_cache(keypos_t key, uint8_t layer)
     const uint8_t storage_bit = key_number % 8;
 
     for (uint8_t bit_number = 0; bit_number < MAX_LAYER_BITS; bit_number++) {
-        source_layers_cache[bit_number][storage_row] ^=
+        source_layers_cache[storage_row][bit_number] ^=
             (-((layer & (1U << bit_number)) != 0)
-             ^ source_layers_cache[bit_number][storage_row])
+             ^ source_layers_cache[storage_row][bit_number])
             & (1U << storage_bit);
     }
 }
@@ -136,7 +136,7 @@ uint8_t read_source_layers_cache(keypos_t key)
 
     for (uint8_t bit_number = 0; bit_number < MAX_LAYER_BITS; bit_number++) {
         layer |=
-            ((source_layers_cache[bit_number][storage_row]
+            ((source_layers_cache[storage_row][bit_number]
               & (1U << storage_bit)) != 0)
             << bit_number;
     }
index 3a4b1e334930500d51280bdbf3cbb0a14632618a..025cf5420f7d821098d1d991e77a16e6868694ba 100644 (file)
@@ -68,6 +68,7 @@ void layer_xor(uint32_t state);
 #define layer_and(state)
 #define layer_xor(state)
 #define layer_debug()
+
 #endif
 
 /* pressed actions cache */
index 5bd47dc6ad242c9fec46e09e8f568dca6ae8134d..25bb9e849cc8cd3b3251391cd0ebf963df623e4f 100644 (file)
@@ -13,6 +13,9 @@ void eeconfig_init(void)
 #ifdef BACKLIGHT_ENABLE
     eeprom_write_byte(EECONFIG_BACKLIGHT,      0);
 #endif
+#ifdef AUDIO_ENABLE
+    eeprom_write_byte(EECONFIG_AUDIO,             0xFF); // On by default
+#endif
 }
 
 void eeconfig_enable(void)
@@ -43,3 +46,8 @@ void eeconfig_write_keymap(uint8_t val) { eeprom_write_byte(EECONFIG_KEYMAP, val
 uint8_t eeconfig_read_backlight(void)      { return eeprom_read_byte(EECONFIG_BACKLIGHT); }
 void eeconfig_write_backlight(uint8_t val) { eeprom_write_byte(EECONFIG_BACKLIGHT, val); }
 #endif
+
+#ifdef AUDIO_ENABLE
+uint8_t eeconfig_read_audio(void)      { return eeprom_read_byte(EECONFIG_AUDIO); }
+void eeconfig_write_audio(uint8_t val) { eeprom_write_byte(EECONFIG_AUDIO, val); }
+#endif
\ No newline at end of file
index 3cd1a174f6658b2e795e8b0980d9cddf8f93f6d6..ddefca13472aa3bb794a02ff94dfdccba6afd21d 100644 (file)
@@ -31,6 +31,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define EECONFIG_KEYMAP                             (uint8_t *)4
 #define EECONFIG_MOUSEKEY_ACCEL                     (uint8_t *)5
 #define EECONFIG_BACKLIGHT                          (uint8_t *)6
+#define EECONFIG_AUDIO                              (uint8_t *)7
 
 
 /* debug bit */
@@ -72,4 +73,9 @@ uint8_t eeconfig_read_backlight(void);
 void eeconfig_write_backlight(uint8_t val);
 #endif
 
+#ifdef AUDIO_ENABLE
+uint8_t eeconfig_read_audio(void);
+void eeconfig_write_audio(uint8_t val);
+#endif
+
 #endif
index 302b3ec87c918a49ec62759ede5ed8b3e5d44b9a..1d998184811d6a9db8aa9a3b5072addf05d7bbdc 100644 (file)
@@ -27,7 +27,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "command.h"
 #include "util.h"
 #include "sendchar.h"
-#include "bootmagic.h"
+#ifdef BOOTMAGIC_ENABLE
+    #include "bootmagic.h"
+#else
+    #include "magic.h"
+#endif
 #include "eeconfig.h"
 #include "backlight.h"
 #ifdef MOUSEKEY_ENABLE
@@ -86,6 +90,8 @@ void keyboard_init(void)
 
 #ifdef BOOTMAGIC_ENABLE
     bootmagic();
+#else
+    magic();
 #endif
 
 #ifdef BACKLIGHT_ENABLE
index 11f4aa8aaa9f0909263b8b79361bde79e9ece76f..8955fc710d518665a7a9298afb12d7f2716cec65 100644 (file)
@@ -22,7 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "action_macro.h"
 #include "wait.h"
 #include "debug.h"
-
+#include "bootloader.h"
 
 static action_t keycode_to_action(uint8_t keycode);
 
@@ -143,6 +143,7 @@ static action_t keycode_to_action(uint8_t keycode)
             action.code = ACTION_TRANSPARENT;
             break;
         case KC_BOOTLOADER:
+               action.code = ACTION_NO;
             clear_keyboard();
             wait_ms(50);
             bootloader_jump(); // not return
index e1a6f992e64cf47e0201790ddce1b8f069c6c06a..abc9bdb32dcd258189d797ca97d7c5c7340fdd21 100644 (file)
@@ -22,8 +22,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <stdbool.h>
 #include "action.h"
 
-
-#ifdef BOOTMAGIC_ENABLE
 /* NOTE: Not portable. Bit field order depends on implementation */
 typedef union {
     uint8_t raw;
@@ -39,7 +37,6 @@ typedef union {
     };
 } keymap_config_t;
 keymap_config_t keymap_config;
-#endif
 
 
 /* translates key to keycode */
diff --git a/tmk_core/common/magic.c b/tmk_core/common/magic.c
new file mode 100644 (file)
index 0000000..f21d134
--- /dev/null
@@ -0,0 +1,36 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <util/delay.h>
+#include "matrix.h"
+#include "bootloader.h"
+#include "debug.h"
+#include "keymap.h"
+#include "host.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+#include "magic.h"
+
+keymap_config_t keymap_config;
+
+void magic(void)
+{
+    /* check signature */
+    if (!eeconfig_is_enabled()) {
+        eeconfig_init();
+    }
+
+    /* debug enable */
+    debug_config.raw = eeconfig_read_debug();
+
+    /* keymap config */
+    keymap_config.raw = eeconfig_read_keymap();
+
+#ifdef NKRO_ENABLE
+    keyboard_nkro = keymap_config.nkro;
+#endif
+
+    uint8_t default_layer = 0;
+    default_layer = eeconfig_read_default_layer();
+    default_layer_set((uint32_t)default_layer);
+
+}
\ No newline at end of file
diff --git a/tmk_core/common/magic.h b/tmk_core/common/magic.h
new file mode 100644 (file)
index 0000000..3fa2d8b
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef MAGIC_H
+#define MAGIC_H
+
+void magic(void);
+
+#endif
index 4905760bb44804f1c07917dd3b721e5b006084b8..9ac6298f1110094445bf33ddcdb4d67d594361af 100644 (file)
@@ -17,7 +17,7 @@ LUFA_SRC = $(LUFA_DIR)/lufa.c \
           $(LUFA_DIR)/descriptor.c \
           $(LUFA_SRC_USB)
 
-ifdef MIDI_ENABLE
+ifeq ($(strip $(MIDI_ENABLE)), yes)
        LUFA_SRC += $(LUFA_DIR)/midi/midi.c \
           $(LUFA_DIR)/midi/midi_device.c \
           $(LUFA_DIR)/midi/bytequeue/bytequeue.c \
@@ -25,7 +25,7 @@ ifdef MIDI_ENABLE
           $(LUFA_SRC_USBCLASS)
 endif
 
-ifdef BLUETOOTH_ENABLE
+ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
        LUFA_SRC += $(LUFA_DIR)/bluetooth.c \
        $(TMK_DIR)/protocol/serial_uart.c
 endif