From f4ba9662f41342dd40052c70c4384ff7d03d7c15 Mon Sep 17 00:00:00 2001 From: Jonathan Arnett Date: Thu, 21 Jan 2016 21:25:33 -0500 Subject: A to toggle L2, hjkl to move mouse --- keyboard/ergodox_ez/keymaps/j3rn/keymap.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/j3rn/keymap.c b/keyboard/ergodox_ez/keymaps/j3rn/keymap.c index b5463cb72d..e5be6fed90 100644 --- a/keyboard/ergodox_ez/keymaps/j3rn/keymap.c +++ b/keyboard/ergodox_ez/keymaps/j3rn/keymap.c @@ -14,7 +14,7 @@ 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 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -34,7 +34,7 @@ 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, @@ -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) -- cgit v1.2.3 From 6f53e17bf50fbe7bb833a0993e367be81fd2d559 Mon Sep 17 00:00:00 2001 From: Jonathan Arnett Date: Wed, 27 Jan 2016 19:13:54 -0500 Subject: Building a row of level switch buttons --- keyboard/ergodox_ez/keymaps/j3rn/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/j3rn/keymap.c b/keyboard/ergodox_ez/keymaps/j3rn/keymap.c index e5be6fed90..5da697088f 100644 --- a/keyboard/ergodox_ez/keymaps/j3rn/keymap.c +++ b/keyboard/ergodox_ez/keymaps/j3rn/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| 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), LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G, + CTL_T(KC_ESC), 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, -- cgit v1.2.3 From 9cfc74c35b940884618b0fe1e6fd25c570e1c974 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Thu, 7 Apr 2016 15:21:06 +0300 Subject: [Erez & Jack] Makes tri-layer available across Quantum --- keyboard/planck/keymaps/default/keymap.c | 9 --------- quantum/keymap_common.c | 8 ++++++++ quantum/keymap_common.h | 4 ++++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index dee2840f2d..56092d04fb 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c @@ -174,16 +174,7 @@ float tone_dv[][2] = { }; #endif -#define IS_LAYER_ON(layer) ((layer_state) & (1<<(layer))) -#define IS_LAYER_OFF(layer) ((!layer_state) & (1<<(layer))) -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); - } -} const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index e3030a8869..3a00d36f08 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -291,3 +291,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); + } +} diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h index 4a877d2a70..7452a1ff3f 100644 --- a/quantum/keymap_common.h +++ b/quantum/keymap_common.h @@ -208,5 +208,9 @@ 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 -- cgit v1.2.3 From 2557b91644d9565c43f0e5c27d45788d4a47f3eb Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Thu, 7 Apr 2016 15:45:11 +0300 Subject: [Erez & Jack] Documents tri-layer and keymap-specific makefile options --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ab7373023a..613bdcf42b 100644 --- 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 `, which will create `/keyboard/` 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: -- cgit v1.2.3 From aaa7af752c89bdf22054c6dd0369c83ca1bee30d Mon Sep 17 00:00:00 2001 From: Jonathan Arnett Date: Mon, 11 Apr 2016 19:01:39 -0400 Subject: Make a also toggle Media layer --- keyboard/ergodox_ez/keymaps/j3rn/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox_ez/keymaps/j3rn/keymap.c b/keyboard/ergodox_ez/keymaps/j3rn/keymap.c index 5da697088f..5eb1574017 100644 --- a/keyboard/ergodox_ez/keymaps/j3rn/keymap.c +++ b/keyboard/ergodox_ez/keymaps/j3rn/keymap.c @@ -34,7 +34,7 @@ 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_FN2, LALT(KC_LSFT), KC_LEFT,KC_RGHT, -- cgit v1.2.3 From 4b03a0f3d5f59c80cce8bb666b3aea166de5e5f1 Mon Sep 17 00:00:00 2001 From: Jonathan Arnett Date: Mon, 11 Apr 2016 19:08:24 -0400 Subject: Stylistic changes --- keyboard/ergodox_ez/keymaps/j3rn/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox_ez/keymaps/j3rn/keymap.c b/keyboard/ergodox_ez/keymaps/j3rn/keymap.c index 5eb1574017..6e271321d5 100644 --- a/keyboard/ergodox_ez/keymaps/j3rn/keymap.c +++ b/keyboard/ergodox_ez/keymaps/j3rn/keymap.c @@ -34,7 +34,7 @@ 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), LT(MDIA, 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_FN2, LALT(KC_LSFT), KC_LEFT,KC_RGHT, -- cgit v1.2.3 From 9e2c767c454ff07330b522579f6433276ae9d7cb Mon Sep 17 00:00:00 2001 From: Jonathan Arnett Date: Mon, 11 Apr 2016 19:19:20 -0400 Subject: Added README note about Vim-style navigation --- keyboard/ergodox_ez/keymaps/j3rn/readme.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/j3rn/readme.md b/keyboard/ergodox_ez/keymaps/j3rn/readme.md index b0c4d267bd..fc4b640426 100644 --- a/keyboard/ergodox_ez/keymaps/j3rn/readme.md +++ b/keyboard/ergodox_ez/keymaps/j3rn/readme.md @@ -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." -- cgit v1.2.3 From efffbe35c88fbc2360ba643b3163a75c3393d601 Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Mon, 11 Apr 2016 22:51:12 -0500 Subject: The Ordinary Layout is the layout you are looking for. Come and see. --- keyboard/ergodox_ez/keymaps/ordinary/keymap.c | 499 +++-- .../ergodox_ez/keymaps/ordinary/ordinary-base.png | Bin 94771 -> 99031 bytes .../ergodox_ez/keymaps/ordinary/ordinary-base.txt | 14 +- .../ergodox_ez/keymaps/ordinary/ordinary-media.png | Bin 108774 -> 119139 bytes .../ergodox_ez/keymaps/ordinary/ordinary-media.txt | 44 +- .../keymaps/ordinary/ordinary-symbol.png | Bin 93001 -> 98257 bytes .../keymaps/ordinary/ordinary-symbol.txt | 40 +- keyboard/ergodox_ez/keymaps/ordinary/ordinary.hex | 2294 ++++++++++---------- keyboard/ergodox_ez/keymaps/ordinary/readme.md | 66 +- 9 files changed, 1633 insertions(+), 1324 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/ordinary/keymap.c b/keyboard/ergodox_ez/keymaps/ordinary/keymap.c index 4dd6d883ca..07a1e5e899 100644 --- a/keyboard/ergodox_ez/keymaps/ordinary/keymap.c +++ b/keyboard/ergodox_ez/keymaps/ordinary/keymap.c @@ -1,149 +1,375 @@ #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 LOCK 1 // layer lock keys +#define SYMB_MO 2 // symbols momentary layer +#define SYMB_TG 3 // symbols lock layer +#define SYMB_XX 4 // symbols lock layer +#define MDIA_MO 5 // media momentary layer +#define MDIA_TG 6 // media lock layer +#define MDIA_XX 7 // topmost escape /* - * 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 10: 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_TRNS ,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_TRNS + ,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 11: 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) +,KC_NO ,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 ,KC_NO + ,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 12: Symbol Unlock Layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | | Esc | | | | | | | | | | | | | | + * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| + * | Unlock | | | | | | | | | | | | | | Unlock | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | | | | | | |------| |------| | | | | | | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | Caps LOCK | | | | | | | | | | | | | | Caps LOCK | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[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 20: Media and mouse keys * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | 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| - * `--------------------' `--------------------' + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | | 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| + * `--------------------' `--------------------' */ -// 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, +[MDIA_MO] = KEYMAP( +// left hand + KC_TRNS ,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 +,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_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_TRNS + ,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 ,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 21: 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 +,KC_NO ,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 ,KC_NO + ,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 22: 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 + ) }; 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 +394,36 @@ 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); 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; + + // lock layer turns on all lights + if(layer == LOCK || layer == SYMB_XX) { + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + } else if(layer == MDIA_XX) { + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); } + // caps lock turns on red light + if(host_keyboard_leds() & (1<\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"], diff --git a/keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.png b/keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.png index 89d15e4506..9c0e8bba39 100644 Binary files a/keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.png and b/keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.png differ diff --git a/keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.txt b/keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.txt index 4237f08201..c7bd272eca 100644 --- a/keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.txt +++ b/keyboard/ergodox_ez/keymaps/ordinary/ordinary-media.txt @@ -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"] diff --git a/keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.png b/keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.png index 7522af3330..2538fbeb30 100644 Binary files a/keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.png and b/keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.png differ diff --git a/keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.txt b/keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.txt index dda15f71be..098a08d2f1 100644 --- a/keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.txt +++ b/keyboard/ergodox_ez/keymaps/ordinary/ordinary-symbol.txt @@ -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"], diff --git a/keyboard/ergodox_ez/keymaps/ordinary/ordinary.hex b/keyboard/ergodox_ez/keymaps/ordinary/ordinary.hex index 1a08598465..c8d56d5b37 100644 --- a/keyboard/ergodox_ez/keymaps/ordinary/ordinary.hex +++ b/keyboard/ergodox_ez/keymaps/ordinary/ordinary.hex @@ -1,1119 +1,1179 @@ -:100000000C9465020C94A9020C94A9020C94A90208 -:100010000C94A9020C94A9020C94A9020C94A902B4 -:100020000C94A9020C94A9020C94B00B0C94820CB1 -:100030000C94A9020C94A9020C94A9020C94A90294 -:100040000C94A9020C940B210C94A9020C94A90203 -:100050000C94A9020C94AD1A0C94A9020C94A90258 -:100060000C94A9020C94A9020C94A9020C94A90264 -:100070000C94A9020C94A9020C94A9020C94A90254 -:100080000C94A9020C94A9020C94A9020C94A90244 -:100090000C94A9020C94A9020C94A9020C94A90234 -:1000A0000C94A9020C94A9020C94A902E70C090D66 -:1000B000F40D090DF40D4B0D6E0DF40DC30DD60DA1 -:1000C000C310C310F110F11033116F116F136F13C0 -:1000D00087116F137E127E1249136F136F135D1316 -:1000E0000000F0A135002B000152E100E00000000B -:1000F0001E00140004001D7100774E001F001A003E -:1001000016001B00007F4C002000080007000600BE -:10011000E2002A002100150009001900E3004B004D -:10012000220017000A00050000004A0029002F00E5 -:1001300000002B0200004D002D00300000002B00BD -:100140000000500023001C000B00110000004F00B5 -:10015000240018000D001000E700520025000C00DC -:100160000E003600E6002C00260012000F003700BB -:10017000007F2800270013003300387100775100FA -:100180002E0031823481E500E40000002900025293 -:1001900001000100010000003A001E0220022202BC -:1001A000010051003B001F02210223020100280030 -:1001B0003C002F0226022F0001002C003D003002DF -:1001C00027023000010052003E00240235003502B3 -:1001D000000050000100360200002B0000004F001C -:1001E0000100370200002B0200004A003F003102EC -:1001F0003800310000004D0040005F005C005900F5 -:1002000062004B00410060005D005A0037004C0066 -:10021000420061005E005B0067002A00430054005A -:100220005500560057004E004400450001003900BB -:1002300058000000290002520100010001000000E6 -:10024000A5000100010001000100B500A6000100A9 -:10025000F200010001000100A800F000F100F1002F -:10026000F400B600AA00F900F3000100FA00B4009F -:10027000A9000100010001000000B8000100F90020 -:100280000000FA000000B9000100F9000000FA00C7 -:100290000000AC00010001004A0001000000AB00BA -:1002A0004600F9005000FA000100A9004B0052007E -:1002B000510051004E00AE00B30001004F0001009C -:1002C0000100AD00B10001004D0001000100AA00D5 -:1002D00001000100010001000100000016034500BB -:1002E000720067006F0044006F0078002000450036 -:1002F0005A00000016034500720067006F004400BA -:100300006F007800200045005A0000000403090433 -:1003100009026D00040100A0FA09040000010301B4 -:100320000100092111010001223F00070581030896 -:10033000000A090401000103010200092111010062 -:1003400001224D000705820308000A09040200018A -:100350000300000009211101000122360007058376 -:100360000308000A09040300010300000009211129 -:100370000100012239000705840310000112011059 -:100380000100000008EDFE07130100010200010555 -:10039000010906A101050719E029E71500250195C6 -:1003A0000875018102050819012905950575019156 -:1003B000029501750391010507190029771500259C -:1003C00001957875018102C005010980A1018502AE -:1003D00016010026B7001A01002AB7007510950112 -:1003E0008100C0050C0901A1018503160100269CAE -:1003F000021A01002A9C02751095018100C00501B6 -:100400000902A1010901A100050919012905150029 -:10041000250195057501810295017503810105018D -:10042000093009311581257F950275088106093843 -:100430001581257F950175088106050C0A3802157E -:1004400081257F950175088106C0C005010906A1B7 -:1004500001050719E029E7150025019508750181B7 -:100460000295017508810105081901290595057591 -:100470000191029501750391010507190029FF15E6 -:100480000025FF950675088100C0000000000000EF -:100490000000000000010204060A0F17202C3A4A4F -:1004A0005D71879DB3C7DAE9F5FCFFFCF5E9DAC7B2 -:1004B000B39D87715D4A3A2C20170F0A060402018A -:1004C0000000000000000000000011241FBECFEF5C -:1004D000DAE0DEBFCDBF04B603FE24C08091EE019A -:1004E0009091EF01A091F001B091F1018730904B14 -:1004F000A740B04BB9F41092EE011092EF011092A8 -:10050000F0011092F10114BE84B7877F84BF88E1A7 -:100510000FB6F89480936000109260000FBEE0E088 -:10052000FFE3099511E0A0E0B1E0EAE9F5E402C0DB -:1005300005900D92A433B107D9F721E0A4E3B1E00F -:1005400001C01D92AE3EB207E1F70E94F6080C947E -:10055000CB220C94000061110BC0FC018281882326 -:1005600021F085EE0E94570F03C085EE0E941F10F8 -:1005700080E090E0089508956091B1017091B2011A -:100580008091B3019091B4010E94D91956985E9858 -:1005900025982D9826982E9827982F98813019F015 -:1005A000823021F00895259A2D9A0895269A2E9A40 -:1005B00008950C94BC0256985E9825982D9826981C -:1005C0002E9827982F988FEF90E090938900809332 -:1005D000880090938B0080938A0090938D00809385 -:1005E0008C00259A2D9A2FEF80E792E021508040D1 -:1005F0009040E1F700C00000269A2E9A2FEF80E786 -:1006000092E0215080409040E1F700C00000279A1E -:100610002F9A2FEF80E792E0215080409040E1F741 -:1006200000C0000025982D982FEF80E792E0215020 -:1006300080409040E1F700C0000026982E982FEFF0 -:1006400080E792E0215080409040E1F700C0000038 -:1006500027982F9856985E9825982D9826982E982A -:1006600027982F98089589EA8093800089E08093E5 -:10067000810024982C983F988AB18F748AB96E981B -:10068000479A8BB1806B8BB9769A0E94DB020C94EF -:10069000BB0280E2809300018091340181110EC081 -:1006A0000E94980381E0809334012FEF83ED90E363 -:1006B000215080409040E1F700C0000080E40E949B -:1006C0009E038093000181112EC00E94C803809375 -:1006D0000001811128C00E94C8038093000181118C -:1006E00022C08FE30E94C8038093000181111BC0C8 -:1006F0000E94C00380E40E949E0380930001811148 -:1007000012C08CE00E94C8038093000181110BC0CD -:100710000E94C80380930001811105C08FE30E94ED -:10072000C803809300010E94C003809100010895D6 -:100730001092B9008AE08093B800089594EA9093EB -:10074000BC009091BC0097FFFCCF9091B900987FBE -:10075000983021F0903111F081E008958093BB0032 -:1007600084E88093BC008091BC0087FFFCCF80911F -:10077000B900887F883111F0803471F780E00895E6 -:1007800084E98093BC008091BC0084FDFCCF089577 -:100790008093BB0084E88093BC008091BC0087FFFD -:1007A000FCCF9091B900987F81E0983209F480E005 -:1007B000089584E88093BC008091BC0087FFFCCF43 -:1007C0008091BB00089580910001811115C080E4E3 -:1007D0000E949E038093000181110CC082E10E945F -:1007E000C80380930001811105C08FEF0E94C803E8 -:1007F000809300010E94C00384B1807F84B985B1D9 -:10080000807F85B98AB1837F8AB98BB1837F8BB9A9 -:100810003E98469808950E944903809300010E94E3 -:10082000E30380B38C7080BB81B3836F81BBE4E44E -:10083000F1E0A6E3B1E011921D9281E0E235F80704 -:10084000D1F70C943303BF92CF92DF92EF92FF92D5 -:100850000F931F93CF93DF9380910001882379F04A -:10086000809135018F5F80933501811108C00E940E -:10087000490380930001811102C00E94DB0206E35C -:1008800011E0C0E0D0E0DD24D39482E0C82EEE2455 -:10089000E394F12CC73000F580910001811162C012 -:1008A00080E40E949E0380930001811112C082E1C6 -:1008B0000E94C8038093000181110BC0C7010C2E58 -:1008C00001C0880F0A94EAF780950E94C8038093BC -:1008D00000010E94C00346C0CA30A1F028F4C8300D -:1008E00059F0C93061F005C0CC3089F070F0CD30DE -:1008F00089F0209A289810C0219A29980DC0229A30 -:100900002A980AC0239A2B9807C0529A01C0539A7A -:100910005B9802C03E9A4698E0EAEA95F1F78FB1FB -:1009200079995AC092E081708D25892B7C9B02C0F9 -:1009300090E001C094E0892B7D9B02C090E001C053 -:1009400098E0892B7E9B02C090E001C090E1892B4A -:100950009FB19095991F9927991F9295990F907E15 -:10096000892B0FC08091000181114BC080E40E944F -:100970009E0380930001882389F1B12C0E94C0035B -:100980008B2DF8019081981719F08083C092010196 -:100990000E94E30321960F5F1F4FCE30D10509F06F -:1009A00079CF80910101882371F1815080930101F9 -:1009B000882339F08FE99FE00197F1F700C000002C -:1009C00022C0A4E4B1E0E6E3F1E081918D9391E0EF -:1009D000E434F907D1F717C090E0A5CF83E10E9476 -:1009E000C803809300018111C8CF81E40E949E0357 -:1009F000809300018111C1CF0E94D903B82EB09419 -:100A0000BDCF80E0BECF0E94D90281E0DF91CF91BF -:100A10001F910F91FF90EF90DF90CF90BF900895BE -:100A2000E82FF0E0EC5BFE4F8081089508958B3B4A -:100A3000910578F4883A910540F5853A9105D0F40E -:100A40008430910508F0B1C08130910509F4ADC042 -:100A50006BC0803E910508F467C0883E910508F49C -:100A6000A4C09C01205F31092031310508F05CC031 -:100A700090650895853A910509F459C0863A910523 -:100A800009F458C083E890E40895883A910509F480 -:100A900054C0893A910509F453C08A3A910509F482 -:100AA00052C08B3A910509F451C08C3A910509F472 -:100AB00050C08D3A910509F44FC0803B910509F46F -:100AC0004EC08E3A910509F44DC08F3A910509F454 -:100AD0004CC0813B910509F44BC0823B910509F460 -:100AE0004AC0833B910509F449C0843B910509F450 -:100AF00048C0853B910509F447C0863B910509F440 -:100B000046C0873B910509F445C0883B910509F42F -:100B100044C0893B910509F443C08A3B910509F023 -:100B200042C08AE296E4089580E090E0089581E86A -:100B300090E4089582E890E4089582EE94E40895A4 -:100B400089EE94E408958AEE94E4089585EB94E4A4 -:100B5000089586EB94E4089587EB94E408958CEC73 -:100B600094E408958DEC94E4089583E895E4089561 -:100B70008AE895E4089582E995E4089584E995E486 -:100B8000089581E296E4089583E296E4089584E26C -:100B900096E4089585E296E4089586E296E4089541 -:100BA00087E296E4089580E094E40895089596E03D -:100BB000799FF001112494E5899FE00DF11D112426 -:100BC000E60FF11DEE0FFF1FEC51FF4F8591949141 -:100BD0000895880F991F805A9040FC018591949147 -:100BE0000895880F991F80529F4FFC018591949121 -:100BF000089526E0729FF001112444E5849FE00DE2 -:100C0000F11D1124E60FF11DEE0FFF1FEC51FF4FF8 -:100C100025913491C9019A9581159F4110F4C9011C -:100C20000895C90190528115904128F4C9019F701F -:100C30000E94F1050895C90190538115904120F457 -:100C4000C9019927906C0895211580E5380769F44A -:100C50000E9490139FEF24E34CE0915020404040CD -:100C6000E1F700C000000C94D21A213080E538076B -:100C700031F48091CC0181608093CC010895C90149 -:100C800090558115904108F050C0832F99278F709F -:100C9000992781309105D9F4A9014370552702C0E5 -:100CA000880F991F4A95E2F79C68A90164E0440FF8 -:100CB000551F6A95E1F744275370842B952B73E0F9 -:100CC000220F331F7A95E1F7207633271DC082303B -:100CD000910529F4922F8827816F906A08958330B7 -:100CE0009105A9F4A9014370552781E090E002C065 -:100CF000880F991F4A95E2F79C6843E0220F331F43 -:100D00004A95E1F7207E3770822B932B0895049744 -:100D1000F1F4A9014370552781E090E002C0880FEB -:100D2000991F4A95E2F79A68E8CFC9019057811553 -:100D3000904120F4C9019F7090620895C9019058B4 -:100D40008115904120F4C9019F70906A0895203E5A -:100D50003105E0F4203C310558F52133310509F423 -:100D600070C048F42932310509F464C02A323105D3 -:100D700009F46EC074C029333105F1F02238310511 -:100D8000D9F02533310509F44EC069C0233E310541 -:100D900089F138F4203E3105C1F0223E3105E1F001 -:100DA0005EC0263E310569F1273E3105A9F157C0E5 -:100DB000C9010E94E90508958091DF0180FD02C00C -:100DC00081FF4DC080EE90E04BC08091DF0180FF3D -:100DD000F9CF89E390E044C08091DF0182FF0EC02B -:100DE0008091DF0184FF03C080E090E039C083EE92 -:100DF00090E036C08091DF0182FFF2CF82EE90E07A -:100E00002FC08091DF0183FF0BC08091DF0184FD43 -:100E1000EBCF87EE90E024C08091DF0183FFF5CF18 -:100E200086EE90E01DC08091DF0185FF07C089E25A -:100E300090E016C08091DF0185FFF9CF85E390E057 -:100E40000FC08091DF0186FF07C08AE290E008C0F2 -:100E50008091DF0186FFF9CF81E390E001C0C901F5 -:100E60000E941705089508950C943307809162013C -:100E70000895CF93DF9300D01F92CDB7DEB72091B6 -:100E8000E501243019F523E029839B838A8320938D -:100E9000E9008FEF9091E800815095FD06C095ED37 -:100EA0009A95F1F700008111F5CF8091E80085FF58 -:100EB0000DC040E050E063E070E0CE0101960E947A -:100EC000A3098091E8008E778093E8000F900F903F -:100ED0000F90DF91CF910895CF93DF9300D01F92B1 -:100EE000CDB7DEB72091E501243021F522E029833A -:100EF0009B838A8383E08093E9008FEF9091E800E1 -:100F0000815095FD06C095ED9A95F1F7000081118D -:100F1000F5CF8091E80085FF0DC040E050E063E030 -:100F200070E0CE0101960E94A3098091E8008E77BF -:100F30008093E8000F900F900F90DF91CF9108956C -:100F40002091E5012430F1F422E02093E9002FEF15 -:100F50003091E800215035FD06C035ED3A95F1F7A6 -:100F600000002111F5CF2091E80025FF0BC040E0E3 -:100F700050E065E070E00E94A3098091E8008E7760 -:100F80008093E8000895CF93DF93EC018091E50111 -:100F9000843009F046C090910C019923D9F09091CA -:100FA0000D019923B9F08093E9008FEF9091E8004B -:100FB000815095FD06C095E19A95F1F700008111E9 -:100FC000F5CF8091E80085FF2CC040E050E060E163 -:100FD00070E017C081E08093E9008FEF9091E80006 -:100FE000815095FD06C095ED9A95F1F700008111AD -:100FF000F5CF8091E80085FF14C040E050E068E044 -:1010000070E0CE010E94A3098091E8008E77809362 -:10101000E80080E1FE01A2E5B1E001900D928A9521 -:10102000E1F7DF91CF9108958091E401811109C02A -:101030000E94350B0E94920B8091E20084608093A5 -:10104000E20008951092E401089508950C94F820A8 -:101050000E94691A0E94FE200E942F0E0C943407F1 -:1010600042E061EC81E00E94AF0A42E061EC82E084 -:101070000E94AF0A42E061EC83E00E94AF0A42E1C5 -:1010800061EC84E00C94AF0A8091E701833009F4AD -:1010900055C030F4813071F0823009F48EC008956B -:1010A0008A3009F47AC08B3009F460C0893009F0C5 -:1010B0009CC020C08091E601813A09F096C08091E1 -:1010C000E800877F8093E8008091EA019091EB012E -:1010D000892B21F060E080E090E003C060E182E5D0 -:1010E00091E070E00E94EC098091E8008B7780939A -:1010F000E80008958091E601813209F076C0809180 -:10110000EA019091EB01009719F0039709F06DC087 -:101110008091E800877F8093E8008091E80082FD5D -:1011200005C08091E5018111F8CF5FC08091F10089 -:10113000809362018091E8008B7753C08091E60133 -:10114000813A09F052C08091EA019091EB01892B1C -:1011500009F04BC08091E800877F8093E800809180 -:10116000E80080FFFCCF80910C0136C08091E60141 -:101170008132D9F58091EA019091EB01892BA9F593 -:101180008091E800877F8093E8000E94E40A8091C4 -:10119000E80180930C010C9490138091E601813258 -:1011A00021F58091E800877F8093E8000E94E40A9F -:1011B0008091E9018093630108958091E601813A6D -:1011C000A1F48091E800877F8093E8008091E80097 -:1011D00080FFFCCF809163018093F1008091E80053 -:1011E0008E778093E8000C94E40A089584B7877F93 -:1011F00084BF88E10FB6F89480936000109260007D -:101200000FBE90E080E80FB6F89480936100909351 -:1012100061000FBE0E947E0E0E94350B0E94920B51 -:101220008091E20084608093E20078940E940D0E29 -:101230000E94800E82E091E00E942A0E0E94E62029 -:101240008091E501853069F40E942C1A8091E301B8 -:101250008823B1F30E94541A882391F30E948D09C8 -:10126000EFCF0E94860EECCF292F33272330310594 -:10127000A9F06CF42130310509F442C02230310567 -:1012800009F043C08DE690E020E133E042C0213216 -:101290003105C9F02232310519F137C09927813063 -:1012A000910541F08230910541F0892B71F5ECE018 -:1012B000F3E005C0E4EFF2E002C0ECEDF2E084916F -:1012C00090E09F0126C0643000F5E62FF0E0EE0FBD -:1012D000FF1FEE5DFE4F2081318189E090E019C053 -:1012E000643098F4E62FF0E0DF01AA0FBB1FA65E82 -:1012F000BE4F2D913C91EA5EFE4F808190E009C087 -:1013000082E190E02DE733E004C080E090E020E04F -:1013100030E0FA0131832083089580E189BD82E1C4 -:1013200089BD09B400FEFDCF8091D8008F7D8093E8 -:10133000D8008091E00082608093E0008091E0001E -:1013400081FDFCCF0895CF92DF92EF92FF920F9331 -:101350001F93CF93DF937C018B01EA010E94050B61 -:10136000811131C0209731F088819981081B190BB8 -:10137000E80EF91EC12CD12C0115110519F180912F -:10138000E80085FD14C08091E8008E778093E80026 -:10139000209741F0888199818C0D9D1D99838883C8 -:1013A00085E011C00E94050B882331F30CC0F701C2 -:1013B00081917F018093F10001501109FFEFCF1A55 -:1013C000DF0ADACF80E0DF91CF911F910F91FF907C -:1013D000EF90DF90CF9008952091EC013091ED01D6 -:1013E0002617370748F06115710539F42091E80098 -:1013F0002E772093E80001C0B901FC0120E06115BF -:101400007105B9F18091E501882309F440C0853068 -:1014100009F43FC08091E80083FD3DC08091E80061 -:1014200082FF06C08091E80082FF26C080E0089518 -:101430008091E80080FFE3CF2091F3008091F200DB -:1014400090E0922B6115710551F08830910538F4C8 -:1014500021912093F100615071090196F3CF21E0B1 -:10146000089709F020E08091E8008E778093E800EB -:10147000C6CF2111C7CFD6CF8091E501882339F09F -:10148000853039F08091E80083FFCCCF04C082E042 -:10149000089583E0089581E008952091EC01309152 -:1014A000ED012617370748F06115710539F42091D1 -:1014B000E8002E772093E80001C0B901FC0120E08C -:1014C00061157105C1F18091E501882309F441C0DE -:1014D000853009F440C08091E80083FD3EC08091D2 -:1014E000E80082FF06C08091E80082FF27C080E00C -:1014F00008958091E80080FFE3CF2091F300809170 -:10150000F20090E0922B6115710559F08830910539 -:1015100040F424912093F1003196615071090196B5 -:10152000F2CF21E0089709F020E08091E8008E7763 -:101530008093E800C5CF2111C6CFD5CF8091E501BA -:10154000882339F0853039F08091E80083FFCBCFD4 -:1015500004C082E0089583E0089581E00895982F03 -:10156000973058F59093E900981739F07091EC0096 -:101570002091ED005091F00003C0242F762F50E011 -:1015800021FF19C03091EB003E7F3093EB0030918A -:10159000ED003D7F3093ED003091EB0031603093F2 -:1015A000EB007093EC002093ED005093F00020913D -:1015B000EE0027FF07C09F5FD3CF8F708093E900B5 -:1015C00081E0089580E008958091E60187FD05C0DF -:1015D0008091E80080FF0EC012C08091E80082FD7B -:1015E00005C08091E5018111F8CF08958091E80050 -:1015F0008B7708C08091E5018111EACF0895809131 -:10160000E8008E778093E80008958091E40090913F -:10161000E50045E62091EC0020FF21C02091E80084 -:1016200020FD21C02091E501222389F0253089F099 -:101630002091EB0025FD0FC02091E4003091E500E2 -:101640002817390739F3415041F0C901E3CF82E04F -:10165000089583E0089581E0089584E0089520913D -:10166000E80022FFDFCF80E008950E94A30B0E94D4 -:10167000AB0BE0EEF0E0808181608083E8EDF0E08C -:1016800080818F77808319BCA7EDB0E08C918E7F2D -:101690008C9380818F7E80831092E40108950F9354 -:1016A0001F93CF93DF930E94A30B0E94AB0BC8ED57 -:1016B000D0E088818F77888388818068888388815B -:1016C0008F7D888319BC1092E5011092E101109280 -:1016D000E3011092E20100EE10E0F80180818B7FBF -:1016E000808388818160888342E060E080E00E949E -:1016F000AF0AE1EEF0E080818E7F8083E2EEF0E0E1 -:10170000808181608083808188608083F80180810E -:101710008E7F8083888180618883DF91CF911F9144 -:101720000F910895E8EDF0E080818F7E8083E7EDF2 -:10173000F0E080818160808384E082BF81E08093DB -:10174000E4010C944F0BE8EDF0E080818E7F808304 -:101750001092E20008951092DA001092E1000895CC -:101760001F920F920FB60F9211242F933F934F9316 -:101770005F936F937F938F939F93AF93BF93EF93F9 -:10178000FF938091E10082FF0BC08091E20082FF15 -:1017900007C08091E1008B7F8093E1000E940C0ED6 -:1017A0008091DA0080FF1FC08091D80080FF1BC0AD -:1017B0008091DA008E7F8093DA008091D90080FFDB -:1017C0000DC080E189BD82E189BD09B400FEFDCF75 -:1017D00081E08093E5010E94140805C019BC1092B5 -:1017E000E5010E9422088091E10080FF19C08091EC -:1017F000E20080FF15C08091E2008E7F8093E200BE -:101800008091E20080618093E2008091D800806244 -:101810008093D80019BC85E08093E5010E942608DA -:101820008091E10084FF30C08091E20084FF2CC0F1 -:1018300080E189BD82E189BD09B400FEFDCF8091C0 -:10184000D8008F7D8093D8008091E1008F7E8093B7 -:10185000E1008091E2008F7E8093E2008091E200BF -:1018600081608093E2008091E101882311F084E09F -:1018700007C08091E30087FF02C083E001C081E0E0 -:101880008093E5010E9428088091E10083FF29C030 -:101890008091E20083FF25C08091E100877F8093E3 -:1018A000E10082E08093E5011092E1018091E10086 -:1018B0008E7F8093E1008091E2008E7F8093E20032 -:1018C0008091E20080618093E20042E060E080E08D -:1018D0000E94AF0A8091F00088608093F0000E941F -:1018E0002508FF91EF91BF91AF919F918F917F91CB -:1018F0006F915F914F913F912F910F900FBE0F907D -:101900001F9018951F920F920FB60F9211242F93CC -:101910003F934F935F936F937F938F939F93AF9377 -:10192000BF93CF93EF93FF93C091E900CF70809165 -:10193000EC001092E9008091F000877F8093F00026 -:1019400078940E94BE0C1092E9008091F0008860AB -:101950008093F000C093E900FF91EF91CF91BF9188 -:10196000AF919F918F917F916F915F914F913F9137 -:101970002F910F900FBE0F901F9018951F93CF932C -:10198000DF93CDB7DEB7AA970FB6F894DEBF0FBED0 -:10199000CDBFE6EEF1E08091F100819321E0EE3ED3 -:1019A000F207C9F70E9444088091E80083FF1CC138 -:1019B0002091E6013091E701832F90E08A30910574 -:1019C00008F012C1FC01EA5AFF4F0C948022203823 -:1019D00081F0223809F008C18091EA018F7080936C -:1019E000E9008091EB0085FB882780F91092E900DF -:1019F00006C08091E2019091E30191118260909183 -:101A0000E800977F9093E8008093F1001092F10036 -:101A1000C5C0822F8D7F09F0E7C0222319F0223044 -:101A200061F0E2C08091E801813009F0DDC033301F -:101A300009F080E08093E30128C08091E8018111E2 -:101A400024C02091EA012F7009F4CEC02093E90050 -:101A50008091EB0080FF19C08091EB00333011F4CE -:101A6000806211C080618093EB0081E090E0022EE3 -:101A700001C0880F0A94EAF78093EA001092EA0006 -:101A80008091EB0088608093EB001092E9008091D8 -:101A9000E800877F86C02111A7C01091E8011F7759 -:101AA0008091E3008078812B8093E3008091E800AF -:101AB000877F8093E8000E94E40A8091E80080FF1D -:101AC000FCCF8091E30080688093E300112311F044 -:101AD00083E001C082E08093E50186C02058223077 -:101AE00008F082C08091E8019091E9018C3D23E0EB -:101AF000920779F583E08A838AE289834FB7F89465 -:101B0000DE01139620E03EE051E2E32FF0E0509337 -:101B10005700E49120FF03C0E295EF703F5FEF7044 -:101B20008E2F90E0EA3010F0C79601C0C0968D93DA -:101B30009D932F5F243149F74FBF8091E800877F45 -:101B40008093E8006AE270E0CE0101960E94EC0901 -:101B500014C0AE014F5F5F4F6091EA010E943409EB -:101B6000009709F441C02091E800277F2093E80006 -:101B7000BC0189819A810E944D0A8091E8008B778F -:101B80008093E80031C0203879F58091E800877FA4 -:101B90008093E8008091E1018093F1008091E8005A -:101BA0008E778093E8000E94E40A1EC021111CC0B9 -:101BB0009091E8019230C0F48091E800877F809393 -:101BC000E8009093E1010E94E40A8091E101811113 -:101BD00004C08091E30087FF02C084E001C081E07F -:101BE0008093E5010E9430088091E80083FF0AC0DD -:101BF0008091E800877F8093E8008091EB0080620D -:101C00008093EB00AA960FB6F894DEBF0FBECDBF4F -:101C1000DF91CF911F9108950895CF938091E501B1 -:101C20008823B1F08091E9008F709091EC0090FFD3 -:101C300002C090E801C090E0C92FC82B1092E900C3 -:101C40008091E80083FD0E94BE0CCF70C093E90034 -:101C5000CF91089590936901809368010895E09170 -:101C60006801F0916901309721F00190F081E02D39 -:101C7000099480E00895E0916801F091690130973E -:101C800021F00280F381E02D09940895E09168012C -:101C9000F0916901309721F00480F581E02D0994DD -:101CA000089520916601309167018217930771F0C2 -:101CB0009093670180936601E0916801F09169015A -:101CC000309721F00680F781E02D09940895209146 -:101CD0006401309165018217930771F0909365015B -:101CE00080936401E0916801F0916901309721F0DF -:101CF0000084F185E02D0994089508950C947D0EDB -:101D00000E946F1A0E940B040C94351BCF92DF9235 -:101D1000EF92FF920F931F93CF93DF93CDB7DEB770 -:101D20002B970FB6F894DEBF0FBECDBF0E942304E1 -:101D30003BE6E32E31E0F32E00E010E0C02E802FD2 -:101D40000E941005F701D1907F01D826B1F40F5FF2 -:101D50001F4F0E30110591F78FEF89838A831B8205 -:101D60000E94781A8160782F9D838C8349815A81E3 -:101D70006B818D810E94290F41C09091CC0191FF10 -:101D800004C08B870E9416058B8520E030E04D2D26 -:101D900050E0922FBA01022E02C0759567950A9401 -:101DA000E2F760FF25C02E83CF82EE24E394F12C6E -:101DB00002C0EE0CFF1C9A95E2F790E08E219F2165 -:101DC00021E0892B09F420E028870E94781A81609D -:101DD000782F9A8789874E815F8168858A850E94DE -:101DE000290FF801E559FE4F80818E25808306C0BA -:101DF0002F5F3F4F2630310561F6A9CF0E94191E93 -:101E000010916A010E942F0E1817A1F00E942F0E48 -:101E100080936A012B960FB6F894DEBF0FBECDBF3C -:101E2000DF91CF911F910F91FF90EF90DF90CF90B6 -:101E30000C9434072B960FB6F894DEBF0FBECDBFBF -:101E4000DF91CF911F910F91FF90EF90DF90CF9096 -:101E50000895CF93DF93CDB7DEB72B970FB6F894E5 -:101E6000DEBF0FBECDBF4F83588769877A878B87C8 -:101E7000DE01119686E0FD0111928A95E9F785E071 -:101E8000FE01379601900D928A95E1F749815A81BA -:101E90006B817C818D819E810E945C162B960FB692 -:101EA000F894DEBF0FBECDBFDF91CF910895CF93E1 -:101EB000C82F882309F4C1C0823859F40E942F0E1C -:101EC00081FDBBC089E30E94F9180E94B31989E320 -:101ED0000CC0833879F40E942F0E80FDAEC083E5DC -:101EE0000E94F9180E94B31983E50E943919CF9115 -:101EF0000C94B319843859F40E942F0E82FD9DC0B2 -:101F000087E40E94F9180E94B31987E4EECF8CEFA2 -:101F10008C0F813A48F48C2F0E944E2081118DC085 -:101F20008C2F0E94F918E3CF80E28C0F883048F4A0 -:101F3000C77081E001C0880FCA95EAF70E947A193C -:101F4000D6CF8BE58C0F833078F4C53A29F0C63AAA -:101F500031F482E890E005C081E890E002C083E8B7 -:101F600090E0CF910C94510E88E58C0F833108F0EE -:101F700064C0C83A39F1C93A41F1CA3A49F1CB3A99 -:101F800051F1CC3A59F1CD3A61F1C03B69F1CE3A09 -:101F900071F1CF3A79F1C13B81F1C23B89F1C33B89 -:101FA00091F1C43B99F1C53BA1F1C63BA9F1C73BF7 -:101FB000B1F1C83BB9F1C93BC1F1CA3BC9F58AE2ED -:101FC00092E038C082EE90E035C089EE90E032C0F9 -:101FD0008AEE90E02FC085EB90E02CC086EB90E07D -:101FE00029C087EB90E026C08CEC90E023C08DECFC -:101FF00090E020C083E891E01DC08AE891E01AC01B -:1020000082E991E017C084E991E014C081E292E096 -:1020100011C083E292E00EC084E292E00BC085E240 -:1020200092E008C086E292E005C087E292E002C03A -:1020300080E090E0CF910C94670ECF9108958823B3 -:1020400009F44BC0823859F40E942F0E81FF45C01D -:1020500089E30E94F9180E94B31989E30CC0833800 -:1020600071F40E942F0E80FF38C083E50E94F9189A -:102070000E94B31983E50E9439190C94B31984386E -:1020800059F40E942F0E82FF28C087E40E94F9189D -:102090000E94B31987E4EFCF9CEF980F913A58F361 -:1020A00090E2980F983050F4877091E001C0990F3A -:1020B0008A95EAF7892F0E948019DFCF9BE5980F58 -:1020C000933020F480E090E00C94510E885A8331D4 -:1020D00020F480E090E00C94670E0895882321F0AE -:1020E0000E947A190C94B3190895882321F00E9454 -:1020F00080190C94B3190895CF92DF92EF92FF925A -:102100000F931F93CF93DF93CDB7DEB728970FB60A -:10211000F894DEBF0FBECDBF8C0185E0F801DE0173 -:10212000119601900D928A95E1F7F8014081318175 -:10213000F280258122952F7083819481892B31F043 -:102140003F3F31F481E04F3F19F403C081E001C00B -:1021500080E080FDC4C249833A8389819A812F83BC -:102160000E94B7189E8388870E94B6180E9489171C -:102170004E81E42FE295EF70F0E0E05AFF4F2F819F -:1021800068850C948022842F807F142F1F708823F1 -:1021900011F01295107FFF2059F0112309F454C259 -:1021A000812F68870E948A190E94B31968854CC2E2 -:1021B000862F0E941F10112309F491C2812F0E94C3 -:1021C000901928960FB6F894DEBF0FBECDBFDF91F1 -:1021D000CF911F910F91FF90EF90DF90CF900C94D3 -:1021E000B319342F307F842F8F70303211F08295E5 -:1021F000807F662319F0613019F12BC0FF20B1F008 -:10220000222309F493C1213009F090C128960FB61A -:10221000F894DEBF0FBECDBFDF91CF911F910F911C -:10222000FF90EF90DF90CF900C949A19222319F031 -:10223000213009F454C28E830E949D198E8189C178 -:10224000FF2021F0223008F04AC270C1211147C29C -:1022500080C1FF2021F0222309F468C1F5C12223A7 -:1022600009F477C105C2242F26952695237030E006 -:102270002115310521F021303105C9F030C2FF2090 -:1022800021F0862F942F937002C080E090E0289672 -:102290000FB6F894DEBF0FBECDBFDF91CF911F9177 -:1022A0000F91FF90EF90DF90CF900C94510EFF2094 -:1022B00021F0862F942F937002C080E090E0289642 -:1022C0000FB6F894DEBF0FBECDBFDF91CF911F9147 -:1022D0000F91FF90EF90DF90CF900C94670E862FB8 -:1022E000FF2019F00E94211D02C00E94891D28961E -:1022F0000FB6F894DEBF0FBECDBFDF91CF911F9117 -:102300000F91FF90EF90DF90CF900C940E1E842FD2 -:10231000837009F076C0F110E2C1262F2295269530 -:102320002770220F220F862F8F70C82ED12CE12C00 -:10233000F12C022E04C0CC0CDD1CEE1CFF1C0A94F8 -:10234000D2F764FF10C06FE070E080E090E004C05E -:10235000660F771F881F991F2A95D2F76095709591 -:102360008095909503C060E070E0CB01242F269506 -:1023700026952370422F50E042305105D1F0433072 -:10238000510559F16C297D298E299F29413051052C -:1023900041F128960FB6F894DEBF0FBECDBFDF9196 -:1023A000CF911F910F91FF90EF90DF90CF900C9401 -:1023B000AE176C297D298E299F2928960FB6F8948F -:1023C000DEBF0FBECDBFDF91CF911F910F91FF9068 -:1023D000EF90DF90CF900C94C8170E94AE17C70102 -:1023E000B60128960FB6F894DEBF0FBECDBFDF91C1 -:1023F000CF911F910F91FF90EF90DF90CF900C94B1 -:102400009417FF2019F0842F817001C086958823CE -:1024100009F465C1262F229526952770220F220FD9 -:10242000862F8F70C82ED12CE12CF12C022E04C0E7 -:10243000CC0CDD1CEE1CFF1C0A94D2F764FF10C00C -:102440006FE070E080E090E004C0660F771F881FA7 -:10245000991F2A95D2F7609570958095909503C045 -:1024600060E070E0CB01242F269526952370422F43 -:1024700050E042305105D1F04330510559F16C29FB -:102480007D298E299F294130510541F128960FB6AB -:10249000F894DEBF0FBECDBFDF91CF911F910F919A -:1024A000FF90EF90DF90CF900C9482186C297D29DB -:1024B0008E299F2928960FB6F894DEBF0FBECDBF98 -:1024C000DF91CF911F910F91FF90EF90DF90CF9010 -:1024D0000C949C180E948218C701B60128960FB66A -:1024E000F894DEBF0FBECDBFDF91CF911F910F914A -:1024F000FF90EF90DF90CF900C946818603FC9F187 -:1025000018F4603E50F49BC0623F09F460C008F4C8 -:102510004AC0633F09F46FC092C0162F1F70842F0A -:102520008F71FF2099F00E940118812F28960FB615 -:10253000F894DEBF0FBECDBFDF91CF911F910F91F9 -:10254000FF90EF90DF90CF900C946E100E942218B5 -:10255000812F28960FB6F894DEBF0FBECDBFDF9156 -:10256000CF911F910F91FF90EF90DF90CF900C943F -:102570007510FF20A1F02111B2C0842F8F71289611 -:102580000FB6F894DEBF0FBECDBFDF91CF911F9184 -:102590000F91FF90EF90DF90CF900C94471822306E -:1025A00008F09DC0EACFFF20A1F0842F8F712896FC -:1025B0000FB6F894DEBF0FBECDBFDF91CF911F9154 -:1025C0000F91FF90EF90DF90CF900C940118FF20B7 -:1025D00061F3842F8F7128960FB6F894DEBF0FBE7B -:1025E000CDBFDF91CF911F910F91FF90EF90DF90C2 -:1025F000CF900C942218FF2091F0842F8F71289691 -:102600000FB6F894DEBF0FBECDBFDF91CF911F9103 -:102610000F91FF90EF90DF90CF900C94EC172896DD -:102620000FB6F894DEBF0FBECDBFDF91CF911F91E3 -:102630000F91FF90EF90DF90CF900C94E217FF2066 -:10264000A1F0222309F4B1CF862F28960FB6F89473 +:100000000C940B040C944F040C944F040C944F0468 +:100010000C944F040C944F040C944F040C944F0414 +:100020000C944F040C944F040C946F0D0C94410EDF +:100030000C944F040C944F040C944F040C944F04F4 +:100040000C944F040C94EC220C944F040C944F0429 +:100050000C944F040C948E1C0C944F040C944F047D +:100060000C944F040C944F040C944F040C944F04C4 +:100070000C944F040C944F040C944F040C944F04B4 +:100080000C944F040C944F040C944F040C944F04A4 +:100090000C944F040C944F040C944F040C944F0494 +:1000A0000C944F040C944F040C944F04A60EC80EED +:1000B000B30FC80EB30F0A0F2D0FB30F820F950F9A +:1000C00089128912B712B712F91235133515351581 +:1000D0004D133515441444140F15351535152315D6 +:1000E000000000810889248935812B850252E100B6 +:1000F000E00000001E00140004001D0000774E0008 +:100100001F001A0016001B00007F4C002000080092 +:1001100007000600E2002A0021001500090019006E +:10012000E3004B00220017000A00050000004A000F +:1001300029002F0000002B0200004D002D00300090 +:1001400000002B000000500023001C000B001100D9 +:1001500000004F00240018000D001000E7005200BE +:1001600025000C000E003600E6002C0026001200D0 +:100170000F003700007F28002700130033003800ED +:10018000007751002E8131853482E500E4000000C3 +:100190000100C300C2003900010000002900010075 +:1001A0000100010001000100010001000100010047 +:1001B0000100010001000100010001000100010037 +:1001C0000100010001000100010001000100010027 +:1001D0000100010000000100010001000000010019 +:1001E000000001000100010000000100000001000A +:1001F00001000100010001000000010001000100F8 +:1002000001000100010001000100010001000100E6 +:1002100001000100010001000100010001000100D6 +:100220000100010001000100010001000100C30004 +:10023000C200390001000000010005520252E10035 +:10024000010000003A001E022002220201005100BB +:100250003B001F0221022302010028003C002F0264 +:1002600026022F0001002C003D0030022702300042 +:10027000010052003E00240235003502000050000B +:100280000100360200002B0000004F000100370281 +:1002900000002B0200004A003F003102380031000C +:1002A00000004D004000240021001E0027004B00EC +:1002B0004100250022001F0037004C0042002600AC +:1002C000230020002E002A004300380025022D00C4 +:1002D0002E024E00010005520252E50028000000E7 +:1002E000045205520000E100010000003A001E0225 +:1002F00020022202010051003B001F0221022302C2 +:10030000010028003C002F0226022F0001002C00D3 +:100310003D00300227023000010052003E0024025E +:1003200035003502000050000100360200002B00AD +:1003300000004F000100370200002B0200004A00BD +:100340003F0031023800310000004D004000240021 +:1003500021001E0027004B004100250022001F0045 +:1003600037004C0042002600230020002E002A0007 +:100370004300380025022D002E024E000452055283 +:100380000000E5002800000001000654C10039000B +:10039000010000002900010001000100010001002E +:1003A0000100010001000100010001000100010045 +:1003B0000100010001000100010001000100010035 +:1003C0000100010001000100010001000000010026 +:1003D0000100010000000100000001000100010017 +:1003E0000000010000000100010001000100010007 +:1003F00000000100010001000100010001000100F6 +:1004000001000100010001000100010001000100E4 +:1004100001000100010001000100010001000100D4 +:100420000100010001000654C10039000100000074 +:10043000010005520000E100A80000004400660031 +:10044000A6000100AA00B50045000100F20001006D +:10045000A90001006800F000F100F100F400B6000E +:1004600069000100F3000100F500B4006A0001001A +:10047000010001000000B8000100F9000000FA00CE +:100480000000B9000100F9000000FA000000AC0013 +:100490006B004600530001000000AB006C004A00F6 +:1004A00050004D004900A9006D005200510051005C +:1004B0004C00AE006E004B004F004E000100AD003E +:1004C0006F00B100B30001000100AA000100055255 +:1004D0000000E50001000000075200000000E100FC +:1004E000A800000044006600A6000100AA00B500B4 +:1004F00045000100F2000100A90001006800F000C1 +:10050000F100F100F400B60069000100F300010001 +:10051000F500B4006A000100010001000000B8000D +:100520000100F9000000FA000000B9000100F90024 +:100530000000FA000000AC006B0046005300010010 +:100540000000AB006C004A0050004D004900A900BB +:100550006D005200510051004C00AE006E004B0087 +:100560004F004E000100AD006F00B100B30001006C +:100570000100AA00075200000000E5000100000091 +:100580000100C10001003900010000002900010044 +:100590000100010001000100010001000100010053 +:1005A0000100010001000100010001000100010043 +:1005B0000100010001000100010001000100010033 +:1005C0000100010000000100010001000000010025 +:1005D0000000010001000100000001000000010016 +:1005E0000100010001000100000001000100010004 +:1005F00001000100010001000100010001000100F3 +:1006000001000100010001000100010001000100E2 +:100610000100010001000100010001000100C10012 +:100620000100390001000000160345007200670058 +:100630006F0044006F007800200045005A00000061 +:1006400016034500720067006F0044006F007800D9 +:10065000200045005A0000000403090409026D004F +:10066000040100A0FA0904000001030101000921AE +:1006700011010001223F000705810308000A090457 +:1006800001000103010200092111010001224D00B6 +:100690000705820308000A090402000103000000A4 +:1006A0000921110100012236000705830308000A11 +:1006B00009040300010300000009211101000122C7 +:1006C0003900070584031000011201100100000029 +:1006D00008EDFE071301000102000105010906A152 +:1006E00001050719E029E715002501950875018125 +:1006F00002050819012905950575019102950175F5 +:1007000003910105071900297715002501957875D2 +:10071000018102C005010980A101850216010026A0 +:10072000B7001A01002AB700751095018100C005B5 +:100730000C0901A1018503160100269C021A010083 +:100740002A9C02751095018100C005010902A101D2 +:100750000901A100050919012905150025019505C3 +:100760007501810295017503810105010930093187 +:100770001581257F95027508810609381581257F29 +:10078000950175088106050C0A38021581257F95AB +:100790000175088106C0C005010906A101050719F8 +:1007A000E029E7150025019508750181029501757D +:1007B0000881010508190129059505750191029522 +:1007C00001750391010507190029FF150025FF9503 +:1007D0000675088100C00000000000000000000055 +:1007E00000010204060A0F17202C3A4A5D71879D0A +:1007F000B3C7DAE9F5FCFFFCF5E9DAC7B39D877109 +:100800005D4A3A2C20170F0A06040201000000007E +:1008100000000000000011241FBECFEFDAE0DEBFB1 +:10082000CDBF04B603FE24C08091EF019091F0018A +:10083000A091F101B091F2018730904BA740B04BED +:10084000B9F41092EF011092F0011092F1011092A0 +:10085000F20114BE84B7877F84BF88E10FB6F89495 +:1008600080936000109260000FBEE0E0FFE3099506 +:1008700011E0A0E0B1E0ECE5F9E402C005900D92D2 +:10088000A433B107D9F721E0A4E3B1E001C01D9280 +:10089000AF3EB207E1F70E94B50A0C94AC240C9469 +:1008A000000061110BC0FC018281882321F085EEDC +:1008B0000E94161103C085EE0E94DE1180E090E0D8 +:1008C00008950895CF936091B1017091B201809124 +:1008D000B3019091B4010E94BA1BC82F56985E983C +:1008E00025982D9826982E9827982F98813011F0CA +:1008F000843029F4259A2D9A269A2E9A04C087309E +:1009000021F4259A2D9A279A2F9A0E94EE0F81FFA3 +:1009100002C0259A2D9A8EEF8C0F823010F4269A01 +:100920002E9AC550C23010F4279A2F9ACF9108956D +:100930000C94620456985E9825982D9826982E98C7 +:1009400027982F988FEF90E09093890080938800EC +:1009500090938B0080938A0090938D0080938C00FD +:10096000259A2D9A2FEF80E792E021508040904009 +:10097000E1F700C00000269A2E9A2FEF80E792E060 +:10098000215080409040E1F700C00000279A2F9A44 +:100990002FEF80E792E0215080409040E1F700C0C7 +:1009A000000025982D982FEF80E792E0215080409D +:1009B0009040E1F700C0000026982E982FEF80E7C6 +:1009C00092E0215080409040E1F700C0000027985D +:1009D0002F9856985E9825982D9826982E982798A7 +:1009E0002F98089589EA8093800089E080938100A0 +:1009F00024982C983F988AB18F748AB96E98479A38 +:100A00008BB1806B8BB9769A0E949A040C94610426 +:100A100080E2809300018091340181110EC00E9418 +:100A2000570581E0809334012FEF83ED90E321504F +:100A300080409040E1F700C0000080E40E945D0526 +:100A40008093000181112EC00E94870580930001D0 +:100A5000811128C00E94870580930001811122C066 +:100A60008FE30E9487058093000181111BC00E94C3 +:100A70007F0580E40E945D0580930001811112C012 +:100A80008CE00E9487058093000181110BC00E94B9 +:100A9000870580930001811105C08FE30E948705BF +:100AA000809300010E947F058091000108951092BB +:100AB000B9008AE08093B800089594EA9093BC004E +:100AC0009091BC0097FFFCCF9091B900987F98302F +:100AD00021F0903111F081E008958093BB0084E80B +:100AE0008093BC008091BC0087FFFCCF8091B9004F +:100AF000887F883111F0803471F780E0089584E9AF +:100B00008093BC008091BC0084FDFCCF089580934D +:100B1000BB0084E88093BC008091BC0087FFFCCFC1 +:100B20009091B900987F81E0983209F480E00895AF +:100B300084E88093BC008091BC0087FFFCCF80914B +:100B4000BB00089580910001811115C080E40E94CE +:100B50005D058093000181110CC082E10E94870530 +:100B600080930001811105C08FEF0E94870580935B +:100B700000010E947F0584B1807F84B985B1807FA8 +:100B800085B98AB1837F8AB98BB1837F8BB93E984F +:100B9000469808950E940805809300010E94A205CE +:100BA00080B38C7080BB81B3836F81BBE4E4F1E0E0 +:100BB000A6E3B1E011921D9281E0E235F807D1F78A +:100BC0000C94F204BF92CF92DF92EF92FF920F93B8 +:100BD0001F93CF93DF9380910001882379F0809158 +:100BE00035018F5F80933501811108C00E9408058F +:100BF00080930001811102C00E949A0406E311E073 +:100C0000C0E0D0E0DD24D39482E0C82EEE24E3944B +:100C1000F12CC73000F580910001811162C080E4A1 +:100C20000E945D0580930001811112C082E10E9443 +:100C300087058093000181110BC0C7010C2E01C0F4 +:100C4000880F0A94EAF780950E9487058093000137 +:100C50000E947F0546C0CA30A1F028F4C83059F080 +:100C6000C93061F005C0CC3089F070F0CD3089F02A +:100C7000209A289810C0219A29980DC0229A2A9863 +:100C80000AC0239A2B9807C0529A01C0539A5B98C6 +:100C900002C03E9A4698E0EAEA95F1F78FB1799959 +:100CA0005AC092E081708D25892B7C9B02C090E018 +:100CB00001C094E0892B7D9B02C090E001C098E0C8 +:100CC000892B7E9B02C090E001C090E1892B9FB1EF +:100CD0009095991F9927991F9295990F907E892B2E +:100CE0000FC08091000181114BC080E40E945D051E +:100CF00080930001882389F1B12C0E947F058B2D00 +:100D0000F8019081981719F08083C09201010E9428 +:100D1000A20521960F5F1F4FCE30D10509F079CF84 +:100D200080910101882371F1815080930101882312 +:100D300039F08FE99FE00197F1F700C0000022C071 +:100D4000A4E4B1E0E6E3F1E081918D9391E0E43435 +:100D5000F907D1F717C090E0A5CF83E10E9487057E +:100D6000809300018111C8CF81E40E945D058093CA +:100D700000018111C1CF0E949805B82EB094BDCF5B +:100D800080E0BECF0E94980481E0DF91CF911F9157 +:100D90000F91FF90EF90DF90CF90BF900895E82FD4 +:100DA000F0E0EC5BFE4F8081089508958B3B910548 +:100DB00078F4883A910540F5853A9105D0F484306D +:100DC000910508F0B1C08130910509F4ADC06BC048 +:100DD000803E910508F467C0883E910508F4A4C0E0 +:100DE0009C01205F31092031310508F05CC090651D +:100DF0000895853A910509F459C0863A910509F498 +:100E000058C083E890E40895883A910509F454C0E5 +:100E1000893A910509F453C08A3A910509F452C000 +:100E20008B3A910509F451C08C3A910509F450C0F0 +:100E30008D3A910509F44FC0803B910509F44EC0ED +:100E40008E3A910509F44DC08F3A910509F44CC0D2 +:100E5000813B910509F44BC0823B910509F44AC0DE +:100E6000833B910509F449C0843B910509F448C0CE +:100E7000853B910509F447C0863B910509F446C0BE +:100E8000873B910509F445C0883B910509F444C0AE +:100E9000893B910509F443C08A3B910509F042C0A2 +:100EA0008AE296E4089580E090E0089581E890E475 +:100EB000089582E890E4089582EE94E4089589EE1E +:100EC00094E408958AEE94E4089585EB94E40895FB +:100ED00086EB94E4089587EB94E408958CEC94E415 +:100EE00008958DEC94E4089583E895E408958AE8E4 +:100EF00095E4089582E995E4089584E995E40895D8 +:100F000081E296E4089583E296E4089584E296E40B +:100F1000089585E296E4089586E296E4089587E2CE +:100F200096E4089580E094E40895089596E0799F0A +:100F3000F001112494E5899FE00DF11D1124E60FC5 +:100F4000F11DEE0FFF1FE851FF4F85919491089519 +:100F5000880F991F805A9040FC01859194910895C3 +:100F6000880F991F80529F4FFC018591949108959D +:100F700026E0729FF001112444E5849FE00DF11DED +:100F80001124E60FF11DEE0FFF1FE851FF4F2591D1 +:100F90003491C9019A9581159F4110F4C9010895B2 +:100FA000C90190528115904128F4C9019F700E9497 +:100FB000B0070895C90190538115904120F4C901EB +:100FC0009927906C0895211580E5380769F40E94EF +:100FD00058159FEF24E34CE0915020404040E1F74A +:100FE00000C000000C94B31C213080E5380731F4B8 +:100FF0008091CD0181608093CD010895C901905504 +:101000008115904108F050C0832F99278F70992740 +:1010100081309105D9F4A9014370552702C0880F8A +:10102000991F4A95E2F79C68A90164E0440F551F97 +:101030006A95E1F744275370842B952B73E0220FB8 +:10104000331F7A95E1F7207633271DC08230910552 +:1010500029F4922F8827816F906A08958330910533 +:10106000A9F4A9014370552781E090E002C0880FE0 +:10107000991F4A95E2F79C6843E0220F331F4A9577 +:10108000E1F7207E3770822B932B08950497F1F4BB +:10109000A9014370552781E090E002C0880F991F95 +:1010A0004A95E2F79A68E8CFC901905781159041B7 +:1010B00020F4C9019F7090620895C901905881156C +:1010C000904120F4C9019F70906A0895203E310537 +:1010D000E0F4203C310558F52133310509F470C0A6 +:1010E00048F42932310509F464C02A32310509F483 +:1010F0006EC074C029333105F1F022383105D9F0C2 +:101100002533310509F44EC069C0233E310589F10C +:1011100038F4203E3105C1F0223E3105E1F05EC0D9 +:10112000263E310569F1273E3105A9F157C0C901B5 +:101130000E94A80708958091E00180FD02C081FF10 +:101140004DC080EE90E04BC08091E00180FFF9CF70 +:1011500089E390E044C08091E00182FF0EC080915D +:10116000E00184FF03C080E090E039C083EE90E0AE +:1011700036C08091E00182FFF2CF82EE90E02FC076 +:101180008091E00183FF0BC08091E00184FDEBCFF3 +:1011900087EE90E024C08091E00183FFF5CF86EEDA +:1011A00090E01DC08091E00185FF07C089E290E0DA +:1011B00016C08091E00185FFF9CF85E390E00FC074 +:1011C0008091E00186FF07C08AE290E008C080912C +:1011D000E00186FFF9CF81E390E001C0C9010E94E0 +:1011E000D606089508950C94F2088091620108953E +:1011F000CF93DF9300D01F92CDB7DEB72091E601E9 +:10120000243019F523E029839B838A832093E90006 +:101210008FEF9091E800815095FD06C095ED9A956D +:10122000F1F700008111F5CF8091E80085FF0DC036 +:1012300040E050E063E070E0CE0101960E94620B56 +:101240008091E8008E778093E8000F900F900F90C8 +:10125000DF91CF910895CF93DF9300D01F92CDB748 +:10126000DEB72091E601243021F522E029839B831B +:101270008A8383E08093E9008FEF9091E8008150AA +:1012800095FD06C095ED9A95F1F700008111F5CF17 +:101290008091E80085FF0DC040E050E063E070E021 +:1012A000CE0101960E94620B8091E8008E778093B8 +:1012B000E8000F900F900F90DF91CF91089520914B +:1012C000E6012430F1F422E02093E9002FEF309181 +:1012D000E800215035FD06C035ED3A95F1F70000E4 +:1012E0002111F5CF2091E80025FF0BC040E050E030 +:1012F00065E070E00E94620B8091E8008E77809339 +:10130000E8000895CF93DF93EC018091E6018430EB +:1013100009F046C090910C019923D9F090910D01EC +:101320009923B9F08093E9008FEF9091E800815004 +:1013300095FD06C095E19A95F1F700008111F5CF72 +:101340008091E80085FF2CC040E050E060E170E053 +:1013500017C081E08093E9008FEF9091E800815001 +:1013600095FD06C095ED9A95F1F700008111F5CF36 +:101370008091E80085FF14C040E050E068E070E034 +:10138000CE010E94620B8091E8008E778093E80086 +:1013900080E1FE01A2E5B1E001900D928A95E1F7AE +:1013A000DF91CF9108958091E501811109C00E94DC +:1013B000F40C0E94510D8091E20084608093E20061 +:1013C00008951092E501089508950C94D9220E9481 +:1013D0004A1C0E94DF220E94EE0F0C94F30842E0A8 +:1013E00061EC81E00E946E0C42E061EC82E00E94C0 +:1013F0006E0C42E061EC83E00E946E0C42E161EC15 +:1014000084E00C946E0C8091E801833009F455C09F +:1014100030F4813071F0823009F48EC008958A3042 +:1014200009F47AC08B3009F460C0893009F09CC09F +:1014300020C08091E701813A09F096C08091E800D0 +:10144000877F8093E8008091EB019091EC01892BDC +:1014500021F060E080E090E003C060E182E591E08F +:1014600070E00E94AB0B8091E8008B778093E800DE +:1014700008958091E701813209F076C08091EB01F7 +:101480009091EC01009719F0039709F06DC08091DD +:10149000E800877F8093E8008091E80082FD05C026 +:1014A0008091E6018111F8CF5FC08091F1008093B7 +:1014B00062018091E8008B7753C08091E701813A07 +:1014C00009F052C08091EB019091EC01892B09F059 +:1014D0004BC08091E800877F8093E8008091E8000E +:1014E00080FFFCCF80910C0136C08091E7018132F2 +:1014F000D9F58091EB019091EC01892BA9F58091B0 +:10150000E800877F8093E8000E94A30C8091E901A6 +:1015100080930C010C9458158091E701813221F5DC +:101520008091E800877F8093E8000E94A30C80915F +:10153000EA018093630108958091E701813AA1F463 +:101540008091E800877F8093E8008091E80080FF29 +:10155000FCCF809163018093F1008091E8008E7749 +:101560008093E8000C94A30C089584B7877F84BF10 +:1015700088E10FB6F89480936000109260000FBE6F +:1015800090E080E80FB6F89480936100909361003A +:101590000FBE0E943D100E94F40C0E94510D8091DC +:1015A000E20084608093E20078940E94CC0F0E9455 +:1015B0003F1082E091E00E94E90F0E94C7228091D3 +:1015C000E601853069F40E940D1C8091E4018823B6 +:1015D000B1F30E94351C882391F30E944C0BEFCF8E +:1015E0000E944510ECCF292F332723303105A9F075 +:1015F0006CF42130310509F442C02230310509F084 +:1016000043C08DE690E02CE536E042C02132310542 +:10161000C9F02232310519F137C09927813091057F +:1016200041F08230910541F0892B71F5E8E5F6E053 +:1016300005C0E0E4F6E002C0E8E2F6E0849190E064 +:101640009F0126C0643000F5E62FF0E0EE0FFF1F8B +:10165000EE5DFE4F2081318189E090E019C0643059 +:1016600098F4E62FF0E0DF01AA0FBB1FA65EBE4F85 +:101670002D913C91EA5EFE4F808190E009C082E1AD +:1016800090E029EC36E004C080E090E020E030E01B +:10169000FA0131832083089580E189BD82E189BD0B +:1016A00009B400FEFDCF8091D8008F7D8093D800D3 +:1016B0008091E00082608093E0008091E00081FDF5 +:1016C000FCCF0895CF92DF92EF92FF920F931F937A +:1016D000CF93DF937C018B01EA010E94C40C81113E +:1016E00031C0209731F088819981081B190BE80ED1 +:1016F000F91EC12CD12C0115110519F18091E800BA +:1017000085FD14C08091E8008E778093E8002097D3 +:1017100041F0888199818C0D9D1D9983888385E096 +:1017200011C00E94C40C882331F30CC0F7018191D1 +:101730007F018093F10001501109FFEFCF1ADF0AFA +:10174000DACF80E0DF91CF911F910F91FF90EF9062 +:10175000DF90CF9008952091ED013091EE01261792 +:10176000370748F06115710539F42091E8002E77AC +:101770002093E80001C0B901FC0120E0611571056A +:10178000B9F18091E601882309F440C0853009F45D +:101790003FC08091E80083FD3DC08091E80082FF5A +:1017A00006C08091E80082FF26C080E00895809105 +:1017B000E80080FFE3CF2091F3008091F20090E0F9 +:1017C000922B6115710551F08830910538F4219103 +:1017D0002093F100615071090196F3CF21E0089741 +:1017E00009F020E08091E8008E778093E800C6CF72 +:1017F0002111C7CFD6CF8091E601882339F08530FB +:1018000039F08091E80083FFCCCF04C082E00895D6 +:1018100083E0089581E008952091ED013091EE017B +:101820002617370748F06115710539F42091E80053 +:101830002E772093E80001C0B901FC0120E061157A +:101840007105C1F18091E601882309F441C085301A +:1018500009F440C08091E80083FD3EC08091E8001B +:1018600082FF06C08091E80082FF27C080E00895D3 +:101870008091E80080FFE3CF2091F3008091F20097 +:1018800090E0922B6115710559F08830910540F474 +:1018900024912093F1003196615071090196F2CFA5 +:1018A00021E0089709F020E08091E8008E7780938E +:1018B000E800C5CF2111C6CFD5CF8091E60188239E +:1018C00039F0853039F08091E80083FFCBCF04C038 +:1018D00082E0089583E0089581E00895982F97307D +:1018E00058F59093E900981739F07091EC00209129 +:1018F000ED005091F00003C0242F762F50E021FF1F +:1019000019C03091EB003E7F3093EB003091ED0039 +:101910003D7F3093ED003091EB0031603093EB0070 +:101920007093EC002093ED005093F0002091EE00B6 +:1019300027FF07C09F5FD3CF8F708093E90081E0BE +:10194000089580E008958091E70187FD05C08091AA +:10195000E80080FF0EC012C08091E80082FD05C043 +:101960008091E6018111F8CF08958091E8008B778E +:1019700008C08091E6018111EACF08958091E800C6 +:101980008E778093E80008958091E4009091E500BF +:1019900045E62091EC0020FF21C02091E80020FDC9 +:1019A00021C02091E601222389F0253089F0209181 +:1019B000EB0025FD0FC02091E4003091E5002817D1 +:1019C000390739F3415041F0C901E3CF82E008956E +:1019D00083E0089581E0089584E008952091E8006F +:1019E00022FFDFCF80E008950E94620D0E946A0D01 +:1019F000E0EEF0E0808181608083E8EDF0E08081BE +:101A00008F77808319BCA7EDB0E08C918E7F8C938B +:101A100080818F7E80831092E50108950F931F933C +:101A2000CF93DF930E94620D0E946A0DC8EDD0E053 +:101A300088818F77888388818068888388818F7D7B +:101A4000888319BC1092E6011092E2011092E40121 +:101A50001092E30100EE10E0F80180818B7F80831B +:101A600088818160888342E060E080E00E946E0CA3 +:101A7000E1EEF0E080818E7F8083E2EEF0E0808115 +:101A800081608083808188608083F80180818E7F7F +:101A90008083888180618883DF91CF911F910F912E +:101AA0000895E8EDF0E080818F7E8083E7EDF0E03F +:101AB00080818160808384E082BF81E08093E50142 +:101AC0000C940E0DE8EDF0E080818E7F8083109203 +:101AD000E20008951092DA001092E10008951F923A +:101AE0000F920FB60F9211242F933F934F935F9352 +:101AF0006F937F938F939F93AF93BF93EF93FF93D6 +:101B00008091E10082FF0BC08091E20082FF07C05C +:101B10008091E1008B7F8093E1000E94CB0F809148 +:101B2000DA0080FF1FC08091D80080FF1BC0809129 +:101B3000DA008E7F8093DA008091D90080FF0DC09B +:101B400080E189BD82E189BD09B400FEFDCF81E05D +:101B50008093E6010E94D30905C019BC1092E601EA +:101B60000E94E1098091E10080FF19C08091E200AC +:101B700080FF15C08091E2008E7F8093E20080910B +:101B8000E20080618093E2008091D80080628093BF +:101B9000D80019BC85E08093E6010E94E509809198 +:101BA000E10084FF30C08091E20084FF2CC080E11E +:101BB00089BD82E189BD09B400FEFDCF8091D800C6 +:101BC0008F7D8093D8008091E1008F7E8093E1002B +:101BD0008091E2008F7E8093E2008091E20081603C +:101BE0008093E2008091E201882311F084E007C035 +:101BF0008091E30087FF02C083E001C081E0809311 +:101C0000E6010E94E7098091E10083FF29C08091ED +:101C1000E20083FF25C08091E100877F8093E1008F +:101C200082E08093E6011092E2018091E1008E7FD4 +:101C30008093E1008091E2008E7F8093E2008091AA +:101C4000E20080618093E20042E060E080E00E9478 +:101C50006E0C8091F00088608093F0000E94E4098F +:101C6000FF91EF91BF91AF919F918F917F916F9174 +:101C70005F914F913F912F910F900FBE0F901F904A +:101C800018951F920F920FB60F9211242F933F9326 +:101C90004F935F936F937F938F939F93AF93BF9374 +:101CA000CF93EF93FF93C091E900CF708091EC0048 +:101CB0001092E9008091F000877F8093F000789483 +:101CC0000E947D0E1092E9008091F0008860809360 +:101CD000F000C093E900FF91EF91CF91BF91AF91D8 +:101CE0009F918F917F916F915F914F913F912F9134 +:101CF0000F900FBE0F901F9018951F93CF93DF93F7 +:101D0000CDB7DEB7AA970FB6F894DEBF0FBECDBF32 +:101D1000E7EEF1E08091F100819321E0EF3EF207E0 +:101D2000C9F70E94030A8091E80083FF1CC120913B +:101D3000E7013091E801832F90E08A30910508F0A7 +:101D400012C1FC01EA5AFF4F0C946124203881F043 +:101D5000223809F008C18091EB018F708093E9006F +:101D60008091EB0085FB882780F91092E90006C07E +:101D70008091E3019091E401911182609091E800DB +:101D8000977F9093E8008093F1001092F100C5C016 +:101D9000822F8D7F09F0E7C0222319F0223061F0F5 +:101DA000E2C08091E901813009F0DDC0333009F0F3 +:101DB00080E08093E40128C08091E901811124C072 +:101DC0002091EB012F7009F4CEC02093E90080919F +:101DD000EB0080FF19C08091EB00333011F480627A +:101DE00011C080618093EB0081E090E0022E01C081 +:101DF000880F0A94EAF78093EA001092EA00809133 +:101E0000EB0088608093EB001092E9008091E8007D +:101E1000877F86C02111A7C01091E9011F778091AB +:101E2000E3008078812B8093E3008091E800877F36 +:101E30008093E8000E94A30C8091E80080FFFCCF13 +:101E40008091E30080688093E300112311F083E028 +:101E500001C082E08093E60186C02058223008F05D +:101E600082C08091E9019091EA018C3D23E09207C4 +:101E700079F583E08A838AE289834FB7F894DE019B +:101E8000139620E03EE051E2E32FF0E0509357003C +:101E9000E49120FF03C0E295EF703F5FEF708E2F5B +:101EA00090E0EA3010F0C79601C0C0968D939D93E4 +:101EB0002F5F243149F74FBF8091E800877F8093DF +:101EC000E8006AE270E0CE0101960E94AB0B14C0FC +:101ED000AE014F5F5F4F6091EB010E94F30A0097E4 +:101EE00009F441C02091E800277F2093E800BC015D +:101EF00089819A810E940C0C8091E8008B778093F5 +:101F0000E80031C0203879F58091E800877F809320 +:101F1000E8008091E2018093F1008091E8008E77E3 +:101F20008093E8000E94A30C1EC021111CC0909158 +:101F3000E9019230C0F48091E800877F8093E80047 +:101F40009093E2010E94A30C8091E201811104C0F0 +:101F50008091E30087FF02C084E001C081E08093AC +:101F6000E6010E94EF098091E80083FF0AC080919A +:101F7000E800877F8093E8008091EB008062809387 +:101F8000EB00AA960FB6F894DEBF0FBECDBFDF916F +:101F9000CF911F9108950895CF938091E6018823F2 +:101FA000B1F08091E9008F709091EC0090FF02C039 +:101FB00090E801C090E0C92FC82B1092E9008091F1 +:101FC000E80083FD0E947D0ECF70C093E900CF91A1 +:101FD000089590936901809368010895E0916801E4 +:101FE000F0916901309721F00190F081E02D099482 +:101FF00080E00895E0916801F0916901309721F047 +:102000000280F381E02D09940895E0916801F09138 +:102010006901309721F00480F581E02D099408953D +:1020200020916601309167018217930771F09093B8 +:10203000670180936601E0916801F0916901309732 +:1020400021F00680F781E02D099408952091640124 +:10205000309165018217930771F090936501809329 +:102060006401E0916801F0916901309721F00084EA +:10207000F185E02D0994089508950C943C100E9478 +:10208000501C0E94CA050C94161DCF92DF92EF924D +:10209000FF920F931F93CF93DF93CDB7DEB72B97AC +:1020A0000FB6F894DEBF0FBECDBF0E94E2053BE63F +:1020B000E32E31E0F32E00E010E0C02E802F0E94CE +:1020C000CF06F701D1907F01D826B1F40F5F1F4FE3 +:1020D0000E30110591F78FEF89838A831B820E944E +:1020E000591C8160782F9D838C8349815A816B8133 +:1020F0008D810E94E81041C09091CD0191FF04C0F4 +:102100008B870E94D5068B8520E030E04D2D50E076 +:10211000922FBA01022E02C0759567950A94E2F7D4 +:1021200060FF25C02E83CF82EE24E394F12C02C001 +:10213000EE0CFF1C9A95E2F790E08E219F2121E0A2 +:10214000892B09F420E028870E94591C8160782F90 +:102150009A8789874E815F8168858A850E94E81009 +:10216000F801E559FE4F80818E25808306C02F5FE0 +:102170003F4F2630310561F6A9CF0E94FA1F10911A +:102180006A010E94EE0F1817A1F00E94EE0F8093D3 +:102190006A012B960FB6F894DEBF0FBECDBFDF915C +:1021A000CF911F910F91FF90EF90DF90CF900C9403 +:1021B000F3082B960FB6F894DEBF0FBECDBFDF91AC +:1021C000CF911F910F91FF90EF90DF90CF900895E6 +:1021D000CF93DF93CDB7DEB72B970FB6F894DEBF62 +:1021E0000FBECDBF4F83588769877A878B87DE0103 +:1021F000119686E0FD0111928A95E9F785E0FE01CE +:10220000379601900D928A95E1F749815A816B8149 +:102210007C818D819E810E9424182B960FB6F894A4 +:10222000DEBF0FBECDBFDF91CF910895CF93C82FF2 +:10223000882309F4C1C0823859F40E94EE0F81FD51 +:10224000BBC089E30E94C11A0E948B1B89E30CC0AA +:10225000833879F40E94EE0F80FDAEC083E50E94C2 +:10226000C11A0E948B1B83E50E94011BCF910C9425 +:102270008B1B843859F40E94EE0F82FD9DC087E4C9 +:102280000E94C11A0E948B1B87E4EECF8CEF8C0F4B +:10229000813A48F48C2F0E942F2281118DC08C2FFF +:1022A0000E94C11AE3CF80E28C0F883048F4C770D7 +:1022B00081E001C0880FCA95EAF70E94421BD6CF81 +:1022C0008BE58C0F833078F4C53A29F0C63A31F4A7 +:1022D00082E890E005C081E890E002C083E890E0E9 +:1022E000CF910C94101088E58C0F833108F064C0F6 +:1022F000C83A39F1C93A41F1CA3A49F1CB3A51F1F8 +:10230000CC3A59F1CD3A61F1C03B69F1CE3A71F165 +:10231000CF3A79F1C13B81F1C23B89F1C33B91F1E5 +:10232000C43B99F1C53BA1F1C63BA9F1C73BB1F153 +:10233000C83BB9F1C93BC1F1CA3BC9F58AE292E099 +:1023400038C082EE90E035C089EE90E032C08AEE6F +:1023500090E02FC085EB90E02CC086EB90E029C088 +:1023600087EB90E026C08CEC90E023C08DEC90E0F1 +:1023700020C083E891E01DC08AE891E01AC082E99C +:1023800091E017C084E991E014C081E292E011C0AD +:1023900083E292E00EC084E292E00BC085E292E01C +:1023A00008C086E292E005C087E292E002C080E0C9 +:1023B00090E0CF910C942610CF910895882309F4D2 +:1023C0004BC0823859F40E94EE0F81FF45C089E36B +:1023D0000E94C11A0E948B1B89E30CC0833871F4E0 +:1023E0000E94EE0F80FF38C083E50E94C11A0E9450 +:1023F0008B1B83E50E94011B0C948B1B843859F4C2 +:102400000E94EE0F82FF28C087E40E94C11A0E943A +:102410008B1B87E4EFCF9CEF980F913A58F390E233 +:10242000980F983050F4877091E001C0990F8A9509 +:10243000EAF7892F0E94481BDFCF9BE5980F933066 +:1024400020F480E090E00C941010885A833120F43E +:1024500080E090E00C9426100895882321F00E94DB +:10246000421B0C948B1B0895882321F00E94481B6B +:102470000C948B1B0895CF92DF92EF92FF920F93F3 +:102480001F93CF93DF93CDB7DEB728970FB6F8949D +:10249000DEBF0FBECDBF8C0185E0F801DE011196D5 +:1024A00001900D928A95E1F7F80140813181F28027 +:1024B000258122952F7083819481892B31F03F3FB4 +:1024C00031F481E04F3F19F403C081E001C080E0A6 +:1024D00080FDCBC249833A8389819A812F830E94F0 +:1024E0007F1A9E8388870E947E1A0E9451192F812D +:1024F0004E816885FF2029F00E945F1B68854E8110 +:102500002F81E42FE295EF70F0E0E05AFF4F0C943A +:102510006124842F807F142F1F70882311F012955F +:10252000107FFF2059F0112309F454C2812F6887CE +:102530000E94521B0E948B1B68854CC2862F0E94F2 +:10254000DE11112309F491C2812F0E94581B289695 +:102550000FB6F894DEBF0FBECDBFDF91CF911F91B4 +:102560000F91FF90EF90DF90CF900C948B1B342F46 +:10257000307F842F8F70303211F08295807F6623F8 +:1025800019F0613019F12BC0FF20B1F0222309F4BA +:1025900093C1213009F090C128960FB6F894DEBFA0 +:1025A0000FBECDBFDF91CF911F910F91FF90EF90A4 +:1025B000DF90CF900C94721B222319F0213009F484 +:1025C00054C28E830E94751B8E8189C1FF2021F029 +:1025D000223008F04AC270C1211147C280C1FF20D9 +:1025E00021F0222309F468C1F5C1222309F477C13F +:1025F00005C2242F26952695237030E0211531053C +:1026000021F021303105C9F030C2FF2021F0862FA2 +:10261000942F937002C080E090E028960FB6F89453 +:10262000DEBF0FBECDBFDF91CF911F910F91FF9005 +:10263000EF90DF90CF900C941010FF2021F0862FA8 +:10264000942F937002C080E090E028960FB6F89423 :10265000DEBF0FBECDBFDF91CF911F910F91FF90D5 -:10266000EF90DF90CF900C94570F222309F4B1CF55 -:10267000862F28960FB6F894DEBF0FBECDBFDF9130 -:10268000CF911F910F91FF90EF90DF90CF900C941E -:102690001F104F70C8010E94AB0228960FB6F89425 -:1026A000DEBF0FBECDBFDF91CF911F910F91FF9085 -:1026B000EF90DF90CF900C9409174F70C8012896C7 -:1026C0000FB6F894DEBF0FBECDBFDF91CF911F9143 -:1026D0000F91FF90EF90DF90CF900C94D605289645 -:1026E0000FB6F894DEBF0FBECDBFDF91CF911F9123 -:1026F0000F91FF90EF90DF90CF9008950E9497196F -:102700000E946C190E94B3190E94BA1E0E940E1EEC -:1027100080E090E00E94510E80E090E00C94670E03 -:102720000E9487190C947E130E94B718292F2295B6 -:102730002F7030E02C3031054CF42A3031056CF428 -:10274000225031092230310590F407C02C30310578 -:1027500051F02F30310539F00AC0803E10F0803F33 -:1027600031F481E0089593FB882780F9089580E093 -:102770000895CF93DF9300D000D01F92CDB7DEB77E -:102780000F900F900F900F900F90DF91CF910895C1 -:10279000CF93DF9300D000D000D0CDB7DEB7269620 -:1027A0000FB6F894DEBF0FBECDBFDF91CF91089575 -:1027B0001F93CF93DF93C091790116E080917A0146 -:1027C000C81799F0D0E01C9FF0011D9FF00D112457 -:1027D000E558FE4F408151816281738184819581EA -:1027E0000E94C8132196C770E9CFDF91CF911F9146 -:1027F00008954091AB015091AC016091AD01709191 -:10280000AE018091AF019091B0010C94C813CF93A9 -:102810008091B00182958F7009F05FC08091AD0109 -:10282000882309F45AC020917901A0917A0160911E -:10283000AB017091AC018091AE019091AF0131E09C -:102840006F3F09F030E0B32FC6E02A1709F445C006 -:10285000009721F07F3F21F44B2F03C041E001C0DE -:1028600040E030E040FD35C0C29FF001C39FF00D55 -:102870001124E558FE4F418174132BC0408164132D -:1028800028C04281411125C043815481481759070E -:1028900010F441505109481B590B483C5105C8F4EC -:1028A0008091B0018F7080618093B00186E0829F3B -:1028B000F001839FF00D1124E058FE4F80818F704E -:1028C000806180838BEA91E00E947C10CF910C9410 -:1028D000D8132F5F3F4F2770B8CFCF910895CF9275 -:1028E000DF92EF92FF920F931F93CF93DF93CDB7B9 -:1028F000DEB762970FB6F894DEBF0FBECDBF8C0176 -:1029000085E0F801DE011D9601900D928A95E1F7B0 -:10291000D8014C9111965C91119712966C91129777 -:102920001396ED90FC9014977091AB01E091AC017F -:102930002091AE013091AF012115310531F0EF3F0B -:1029400031F481E07F3F19F403C081E001C080E0F1 -:10295000B82FB170CB2E80FD6CC1D090AD01DD20C1 -:1029600009F4F5C0F091B001E216F30638F0C701A2 -:10297000821B930B883C910548F09BC020953095B5 -:102980002E0D3F1D283C310508F093C08F2F807F0E -:1029900009F052C0E51314C0741312C0D62E611191 -:1029A0000FC0FF70F061F093B0010E94F9138BEA41 -:1029B00091E00E947C108091B001F80185836CC188 -:1029C000EF2831F05F3F31F481E04F3F19F403C04D -:1029D00081E001C080E080FD03C081E0862701C066 -:1029E00080E0F82FF170FF2E80FF1CC080917901EC -:1029F00020917A0136E0821709F428C190E0389FCF -:102A0000F001399FF00D1124E558FE4F71815713E5 -:102A100006C07081471303C07281671303C001961B -:102A20008770E9CFD62E662309F436C18091B001B4 -:102A300081608093B00153C0E51308C0741306C0D1 -:102A4000611104C0D8011596FC93AEC04D875E8716 -:102A50008D859E856A8B0E9494136A89882329F14B -:102A6000D62E662311F12091B001822F82958F70AE -:102A700090E002970CF460C08091AB019091AC01A2 -:102A800098878F831986FB86EA862C87CE01079666 -:102A900051C0E51731F14D875E878D859E856A8B24 -:102AA0000E9494136A8981112EC0C8010E947C1073 -:102AB000A4C08F2F807F69F77E2DF98AE88A8989E3 -:102AC0000E94B9138BEA91E00E947C10EBEAF1E0DE -:102AD00086E0DF011D928A95E9F70E94F913D12C57 -:102AE000DBC07413D8CF6111D6CFD8011596FC93F3 -:102AF000C8010E947C10EBEAF1E086E0DF011D9244 -:102B00008A95E9F7C9C0D62E662379F22091B001E3 -:102B1000822F82958F7090E0029774F08091AB01C4 -:102B20009091AC019A8389831B82FD82EC822E8373 -:102B3000CE0101960E947C1086E0F801ABEAB1E07C -:102B400001900D928A95E1F70E9407146FC0E2167A -:102B5000F30628F0C701821B930B9C0104C020954B -:102B600030952E0D3F1D283C310508F052C0D62E61 -:102B7000662309F49ACFE5132CC074132AC0809100 -:102B8000B00180FD1DC0982F92959F70C9F0D801AB -:102B900015968C9315979F3039F09F5F9295907F93 -:102BA0008F70892B15968C93C8010E947C1086E04B -:102BB000F801ABEAB1E001900D928A95E1F736C0D9 -:102BC00086E0F801ABEAB1E001900D928A95E1F759 -:102BD00063C04D875E878D859E850E9494138823F0 -:102BE00079F086E0F801ABEAB1E001900D928A95A8 -:102BF000E1F70E9407140E94F913DD24D3944CC01E -:102C00008091B00181608093B001C8010E947C1066 -:102C100043C07E2DF98AE88A89890E94B913EBEABC -:102C2000F1E086E0DF011D928A95E9F70E94F91331 -:102C300033C0662309F439CF4D875E878D859E8525 -:102C40000E949413882309F430CFCBCF4D875E8741 -:102C50008D859E850E94B718292F22952F7030E010 -:102C6000223031052CF49F7041F0811106C00CC058 -:102C7000243031052CF49F7049F4805E883020F0B8 -:102C8000C8010E947C10CF2CDC2C06C0D801159600 -:102C90009C91907F91F7F8CF8D2D62960FB6F894A6 -:102CA000DEBF0FBECDBFDF91CF911F910F91FF907F -:102CB000EF90DF90CF9008951F93CF93DF93CDB720 -:102CC000DEB72C970FB6F894DEBF0FBECDBF4F8393 -:102CD000588769877A878B879C87CE0107960E94E1 -:102CE0006F148823C1F02F8138858A859B85892BB5 -:102CF00031F03F3F11F080E003C02F3FE1F781E06A -:102D0000811147C04F81588569857A858B859C855F -:102D10000E94C8133EC086E0FE013796DE01119680 -:102D200001900D928A95E1F7FF81E8854A855B85E0 -:102D30004115510531F0EF3F31F481E0FF3F19F4C7 -:102D400003C081E001C080E080FD23C020917A01B2 -:102D500030E0C9010196877099276091790170E090 -:102D600086179707F1F1F983EA835D834C8396E038 -:102D7000929FD001939FB00D1124A558BE4FFE0124 -:102D8000319601900D929A95E1F780937A010E9415 -:102D9000D81316E08091790190917A01891779F121 -:102DA000189FC001112485589E4F0E946F148823DC -:102DB00031F1E09179011E9FF0011124E558FE4F99 -:102DC0004081518162817381848195810E94C81301 -:102DD0008091790190E0019687709927809379011D -:102DE000D9CF0E94901310927A0110927901EBEAE8 -:102DF000F1E086E0DF011D928A95E9F7CACF2C96B3 -:102E00000FB6F894DEBF0FBECDBFDF91CF911F91FB -:102E10000895EF92FF920F931F93CF93DF93FC01DE -:102E2000009709F46FC0F12CEE24E394EF01219692 -:102E30008491843740F4843008F055C0813081F0AB -:102E4000823021F15FC0853709F447C0C0F19CE7AB -:102E5000980F903708F056C08F770E941F1045C01A -:102E60008F010E5F1F4FFE01849190E2980F983002 -:102E700050F48770FE2D01C0FF0F8A95EAF78F2F5F -:102E80000E948A1915C00E94570F14C08F010E5F4F -:102E90001F4FFE01849190E2980F983068F487707C -:102EA000FE2D01C0FF0F8A95EAF78F2F0E9490191F -:102EB0000E94B319E80119C00E941F10FBCFCF0177 -:102EC0000296FE01C491CC2361F0EFE9FFE0319757 -:102ED000F1F700C00000C150F6CFCF010296FE010D -:102EE000F490EC0102C00E94570F8F2D882341F00F -:102EF000EFE9FFE03197F1F700C000008150F6CF15 -:102F0000FE0194CFDF91CF911F910F91FF90EF9031 -:102F1000089508956093B5017093B6018093B70149 -:102F20009093B8010C947E130F931F930091B501F9 -:102F30001091B6012091B7013091B801062B172BE3 -:102F4000282B392B0093B5011093B6012093B701BC -:102F50003093B8011F910F910C947E130F931F9320 -:102F60000091B5011091B6012091B7013091B801DF -:102F700006231723282339230093B5011093B601A4 -:102F80002093B7013093B8011F910F910C947E13D9 -:102F90000F931F930091B5011091B6012091B701D5 -:102FA0003091B80106271727282739270093B50144 -:102FB0001093B6012093B7013093B8011F910F9180 -:102FC0000C947E131092B1011092B2011092B301D1 -:102FD0001092B4010C947E1341E050E060E070E088 -:102FE00004C0440F551F661F771F8A95D2F7409380 -:102FF000B1015093B2016093B3017093B4010C948A -:103000007E1341E050E060E070E004C0440F551FC3 -:10301000661F771F8A95D2F78091B1019091B20116 -:10302000A091B301B091B401842B952BA62BB72BA3 -:103030008093B1019093B201A093B301B093B40116 -:103040000C947E1341E050E060E070E004C0440F57 -:10305000551F661F771F8A95D2F74095509560954A -:1030600070958091B1019091B201A091B301B0919E -:10307000B40184239523A623B7238093B1019093B1 -:10308000B201A093B301B093B4010C947E1341E05C -:1030900050E060E070E004C0440F551F661F771FCA -:1030A0008A95D2F78091B1019091B201A091B301BC -:1030B000B091B40184279527A627B7278093B10143 -:1030C0009093B201A093B301B093B4010C947E131A -:1030D0000F931F930091B1011091B2012091B301A0 -:1030E0003091B401062B172B282B392B0093B101FB -:1030F0001093B2012093B3013093B4011F910F914B -:103100000C947E130F931F930091B1011091B201A3 -:103110002091B3013091B4010623172328233923CA -:103120000093B1011093B2012093B3013093B40125 -:103130001F910F910C947E130F931F930091B10177 -:103140001091B2012091B3013091B40106271727E5 -:10315000282739270093B1011093B2012093B301BE -:103160003093B4011F910F910C947E130895CF9268 -:10317000DF92EF92FF920F931F93CF93DF93EC01B7 -:10318000C090B501D090B601E090B701F090B801C1 -:103190008091B1019091B201A091B301B091B401BD -:1031A000C82AD92AEA2AFB2A0FE110E0B701A601B2 -:1031B000002E04C076956795579547950A94D2F7E7 -:1031C00040FF07C0BE01802F0E94F90581309105A4 -:1031D00039F40150110950F7BE0180E00E94F90551 -:1031E000DF91CF911F910F91FF90EF90DF90CF90E3 -:1031F000089590910C019923D9F090910D01992394 -:10320000B9F0982F9695969596959F3088F5E09110 -:103210000E01F0910F01E90FF11D877021E030E000 -:1032200001C0220F8A95EAF78181822B818308955C -:1032300040910E0150910F0120E030E09FEFFA0124 -:10324000E20FF31F6281681799F09F3F19F4611133 -:1032500001C0922F2F5F3F4F2E30310581F79F3FE6 -:1032600039F0FA01E90FF11D97FDFA95828308956F -:10327000089590910C019923E1F090910D0199230B -:10328000C1F0982F9695969596959F3020F5E091F0 -:103290000E01F0910F01E90FF11D877021E030E080 -:1032A00001C0220F8A95EAF7209581812823218386 -:1032B000089540910E0150910F0120E030E0FA0195 -:1032C000E20FF31F9281981301C012822F5F3F4FCC -:1032D0002E303105A1F7089581E090E0E0910E01D4 -:1032E000F0910F01E80FF91F1082019680319105CE -:1032F000A9F708959091CB01982B9093CB01089555 -:1033000080959091CB0198239093CB0108951092D2 -:10331000CB0108959091CA01982B9093CA0108950A -:1033200080959091CA0198239093CA0108951092B4 -:10333000CA0108958093B90108951092B9010895C2 -:1033400040910E0150910F0120E030E080E0FA0141 -:10335000E20FF31F918191118F5F2F5F3F4F2F304D -:103360003105A9F70895E0910E01F0910F018091C8 -:10337000CB018083E0910E01F0910F01808190914B -:10338000CA01892B80839091B901992361F0E09162 -:103390000E01F0910F018081892B80830E94A0197A -:1033A00081111092B90180910E0190910F010C943E -:1033B0003B0ECF92DF92EF92FF920F931F936C011F -:1033C000EE24FF24C114D104E104F10421F46B01C3 -:1033D0007C0180E001C080E133272F2D1E2D0D2DB3 -:1033E000011511052105310519F0885F6801790182 -:1033F00097018601A4E03695279517950795AA951C -:10340000D1F7011511052105310519F08C5F68010F -:10341000790197018601F2E0369527951795079572 -:10342000FA95D1F7011511052105310519F08E5FC7 -:1034300068017901B701A60176956795579547957B -:10344000452B462B472B09F08F5F1F910F91FF9063 -:10345000EF90DF90CF9008958091E501843009F1DD -:103460001092CD0120E488E190E00FB6F894A89581 -:10347000809360000FBE2093600083B7817F8460DB -:1034800083BF83B7816083BF7894889583B78E7F2D -:1034900083BF88E10FB6F8948093600010926000BB -:1034A0000FBE089508950895CF930E94521A0E9466 -:1034B00023040E94531AC0E08C2F0E941005811132 -:1034C00005C0CF5FCE30C1F780E001C081E0CF9171 -:1034D00008950E9490130E942F0E0C94340782E0EE -:1034E00084BD93E095BD9AEF97BD80936E000895DB -:1034F0002FB7F8948091CE019091CF01A091D00187 -:10350000B091D1012FBF0895CF92DF92EF92FF9239 -:103510000F931F932FB7F8944091CE015091CF0194 -:103520006091D0017091D1012FBF6A017B01EE241F -:10353000FF248C0120E030E0C016D106E206F3063D -:1035400010F441505109481B590BCA011F910F91AA -:10355000FF90EF90DF90CF9008951F920F920FB6DB -:103560000F9211248F939F93AF93BF938091CE01BD -:103570009091CF01A091D001B091D1010196A11DF0 -:10358000B11D8093CE019093CF01A093D001B09351 -:10359000D101BF91AF919F918F910F900FBE0F906E -:1035A0001F9018950E94350BF8942FEF87EA91E64B -:1035B000215080409040E1F700C0000087E090EB90 -:1035C000DC018093EE019093EF01A093F001B093A2 -:1035D000F1012CE088E190E00FB6F894A895809373 -:1035E00060000FBE20936000FFCFEF92FF920F9319 -:1035F0001F93CF93DF93E82EF12C8F2D0E9410059F -:10360000C0E0D0E0082F10E098010C2E02C03595E4 -:1036100027950A94E2F720FD05C02196C630D10512 -:1036200099F709C06C2F7F2D80E00E94D705E81222 -:10363000F4CF81E005C0F3948EE0F812DECF80E095 -:10364000DF91CF911F910F91FF90EF900895CF934D -:10365000C82F8CE20E94F51A882321F08C2FCF917D -:103660000C94F51A80E0CF910895CF930E947A1CB4 -:10367000811102C00E94601CC5E6C15049F00E9441 -:1036800023048FE39CE90197F1F700C00000F5CF18 -:1036900089E20E94271B811111C18AE20E94271B27 -:1036A00081110E94601C85E00E94271B81110E94ED -:1036B000D21A0E94851C8093CC0187E00E94271BB0 -:1036C000882399F18BE10E94271B882351F0909168 -:1036D000CC0191FB882780F921E0822780FB91F9BA -:1036E00022C08EE00E94271B882351F09091CC01CC -:1036F00092FB882780F921E0822780FB92F913C092 -:1037000080E10E94271B9091CC01882341F093FB1C -:10371000882780F921E0822780FB93F904C0892F54 -:10372000809580FB90F99093CC018091CC010E9410 -:10373000891C0E94971C8093DF0180EE0E94271B4A -:10374000882341F08091DF01982F909590FB80F9BC -:103750008093DF0189E30E94271B882359F0909111 -:10376000DF0191FB882780F921E0822780FB91F916 -:103770009093DF0182EE0E94271B882359F09091DD -:10378000DF0192FB882780F921E0822780FB92F9F4 -:103790009093DF0186EE0E94271B882359F09091B9 -:1037A000DF0193FB882780F921E0822780FB93F9D2 -:1037B0009093DF0183EE0E94271B882359F090919C -:1037C000DF0194FB882780F921E0822780FB94F9B0 -:1037D0009093DF0185E30E94271B882359F0909185 -:1037E000DF0195FB882780F921E0822780FB95F98E -:1037F0009093DF0181E30E94271B882359F0909169 -:10380000DF0196FB882780F921E0822780FB96F96B -:103810009093DF0181E10E94271B882359F090914A -:10382000DF0197FB882780F921E0822780FB97F949 -:103830009093DF018091DF010E949B1C8091DF014A -:1038400087FB882780F980930D0187E20E94271B60 -:10385000C82F8EE10E94271B8111C2608FE10E9458 -:10386000271B8111C46080E20E94271B8111C86060 -:1038700081E20E94271B8111C06182E20E94271B06 -:103880008111C06283E20E94271B8111C06484E21F -:103890000E94271B882311F0C06802C0CC2329F0A6 -:1038A0008C2F0E94921C6C2F03C00E948E1C682FCC -:1038B00070E080E090E0CF910C948A17CF9108954A -:1038C0006DEE7EEF80E090E00E94B62260E082E044 -:1038D00090E00E94A82260E083E090E00E94A8228D -:1038E00060E084E090E00E94A82260E085E090E043 -:1038F0000C94A82280E090E00E94A22221E08D3E5C -:103900009E4F09F020E0822F089582E090E00C9411 -:103910009A22682F82E090E00C94A82283E090E045 -:103920000C949A22682F83E090E00C94A82284E003 -:1039300090E00C949A22682F84E090E00C94A822E6 -:103940008091D40180FF0BC06091130185E0689FD6 -:10395000B001112475956795759567952AC081FF0B -:1039600009C06091130185E0689FB001112475952D -:1039700067951FC082FF07C06091130185E0689FB3 -:10398000B001112416C04091D5014423C9F06091C3 -:103990001201461788F72091130185E0289F9001B6 -:1039A0001124429FC001439F900D112470E00E949A -:1039B0006C226038710540F46115710539F002C060 -:1039C00065E070E0862F08958FE7089581E00895FF -:1039D0008091D40180FF08C06091110170E075955D -:1039E00067957595679521C081FF06C060911101AB -:1039F00070E07595679519C082FF04C06091110150 -:103A000070E010C08091D5018823C1F06091100151 -:103A10008617A0F790911101989FC001112470E0C2 -:103A20000E946C226038710528F46115710521F03F -:103A3000862F08958FE7089581E0089561E070E092 -:103A4000F4CF803F21F40E94A01C819504C0813FE7 -:103A500029F40E94A01C8093D8010895823F21F48C -:103A60000E94A01C819504C0833F29F40E94A01CE1 -:103A70008093D7010895893F19F40E94E81C05C07E -:103A80008A3F31F40E94E81C81958093D901089502 -:103A90008B3F21F40E94E81C819504C08C3F29F4DF -:103AA0000E94E81C8093DA010895843F21F48091FC -:103AB000D601816017C0853F21F48091D6018260D4 -:103AC00011C0863F21F48091D60184600BC0873FEE -:103AD00021F48091D601886005C0883F31F480913F -:103AE000D60180618093D60108958D3F21F48091A5 -:103AF000D40181600BC08E3F21F48091D40182609B -:103B000005C08F3F29F48091D40184608093D40153 -:103B10000895803F39F48091D80187FF6CC01092DE -:103B2000D80169C0813F29F48091D8011816BCF3EF -:103B300062C09091D701823F29F497FF5CC0109238 -:103B4000D70159C0833F19F41916CCF354C0893FEB -:103B500041F48091D90118160CF04DC01092D90192 -:103B60004AC08A3F29F48091D90187FF44C0F6CF2B -:103B70008B3F39F48091DA0187FF3DC01092DA0162 -:103B80003AC08C3F29F48091DA011816BCF333C097 -:103B9000843F21F48091D6018E7F17C0853F21F4A8 -:103BA0008091D6018D7F11C0863F21F48091D6018E -:103BB0008B7F0BC0873F21F48091D601877F05C0A2 -:103BC000883F31F48091D6018F7E8093D60113C057 -:103BD0008D3F21F48091D4018E7F0BC08E3F21F464 -:103BE0008091D4018D7F05C08F3F29F48091D4014D -:103BF0008B7F8093D4018091D70181110EC0809179 -:103C0000D80181110AC08091D901811106C080912B -:103C1000DA01811102C01092D501089586ED91E07C -:103C20000E94460E0E94781A9093D3018093D2018D -:103C300008951F93CF93DF938091D2019091D30188 -:103C40000E94841A4091D501442321F0209114014F -:103C500030E006C0209115015AE0259F9001112403 -:103C60008217930708F482C08091D7011091D80180 -:103C7000D091D901C091DA01811107C0111105C09D -:103C8000D11103C0CC2309F471C04F3F19F04F5F2D -:103C90004093D501181624F40E94A01C8093D701EC -:103CA0008091D70187FF05C00E94A01C8195809359 -:103CB000D701111624F40E94A01C8093D801809192 -:103CC000D80187FF05C00E94A01C81958093D80170 -:103CD0006091D701662339F11091D801112319F1B0 -:103CE000772767FD7095872F972F0E947D2123E30B -:103CF00033E343E35FE30E94E1210E944A216093A2 -:103D0000D701612F772767FD7095872F972F0E9426 -:103D10007D2123E333E343E35FE30E94E1210E943B -:103D20004A216093D8011D1624F40E94E81C809358 -:103D3000D9018091D90187FF05C00E94E81C8195B7 -:103D40008093D9011C1624F40E94E81C8093DA01A8 -:103D50008091DA0187FF05C00E94E81C819580935D -:103D6000DA01DF91CF911F910C940E1EDF91CF915C -:103D70001F910895E6EDF1E085E0DF011D928A953F -:103D8000E9F71092D5011092D4010895833081F1A2 -:103D900028F4813059F08230D1F00895853009F44B -:103DA00049C0B8F1863009F456C008952091150134 -:103DB000862F90E0820F911D8F3F910520F4620FB6 -:103DC0006093150108958FEF809315010895209158 -:103DD0001401862F90E0820F911D8F3F910520F4F2 -:103DE000620F6093140108958FEF8093140108957A -:103DF00020911301862F90E0820F911D8F3F910536 -:103E000020F4620F6093130108958FEF80931301E4 -:103E1000089520911201862F90E0820F911D8F3F0F -:103E2000910520F4620F6093120108958FEF809343 -:103E30001201089520911101862F90E0820F911DAB -:103E40008F3F910520F4620F6093110108958FEF69 -:103E500080931101089520911001862F90E0820F28 -:103E6000911D8F3F910520F4620F6093100108951A -:103E70008FEF809310010895833011F128F4813081 -:103E800049F0823091F00895853081F120F186303B -:103E9000C1F1089580911501681720F4861B809365 -:103EA0001501089510921501089580911401681765 -:103EB00020F4861B80931401089510921401089534 -:103EC00080911301681720F4861B809313010895D5 -:103ED00010921301089580911201681720F4861B37 -:103EE000809312010895109212010895809111019A -:103EF000681720F4861B8093110108951092110118 -:103F0000089580911001681720F4861B809310019A -:103F100008951092100108958D3109F442C020F5E2 -:103F20008E3009F479C070F4873009F45EC020F453 -:103F3000863009F442C033C08830D1F18B3009F4A7 -:103F4000A7C02DC0863109F4A3C038F4803109F42C -:103F50006DC0813109F47BC022C0893109F498C059 -:103F60008B3109F44FC01BC0853309F479C048F484 -:103F7000873209F475C008F478C0893209F470C03A -:103F80000EC0833438F48A3308F071C0883309F4E2 -:103F90007FC005C0833409F463C08834C1F080E079 -:103FA00008950E9404210E942F0E0E94340770C0C1 -:103FB0000E94851C0E94971C6BC08091CC01817F60 -:103FC0008E7F8093CC0181E08093DC0108950E9474 -:103FD00090132FEF83ED90E3215080409040E1F764 -:103FE00000C000000E94D21A53C09091CC01892FCA -:103FF000817090FF03C0917F9E7F26C09160909357 -:10400000CC0146C09091CC0191FB882780F921E03A -:10401000822780FB91F913C09091CC0192FB8827F5 -:1040200080F921E0822780FB92F909C09091CC01B0 -:1040300093FB882780F921E0822780FB93F99093F6 -:10404000CC01882329F191609093CC0108950E94BE -:10405000901380910D0191E0892780930D0118C084 -:1040600061E070E080E090E00FC023EE01C027EC3B -:10407000280F61E070E080E090E004C0660F771FD9 -:10408000881F991F2A95D2F70E948A170E949013C1 -:1040900081E0089580E0089580E00895CF93C82FCF -:1040A0008091DC01813079F018F08230D1F184C048 -:1040B000A0910E01B0910F018C91813169F0823293 -:1040C00009F07CC009C0A0910E01B0910F018C9144 -:1040D000813111F0823249F48C2F0E944A208111E3 -:1040E0001DC08C2F0E948C1F1AC08C2F0E944C2048 -:1040F000811114C0C43179F048F4CB3079F0C0316B -:1041000009F060C082E08093DC0108C0C93219F078 -:10411000C83321F057C01092DC0154C081E0817097 -:1041200053C0C93289F118F5C43171F1A8F4C73010 -:1041300009F046C08AE08093150194E19093140140 -:1041400093E0909313018093120188E08093110112 -:1041500088E28093100134C0CE51C63088F5EC2F30 -:10416000F0E0E65DFE4F80818093DB0129C0CE3414 -:10417000E9F020F4CB3421F56AE013C0C13579F0C1 -:10418000C235F1F461E00DC08091DB01882319F0A4 -:104190001092DB0115C081E08093DC0115C061E065 -:1041A00006C08091DB010E94C61E0AC06AE08091B1 -:1041B000DB010E943C1F04C01092DC0180E004C0BF -:1041C00081E002C080E0ABCFCF910895E1E8F0E05C -:1041D0008081886080838081816080838FB7F8943C -:1041E00093E09093890090ED909388008FBF08959D -:1041F000EFE6F0E08081826080830895EFE6F0E0F2 -:1042000080818D7F80830895EFE6F0E0808192E0E9 -:104210008927808308951F920F920FB60F92112461 -:104220002F933F934F935F936F937F938F939F93BE -:10423000AF93BF93EF93FF938091DD019091DE01E7 -:1042400001969093DE018093DD01811103C082E02D -:104250000E943407E091DE01E695E695F0E0E6572E -:10426000FB4FE4918091DD018E1303C080E00E943A -:104270003407FF91EF91BF91AF919F918F917F9103 -:104280006F915F914F913F912F910F900FBE0F90C3 -:104290001F90189504D06894B1118DC0089570D006 -:1042A00088F09F5790F0B92F9927B751A0F0D1F01F -:1042B000660F771F881F991F1AF0BA95C9F712C0A9 -:1042C000B13081F077D0B1E0089574C0672F782FB6 -:1042D0008827B85F39F0B93FCCF386957795679515 -:1042E000B395D9F73EF490958095709561957F4F81 -:1042F0008F4F9F4F0895E89409C097FB3EF4909527 -:104300008095709561957F4F8F4F9F4F9923A9F0AE -:10431000F92F96E9BB279395F6958795779567953D -:10432000B795F111F8CFFAF4BB0F11F460FF1BC081 -:104330006F5F7F4F8F4F9F4F16C0882311F096E914 -:1043400011C0772321F09EE8872F762F05C06623C2 -:1043500071F096E8862F70E060E02AF09A95660F7B -:10436000771F881FDAF7880F9695879597F9089534 -:1043700057FD9058440F551F59F05F3F71F0479516 -:10438000880F97FB991F61F09F3F79F087950895FB -:10439000121613061406551FF2CF4695F1DF08C01A -:1043A000161617061806991FF1CF86957105610537 -:1043B00008940895E894BB2766277727CB0197F9DF -:1043C00008950BD078C069D028F06ED018F09523EE -:1043D00009F05AC05FC01124EECFCADFA0F3959F49 -:1043E000D1F3950F50E0551F629FF001729FBB27DC -:1043F000F00DB11D639FAA27F00DB11DAA1F649F88 -:104400006627B00DA11D661F829F2227B00DA11D3A -:10441000621F739FB00DA11D621F839FA00D611DC0 -:10442000221F749F3327A00D611D231F849F600DE1 -:10443000211D822F762F6A2F11249F5750408AF01A -:10444000E1F088234AF0EE0FFF1FBB1F661F771FA6 -:10445000881F91505040A9F79E3F510570F014C03D -:10446000AACF5F3FECF3983EDCF38695779567958E -:10447000B795F795E7959F5FC1F7FE2B880F911DC4 -:104480009695879597F9089597F99F6780E870E06A -:1044900060E008959FEF80EC089500240A941616BA -:1044A000170618060906089500240A941216130622 -:1044B000140605060895092E0394000C11F48823B0 -:1044C00052F0BB0F40F4BF2B11F460FF04C06F5FCC -:1044D0007F4F8F4F9F4F089597FB072E16F4009440 -:1044E00007D077FD09D00E94862207FC05D03EF454 -:1044F000909581959F4F0895709561957F4F089590 -:10450000EE0FFF1F0590F491E02D0994AA1BBB1B31 -:1045100051E107C0AA1FBB1FA617B70710F0A61BC3 -:10452000B70B881F991F5A95A9F780959095BC01E4 -:10453000CD010895F999FECF92BD81BDF89A9927D2 -:1045400080B50895A8E1B0E042E050E00C94BD22AF -:10455000262FF999FECF1FBA92BD81BD20BD0FB69F -:10456000F894FA9AF99A0FBE019608950E94A8222B -:10457000272F0C94A922DC01CB01FC01F999FECF75 -:1045800006C0F2BDE1BDF89A319600B40D924150DB -:0A4590005040B8F70895F894FFCFEB -:10459A0020023607C307A0076C0739070101BA01D1 -:1045AA0028080A03140A3F4D36394B04FE03C80390 -:1045BA008F0322033B0354036D0301020304050620 -:0445CA0007080900D5 +:10266000EF90DF90CF900C942610862FFF2019F06A +:102670000E94021F02C00E946A1F28960FB6F8949B +:10268000DEBF0FBECDBFDF91CF911F910F91FF90A5 +:10269000EF90DF90CF900C94EF1F842F837009F0A0 +:1026A00076C0F110E2C1262F229526952770220FC1 +:1026B000220F862F8F70C82ED12CE12CF12C022EE8 +:1026C00004C0CC0CDD1CEE1CFF1C0A94D2F764FF86 +:1026D00010C06FE070E080E090E004C0660F771FEC +:1026E000881F991F2A95D2F76095709580959095CF +:1026F00003C060E070E0CB01242F2695269523705F +:10270000422F50E042305105D1F04330510559F18C +:102710006C297D298E299F294130510541F1289648 +:102720000FB6F894DEBF0FBECDBFDF91CF911F91E2 +:102730000F91FF90EF90DF90CF900C9476196C2959 +:102740007D298E299F2928960FB6F894DEBF0FBEEB +:10275000CDBFDF91CF911F910F91FF90EF90DF9050 +:10276000CF900C9490190E947619C701B601289653 +:102770000FB6F894DEBF0FBECDBFDF91CF911F9192 +:102780000F91FF90EF90DF90CF900C945C19FF2099 +:1027900019F0842F817001C08695882309F465C1E2 +:1027A000262F229526952770220F220F862F8F70B5 +:1027B000C82ED12CE12CF12C022E04C0CC0CDD1C37 +:1027C000EE1CFF1C0A94D2F764FF10C06FE070E0AB +:1027D00080E090E004C0660F771F881F991F2A953C +:1027E000D2F7609570958095909503C060E070E099 +:1027F000CB01242F269526952370422F50E042309E +:102800005105D1F04330510559F16C297D298E29AC +:102810009F294130510541F128960FB6F894DEBF4B +:102820000FBECDBFDF91CF911F910F91FF90EF9021 +:10283000DF90CF900C944A1A6C297D298E299F290C +:1028400028960FB6F894DEBF0FBECDBFDF91CF91B3 +:102850001F910F91FF90EF90DF90CF900C94641A2E +:102860000E944A1AC701B60128960FB6F894DEBF37 +:102870000FBECDBFDF91CF911F910F91FF90EF90D1 +:10288000DF90CF900C94301A603FC9F118F4603E8D +:1028900050F49BC0623F09F460C008F44AC0633F33 +:1028A00009F46FC092C0162F1F70842F8F71FF2004 +:1028B00099F00E94C919812F28960FB6F894DEBFAF +:1028C0000FBECDBFDF91CF911F910F91FF90EF9081 +:1028D000DF90CF900C942D120E94EA19812F289638 +:1028E0000FB6F894DEBF0FBECDBFDF91CF911F9121 +:1028F0000F91FF90EF90DF90CF900C943412FF2057 +:10290000A1F02111B2C0842F8F7128960FB6F894D0 +:10291000DEBF0FBECDBFDF91CF911F910F91FF9012 +:10292000EF90DF90CF900C940F1A223008F09DC0EA +:10293000EACFFF20A1F0842F8F7128960FB6F8946C +:10294000DEBF0FBECDBFDF91CF911F910F91FF90E2 +:10295000EF90DF90CF900C94C919FF2061F3842F82 +:102960008F7128960FB6F894DEBF0FBECDBFDF91F2 +:10297000CF911F910F91FF90EF90DF90CF900C942B +:10298000EA19FF2091F0842F8F7128960FB6F894E2 +:10299000DEBF0FBECDBFDF91CF911F910F91FF9092 +:1029A000EF90DF90CF900C94B41928960FB6F8945E +:1029B000DEBF0FBECDBFDF91CF911F910F91FF9072 +:1029C000EF90DF90CF900C94AA19FF20A1F0222362 +:1029D00009F4B1CF862F28960FB6F894DEBF0FBE4C +:1029E000CDBFDF91CF911F910F91FF90EF90DF90BE +:1029F000CF900C941611222309F4B1CF862F28967C +:102A00000FB6F894DEBF0FBECDBFDF91CF911F91FF +:102A10000F91FF90EF90DF90CF900C94DE114F70EC +:102A2000C8010E94510428960FB6F894DEBF0FBE6D +:102A3000CDBFDF91CF911F910F91FF90EF90DF906D +:102A4000CF900C94D1184F70C80128960FB6F89407 +:102A5000DEBF0FBECDBFDF91CF911F910F91FF90D1 +:102A6000EF90DF90CF900C94950728960FB6F894CE +:102A7000DEBF0FBECDBFDF91CF911F910F91FF90B1 +:102A8000EF90DF90CF9008950E945F1B0E946F1B14 +:102A90000E94341B0E948B1B0E949B200E94EF1FF0 +:102AA00080E090E00E94101080E090E00C942610EE +:102AB0000E944F1B0C9444150E947F1A292F2295C7 +:102AC0002F7030E02C3031054CF42A3031056CF495 +:102AD000225031092230310590F407C02C303105E5 +:102AE00051F02F30310539F00AC0803E10F0803FA0 +:102AF00031F481E0089593FB882780F9089580E000 +:102B00000895CF93DF9300D000D01F92CDB7DEB7EA +:102B10000F900F900F900F900F90DF91CF9108952D +:102B2000CF93DF9300D000D000D0CDB7DEB726968C +:102B30000FB6F894DEBF0FBECDBFDF91CF910895E1 +:102B40001F93CF93DF93C091790116E080917A01B2 +:102B5000C81799F0D0E01C9FF0011D9FF00D1124C3 +:102B6000E558FE4F40815181628173818481958156 +:102B70000E9490152196C770E9CFDF91CF911F91E8 +:102B800008954091AB015091AC016091AD017091FD +:102B9000AE018091AF019091B0010C949015CF934C +:102BA0008091B00182958F7009F05FC08091AD0176 +:102BB000882309F45AC020917901A0917A0160918B +:102BC000AB017091AC018091AE019091AF0131E009 +:102BD0006F3F09F030E0B32FC6E02A1709F445C073 +:102BE000009721F07F3F21F44B2F03C041E001C04B +:102BF00040E030E040FD35C0C29FF001C39FF00DC2 +:102C00001124E558FE4F418174132BC04081641399 +:102C100028C04281411125C043815481481759077A +:102C200010F441505109481B590B483C5105C8F458 +:102C30008091B0018F7080618093B00186E0829FA7 +:102C4000F001839FF00D1124E058FE4F80818F70BA +:102C5000806180838BEA91E00E943B12CF910C94BB +:102C6000A0152F5F3F4F2770B8CFCF910895CF9217 +:102C7000DF92EF92FF920F931F93CF93DF93CDB725 +:102C8000DEB762970FB6F894DEBF0FBECDBF8C01E2 +:102C900085E0F801DE011D9601900D928A95E1F71D +:102CA000D8014C9111965C91119712966C911297E4 +:102CB0001396ED90FC9014977091AB01E091AC01EC +:102CC0002091AE013091AF012115310531F0EF3F78 +:102CD00031F481E07F3F19F403C081E001C080E05E +:102CE000B82FB170CB2E80FD6CC1D090AD01DD202E +:102CF00009F4F5C0F091B001E216F30638F0C7010F +:102D0000821B930B883C910548F09BC02095309521 +:102D10002E0D3F1D283C310508F093C08F2F807F7A +:102D200009F052C0E51314C0741312C0D62E6111FD +:102D30000FC0FF70F061F093B0010E94C1158BEAE3 +:102D400091E00E943B128091B001F80185836CC133 +:102D5000EF2831F05F3F31F481E04F3F19F403C0B9 +:102D600081E001C080E080FD03C081E0862701C0D2 +:102D700080E0F82FF170FF2E80FF1CC08091790158 +:102D800020917A0136E0821709F428C190E0389F3B +:102D9000F001399FF00D1124E558FE4F7181571352 +:102DA00006C07081471303C07281671303C0019688 +:102DB0008770E9CFD62E662309F436C18091B00121 +:102DC00081608093B00153C0E51308C0741306C03E +:102DD000611104C0D8011596FC93AEC04D875E8783 +:102DE0008D859E856A8B0E945C156A89882329F1EE +:102DF000D62E662311F12091B001822F82958F701B +:102E000090E002970CF460C08091AB019091AC010E +:102E100098878F831986FB86EA862C87CE010796D2 +:102E200051C0E51731F14D875E878D859E856A8B90 +:102E30000E945C156A8981112EC0C8010E943B1254 +:102E4000A4C08F2F807F69F77E2DF98AE88A89894F +:102E50000E9481158BEA91E00E943B12EBEAF1E0BF +:102E600086E0DF011D928A95E9F70E94C115D12CF9 +:102E7000DBC07413D8CF6111D6CFD8011596FC935F +:102E8000C8010E943B12EBEAF1E086E0DF011D92EF +:102E90008A95E9F7C9C0D62E662379F22091B00150 +:102EA000822F82958F7090E0029774F08091AB0131 +:102EB0009091AC019A8389831B82FD82EC822E83E0 +:102EC000CE0101960E943B1286E0F801ABEAB1E028 +:102ED00001900D928A95E1F70E94CF156FC0E2161E +:102EE000F30628F0C701821B930B9C0104C02095B8 +:102EF00030952E0D3F1D283C310508F052C0D62ECE +:102F0000662309F49ACFE5132CC074132AC080916C +:102F1000B00180FD1DC0982F92959F70C9F0D80117 +:102F200015968C9315979F3039F09F5F9295907FFF +:102F30008F70892B15968C93C8010E943B1286E0F6 +:102F4000F801ABEAB1E001900D928A95E1F736C045 +:102F500086E0F801ABEAB1E001900D928A95E1F7C5 +:102F600063C04D875E878D859E850E945C15882392 +:102F700079F086E0F801ABEAB1E001900D928A9514 +:102F8000E1F70E94CF150E94C115DD24D3944CC0F7 +:102F90008091B00181608093B001C8010E943B1212 +:102FA00043C07E2DF98AE88A89890E948115EBEA5F +:102FB000F1E086E0DF011D928A95E9F70E94C115D4 +:102FC00033C0662309F439CF4D875E878D859E8592 +:102FD0000E945C15882309F430CFCBCF4D875E87E4 +:102FE0008D859E850E947F1A292F22952F7030E0B3 +:102FF000223031052CF49F7041F0811106C00CC0C5 +:10300000243031052CF49F7049F4805E883020F024 +:10301000C8010E943B12CF2CDC2C06C0D8011596AB +:103020009C91907F91F7F8CF8D2D62960FB6F89412 +:10303000DEBF0FBECDBFDF91CF911F910F91FF90EB +:10304000EF90DF90CF9008951F93CF93DF93CDB78C +:10305000DEB72C970FB6F894DEBF0FBECDBF4F83FF +:10306000588769877A878B879C87CE0107960E944D +:1030700037168823C1F02F8138858A859B85892B57 +:1030800031F03F3F11F080E003C02F3FE1F781E0D6 +:10309000811147C04F81588569857A858B859C85CC +:1030A0000E9490153EC086E0FE013796DE01119623 +:1030B00001900D928A95E1F7FF81E8854A855B854D +:1030C0004115510531F0EF3F31F481E0FF3F19F434 +:1030D00003C081E001C080E080FD23C020917A011F +:1030E00030E0C9010196877099276091790170E0FD +:1030F00086179707F1F1F983EA835D834C8396E0A5 +:10310000929FD001939FB00D1124A558BE4FFE0190 +:10311000319601900D929A95E1F780937A010E9481 +:10312000A01516E08091790190917A01891779F1C3 +:10313000189FC001112485589E4F0E94371688237E +:1031400031F1E09179011E9FF0011124E558FE4F05 +:103150004081518162817381848195810E949015A3 +:103160008091790190E00196877099278093790189 +:10317000D9CF0E94581510927A0110927901EBEA8A +:10318000F1E086E0DF011D928A95E9F7CACF2C961F +:103190000FB6F894DEBF0FBECDBFDF91CF911F9168 +:1031A0000895EF92FF920F931F93CF93DF93FC014B +:1031B000009709F46FC0F12CEE24E394EF012196FF +:1031C0008491843740F4843008F055C0813081F018 +:1031D000823021F15FC0853709F447C0C0F19CE718 +:1031E000980F903708F056C08F770E94DE1145C0C7 +:1031F0008F010E5F1F4FFE01849190E2980F98306F +:1032000050F48770FE2D01C0FF0F8A95EAF78F2FCB +:103210000E94621B15C00E94161114C08F010E5F20 +:103220001F4FFE01849190E2980F983068F48770E8 +:10323000FE2D01C0FF0F8A95EAF78F2F0E94681BB1 +:103240000E948B1BE80119C00E94DE11FBCFCF0149 +:103250000296FE01C491CC2361F0EFE9FFE03197C3 +:10326000F1F700C00000C150F6CFCF010296FE0179 +:10327000F490EC0102C00E9416118F2D882341F0BA +:10328000EFE9FFE03197F1F700C000008150F6CF81 +:10329000FE0194CFDF91CF911F910F91FF90EF909E +:1032A000089508956093B5017093B6018093B701B6 +:1032B0009093B8010C9444150F931F930091B5019E +:1032C0001091B6012091B7013091B801062B172B50 +:1032D000282B392B0093B5011093B6012093B70129 +:1032E0003093B8011F910F910C9444150F931F93C5 +:1032F0000091B5011091B6012091B7013091B8014C +:1033000006231723282339230093B5011093B60110 +:103310002093B7013093B8011F910F910C9444157D +:103320000F931F930091B5011091B6012091B70141 +:103330003091B80106271727282739270093B501B0 +:103340001093B6012093B7013093B8011F910F91EC +:103350000C9444151092B1011092B2011092B30175 +:103360001092B4010C94441541E050E060E070E02C +:1033700004C0440F551F661F771F8A95D2F74093EC +:10338000B1015093B2016093B3017093B4010C94F6 +:10339000441541E050E060E070E004C0440F551F68 +:1033A000661F771F8A95D2F78091B1019091B20183 +:1033B000A091B301B091B401842B952BA62BB72B10 +:1033C0008093B1019093B201A093B301B093B40183 +:1033D0000C94441541E050E060E070E004C0440FFC +:1033E000551F661F771F8A95D2F7409550956095B7 +:1033F00070958091B1019091B201A091B301B0910B +:10340000B40184239523A623B7238093B10190931D +:10341000B201A093B301B093B4010C94441541E000 +:1034200050E060E070E004C0440F551F661F771F36 +:103430008A95D2F78091B1019091B201A091B30128 +:10344000B091B40184279527A627B7278093B101AF +:103450009093B201A093B301B093B4010C944415BE +:103460000F931F930091B1011091B2012091B3010C +:103470003091B401062B172B282B392B0093B10167 +:103480001093B2012093B3013093B4011F910F91B7 +:103490000C9444150F931F930091B1011091B20148 +:1034A0002091B3013091B401062317232823392337 +:1034B0000093B1011093B2012093B3013093B40192 +:1034C0001F910F910C9444150F931F930091B1011C +:1034D0001091B2012091B3013091B4010627172752 +:1034E000282739270093B1011093B2012093B3012B +:1034F0003093B4011F910F910C9444150895CF920D +:10350000DF92EF92FF920F931F93CF93DF93EC0123 +:10351000C090B501D090B601E090B701F090B8012D +:103520008091B1019091B201A091B301B091B40129 +:10353000C82AD92AEA2AFB2A0FE110E0B701A6011E +:10354000002E04C076956795579547950A94D2F753 +:1035500040FF07C0BE01802F0E94B807813091054F +:1035600039F40150110950F7BE0180E00E94B807FC +:10357000DF91CF911F910F91FF90EF90DF90CF904F +:10358000089590910C019923D9F090910D01992300 +:10359000B9F0982F9695969596959F3088F5E0917D +:1035A0000E01F0910F01E90FF11D877021E030E06D +:1035B00001C0220F8A95EAF78181822B81830895C9 +:1035C00040910E0150910F0120E030E09FEFFA0191 +:1035D000E20FF31F6281681799F09F3F19F46111A0 +:1035E00001C0922F2F5F3F4F2E30310581F79F3F53 +:1035F00039F0FA01E90FF11D97FDFA9582830895DC +:10360000089590910C019923E1F090910D01992377 +:10361000C1F0982F9695969596959F3020F5E0915C +:103620000E01F0910F01E90FF11D877021E030E0EC +:1036300001C0220F8A95EAF72095818128232183F2 +:10364000089540910E0150910F0120E030E0FA0101 +:10365000E20FF31F9281981301C012822F5F3F4F38 +:103660002E303105A1F7089581E090E0E0910E0140 +:10367000F0910F01E80FF91F10820196803191053A +:10368000A9F708959091CC01982B9093CC010895BF +:1036900080959091CC0198239093CC01089510923D +:1036A000CC0108959091CB01982B9093CB01089574 +:1036B00080959091CB0198239093CB01089510921F +:1036C000CB0108959091CA01982B9093CA01089557 +:1036D00080959091CA0198239093CA010895109201 +:1036E000CA0108958093B90108951092B90108950F +:1036F00040910E0150910F0120E030E080E0FA018E +:10370000E20FF31F918191118F5F2F5F3F4F2F3099 +:103710003105A9F70895E0910E01F0910F01809114 +:10372000CC018083E0910E01F0910F018081909196 +:10373000CB01892B8083E0910E01F0910F018081F4 +:103740009091CA01892B80839091B901992361F0EE +:10375000E0910E01F0910F018081892B80830E94FE +:10376000781B81111092B90180910E0190910F0187 +:103770000C94FA0FCF92DF92EF92FF920F931F9368 +:103780006C01EE24FF24C114D104E104F10421F4FE +:103790006B017C0180E001C080E133272F2D1E2DBD +:1037A0000D2D011511052105310519F0885F6801FE +:1037B000790197018601A4E036952795179507951D +:1037C000AA95D1F7011511052105310519F08C5F76 +:1037D0006801790197018601F2E0369527951795E2 +:1037E0000795FA95D1F7011511052105310519F055 +:1037F0008E5F68017901B701A601769567955795A7 +:103800004795452B462B472B09F08F5F1F910F9152 +:10381000FF90EF90DF90CF9008958091E601843083 +:1038200009F11092CE0120E488E190E00FB6F894FF +:10383000A895809360000FBE2093600083B7817FBE +:10384000846083BF83B7816083BF7894889583B792 +:103850008E7F83BF88E10FB6F8948093600010924A +:1038600060000FBE089508950895CF930E94331C01 +:103870000E94E2050E94341CC0E08C2F0E94CF06FB +:10388000811105C0CF5FCE30C1F780E001C081E07B +:10389000CF9108950E9458150E94EE0F0C94F308E2 +:1038A00082E084BD93E095BD9AEF97BD80936E0052 +:1038B00008952FB7F8948091CF019091D001A091F5 +:1038C000D101B091D2012FBF0895CF92DF92EF9234 +:1038D000FF920F931F932FB7F8944091CF0150910F +:1038E000D0016091D1017091D2012FBF6A017B019B +:1038F000EE24FF248C0120E030E0C016D106E20661 +:10390000F30610F441505109481B590BCA011F918D +:103910000F91FF90EF90DF90CF9008951F920F923C +:103920000FB60F9211248F939F93AF93BF93809103 +:10393000CF019091D001A091D101B091D201019617 +:10394000A11DB11D8093CF019093D001A093D1010F +:10395000B093D201BF91AF919F918F910F900FBE05 +:103960000F901F9018950E94F40CF8942FEF87EA9F +:1039700091E6215080409040E1F700C0000087E0D0 +:1039800090EBDC018093EF019093F001A093F101A3 +:10399000B093F2012CE088E190E00FB6F894A8957E +:1039A000809360000FBE20936000FFCFEF92FF92E4 +:1039B0000F931F93CF93DF93E82EF12C8F2D0E944E +:1039C000CF06C0E0D0E0082F10E098010C2E02C016 +:1039D000359527950A94E2F720FD05C02196C6305B +:1039E000D10599F709C06C2F7F2D80E00E949607C2 +:1039F000E812F4CF81E005C0F3948EE0F812DECF38 +:103A000080E0DF91CF911F910F91FF90EF9008958B +:103A1000CF93C82F8CE20E94D61C882321F08C2FD4 +:103A2000CF910C94D61C80E0CF910895CF930E9443 +:103A30005B1E811102C00E94411EC5E6C15049F0C3 +:103A40000E94E2058FE39CE90197F1F700C00000B6 +:103A5000F5CF89E20E94081D811111C18AE20E94FE +:103A6000081D81110E94411E85E00E94081D8111E0 +:103A70000E94B31C0E94661E8093CD0187E00E94C5 +:103A8000081D882399F18BE10E94081D882351F0BD +:103A90009091CD0191FB882780F921E0822780FB5E +:103AA00091F922C08EE00E94081D882351F0909168 +:103AB000CD0192FB882780F921E0822780FB92F9D3 +:103AC00013C080E10E94081D9091CD01882341F030 +:103AD00093FB882780F921E0822780FB93F904C0BB +:103AE000892F809580FB90F99093CD018091CD0135 +:103AF0000E946A1E0E94781E8093E00180EE0E9460 +:103B0000081D882341F08091E001982F909590FB4B +:103B100080F98093E00189E30E94081D882359F011 +:103B20009091E00191FB882780F921E0822780FBBA +:103B300091F99093E00182EE0E94081D882359F0CC +:103B40009091E00192FB882780F921E0822780FB99 +:103B500092F99093E00186EE0E94081D882359F0A7 +:103B60009091E00193FB882780F921E0822780FB78 +:103B700093F99093E00183EE0E94081D882359F089 +:103B80009091E00194FB882780F921E0822780FB57 +:103B900094F99093E00185E30E94081D882359F071 +:103BA0009091E00195FB882780F921E0822780FB36 +:103BB00095F99093E00181E30E94081D882359F054 +:103BC0009091E00196FB882780F921E0822780FB15 +:103BD00096F99093E00181E10E94081D882359F035 +:103BE0009091E00197FB882780F921E0822780FBF4 +:103BF00097F99093E0018091E0010E947C1E8091F2 +:103C0000E00187FB882780F980930D0187E20E94FD +:103C1000081DC82F8EE10E94081D8111C2608FE12E +:103C20000E94081D8111C46080E20E94081D81115C +:103C3000C86081E20E94081D8111C06182E20E9479 +:103C4000081D8111C06283E20E94081D8111C064B9 +:103C500084E20E94081D882311F0C06802C0CC23B2 +:103C600029F08C2F0E94731E6C2F03C00E946F1EC0 +:103C7000682F70E080E090E0CF910C945219CF91C2 +:103C800008956DEE7EEF80E090E00E94972460E062 +:103C900082E090E00E94892460E083E090E00E944E +:103CA000892460E084E090E00E94892460E085E05F +:103CB00090E00C94892480E090E00E94832421E02D +:103CC0008D3E9E4F09F020E0822F089582E090E023 +:103CD0000C947B24682F82E090E00C94892483E08C +:103CE00090E00C947B24682F83E090E00C9489246E +:103CF00084E090E00C947B24682F84E090E00C94A6 +:103D000089248091D50180FF0BC06091130185E06B +:103D1000689FB001112475956795759567952AC0C0 +:103D200081FF09C06091130185E0689FB0011124F3 +:103D3000759567951FC082FF07C06091130185E0EC +:103D4000689FB001112416C04091D6014423C9F0E8 +:103D500060911201461788F72091130185E0289F92 +:103D600090011124429FC001439F900D112470E0E7 +:103D70000E944D246038710540F46115710539F0D9 +:103D800002C065E070E0862F08958FE7089581E016 +:103D900008958091D50180FF08C06091110170E005 +:103DA000759567957595679521C081FF06C06091EF +:103DB000110170E07595679519C082FF04C060918C +:103DC000110170E010C08091D6018823C1F060918C +:103DD00010018617A0F790911101989FC00111243E +:103DE00070E00E944D246038710528F4611571055A +:103DF00021F0862F08958FE7089581E0089561E00E +:103E000070E0F4CF803F21F40E94811E819504C0B0 +:103E1000813F29F40E94811E8093D9010895823F39 +:103E200021F40E94811E819504C0833F29F40E94E1 +:103E3000811E8093D8010895893F19F40E94C91EFC +:103E400005C08A3F31F40E94C91E81958093DA0132 +:103E500008958B3F21F40E94C91E819504C08C3FB8 +:103E600029F40E94C91E8093DB010895843F21F448 +:103E70008091D701816017C0853F21F48091D701DF +:103E8000826011C0863F21F48091D70184600BC00D +:103E9000873F21F48091D701886005C0883F31F4C5 +:103EA0008091D70180618093D70108958D3F21F4DF +:103EB0008091D50181600BC08E3F21F48091D501A6 +:103EC000826005C08F3F29F48091D5018460809382 +:103ED000D5010895803F39F48091D90187FF6CC0E6 +:103EE0001092D90169C0813F29F48091D901181637 +:103EF000BCF362C09091D801823F29F497FF5CC067 +:103F00001092D80159C0833F19F41916CCF354C04C +:103F1000893F41F48091DA0118160CF04DC01092DF +:103F2000DA014AC08A3F29F48091DA0187FF44C050 +:103F3000F6CF8B3F39F48091DB0187FF3DC01092B3 +:103F4000DB013AC08C3F29F48091DB011816BCF3E9 +:103F500033C0843F21F48091D7018E7F17C0853F05 +:103F600021F48091D7018D7F11C0863F21F480918B +:103F7000D7018B7F0BC0873F21F48091D701877FCA +:103F800005C0883F31F48091D7018F7E8093D7019F +:103F900013C08D3F21F48091D5018E7F0BC08E3FE1 +:103FA00021F48091D5018D7F05C08F3F29F4809148 +:103FB000D5018B7F8093D5018091D80181110EC0EE +:103FC0008091D90181110AC08091DA01811106C066 +:103FD0008091DB01811102C01092D601089587ED16 +:103FE00091E00E9405100E94591C9093D401809387 +:103FF000D30108951F93CF93DF938091D3019091C4 +:10400000D4010E94651C4091D601442321F02091E7 +:10401000140130E006C0209115015AE0259F90015F +:1040200011248217930708F482C08091D80110915F +:10403000D901D091DA01C091DB01811107C01111C2 +:1040400005C0D11103C0CC2309F471C04F3F19F052 +:104050004F5F4093D601181624F40E94811E80936E +:10406000D8018091D80187FF05C00E94811E8195EB +:104070008093D801111624F40E94811E8093D901E7 +:104080008091D90187FF05C00E94811E8195809390 +:10409000D9016091D801662339F11091D90111231A +:1040A00019F1772767FD7095872F972F0E945E2360 +:1040B00023E333E343E35FE30E94C2230E942B2305 +:1040C0006093D801612F772767FD7095872F972F11 +:1040D0000E945E2323E333E343E35FE30E94C223B2 +:1040E0000E942B236093D9011D1624F40E94C91E3F +:1040F0008093DA018091DA0187FF05C00E94C91E12 +:1041000081958093DA011C1624F40E94C91E8093C5 +:10411000DB018091DB0187FF05C00E94C91E8195EC +:104120008093DB01DF91CF911F910C94EF1FDF9102 +:10413000CF911F910895E7EDF1E085E0DF011D9239 +:104140008A95E9F71092D6011092D501089583302F +:1041500081F128F4813059F08230D1F00895853012 +:1041600009F449C0B8F1863009F456C00895209189 +:104170001501862F90E0820F911D8F3F910520F44D +:10418000620F6093150108958FEF809315010895D4 +:1041900020911401862F90E0820F911D8F3F910591 +:1041A00020F4620F6093140108958FEF809314013F +:1041B000089520911301862F90E0820F911D8F3F6B +:1041C000910520F4620F6093130108958FEF80939F +:1041D0001301089520911201862F90E0820F911D06 +:1041E0008F3F910520F4620F6093120108958FEFC5 +:1041F00080931201089520911101862F90E0820F83 +:10420000911D8F3F910520F4620F60931101089575 +:104210008FEF80931101089520911001862F90E077 +:10422000820F911D8F3F910520F4620F6093100162 +:1042300008958FEF809310010895833011F128F4D1 +:10424000813049F0823091F00895853081F120F17C +:104250008630C1F1089580911501681720F4861BFE +:10426000809315010895109215010895809114010D +:10427000681720F4861B809314010895109214018E +:10428000089580911301681720F4861B8093130111 +:10429000089510921301089580911201681720F477 +:1042A000861B809312010895109212010895809147 +:1042B0001101681720F4861B809311010895109254 +:1042C0001101089580911001681720F4861B8093D6 +:1042D000100108951092100108958D3109F442C023 +:1042E00020F58E3009F479C070F4873009F45EC08F +:1042F00020F4863009F442C033C08830D1F18B30CD +:1043000009F4A7C02DC0863109F4A3C038F4803168 +:1043100009F46DC0813109F47BC022C0893109F4F0 +:1043200098C08B3109F44FC01BC0853309F479C0A4 +:1043300048F4873209F475C008F478C0893209F46A +:1043400070C00EC0833438F48A3308F071C08833EB +:1043500009F47FC005C0833409F463C08834C1F018 +:1043600080E008950E94E5220E94EE0F0E94F3086B +:1043700070C00E94661E0E94781E6BC08091CD01A5 +:10438000817F8E7F8093CD0181E08093DD01089550 +:104390000E9458152FEF83ED90E32150804090400C +:1043A000E1F700C000000E94B31C53C09091CD0102 +:1043B000892F817090FF03C0917F9E7F26C09160FE +:1043C0009093CD0146C09091CD0191FB882780F953 +:1043D00021E0822780FB91F913C09091CD0192FBDF +:1043E000882780F921E0822780FB92F909C090910B +:1043F000CD0193FB882780F921E0822780FB93F988 +:104400009093CD01882329F191609093CD01089577 +:104410000E94581580910D0191E0892780930D012C +:1044200018C061E070E080E090E00FC023EE01C0B2 +:1044300027EC280F61E070E080E090E004C0660F98 +:10444000771F881F991F2A95D2F70E9452190E9440 +:10445000581581E0089580E0089580E00895CF9395 +:10446000C82F8091DD01813079F018F08230D1F1D0 +:1044700084C0A0910E01B0910F018C91813169F03F +:10448000823209F07CC009C0A0910E01B0910F01E9 +:104490008C91813111F0823249F48C2F0E942B22B1 +:1044A00081111DC08C2F0E946D211AC08C2F0E947B +:1044B0002D22811114C0C43179F048F4CB3079F049 +:1044C000C03109F060C082E08093DD0108C0C932CC +:1044D00019F0C83321F057C01092DD0154C081E0BB +:1044E000817053C0C93289F118F5C43171F1A8F453 +:1044F000C73009F046C08AE08093150194E190939B +:10450000140193E0909313018093120188E080934B +:10451000110188E28093100134C0CE51C63088F575 +:10452000EC2FF0E0E65DFE4F80818093DC0129C036 +:10453000CE34E9F020F4CB3421F56AE013C0C13564 +:1045400079F0C235F1F461E00DC08091DC0188237F +:1045500019F01092DC0115C081E08093DD0115C0D7 +:1045600061E006C08091DC010E94A7200AC06AE0D9 +:104570008091DC010E941D2104C01092DD0180E0C9 +:1045800004C081E002C080E0ABCFCF910895E1E8A4 +:10459000F0E08081886080838081816080838FB734 +:1045A000F89493E09093890090ED909388008FBFEA +:1045B0000895EFE6F0E08081826080830895EFE661 +:1045C000F0E080818D7F80830895EFE6F0E08081C8 +:1045D00092E08927808308951F920F920FB60F9261 +:1045E00011242F933F934F935F936F937F938F93F8 +:1045F0009F93AF93BF93EF93FF938091DE019091D0 +:10460000DF0101969093DF018093DE01811103C0E9 +:1046100082E00E94F308E091DF01E695E695F0E084 +:10462000EA52F84FE4918091DE018E1303C080E0DE +:104630000E94F308FF91EF91BF91AF919F918F91ED +:104640007F916F915F914F913F912F910F900FBE8E +:104650000F901F90189504D06894B1118DC00895E3 +:1046600070D088F09F5790F0B92F9927B751A0F0DC +:10467000D1F0660F771F881F991F1AF0BA95C9F7F6 +:1046800012C0B13081F077D0B1E0089574C0672FC7 +:10469000782F8827B85F39F0B93FCCF386957795A6 +:1046A0006795B395D9F73EF490958095709561958F +:1046B0007F4F8F4F9F4F0895E89409C097FB3EF4BA +:1046C00090958095709561957F4F8F4F9F4F99235F +:1046D000A9F0F92F96E9BB279395F69587957795DD +:1046E0006795B795F111F8CFFAF4BB0F11F460FF9D +:1046F0001BC06F5F7F4F8F4F9F4F16C0882311F0F5 +:1047000096E911C0772321F09EE8872F762F05C008 +:10471000662371F096E8862F70E060E02AF09A95A3 +:10472000660F771F881FDAF7880F9695879597F998 +:10473000089557FD9058440F551F59F05F3F71F091 +:104740004795880F97FB991F61F09F3F79F08795F8 +:104750000895121613061406551FF2CF4695F1DF81 +:1047600008C0161617061806991FF1CF8695710511 +:10477000610508940895E894BB2766277727CB0145 +:1047800097F908950BD078C069D028F06ED018F052 +:10479000952309F05AC05FC01124EECFCADFA0F301 +:1047A000959FD1F3950F50E0551F629FF001729FC6 +:1047B000BB27F00DB11D639FAA27F00DB11DAA1FE5 +:1047C000649F6627B00DA11D661F829F2227B00D32 +:1047D000A11D621F739FB00DA11D621F839FA00DBD +:1047E000611D221F749F3327A00D611D231F849F0D +:1047F000600D211D822F762F6A2F11249F57504064 +:104800008AF0E1F088234AF0EE0FFF1FBB1F661FFE +:10481000771F881F91505040A9F79E3F510570F0B7 +:1048200014C0AACF5F3FECF3983EDCF386957795F2 +:104830006795B795F795E7959F5FC1F7FE2B880FB2 +:10484000911D9695879597F9089597F99F6780E848 +:1048500070E060E008959FEF80EC089500240A94D2 +:104860001616170618060906089500240A9412164B +:104870001306140605060895092E0394000C11F47E +:10488000882352F0BB0F40F4BF2B11F460FF04C02B +:104890006F5F7F4F8F4F9F4F089597FB072E16F442 +:1048A000009407D077FD09D00E94672407FC05D04B +:1048B0003EF4909581959F4F0895709561957F4F37 +:1048C0000895EE0FFF1F0590F491E02D0994AA1BA7 +:1048D000BB1B51E107C0AA1FBB1FA617B70710F0EB +:1048E000A61BB70B881F991F5A95A9F7809590951D +:1048F000BC01CD010895F999FECF92BD81BDF89A12 +:10490000992780B50895A8E1B0E042E050E00C940A +:104910009E24262FF999FECF1FBA92BD81BD20BDDE +:104920000FB6F894FA9AF99A0FBE019608950E946C +:104930008924272F0C948A24DC01CB01FC01F999EE +:10494000FECF06C0F2BDE1BDF89A319600B40D92DB +:0C49500041505040B8F70895F894FFCF94 +:10495C002002F50882095F092B09F8080101BA0148 +:10496C0028080A03140A3F4D363997074A071407DB +:10497C00DB066E068706A006B906010203040506CF +:04498C00070809000F :00000001FF diff --git a/keyboard/ergodox_ez/keymaps/ordinary/readme.md b/keyboard/ergodox_ez/keymaps/ordinary/readme.md index 6534f481a1..b1aaed6980 100644 --- a/keyboard/ergodox_ez/keymaps/ordinary/readme.md +++ b/keyboard/ergodox_ez/keymaps/ordinary/readme.md @@ -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). 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. There is also a feature of the Ordinary Layout to lock the keys onto a layer: hold down the Shift Lock key then press a Shift key and -- just like traditional Caps Lock -- the keys will remain in the shifted state. 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, although internally they are different. Due to these differences, 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. When you depress the Shift Lock key it will illuminate the LEDs corresponding to the layers available, so if you are on the base layer or the Capitals layer or the Symbols layer, then all three LEDs will light up, but if you are on the Media layer then only the Capitals and Media layers will light up. + +## 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. -- cgit v1.2.3 From 96f75f39c8dfbd9d84d1a6ceb0b2db0ce5cc52bf Mon Sep 17 00:00:00 2001 From: Nicholas Keene Date: Mon, 11 Apr 2016 23:28:16 -0500 Subject: The Ordinary Layout is the layout you are looking for. Come and see. --- keyboard/ergodox_ez/keymaps/ordinary/keymap.c | 91 +- keyboard/ergodox_ez/keymaps/ordinary/ordinary.hex | 2214 +++++++++++---------- keyboard/ergodox_ez/keymaps/ordinary/readme.md | 4 +- 3 files changed, 1180 insertions(+), 1129 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/ordinary/keymap.c b/keyboard/ergodox_ez/keymaps/ordinary/keymap.c index 07a1e5e899..63cf8c0c88 100644 --- a/keyboard/ergodox_ez/keymaps/ordinary/keymap.c +++ b/keyboard/ergodox_ez/keymaps/ordinary/keymap.c @@ -3,14 +3,15 @@ #include "debug.h" #include "action_layer.h" -#define BASE 0 // default layer -#define LOCK 1 // layer lock 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 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 // topmost escape +#define MDIA_XX 7 // media exit layer +#define UNLOCK 8 // clear to base layer /* * Ordinary Ergodox EZ keyboard layout, v3 @@ -133,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [SYMB_MO] = KEYMAP( // left hand - KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_TRNS + 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 @@ -142,7 +143,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_UP ,KC_SPC ,KC_ENT ,KC_DOWN // right hand - ,KC_TRNS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS + ,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 @@ -177,7 +178,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 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) -,KC_NO ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV +,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 @@ -186,7 +187,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 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 ,KC_NO + ,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 @@ -259,18 +260,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [MDIA_MO] = KEYMAP( // left hand - KC_TRNS ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,KC_TRNS + 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 -,KC_NO ,KC_SLEP ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_TRNS +,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_F16 ,KC_F17 ,KC_F18 ,KC_F19 ,KC_F20 ,KC_TRNS + ,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 ,KC_NO + ,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 @@ -302,7 +303,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MDIA_TG] = KEYMAP( // left hand MO(MDIA_XX) ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,KC_TRNS -,KC_NO ,KC_POWER,KC_TRNS ,KC_MS_U ,KC_TRNS ,KC_TRNS ,KC_WH_U +,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 @@ -311,7 +312,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,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 ,KC_NO + ,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 @@ -360,6 +361,51 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,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 22: 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 @@ -367,7 +413,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_CLEAR(ON_PRESS) // FN1 - clear to base layer + [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 }; @@ -396,21 +442,16 @@ void matrix_init_user(void) { void matrix_scan_user(void) { 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(); - // lock layer turns on all lights - if(layer == LOCK || layer == SYMB_XX) { - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); - } else if(layer == MDIA_XX) { - ergodox_right_led_1_on(); - ergodox_right_led_3_on(); - } - // caps lock turns on red light if(host_keyboard_leds() & (1< Date: Mon, 11 Apr 2016 23:34:41 -0500 Subject: The Ordinary Layout is the layout you are looking for. Come and see. --- keyboard/ergodox_ez/keymaps/ordinary/keymap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/ordinary/keymap.c b/keyboard/ergodox_ez/keymaps/ordinary/keymap.c index 63cf8c0c88..3a999f2665 100644 --- a/keyboard/ergodox_ez/keymaps/ordinary/keymap.c +++ b/keyboard/ergodox_ez/keymaps/ordinary/keymap.c @@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_TRNS ,KC_TRNS ,KC_TRNS ), -/* Keymap 10: Symbol Momentary Layer +/* Keymap 2: Symbol Momentary Layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | @@ -153,7 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_PGDN ,KC_BSPC ,KC_DEL ), -/* Keymap 11: Symbol Lock Layer +/* Keymap 3: Symbol Lock Layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. * | Lock | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | Lock | @@ -195,7 +195,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_PGDN ,KC_BSPC ,KC_DEL ), -/* Keymap 12: Symbol Unlock Layer +/* Keymap 4: Symbol Unlock Layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. * | | Esc | | | | | | | | | | | | | | @@ -237,7 +237,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_TRNS ,KC_TRNS ,KC_TRNS ), -/* Keymap 20: Media and mouse keys +/* Keymap 5: Media Momentary Layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. * | | F11 | F12 | F13 | F14 | F15 | | | | F16 | F17 | F18 | F19 | F20 | | @@ -279,7 +279,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_VOLD ,KC_MSTP ,KC_MPLY ), -/* Keymap 21: Media Lock Layer +/* Keymap 6: Media Lock Layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. * | | F11 | F12 | F13 | F14 | F15 | | | | F16 | F17 | F18 | F19 | F20 | | @@ -321,7 +321,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_VOLD ,KC_MSTP ,KC_MPLY ), -/* Keymap 22: Media Unlock Layer +/* Keymap 7: Media Unlock Layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. * | | Esc | | | | | | | | | | | | | | @@ -366,7 +366,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_TRNS ,KC_TRNS ,KC_TRNS ), -/* Keymap 22: Unlock Layer +/* Keymap 8: Unlock Layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. * | Unlock | | | | | | | | | | | | | | Unlock | @@ -413,7 +413,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_CLEAR(ON_PRESS) // FN1 - clear to base layer + [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 }; -- cgit v1.2.3 From 5ef6978cab7de2821eb6bfce4fd04067655a8937 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 12 Apr 2016 06:55:26 -0500 Subject: Adding personal files --- keyboard/planck/Makefile | 4 +- keyboard/planck/config.h | 2 +- keyboard/planck/keymaps/pc.c | 132 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 135 insertions(+), 3 deletions(-) create mode 100644 keyboard/planck/keymaps/pc.c diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index 03d2601761..17e5cd45cc 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -137,8 +137,8 @@ CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration # 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 +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 diff --git a/keyboard/planck/config.h b/keyboard/planck/config.h index d3719e0cb1..d435cc795c 100644 --- a/keyboard/planck/config.h +++ b/keyboard/planck/config.h @@ -76,7 +76,7 @@ along with this program. If not, see . #define NO_DEBUG /* disable print */ -#define NO_PRINT +//#define NO_PRINT /* disable action features */ //#define NO_ACTION_LAYER diff --git a/keyboard/planck/keymaps/pc.c b/keyboard/planck/keymaps/pc.c new file mode 100644 index 0000000000..f8254fd46b --- /dev/null +++ b/keyboard/planck/keymaps/pc.c @@ -0,0 +1,132 @@ +// 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" +#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 + +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 | |Raise | Space |Lower | / | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QW] = { + {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_UP, KC_ENT }, + {KC_LCTL, KC_LGUI, KC_LALT, KC_NO, MO(_LW), KC_SPC, KC_SPC, MO(_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_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, KC_NO, KC_NO, KC_NO, 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 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 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_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, KC_NO, KC_NO, KC_NO, 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} +} +}; + +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; +}; -- cgit v1.2.3 From ff06eaf8537e5f6ab1489c77a6147531c57bb538 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 12 Apr 2016 08:17:02 -0500 Subject: Added del --- keyboard/planck/keymaps/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/planck/keymaps/pc.c b/keyboard/planck/keymaps/pc.c index f8254fd46b..0adee8b2e4 100644 --- a/keyboard/planck/keymaps/pc.c +++ b/keyboard/planck/keymaps/pc.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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_UP, KC_ENT }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_NO, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} + {KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} }, /* Colemak -- cgit v1.2.3 From 3a601e76e4efdd6dd42e02146fd52d8ede979756 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 13 Apr 2016 14:43:09 -0500 Subject: Adding PC Atomic --- keyboard/atomic/Makefile | 7 +- keyboard/atomic/config.h | 93 ++++++++++++++++++++++++--- keyboard/atomic/keymaps/default.c | 124 ++++++++++++++++++++---------------- keyboard/atomic/keymaps/pc_atomic.c | 75 ++++++++++++++++++++++ 4 files changed, 231 insertions(+), 68 deletions(-) create mode 100644 keyboard/atomic/keymaps/pc_atomic.c diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile index da6d0ac60c..95554ea89d 100644 --- a/keyboard/atomic/Makefile +++ b/keyboard/atomic/Makefile @@ -115,14 +115,14 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # comment out to disable the options. # BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +#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 # 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 +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 @@ -137,4 +137,3 @@ VPATH += $(TOP_DIR) VPATH += $(TMK_DIR) include $(TOP_DIR)/quantum/quantum.mk - diff --git a/keyboard/atomic/config.h b/keyboard/atomic/config.h index 149aed4714..e28fa18c07 100644 --- a/keyboard/atomic/config.h +++ b/keyboard/atomic/config.h @@ -32,36 +32,109 @@ along with this program. If not, see . #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 diff --git a/keyboard/atomic/keymaps/default.c b/keyboard/atomic/keymaps/default.c index f37d9d9a51..d62e5c2445 100644 --- a/keyboard/atomic/keymaps/default.c +++ b/keyboard/atomic/keymaps/default.c @@ -1,60 +1,76 @@ #include "atomic.h" +#define _QW 0 +#define _CM 1 +#define _DV 2 +#define _LW 3 +#define _RS 4 + +// ROW 1 OPTIONS +// .--------------------------------------------------------------------------------------------------------------------------------------. +// | | | | | | | | | | | | | | | | +// '--------------------------------------------------------------------------------------------------------------------------------------' +// .- 2u ------------. +// | X | +// '-----------------' + +// ROW 2 OPTIONS +// .--------------------------------------------------------------------------------------------------------------------------------------. +// | | | | | | | | | | | | | | | | +// '--------------------------------------------------------------------------------------------------------------------------------------' +// .- 2u ------------. .- 2u ------------. +// | X | | X | +// '-----------------' '-----------------' + +// ROW 3 OPTIONS +// .--------------------------------------------------------------------------------------------------------------------------------------. +// | | | | | | | | | | | | | | | | +// '--------------------------------------------------------------------------------------------------------------------------------------' +// .- 2u ------------. .- 2u ------------. +// | X | | X | +// '-----------------' '-----------------' +// .- 2u ------------. +// | X | +// '-----------------' + +// ROW 4 OPTIONS +// .--------------------------------------------------------------------------------------------------------------------------------------. +// | | | | | | | | | | | | | | | | +// '--------------------------------------------------------------------------------------------------------------------------------------' +// .- 2u ------------. +// | X | +// '-----------------' +// .- 2u ------------. .- 2u ------------. +// | X | | X | +// '-----------------' '-----------------' +// .- 2u ------------. +// | X | +// '-----------------' + +// 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 │ -// └─────────────────┘ - { 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 │ -// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ + [_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_DEL }, + { 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_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 }, + { 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 }, + { 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 }, } }; diff --git a/keyboard/atomic/keymaps/pc_atomic.c b/keyboard/atomic/keymaps/pc_atomic.c new file mode 100644 index 0000000000..2792ff6e73 --- /dev/null +++ b/keyboard/atomic/keymaps/pc_atomic.c @@ -0,0 +1,75 @@ +#include "atomic.h" + +#define _QW 0 +#define _LW 1 +#define _RS 2 +#define _FN 3 + +#define _______ 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 */ + [0] = { /* 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, XXXXXXX, 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 }, + { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_PGUP }, + { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, KC_UP, KC_PGDN }, + { KC_LCTL, KC_LGUI, MO(_FN), KC_LALT, MO(_RS), XXXXXXX, KC_SPC, MO(_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, KC_PSCR, KC_PAUS }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + [_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, KC_PSCR, KC_PAUS }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + [_FN] = { /* FUNCTION */ + { 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, KC_PSCR, KC_PAUS }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, +}; + +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) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + return MACRODOWN(TYPE(KC_T), END); + break; + } + return MACRO_NONE; +}; -- cgit v1.2.3 From 02a3d77940d9b9dcf3af3e8ca9672145155fbfe6 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Wed, 13 Apr 2016 22:24:42 +0200 Subject: Optimize source_layers_cache for the cache memory Swapping the array indices should increase the locality of the memory access. --- tmk_core/common/action_layer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index fc721a7323..e817c0d515 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -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; } -- cgit v1.2.3 From caf3e48de8b29aa21343301dd22ce425e8f7c3ba Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 13 Apr 2016 17:40:16 -0500 Subject: LOCAL COMMIT LOCAL COMMIT --- keyboard/atomic/Makefile | 24 +-- keyboard/atomic/config.h | 95 ++--------- keyboard/atomic/keymaps/default.c | 283 +++++++++++++++++++++++-------- keyboard/atomic/keymaps/pc_atomic.c | 37 ++-- keyboard/planck/keymaps/default/keymap.c | 16 +- 5 files changed, 263 insertions(+), 192 deletions(-) diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile index 95554ea89d..17baeaf536 100644 --- a/keyboard/atomic/Makefile +++ b/keyboard/atomic/Makefile @@ -114,19 +114,19 @@ 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 -# 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 +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 # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax diff --git a/keyboard/atomic/config.h b/keyboard/atomic/config.h index e28fa18c07..11c0e848e1 100644 --- a/keyboard/atomic/config.h +++ b/keyboard/atomic/config.h @@ -32,109 +32,36 @@ along with this program. If not, see . #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) - * -*/ +// Planck PCB default pin-out +// Change this to how you wired your keyboard +// COLS: Left to right, ROWS: Top to bottom #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 -/* 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 if matrix has ghost */ //#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 -/* - * 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 */ +/* key combination for 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 @@ -154,4 +81,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +#define MAGIC_KEY_BOOTLOADER B + #endif diff --git a/keyboard/atomic/keymaps/default.c b/keyboard/atomic/keymaps/default.c index d62e5c2445..4ed8a71f15 100644 --- a/keyboard/atomic/keymaps/default.c +++ b/keyboard/atomic/keymaps/default.c @@ -1,95 +1,234 @@ #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 4 -// ROW 1 OPTIONS -// .--------------------------------------------------------------------------------------------------------------------------------------. -// | | | | | | | | | | | | | | | | -// '--------------------------------------------------------------------------------------------------------------------------------------' -// .- 2u ------------. -// | X | -// '-----------------' +/* 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 2 OPTIONS -// .--------------------------------------------------------------------------------------------------------------------------------------. -// | | | | | | | | | | | | | | | | -// '--------------------------------------------------------------------------------------------------------------------------------------' -// .- 2u ------------. .- 2u ------------. -// | X | | X | -// '-----------------' '-----------------' +/* 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 | + * '----------------------------------------------------------------------------------------------------------------' + */ -// ROW 3 OPTIONS -// .--------------------------------------------------------------------------------------------------------------------------------------. -// | | | | | | | | | | | | | | | | -// '--------------------------------------------------------------------------------------------------------------------------------------' -// .- 2u ------------. .- 2u ------------. -// | X | | X | -// '-----------------' '-----------------' -// .- 2u ------------. -// | X | -// '-----------------' +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -// ROW 4 OPTIONS -// .--------------------------------------------------------------------------------------------------------------------------------------. -// | | | | | | | | | | | | | | | | -// '--------------------------------------------------------------------------------------------------------------------------------------' -// .- 2u ------------. -// | X | -// '-----------------' -// .- 2u ------------. .- 2u ------------. -// | X | | X | -// '-----------------' '-----------------' -// .- 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 }, + { 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 }, + { 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 }, + }, -// 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 | -// '----------------------------------------------------------------------------------------------------------------' +/* 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 | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_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_DEL }, - { 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_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 }, - { 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 }, - { 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 }, - } + [_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 ------------+--------| + * | | | | | | | | | | | | | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | | | | | | | | | | | 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_INS }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + +/* RAISED + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | | | | | | | | | | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | | | | | | | | | | | | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | | | | | | | | | | | 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_INS }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___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/pc_atomic.c b/keyboard/atomic/keymaps/pc_atomic.c index 2792ff6e73..1c0425a76d 100644 --- a/keyboard/atomic/keymaps/pc_atomic.c +++ b/keyboard/atomic/keymaps/pc_atomic.c @@ -23,34 +23,33 @@ */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -// [_QW] = { /* QWERTY */ - [0] = { /* 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, XXXXXXX, KC_BSPC }, + [_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, XXXXXXX, KC_ENT, KC_PGUP }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, KC_UP, KC_PGDN }, - { KC_LCTL, KC_LGUI, MO(_FN), KC_LALT, MO(_RS), XXXXXXX, KC_SPC, MO(_LW), KC_RALT, KC_HOME, KC_END, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, + { 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, MO(_FN), KC_LALT, MO(_RS), KC_SPC, XXXXXXX, MO(_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, KC_PSCR, KC_PAUS }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { 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, KC_PSCR, KC_PAUS }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { 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_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, KC_PSCR, KC_PAUS }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { 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(_CM), DF(_DV), _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D }, + { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, }, }; diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index 988deee99d..f1c7b56102 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c @@ -16,6 +16,10 @@ #define _LW 3 #define _RS 4 +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -85,9 +89,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_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_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_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, DF(_QW), DF(_CM), DF(_DV), RESET, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, /* Lower @@ -103,9 +107,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_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} + {_______, 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, DF(_QW), DF(_CM), DF(_DV), RESET, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} } }; -- cgit v1.2.3 From 390fd3107a84277151ceb63255c859307221a290 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 13 Apr 2016 18:48:25 -0500 Subject: local files local files --- keyboard/planck/config.h | 2 +- keyboard/planck/keymaps/pc.c | 40 +++++++++++++++++++++++++++++++++------- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/keyboard/planck/config.h b/keyboard/planck/config.h index d435cc795c..7d64f09773 100644 --- a/keyboard/planck/config.h +++ b/keyboard/planck/config.h @@ -73,7 +73,7 @@ along with this program. If not, see . */ /* disable debug print */ -#define NO_DEBUG +//#define NO_DEBUG /* disable print */ //#define NO_PRINT diff --git a/keyboard/planck/keymaps/pc.c b/keyboard/planck/keymaps/pc.c index 0adee8b2e4..ed062609f4 100644 --- a/keyboard/planck/keymaps/pc.c +++ b/keyboard/planck/keymaps/pc.c @@ -15,6 +15,14 @@ #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] = { @@ -26,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | |Raise | Space |Lower | / | Left | Down |Right | + * | Ctrl | GUI | Alt | Del |Raise | Space |Lower | / | Left | Down |Right | * `-----------------------------------------------------------------------------------' */ [_QW] = { @@ -85,9 +93,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_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_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, KC_NO, KC_NO, KC_NO, 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_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, _______}, + {_______, _______, _______, _______, MO(_FN), _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, /* Lower @@ -103,9 +111,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_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, KC_NO, KC_NO, KC_NO, 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_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, _______}, + {_______, _______, _______, _______, _______, _______, _______, MO(_FN), 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} } }; -- cgit v1.2.3 From 3755ef5ddbdad9f25a53fee951c3eb78035b52c3 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 13 Apr 2016 20:57:51 -0500 Subject: Compiler Warnings / Atomic TLC Corrected compiler warnings for a number of issues. Gave Atomic some TLC. --- keyboard/atomic/Makefile | 4 +- keyboard/atomic/atomic.h | 3 ++ keyboard/atomic/backlight.c | 2 + keyboard/atomic/config.h | 95 ++++++++++++++++++++++++++++++++----- keyboard/atomic/keymaps/default.c | 26 +++++----- keyboard/atomic/keymaps/pc_atomic.c | 3 +- quantum/keymap_common.c | 6 ++- quantum/keymap_common.h | 2 - quantum/keymap_midi.h | 2 +- tmk_core/common/action_code.h | 2 +- tmk_core/common/keymap.c | 3 +- 11 files changed, 113 insertions(+), 35 deletions(-) diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile index 17baeaf536..2b017446dc 100644 --- a/keyboard/atomic/Makefile +++ b/keyboard/atomic/Makefile @@ -120,13 +120,13 @@ 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 # USB Nkey Rollover - not yet supported in LUFA -#BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +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 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax diff --git a/keyboard/atomic/atomic.h b/keyboard/atomic/atomic.h index d8574efa93..d5461e424d 100644 --- a/keyboard/atomic/atomic.h +++ b/keyboard/atomic/atomic.h @@ -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 diff --git a/keyboard/atomic/backlight.c b/keyboard/atomic/backlight.c index f69364b2af..647b57e718 100644 --- a/keyboard/atomic/backlight.c +++ b/keyboard/atomic/backlight.c @@ -1,6 +1,8 @@ #include #include "backlight.h" +#include "atomic.h" + #define CHANNEL OCR1C diff --git a/keyboard/atomic/config.h b/keyboard/atomic/config.h index 11c0e848e1..f30a9e6cc4 100644 --- a/keyboard/atomic/config.h +++ b/keyboard/atomic/config.h @@ -32,36 +32,109 @@ along with this program. If not, see . #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 PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z /* * Feature disable options @@ -81,6 +154,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#define MAGIC_KEY_BOOTLOADER B - #endif diff --git a/keyboard/atomic/keymaps/default.c b/keyboard/atomic/keymaps/default.c index 4ed8a71f15..0ede363a1f 100644 --- a/keyboard/atomic/keymaps/default.c +++ b/keyboard/atomic/keymaps/default.c @@ -11,7 +11,7 @@ #define _DV 2 #define _LW 3 #define _RS 4 -#define _FN 4 +#define _FN 5 /* ROW 1 OPTIONS * .--------------------------------------------------------------------------------------------------------------------------------------. @@ -148,11 +148,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | | | | | | | | | | | | | | INS | + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | | | | | | | | | | | | | XXXXXX . | | + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | | | | | | | | | | | XXXXXX . | | | + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| * | | | | | | XXXXXX . | | | | | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' @@ -160,9 +160,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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_INS }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___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___, _______, _______ }, { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, }, @@ -170,11 +170,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | | | | | | | | | | | | | | INS | + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | | | | | | | | | | | | | XXXXXX . | | + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | | | | | | | | | | | XXXXXX . | | | + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| * | | | | | | XXXXXX . | | | | | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' @@ -182,9 +182,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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_INS }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___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___, _______, _______ }, { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, }, diff --git a/keyboard/atomic/keymaps/pc_atomic.c b/keyboard/atomic/keymaps/pc_atomic.c index 1c0425a76d..bdf575046b 100644 --- a/keyboard/atomic/keymaps/pc_atomic.c +++ b/keyboard/atomic/keymaps/pc_atomic.c @@ -6,6 +6,7 @@ #define _FN 3 #define _______ KC_TRNS +#define ___T___ KC_TRNS #define XXXXXXX KC_NO /* @@ -48,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { 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(_CM), DF(_DV), _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D }, { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, }, }; diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 2eef4f15a7..ae6cddb343 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -87,6 +87,7 @@ action_t action_for_key(uint8_t layer, keypos_t key) return action; #endif } else if (keycode == RESET) { // RESET is 0x5000, which is why this is here + action_t action; clear_keyboard(); #ifdef AUDIO_ENABLE play_notes(&goodbye, 5, false); @@ -96,12 +97,13 @@ action_t action_for_key(uint8_t layer, keypos_t key) *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific #endif bootloader_jump(); - return; + return action; } else if (keycode == DEBUG) { // DEBUG is 0x5001 // TODO: Does this actually work? + action_t action; print("\nDEBUG: enabled.\n"); debug_enable = true; - return; + return action; } else if (keycode >= 0x5000 && keycode < 0x6000) { // Layer movement shortcuts // See .h to see constraints/usage diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h index 3db40772e0..4a877d2a70 100644 --- a/quantum/keymap_common.h +++ b/quantum/keymap_common.h @@ -184,8 +184,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) diff --git a/quantum/keymap_midi.h b/quantum/keymap_midi.h index a89420ce2a..436fb2eb50 100644 --- a/quantum/keymap_midi.h +++ b/quantum/keymap_midi.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include -#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/tmk_core/common/action_code.h b/tmk_core/common/action_code.h index 4fe9c1d581..2b0b0b077e 100644 --- a/tmk_core/common/action_code.h +++ b/tmk_core/common/action_code.h @@ -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 */ diff --git a/tmk_core/common/keymap.c b/tmk_core/common/keymap.c index 11f4aa8aaa..8955fc710d 100644 --- a/tmk_core/common/keymap.c +++ b/tmk_core/common/keymap.c @@ -22,7 +22,7 @@ along with this program. If not, see . #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 -- cgit v1.2.3 From 9ff9317720d4fcee6b35800f71d598f9a59de661 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 13 Apr 2016 21:55:04 -0500 Subject: Corrected spacing. --- keyboard/planck/Makefile | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index 17e5cd45cc..ae637fc295 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -130,20 +130,22 @@ 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 +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 # 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 = ye # 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. + # 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. +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend + ifdef BACKLIGHT_ENABLE SRC += backlight.c -- cgit v1.2.3 From aa9eaa97730d9dea730e74b6d5a01bc344af9bfd Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 13 Apr 2016 21:56:27 -0500 Subject: Corrected spacing. --- keyboard/atomic/Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile index 2b017446dc..20cf4fff18 100644 --- a/keyboard/atomic/Makefile +++ b/keyboard/atomic/Makefile @@ -114,19 +114,19 @@ 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 -#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 +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 # 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 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax -- cgit v1.2.3 From 95a44cdf01a98180363e8039d769fa7be92b0194 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 13 Apr 2016 22:00:36 -0500 Subject: Disabled print. --- keyboard/planck/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard/planck/config.h b/keyboard/planck/config.h index 7d64f09773..d3719e0cb1 100644 --- a/keyboard/planck/config.h +++ b/keyboard/planck/config.h @@ -73,10 +73,10 @@ along with this program. If not, see . */ /* disable debug print */ -//#define NO_DEBUG +#define NO_DEBUG /* disable print */ -//#define NO_PRINT +#define NO_PRINT /* disable action features */ //#define NO_ACTION_LAYER -- cgit v1.2.3 From 2900b4884598b06ed59371c48ecea9d3f0bff5ac Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 13 Apr 2016 22:04:44 -0500 Subject: Added parenthesis to midi macro. --- quantum/keymap_midi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/keymap_midi.h b/quantum/keymap_midi.h index 436fb2eb50..795f26380e 100644 --- a/quantum/keymap_midi.h +++ b/quantum/keymap_midi.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include -#define MIDI(n) (n | 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)) -- cgit v1.2.3 From 44e4320b2ea508d75f28cb6796f6cf414164564b Mon Sep 17 00:00:00 2001 From: IBNobody Date: Thu, 14 Apr 2016 06:34:56 -0500 Subject: Nightly --- keyboard/planck/keymaps/pc.c | 71 +++++++++++++++++++++++++++++++++----------- 1 file changed, 53 insertions(+), 18 deletions(-) diff --git a/keyboard/planck/keymaps/pc.c b/keyboard/planck/keymaps/pc.c index ed062609f4..20bb5d86d7 100644 --- a/keyboard/planck/keymaps/pc.c +++ b/keyboard/planck/keymaps/pc.c @@ -2,6 +2,8 @@ // 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 @@ -38,10 +40,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QW] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {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, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT} + {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 @@ -95,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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, _______}, - {_______, _______, _______, _______, MO(_FN), _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, /* Lower @@ -113,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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, _______}, - {_______, _______, _______, _______, _______, _______, _______, MO(_FN), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, /* Function @@ -139,20 +141,53 @@ 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 0: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; + // 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; }; -- cgit v1.2.3 From 59e041672ccd35060aba75c7c05561a39c05d742 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Thu, 14 Apr 2016 08:20:55 -0500 Subject: Remapped magic bootloader key to B. --- keyboard/atomic/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/atomic/config.h b/keyboard/atomic/config.h index f30a9e6cc4..1b34decf9c 100644 --- a/keyboard/atomic/config.h +++ b/keyboard/atomic/config.h @@ -130,7 +130,7 @@ along with this program. If not, see . //#define MAGIC_KEY_LAYER7 7 //#define MAGIC_KEY_LAYER8 8 //#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE +#define MAGIC_KEY_BOOTLOADER B //#define MAGIC_KEY_LOCK CAPS //#define MAGIC_KEY_EEPROM E //#define MAGIC_KEY_NKRO N -- cgit v1.2.3 From 4b4d3069b4e71de370f0fea8a949f1ae39bb0993 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Thu, 14 Apr 2016 08:50:01 -0500 Subject: Update and rename pc_atomic.c to pvc_atomic.c Also removed unused FNs --- keyboard/atomic/keymaps/pc_atomic.c | 75 ------------------------------------ keyboard/atomic/keymaps/pvc_atomic.c | 69 +++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 75 deletions(-) delete mode 100644 keyboard/atomic/keymaps/pc_atomic.c create mode 100644 keyboard/atomic/keymaps/pvc_atomic.c diff --git a/keyboard/atomic/keymaps/pc_atomic.c b/keyboard/atomic/keymaps/pc_atomic.c deleted file mode 100644 index bdf575046b..0000000000 --- a/keyboard/atomic/keymaps/pc_atomic.c +++ /dev/null @@ -1,75 +0,0 @@ -#include "atomic.h" - -#define _QW 0 -#define _LW 1 -#define _RS 2 -#define _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, MO(_FN), KC_LALT, MO(_RS), KC_SPC, XXXXXXX, MO(_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 }, - }, -}; - -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) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - return MACRODOWN(TYPE(KC_T), END); - break; - } - return MACRO_NONE; -}; diff --git a/keyboard/atomic/keymaps/pvc_atomic.c b/keyboard/atomic/keymaps/pvc_atomic.c new file mode 100644 index 0000000000..b18e3a377a --- /dev/null +++ b/keyboard/atomic/keymaps/pvc_atomic.c @@ -0,0 +1,69 @@ +#include "atomic.h" + +#define _QW 0 +#define _LW 1 +#define _RS 2 +#define _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, MO(_FN), KC_LALT, MO(_RS), KC_SPC, XXXXXXX, MO(_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 }, + }, +}; + +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: + return MACRODOWN(TYPE(KC_T), END); + break; + } + return MACRO_NONE; +}; -- cgit v1.2.3 From 19061f2ff1283f756b162055bac776814caa2d84 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Thu, 14 Apr 2016 08:54:22 -0500 Subject: Update and rename pc_atomic.c to pvc_atomic.c --- keyboard/atomic/keymaps/pc_atomic.c | 75 ------------------------------------ keyboard/atomic/keymaps/pvc_atomic.c | 69 +++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 75 deletions(-) delete mode 100644 keyboard/atomic/keymaps/pc_atomic.c create mode 100644 keyboard/atomic/keymaps/pvc_atomic.c diff --git a/keyboard/atomic/keymaps/pc_atomic.c b/keyboard/atomic/keymaps/pc_atomic.c deleted file mode 100644 index bdf575046b..0000000000 --- a/keyboard/atomic/keymaps/pc_atomic.c +++ /dev/null @@ -1,75 +0,0 @@ -#include "atomic.h" - -#define _QW 0 -#define _LW 1 -#define _RS 2 -#define _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, MO(_FN), KC_LALT, MO(_RS), KC_SPC, XXXXXXX, MO(_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 }, - }, -}; - -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) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - return MACRODOWN(TYPE(KC_T), END); - break; - } - return MACRO_NONE; -}; diff --git a/keyboard/atomic/keymaps/pvc_atomic.c b/keyboard/atomic/keymaps/pvc_atomic.c new file mode 100644 index 0000000000..b18e3a377a --- /dev/null +++ b/keyboard/atomic/keymaps/pvc_atomic.c @@ -0,0 +1,69 @@ +#include "atomic.h" + +#define _QW 0 +#define _LW 1 +#define _RS 2 +#define _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, MO(_FN), KC_LALT, MO(_RS), KC_SPC, XXXXXXX, MO(_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 }, + }, +}; + +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: + return MACRODOWN(TYPE(KC_T), END); + break; + } + return MACRO_NONE; +}; -- cgit v1.2.3 From 3d601c1bce23cf31052b9a61818fd1343970499b Mon Sep 17 00:00:00 2001 From: IBNobody Date: Thu, 14 Apr 2016 08:56:27 -0500 Subject: Rename pc.c to pvc_planck.c --- keyboard/planck/keymaps/pc.c | 193 ----------------------------------- keyboard/planck/keymaps/pvc_planck.c | 193 +++++++++++++++++++++++++++++++++++ 2 files changed, 193 insertions(+), 193 deletions(-) delete mode 100644 keyboard/planck/keymaps/pc.c create mode 100644 keyboard/planck/keymaps/pvc_planck.c diff --git a/keyboard/planck/keymaps/pc.c b/keyboard/planck/keymaps/pc.c deleted file mode 100644 index 20bb5d86d7..0000000000 --- a/keyboard/planck/keymaps/pc.c +++ /dev/null @@ -1,193 +0,0 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. - -#include "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; -}; diff --git a/keyboard/planck/keymaps/pvc_planck.c b/keyboard/planck/keymaps/pvc_planck.c new file mode 100644 index 0000000000..20bb5d86d7 --- /dev/null +++ b/keyboard/planck/keymaps/pvc_planck.c @@ -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; +}; -- cgit v1.2.3 From 3dd20f2b6c16ea56bacc5e1581db3fbc1cfc5444 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Thu, 14 Apr 2016 11:35:49 -0500 Subject: Rename pc.c to pvc_planck.c --- keyboard/planck/keymaps/pc.c | 158 ----------------------------------- keyboard/planck/keymaps/pvc_planck.c | 158 +++++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+), 158 deletions(-) delete mode 100644 keyboard/planck/keymaps/pc.c create mode 100644 keyboard/planck/keymaps/pvc_planck.c diff --git a/keyboard/planck/keymaps/pc.c b/keyboard/planck/keymaps/pc.c deleted file mode 100644 index ed062609f4..0000000000 --- a/keyboard/planck/keymaps/pc.c +++ /dev/null @@ -1,158 +0,0 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. - -#include "planck.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] = { - {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_UP, KC_ENT }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(_LW), KC_SPC, KC_SPC, MO(_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, _______}, - {_______, _______, _______, _______, MO(_FN), _______, _______, _______, 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, _______}, - {_______, _______, _______, _______, _______, _______, _______, MO(_FN), 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[] = { - -}; - -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; -}; diff --git a/keyboard/planck/keymaps/pvc_planck.c b/keyboard/planck/keymaps/pvc_planck.c new file mode 100644 index 0000000000..ed062609f4 --- /dev/null +++ b/keyboard/planck/keymaps/pvc_planck.c @@ -0,0 +1,158 @@ +// 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" +#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] = { + {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_UP, KC_ENT }, + {KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(_LW), KC_SPC, KC_SPC, MO(_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, _______}, + {_______, _______, _______, _______, MO(_FN), _______, _______, _______, 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, _______}, + {_______, _______, _______, _______, _______, _______, _______, MO(_FN), 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[] = { + +}; + +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; +}; -- cgit v1.2.3 From cf17687f29820b6bf9b8feb3b23dec6e271572c5 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Thu, 14 Apr 2016 12:59:16 -0500 Subject: Adding personal build file settings --- keyboard/atomic/Makefile | 4 ++-- keyboard/planck/Makefile | 4 ++-- keyboard/planck/config.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile index 20cf4fff18..f95b2350cd 100644 --- a/keyboard/atomic/Makefile +++ b/keyboard/atomic/Makefile @@ -119,8 +119,8 @@ 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 # USB Nkey Rollover - not yet supported in LUFA -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +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 diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index ae637fc295..5271c27957 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -135,8 +135,8 @@ 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 # 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 +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 diff --git a/keyboard/planck/config.h b/keyboard/planck/config.h index d3719e0cb1..7d64f09773 100644 --- a/keyboard/planck/config.h +++ b/keyboard/planck/config.h @@ -73,10 +73,10 @@ along with this program. If not, see . */ /* disable debug print */ -#define NO_DEBUG +//#define NO_DEBUG /* disable print */ -#define NO_PRINT +//#define NO_PRINT /* disable action features */ //#define NO_ACTION_LAYER -- cgit v1.2.3 From f051496f1343259f4da8c5d917b9c9e47b97e38c Mon Sep 17 00:00:00 2001 From: IBNobody Date: Thu, 14 Apr 2016 18:01:29 -0500 Subject: Checkin --- keyboard/atomic/Makefile | 7 ++ keyboard/atomic/keymaps/pvc_atomic.c | 170 +++++++++++++++++++++++++++++++++-- tmk_core/common/action_layer.h | 1 + 3 files changed, 169 insertions(+), 9 deletions(-) diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile index f95b2350cd..206b5f119c 100644 --- a/keyboard/atomic/Makefile +++ b/keyboard/atomic/Makefile @@ -136,4 +136,11 @@ VPATH += $(TARGET_DIR) VPATH += $(TOP_DIR) VPATH += $(TMK_DIR) +debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION +debug-on: all + +debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT +debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) +debug-off: all + include $(TOP_DIR)/quantum/quantum.mk diff --git a/keyboard/atomic/keymaps/pvc_atomic.c b/keyboard/atomic/keymaps/pvc_atomic.c index b18e3a377a..3ddd3e3294 100644 --- a/keyboard/atomic/keymaps/pvc_atomic.c +++ b/keyboard/atomic/keymaps/pvc_atomic.c @@ -1,9 +1,12 @@ #include "atomic.h" +#include "action_layer.h" #define _QW 0 #define _LW 1 #define _RS 2 #define _FN 3 +#define _F1 4 +#define _F2 5 #define _______ KC_TRNS #define ___T___ KC_TRNS @@ -29,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { 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, MO(_FN), KC_LALT, MO(_RS), KC_SPC, XXXXXXX, MO(_LW), KC_RALT, KC_HOME, KC_END, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, + { KC_LCTL, KC_LGUI, M(_FN), KC_LALT, M(_RS), KC_SPC, XXXXXXX, 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___ }, @@ -52,18 +55,167 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D }, { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, }, + [_F1] = { /* 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 }, + }, + [_F2] = { /* 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 }, + }, }; +#define IS_LAYER_ON(layer) ((layer_state) & (1<<(layer))) +#define IS_LAYER_OFF(layer) ((!layer_state) & (1<<(layer))) + +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); + } +} + +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); + } + } +} + +/* ignore me +void change_quad_layer(uint8_t focus_layer, bool desired_focus_layer_state, uint8_t pair_layer, uint8_t layer3, uint8_t layer4) +{ + + // If desired focus layer state == 1 and current focus layer state == 1 + if ((desired_focus_layer_state) && IS_LAYER_ON(layer1)) + { + // Do Nothing + } + // If desired focus layer state == 0 and current focus layer state == 1 + else if ((desired_focus_layer_state) && IS_LAYER_ON(layer1)) + { + // If + 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[] = { }; -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; - } - return MACRO_NONE; + + // MACRODOWN only works in this function + switch(id) + { + case _FN: + if (record->event.pressed) { + print("FN_DN\n"); + print_val_bin32(layer_state); + layer_on(_FN); + print_val_bin32(layer_state); + } else { + print("FN_UP\n"); + print_val_bin32(layer_state); + layer_off(_FN); + print_val_bin32(layer_state); + } + break; + + case _RS: + if (record->event.pressed) { + print("RS_DN\n"); + print_val_bin32(layer_state); + layer_on(_RS); + //tri_layer++; + print_val_bin32(layer_state); + //update_tri_layer(_RS, _LW, _FN); + update_quad_layer(_RS, _LW, _F1, _F2, 0); + print_val_bin32(layer_state); + } else { + print("RS_UP\n"); + print_val_bin32(layer_state); + layer_off(_RS); + //tri_layer--; + print_val_bin32(layer_state); + //update_tri_layer(_RS, _LW, _FN); + update_quad_layer(_RS, _LW, _F1, _F2, 0); + print_val_bin32(layer_state); + } + break; + + case _LW: + if (record->event.pressed) { + print("LW_DN\n"); + print_val_bin32(layer_state); + layer_on(_LW); + //tri_layer++; + print_val_bin32(layer_state); + //update_tri_layer(_RS, _LW, _FN); + update_quad_layer(_RS, _LW, _F1, _F2, 1); + print_val_bin32(layer_state); + } else { + print("LW_UP\n"); + print_val_bin32(layer_state); + layer_off(_LW); + //tri_layer--; + print_val_bin32(layer_state); + //update_tri_layer(_RS, _LW, _FN); + update_quad_layer(_RS, _LW, _F1, _F2, 1); + print_val_bin32(layer_state); + } + break; + + default: + break; + } + return MACRO_NONE; }; diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index 3a4b1e3349..025cf5420f 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -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 */ -- cgit v1.2.3 From ddbe4307789b6087c3e6f146a5e02f1084f3cecc Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 14 Apr 2016 19:13:24 -0400 Subject: new defaults --- keyboard/planck/Makefile | 2 +- keyboard/planck/keymaps/default/keymap.c | 146 ++++++++++++++++++++++++++++--- 2 files changed, 133 insertions(+), 15 deletions(-) diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index ae637fc295..ee1c60feda 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -138,7 +138,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # 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 +AUDIO_ENABLE = yes # Audio output on port C6 # UNICODE_ENABLE = yes # Unicode # BLUETOOTH_ENABLE = ye # 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. diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index 30ad877605..e06567339e 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c @@ -5,6 +5,10 @@ #ifdef BACKLIGHT_ENABLE #include "backlight.h" #endif +#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. @@ -15,6 +19,15 @@ #define _DV 2 #define _LW 3 #define _RS 4 +#define _AD 5 + +// Macro name shortcuts +#define M_QW 0 +#define M_CM 1 +#define M_DV 2 +#define M_LW 3 +#define M_RS 4 +#define M_BL 5 // Fillers to make layering more clear #define _______ KC_TRNS @@ -37,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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, M(M_LW), KC_SPC, KC_SPC, M(M_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Colemak @@ -55,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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, M(M_LW), KC_SPC, KC_SPC, M(M_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Dvorak @@ -73,24 +86,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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, M(M_LW), KC_SPC, KC_SPC, M(M_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 | - | = | [ | ] | \ | + * | 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] = { {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, DF(_QW), DF(_CM), DF(_DV), RESET, _______}, + {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} }, @@ -98,18 +111,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | 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 | * `-----------------------------------------------------------------------------------' */ [_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, DF(_QW), DF(_CM), DF(_DV), RESET, _______}, + {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} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | |Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_AD] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, _______, _______, _______, _______, M(M_QW), M(M_CM), M(M_DV), _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } }; @@ -117,11 +148,85 @@ const uint16_t PROGMEM fn_actions[] = { }; +float tone_qw[][2] = { + {440.0*pow(2.0,(67)/12.0), 400}, + {440.0*pow(2.0,(60)/12.0), 400}, + {0, 400}, + {440.0*pow(2.0,(67)/12.0), 1600} +}; + +float tone_cm[][2] = { + {440.0*pow(2.0,(67)/12.0), 400}, + {440.0*pow(2.0,(60)/12.0), 400}, + {0, 400}, + {440.0*pow(2.0,(67)/12.0), 1000}, + {0, 200}, + {440.0*pow(2.0,(67)/12.0), 1000} +}; + +float tone_dv[][2] = { + {440.0*pow(2.0,(67)/12.0), 400}, + {440.0*pow(2.0,(60)/12.0), 400}, + {0, 400}, + {440.0*pow(2.0,(67)/12.0), 800}, + {0, 200}, + {440.0*pow(2.0,(67)/12.0), 800}, + {0, 200}, + {440.0*pow(2.0,(67)/12.0), 800} +}; + + +#define IS_LAYER_ON(layer) ((layer_state) & (1<<(layer))) +#define IS_LAYER_OFF(layer) ((!layer_state) & (1<<(layer))) + +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); + } +} 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 M_QW: + if (record->event.pressed) { + play_notes(&tone_qw, 4, false); + default_layer_set(1UL<<_QW); + } + break; + case M_CM: + if (record->event.pressed) { + play_notes(&tone_cm, 6, false); + default_layer_set(1UL<<_CM); + } + break; + case M_DV: + if (record->event.pressed) { + play_notes(&tone_dv, 8, false); + default_layer_set(1UL<<_DV); + } + break; + case M_LW: + if (record->event.pressed) { + layer_on(_LW); + update_tri_layer(_LW, _RS, _AD); + } else { + layer_off(_LW); + update_tri_layer(_LW, _RS, _AD); + } + break; + case M_RS: + if (record->event.pressed) { + layer_on(_RS); + update_tri_layer(_LW, _RS, _AD); + } else { + layer_off(_RS); + update_tri_layer(_LW, _RS, _AD); + } + break; + case M_BL: if (record->event.pressed) { register_code(KC_RSFT); #ifdef BACKLIGHT_ENABLE @@ -134,3 +239,16 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } return MACRO_NONE; }; + +float start_up[][2] = { + {440.0*pow(2.0,(67)/12.0), 650}, + {440.0*pow(2.0,(64)/12.0), 450}, + {440.0*pow(2.0,(55)/12.0), 450}, + {440.0*pow(2.0,(60)/12.0), 450}, + {440.0*pow(2.0,(64)/12.0), 1000} +}; + +void matrix_init_user(void) { + init_notes(); + play_notes(&start_up, 5, false); +} -- cgit v1.2.3 From 63462bf8c12cea1c13ca1bd1f105fe53f556806e Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 14 Apr 2016 20:42:14 -0400 Subject: changing up the makefile a bit --- keyboard/planck/Makefile | 56 +++++++++++++++++------------ keyboard/planck/keymaps/default/keymap.c | 49 +++++++++++++++---------- keyboard/planck/keymaps/default/makefile.mk | 1 + quantum/quantum.mk | 8 ++--- tmk_core/common.mk | 26 +++++++------- tmk_core/protocol/lufa.mk | 4 +-- 6 files changed, 84 insertions(+), 60 deletions(-) create mode 100644 keyboard/planck/keymaps/default/makefile.mk diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index ee1c60feda..dc6e46df2c 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -38,6 +38,27 @@ # To rebuild project do "make clean" then "make all". #---------------------------------------------------------------------------- +# Build Options +# 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 # 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 = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + # Target file name (without extension). TARGET = planck @@ -62,17 +83,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 @@ -127,27 +159,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 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 -# 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 = ye # 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. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend - - -ifdef BACKLIGHT_ENABLE +ifeq ($(BACKLIGHT_ENABLE), yes) SRC += backlight.c endif diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index e06567339e..97ba5d285e 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c @@ -89,38 +89,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, M(M_LW), KC_SPC, KC_SPC, M(M_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, -/* Raise +/* Lower * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, +[_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_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} }, -/* Lower +/* Raise * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, +[_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_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} }, @@ -148,17 +148,18 @@ const uint16_t PROGMEM fn_actions[] = { }; +#ifdef AUDIO_ENABLE float tone_qw[][2] = { {440.0*pow(2.0,(67)/12.0), 400}, {440.0*pow(2.0,(60)/12.0), 400}, - {0, 400}, + {0, 800}, {440.0*pow(2.0,(67)/12.0), 1600} }; float tone_cm[][2] = { {440.0*pow(2.0,(67)/12.0), 400}, {440.0*pow(2.0,(60)/12.0), 400}, - {0, 400}, + {0, 800}, {440.0*pow(2.0,(67)/12.0), 1000}, {0, 200}, {440.0*pow(2.0,(67)/12.0), 1000} @@ -167,14 +168,14 @@ float tone_cm[][2] = { float tone_dv[][2] = { {440.0*pow(2.0,(67)/12.0), 400}, {440.0*pow(2.0,(60)/12.0), 400}, - {0, 400}, + {0, 800}, {440.0*pow(2.0,(67)/12.0), 800}, {0, 200}, {440.0*pow(2.0,(67)/12.0), 800}, {0, 200}, {440.0*pow(2.0,(67)/12.0), 800} }; - +#endif #define IS_LAYER_ON(layer) ((layer_state) & (1<<(layer))) #define IS_LAYER_OFF(layer) ((!layer_state) & (1<<(layer))) @@ -192,19 +193,25 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) switch(id) { case M_QW: if (record->event.pressed) { - play_notes(&tone_qw, 4, false); + #ifdef AUDIO_ENABLE + play_notes(&tone_qw, 4, false); + #endif default_layer_set(1UL<<_QW); } break; case M_CM: if (record->event.pressed) { - play_notes(&tone_cm, 6, false); + #ifdef AUDIO_ENABLE + play_notes(&tone_cm, 6, false); + #endif default_layer_set(1UL<<_CM); } break; case M_DV: if (record->event.pressed) { - play_notes(&tone_dv, 8, false); + #ifdef AUDIO_ENABLE + play_notes(&tone_dv, 8, false); + #endif default_layer_set(1UL<<_DV); } break; @@ -240,6 +247,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; +#ifdef AUDIO_ENABLE float start_up[][2] = { {440.0*pow(2.0,(67)/12.0), 650}, {440.0*pow(2.0,(64)/12.0), 450}, @@ -247,8 +255,11 @@ float start_up[][2] = { {440.0*pow(2.0,(60)/12.0), 450}, {440.0*pow(2.0,(64)/12.0), 1000} }; +#endif void matrix_init_user(void) { + #ifdef AUDIO_ENABLE init_notes(); play_notes(&start_up, 5, false); + #endif } diff --git a/keyboard/planck/keymaps/default/makefile.mk b/keyboard/planck/keymaps/default/makefile.mk new file mode 100644 index 0000000000..628167ff66 --- /dev/null +++ b/keyboard/planck/keymaps/default/makefile.mk @@ -0,0 +1 @@ +AUDIO_ENABLE = yes \ No newline at end of file diff --git a/quantum/quantum.mk b/quantum/quantum.mk index de93af7e8c..3069f582c3 100644 --- a/quantum/quantum.mk +++ b/quantum/quantum.mk @@ -23,19 +23,19 @@ ifndef CUSTOM_MATRIX SRC += $(QUANTUM_DIR)/matrix.c endif -ifdef MIDI_ENABLE +ifeq ($(MIDI_ENABLE), yes) SRC += $(QUANTUM_DIR)/keymap_midi.c endif -ifdef AUDIO_ENABLE +ifeq ($(AUDIO_ENABLE), yes) SRC += $(QUANTUM_DIR)/audio.c endif -ifdef UNICODE_ENABLE +ifeq ($(UNICODE_ENABLE), yes) SRC += $(QUANTUM_DIR)/keymap_unicode.c endif -ifdef RGBLIGHT_ENABLE +ifeq ($(RGBLIGHT_ENABLE), yes) SRC += $(QUANTUM_DIR)/light_ws2812.c SRC += $(QUANTUM_DIR)/rgblight.c OPT_DEFS += -DRGBLIGHT_ENABLE diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 89c366f554..8d028d52ac 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -17,66 +17,66 @@ SRC += $(COMMON_DIR)/host.c \ # Option modules -ifdef BOOTMAGIC_ENABLE +ifeq ($(BOOTMAGIC_ENABLE), yes) SRC += $(COMMON_DIR)/bootmagic.c SRC += $(COMMON_DIR)/avr/eeconfig.c OPT_DEFS += -DBOOTMAGIC_ENABLE endif -ifdef MOUSEKEY_ENABLE +ifeq ($(MOUSEKEY_ENABLE), yes) SRC += $(COMMON_DIR)/mousekey.c OPT_DEFS += -DMOUSEKEY_ENABLE OPT_DEFS += -DMOUSE_ENABLE endif -ifdef EXTRAKEY_ENABLE +ifeq ($(EXTRAKEY_ENABLE), yes) OPT_DEFS += -DEXTRAKEY_ENABLE endif -ifdef CONSOLE_ENABLE +ifeq ($(CONSOLE_ENABLE), yes) OPT_DEFS += -DCONSOLE_ENABLE else OPT_DEFS += -DNO_PRINT OPT_DEFS += -DNO_DEBUG endif -ifdef COMMAND_ENABLE +ifeq ($(COMMAND_ENABLE), yes) SRC += $(COMMON_DIR)/command.c OPT_DEFS += -DCOMMAND_ENABLE endif -ifdef NKRO_ENABLE +ifeq ($(NKRO_ENABLE), yes) OPT_DEFS += -DNKRO_ENABLE endif -ifdef MIDI_ENABLE +ifeq ($(MIDI_ENABLE), yes) OPT_DEFS += -DMIDI_ENABLE endif -ifdef AUDIO_ENABLE +ifeq ($(AUDIO_ENABLE), yes) OPT_DEFS += -DAUDIO_ENABLE endif -ifdef USB_6KRO_ENABLE +ifeq ($(USB_6KRO_ENABLE), yes) OPT_DEFS += -DUSB_6KRO_ENABLE endif -ifdef SLEEP_LED_ENABLE +ifeq ($(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 ($(BACKLIGHT_ENABLE), yes) SRC += $(COMMON_DIR)/backlight.c OPT_DEFS += -DBACKLIGHT_ENABLE endif -ifdef BLUETOOTH_ENABLE +ifeq ($(BLUETOOTH_ENABLE), yes) OPT_DEFS += -DBLUETOOTH_ENABLE endif -ifdef KEYMAP_SECTION_ENABLE +ifeq ($(KEYMAP_SECTION_ENABLE), yes) OPT_DEFS += -DKEYMAP_SECTION_ENABLE ifeq ($(strip $(MCU)),atmega32u2) diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index 4905760bb4..f3209c227e 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -17,7 +17,7 @@ LUFA_SRC = $(LUFA_DIR)/lufa.c \ $(LUFA_DIR)/descriptor.c \ $(LUFA_SRC_USB) -ifdef MIDI_ENABLE +ifeq ($(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 ($(BLUETOOTH_ENABLE), yes) LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ $(TMK_DIR)/protocol/serial_uart.c endif -- cgit v1.2.3 From 3993afbb2e022f4e6371c729ac6a025f16bc734e Mon Sep 17 00:00:00 2001 From: IBNobody Date: Thu, 14 Apr 2016 22:27:28 -0500 Subject: adding new per-keymap makefile --- keyboard/atomic/Makefile | 85 ++++++++---- keyboard/atomic/keymaps/pvc/makefile.mk | 16 +++ keyboard/atomic/keymaps/pvc/pvc_atomic.c | 221 +++++++++++++++++++++++++++++++ keyboard/atomic/keymaps/pvc_atomic.c | 221 ------------------------------- 4 files changed, 294 insertions(+), 249 deletions(-) create mode 100644 keyboard/atomic/keymaps/pvc/makefile.mk create mode 100644 keyboard/atomic/keymaps/pvc/pvc_atomic.c delete mode 100644 keyboard/atomic/keymaps/pvc_atomic.c diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile index 206b5f119c..364efa3fa5 100644 --- a/keyboard/atomic/Makefile +++ b/keyboard/atomic/Makefile @@ -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. @@ -38,6 +38,27 @@ # To rebuild project do "make clean" then "make all". #---------------------------------------------------------------------------- +# Build Options +# 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 # 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 = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + # Target file name (without extension). TARGET = atomic @@ -50,15 +71,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 @@ -111,22 +159,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 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 -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 +ifeq ($(BACKLIGHT_ENABLE), yes) + SRC += backlight.c +endif -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax @@ -136,11 +172,4 @@ VPATH += $(TARGET_DIR) VPATH += $(TOP_DIR) VPATH += $(TMK_DIR) -debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION -debug-on: all - -debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT -debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) -debug-off: all - -include $(TOP_DIR)/quantum/quantum.mk +include $(TOP_DIR)/quantum/quantum.mk \ No newline at end of file diff --git a/keyboard/atomic/keymaps/pvc/makefile.mk b/keyboard/atomic/keymaps/pvc/makefile.mk new file mode 100644 index 0000000000..ff0a9c338b --- /dev/null +++ b/keyboard/atomic/keymaps/pvc/makefile.mk @@ -0,0 +1,16 @@ +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +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 = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboard/atomic/keymaps/pvc/pvc_atomic.c b/keyboard/atomic/keymaps/pvc/pvc_atomic.c new file mode 100644 index 0000000000..3ddd3e3294 --- /dev/null +++ b/keyboard/atomic/keymaps/pvc/pvc_atomic.c @@ -0,0 +1,221 @@ +#include "atomic.h" +#include "action_layer.h" + +#define _QW 0 +#define _LW 1 +#define _RS 2 +#define _FN 3 +#define _F1 4 +#define _F2 5 + +#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(_FN), KC_LALT, M(_RS), KC_SPC, XXXXXXX, 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 }, + }, + [_F1] = { /* 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 }, + }, + [_F2] = { /* 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 }, + }, +}; + +#define IS_LAYER_ON(layer) ((layer_state) & (1<<(layer))) +#define IS_LAYER_OFF(layer) ((!layer_state) & (1<<(layer))) + +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); + } +} + +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); + } + } +} + +/* ignore me +void change_quad_layer(uint8_t focus_layer, bool desired_focus_layer_state, uint8_t pair_layer, uint8_t layer3, uint8_t layer4) +{ + + // If desired focus layer state == 1 and current focus layer state == 1 + if ((desired_focus_layer_state) && IS_LAYER_ON(layer1)) + { + // Do Nothing + } + // If desired focus layer state == 0 and current focus layer state == 1 + else if ((desired_focus_layer_state) && IS_LAYER_ON(layer1)) + { + // If + 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[] = { +}; + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + + // MACRODOWN only works in this function + switch(id) + { + case _FN: + if (record->event.pressed) { + print("FN_DN\n"); + print_val_bin32(layer_state); + layer_on(_FN); + print_val_bin32(layer_state); + } else { + print("FN_UP\n"); + print_val_bin32(layer_state); + layer_off(_FN); + print_val_bin32(layer_state); + } + break; + + case _RS: + if (record->event.pressed) { + print("RS_DN\n"); + print_val_bin32(layer_state); + layer_on(_RS); + //tri_layer++; + print_val_bin32(layer_state); + //update_tri_layer(_RS, _LW, _FN); + update_quad_layer(_RS, _LW, _F1, _F2, 0); + print_val_bin32(layer_state); + } else { + print("RS_UP\n"); + print_val_bin32(layer_state); + layer_off(_RS); + //tri_layer--; + print_val_bin32(layer_state); + //update_tri_layer(_RS, _LW, _FN); + update_quad_layer(_RS, _LW, _F1, _F2, 0); + print_val_bin32(layer_state); + } + break; + + case _LW: + if (record->event.pressed) { + print("LW_DN\n"); + print_val_bin32(layer_state); + layer_on(_LW); + //tri_layer++; + print_val_bin32(layer_state); + //update_tri_layer(_RS, _LW, _FN); + update_quad_layer(_RS, _LW, _F1, _F2, 1); + print_val_bin32(layer_state); + } else { + print("LW_UP\n"); + print_val_bin32(layer_state); + layer_off(_LW); + //tri_layer--; + print_val_bin32(layer_state); + //update_tri_layer(_RS, _LW, _FN); + update_quad_layer(_RS, _LW, _F1, _F2, 1); + print_val_bin32(layer_state); + } + break; + + default: + break; + } + return MACRO_NONE; +}; diff --git a/keyboard/atomic/keymaps/pvc_atomic.c b/keyboard/atomic/keymaps/pvc_atomic.c deleted file mode 100644 index 3ddd3e3294..0000000000 --- a/keyboard/atomic/keymaps/pvc_atomic.c +++ /dev/null @@ -1,221 +0,0 @@ -#include "atomic.h" -#include "action_layer.h" - -#define _QW 0 -#define _LW 1 -#define _RS 2 -#define _FN 3 -#define _F1 4 -#define _F2 5 - -#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(_FN), KC_LALT, M(_RS), KC_SPC, XXXXXXX, 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 }, - }, - [_F1] = { /* 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 }, - }, - [_F2] = { /* 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 }, - }, -}; - -#define IS_LAYER_ON(layer) ((layer_state) & (1<<(layer))) -#define IS_LAYER_OFF(layer) ((!layer_state) & (1<<(layer))) - -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); - } -} - -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); - } - } -} - -/* ignore me -void change_quad_layer(uint8_t focus_layer, bool desired_focus_layer_state, uint8_t pair_layer, uint8_t layer3, uint8_t layer4) -{ - - // If desired focus layer state == 1 and current focus layer state == 1 - if ((desired_focus_layer_state) && IS_LAYER_ON(layer1)) - { - // Do Nothing - } - // If desired focus layer state == 0 and current focus layer state == 1 - else if ((desired_focus_layer_state) && IS_LAYER_ON(layer1)) - { - // If - 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[] = { -}; - - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - - // MACRODOWN only works in this function - switch(id) - { - case _FN: - if (record->event.pressed) { - print("FN_DN\n"); - print_val_bin32(layer_state); - layer_on(_FN); - print_val_bin32(layer_state); - } else { - print("FN_UP\n"); - print_val_bin32(layer_state); - layer_off(_FN); - print_val_bin32(layer_state); - } - break; - - case _RS: - if (record->event.pressed) { - print("RS_DN\n"); - print_val_bin32(layer_state); - layer_on(_RS); - //tri_layer++; - print_val_bin32(layer_state); - //update_tri_layer(_RS, _LW, _FN); - update_quad_layer(_RS, _LW, _F1, _F2, 0); - print_val_bin32(layer_state); - } else { - print("RS_UP\n"); - print_val_bin32(layer_state); - layer_off(_RS); - //tri_layer--; - print_val_bin32(layer_state); - //update_tri_layer(_RS, _LW, _FN); - update_quad_layer(_RS, _LW, _F1, _F2, 0); - print_val_bin32(layer_state); - } - break; - - case _LW: - if (record->event.pressed) { - print("LW_DN\n"); - print_val_bin32(layer_state); - layer_on(_LW); - //tri_layer++; - print_val_bin32(layer_state); - //update_tri_layer(_RS, _LW, _FN); - update_quad_layer(_RS, _LW, _F1, _F2, 1); - print_val_bin32(layer_state); - } else { - print("LW_UP\n"); - print_val_bin32(layer_state); - layer_off(_LW); - //tri_layer--; - print_val_bin32(layer_state); - //update_tri_layer(_RS, _LW, _FN); - update_quad_layer(_RS, _LW, _F1, _F2, 1); - print_val_bin32(layer_state); - } - break; - - default: - break; - } - return MACRO_NONE; -}; -- cgit v1.2.3 From 2597fb7c508cf36704291cd48b2c752dd21f2b0d Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 14 Apr 2016 23:33:46 -0400 Subject: might have broken something --- keyboard/planck/config.h | 4 ++-- keyboard/planck/keymaps/default/makefile.mk | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboard/planck/config.h b/keyboard/planck/config.h index d3719e0cb1..7d64f09773 100644 --- a/keyboard/planck/config.h +++ b/keyboard/planck/config.h @@ -73,10 +73,10 @@ along with this program. If not, see . */ /* 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/default/makefile.mk b/keyboard/planck/keymaps/default/makefile.mk index 628167ff66..e1c5bd2e80 100644 --- a/keyboard/planck/keymaps/default/makefile.mk +++ b/keyboard/planck/keymaps/default/makefile.mk @@ -1 +1,2 @@ -AUDIO_ENABLE = yes \ No newline at end of file +AUDIO_ENABLE = yes +BACKLIGHT_ENABLE = yes \ No newline at end of file -- cgit v1.2.3 From 43a4ffc25971b2aea94b65ca1db66371e653ec5f Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 14 Apr 2016 23:53:35 -0400 Subject: bootmagic somehow not getting enabled, so adding eeconfig to backlight src include cond --- keyboard/planck/Makefile | 11 ++++------- keyboard/planck/keymaps/default/keymap.c | 3 --- tmk_core/common.mk | 1 + 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index dc6e46df2c..693e9c8aa5 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -107,6 +107,10 @@ endif SRC := $(KEYMAP_FILE) $(SRC) +ifeq ($(BACKLIGHT_ENABLE), yes) + SRC := backlight.c $(SRC) +endif + CONFIG_H = config.h # MCU name @@ -126,7 +130,6 @@ MCU = atmega32u4 # software delays. F_CPU = 16000000 - # # LUFA specific # @@ -158,12 +161,6 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # USBaspLoader 2048 OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -ifeq ($(BACKLIGHT_ENABLE), yes) - SRC += backlight.c -endif - - # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index 97ba5d285e..151a6b4f46 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c @@ -2,9 +2,6 @@ // this is the style you want to emulate. #include "planck.h" -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" -#endif #include "action_layer.h" #ifdef AUDIO_ENABLE #include "audio.h" diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 8d028d52ac..030767cc3f 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -69,6 +69,7 @@ endif ifeq ($(BACKLIGHT_ENABLE), yes) SRC += $(COMMON_DIR)/backlight.c + SRC += $(COMMON_DIR)/avr/eeconfig.c OPT_DEFS += -DBACKLIGHT_ENABLE endif -- cgit v1.2.3 From bb0836c62016f482f517771a9f5a8dbc68bd0a1c Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 15 Apr 2016 00:26:22 -0400 Subject: the spacessss --- keyboard/planck/Makefile | 66 +++++++++++++++++------------ keyboard/planck/keymaps/default/makefile.mk | 3 +- quantum/quantum.mk | 8 ++-- tmk_core/common.mk | 26 ++++++------ tmk_core/protocol/lufa.mk | 4 +- 5 files changed, 60 insertions(+), 47 deletions(-) diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index 693e9c8aa5..8d4e7787a6 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -38,31 +38,9 @@ # To rebuild project do "make clean" then "make all". #---------------------------------------------------------------------------- -# Build Options -# 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 # 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 = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - # Target file name (without extension). TARGET = planck - # Directory common source filess exist TOP_DIR = ../.. TMK_DIR = ../../tmk_core @@ -107,10 +85,6 @@ endif SRC := $(KEYMAP_FILE) $(SRC) -ifeq ($(BACKLIGHT_ENABLE), yes) - SRC := backlight.c $(SRC) -endif - CONFIG_H = config.h # MCU name @@ -161,6 +135,46 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # USBaspLoader 2048 OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Build Options +# 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 = 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 diff --git a/keyboard/planck/keymaps/default/makefile.mk b/keyboard/planck/keymaps/default/makefile.mk index e1c5bd2e80..8cbec4a1f5 100644 --- a/keyboard/planck/keymaps/default/makefile.mk +++ b/keyboard/planck/keymaps/default/makefile.mk @@ -1,2 +1 @@ -AUDIO_ENABLE = yes -BACKLIGHT_ENABLE = yes \ No newline at end of file +AUDIO_ENABLE = yes \ No newline at end of file diff --git a/quantum/quantum.mk b/quantum/quantum.mk index 3069f582c3..17bb501718 100644 --- a/quantum/quantum.mk +++ b/quantum/quantum.mk @@ -23,19 +23,19 @@ ifndef CUSTOM_MATRIX SRC += $(QUANTUM_DIR)/matrix.c endif -ifeq ($(MIDI_ENABLE), yes) +ifeq ($(strip $(MIDI_ENABLE)), yes) SRC += $(QUANTUM_DIR)/keymap_midi.c endif -ifeq ($(AUDIO_ENABLE), yes) +ifeq ($(strip $(AUDIO_ENABLE)), yes) SRC += $(QUANTUM_DIR)/audio.c endif -ifeq ($(UNICODE_ENABLE), yes) +ifeq ($(strip $(UNICODE_ENABLE)), yes) SRC += $(QUANTUM_DIR)/keymap_unicode.c endif -ifeq ($(RGBLIGHT_ENABLE), yes) +ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) SRC += $(QUANTUM_DIR)/light_ws2812.c SRC += $(QUANTUM_DIR)/rgblight.c OPT_DEFS += -DRGBLIGHT_ENABLE diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 030767cc3f..f8006c6708 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -17,67 +17,67 @@ SRC += $(COMMON_DIR)/host.c \ # Option modules -ifeq ($(BOOTMAGIC_ENABLE), yes) +ifeq ($(strip $(BOOTMAGIC_ENABLE)), yes) SRC += $(COMMON_DIR)/bootmagic.c SRC += $(COMMON_DIR)/avr/eeconfig.c OPT_DEFS += -DBOOTMAGIC_ENABLE endif -ifeq ($(MOUSEKEY_ENABLE), yes) +ifeq ($(strip $(MOUSEKEY_ENABLE)), yes) SRC += $(COMMON_DIR)/mousekey.c OPT_DEFS += -DMOUSEKEY_ENABLE OPT_DEFS += -DMOUSE_ENABLE endif -ifeq ($(EXTRAKEY_ENABLE), yes) +ifeq ($(strip $(EXTRAKEY_ENABLE)), yes) OPT_DEFS += -DEXTRAKEY_ENABLE endif -ifeq ($(CONSOLE_ENABLE), yes) +ifeq ($(strip $(CONSOLE_ENABLE)), yes) OPT_DEFS += -DCONSOLE_ENABLE else OPT_DEFS += -DNO_PRINT OPT_DEFS += -DNO_DEBUG endif -ifeq ($(COMMAND_ENABLE), yes) +ifeq ($(strip $(COMMAND_ENABLE)), yes) SRC += $(COMMON_DIR)/command.c OPT_DEFS += -DCOMMAND_ENABLE endif -ifeq ($(NKRO_ENABLE), yes) +ifeq ($(strip $(NKRO_ENABLE)), yes) OPT_DEFS += -DNKRO_ENABLE endif -ifeq ($(MIDI_ENABLE), yes) +ifeq ($(strip $(MIDI_ENABLE)), yes) OPT_DEFS += -DMIDI_ENABLE endif -ifeq ($(AUDIO_ENABLE), yes) +ifeq ($(strip $(AUDIO_ENABLE)), yes) OPT_DEFS += -DAUDIO_ENABLE endif -ifeq ($(USB_6KRO_ENABLE), yes) +ifeq ($(strip $(USB_6KRO_ENABLE)), yes) OPT_DEFS += -DUSB_6KRO_ENABLE endif -ifeq ($(SLEEP_LED_ENABLE), yes) +ifeq ($(strip $(SLEEP_LED_ENABLE)), yes) SRC += $(COMMON_DIR)/sleep_led.c OPT_DEFS += -DSLEEP_LED_ENABLE OPT_DEFS += -DNO_SUSPEND_POWER_DOWN endif -ifeq ($(BACKLIGHT_ENABLE), yes) +ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) SRC += $(COMMON_DIR)/backlight.c SRC += $(COMMON_DIR)/avr/eeconfig.c OPT_DEFS += -DBACKLIGHT_ENABLE endif -ifeq ($(BLUETOOTH_ENABLE), yes) +ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) OPT_DEFS += -DBLUETOOTH_ENABLE endif -ifeq ($(KEYMAP_SECTION_ENABLE), yes) +ifeq ($(strip $(KEYMAP_SECTION_ENABLE)), yes) OPT_DEFS += -DKEYMAP_SECTION_ENABLE ifeq ($(strip $(MCU)),atmega32u2) diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index f3209c227e..9ac6298f11 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -17,7 +17,7 @@ LUFA_SRC = $(LUFA_DIR)/lufa.c \ $(LUFA_DIR)/descriptor.c \ $(LUFA_SRC_USB) -ifeq ($(MIDI_ENABLE), yes) +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 @@ ifeq ($(MIDI_ENABLE), yes) $(LUFA_SRC_USBCLASS) endif -ifeq ($(BLUETOOTH_ENABLE), yes) +ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ $(TMK_DIR)/protocol/serial_uart.c endif -- cgit v1.2.3 From ee2ee7f4f049dda385a9db7dddd8e7e91681315b Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 15 Apr 2016 13:44:07 -0400 Subject: audio note length fixes --- keyboard/planck/keymaps/default/keymap.c | 46 ++++++++++++++++---------------- quantum/audio.c | 7 ++++- quantum/keymap_common.c | 10 +++---- 3 files changed, 33 insertions(+), 30 deletions(-) diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index 151a6b4f46..dee2840f2d 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c @@ -147,30 +147,30 @@ const uint16_t PROGMEM fn_actions[] = { #ifdef AUDIO_ENABLE float tone_qw[][2] = { - {440.0*pow(2.0,(67)/12.0), 400}, - {440.0*pow(2.0,(60)/12.0), 400}, - {0, 800}, - {440.0*pow(2.0,(67)/12.0), 1600} + {440.0*pow(2.0,(59)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {0, 4}, + {440.0*pow(2.0,(67)/12.0), 16} }; float tone_cm[][2] = { - {440.0*pow(2.0,(67)/12.0), 400}, - {440.0*pow(2.0,(60)/12.0), 400}, - {0, 800}, - {440.0*pow(2.0,(67)/12.0), 1000}, - {0, 200}, - {440.0*pow(2.0,(67)/12.0), 1000} + {440.0*pow(2.0,(59)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {0, 4}, + {440.0*pow(2.0,(67)/12.0), 16}, + {0, 4}, + {440.0*pow(2.0,(71)/12.0), 16} }; float tone_dv[][2] = { - {440.0*pow(2.0,(67)/12.0), 400}, - {440.0*pow(2.0,(60)/12.0), 400}, - {0, 800}, - {440.0*pow(2.0,(67)/12.0), 800}, - {0, 200}, - {440.0*pow(2.0,(67)/12.0), 800}, - {0, 200}, - {440.0*pow(2.0,(67)/12.0), 800} + {440.0*pow(2.0,(59)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {0, 4}, + {440.0*pow(2.0,(67)/12.0), 16}, + {0, 4}, + {440.0*pow(2.0,(69)/12.0), 16}, + {0, 4}, + {440.0*pow(2.0,(67)/12.0), 16} }; #endif @@ -246,11 +246,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) #ifdef AUDIO_ENABLE float start_up[][2] = { - {440.0*pow(2.0,(67)/12.0), 650}, - {440.0*pow(2.0,(64)/12.0), 450}, - {440.0*pow(2.0,(55)/12.0), 450}, - {440.0*pow(2.0,(60)/12.0), 450}, - {440.0*pow(2.0,(64)/12.0), 1000} + {440.0*pow(2.0,(67)/12.0), 12}, + {440.0*pow(2.0,(64)/12.0), 8}, + {440.0*pow(2.0,(55)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {440.0*pow(2.0,(64)/12.0), 20} }; #endif diff --git a/quantum/audio.c b/quantum/audio.c index f29d941d7c..50e5505fe0 100644 --- a/quantum/audio.c +++ b/quantum/audio.c @@ -255,7 +255,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) { diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index ae6cddb343..e3030a8869 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -33,11 +33,9 @@ along with this program. If not, see . #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}, + {440.0*pow(2.0,(67)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {440.0*pow(2.0,(55)/12.0), 12}, }; #endif @@ -90,7 +88,7 @@ action_t action_for_key(uint8_t layer, keypos_t key) action_t action; clear_keyboard(); #ifdef AUDIO_ENABLE - play_notes(&goodbye, 5, false); + play_notes(&goodbye, 3, false); #endif _delay_ms(250); #ifdef ATREUS_ASTAR -- cgit v1.2.3 From 8f85117aa9e060371177e3b523bc89dc7aad19e8 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Fri, 15 Apr 2016 14:42:50 -0500 Subject: Added Audio to my Atomic --- keyboard/atomic/Makefile | 67 ++++++---- keyboard/atomic/keymaps/pvc/config.h | 157 ++++++++++++++++++++++ keyboard/atomic/keymaps/pvc/keymap.c | 202 ++++++++++++++++++++++++++++ keyboard/atomic/keymaps/pvc/makefile.mk | 6 +- keyboard/atomic/keymaps/pvc/pvc_atomic.c | 221 ------------------------------- keyboard/planck/Makefile | 31 +---- quantum/audio.h | 4 +- 7 files changed, 405 insertions(+), 283 deletions(-) create mode 100644 keyboard/atomic/keymaps/pvc/config.h create mode 100644 keyboard/atomic/keymaps/pvc/keymap.c delete mode 100644 keyboard/atomic/keymaps/pvc/pvc_atomic.c diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile index 364efa3fa5..1203cf6a39 100644 --- a/keyboard/atomic/Makefile +++ b/keyboard/atomic/Makefile @@ -38,31 +38,9 @@ # To rebuild project do "make clean" then "make all". #---------------------------------------------------------------------------- -# Build Options -# 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 # 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 = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - # Target file name (without extension). TARGET = atomic - # Directory common source filess exist TOP_DIR = ../.. TMK_DIR = ../../tmk_core @@ -73,6 +51,8 @@ TARGET_DIR = . # # project specific files SRC = atomic.c +CONFIG_H = config.h + ifdef keymap KEYMAP = $(keymap) endif @@ -88,7 +68,7 @@ ifneq ("$(wildcard keymaps/$(KEYMAP)/makefile.mk)","") endif else $(error Keymap file does not exist) -endif +endif endif else @@ -107,8 +87,6 @@ endif SRC := $(KEYMAP_FILE) $(SRC) -CONFIG_H = config.h - # MCU name #MCU = at90usb1287 MCU = atmega32u4 @@ -126,7 +104,6 @@ MCU = atmega32u4 # software delays. F_CPU = 16000000 - # # LUFA specific # @@ -158,11 +135,45 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # USBaspLoader 2048 OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Build Options +# 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 = 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 -ifeq ($(BACKLIGHT_ENABLE), yes) - SRC += backlight.c 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 diff --git a/keyboard/atomic/keymaps/pvc/config.h b/keyboard/atomic/keymaps/pvc/config.h new file mode 100644 index 0000000000..8449fa06de --- /dev/null +++ b/keyboard/atomic/keymaps/pvc/config.h @@ -0,0 +1,157 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#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 index 0000000000..627f57ff70 --- /dev/null +++ b/keyboard/atomic/keymaps/pvc/keymap.c @@ -0,0 +1,202 @@ +#include "atomic.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +#define _QW 0 +#define _LW 1 +#define _RS 2 +#define _FN 3 + +#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 }, + }, +}; + +#define IS_LAYER_ON(layer) ((layer_state) & (1<<(layer))) +#define IS_LAYER_OFF(layer) ((!layer_state) & (1<<(layer))) + + +#ifdef AUDIO_ENABLE +float tone_lw[][2] = { + {440.0*pow(2.0,(59)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {0, 4}, + {440.0*pow(2.0,(67)/12.0), 16} +}; + +float tone_rs[][2] = { + {440.0*pow(2.0,(59)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {0, 4}, + {440.0*pow(2.0,(67)/12.0), 16}, + {0, 4}, + {440.0*pow(2.0,(71)/12.0), 16} +}; + +float tone_fn[][2] = { + {440.0*pow(2.0,(59)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {0, 4}, + {440.0*pow(2.0,(67)/12.0), 16}, + {0, 4}, + {440.0*pow(2.0,(69)/12.0), 16}, + {0, 4}, + {440.0*pow(2.0,(67)/12.0), 16} +}; +#endif + + +void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) +{ + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) + { + #ifdef AUDIO_ENABLE + println("PlayNotes FN"); + play_notes(&tone_fn, 8, false); + #endif + layer_on(layer3); + } + else + { + layer_off(layer3); + } +} + +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[] = { +}; + + +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_notes(&tone_lw, 4, false); + #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_notes(&tone_rs, 6, false); + #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] = { + {440.0*pow(2.0,(67)/12.0), 12}, + {440.0*pow(2.0,(64)/12.0), 8}, + {440.0*pow(2.0,(55)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {440.0*pow(2.0,(64)/12.0), 20} +}; +#endif + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + init_notes(); + play_notes(&start_up, 5, false); + println("Matrix Init"); + #endif +} diff --git a/keyboard/atomic/keymaps/pvc/makefile.mk b/keyboard/atomic/keymaps/pvc/makefile.mk index ff0a9c338b..c41102f5d4 100644 --- a/keyboard/atomic/keymaps/pvc/makefile.mk +++ b/keyboard/atomic/keymaps/pvc/makefile.mk @@ -1,16 +1,18 @@ BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration 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 = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 +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 diff --git a/keyboard/atomic/keymaps/pvc/pvc_atomic.c b/keyboard/atomic/keymaps/pvc/pvc_atomic.c deleted file mode 100644 index 3ddd3e3294..0000000000 --- a/keyboard/atomic/keymaps/pvc/pvc_atomic.c +++ /dev/null @@ -1,221 +0,0 @@ -#include "atomic.h" -#include "action_layer.h" - -#define _QW 0 -#define _LW 1 -#define _RS 2 -#define _FN 3 -#define _F1 4 -#define _F2 5 - -#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(_FN), KC_LALT, M(_RS), KC_SPC, XXXXXXX, 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 }, - }, - [_F1] = { /* 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 }, - }, - [_F2] = { /* 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 }, - }, -}; - -#define IS_LAYER_ON(layer) ((layer_state) & (1<<(layer))) -#define IS_LAYER_OFF(layer) ((!layer_state) & (1<<(layer))) - -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); - } -} - -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); - } - } -} - -/* ignore me -void change_quad_layer(uint8_t focus_layer, bool desired_focus_layer_state, uint8_t pair_layer, uint8_t layer3, uint8_t layer4) -{ - - // If desired focus layer state == 1 and current focus layer state == 1 - if ((desired_focus_layer_state) && IS_LAYER_ON(layer1)) - { - // Do Nothing - } - // If desired focus layer state == 0 and current focus layer state == 1 - else if ((desired_focus_layer_state) && IS_LAYER_ON(layer1)) - { - // If - 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[] = { -}; - - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - - // MACRODOWN only works in this function - switch(id) - { - case _FN: - if (record->event.pressed) { - print("FN_DN\n"); - print_val_bin32(layer_state); - layer_on(_FN); - print_val_bin32(layer_state); - } else { - print("FN_UP\n"); - print_val_bin32(layer_state); - layer_off(_FN); - print_val_bin32(layer_state); - } - break; - - case _RS: - if (record->event.pressed) { - print("RS_DN\n"); - print_val_bin32(layer_state); - layer_on(_RS); - //tri_layer++; - print_val_bin32(layer_state); - //update_tri_layer(_RS, _LW, _FN); - update_quad_layer(_RS, _LW, _F1, _F2, 0); - print_val_bin32(layer_state); - } else { - print("RS_UP\n"); - print_val_bin32(layer_state); - layer_off(_RS); - //tri_layer--; - print_val_bin32(layer_state); - //update_tri_layer(_RS, _LW, _FN); - update_quad_layer(_RS, _LW, _F1, _F2, 0); - print_val_bin32(layer_state); - } - break; - - case _LW: - if (record->event.pressed) { - print("LW_DN\n"); - print_val_bin32(layer_state); - layer_on(_LW); - //tri_layer++; - print_val_bin32(layer_state); - //update_tri_layer(_RS, _LW, _FN); - update_quad_layer(_RS, _LW, _F1, _F2, 1); - print_val_bin32(layer_state); - } else { - print("LW_UP\n"); - print_val_bin32(layer_state); - layer_off(_LW); - //tri_layer--; - print_val_bin32(layer_state); - //update_tri_layer(_RS, _LW, _FN); - update_quad_layer(_RS, _LW, _F1, _F2, 1); - print_val_bin32(layer_state); - } - break; - - default: - break; - } - return MACRO_NONE; -}; diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index c8517e756f..83b8303b02 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -157,39 +157,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifdef KEYMAP -<<<<<<< HEAD -<<<<<<< HEAD -# 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 -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 = ye # 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. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend - - -ifdef BACKLIGHT_ENABLE -======= -ifeq ($(BACKLIGHT_ENABLE), yes) ->>>>>>> master - SRC += backlight.c -======= ifeq ("$(wildcard keymaps/$(KEYMAP).c)","") ifneq ("$(wildcard keymaps/$(KEYMAP)/makefile.mk)","") include keymaps/$(KEYMAP)/makefile.mk endif ->>>>>>> remotes/jackhumbert/new_defaults endif else @@ -212,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 diff --git a/quantum/audio.h b/quantum/audio.h index 99203cea7a..31f9a35793 100644 --- a/quantum/audio.h +++ b/quantum/audio.h @@ -6,6 +6,6 @@ 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 stop_all_notes(void); +void init_notes(void); void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat); \ No newline at end of file -- cgit v1.2.3 From 2aa51e4416b65317b16660c0676696974b2dcfc5 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Fri, 15 Apr 2016 16:32:44 -0500 Subject: Tweaking PVC atomic layout --- keyboard/atomic/Makefile | 30 +++++++++++++++--------------- keyboard/atomic/keymaps/pvc/keymap.c | 13 +++++++++++-- keyboard/atomic/keymaps/pvc/makefile.mk | 27 +++++++++++++-------------- 3 files changed, 39 insertions(+), 31 deletions(-) diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile index 1203cf6a39..3f066aebcd 100644 --- a/keyboard/atomic/Makefile +++ b/keyboard/atomic/Makefile @@ -51,8 +51,6 @@ TARGET_DIR = . # # project specific files SRC = atomic.c -CONFIG_H = config.h - ifdef keymap KEYMAP = $(keymap) endif @@ -87,6 +85,8 @@ endif SRC := $(KEYMAP_FILE) $(SRC) +CONFIG_H = config.h + # MCU name #MCU = at90usb1287 MCU = atmega32u4 @@ -139,21 +139,21 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # 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. +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 = no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifdef KEYMAP diff --git a/keyboard/atomic/keymaps/pvc/keymap.c b/keyboard/atomic/keymaps/pvc/keymap.c index 627f57ff70..7bfd910a17 100644 --- a/keyboard/atomic/keymaps/pvc/keymap.c +++ b/keyboard/atomic/keymaps/pvc/keymap.c @@ -1,13 +1,15 @@ #include "atomic.h" #include "action_layer.h" + #ifdef AUDIO_ENABLE - #include "audio.h" +#include "audio.h" #endif #define _QW 0 #define _LW 1 #define _RS 2 -#define _FN 3 +#define _AD 3 +#define _FN 4 #define M_QW 0 #define M_LW 1 @@ -62,6 +64,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D }, { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, }, + [_ADJ] = { /* ADJUST */ + { 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 }, + }, }; #define IS_LAYER_ON(layer) ((layer_state) & (1<<(layer))) diff --git a/keyboard/atomic/keymaps/pvc/makefile.mk b/keyboard/atomic/keymaps/pvc/makefile.mk index c41102f5d4..d469966501 100644 --- a/keyboard/atomic/keymaps/pvc/makefile.mk +++ b/keyboard/atomic/keymaps/pvc/makefile.mk @@ -1,18 +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 # USB 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. +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 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CONFIG_H = keymaps/$(KEYMAP)/config.h \ No newline at end of file -- cgit v1.2.3 From 549b797ad1ebb30ebaa19af2cf3b7cc2a2c055bc Mon Sep 17 00:00:00 2001 From: Jason Janse van Rensburg Date: Sat, 16 Apr 2016 01:36:18 +0200 Subject: My Attempt at adapting the Bone2 layout with Neo2 navigation cluster & number block to the Planck. Very much a WIP, will most likely start tweaking further once my Planck kit has dropped --- keyboard/planck/keymaps/bone2planck.c | 112 ++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 keyboard/planck/keymaps/bone2planck.c diff --git a/keyboard/planck/keymaps/bone2planck.c b/keyboard/planck/keymaps/bone2planck.c new file mode 100644 index 0000000000..a99e7719f9 --- /dev/null +++ b/keyboard/planck/keymaps/bone2planck.c @@ -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; +}; -- cgit v1.2.3 From 0faa18eab996c2cfcc5da0b60b702f52335c5854 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 15 Apr 2016 23:38:21 -0400 Subject: audio enable stored in eeprom --- keyboard/planck/keymaps/default/keymap.c | 7 ++++- keyboard/preonic/Makefile | 4 +-- keyboard/preonic/keymaps/default/keymap.c | 12 ++++---- quantum/audio.c | 48 ++++++++++++++++++++++++++++++- quantum/audio.h | 14 ++++++++- tmk_core/common/avr/eeconfig.c | 8 ++++++ tmk_core/common/eeconfig.h | 6 ++++ 7 files changed, 89 insertions(+), 10 deletions(-) diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index 56092d04fb..3f34ba4120 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c @@ -135,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_AD] = { {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, _______, _______, _______, _______, M(M_QW), M(M_CM), M(M_DV), _______, _______}, + {_______, _______, _______, _______, M(6), _______, _______, M(M_QW), M(M_CM), M(M_DV), _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -231,6 +231,11 @@ 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) { + audio_toggle(); + } + break; } return MACRO_NONE; }; diff --git a/keyboard/preonic/Makefile b/keyboard/preonic/Makefile index 664aff7321..e48052c825 100644 --- a/keyboard/preonic/Makefile +++ b/keyboard/preonic/Makefile @@ -139,8 +139,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # 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 +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. diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 7846707848..3da69c2155 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -59,11 +59,11 @@ const uint16_t PROGMEM fn_actions[] = { }; 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,(67)/12.0), 4}, + {440.0*pow(2.0,(64)/12.0), 8}, + {440.0*pow(2.0,(55)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {440.0*pow(2.0,(64)/12.0), 10}, }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) @@ -76,8 +76,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) #ifdef BACKLIGHT_ENABLE backlight_step(); #endif + audio_toggle(); } else { unregister_code(KC_RSFT); + play_notes(&start_up, 5, false); } break; } diff --git a/quantum/audio.c b/quantum/audio.c index 50e5505fe0..73985479cc 100644 --- a/quantum/audio.c +++ b/quantum/audio.c @@ -8,6 +8,8 @@ #include "audio.h" #include "keymap_common.h" +#include "eeconfig.h" + #define PI 3.14159265 // #define PWM_AUDIO @@ -57,6 +59,25 @@ uint8_t notes_length; bool notes_repeat; uint8_t current_note = 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; #ifdef PWM_AUDIO @@ -129,6 +150,12 @@ void stop_note(double freq) { 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); @@ -160,7 +187,6 @@ void init_notes() { ISR(TIMER3_COMPA_vect) { - if (note) { #ifdef PWM_AUDIO if (voices == 1) { @@ -288,9 +314,16 @@ ISR(TIMER3_COMPA_vect) { } + if (!audio_config.enable) { + notes = false; + note = false; + } } void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat) { + +if (audio_config.enable) { + if (note) stop_all_notes(); notes = true; @@ -319,7 +352,12 @@ void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat) { #endif } +} + void play_sample(uint8_t * s, uint16_t l, bool r) { + +if (audio_config.enable) { + stop_all_notes(); place_int = 0; sample = s; @@ -330,9 +368,15 @@ 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) { + if (notes) stop_all_notes(); note = true; @@ -367,4 +411,6 @@ void play_note(double freq, int vol) { TCCR3A |= _BV(COM3A1); #endif +} + } \ No newline at end of file diff --git a/quantum/audio.h b/quantum/audio.h index 99203cea7a..58270015df 100644 --- a/quantum/audio.h +++ b/quantum/audio.h @@ -3,9 +3,21 @@ #include #include +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 play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat); diff --git a/tmk_core/common/avr/eeconfig.c b/tmk_core/common/avr/eeconfig.c index 5bd47dc6ad..d0c3f4f570 100644 --- a/tmk_core/common/avr/eeconfig.c +++ b/tmk_core/common/avr/eeconfig.c @@ -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, 0); +#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 diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index 3cd1a174f6..ddefca1347 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h @@ -31,6 +31,7 @@ along with this program. If not, see . #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 -- cgit v1.2.3 From 9d4bfc1bcf9a93b25ce4f7c32d8f3db12c85c23b Mon Sep 17 00:00:00 2001 From: IBNobody Date: Fri, 15 Apr 2016 22:40:07 -0500 Subject: Corrected layer macros --- keyboard/atomic/keymaps/pvc/keymap.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/keyboard/atomic/keymaps/pvc/keymap.c b/keyboard/atomic/keymaps/pvc/keymap.c index 7bfd910a17..7abd7f4f7d 100644 --- a/keyboard/atomic/keymaps/pvc/keymap.c +++ b/keyboard/atomic/keymaps/pvc/keymap.c @@ -64,20 +64,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D }, { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, }, - [_ADJ] = { /* ADJUST */ - { 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___, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, }, }; -#define IS_LAYER_ON(layer) ((layer_state) & (1<<(layer))) -#define IS_LAYER_OFF(layer) ((!layer_state) & (1<<(layer))) - +#define IS_LAYER_ON(layer) (layer_state & (1UL << (layer))) +#define IS_LAYER_OFF(layer) (!IS_LAYER_ON(layer)) #ifdef AUDIO_ENABLE + + + + float tone_lw[][2] = { {440.0*pow(2.0,(59)/12.0), 8}, {440.0*pow(2.0,(60)/12.0), 8}, -- cgit v1.2.3 From c294636c666a6c4a9c170a9a7f62607d48081b3c Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 15 Apr 2016 23:46:35 -0400 Subject: audio on by default --- tmk_core/common/avr/eeconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/common/avr/eeconfig.c b/tmk_core/common/avr/eeconfig.c index d0c3f4f570..25bb9e849c 100644 --- a/tmk_core/common/avr/eeconfig.c +++ b/tmk_core/common/avr/eeconfig.c @@ -14,7 +14,7 @@ void eeconfig_init(void) eeprom_write_byte(EECONFIG_BACKLIGHT, 0); #endif #ifdef AUDIO_ENABLE - eeprom_write_byte(EECONFIG_AUDIO, 0); + eeprom_write_byte(EECONFIG_AUDIO, 0xFF); // On by default #endif } -- cgit v1.2.3 From 0b0ec82427aff54481103559066213056b6d7598 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 16 Apr 2016 00:01:22 -0400 Subject: eeprom reset tool --- quantum/tools/README.md | 6 ++++++ quantum/tools/eeprom_reset.hex | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 quantum/tools/README.md create mode 100644 quantum/tools/eeprom_reset.hex diff --git a/quantum/tools/README.md b/quantum/tools/README.md new file mode 100644 index 0000000000..0702144238 --- /dev/null +++ b/quantum/tools/README.md @@ -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 index 0000000000..a8a75389fe --- /dev/null +++ b/quantum/tools/eeprom_reset.hex @@ -0,0 +1,9 @@ +:10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 +:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0 +:10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 +:10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0 +:10004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0 +:10005000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0 +:10006000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0 +:10007000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF90 +:00000001FF -- cgit v1.2.3 From d81ef5b7eb888ae2878e60d548854413ee3023c6 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 16 Apr 2016 01:19:37 -0400 Subject: new defaults for planck and preonic --- keyboard/planck/keymaps/default/keymap.c | 74 ++++---- keyboard/preonic/Makefile | 55 ++++-- keyboard/preonic/keymaps/default/README.md | 35 +--- keyboard/preonic/keymaps/default/keymap.c | 260 +++++++++++++++++++++++---- keyboard/preonic/keymaps/default/makefile.mk | 1 + 5 files changed, 308 insertions(+), 117 deletions(-) create mode 100644 keyboard/preonic/keymaps/default/makefile.mk diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index 3f34ba4120..ede08ad7f1 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c @@ -19,12 +19,16 @@ #define _AD 5 // Macro name shortcuts -#define M_QW 0 -#define M_CM 1 -#define M_DV 2 -#define M_LW 3 -#define M_RS 4 +#define QWERTY M(_QW) +#define COLEMAK M(_CM) +#define DVORAK M(_DV) +#define LOWER M(_LW) +#define RAISE M(_RS) #define M_BL 5 +#ifdef AUDIO_ENABLE + #define AUD_OFF M(6) + #define AUD_ON M(7) +#endif // Fillers to make layering more clear #define _______ KC_TRNS @@ -47,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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(M_BL), KC_LCTL, KC_LALT, KC_LGUI, M(M_LW), KC_SPC, KC_SPC, M(M_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 @@ -65,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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(M_BL), KC_LCTL, KC_LALT, KC_LGUI, M(M_LW), KC_SPC, KC_SPC, M(M_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 @@ -83,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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(M_BL), KC_LCTL, KC_LALT, KC_LGUI, M(M_LW), KC_SPC, KC_SPC, M(M_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 @@ -126,7 +130,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | Reset| | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | |Qwerty|Colemk|Dvorak| | | + * | | | |Aud on|Audoff| | |Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -135,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_AD] = { {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, _______, M(6), _______, _______, M(M_QW), M(M_CM), M(M_DV), _______, _______}, + {_______, _______, _______, AUD_ON, AUD_OFF, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -146,6 +150,14 @@ const uint16_t PROGMEM fn_actions[] = { }; #ifdef AUDIO_ENABLE +float start_up[][2] = { + {440.0*pow(2.0,(67)/12.0), 12}, + {440.0*pow(2.0,(64)/12.0), 8}, + {440.0*pow(2.0,(55)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {440.0*pow(2.0,(64)/12.0), 20} +}; + float tone_qw[][2] = { {440.0*pow(2.0,(59)/12.0), 8}, {440.0*pow(2.0,(60)/12.0), 8}, @@ -157,20 +169,20 @@ float tone_cm[][2] = { {440.0*pow(2.0,(59)/12.0), 8}, {440.0*pow(2.0,(60)/12.0), 8}, {0, 4}, - {440.0*pow(2.0,(67)/12.0), 16}, + {440.0*pow(2.0,(67)/12.0), 12}, {0, 4}, - {440.0*pow(2.0,(71)/12.0), 16} + {440.0*pow(2.0,(71)/12.0), 12} }; float tone_dv[][2] = { {440.0*pow(2.0,(59)/12.0), 8}, {440.0*pow(2.0,(60)/12.0), 8}, {0, 4}, - {440.0*pow(2.0,(67)/12.0), 16}, + {440.0*pow(2.0,(67)/12.0), 8}, {0, 4}, - {440.0*pow(2.0,(69)/12.0), 16}, + {440.0*pow(2.0,(69)/12.0), 8}, {0, 4}, - {440.0*pow(2.0,(67)/12.0), 16} + {440.0*pow(2.0,(67)/12.0), 8} }; #endif @@ -179,7 +191,7 @@ 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_QW: + case _QW: if (record->event.pressed) { #ifdef AUDIO_ENABLE play_notes(&tone_qw, 4, false); @@ -187,7 +199,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) default_layer_set(1UL<<_QW); } break; - case M_CM: + case _CM: if (record->event.pressed) { #ifdef AUDIO_ENABLE play_notes(&tone_cm, 6, false); @@ -195,7 +207,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) default_layer_set(1UL<<_CM); } break; - case M_DV: + case _DV: if (record->event.pressed) { #ifdef AUDIO_ENABLE play_notes(&tone_dv, 8, false); @@ -203,7 +215,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) default_layer_set(1UL<<_DV); } break; - case M_LW: + case _LW: if (record->event.pressed) { layer_on(_LW); update_tri_layer(_LW, _RS, _AD); @@ -212,7 +224,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) update_tri_layer(_LW, _RS, _AD); } break; - case M_RS: + case _RS: if (record->event.pressed) { layer_on(_RS); update_tri_layer(_LW, _RS, _AD); @@ -233,23 +245,23 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case 6: if (record->event.pressed) { - audio_toggle(); + #ifdef AUDIO_ENABLE + audio_off(); + #endif + } + break; + case 7: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + audio_on(); + play_notes(&start_up, 5, false); + #endif } break; } return MACRO_NONE; }; -#ifdef AUDIO_ENABLE -float start_up[][2] = { - {440.0*pow(2.0,(67)/12.0), 12}, - {440.0*pow(2.0,(64)/12.0), 8}, - {440.0*pow(2.0,(55)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8}, - {440.0*pow(2.0,(64)/12.0), 20} -}; -#endif - void matrix_init_user(void) { #ifdef AUDIO_ENABLE init_notes(); diff --git a/keyboard/preonic/Makefile b/keyboard/preonic/Makefile index e48052c825..eaf9ef927c 100644 --- a/keyboard/preonic/Makefile +++ b/keyboard/preonic/Makefile @@ -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 = 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 - 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 diff --git a/keyboard/preonic/keymaps/default/README.md b/keyboard/preonic/keymaps/default/README.md index d2f43bbdb8..e911968dd9 100644 --- a/keyboard/preonic/keymaps/default/README.md +++ b/keyboard/preonic/keymaps/default/README.md @@ -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 diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 3da69c2155..c52d8472f4 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -1,9 +1,7 @@ -// 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" +#ifdef AUDIO_ENABLE + #include "audio.h" #endif // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -15,42 +13,150 @@ #define _DV 2 #define _LW 3 #define _RS 4 +#define _AD 5 + +// Macro name shortcuts +#define QWERTY M(_QW) +#define COLEMAK M(_CM) +#define DVORAK M(_DV) +#define LOWER M(_LW) +#define RAISE M(_RS) +#define M_BL 5 +#ifdef AUDIO_ENABLE + #define AUD_OFF M(6) + #define AUD_ON M(7) +#endif + +// 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 | + * `-----------------------------------------------------------------------------------' + */ +[_QW] = { {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 | + * `-----------------------------------------------------------------------------------' + */ +[_CM] = { {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 | + * `-----------------------------------------------------------------------------------' + */ +[_DV] = { {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 | + * `-----------------------------------------------------------------------------------' + */ +[_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_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 | + * `-----------------------------------------------------------------------------------' + */ +[_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_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| | |Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_AD] = { + {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, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } }; @@ -58,28 +164,116 @@ const uint16_t PROGMEM fn_actions[] = { }; +#ifdef AUDIO_ENABLE float start_up[][2] = { - {440.0*pow(2.0,(67)/12.0), 4}, + {440.0*pow(2.0,(55)/12.0), 12}, + {0, 2}, + {440.0*pow(2.0,(67)/12.0), 8}, {440.0*pow(2.0,(64)/12.0), 8}, {440.0*pow(2.0,(55)/12.0), 8}, + {440.0*pow(2.0,(67)/12.0), 12}, + {0, 2}, + {440.0*pow(2.0,(67)/12.0), 12} +}; + +float tone_qw[][2] = { + {440.0*pow(2.0,(59)/12.0), 8}, {440.0*pow(2.0,(60)/12.0), 8}, - {440.0*pow(2.0,(64)/12.0), 10}, + {0, 4}, + {440.0*pow(2.0,(67)/12.0), 16} }; +float tone_cm[][2] = { + {440.0*pow(2.0,(59)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {0, 4}, + {440.0*pow(2.0,(67)/12.0), 12}, + {0, 4}, + {440.0*pow(2.0,(71)/12.0), 12} +}; + +float tone_dv[][2] = { + {440.0*pow(2.0,(59)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {0, 4}, + {440.0*pow(2.0,(67)/12.0), 8}, + {0, 4}, + {440.0*pow(2.0,(69)/12.0), 8}, + {0, 4}, + {440.0*pow(2.0,(67)/12.0), 8} +}; +#endif + + 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 _QW: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + play_notes(&tone_qw, 4, false); + #endif + default_layer_set(1UL<<_QW); + } + break; + case _CM: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + play_notes(&tone_cm, 6, false); + #endif + default_layer_set(1UL<<_CM); + } + break; + case _DV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + play_notes(&tone_dv, 8, false); + #endif + default_layer_set(1UL<<_DV); + } + break; + case _LW: + if (record->event.pressed) { + layer_on(_LW); + update_tri_layer(_LW, _RS, _AD); + } else { + layer_off(_LW); + update_tri_layer(_LW, _RS, _AD); + } + break; + case _RS: + if (record->event.pressed) { + layer_on(_RS); + update_tri_layer(_LW, _RS, _AD); + } else { + layer_off(_RS); + update_tri_layer(_LW, _RS, _AD); + } + break; + case M_BL: if (record->event.pressed) { register_code(KC_RSFT); #ifdef BACKLIGHT_ENABLE backlight_step(); #endif - audio_toggle(); } else { unregister_code(KC_RSFT); - play_notes(&start_up, 5, false); + } + 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_notes(&start_up, 7, false); + #endif } break; } @@ -87,8 +281,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) }; void matrix_init_user(void) { -#ifdef AUDIO_ENABLE + #ifdef AUDIO_ENABLE init_notes(); - play_notes(&start_up, 5, false); -#endif + play_notes(&start_up, 7, false); + #endif } diff --git a/keyboard/preonic/keymaps/default/makefile.mk b/keyboard/preonic/keymaps/default/makefile.mk new file mode 100644 index 0000000000..628167ff66 --- /dev/null +++ b/keyboard/preonic/keymaps/default/makefile.mk @@ -0,0 +1 @@ +AUDIO_ENABLE = yes \ No newline at end of file -- cgit v1.2.3 From 142ce47698613bb8fb757f13c29928a572a4d9d9 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 16 Apr 2016 01:23:08 -0400 Subject: added keymap_extras to path --- quantum/quantum.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/quantum/quantum.mk b/quantum/quantum.mk index 17bb501718..1fe7390eba 100644 --- a/quantum/quantum.mk +++ b/quantum/quantum.mk @@ -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 -- cgit v1.2.3 From 86169833c597fa5f2b5226e1587c48a6692ec017 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 16 Apr 2016 15:47:17 -0400 Subject: updates to preonic default, music mode integrated --- keyboard/preonic/keymaps/default/keymap.c | 160 ++++++++++++++++++++---------- quantum/audio.c | 100 ++++++++++--------- 2 files changed, 165 insertions(+), 95 deletions(-) diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index c52d8472f4..6824f68b60 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -1,31 +1,40 @@ #include "preonic.h" #include "action_layer.h" +#include "eeconfig.h" #ifdef AUDIO_ENABLE #include "audio.h" + #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), } #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 _AD 5 +#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(_QW) -#define COLEMAK M(_CM) -#define DVORAK M(_DV) -#define LOWER M(_LW) -#define RAISE M(_RS) +#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 @@ -46,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |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_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}, @@ -67,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |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_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}, @@ -88,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |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_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}, @@ -109,7 +118,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_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_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}, @@ -130,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | 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_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}, @@ -151,10 +160,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_AD] = { +[_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, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______}, + {_______, _______, _______, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Music (reserved for process_action_user) + * + */ +[_MUSIC] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -166,24 +186,20 @@ const uint16_t PROGMEM fn_actions[] = { #ifdef AUDIO_ENABLE float start_up[][2] = { - {440.0*pow(2.0,(55)/12.0), 12}, - {0, 2}, - {440.0*pow(2.0,(67)/12.0), 8}, - {440.0*pow(2.0,(64)/12.0), 8}, - {440.0*pow(2.0,(55)/12.0), 8}, - {440.0*pow(2.0,(67)/12.0), 12}, - {0, 2}, - {440.0*pow(2.0,(67)/12.0), 12} + {440.0*pow(2.0,(50)/12.0), 20}, + {440.0*pow(2.0,(62)/12.0), 8}, + {440.0*pow(2.0,(54)/12.0), 20}, + {440.0*pow(2.0,(62)/12.0), 8} }; -float tone_qw[][2] = { +float tone_qwerty[][2] = { {440.0*pow(2.0,(59)/12.0), 8}, {440.0*pow(2.0,(60)/12.0), 8}, {0, 4}, {440.0*pow(2.0,(67)/12.0), 16} }; -float tone_cm[][2] = { +float tone_colemak[][2] = { {440.0*pow(2.0,(59)/12.0), 8}, {440.0*pow(2.0,(60)/12.0), 8}, {0, 4}, @@ -192,7 +208,7 @@ float tone_cm[][2] = { {440.0*pow(2.0,(71)/12.0), 12} }; -float tone_dv[][2] = { +float tone_dvorak[][2] = { {440.0*pow(2.0,(59)/12.0), 8}, {440.0*pow(2.0,(60)/12.0), 8}, {0, 4}, @@ -202,53 +218,66 @@ float tone_dv[][2] = { {0, 4}, {440.0*pow(2.0,(67)/12.0), 8} }; + +float tone_music[][2] = { + {440.0*pow(2.0,(48)/12.0), 8}, + {440.0*pow(2.0,(50)/12.0), 8}, + {440.0*pow(2.0,(52)/12.0), 8}, + {440.0*pow(2.0,(53)/12.0), 8}, + {440.0*pow(2.0,(55)/12.0), 8}, + {440.0*pow(2.0,(57)/12.0), 8}, + {440.0*pow(2.0,(59)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8} +}; #endif const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function switch(id) { - case _QW: + case _QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_qw, 4, false); + play_notes(&tone_qwerty, 4, false); #endif - default_layer_set(1UL<<_QW); + eeconfig_write_default_layer(1UL<<_QWERTY); + default_layer_set(1UL<<_QWERTY); } break; - case _CM: + case _COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_cm, 6, false); + play_notes(&tone_colemak, 6, false); #endif - default_layer_set(1UL<<_CM); + eeconfig_write_default_layer(1UL<<_COLEMAK); + default_layer_set(1UL<<_COLEMAK); } break; - case _DV: + case _DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_dv, 8, false); + play_notes(&tone_dvorak, 8, false); #endif - default_layer_set(1UL<<_DV); + eeconfig_write_default_layer(1UL<<_DVORAK); + default_layer_set(1UL<<_DVORAK); } break; - case _LW: + case _LOWER: if (record->event.pressed) { - layer_on(_LW); - update_tri_layer(_LW, _RS, _AD); + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } else { - layer_off(_LW); - update_tri_layer(_LW, _RS, _AD); + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } break; - case _RS: + case _RAISE: if (record->event.pressed) { - layer_on(_RS); - update_tri_layer(_LW, _RS, _AD); + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } else { - layer_off(_RS); - update_tri_layer(_LW, _RS, _AD); + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } break; case M_BL: @@ -272,7 +301,23 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE audio_on(); - play_notes(&start_up, 7, false); + play_notes(&start_up, 4, false); + #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_notes(&tone_music, 8, false); + layer_on(_MUSIC); #endif } break; @@ -280,9 +325,24 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) 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)261.626)*pow(2.0, -2.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)261.626)*pow(2.0, -2.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_notes(&start_up, 7, false); + play_notes(&start_up, 4, false); #endif } diff --git a/quantum/audio.c b/quantum/audio.c index 73985479cc..5edcccdbe1 100644 --- a/quantum/audio.c +++ b/quantum/audio.c @@ -32,6 +32,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}; @@ -98,53 +100,55 @@ 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; } } @@ -239,13 +243,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] / 500)) { 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 + OCR3A = (int)(((double)F_CPU) / frequencies[voice_place]) >> 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 } @@ -375,7 +385,7 @@ if (audio_config.enable) { void play_note(double freq, int vol) { -if (audio_config.enable) { +if (audio_config.enable && voices < 8) { if (notes) stop_all_notes(); -- cgit v1.2.3 From ab19ebd08a8b955775e6fa94cdf6b8d128d8b43c Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 16 Apr 2016 18:51:58 -0400 Subject: MAGIC functionality, AG swap in default layout --- keyboard/planck/keymaps/default/README.md | 32 ---- keyboard/preonic/Makefile | 2 +- keyboard/preonic/keymaps/default/keymap.c | 19 +-- quantum/keymap_common.c | 250 +++++++++++++++++------------- quantum/keymap_common.h | 28 +++- tmk_core/common.mk | 3 + tmk_core/common/keyboard.c | 8 +- tmk_core/common/keymap.h | 3 - tmk_core/common/magic.c | 36 +++++ tmk_core/common/magic.h | 6 + 10 files changed, 226 insertions(+), 161 deletions(-) create mode 100644 tmk_core/common/magic.c create mode 100644 tmk_core/common/magic.h diff --git a/keyboard/planck/keymaps/default/README.md b/keyboard/planck/keymaps/default/README.md index d2f43bbdb8..de9680b498 100644 --- a/keyboard/planck/keymaps/default/README.md +++ b/keyboard/planck/keymaps/default/README.md @@ -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 diff --git a/keyboard/preonic/Makefile b/keyboard/preonic/Makefile index eaf9ef927c..9199968c3d 100644 --- a/keyboard/preonic/Makefile +++ b/keyboard/preonic/Makefile @@ -130,7 +130,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # 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) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 6824f68b60..e1f9b62029 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -153,9 +153,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | | Reset| | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Audoff|Aud on| | |Qwerty|Colemk|Dvorak| | | + * | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | | | |Musoff|Mus on| | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______}, + {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, _______, _______, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -231,6 +231,10 @@ float tone_music[][2] = { }; #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) { @@ -240,8 +244,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) #ifdef AUDIO_ENABLE play_notes(&tone_qwerty, 4, false); #endif - eeconfig_write_default_layer(1UL<<_QWERTY); - default_layer_set(1UL<<_QWERTY); + persistant_default_layer_set(1UL<<_QWERTY); } break; case _COLEMAK: @@ -249,8 +252,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) #ifdef AUDIO_ENABLE play_notes(&tone_colemak, 6, false); #endif - eeconfig_write_default_layer(1UL<<_COLEMAK); - default_layer_set(1UL<<_COLEMAK); + persistant_default_layer_set(1UL<<_COLEMAK); } break; case _DVORAK: @@ -258,8 +260,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) #ifdef AUDIO_ENABLE play_notes(&tone_dvorak, 8, false); #endif - eeconfig_write_default_layer(1UL<<_DVORAK); - default_layer_set(1UL<<_DVORAK); + persistant_default_layer_set(1UL<<_DVORAK); } break; case _LOWER: diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 3a00d36f08..b919166853 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -27,6 +27,8 @@ along with this program. If not, see . #include "keymap_midi.h" #include "bootloader.h" +extern keymap_config_t keymap_config; + #include #include #ifdef AUDIO_ENABLE @@ -47,120 +49,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 - action_t action; - clear_keyboard(); - #ifdef AUDIO_ENABLE - play_notes(&goodbye, 3, false); - #endif - _delay_ms(250); - #ifdef ATREUS_ASTAR - *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific - #endif - bootloader_jump(); - return action; - } else if (keycode == DEBUG) { // DEBUG is 0x5001 - // TODO: Does this actually work? - action_t action; - print("\nDEBUG: enabled.\n"); - debug_enable = true; - return action; - } 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 +115,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 +155,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_notes(&goodbye, 3, false); + #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; diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h index 7452a1ff3f..ce87e4770e 100644 --- a/quantum/keymap_common.h +++ b/quantum/keymap_common.h @@ -30,7 +30,6 @@ along with this program. If not, see . // #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 @@ -213,4 +234,5 @@ 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 diff --git a/tmk_core/common.mk b/tmk_core/common.mk index f8006c6708..9cb2eb8ecd 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -21,6 +21,9 @@ 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 ifeq ($(strip $(MOUSEKEY_ENABLE)), yes) diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 302b3ec87c..1d99818481 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -27,7 +27,11 @@ along with this program. If not, see . #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 diff --git a/tmk_core/common/keymap.h b/tmk_core/common/keymap.h index e1a6f992e6..abc9bdb32d 100644 --- a/tmk_core/common/keymap.h +++ b/tmk_core/common/keymap.h @@ -22,8 +22,6 @@ along with this program. If not, see . #include #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 index 0000000000..f21d1346c7 --- /dev/null +++ b/tmk_core/common/magic.c @@ -0,0 +1,36 @@ +#include +#include +#include +#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 index 0000000000..3fa2d8b81c --- /dev/null +++ b/tmk_core/common/magic.h @@ -0,0 +1,6 @@ +#ifndef MAGIC_H +#define MAGIC_H + +void magic(void); + +#endif -- cgit v1.2.3 From b8d2e66638409066661e7dd3c66473d583256ec5 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 16 Apr 2016 19:30:15 -0400 Subject: readme clarity for rgbleds --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 613bdcf42b..6e1ab9bc53 100644 --- a/README.md +++ b/README.md @@ -304,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 @@ -314,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 -- cgit v1.2.3 From c83aa16f1d614c1c10f7597a67ffb9f2ae871951 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 16 Apr 2016 20:26:02 -0400 Subject: fixes audio prescaler to emit correct freq --- keyboard/preonic/keymaps/default/keymap.c | 52 +++++++++++++++---------------- quantum/audio.c | 12 ++++--- quantum/keymap_common.c | 6 ++-- 3 files changed, 36 insertions(+), 34 deletions(-) diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index e1f9b62029..6b62623180 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -186,48 +186,48 @@ const uint16_t PROGMEM fn_actions[] = { #ifdef AUDIO_ENABLE float start_up[][2] = { - {440.0*pow(2.0,(50)/12.0), 20}, - {440.0*pow(2.0,(62)/12.0), 8}, - {440.0*pow(2.0,(54)/12.0), 20}, - {440.0*pow(2.0,(62)/12.0), 8} + {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,(59)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8}, + {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,(67)/12.0), 16} + {440.0*pow(2.0,(31)/12.0), 16} }; float tone_colemak[][2] = { - {440.0*pow(2.0,(59)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8}, + {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,(67)/12.0), 12}, + {440.0*pow(2.0,(31)/12.0), 12}, {0, 4}, - {440.0*pow(2.0,(71)/12.0), 12} + {440.0*pow(2.0,(35)/12.0), 12} }; float tone_dvorak[][2] = { - {440.0*pow(2.0,(59)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8}, + {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,(67)/12.0), 8}, + {440.0*pow(2.0,(31)/12.0), 8}, {0, 4}, - {440.0*pow(2.0,(69)/12.0), 8}, + {440.0*pow(2.0,(33)/12.0), 8}, {0, 4}, - {440.0*pow(2.0,(67)/12.0), 8} + {440.0*pow(2.0,(31)/12.0), 8} }; float tone_music[][2] = { - {440.0*pow(2.0,(48)/12.0), 8}, - {440.0*pow(2.0,(50)/12.0), 8}, - {440.0*pow(2.0,(52)/12.0), 8}, - {440.0*pow(2.0,(53)/12.0), 8}, - {440.0*pow(2.0,(55)/12.0), 8}, - {440.0*pow(2.0,(57)/12.0), 8}, - {440.0*pow(2.0,(59)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8} + {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 @@ -333,9 +333,9 @@ void process_action_user(keyrecord_t *record) { if (IS_LAYER_ON(_MUSIC)) { if (record->event.pressed) { - play_note(((double)261.626)*pow(2.0, -2.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF); + play_note(((double)261.626)*pow(2.0, -3.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)261.626)*pow(2.0, -2.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); + stop_note(((double)261.626)*pow(2.0, -3.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); } } diff --git a/quantum/audio.c b/quantum/audio.c index 5edcccdbe1..470dc8e0c7 100644 --- a/quantum/audio.c +++ b/quantum/audio.c @@ -12,6 +12,8 @@ #define PI 3.14159265 +#define CPU_PRESCALER 8 + // #define PWM_AUDIO #ifdef PWM_AUDIO @@ -244,12 +246,12 @@ ISR(TIMER3_COMPA_vect) { // ICR3 = (int)(((double)F_CPU) / frequency); // Set max to the period // OCR3A = (int)(((double)F_CPU) / frequency) >> 1; // Set compare to half the period voice_place %= voices; - if (place > (frequencies[voice_place] / 500)) { + 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 * duty_place; // 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; @@ -281,8 +283,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; diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index b919166853..899437f447 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -35,9 +35,9 @@ extern keymap_config_t keymap_config; #include "audio.h" float goodbye[][2] = { - {440.0*pow(2.0,(67)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8}, - {440.0*pow(2.0,(55)/12.0), 12}, + {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 -- cgit v1.2.3 From b5c22ab5b5b77d5e21cc4145831608eed6756ad7 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Sat, 16 Apr 2016 19:27:21 -0500 Subject: Merging with QMK main to fix audio issues --- keyboard/atomic/keymaps/pvc/keymap.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/keyboard/atomic/keymaps/pvc/keymap.c b/keyboard/atomic/keymaps/pvc/keymap.c index 7abd7f4f7d..189da16c47 100644 --- a/keyboard/atomic/keymaps/pvc/keymap.c +++ b/keyboard/atomic/keymaps/pvc/keymap.c @@ -3,8 +3,10 @@ #ifdef AUDIO_ENABLE #include "audio.h" +#include "musical_notes.h" #endif + #define _QW 0 #define _LW 1 #define _RS 2 @@ -82,10 +84,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float tone_lw[][2] = { - {440.0*pow(2.0,(59)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8}, - {0, 4}, - {440.0*pow(2.0,(67)/12.0), 16} +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 ) , }; float tone_rs[][2] = { @@ -158,6 +168,7 @@ void update_quad_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3, uint8_t l const uint16_t PROGMEM fn_actions[] = { }; +#define ARRAY_SIZE(x) ((sizeof x) / (sizeof *x)) const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { @@ -167,7 +178,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE println("PlayNotes LW"); - play_notes(&tone_lw, 4, false); + print_val_hex32(ARRAY_SIZE(tone_lw)); + play_notes(&tone_lw, 12, false); #endif layer_on(_LW); update_tri_layer(_LW, _RS, _FN); -- cgit v1.2.3 From 41cc35425ab32c9a9492006da8b667d01d32dfa6 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 16 Apr 2016 21:31:40 -0400 Subject: rests between notes as an argument --- keyboard/planck/keymaps/default/keymap.c | 10 +++++----- keyboard/preonic/keymaps/default/keymap.c | 16 ++++++++-------- quantum/audio.c | 29 +++++++++++++++++++++-------- quantum/audio.h | 3 ++- quantum/keymap_common.c | 2 +- 5 files changed, 37 insertions(+), 23 deletions(-) diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index ede08ad7f1..a6edefefd9 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c @@ -194,7 +194,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _QW: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_qw, 4, false); + play_notes(&tone_qw, 4, false, 0); #endif default_layer_set(1UL<<_QW); } @@ -202,7 +202,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _CM: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_cm, 6, false); + play_notes(&tone_cm, 6, false, 0); #endif default_layer_set(1UL<<_CM); } @@ -210,7 +210,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _DV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_dv, 8, false); + play_notes(&tone_dv, 8, false, 0); #endif default_layer_set(1UL<<_DV); } @@ -254,7 +254,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE audio_on(); - play_notes(&start_up, 5, false); + play_notes(&start_up, 5, false, 0); #endif } break; @@ -265,6 +265,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) void matrix_init_user(void) { #ifdef AUDIO_ENABLE init_notes(); - play_notes(&start_up, 5, false); + play_notes(&start_up, 5, false, 0); #endif } diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 6b62623180..1223793cfa 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -242,7 +242,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_qwerty, 4, false); + play_notes(&tone_qwerty, 4, false, 0); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -250,7 +250,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_colemak, 6, false); + play_notes(&tone_colemak, 6, false, 1); #endif persistant_default_layer_set(1UL<<_COLEMAK); } @@ -258,7 +258,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_dvorak, 8, false); + play_notes(&tone_dvorak, 8, false, 10); #endif persistant_default_layer_set(1UL<<_DVORAK); } @@ -302,7 +302,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE audio_on(); - play_notes(&start_up, 4, false); + play_notes(&start_up, 4, false, 0); #endif } break; @@ -317,7 +317,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case 9: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_music, 8, false); + play_notes(&tone_music, 8, false, 0); layer_on(_MUSIC); #endif } @@ -333,9 +333,9 @@ void process_action_user(keyrecord_t *record) { if (IS_LAYER_ON(_MUSIC)) { if (record->event.pressed) { - play_note(((double)261.626)*pow(2.0, -3.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF); + 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)261.626)*pow(2.0, -3.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); + 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))); } } @@ -344,6 +344,6 @@ void process_action_user(keyrecord_t *record) { void matrix_init_user(void) { #ifdef AUDIO_ENABLE init_notes(); - play_notes(&start_up, 4, false); + play_notes(&start_up, 4, false, 0); #endif } diff --git a/quantum/audio.c b/quantum/audio.c index 470dc8e0c7..40d09d62fd 100644 --- a/quantum/audio.c +++ b/quantum/audio.c @@ -61,7 +61,11 @@ 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; @@ -314,13 +318,21 @@ 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 && ((int)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; } @@ -332,7 +344,7 @@ ISR(TIMER3_COMPA_vect) { } } -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) { @@ -343,6 +355,7 @@ if (audio_config.enable) { notes_pointer = np; notes_length = n_length; notes_repeat = n_repeat; + notes_rest = n_rest; place = 0; current_note = 0; diff --git a/quantum/audio.h b/quantum/audio.h index 58270015df..65a6f9434d 100644 --- a/quantum/audio.h +++ b/quantum/audio.h @@ -2,6 +2,7 @@ #include #include #include +#include "musical_notes.h" typedef union { uint8_t raw; @@ -20,4 +21,4 @@ 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); +void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat, float n_rest); diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 899437f447..457f70a448 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -189,7 +189,7 @@ static action_t keycode_to_action(uint16_t keycode) case RESET: ; // RESET is 0x5000, which is why this is here clear_keyboard(); #ifdef AUDIO_ENABLE - play_notes(&goodbye, 3, false); + play_notes(&goodbye, 3, false, 0); #endif _delay_ms(250); #ifdef ATREUS_ASTAR -- cgit v1.2.3 From a87522033d6385ecd2422f26f5bb6bdad9d44676 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Sat, 16 Apr 2016 20:37:22 -0500 Subject: Merging with QMK main to fix rest issues --- keyboard/atomic/keymaps/pvc/keymap.c | 169 ++++++++++++++++++++++++++++------- 1 file changed, 139 insertions(+), 30 deletions(-) diff --git a/keyboard/atomic/keymaps/pvc/keymap.c b/keyboard/atomic/keymaps/pvc/keymap.c index 189da16c47..229708344f 100644 --- a/keyboard/atomic/keymaps/pvc/keymap.c +++ b/keyboard/atomic/keymaps/pvc/keymap.c @@ -84,6 +84,59 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 ) , @@ -96,15 +149,64 @@ 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] = { - {440.0*pow(2.0,(59)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8}, - {0, 4}, - {440.0*pow(2.0,(67)/12.0), 16}, - {0, 4}, - {440.0*pow(2.0,(71)/12.0), 16} +Q_NOTE(_F8 ) , +Q_NOTE(_G8 ) , +Q_NOTE(_GS8 ) , +Q_NOTE(_A8 ) , +Q_NOTE(_AS8 ) , +Q_NOTE(_B8 ) , }; float tone_fn[][2] = { @@ -119,23 +221,6 @@ float tone_fn[][2] = { }; #endif - -void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) -{ - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) - { - #ifdef AUDIO_ENABLE - println("PlayNotes FN"); - play_notes(&tone_fn, 8, false); - #endif - layer_on(layer3); - } - else - { - layer_off(layer3); - } -} - void update_quad_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3, uint8_t layer4, bool order) { if (order) @@ -179,7 +264,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) #ifdef AUDIO_ENABLE println("PlayNotes LW"); print_val_hex32(ARRAY_SIZE(tone_lw)); - play_notes(&tone_lw, 12, false); + play_notes(&tone_lw, 96, false); #endif layer_on(_LW); update_tri_layer(_LW, _RS, _FN); @@ -209,18 +294,42 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) #ifdef AUDIO_ENABLE float start_up[][2] = { - {440.0*pow(2.0,(67)/12.0), 12}, - {440.0*pow(2.0,(64)/12.0), 8}, - {440.0*pow(2.0,(55)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8}, - {440.0*pow(2.0,(64)/12.0), 20} +Q_NOTE(_E4 ) , +{0,1} , +Q_NOTE(_E4 ) , +{0,1} , +Q_NOTE(_F4 ) , +{0,1} , +Q_NOTE(_G4 ) , +{0,1} , +Q_NOTE(_G4 ) , +{0,1} , +Q_NOTE(_F4 ) , +{0,1} , +Q_NOTE(_E4 ) , +{0,1} , +Q_NOTE(_D4 ) , +{0,1} , +Q_NOTE(_C4 ) , +{0,1} , +Q_NOTE(_C4 ) , +{0,1} , +Q_NOTE(_D4 ) , +{0,1} , +Q_NOTE(_E4 ) , +{0,1} , +H_NOTE(_E4 ) , +{0,1} , +Q_NOTE(_D4 ) , +{0,1} , +H_NOTE(_D4 ) , }; #endif void matrix_init_user(void) { #ifdef AUDIO_ENABLE init_notes(); - play_notes(&start_up, 5, false); + play_notes(&start_up, 29, false); println("Matrix Init"); #endif } -- cgit v1.2.3 From 8bbd064cf52a76508589579f19595607a1f3af21 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 16 Apr 2016 23:07:50 -0400 Subject: changes to play_notes, goodbye --- keyboard/planck/keymaps/default/keymap.c | 10 +++++----- keyboard/preonic/Makefile | 2 +- keyboard/preonic/config.h | 4 ++-- keyboard/preonic/keymaps/default/keymap.c | 12 ++++++------ quantum/audio.c | 2 +- quantum/keymap_common.c | 16 +++++++++------- 6 files changed, 24 insertions(+), 22 deletions(-) diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index a6edefefd9..5591b337dd 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c @@ -194,7 +194,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _QW: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_qw, 4, false, 0); + play_notes(&tone_qw, false, 0); #endif default_layer_set(1UL<<_QW); } @@ -202,7 +202,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _CM: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_cm, 6, false, 0); + play_notes(&tone_cm, false, 0); #endif default_layer_set(1UL<<_CM); } @@ -210,7 +210,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _DV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_dv, 8, false, 0); + play_notes(&tone_dv, false, 0); #endif default_layer_set(1UL<<_DV); } @@ -254,7 +254,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE audio_on(); - play_notes(&start_up, 5, false, 0); + play_notes(&start_up, false, 0); #endif } break; @@ -265,6 +265,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) void matrix_init_user(void) { #ifdef AUDIO_ENABLE init_notes(); - play_notes(&start_up, 5, false, 0); + play_notes(&start_up, false, 0); #endif } diff --git a/keyboard/preonic/Makefile b/keyboard/preonic/Makefile index 9199968c3d..3504e27201 100644 --- a/keyboard/preonic/Makefile +++ b/keyboard/preonic/Makefile @@ -133,7 +133,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +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 diff --git a/keyboard/preonic/config.h b/keyboard/preonic/config.h index 5528667fa7..bb9d29dab7 100644 --- a/keyboard/preonic/config.h +++ b/keyboard/preonic/config.h @@ -73,10 +73,10 @@ along with this program. If not, see . */ /* 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/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 1223793cfa..c7b6b89f2c 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -242,7 +242,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_qwerty, 4, false, 0); + play_notes(&tone_qwerty, false, 0); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -250,7 +250,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_colemak, 6, false, 1); + play_notes(&tone_colemak, false, 0); #endif persistant_default_layer_set(1UL<<_COLEMAK); } @@ -258,7 +258,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case _DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_dvorak, 8, false, 10); + play_notes(&tone_dvorak, false, 0); #endif persistant_default_layer_set(1UL<<_DVORAK); } @@ -302,7 +302,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE audio_on(); - play_notes(&start_up, 4, false, 0); + play_notes(&start_up, false, 0); #endif } break; @@ -317,7 +317,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case 9: if (record->event.pressed) { #ifdef AUDIO_ENABLE - play_notes(&tone_music, 8, false, 0); + play_notes(&tone_music, false, 0); layer_on(_MUSIC); #endif } @@ -344,6 +344,6 @@ void process_action_user(keyrecord_t *record) { void matrix_init_user(void) { #ifdef AUDIO_ENABLE init_notes(); - play_notes(&start_up, 4, false, 0); + play_notes(&start_up, false, 0); #endif } diff --git a/quantum/audio.c b/quantum/audio.c index 40d09d62fd..773edfd8ee 100644 --- a/quantum/audio.c +++ b/quantum/audio.c @@ -318,7 +318,7 @@ ISR(TIMER3_COMPA_vect) { return; } } - if (!note_resting && ((int)notes_rest != 0)) { + if (!note_resting && (notes_rest > 0)) { note_resting = true; note_frequency = 0; note_length = notes_rest; diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 457f70a448..8f35521a2d 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -33,12 +33,14 @@ extern keymap_config_t keymap_config; #include #ifdef AUDIO_ENABLE #include "audio.h" - - float goodbye[][2] = { - {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}, - }; + #ifndef GOODBYE_TUNE + #define GOODBYE_TUNE { \ + {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 goodbye_tune[][2] = GOODBYE_TUNE; #endif static action_t keycode_to_action(uint16_t keycode); @@ -189,7 +191,7 @@ static action_t keycode_to_action(uint16_t keycode) case RESET: ; // RESET is 0x5000, which is why this is here clear_keyboard(); #ifdef AUDIO_ENABLE - play_notes(&goodbye, 3, false, 0); + play_notes(&goodbye_tune, false, 0); #endif _delay_ms(250); #ifdef ATREUS_ASTAR -- cgit v1.2.3 From 45f10b4c4b308226fa1568277654a13853a03ab4 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Sat, 16 Apr 2016 22:10:18 -0500 Subject: Fixed how note arrays are used. --- keyboard/atomic/keymaps/pvc/keymap.c | 44 ++++++++---------------------------- quantum/audio.c | 14 ++++++------ quantum/audio.h | 17 ++++++++++++-- quantum/keymap_common.c | 4 ++-- quantum/musical_notes.h | 7 +++++- 5 files changed, 39 insertions(+), 47 deletions(-) diff --git a/keyboard/atomic/keymaps/pvc/keymap.c b/keyboard/atomic/keymaps/pvc/keymap.c index 229708344f..c2081f525e 100644 --- a/keyboard/atomic/keymaps/pvc/keymap.c +++ b/keyboard/atomic/keymaps/pvc/keymap.c @@ -75,8 +75,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, }; -#define IS_LAYER_ON(layer) (layer_state & (1UL << (layer))) -#define IS_LAYER_OFF(layer) (!IS_LAYER_ON(layer)) #ifdef AUDIO_ENABLE @@ -201,24 +199,14 @@ Q_NOTE(_B8 ) , }; float tone_rs[][2] = { -Q_NOTE(_F8 ) , -Q_NOTE(_G8 ) , -Q_NOTE(_GS8 ) , -Q_NOTE(_A8 ) , +Q_NOTE(_A4 ) , +Q_NOTE(_A4 ) , +Q_NOTE(_A4 ) , +Q_NOTE(_A4 ) , Q_NOTE(_AS8 ) , Q_NOTE(_B8 ) , }; -float tone_fn[][2] = { - {440.0*pow(2.0,(59)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8}, - {0, 4}, - {440.0*pow(2.0,(67)/12.0), 16}, - {0, 4}, - {440.0*pow(2.0,(69)/12.0), 16}, - {0, 4}, - {440.0*pow(2.0,(67)/12.0), 16} -}; #endif void update_quad_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3, uint8_t layer4, bool order) @@ -253,18 +241,18 @@ void update_quad_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3, uint8_t l const uint16_t PROGMEM fn_actions[] = { }; -#define ARRAY_SIZE(x) ((sizeof x) / (sizeof *x)) +//#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"); - print_val_hex32(ARRAY_SIZE(tone_lw)); - play_notes(&tone_lw, 96, false); + PLAY_NOTE_ARRAY(tone_lw, false, STACCATO); #endif layer_on(_LW); update_tri_layer(_LW, _RS, _FN); @@ -277,7 +265,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE println("PlayNotes RS"); - play_notes(&tone_rs, 6, false); + PLAY_NOTE_ARRAY(tone_rs, false, LEGATO); #endif layer_on(_RS); update_tri_layer(_LW, _RS, _FN); @@ -295,33 +283,19 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) #ifdef AUDIO_ENABLE float start_up[][2] = { Q_NOTE(_E4 ) , -{0,1} , Q_NOTE(_E4 ) , -{0,1} , Q_NOTE(_F4 ) , -{0,1} , Q_NOTE(_G4 ) , -{0,1} , Q_NOTE(_G4 ) , -{0,1} , Q_NOTE(_F4 ) , -{0,1} , Q_NOTE(_E4 ) , -{0,1} , Q_NOTE(_D4 ) , -{0,1} , Q_NOTE(_C4 ) , -{0,1} , Q_NOTE(_C4 ) , -{0,1} , Q_NOTE(_D4 ) , -{0,1} , Q_NOTE(_E4 ) , -{0,1} , H_NOTE(_E4 ) , -{0,1} , Q_NOTE(_D4 ) , -{0,1} , H_NOTE(_D4 ) , }; #endif @@ -329,7 +303,7 @@ H_NOTE(_D4 ) , void matrix_init_user(void) { #ifdef AUDIO_ENABLE init_notes(); - play_notes(&start_up, 29, false); + PLAY_NOTE_ARRAY(start_up, false, STACCATO); println("Matrix Init"); #endif } diff --git a/quantum/audio.c b/quantum/audio.c index 40d09d62fd..90f3c5a13f 100644 --- a/quantum/audio.c +++ b/quantum/audio.c @@ -181,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 @@ -202,14 +202,14 @@ ISR(TIMER3_COMPA_vect) { 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; @@ -298,9 +298,9 @@ ISR(TIMER3_COMPA_vect) { note_position++; bool end_of_note = false; - if (ICR3 > 0) + if (ICR3 > 0) end_of_note = (note_position >= (note_length / ICR3 * 0xFFFF)); - else + else end_of_note = (note_position >= (note_length * 0x7FF)); if (end_of_note) { current_note++; @@ -318,7 +318,7 @@ ISR(TIMER3_COMPA_vect) { return; } } - if (!note_resting && ((int)notes_rest != 0)) { + if (!note_resting && (notes_rest > 0)) { note_resting = true; note_frequency = 0; note_length = notes_rest; @@ -412,7 +412,7 @@ if (audio_config.enable && voices < 8) { 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) { diff --git a/quantum/audio.h b/quantum/audio.h index 65a6f9434d..762c980643 100644 --- a/quantum/audio.h +++ b/quantum/audio.h @@ -4,6 +4,9 @@ #include #include "musical_notes.h" +#ifndef AUDIO_H +#define AUDIO_H + typedef union { uint8_t raw; struct { @@ -19,6 +22,16 @@ 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 stop_all_notes(void); +void init_notes(void); void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat, float n_rest); + + +// 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(¬e_array, NOTE_ARRAY_SIZE((note_array)), (note_repeat), (note_rest_style)); + + +#endif \ No newline at end of file diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 457f70a448..61a51aedb4 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -189,7 +189,7 @@ static action_t keycode_to_action(uint16_t keycode) case RESET: ; // RESET is 0x5000, which is why this is here clear_keyboard(); #ifdef AUDIO_ENABLE - play_notes(&goodbye, 3, false, 0); + PLAY_NOTE_ARRAY(goodbye, false, 0); #endif _delay_ms(250); #ifdef ATREUS_ASTAR @@ -202,7 +202,7 @@ static action_t keycode_to_action(uint16_t keycode) debug_enable = true; break; case 0x5002 ... 0x50FF: - // MAGIC actions (BOOTMAGIC without the boot) + // MAGIC actions (BOOTMAGIC without the boot) if (!eeconfig_is_enabled()) { eeconfig_init(); } diff --git a/quantum/musical_notes.h b/quantum/musical_notes.h index 79f04fd988..837f6a069d 100644 --- a/quantum/musical_notes.h +++ b/quantum/musical_notes.h @@ -9,7 +9,7 @@ #define WHOLE_NOTE(note) {(NOTE##note), 64} #define HALF_NOTE(note) {(NOTE##note), 32} #define QUARTER_NOTE(note) {(NOTE##note), 16} -#define EIGTH_NOTE(note) {(NOTE##note), 8} +#define EIGHTH_NOTE(note) {(NOTE##note), 8} #define SIXTEENTH_NOTE(note) {(NOTE##note), 4} // Note Types Short @@ -19,6 +19,11 @@ #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 -- cgit v1.2.3 From a67d425f4d5278595e7ab785a0f246b83fb1a09f Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 17 Apr 2016 01:00:39 -0400 Subject: planck default layout updates --- keyboard/planck/Makefile | 4 +- keyboard/planck/keymaps/default/keymap.c | 183 ++++++++++++++++++++----------- quantum/audio.c | 5 +- quantum/keymap_common.c | 8 +- 4 files changed, 130 insertions(+), 70 deletions(-) diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index 83b8303b02..01d9e3ce9a 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -139,10 +139,10 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # 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) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +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 diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index 207af2a1df..aecddec4a1 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c @@ -11,24 +11,27 @@ // 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 _AD 5 +#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(_QW) -#define COLEMAK M(_CM) -#define DVORAK M(_DV) -#define LOWER M(_LW) -#define RAISE M(_RS) +#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 @@ -47,7 +50,7 @@ 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 }, @@ -65,7 +68,7 @@ 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 }, @@ -83,7 +86,7 @@ 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 }, @@ -101,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_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_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, _______, _______, _______, _______, _______}, @@ -119,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | 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_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, _______, _______, _______, _______, _______}, @@ -130,16 +133,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | | Reset| | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff| | |Qwerty|Colemk|Dvorak| | | + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_AD] = { +[_ADJUST] = { {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AUD_ON, AUD_OFF, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______}, + {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, + {_______, _______, _______, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Music (reserved for process_action_user) + * + */ +[_MUSIC] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -150,87 +163,102 @@ const uint16_t PROGMEM fn_actions[] = { }; #ifdef AUDIO_ENABLE -float start_up[][2] = { - {440.0*pow(2.0,(67)/12.0), 12}, - {440.0*pow(2.0,(64)/12.0), 8}, - {440.0*pow(2.0,(55)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8}, - {440.0*pow(2.0,(64)/12.0), 20} +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_qw[][2] = { - {440.0*pow(2.0,(59)/12.0), 8}, - {440.0*pow(2.0,(60)/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,(67)/12.0), 16} + {440.0*pow(2.0,(31)/12.0), 16} }; -float tone_cm[][2] = { - {440.0*pow(2.0,(59)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8}, +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,(67)/12.0), 12}, + {440.0*pow(2.0,(31)/12.0), 12}, {0, 4}, - {440.0*pow(2.0,(71)/12.0), 12} + {440.0*pow(2.0,(35)/12.0), 12} }; -float tone_dv[][2] = { - {440.0*pow(2.0,(59)/12.0), 8}, - {440.0*pow(2.0,(60)/12.0), 8}, +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,(67)/12.0), 8}, + {440.0*pow(2.0,(31)/12.0), 8}, {0, 4}, - {440.0*pow(2.0,(69)/12.0), 8}, + {440.0*pow(2.0,(33)/12.0), 8}, {0, 4}, - {440.0*pow(2.0,(67)/12.0), 8} + {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 _QW: + case _QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qw, false, 0); + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); #endif - default_layer_set(1UL<<_QW); + persistant_default_layer_set(1UL<<_QWERTY); } break; - case _CM: + case _COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_cm, false, 0); + PLAY_NOTE_ARRAY(tone_colemak, false, 0); #endif - default_layer_set(1UL<<_CM); + persistant_default_layer_set(1UL<<_COLEMAK); } break; - case _DV: + case _DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dv, false, 0); + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); #endif - default_layer_set(1UL<<_DV); + persistant_default_layer_set(1UL<<_DVORAK); } break; - case _LW: + case _LOWER: if (record->event.pressed) { - layer_on(_LW); - update_tri_layer(_LW, _RS, _AD); + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } else { - layer_off(_LW); - update_tri_layer(_LW, _RS, _AD); + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } break; - case _RS: + case _RAISE: if (record->event.pressed) { - layer_on(_RS); - update_tri_layer(_LW, _RS, _AD); + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } else { - layer_off(_RS); - update_tri_layer(_LW, _RS, _AD); + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } break; case M_BL: @@ -254,7 +282,23 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE audio_on(); - PLAY_NOTE_ARRAY(start_up, false, 0); + 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; @@ -262,9 +306,24 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) 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(start_up, false, 0); + PLAY_NOTE_ARRAY(tone_startup, false, 0); #endif } diff --git a/quantum/audio.c b/quantum/audio.c index 90f3c5a13f..6bd6532a3a 100644 --- a/quantum/audio.c +++ b/quantum/audio.c @@ -350,7 +350,6 @@ if (audio_config.enable) { if (note) stop_all_notes(); - notes = true; notes_pointer = np; notes_length = n_length; @@ -375,6 +374,8 @@ if (audio_config.enable) { TIMSK3 |= _BV(OCIE3A); TCCR3A |= _BV(COM3A1); #endif + + notes = true; } } @@ -404,7 +405,6 @@ if (audio_config.enable && voices < 8) { if (notes) stop_all_notes(); - note = true; #ifdef PWM_AUDIO freq = freq / SAMPLE_RATE; #endif @@ -436,6 +436,7 @@ if (audio_config.enable && voices < 8) { TCCR3A |= _BV(COM3A1); #endif + note = true; } } \ No newline at end of file diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 02d3c74be6..d38e6fdb20 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -33,14 +33,14 @@ extern keymap_config_t keymap_config; #include #ifdef AUDIO_ENABLE #include "audio.h" - #ifndef GOODBYE_TUNE - #define GOODBYE_TUNE { \ + #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 goodbye_tune[][2] = GOODBYE_TUNE; + float tone_goodbye[][2] = TONE_GOODBYE; #endif static action_t keycode_to_action(uint16_t keycode); @@ -191,7 +191,7 @@ static action_t keycode_to_action(uint16_t keycode) case RESET: ; // RESET is 0x5000, which is why this is here clear_keyboard(); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(goodbye_tune, false, 0); + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); #endif _delay_ms(250); #ifdef ATREUS_ASTAR -- cgit v1.2.3