diff --git a/1-setup-path-win.bat b/1-setup-path-win.bat index 49fb00e149a..6957dbc3f49 100644 --- a/1-setup-path-win.bat +++ b/1-setup-path-win.bat @@ -1,9 +1,14 @@ @echo off -setx /M path "%PATH%;C:\MinGW\bin;C:\MinGW\msys\1.0\bin" > nul 2>&1 + +reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v Path /t REG_SZ /d "%path%;C:\MinGW\bin;C:\MinGW\msys\1.0\bin" > nul +echo. + if NOT ["%errorlevel%"]==["0"] ( - echo FAILED. Rerun with administrator privileges. - pause + echo FAILED. You probably just need to run the script with administrator privileges. ) else ( echo Success! - pause + setx QMK QMK > nul ) + +echo. +pause diff --git a/BUILD_GUIDE.md b/BUILD_GUIDE.md index 81c3ec44f2b..f7a57d2fc9b 100644 --- a/BUILD_GUIDE.md +++ b/BUILD_GUIDE.md @@ -3,11 +3,13 @@ ## Build Environment Setup ### Windows -1. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. -2. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. -3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. -4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. -5. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! +1. If you have ever installed WinAVR, uninstall it. +2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. +3. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. +4. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. +5. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. +6. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! +7. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell". ### Mac If you're using [homebrew,](http://brew.sh/) you can use the following commands: @@ -25,12 +27,12 @@ You can also try these instructions: 3. Install [DFU-Programmer][dfu-prog]. ### Linux -Install AVR GCC and dfu-progammer with your favorite package manager. +Install AVR GCC, AVR libc, and dfu-progammer with your favorite package manager. Debian/Ubuntu example: sudo apt-get update - sudo apt-get install gcc-avr dfu-programmer + sudo apt-get install gcc-avr avr-libc dfu-programmer ### Vagrant If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md). @@ -42,7 +44,10 @@ If you have any problems building the firmware, you can try using a tool called 4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. ## Customizing, Building, and Deploying Your Firmware -1. Running the `make` command from your keyboard's folder will generate a .hex file based on the default keymap. All keymaps for a particular keyboard live in the `keymaps` folder in that keyboard's folder. To create your own keymap, copy `keymaps/default/keymap.c` to the `keymaps` folder, and rename it with your name, for example jack.c. Or, if you don't care about the ability to share your keymap with the community via GitHub, you can just modify the default keymap itself. Details on how to program keymap files can be found in other guides. + +Note: Some keyboard folders have non-standard organizations, and may not even support specifying alternate keymaps. Until these get reorganized, you will need to edit their default keymaps directly. + +1. Running the `make` command from your keyboard's folder will generate a .hex file based on the default keymap. All keymaps for a particular keyboard live in the `keymaps` folder in that keyboard's folder. To create your own keymap, copy `keymaps/default/keymap.c` to the `keymaps` folder, and rename it with your name, for example jack.c. Or, if you don't care about the ability to share your keymap with the community via GitHub, you can just modify the default keymap itself. Details on how to program keymap files can be found in other guides. 2. To build a keymap other than the default, type `KEYMAP=` after `make`. So if I've named my keymap jack.c, the full command would be `make KEYMAP=jack`. 3. How you deploy the firmware will depend on whether you are using a PCB or a Teensy. In both cases, you'll need to put the keyboard in bootloader mode, either by pressing a button on the PCB/Teensy or pressing the key with the `RESET` keycode. Then, if you're using a PCB, just run `make KEYMAP= dfu` to both build and deploy the firmware. If you're using a Teensy, you'll probably need to take the .hex file that make produces in the keyboard's folder, and deploy it using the [Teensy Loader.](https://www.pjrc.com/teensy/loader.html) @@ -52,4 +57,4 @@ If you have any problems building the firmware, you can try using a tool called ## Troubleshooting 1. Try running `make clean` if the make command fails. - WIP \ No newline at end of file + WIP diff --git a/README.md b/README.md index 6a6bbed40b0..98573306793 100644 --- a/README.md +++ b/README.md @@ -269,7 +269,7 @@ For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring RGBLIGHT_ENABLE = yes -Please note that the underglow is not compatible with MIDI functions. So you cannot enable both of them at the same time. +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. @@ -309,4 +309,4 @@ what things are (and likely aren't) too risky. - EEPROM has around a 100000 write cycle. You shouldn't rewrite the firmware repeatedly and continually; that'll burn the EEPROM eventually. - \ No newline at end of file + diff --git a/keyboard/alps64/Makefile b/keyboard/alps64/Makefile index e90dcedb673..7634c4280eb 100644 --- a/keyboard/alps64/Makefile +++ b/keyboard/alps64/Makefile @@ -53,9 +53,9 @@ SRC = keymap_common.c \ led.c ifdef KEYMAP - SRC := keymap_$(KEYMAP).c $(SRC) + SRC := keymaps/$(KEYMAP).c $(SRC) else - SRC := keymap_plain.c $(SRC) + SRC := keymaps/default.c $(SRC) endif CONFIG_H = config.h diff --git a/keyboard/alps64/keymap_plain.c b/keyboard/alps64/keymaps/default.c similarity index 100% rename from keyboard/alps64/keymap_plain.c rename to keyboard/alps64/keymaps/default.c diff --git a/keyboard/alps64/keymap_hasu.c b/keyboard/alps64/keymaps/hasu.c similarity index 100% rename from keyboard/alps64/keymap_hasu.c rename to keyboard/alps64/keymaps/hasu.c diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile index e678b4efa88..da6d0ac60c2 100644 --- a/keyboard/atomic/Makefile +++ b/keyboard/atomic/Makefile @@ -54,9 +54,9 @@ SRC = atomic.c \ backlight.c ifdef KEYMAP - SRC := keymaps/keymap_$(KEYMAP).c $(SRC) + SRC := keymaps/$(KEYMAP).c $(SRC) else - SRC := keymaps/keymap_default.c $(SRC) + SRC := keymaps/default.c $(SRC) endif CONFIG_H = config.h diff --git a/keyboard/atomic/README.md b/keyboard/atomic/README.md index c8e83cf55a9..0e42370ba62 100644 --- a/keyboard/atomic/README.md +++ b/keyboard/atomic/README.md @@ -16,10 +16,10 @@ Depending on which keymap you would like to use, you will have to compile slight To build with the default keymap, simply run `make`. ### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_.c` and see keymap document (you can find in top README.md) and existent keymap files. +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a file in the keymaps folder named `.c` and see keymap document (you can find in top README.md) and existent keymap files. To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: ``` $ make KEYMAP=[default|jack|] ``` -Keymaps follow the format **__keymap\_\.c__** and are stored in the `keymaps` folder. +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboard/atomic/keymaps/keymap_abienz.c b/keyboard/atomic/keymaps/abienz.c similarity index 100% rename from keyboard/atomic/keymaps/keymap_abienz.c rename to keyboard/atomic/keymaps/abienz.c diff --git a/keyboard/atomic/keymaps/keymap_default.c b/keyboard/atomic/keymaps/default.c similarity index 100% rename from keyboard/atomic/keymaps/keymap_default.c rename to keyboard/atomic/keymaps/default.c diff --git a/keyboard/atomic/keymaps/keymap_michelle.c b/keyboard/atomic/keymaps/michelle.c similarity index 100% rename from keyboard/atomic/keymaps/keymap_michelle.c rename to keyboard/atomic/keymaps/michelle.c diff --git a/keyboard/atreus/Makefile b/keyboard/atreus/Makefile index 2e542d62edd..a6fddd70d2a 100644 --- a/keyboard/atreus/Makefile +++ b/keyboard/atreus/Makefile @@ -53,9 +53,9 @@ TARGET_DIR = . SRC = atreus.c ifdef KEYMAP - SRC := keymaps/keymap_$(KEYMAP).c $(SRC) + SRC := keymaps/$(KEYMAP).c $(SRC) else - SRC := keymaps/keymap_default.c $(SRC) + SRC := keymaps/default.c $(SRC) endif ifdef TEENSY2 diff --git a/keyboard/atreus/README.md b/keyboard/atreus/README.md index 4db7ac1203b..aacf2841f4a 100644 --- a/keyboard/atreus/README.md +++ b/keyboard/atreus/README.md @@ -177,10 +177,10 @@ Depending on which keymap you would like to use, you will have to compile slight To build with the default keymap, simply run `make`. ### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_.c` and see keymap document (you can find in top README.md) and existent keymap files. +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top README.md) and existent keymap files. To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: ``` $ make KEYMAP=[default|jack|] ``` -Keymaps follow the format **__keymap\_\.c__** and are stored in the `keymaps` folder. +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboard/atreus/keymaps/keymap_default.c b/keyboard/atreus/keymaps/default.c similarity index 100% rename from keyboard/atreus/keymaps/keymap_default.c rename to keyboard/atreus/keymaps/default.c diff --git a/keyboard/atreus/keymaps/keymap_gerb.c b/keyboard/atreus/keymaps/gerb.c similarity index 100% rename from keyboard/atreus/keymaps/keymap_gerb.c rename to keyboard/atreus/keymaps/gerb.c diff --git a/keyboard/ergodox_ez/keymaps/msc/img/code_layer.png b/keyboard/ergodox_ez/keymaps/msc/img/code_layer.png new file mode 100644 index 00000000000..7b5efaae791 Binary files /dev/null and b/keyboard/ergodox_ez/keymaps/msc/img/code_layer.png differ diff --git a/keyboard/ergodox_ez/keymaps/msc/img/main_layer.png b/keyboard/ergodox_ez/keymaps/msc/img/main_layer.png new file mode 100644 index 00000000000..65f92dda1b6 Binary files /dev/null and b/keyboard/ergodox_ez/keymaps/msc/img/main_layer.png differ diff --git a/keyboard/ergodox_ez/keymaps/msc/img/media_layer.png b/keyboard/ergodox_ez/keymaps/msc/img/media_layer.png new file mode 100644 index 00000000000..a69799b0734 Binary files /dev/null and b/keyboard/ergodox_ez/keymaps/msc/img/media_layer.png differ diff --git a/keyboard/ergodox_ez/keymaps/msc/keymap.c b/keyboard/ergodox_ez/keymaps/msc/keymap.c new file mode 100644 index 00000000000..e567e513f97 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/msc/keymap.c @@ -0,0 +1,184 @@ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L | ; |' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Cmd | Alt |AltShf| Left | Right| | Left | Down | Up |Right | L2 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, 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_LGUI,KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TG(MDIA), + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + 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_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | Mute | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | Prev |VolDn |VolUp | Next | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | Lclk | Rclk |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_BTN1, KC_BTN2, 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_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboard/ergodox_ez/keymaps/msc/msc.hex b/keyboard/ergodox_ez/keymaps/msc/msc.hex new file mode 100644 index 00000000000..a466a37af73 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/msc/msc.hex @@ -0,0 +1,1118 @@ +:100000000C9465020C94A9020C94A9020C94A90208 +:100010000C94A9020C94A9020C94A9020C94A902B4 +:100020000C94A9020C94A9020C94AD0B0C947F0CB7 +:100030000C94A9020C94A9020C94A9020C94A90294 +:100040000C94A9020C9404210C94A9020C94A9020A +:100050000C94A9020C94951A0C94A9020C94A90270 +:100060000C94A9020C94A9020C94A9020C94A90264 +:100070000C94A9020C94A9020C94A9020C94A90254 +:100080000C94A9020C94A9020C94A9020C94A90244 +:100090000C94A9020C94A9020C94A9020C94A90234 +:1000A0000C94A9020C94A9020C94A902EC0C0E0D5C +:1000B000FC0D0E0DFC0D530D760DFC0DCB0DDE0D64 +:1000C000C010C010EF10EF10321170118913891396 +:1000D000891189138A128A125D1389138913741383 +:1000E0000000F0A12E004C002A00E100E300000017 +:1000F0001E00140004001D71E2004D001F001A00D4 +:1001000016001B00E1042A0020000800070006007A +:1001100050002C0021001500090019004F004A0072 +:10012000220017000A000500000065745000015409 +:100130000000007F0000E3004F0001540000007742 +:100140000000E20023001C000B00110000002971D8 +:10015000240018000D00100050004B0025000C007A +:100160000E00360051002800260012000F00370054 +:1001700052002B0027001300330038714F004E004F +:100180002D0031003478E500025400000100010028 +:1001900001000100010000003A001E0220022202BC +:1001A000010001003B001F022102230201000100A7 +:1001B0003C002F0226022F00010001003D0030020A +:1001C00027023000010001003E00310235003502F7 +:1001D000000001000100010000000100000001001A +:1001E0000100010000000100000001003F0052007A +:1001F00051002402000001004000240021001E00E4 +:10020000010001004100250022001F00370001000D +:1002100042002600230020002700010043002502A1 +:100220002E0231002E0001004400450001000100B3 +:1002300001000000010001000100010001000000B8 +:1002400001000100010001000100010001000100A6 +:10025000F20001000100F5000100F000F1000100D2 +:100260000100F40001000100F300010001000100A1 +:100270000100010001000100000001000100010077 +:100280000000010000000100010001000000010069 +:100290000000010001000100010001000000010058 +:1002A000010001000100A800AC00010001000100F4 +:1002B00001000100AA00B6000100010001000100D8 +:1002C000A90001000100010001000100AB000100D4 +:1002D00001000100AE00010001000000160345000E +: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 +:10052000FFE3099511E0A0E0B1E0ECE8F5E402C0DA +:1005300005900D92A433B107D9F711E0A4E3B1E01F +:1005400001C01D92AE3EB107E1F70E94F1080C9484 +:10055000C4220C94000061110BC0FC01828188232D +:1005600021F085EE0E945D0F03C085EE0E942510EC +:1005700080E090E0089508956091B1017091B2011A +:100580008091B3019091B4010E94C41956985E986D +: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 +:10082000E30380B38C7080BB81B3836F81BBA6E38D +:10083000B1E0E4E4F1E08EE08E0F11921D928E1390 +:10084000FCCF0C943303BF92CF92DF92EF92FF92D2 +:100850000F931F93CF93DF9380910001882379F04A +:10086000809135018F5F80933501811108C00E940E +:10087000490380930001811102C00E94DB0206E35C +:1008800011E0C0E0D0E0DD24D39482E0C82EEE2455 +:10089000E394F12CC730D10500F58091000181115E +:1008A00064C080E40E949E0380930001811112C005 +:1008B00082E10E94C8038093000181110BC0C7012F +:1008C0000C2E01C0880F0A94EAF780950E94C80395 +:1008D000809300010E94C00348C0CA30A1F028F4F0 +:1008E000C83059F0C93061F005C0CC3089F070F0E3 +:1008F000CD3089F0209A289810C0219A29980DC0EF +:10090000229A2A980AC0239A2B9807C0529A01C0AB +:10091000539A5B9802C03E9A469890EA9A95F1F7EE +:100920009FB1799902C082E001C080E091709D255D +:10093000982B7C9902C084E001C080E0892B7D99CE +:1009400002C038E001C030E0832B7E9902C020E174 +:1009500001C020E0822B9FB19095991F9927991F84 +:100960009295990F907E892B0FC080910001811183 +:1009700049C080E40E949E0380930001882379F19E +:10098000B12C0E94C0038B2DF8019081981719F0AB +:100990008083C09201010E94E30321960F5F1F4FE5 +:1009A000CE30D10509F076CF80910101882361F125 +:1009B000815080930101882339F08FE99FE00197EE +:1009C000F1F700C0000020C0A4E4B1E0E6E3F1E0EC +:1009D000CF01825F91919D938E13FCCF15C083E16F +:1009E0000E94C803809300018111CACF81E40E9454 +:1009F0009E03809300018111C3CF0E94D903B82EBA +:100A0000B094BFCF80E0C0CF0E94D90281E0DF91D7 +:100A1000CF911F910F91FF90EF90DF90CF90BF90FB +:100A20000895E82FF0E0EC5BFE4F80810895089573 +:100A30008B3B910578F4883A910540F5853A91050C +:100A4000D0F48430910508F0B1C08130910509F4EB +:100A5000ADC06BC0803E910508F467C0883E91052B +:100A600008F4A4C09C01205F31092031310508F051 +:100A70005CC090650895853A910509F459C0863A9D +:100A8000910509F058C082E890E40895883A9105EC +:100A900009F454C0893A910509F453C08A3A910582 +:100AA00009F452C08B3A910509F451C08C3A910572 +:100AB00009F450C08D3A910509F44FC0803B91056F +:100AC00009F44EC08E3A910509F44DC08F3A910554 +:100AD00009F44CC0813B910509F44BC0823B910560 +:100AE00009F44AC0833B910509F449C0843B910550 +:100AF00009F448C0853B910509F447C0863B910540 +:100B000009F446C0873B910509F445C0883B91052F +:100B100009F444C0893B910509F443C08A3B91051F +:100B200009F442C080E094E4089580E090E00895E4 +:100B300081E890E4089583E890E4089582EE94E4D7 +:100B4000089589EE94E408958AEE94E4089585EB7F +:100B500094E4089586EB94E4089587EB94E4089573 +:100B60008CEC94E408958DEC94E4089583E895E486 +:100B700008958AE895E4089582E995E4089584E962 +:100B800095E4089581E296E4089583E296E4089559 +:100B900084E296E4089585E296E4089586E296E478 +:100BA000089587E296E408958AE296E40895089508 +:100BB00096E0799FF001112494E5899FE00DF11DE5 +:100BC0001124E60FF11DEE0FFF1FEC51FF4F859131 +:100BD00094910895880F991FFC01E05AF040859187 +:100BE00094910895880F991FFC01E052FF4F859161 +:100BF0009491089526E0729FF001112444E5849FAA +:100C0000E00DF11D1124E60FF11DEE0FFF1FEC5159 +:100C1000FF4F859194919C013A9521154FE134073E +:100C200008F41AC13F512115304120F49F700E94F1 +:100C3000F20508959C0130532115304118F499278D +:100C4000906C0895811520E5920769F40E94AB131A +:100C50004FEF84E39CE0415080409040E1F700C0BA +:100C600000000C94BA1A813020E5920731F480918B +:100C7000CC0181608093CC0108959C0130552115F1 +:100C8000304108F051C0292F33272F7033272130EE +:100C90003105D9F4AC014370552702C0220F331F30 +:100CA0004A95E2F73C68AC0164E0440F551F6A9531 +:100CB000E1F744275370242B352B73E0880F991FDD +:100CC0007A95E1F7807699271DC02230310529F405 +:100CD000982F8827816F906A089523303105A9F4F1 +:100CE000AC014370552721E030E002C0220F331FD2 +:100CF0004A95E2F73C6843E0880F991F4A95E1F76F +:100D0000807E9770822B932B089524303105E1F477 +:100D1000AC014370552721E030E002C0220F331FA1 +:100D20004A95E2F73A68E7CF9C01305721153041E8 +:100D300018F49F70906208959C013058211530413D +:100D400018F49F70906A0895803E9105E0F4803C0D +:100D5000910558F58133910509F46FC048F4893243 +:100D6000910509F463C08A32910509F46DC072C01F +:100D700089339105E9F082389105D1F085339105E9 +:100D800009F44DC067C0833E910581F138F4803E7F +:100D90009105B9F0823E9105D9F05CC0863E91057F +:100DA00061F1873E9105A1F155C00E94EA050895C1 +:100DB0002091DF0120FD02C021FF4CC080EE90E0B9 +:100DC00049C08091DF0180FFF9CF89E390E042C004 +:100DD0008091DF0182FF0EC08091DF0184FF03C09C +:100DE00080E090E037C083EE90E034C08091DF0176 +:100DF00082FFF2CF82EE90E02DC08091DF0183FF71 +:100E00000BC08091DF0184FDEBCF87EE90E022C024 +:100E10008091DF0183FFF5CF86EE90E01BC08091CB +:100E2000DF0185FF07C089E290E014C08091DF01F7 +:100E300085FFF9CF85E390E00DC08091DF0186FF4B +:100E400007C08AE290E006C08091DF0186FFF9CFFB +:100E500081E390E00E941805089508950C942D07F1 +:100E6000809162010895CF93DF9300D01F92CDB798 +:100E7000DEB79C018091E501843019F593E09983F8 +:100E80003B832A839093E9008FEF9091E800815093 +:100E900095FD06C095ED9A95F1F700008111F5CF0B +:100EA0008091E80085FF0DC040E050E063E070E015 +:100EB000CE0101960E949D098091E8008E77809373 +:100EC000E8000F900F900F90DF91CF910895CF938E +:100ED000DF9300D01F92CDB7DEB72091E50124301B +:100EE00021F522E029839B838A8383E08093E900B4 +:100EF0008FEF9091E800815095FD06C095ED9A9591 +:100F0000F1F700008111F5CF8091E80085FF0DC059 +:100F100040E050E063E070E0CE0101960E949D0940 +:100F20008091E8008E778093E8000F900F900F90EB +:100F3000DF91CF9108952091E5012430F1F422E072 +:100F40002093E9002FEF3091E800215035FD06C0D5 +:100F500035ED3A95F1F700002111F5CF2091E80029 +:100F600025FF0BC040E050E065E070E00E949D0965 +:100F70008091E8008E778093E8000895CF93DF9307 +:100F8000EC019091E501943009F046C080910C018C +:100F90008823D9F080910D018823B9F09093E9005E +:100FA0008FEF9091E800815095FD06C095E19A95EC +:100FB000F1F700008111F5CF8091E80085FF2CC08A +:100FC00040E050E060E170E017C081E08093E9000C +:100FD0008FEF9091E800815095FD06C095ED9A95B0 +:100FE000F1F700008111F5CF8091E80085FF14C072 +:100FF00040E050E068E070E0CE010E949D098091E1 +:10100000E8008E778093E80080E1FE01A2E5B1E080 +:1010100001900D928A95E1F7DF91CF91089580912B +:10102000E401811109C00E94320B0E948F0B809154 +:10103000E20084608093E20008951092E401089534 +:1010400008950C94F1200E94501A0E94F7200E94EB +:10105000350E0C942E0742E061EC81E00E94AC0A50 +:1010600042E061EC82E00E94AC0A42E061EC83E085 +:101070000E94AC0A42E161EC84E00C94AC0A8091DD +:10108000E701833009F455C030F4813071F08230CB +:1010900009F48EC008958A3009F47AC08B3009F4BF +:1010A00060C0893009F09CC020C08091E601813A7F +:1010B00009F096C08091E800877F8093E8008091D6 +:1010C000EA019091EB01892B21F460E182E591E046 +:1010D00003C060E080E090E070E00E94E809809149 +:1010E000E8008B778093E80008958091E6018132D3 +:1010F00009F076C08091EA019091EB01009719F018 +:10110000039709F06DC08091E800877F8093E80025 +:101110008091E80082FD05C08091E5018111F8CF42 +:101120005FC08091F100809362018091E8008B772D +:1011300053C08091E601813A09F052C08091EA01E2 +:101140009091EB01892B09F04BC08091E800877FDB +:101150008093E8008091E80080FFFCCF80910C0133 +:1011600036C08091E6018132D9F58091EA019091F3 +:10117000EB01892BA9F58091E800877F8093E80037 +:101180000E94E10A8091E80180930C010C94AB135A +:101190008091E601813221F58091E800877F80937C +:1011A000E8000E94E10A8091E901809363010895BB +:1011B0008091E601813AA1F48091E800877F8093D5 +:1011C000E8008091E80080FFFCCF8091630180936C +:1011D000F1008091E8008E778093E8000C94E10A9A +:1011E000089584B7877F84BF88E10FB6F894809311 +:1011F0006000109260000FBE90E080E80FB6F89497 +:1012000080936100909361000FBE0E94840E0E9443 +:10121000320B0E948F0B8091E20084608093E20089 +:1012200078940E94150E0E94860E82E091E00E9442 +:10123000300E0E94DF208091E501853069F40E9424 +:10124000141A8091E3018823B1F30E943C1A882389 +:1012500091F30E948709EFCF0E948C0EECCF292FCB +:10126000332723303105C9F064F42130310581F092 +:101270002230310509F043C08DE690E020E133E0F3 +:1012800042C021323105F1F02232310541F137C03F +:1012900082E190E02DE733E036C099278130910557 +:1012A00041F08230910541F0892B49F5ECE0F3E003 +:1012B00005C0E4EFF2E002C0ECEDF2E0849190E0D2 +:1012C0009F0121C06430D8F4E62FF0E0EE0FFF1F3D +:1012D000EE5DFE4F2081318189E090E014C06430E2 +:1012E00070F470E0FB01EE0FFF1FE65EFE4F208101 +:1012F0003181FB01EA5EFE4F808190E004C080E016 +:1013000090E020E030E0FA0131832083089580E10D +:1013100089BD82E189BD09B400FEFDCF8091D8006E +:101320008F7D8093D8008091E00082608093E00000 +:101330008091E00081FDFCCF0895CF92DF92EF9283 +:10134000FF920F931F93CF93DF93EC018B016A0100 +:101350000E94000B811133C0C114D10439F0F60191 +:1013600080819181081B190BC80FD91FE12CF12C2A +:101370000115110519F18091E80085FD16C08091D5 +:10138000E8008E778093E800C114D10449F0F6019B +:1013900080819181E80EF91EF182E08285E00FC024 +:1013A0000E94000B882321F30AC089918093F100E9 +:1013B00001501109FFEFEF1AFF0ADACF80E0DF9149 +:1013C000CF911F910F91FF90EF90DF90CF900895F4 +:1013D0002091EC013091ED012617370748F0611597 +:1013E000710539F42091E8002E772093E80001C0C0 +:1013F000B90140E061157105A9F12091E5012223B1 +:1014000009F443C0253009F442C02091E80023FDCF +:1014100040C02091E80022FD32C02091E80020FF6A +:10142000E9CF4091F3002091F20030E0342BFC0131 +:10143000CF016115710559F02830310540F48191D3 +:101440008093F100615071092F5F3F4FF1CF41E070 +:101450002830310509F040E02091E8002E772093F4 +:10146000E800C8CF4111C9CF0AC08091E5018823A7 +:1014700061F0853061F08091E80083FD0AC08091C1 +:10148000E80082FFF2CF80E0089582E0089583E0D3 +:10149000089581E008952091EC013091ED01261727 +:1014A000370748F06115710539F42091E8002E776F +:1014B0002093E80001C0B901FC0120E0611571052D +:1014C00091F18091E501882309F440C0853009F449 +:1014D0003FC08091E80083FD3DC08091E80082FD1F +:1014E0002FC08091E80080FFE9CF2091F300809128 +:1014F000F20090E0922B6115710559F0883091054A +:1015000040F424912093F1003196615071090196C5 +:10151000F2CF21E0089709F020E08091E8008E7773 +:101520008093E800CBCF2111CCCF0AC08091E50198 +:10153000882361F0853061F08091E80083FD0AC066 +:101540008091E80082FFF2CF80E0089582E0089564 +:1015500083E0089581E00895982F973058F590938F +:10156000E900981739F07091EC002091ED0050914E +:10157000F00003C0242F762F50E021FF19C03091D6 +:10158000EB003E7F3093EB003091ED003D7F3093D8 +:10159000ED003091EB0031603093EB007093EC0084 +:1015A0002093ED005093F0002091EE0027FF07C03C +:1015B0009F5FD3CF8F708093E90081E0089580E032 +:1015C00008958091E60187FF11C08091E80082FDB7 +:1015D00005C08091E5018111F8CF11C08091E8002C +:1015E0008B770BC08091E501882349F08091E8005A +:1015F00080FFF8CF8091E8008E778093E80008950F +:101600002091E4003091E50095E64091EC00842FB4 +:10161000817040FF22C08091E80080FD1CC0809155 +:10162000E501882391F0853091F08091EB0085FDF4 +:1016300010C04091E4005091E5004217530729F390 +:101640009A01915011F784E0089582E0089583E0B3 +:10165000089581E0089580E008954091E80042FFF8 +:10166000DECF08950E94A00B0E94A80BE0EEF0E0F0 +:10167000808181608083E8EDF0E080818F778083D6 +:1016800019BCA7EDB0E08C918E7F8C9380818F7E0A +:1016900080831092E40108950F931F93CF93DF93FB +:1016A0000E94A00B0E94A80BC8EDD0E088818F7724 +:1016B000888388818068888388818F7D888319BC2E +:1016C0001092E5011092E1011092E3011092E20103 +:1016D00000EE10E0F80180818B7F8083888181603B +:1016E000888342E060E080E00E94AC0AE1EEF0E036 +:1016F00080818E7F8083E2EEF0E080818160808354 +:10170000808188608083F80180818E7F80838881DA +:1017100080618883DF91CF911F910F910895E8ED4B +:10172000F0E080818F7E8083E7EDF0E08081816052 +:10173000808384E082BF81E08093E4010C944C0BB1 +:10174000E8EDF0E080818E7F80831092E2000895C2 +:101750001092DA001092E10008951F920F920FB6D6 +:101760000F9211242F933F934F935F936F937F9327 +:101770008F939F93AF93BF93EF93FF938091E1007B +:1017800082FF0BC08091E20082FF07C08091E100E0 +:101790008B7F8093E1000E94140E8091DA0080FF1D +:1017A0001FC08091D80080FF1BC08091DA008E7F1F +:1017B0008093DA008091D90080FF0DC080E189BD5F +:1017C00082E189BD09B400FEFDCF81E08093E5018F +:1017D0000E940F0805C019BC1092E5010E941D0867 +:1017E0008091E10080FF19C08091E20080FF15C068 +:1017F0008091E2008E7F8093E2008091E200806120 +:101800008093E2008091D80080628093D80019BC58 +:1018100085E08093E5010E9421088091E10084FF2A +:1018200030C08091E20084FF2CC080E189BD82E15C +:1018300089BD09B400FEFDCF8091D8008F7D8093D3 +:10184000D8008091E1008F7E8093E1008091E200DA +:101850008F7E8093E2008091E20081608093E200BD +:101860008091E101882311F084E007C08091E300BA +:1018700087FD02C081E001C083E08093E5010E9402 +:1018800023088091E10083FF29C08091E20083FF5B +:1018900025C08091E100877F8093E10082E0809302 +:1018A000E5011092E1018091E1008E7F8093E100DB +:1018B0008091E2008E7F8093E2008091E20080615F +:1018C0008093E20042E060E080E00E94AC0A8091F8 +:1018D000F00088608093F0000E942008FF91EF9153 +:1018E000BF91AF919F918F917F916F915F914F9138 +:1018F0003F912F910F900FBE0F901F9018951F9240 +:101900000F920FB60F9211242F933F934F935F9333 +:101910006F937F938F939F93AF93BF93CF93DF93F7 +:10192000EF93FF93C091E900CF708091EC00D82F26 +:10193000D17080FDD0E81092E9008091F000877F9F +:101940008093F00078940E94C30C1092E90080917B +:10195000F00088608093F000CD2BCF70C093E90039 +:10196000FF91EF91DF91CF91BF91AF919F918F91B7 +:101970007F916F915F914F913F912F910F900FBE8B +:101980000F901F9018951F93CF93DF93CDB7DEB7BD +:10199000AA970FB6F894DEBF0FBECDBFE6EEF1E01A +:1019A00088E08E0F9091F10091938E13FBCF0E94EF +:1019B0003F088091E80083FF1FC18091E60190916C +:1019C000E701492F50E04A30510508F015C1FA01EE +:1019D000EA5AFF4F0C947922803881F0823809F05E +:1019E0000BC18091EA018F708093E9008091EB0038 +:1019F00085FB882780F91092E90006C08091E201FA +:101A00009091E301911182609091E800977F90930B +:101A1000E8008093F1001092F100C8C0282F2D7FBC +:101A200009F0EAC0882319F0823061F0E5C08091A6 +:101A3000E801813009F0E0C0933009F080E0809344 +:101A4000E3012BC08091E801811127C08091EA0158 +:101A50008F7009F4D1C08093E9002091EB0020FF42 +:101A60001CC0933021F48091EB00806214C09091EF +:101A7000EB0090619093EB0021E030E0A90102C0FF +:101A8000440F551F8A95E2F74093EA001092EA004E +:101A90008091EB0088608093EB001092E9008091C8 +:101AA000E800877F86C08111A7C01091E8011F77E9 +:101AB0008091E3008078812B8093E3008091E8009F +:101AC000877F8093E8000E94E10A8091E80080FF10 +:101AD000FCCF8091E30080688093E300111102C085 +:101AE00082E001C083E08093E50186C080588230A7 +:101AF00008F082C08091E8019091E9018C3D53E0AB +:101B0000950779F583E08A838AE289834FB7F89451 +:101B1000DE01139620E03EE051E2E32FF0E0509327 +:101B20005700E49120FF03C0E295EF703F5FEF7034 +:101B30008E2F90E0EA3010F0C79601C0C0968D93CA +:101B40009D932F5F243149F74FBF8091E800877F35 +:101B50008093E8006AE270E0CE0101960E94E809F5 +:101B600014C0AE014F5F5F4F6091EA010E942F09E0 +:101B7000BC01892B09F440C09091E800977F9093B5 +:101B8000E80089819A810E944B0A8091E8008B7756 +:101B90008093E80031C0803879F58091E800877F34 +:101BA0008093E8008091E1018093F1008091E8004A +:101BB0008E778093E8000E94E10A1EC081111CC04C +:101BC0009091E8019230C0F48091E800877F809383 +:101BD000E8009093E1010E94E10A8091E101811106 +:101BE00006C08091E30087FD02C081E001C084E06F +:101BF0008093E5010E942B088091E80083FF0AC0D2 +:101C00008091E800877F8093E8008091EB008062FC +:101C10008093EB00AA960FB6F894DEBF0FBECDBF3F +:101C2000DF91CF911F9108950895CF938091E501A1 +:101C30008823A1F0C091E900CF709091EC00892F2A +:101C4000817090FD80E8C82B1092E9008091E80037 +:101C500083FD0E94C30CCF70C093E900CF9108951B +:101C600090936901809368010895E0916801F09173 +:101C70006901309721F00190F081E02D099480E016 +:101C80000895E0916801F0916901309721F0028098 +:101C9000F381E02D09940895E0916801F0916901C4 +:101CA000309721F00480F581E02D0994089520916A +:101CB0006601309167018217930771F09093670175 +:101CC00080936601E0916801F0916901309721F0FD +:101CD0000680F781E02D09940895209164013091E8 +:101CE00065018217930771F09093650180936401F9 +:101CF000E0916801F0916901309721F00084F1854D +:101D0000E02D0994089508950C94830E0E94561AAC +:101D10000E940B040C941C1BCF92DF92EF92FF9257 +:101D20000F931F93CF93DF93CDB7DEB72B970FB6EB +:101D3000F894DEBF0FBECDBF0E9423048BE6C82EF1 +:101D400081E0D82E00E010E0E02E802F0E941105E7 +:101D5000F60141916F01F42EF826B1F40F5F1F4F89 +:101D60000E30110589F78FEF89838A831B820E94C9 +:101D70005F1A8160782F9D838C8349815A816B81A2 +:101D80008D810E942F0F40C09091CC0191FF04C023 +:101D90008B870E9417058B8520E030E04F2D50E0A7 +:101DA000922FBA01022E02C0759567950A94E2F748 +:101DB00060FF24C02E83EF8221E030E0690102C081 +:101DC000CC0CDD1C9A95E2F790E08C219D21892BAB +:101DD00009F420E028870E945F1A8160782F9A8793 +:101DE00089874E815F8168858A850E942F0FF8015F +:101DF000E559FE4F8081C826C08206C02F5F3F4F45 +:101E00002630310569F6AACF0E94031E10916A019F +:101E10000E94350E1817A1F00E94350E80936A01BA +:101E20002B960FB6F894DEBF0FBECDBFDF91CF91DA +:101E30001F910F91FF90EF90DF90CF900C942E07A1 +:101E40002B960FB6F894DEBF0FBECDBFDF91CF91BA +:101E50001F910F91FF90EF90DF90CF900895CF9357 +:101E6000DF93CDB7DEB72B970FB6F894DEBF0FBE6A +:101E7000CDBF4F83588769877A878B87DE0111969C +:101E800086E0FD0111928A95E9F785E0FE0137961B +:101E900001900D928A95E1F749815A816B817C818D +:101EA0008D819E810E9445162B960FB6F894DEBF59 +:101EB0000FBECDBFDF91CF910895CF93882309F452 +:101EC000C2C0C82F823859F40E94350E81FDBBC0B4 +:101ED00089E30E94E1180E949E1989E30CC08338AF +:101EE00079F40E94350E80FDAEC083E50E94E118B2 +:101EF0000E949E1983E50E942319CF910C949E198C +:101F0000843859F40E94350E82FD9DC087E40E94FA +:101F1000E1180E949E1987E4EECF8CEF8C0F813A76 +:101F200048F48C2F0E94442081118DC08C2F0E9478 +:101F3000E118E3CF80E28C0F883048F4C77081E06D +:101F400001C0880FCA95EAF70E946719D6CF8BE5C2 +:101F50008C0F833078F4C53A29F0C63A31F083E823 +:101F600090E005C081E890E002C082E890E0CF9167 +:101F70000C94570E88E58C0F833108F064C0C83A82 +:101F800039F1C93A41F1CA3A49F1CB3A51F1CC3A67 +:101F900059F1CD3A61F1C03B69F1CE3A71F1CF3AD6 +:101FA00079F1C13B81F1C23B89F1C33B91F1C43B63 +:101FB00099F1C53BA1F1C63BA9F1C73BB1F1C83BC3 +:101FC000B9F1C93BC1F1CA3BC9F180E090E038C02A +:101FD00082EE90E035C089EE90E032C08AEE90E06B +:101FE0002FC085EB90E02CC086EB90E029C087EBFA +:101FF00090E026C08CEC90E023C08DEC90E020C0F7 +:1020000083E891E01DC08AE891E01AC082E991E07E +:1020100017C084E991E014C081E292E011C083E22C +:1020200092E00EC084E292E00BC085E292E008C02C +:1020300086E292E005C087E292E002C08AE292E086 +:10204000CF910C946D0ECF910895882309F44BC065 +:10205000823859F40E94350E81FF45C089E30E9401 +:10206000E1180E949E1989E30CC0833871F40E9424 +:10207000350E80FF38C083E50E94E1180E949E194A +:1020800083E50E9423190C949E19843859F40E9408 +:10209000350E82FF28C087E40E94E1180E949E1935 +:1020A00087E4EFCF9CEF980F913A58F390E2980FA6 +:1020B000983050F4877091E001C0990F8A95EAF743 +:1020C000892F0E946D19DFCF9BE5980F933020F484 +:1020D00080E090E00C94570E885A833120F480E021 +:1020E00090E00C946D0E0895882321F00E946719EA +:1020F0000C949E190895882321F00E946D190C9468 +:102100009E190895BF92CF92DF92EF92FF920F93A4 +:102110001F93CF93DF9300D000D000D0CDB7DEB7B0 +:1021200025E0FC01DE01119601900D922A95E1F760 +:10213000FC01408131810281258122952F706381CC +:102140007481672B09F4E5C23F3F19F44F3F09F44E +:10215000E0C27C0149833A8389819A812E830E945F +:10216000A018182FB92E0E949F180E946617EB2DF9 +:10217000E295EF70F0E0E05AFF4F2E810C94792247 +:102180008B2D807F9B2D9F70F92E882319F0F29460 +:1021900080EFF822002349F0FF2009F467C28F2D59 +:1021A0000E9477190E949E1961C2812F0E942510FA +:1021B000FF2009F4AEC28F2D0E947D1926960FB61E +:1021C000F894DEBF0FBECDBFDF91CF911F910F916D +:1021D000FF90EF90DF90CF90BF900C949E193B2D15 +:1021E000307F8B2D8F70303211F08295807F1123DC +:1021F00019F0113021F12CC00023B9F0222309F489 +:10220000A0C1213009F09DC126960FB6F894DEBF1B +:102210000FBECDBFDF91CF911F910F91FF90EF9037 +:10222000DF90CF90BF900C948719222319F02130B2 +:1022300009F46FC28E830E948A198E8196C1002391 +:1022400021F0223008F065C27CC1211162C28DC12B +:10225000002321F0222309F474C108C2222309F4C7 +:1022600084C119C22B2D26952695237030E02115A7 +:10227000310521F021303105D1F04BC2002321F08E +:10228000812F9B2D937002C080E090E026960FB6C0 +:10229000F894DEBF0FBECDBFDF91CF911F910F919C +:1022A000FF90EF90DF90CF90BF900C94570E0023DB +:1022B00021F0812F9B2D937002C080E090E0269644 +:1022C0000FB6F894DEBF0FBECDBFDF91CF911F9147 +:1022D0000F91FF90EF90DF90CF90BF900C946D0E18 +:1022E000812F002319F00E940B1D02C00E94731D54 +:1022F00026960FB6F894DEBF0FBECDBFDF91CF910B +:102300001F910F91FF90EF90DF90CF90BF900C94B2 +:10231000F81D8B2D837009F07BC00111FAC1812F4C +:10232000829586958770880F880F912F9F70C92E90 +:10233000D12CE12CF12C082E04C0CC0CDD1CEE1CA1 +:10234000FF1C0A94D2F714FF12C04FE050E060E087 +:1023500070E004C0440F551F661F771F8A95D2F79F +:10236000CB01BA01609570958095909503C060E0AF +:1023700070E0CB012B2D269526952370422F50E03F +:1023800042305105D9F04330510569F16C297D295E +:102390008E299F294130510551F126960FB6F894A8 +:1023A000DEBF0FBECDBFDF91CF911F910F91FF9088 +:1023B000EF90DF90CF90BF900C948D176C297D2902 +:1023C0008E299F2926960FB6F894DEBF0FBECDBF8B +:1023D000DF91CF911F910F91FF90EF90DF90CF9001 +:1023E000BF900C94A9170E948D17C701B6012696BD +:1023F0000FB6F894DEBF0FBECDBFDF91CF911F9116 +:102400000F91FF90EF90DF90CF90BF900C947117D9 +:10241000002319F08B2D817001C08695882309F463 +:1024200078C1812F829586958770880F880F912FAC +:102430009F70C92ED12CE12CF12C082E04C0CC0C9D +:10244000DD1CEE1CFF1C0A94D2F714FF12C04FE0F3 +:1024500050E060E070E004C0440F551F661F771F16 +:102460008A95D2F7CB01BA016095709580959095C9 +:1024700003C060E070E0CB012B2D269526952370DC +:10248000422F50E042305105D9F04330510569F1F7 +:102490006C297D298E299F294130510551F12696BD +:1024A0000FB6F894DEBF0FBECDBFDF91CF911F9165 +:1024B0000F91FF90EF90DF90CF90BF900C94671832 +:1024C0006C297D298E299F2926960FB6F894DEBFA8 +:1024D0000FBECDBFDF91CF911F910F91FF90EF9075 +:1024E000DF90CF90BF900C9483180E946718C701AB +:1024F000B60126960FB6F894DEBF0FBECDBFDF91B2 +:10250000CF911F910F91FF90EF90DF90CF90BF90F0 +:102510000C944B18103FD1F118F4103E50F4A1C0A8 +:10252000123F09F463C008F44CC0133F09F473C0B0 +:1025300098C01F708B2D8F710023A1F00E94E417AB +:10254000812F26960FB6F894DEBF0FBECDBFDF9168 +:10255000CF911F910F91FF90EF90DF90CF90BF90A0 +:102560000C9474100E940518812F26960FB6F894CB +:10257000DEBF0FBECDBFDF91CF911F910F91FF90B6 +:10258000EF90DF90CF90BF900C947B100023A9F0C8 +:102590002111BFC08B2D8F7126960FB6F894DEBF28 +:1025A0000FBECDBFDF91CF911F910F91FF90EF90A4 +:1025B000DF90CF90BF900C942A18223008F0A9C069 +:1025C000E9CF0023A9F08B2D8F7126960FB6F894D2 +:1025D000DEBF0FBECDBFDF91CF911F910F91FF9056 +:1025E000EF90DF90CF90BF900C94E417002359F345 +:1025F0008B2D8F7126960FB6F894DEBF0FBECDBF20 +:10260000DF91CF911F910F91FF90EF90DF90CF90CE +:10261000BF900C940518002399F08B2D8F7126968E +:102620000FB6F894DEBF0FBECDBFDF91CF911F91E3 +:102630000F91FF90EF90DF90CF90BF900C94CF1749 +:1026400026960FB6F894DEBF0FBECDBFDF91CF91B7 +:102650001F910F91FF90EF90DF90CF90BF900C945F +:10266000C5170023A9F0222309F4ADCF812F2696A8 +:102670000FB6F894DEBF0FBECDBFDF91CF911F9193 +:102680000F91FF90EF90DF90CF90BF900C945D0F73 +:10269000222309F4ADCF812F26960FB6F894DEBF22 +:1026A0000FBECDBFDF91CF911F910F91FF90EF90A3 +:1026B000DF90CF90BF900C9425104B2D4F70612F61 +:1026C000C7010E94AB0226960FB6F894DEBF0FBE7C +:1026D000CDBFDF91CF911F910F91FF90EF90DF90D1 +:1026E000CF90BF900C94E9164B2D4F70612FC7010E +:1026F00026960FB6F894DEBF0FBECDBFDF91CF9107 +:102700001F910F91FF90EF90DF90CF90BF900C94AE +:10271000D70526960FB6F894DEBF0FBECDBFDF916A +:10272000CF911F910F91FF90EF90DF90CF90BF90CE +:1027300008950E9484190E9459190E949E190E94AE +:10274000A91E0E94F81D80E090E00E94570E80E0D4 +:1027500090E00C946D0E0E9474190C9499130E94D1 +:10276000A018292F22952F7030E02C3031054CF421 +:102770002A3031056CF4225031092230310588F4B9 +:1027800007C02C30310549F02F30310531F009C038 +:10279000803E48F0803F29F406C093FB882780F9EB +:1027A000089580E0089581E00895CF93DF9300D0ED +:1027B00000D01F92CDB7DEB70F900F900F900F9003 +:1027C0000F90DF91CF910895CF93DF9300D000D089 +:1027D00000D0CDB7DEB726960FB6F894DEBF0FBE99 +:1027E000CDBFDF91CF9108951F93CF93DF93C09119 +:1027F000790116E080917A01C81799F0D0E01C9F0A +:10280000F0011D9FF00D1124E558FE4F40815181CC +:1028100062817381848195810E94E4132196C7703F +:10282000E9CFDF91CF911F9108954091AB01509175 +:10283000AC016091AD017091AE018091AF019091BA +:10284000B0010C94E4138091B00182958F7009F06F +:1028500054C08091AD01882309F44FC08091790163 +:10286000A0917A016091AB017091AC014091AE01F1 +:102870005091AF01B6E08A1709F43FC090E04115CE +:102880005105C1F17F3F11F46F3FA1F1B89FF001F5 +:10289000B99FF00D1124E558FE4F218172132AC013 +:1028A0002081621327C02281211124C02381348119 +:1028B0002417350710F421503109241B350B283C0F +:1028C0003105C0F42091B0012F7020612093B00138 +:1028D00026E0289FF001299FF00D1124E058FE4FBB +:1028E00080818F70806180838BEA91E00E948210EA +:1028F0000C94F41301968770BECF0895CF92DF92A7 +:10290000EF92FF920F931F93CF93DF93CDB7DEB774 +:1029100062970FB6F894DEBF0FBECDBF8C0185E085 +:10292000F801DE011D9601900D928A95E1F7D8011C +:102930004C9111965C91119712966C911297139687 +:10294000CD90DC9014973091AB017091AC018091E7 +:10295000AE019091AF01009709F46BC17F3F19F46C +:102960003F3F09F466C1E090AD01EE2009F4C0C01C +:102970002091B001C816D90628F0F601E81BF90B22 +:10298000CF0104C0809590958C0D9D1DFF24F3947C +:10299000883C910578F0F12C207F09F0C6C07C2D91 +:1029A000D98AC88A89890E94D5138BEA91E00E944E +:1029B0008210B1C0822F807F09F046C0751314C009 +:1029C000341312C0611110C02F7020612093B00128 +:1029D0000E9415148BEA91E00E9482108091B00150 +:1029E000D80115968C932EC0CD2819F15F3F11F4B4 +:1029F0004F3FF9F0F62E61111CC0809179012091B2 +:102A00007A0136E0821709F45AC090E0389FF0014D +:102A1000399FF00D1124E558FE4F7181571306C000 +:102A20007081471303C07281711103C001968770D2 +:102A3000E9CFF62E662309F418C18091B0018160B8 +:102A40008093B001F12C11C1751308C0341306C076 +:102A5000611104C08091B001D801C3C04D875E8769 +:102A60008D859E856A8B0E94AF136A898823E1F168 +:102A70006623D1F12091B001822F82958F7090E072 +:102A8000029774F08091AB019091AC0198878F838D +:102A90001986DB86CA862C87CE0107960E94821093 +:102AA00086E0F801ABEAB1E001900D928A95E1F77A +:102AB0000E9423140E941514FF24F394D6C04D875E +:102AC0005E878D859E850E94A018292F22952F70E4 +:102AD00030E0223031050CF0BCC09F7009F0B6C068 +:102AE000805E883008F4C1C0C8010E948210E4CF23 +:102AF000C816D90608F453C0F601E81BF90BCF013C +:102B0000883C910508F450C0F12C7C2DD98AC88AE4 +:102B100089890E94D513EBEAF1E086E0DF011D927E +:102B20008A95E9F70E941514A0C0751314C03413D8 +:102B300012C0611110C08091B001F8018583C801F5 +:102B40000E94821086E0EBEAF1E0DF011D928A9597 +:102B5000E9F7FE2C8AC04D875E878D859E856A8B3E +:102B60000E94AF136A89882309F4BECF662309F453 +:102B7000BBCF2091B001822F82958F7090E0029799 +:102B80000CF48ECF8091AB019091AC019A83898334 +:102B90001B82DD82CC822E83CE0101967FCF809571 +:102BA00090958C0D9D1DACCFF62E662309F49CCF1D +:102BB00075132EC034132CC02091B00120FD1FC00E +:102BC000822F82958F70D9F0D80115962C93159786 +:102BD0008F3049F08F5F982F9295907F822F8F7062 +:102BE000892B15968C93C8010E94821086E0F8010B +:102BF000ABEAB1E001900D928A95E1F793CF86E0C0 +:102C0000F801ABEAB1E001900D928A95E1F72DC091 +:102C10004D875E878D859E850E94AF13811140CFC1 +:102C20008091B00181608093B001C8010E94821040 +:102C30001CC0662309F458CF4D875E878D859E851D +:102C40000E94AF13882309F44FCF2ACF811148CFB8 +:102C50000CC0243031050CF047CF9F7009F440CFF1 +:102C6000F8019581907F09F03BCF8F2D62960FB6CA +:102C7000F894DEBF0FBECDBFDF91CF911F910F91B2 +:102C8000FF90EF90DF90CF9008951F93CF93DF9345 +:102C9000CDB7DEB72C970FB6F894DEBF0FBECDBF11 +:102CA0004F83588769877A878B879C87CE010796E1 +:102CB0000E947E14882369F08F8198852A853B8540 +:102CC000232BF1F19F3F09F063C08F3F09F060C0F3 +:102CD00037C086E0FE013796DE01119601900D9215 +:102CE0008A95E1F76F817885EA85FB85309741F118 +:102CF0007F3F11F46F3F21F120917A0130E0C9014B +:102D00000196877099274091790150E084179507C3 +:102D100009F447C069837A83FD83EC8396E0929F30 +:102D2000D001939FB00D1124A558BE4FFE013196DE +:102D300001900D929A95E1F780937A010E94F41325 +:102D400016E08091790190917A018917C1F1189F5D +:102D5000C001112485589E4F0E947E14882379F16A +:102D6000E09179011E9FF0011124E558FE4F40814A +:102D7000518162817381848195810E94E4138091E5 +:102D8000790190E001968770992780937901D9CFD6 +:102D90004F81588569857A858B859C850E94E413CF +:102DA000CFCF0E94AB1310927A0110927901EBEA17 +:102DB000F1E086E0DF011D928A95E9F7C1CF2C96FC +:102DC0000FB6F894DEBF0FBECDBFDF91CF911F913C +:102DD0000895EF92FF920F931F93CF93DF938C018F +:102DE000892B09F46CC0F12CEE24E394E8012196C0 +:102DF000F8018491843740F4843008F051C0813068 +:102E000081F0823019F15BC0853709F444C0A8F124 +:102E10009CE7980F903708F052C08F770E942510DA +:102E200041C00E5F1F4FFE01C49180E28C0F8830BD +:102E300048F4C7708E2D01C0880FCA95EAF70E942A +:102E4000771914C08C2F0E945D0F2DC00E5F1F4F8D +:102E5000FE01C49180E28C0F883058F4C7708E2D2B +:102E600001C0880FCA95EAF70E947D190E949E1939 +:102E70001AC08C2F0E94251016C00E5F1F4FFE0136 +:102E8000C491CC2381F08FE99FE00197F1F700C056 +:102E90000000C150F6CF0E5F1F4FFE01F49003C03B +:102EA0000E945D0F8E018F2D882309F49FCFEFE9DB +:102EB000FFE03197F1F700C000008150F5CFDF91BE +:102EC000CF911F910F91FF90EF9008950895609317 +:102ED000B5017093B6018093B7019093B8010C943B +:102EE00099130F931F930091B5011091B601209192 +:102EF000B7013091B801DC01CB01802B912BA22BC3 +:102F0000B32B8093B5019093B601A093B701B09312 +:102F1000B8011F910F910C9499130F931F93009177 +:102F2000B5011091B6012091B7013091B801DC01D3 +:102F3000CB0180239123A223B3238093B5019093E7 +:102F4000B601A093B701B093B8011F910F910C94F3 +:102F500099130F931F930091B5011091B601209121 +:102F6000B7013091B801DC01CB0180279127A2275E +:102F7000B3278093B5019093B601A093B701B093A6 +:102F8000B8011F910F910C9499131092B1011092F6 +:102F9000B2011092B3011092B4010C94991341E064 +:102FA00050E060E070E004C0440F551F661F771FBB +:102FB0008A95D2F74093B1015093B2016093B30167 +:102FC0007093B4010C94991341E050E060E070E01C +:102FD00004C0440F551F661F771F8A95D2F7809152 +:102FE000B1019091B201A091B301B091B401482B0D +:102FF000592B6A2B7B2B4093B1015093B201609304 +:10300000B3017093B4010C94991341E050E060E077 +:1030100070E004C0440F551F661F771F8A95D2F7D2 +:1030200040955095609570958091B1019091B20155 +:10303000A091B301B091B401482359236A237B23A3 +:103040004093B1015093B2016093B3017093B40106 +:103050000C94991341E050E060E070E004C0440F2C +:10306000551F661F771F8A95D2F78091B101909105 +:10307000B201A091B301B091B401482759276A2742 +:103080007B274093B1015093B2016093B3017093D9 +:10309000B4010C9499130F931F930091B1011091F7 +:1030A000B2012091B3013091B401DC01CB01802B3E +:1030B000912BA22BB32B8093B1019093B201A093DB +:1030C000B301B093B4011F910F910C9499130F9316 +:1030D0001F930091B1011091B2012091B301309181 +:1030E000B401DC01CB0180239123A223B32380937D +:1030F000B1019093B201A093B301B093B4011F91B9 +:103100000F910C9499130F931F930091B10110919B +:10311000B2012091B3013091B401DC01CB018027D1 +:103120009127A227B3278093B1019093B201A09376 +:10313000B301B093B4011F910F910C9499130895AA +:10314000CF92DF92EF92FF920F931F93CF93DF9373 +:103150008C01C090B501D090B601E090B701F0901D +:10316000B8014091B1015091B2016091B3017091E9 +:10317000B401C42AD52AE62AF72ACFE1D0E0D70144 +:10318000C6010C2E04C0B695A795979587950A940D +:10319000D2F780FF07C0B8018C2F0E94FA0581305A +:1031A000910531F4219758F7B80180E00E94FA05A3 +:1031B000DF91CF911F910F91FF90EF90DF90CF9013 +:1031C000089590910C01992321F090910D01911196 +:1031D00009C020910E0130910F01F90132969FEF45 +:1031E00040E01FC0982F9695969596959F3050F584 +:1031F000E0910E01F0910F01E90FF11D877021E0C0 +:1032000030E0A90102C0440F551F8A95E2F7CA01B8 +:103210009181892B818308959F3F39F04F5F4E3014 +:1032200041F051915813F8CF0DC05111F7CF942FA1 +:10323000F5CF9F3F39F0F901E90FF11D97FDFA95A0 +:1032400082830895089590910C01992321F0909123 +:103250000D01911109C020910E0130910F01F9016A +:103260003296205F3F4F1FC0982F96959695969562 +:103270009F30F0F4E0910E01F0910F01E90FF11D84 +:10328000877021E030E0A90102C0440F551F8A95E4 +:10329000E2F7CA018095918189238183089531964F +:1032A000E217F30729F090819813F9CF1082F7CF36 +:1032B000089581E090E0E0910E01F0910F01E80F98 +:1032C000F91F1082019680319105A9F70895909118 +:1032D000CB01892B8093CB01089580959091CB01F0 +:1032E00089238093CB0108951092CB01089590918A +:1032F000CA01892B8093CA01089580959091CA01D3 +:1033000089238093CA0108951092CA010895809379 +:10331000B90108951092B901089580910E0190911C +:103320000F01FC0131969C01205F3F4F80E091919D +:1033300091118F5FE217F307D1F70895E0910E0125 +:10334000F0910F018091CB018083E0910E01F0910B +:103350000F0190818091CA01892B80838091B901EE +:10336000882361F0E0910E01F0910F019081892B8B +:1033700080830E948D1981111092B90180910E01F4 +:1033800090910F010C94410ECF92DF92EF92FF9239 +:103390006C01EE24FF24C114D104E104F10421F0F6 +:1033A000C701B60120E101C020E0C72ED82EE92ECA +:1033B000FF24C114D104E104F10419F0285FC7010E +:1033C000B6016B017C0154E0F694E794D794C7945E +:1033D0005A95D1F7C114D104E104F10419F02C5F1E +:1033E000C701B6016B017C0142E0F694E794D794E3 +:1033F000C7944A95D1F7C114D104E104F10419F03E +:103400002E5FC701B601DC01CB01B695A795979554 +:103410008795892B8A2B8B2B09F02F5F822FFF90AA +:10342000EF90DF90CF9008958091E501843009F10D +:103430001092CD0120E488E190E00FB6F894A895B1 +:10344000809360000FBE2093600083B7817F84600B +:1034500083BF83B7816083BF7894889583B78E7F5D +:1034600083BF88E10FB6F8948093600010926000EB +:103470000FBE089508950895CF930E943A1A0E94AE +:1034800023040E943B1AC0E08C2F0E941105811179 +:1034900004C0CF5FCE30C1F701C081E0CF91089565 +:1034A0000E94AB130E94350E0C942E0782E084BD5F +:1034B00093E095BD9AEF97BD80936E0008952FB766 +:1034C000F8948091CE019091CF01A091D001B0915C +:1034D000D1012FBF0895CF92DF92EF92FF920F9309 +:1034E0001F932FB7F8944091CE015091CF01609176 +:1034F000D0017091D1012FBF6A017B01EE24FF241E +:103500008C0120E030E0C016D106E206F30610F48C +:10351000415051099A01281B390BC9011F910F9184 +:10352000FF90EF90DF90CF9008951F920F920FB60B +:103530000F9211248F939F93AF93BF938091CE01ED +:103540009091CF01A091D001B091D1010196A11D20 +:10355000B11D8093CE019093CF01A093D001B09381 +:10356000D101BF91AF919F918F910F900FBE0F909E +:103570001F9018950E94320BF8942FEF87EA91E67E +:10358000215080409040E1F700C0000087E090EBC0 +:10359000DC018093EE019093EF01A093F001B093D2 +:1035A000F1019CE088E10FB6F894A8958093600043 +:1035B0000FBE90936000FFCFEF92FF920F931F9387 +:1035C000CF93DF93D82FC0E08C2F0E94110500E02D +:1035D00010E0E82EF12CC701002E02C095958795CA +:1035E0000A94E2F780FD06C00F5F1F4F06301105F9 +:1035F00091F709C0602F7C2F80E00E94D805D81376 +:10360000F3CF81E004C0CF5FCE30F1F680E0DF91F0 +:10361000CF911F910F91FF90EF900895CF93C82FF6 +:103620008CE20E94DC1A882321F08C2FCF910C941D +:10363000DC1A80E0CF910895CF930E94631C811122 +:1036400002C00E94491CC5E6C15049F00E942304F3 +:103650008FE39CE90197F1F700C00000F5CF89E204 +:103660000E940E1B811113C18AE20E940E1B811160 +:103670000E94491C85E00E940E1B81110E94BA1A0B +:103680000E946E1C8093CC0187E00E940E1B882351 +:10369000A9F18BE10E940E1B882351F08091CC018F +:1036A00081FB222720F991E0922790FB81F90EC03F +:1036B0008EE00E940E1B882361F08091CC0182FB7A +:1036C000222720F991E0922790FB82F98093CC0188 +:1036D00015C080E10E940E1B9091CC01882341F01F +:1036E00093FB222720F981E0822780FB93F904C015 +:1036F000892F809580FB90F99093CC018091CC012B +:103700000E94721C0E94801C8093DF0180EE0E9448 +:103710000E1B882341F08091DF01982F909590FB3C +:1037200080F98093DF0189E30E940E1B882359F002 +:103730008091DF0181FB222720F991E0922790FB05 +:1037400081F98093DF0182EE0E940E1B882359F0DD +:103750008091DF0182FB222720F991E0922790FBE4 +:1037600082F98093DF0186EE0E940E1B882359F0B8 +:103770008091DF0183FB222720F991E0922790FBC3 +:1037800083F98093DF0183EE0E940E1B882359F09A +:103790008091DF0184FB222720F991E0922790FBA2 +:1037A00084F98093DF0185E30E940E1B882359F082 +:1037B0008091DF0185FB222720F991E0922790FB81 +:1037C00085F98093DF0181E30E940E1B882359F065 +:1037D0008091DF0186FB222720F991E0922790FB60 +:1037E00086F98093DF0181E10E940E1B882359F046 +:1037F0008091DF0187FB222720F991E0922790FB3F +:1038000087F98093DF018091DF010E94841C809101 +:10381000DF0187FB882780F980930D0187E20E94F2 +:103820000E1BC82F8EE10E940E1B8111C2608FE11A +:103830000E940E1B8111C46080E20E940E1B811148 +:10384000C86081E20E940E1B8111C06182E20E9469 +:103850000E1B8111C06283E20E940E1B8111C064A5 +:1038600084E20E940E1B882311F0C06802C0CC23A2 +:1038700029F08C2F0E947B1C6C2F03C00E94771CA8 +:10388000682F70E080E090E0CF910C946717CF91A3 +:1038900008956DEE7EEF80E090E00E94AF2260E040 +:1038A00082E090E00E94A12260E083E090E00E942C +:1038B000A12260E084E090E00E94A12260E085E027 +:1038C00090E00C94A12280E090E00E949B2221E0F5 +:1038D0008D3E9E4F09F020E0822F089582E090E017 +:1038E0000C949322682F82E090E00C94A12283E054 +:1038F00090E00C949322682F83E090E00C94A12236 +:1039000084E090E00C949322682F84E090E00C9483 +:10391000A1228091D40180FF0BC06091130185E04A +:10392000689FB001112475956795759567952BC0B3 +:1039300081FF09C06091130185E0689FB0011124E7 +:103940007595679520C082FF07C06091130185E0DF +:10395000689FB001112417C09091D5019923D1F02F +:1039600060911201961788F72091130185E0289F36 +:1039700090011124929FA001939F500D112470E09B +:10398000CA010E9465226038710540F46115710515 +:1039900039F002C065E070E0862F08958FE7089542 +:1039A00081E008958091D40180FF08C060911101E9 +:1039B00070E0759567957595679521C081FF06C084 +:1039C0006091110170E07595679519C082FF04C080 +:1039D0006091110170E010C09091D5019923C1F060 +:1039E000609110019617A0F780911101899FC00185 +:1039F000112470E00E9465226038710528F4611579 +:103A0000710521F0862F08958FE7089581E00895CC +:103A100061E070E0F4CF803F21F40E94891C819521 +:103A200004C0813F29F40E94891C8093D801089525 +:103A3000823F21F40E94891C819504C0833F29F4B0 +:103A40000E94891C8093D7010895893F19F40E9430 +:103A5000D21C05C08A3F31F40E94D21C819580930C +:103A6000D90108958B3F21F40E94D21C819504C096 +:103A70008C3F29F40E94D21C8093DA010895843F80 +:103A800021F48091D601816017C0853F21F4809197 +:103A9000D601826011C0863F21F48091D6018460F6 +:103AA0000BC0873F21F48091D601886005C0883F14 +:103AB00031F48091D60180618093D60108958D3FC5 +:103AC00021F48091D40181600BC08E3F21F480915C +:103AD000D401826005C08F3F29F48091D4018460B5 +:103AE0008093D4010895803F39F48091D80187FFF5 +:103AF0006CC01092D80169C0813F29F48091D8012F +:103B00001816BCF362C09091D701823F29F497FF49 +:103B10005CC01092D70159C0833F19F41916CCF339 +:103B200054C0893F41F48091D90118160CF04DC062 +:103B30001092D9014AC08A3F29F48091D90187FFA8 +:103B400044C0F6CF8B3F39F48091DA0187FF3DC046 +:103B50001092DA013AC08C3F29F48091DA011816EC +:103B6000BCF333C0843F21F48091D6018E7F17C00F +:103B7000853F21F48091D6018D7F11C0863F21F4CD +:103B80008091D6018B7F0BC0873F21F48091D601B5 +:103B9000877F05C0883F31F48091D6018F7E809366 +:103BA000D60113C08D3F21F48091D4018E7F0BC0CC +:103BB0008E3F21F48091D4018D7F05C08F3F29F481 +:103BC0008091D4018B7F8093D4018091D7018111A2 +:103BD0000EC08091D80181110AC08091D901811154 +:103BE00006C08091DA01811102C01092D5010895BA +:103BF00086ED91E00E944C0E0E945F1A9093D301D3 +:103C00008093D20108951F93CF93DF938091D201C7 +:103C10009091D3010E946B1AAC019091D501992328 +:103C200021F02091140130E006C0209115018AE0B6 +:103C3000289F900111244217530708F486C08091F1 +:103C4000D701C091D801D091D9011091DA01811129 +:103C500007C0C11176C0D11174C0111172C075C0F6 +:103C60009F3F19F09F5F9093D501181624F40E948E +:103C7000891C8093D7018091D70187FF05C00E94DE +:103C8000891C81958093D7011C1624F40E94891CFD +:103C90008093D8018091D80187FF05C00E94891CBC +:103CA00081958093D8016091D701662339F1C09145 +:103CB000D801CC2319F1772767FD7095872F972FAF +:103CC0000E94762123E333E343E35FE30E94DA219A +:103CD0000E9443216093D7016C2F772767FD709571 +:103CE000872F972F0E94762123E333E343E35FE39B +:103CF0000E94DA210E9443216093D8011D1624F40A +:103D00000E94D21C8093D9018091D90187FF05C000 +:103D10000E94D21C81958093D901111624F40E942F +:103D2000D21C8093DA018091DA0187FF05C00E94DE +:103D3000D21C81958093DA01DF91CF911F910C9471 +:103D4000F81D9F3F09F08ECF96CFDF91CF911F9145 +:103D50000895E6EDF1E085E0DF011D928A95E9F72F +:103D60001092D5011092D4010895833081F128F486 +:103D7000813059F08230D1F00895853009F449C07E +:103D8000B8F1863009F456C0089580911501262FA8 +:103D900030E0280F311D2F3F310524F4680F609368 +:103DA000150108958FEF80931501089580911401F6 +:103DB000262F30E0280F311D2F3F310524F4680FE6 +:103DC0006093140108958FEF8093140108958091FA +:103DD0001301262F30E0280F311D2F3F310524F429 +:103DE000680F6093130108958FEF80931301089576 +:103DF00080911201262F30E0280F311D2F3F310511 +:103E000024F4680F6093120108958FEF80931201DC +:103E1000089580911101262F30E0280F311D2F3F8A +:103E2000310524F4680F6093110108958FEF80939A +:103E30001101089580911001262F30E0280F311DC7 +:103E40002F3F310524F4680F6093100108958FEF20 +:103E5000809310010895833011F128F4813049F0E6 +:103E6000823091F00895853081F120F18630C1F1E2 +:103E7000089580911501681720F4861B8093150121 +:103E8000089510921501089580911401681720F487 +:103E9000861B809314010895109214010895809157 +:103EA0001301681720F4861B809313010895109264 +:103EB0001301089580911201681720F4861B8093E6 +:103EC000120108951092120108958091110168174E +:103ED00020F4861B8093110108951092110108951A +:103EE00080911001681720F4861B809310010895BB +:103EF0001092100108950F931F938D3109F46BC038 +:103F000008F03FC08E3009F47DC0C0F4873009F45A +:103F10006EC068F4863009F0AFC08091CC01817F1B +:103F20008E7F8093CC0181E08093DC01A6C0883035 +:103F300009F458C08B3009F49BC09EC0863109F447 +:103F400097C078F4803109F470C0813109F094C0D1 +:103F50000E94AB1390910D0181E0892780930D01A0 +:103F600087C0893109F484C08B3109F085C0809104 +:103F7000CC0181FB222720F991E0922790FB81F967 +:103F80004AC0853309F45BC048F4873209F457C04E +:103F900008F45AC0893209F452C06EC0833438F430 +:103FA0008A3308F067C0883309F462C065C083347F +:103FB00009F445C0883409F05FC00E94AB130FEFCD +:103FC00013ED20E3015010402040E1F700C0000055 +:103FD0000E94BA1A4DC00E94FD200E94350E0E9418 +:103FE0002E0746C00E946E1C0E94801C41C090910A +:103FF000CC01892F817090FF12C0917F9E7F90939A +:10400000CC013BC08091CC0182FB222720F991E0BA +:10401000922790FB82F98093CC01992349F18091FA +:10402000CC0181608093CC0123C08091CC0183FBC3 +:10403000222720F991E0922790FB83F9ECCF61E0F1 +:1040400070E080E090E010C08D5141E050E060E011 +:1040500070E08A019B0104C0000F111F221F331F53 +:104060008A95D2F7C901B8010E9467170E94AB1365 +:1040700081E003C08953E9CF80E01F910F9108953B +:1040800080E0089580E00895CF93C82F8091DC01EF +:10409000813079F018F08230E9F187C0E0910E01AB +:1040A000F0910F018081813169F0823209F07FC087 +:1040B00009C0E0910E01F0910F018081813111F072 +:1040C000823261F48C2F0E944020811104C08C2F19 +:1040D0000E947B1F1DC081E090E01AC08C2F0E94BF +:1040E0004220811114C0C43179F048F4CB3079F00A +:1040F000C03109F060C082E08093DC0108C0C932A1 +:1041000019F0C83321F057C01092DC0154C081E08F +:10411000817053C0C93289F118F5C43171F1A8F426 +:10412000C73009F046C08AE08093150194E190936E +:10413000140193E0909313018093120188E080931F +:10414000110188E28093100134C0CE51C63088F549 +:10415000EC2FF0E0E65DFE4F80818093DB0129C00B +:10416000CE34E9F020F4CB3421F56AE013C0C13538 +:1041700079F0C235F1F461E00DC08091DB01882354 +:1041800019F01092DB0115C081E08093DC0115C0AD +:1041900061E006C08091DB010E94B51E0AC06AE0A2 +:1041A0008091DB010E942B1F04C01092DC0180E093 +:1041B00004C081E002C080E0ABCFCF910895E1E878 +:1041C000F0E08081886080838081816080838FB708 +:1041D000F89493E09093890090ED909388008FBFBE +:1041E0000895EFE6F0E08081826080830895EFE635 +:1041F000F0E080818D7F80830895EFE6F0E090818C +:1042000082E08927808308951F920F920FB60F9244 +:1042100011242F933F934F935F936F937F938F93CB +:104220009F93AF93BF93EF93FF938091DD019091A4 +:10423000DE0101969093DE018093DD01811103C0C0 +:1042400082E00E942E07E091DE01E695E695F0E01F +:10425000E657FB4FE4918091DD018E1303C080E0AF +:104260000E942E07FF91EF91BF91AF919F918F9187 +:104270007F916F915F914F913F912F910F900FBE62 +:104280000F901F90189504D06894B1118DC00895B7 +:1042900070D088F09F5790F0B92F9927B751A0F0B0 +:1042A000D1F0660F771F881F991F1AF0BA95C9F7CA +:1042B00012C0B13081F077D0B1E0089574C0672F9B +:1042C000782F8827B85F39F0B93FCCF3869577957A +:1042D0006795B395D9F73EF4909580957095619563 +:1042E0007F4F8F4F9F4F0895E89409C097FB3EF48E +:1042F00090958095709561957F4F8F4F9F4F992333 +:10430000A9F0F92F96E9BB279395F69587957795B0 +:104310006795B795F111F8CFFAF4BB0F11F460FF70 +:104320001BC06F5F7F4F8F4F9F4F16C0882311F0C8 +:1043300096E911C0772321F09EE8872F762F05C0DC +:10434000662371F096E8862F70E060E02AF09A9577 +:10435000660F771F881FDAF7880F9695879597F96C +:10436000089557FD9058440F551F59F05F3F71F065 +:104370004795880F97FB991F61F09F3F79F08795CC +:104380000895121613061406551FF2CF4695F1DF55 +:1043900008C0161617061806991FF1CF86957105E5 +:1043A000610508940895E894BB2766277727CB0119 +:1043B00097F908950BD078C069D028F06ED018F026 +:1043C000952309F05AC05FC01124EECFCADFA0F3D5 +:1043D000959FD1F3950F50E0551F629FF001729F9A +:1043E000BB27F00DB11D639FAA27F00DB11DAA1FB9 +:1043F000649F6627B00DA11D661F829F2227B00D06 +:10440000A11D621F739FB00DA11D621F839FA00D90 +:10441000611D221F749F3327A00D611D231F849FE0 +:10442000600D211D822F762F6A2F11249F57504037 +:104430008AF0E1F088234AF0EE0FFF1FBB1F661FD2 +:10444000771F881F91505040A9F79E3F510570F08B +:1044500014C0AACF5F3FECF3983EDCF386957795C6 +:104460006795B795F795E7959F5FC1F7FE2B880F86 +:10447000911D9695879597F9089597F99F6780E81C +:1044800070E060E008959FEF80EC089500240A94A6 +:104490001616170618060906089500240A9412161F +:1044A0001306140605060895092E0394000C11F452 +:1044B000882352F0BB0F40F4BF2B11F460FF04C0FF +:1044C0006F5F7F4F8F4F9F4F089597FB072E16F416 +:1044D000009407D077FD09D00E947F2207FC05D009 +:1044E0003EF4909581959F4F0895709561957F4F0B +:1044F0000895EE0FFF1F0590F491E02D0994AA1B7B +:10450000BB1B51E107C0AA1FBB1FA617B70710F0BE +:10451000A61BB70B881F991F5A95A9F780959095F0 +:10452000BC01CD010895F999FECF92BD81BDF89AE5 +:10453000992780B50895A8E1B0E042E050E00C94DE +:10454000B622262FF999FECF1FBA92BD81BD20BD9C +:104550000FB6F894FA9AF99A0FBE019608950E9440 +:10456000A122272F0C94A222DC01CB01FC01F99996 +:10457000FECF06C0F2BDE1BDF89A319600B40D92AF +:0C45800041505040B8F70895F894FFCF68 +:10458C0020023007BE079B07670733070101BA01FA +:10459C0028080A03140A3F4D36394B04FE03C8039E +:1045AC008F0322033B0354036D030102030405062E +:0445BC0007080900E3 +:00000001FF diff --git a/keyboard/ergodox_ez/keymaps/msc/readme.md b/keyboard/ergodox_ez/keymaps/msc/readme.md new file mode 100644 index 00000000000..0d14fcbd29b --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/msc/readme.md @@ -0,0 +1,32 @@ +# MSC Configuration + +### Based mostly on the ErgoDox EZ default layout with optimizations for coding on osx. + +#### Expecting the user to rely on Coder Layer this keymap removes some of the duplicate symbol keys in the lower portions of the board and replaces them with arrow keys and modifiers. The Media Layer is also updated to match the change in the arrow keys and the left and right click buttons are moved under the thumb position. The Media layer is now reached with toggle button in the lower right. + +### Main Layer + +![Main Layer](img/main_layer.png) + +### Code Layer + +![Code Layer](img/code_layer.png) + +### Media Layer + +![Media Layer](img/media_layer.png) + +## Changelog + +Version 1.0 + +- Changed the temp code layer key in the bottom right to toggle media layer +- Changed the temp media key to only be ";" +- Changed right hand bottom row to match vim home row nav directions +- Changed media keys to match arrow key changes +- Changed media left and right click to spacebar and backspace locations +- Changed bottom left to Cmd +- Changed single quote on left bottom row to alt + +#### Coming Soon: +- A new layer for Blender editing with a focus on left hand shortcut and a righthand num pad to control the view in Blender. diff --git a/keyboard/gh60/Makefile b/keyboard/gh60/Makefile index daba0f64490..4c8f9dc8ab8 100644 --- a/keyboard/gh60/Makefile +++ b/keyboard/gh60/Makefile @@ -53,9 +53,9 @@ SRC = keymap_common.c \ led.c ifdef KEYMAP - SRC := keymap_$(KEYMAP).c $(SRC) + SRC := keymaps/$(KEYMAP).c $(SRC) else - SRC := keymap_poker.c $(SRC) + SRC := keymaps/poker.c $(SRC) endif CONFIG_H = config.h diff --git a/keyboard/gh60/Makefile.pjrc b/keyboard/gh60/Makefile.pjrc index 11bd3b7840e..8ed73a248d1 100644 --- a/keyboard/gh60/Makefile.pjrc +++ b/keyboard/gh60/Makefile.pjrc @@ -53,9 +53,9 @@ SRC = keymap_common.c \ led.c ifdef KEYMAP - SRC := keymap_$(KEYMAP).c $(SRC) + SRC := keymaps/$(KEYMAP).c $(SRC) else - SRC := keymap_poker.c $(SRC) + SRC := keymaps/poker.c $(SRC) endif CONFIG_H = config.h diff --git a/keyboard/gh60/README.md b/keyboard/gh60/README.md index 510cb5c8b65..41a757ea3ae 100644 --- a/keyboard/gh60/README.md +++ b/keyboard/gh60/README.md @@ -21,7 +21,7 @@ Use `make -f Makefile.pjrc` if you want to use PJRC stack but I find no reason t ## Keymap -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_.c` and see keymap document(you can find in top README.md) and existent keymap files. +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document(you can find in top README.md) and existent keymap files. To build firmware binary hex file with a certain keymap just do `make` with `KEYMAP` option like: @@ -29,8 +29,8 @@ To build firmware binary hex file with a certain keymap just do `make` with `KEY ### 1 Poker -[keymap_poker.c](keymap_poker.c) emulates original Poker layers -while both [keymap_poker_bit.c](keymap_poker_bit.c) and [keymap_poker_set.c](keymap_poker_set.c) implements same layout in different way and they fix a minor issue of original Poker and enhance arrow keys. +[poker.c](keymaps/poker.c) emulates original Poker layers +while both [poker_bit.c](keymaps/poker_bit.c) and [poker_set.c](keymaps/poker_set.c) implement the same layout in different ways and they fix a minor issue of original Poker and enhance arrow keys. Fn + Esc = ` Fn + {left, down, up, right} = {home, pgdown, pgup, end} @@ -63,7 +63,7 @@ while both [keymap_poker_bit.c](keymap_poker_bit.c) and [keymap_poker_set.c](key ### 2. Plain Without any Fn layer this will be useful if you want to use key remapping tool like AHK on host. -See [keymap_plain.c](keymap_plain.c) for detail. +See [plain.c](keymaps/plain.c) for detail. #### 1.0 Plain Default layer ,-----------------------------------------------------------. @@ -80,11 +80,11 @@ See [keymap_plain.c](keymap_plain.c) for detail. ### 3. Hasu -This is my favorite keymap with HHKB Fn, Vi cursor and Mousekey layer. See [keymap_hasu.c](keymap_hasu.c) for detail. +This is my favorite keymap with HHKB Fn, Vi cursor and Mousekey layer. See [hasu.c](keymaps/hasu.c) for detail. ### 4. SpaceFN -This layout proposed by spiceBar uses space bar to change layer with using Dual role key technique. See [keymap_spacefn.c](keymap_spacefn.c) and [SpaceFN discussion](http://geekhack.org/index.php?topic=51069.0). +This layout proposed by spiceBar uses space bar to change layer with using Dual role key technique. See [spacefn.c](keymaps/spacefn.c) and [SpaceFN discussion](http://geekhack.org/index.php?topic=51069.0). #### 4.0 Default layer ,-----------------------------------------------------------. @@ -113,7 +113,7 @@ This layout proposed by spiceBar uses space bar to change layer with using Dual ### 5. HHKB -[keymap_hhkb.c](keymap_hhkb.c) emulates original HHKB layers. +[hhkb.c](keymaps/hhkb.c) emulates original HHKB layers. #### 5.0: Default layer ,-----------------------------------------------------------. |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| diff --git a/keyboard/gh60/keymap_hasu.c b/keyboard/gh60/keymaps/hasu.c similarity index 100% rename from keyboard/gh60/keymap_hasu.c rename to keyboard/gh60/keymaps/hasu.c diff --git a/keyboard/gh60/keymap_hhkb.c b/keyboard/gh60/keymaps/hhkb.c similarity index 100% rename from keyboard/gh60/keymap_hhkb.c rename to keyboard/gh60/keymaps/hhkb.c diff --git a/keyboard/gh60/keymap_plain.c b/keyboard/gh60/keymaps/plain.c similarity index 100% rename from keyboard/gh60/keymap_plain.c rename to keyboard/gh60/keymaps/plain.c diff --git a/keyboard/gh60/keymap_poker.c b/keyboard/gh60/keymaps/poker.c similarity index 100% rename from keyboard/gh60/keymap_poker.c rename to keyboard/gh60/keymaps/poker.c diff --git a/keyboard/gh60/keymap_poker_bit.c b/keyboard/gh60/keymaps/poker_bit.c similarity index 100% rename from keyboard/gh60/keymap_poker_bit.c rename to keyboard/gh60/keymaps/poker_bit.c diff --git a/keyboard/gh60/keymap_poker_set.c b/keyboard/gh60/keymaps/poker_set.c similarity index 100% rename from keyboard/gh60/keymap_poker_set.c rename to keyboard/gh60/keymaps/poker_set.c diff --git a/keyboard/gh60/keymap_spacefn.c b/keyboard/gh60/keymaps/spacefn.c similarity index 100% rename from keyboard/gh60/keymap_spacefn.c rename to keyboard/gh60/keymaps/spacefn.c diff --git a/keyboard/hhkb/Makefile b/keyboard/hhkb/Makefile index 5a179bd24da..d434246cef3 100644 --- a/keyboard/hhkb/Makefile +++ b/keyboard/hhkb/Makefile @@ -129,17 +129,17 @@ NKRO_ENABLE = yes # USB Nkey Rollover # Keymap file # ifdef KEYMAP - SRC := keymap_$(KEYMAP).c $(SRC) + SRC := keymaps/$(KEYMAP).c $(SRC) else ifdef HHKB_JP - SRC := keymap_jp.c $(SRC) + SRC := keymaps/jp.c $(SRC) else - SRC := keymap_hhkb.c $(SRC) + SRC := keymaps/hhkb.c $(SRC) endif endif -ifneq (, $(or $(findstring keymap_jp.c, $(SRC)), $(findstring yes, $(HHKB_JP)))) +ifneq (, $(or $(findstring jp.c, $(SRC)), $(findstring yes, $(HHKB_JP)))) OPT_DEFS += -DHHKB_JP endif diff --git a/keyboard/hhkb/Makefile.pjrc b/keyboard/hhkb/Makefile.pjrc index 7d0f8c3a9c0..403a8ec60ab 100644 --- a/keyboard/hhkb/Makefile.pjrc +++ b/keyboard/hhkb/Makefile.pjrc @@ -18,9 +18,9 @@ SRC = keymap_common.c \ led.c ifdef KEYMAP - SRC := keymap_$(KEYMAP).c $(SRC) + SRC := keymaps/$(KEYMAP).c $(SRC) else - SRC := keymap_hasu.c $(SRC) + SRC := keymaps/hasu.c $(SRC) endif CONFIG_H = config.h diff --git a/keyboard/hhkb/Makefile.rn42 b/keyboard/hhkb/Makefile.rn42 index cbb2b744c96..a730442af02 100644 --- a/keyboard/hhkb/Makefile.rn42 +++ b/keyboard/hhkb/Makefile.rn42 @@ -122,17 +122,17 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # Keymap file # ifdef KEYMAP - SRC := keymap_$(KEYMAP).c $(SRC) + SRC := keymaps/$(KEYMAP).c $(SRC) else ifdef HHKB_JP - SRC := keymap_jp.c $(SRC) + SRC := keymaps/jp.c $(SRC) else - SRC := keymap_hhkb.c $(SRC) + SRC := keymaps/hhkb.c $(SRC) endif endif -ifneq (, $(or $(findstring keymap_jp.c, $(SRC)), $(findstring yes, $(HHKB_JP)))) +ifneq (, $(or $(findstring jp.c, $(SRC)), $(findstring yes, $(HHKB_JP)))) OPT_DEFS += -DHHKB_JP endif diff --git a/keyboard/hhkb/README.md b/keyboard/hhkb/README.md index fcd72e19411..e20c23d8236 100644 --- a/keyboard/hhkb/README.md +++ b/keyboard/hhkb/README.md @@ -76,7 +76,7 @@ Use [Teensy Loader] if your controller is Teensy/Teensy++. ##Keymap -To define your own keymap create file named `keymap_.c` and see [keymap document](../../doc/keymap.md) and existent keymap files. +To define your own keymap create a file in the keymaps folder named `.c` and see keymap document (you can find in top README.md) and existent keymap files. ##Hardware diff --git a/keyboard/hhkb/keymap_hasu.c b/keyboard/hhkb/keymaps/hasu.c similarity index 100% rename from keyboard/hhkb/keymap_hasu.c rename to keyboard/hhkb/keymaps/hasu.c diff --git a/keyboard/hhkb/keymap_hhkb.c b/keyboard/hhkb/keymaps/hhkb.c similarity index 100% rename from keyboard/hhkb/keymap_hhkb.c rename to keyboard/hhkb/keymaps/hhkb.c diff --git a/keyboard/hhkb/keymap_jp.c b/keyboard/hhkb/keymaps/jp.c similarity index 100% rename from keyboard/hhkb/keymap_jp.c rename to keyboard/hhkb/keymaps/jp.c diff --git a/keyboard/hhkb/keymap_spacefn.c b/keyboard/hhkb/keymaps/spacefn.c similarity index 100% rename from keyboard/hhkb/keymap_spacefn.c rename to keyboard/hhkb/keymaps/spacefn.c diff --git a/keyboard/hhkb_qmk/Makefile b/keyboard/hhkb_qmk/Makefile index 8bd44100b76..21ba261a231 100644 --- a/keyboard/hhkb_qmk/Makefile +++ b/keyboard/hhkb_qmk/Makefile @@ -54,9 +54,9 @@ SRC = hhkb_qmk.c \ matrix.c ifdef KEYMAP - SRC := keymaps/keymap_$(KEYMAP).c $(SRC) + SRC := keymaps/keymaps/$(KEYMAP).c $(SRC) else - SRC := keymaps/keymap_default.c $(SRC) + SRC := keymaps/keymaps/default.c $(SRC) endif CONFIG_H = config.h diff --git a/keyboard/hhkb_qmk/README.md b/keyboard/hhkb_qmk/README.md index 606025c411c..389407b3aaf 100644 --- a/keyboard/hhkb_qmk/README.md +++ b/keyboard/hhkb_qmk/README.md @@ -171,10 +171,10 @@ Depending on which keymap you would like to use, you will have to compile slight To build with the default keymap, simply run `make`. ### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_.c` and see keymap document (you can find in top README.md) and existent keymap files. +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a file in the keymaps folder named `.c` and see keymap document (you can find in top README.md) and existent keymap files. To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: ``` $ make KEYMAP=[default|jack|] ``` -Keymaps follow the format **__keymap\_\.c__** and are stored in the `keymaps` folder. +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboard/hhkb_qmk/keymaps/keymap_default.c b/keyboard/hhkb_qmk/keymaps/default.c similarity index 100% rename from keyboard/hhkb_qmk/keymaps/keymap_default.c rename to keyboard/hhkb_qmk/keymaps/default.c diff --git a/keyboard/hhkb_qmk/keymaps/keymap_lxol.c b/keyboard/hhkb_qmk/keymaps/lxol.c similarity index 100% rename from keyboard/hhkb_qmk/keymaps/keymap_lxol.c rename to keyboard/hhkb_qmk/keymaps/lxol.c diff --git a/keyboard/jd45/Makefile b/keyboard/jd45/Makefile index 076dced8290..f6a8d10c583 100644 --- a/keyboard/jd45/Makefile +++ b/keyboard/jd45/Makefile @@ -54,9 +54,9 @@ SRC = jd45.c \ backlight.c ifdef KEYMAP - SRC := keymaps/keymap_$(KEYMAP).c $(SRC) + SRC := keymaps/keymaps/(KEYMAP).c $(SRC) else - SRC := keymaps/keymap_default.c $(SRC) + SRC := keymaps/keymaps/default.c $(SRC) endif CONFIG_H = config.h diff --git a/keyboard/jd45/keymaps/keymap_default.c b/keyboard/jd45/keymaps/default.c similarity index 100% rename from keyboard/jd45/keymaps/keymap_default.c rename to keyboard/jd45/keymaps/default.c diff --git a/keyboard/jd45/keymaps/keymap_justin.c b/keyboard/jd45/keymaps/justin.c similarity index 100% rename from keyboard/jd45/keymaps/keymap_justin.c rename to keyboard/jd45/keymaps/justin.c diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index 307b0c7f4fe..03d26017617 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -143,7 +143,7 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality # 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. +# RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. ifdef BACKLIGHT_ENABLE SRC += backlight.c diff --git a/keyboard/planck/README.md b/keyboard/planck/README.md index 3ba0cc15273..d9a1e3beeeb 100644 --- a/keyboard/planck/README.md +++ b/keyboard/planck/README.md @@ -16,13 +16,13 @@ Depending on which keymap you would like to use, you will have to compile slight To build with the default keymap, simply run `make`. ### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top README.md) and existent keymap files. +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document (you can find in top README.md) and existent keymap files. To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: ``` $ make KEYMAP=[default|jack|] ``` -Keymaps follow the format **__.c__** and are stored in the `keymaps` folder. +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. ### Notable forks (which some of the keymap files are from) - [Shane's Fork](https://github.com/shanecelis/tmk_keyboard/tree/master/keyboard/planck) diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index d995eb9e585..988deee99d6 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| F7 | F8 | F9 | F10 | F11 | F12 |Qwerty|Colemk|Dvorak| Reset|Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| F7 | F8 | F9 | F10 | F11 | F12 |Qwerty|Colemk|Dvorak| Reset|Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| diff --git a/keyboard/planck/common_keymaps/keymap_mitch.c b/keyboard/planck/old_keymap_files/common_keymaps/keymap_mitch.c similarity index 100% rename from keyboard/planck/common_keymaps/keymap_mitch.c rename to keyboard/planck/old_keymap_files/common_keymaps/keymap_mitch.c diff --git a/keyboard/planck/planck.c b/keyboard/planck/planck.c index fe8731ec7b5..4b39cf1e8bd 100644 --- a/keyboard/planck/planck.c +++ b/keyboard/planck/planck.c @@ -1,28 +1,26 @@ #include "planck.h" __attribute__ ((weak)) -void matrix_init_user(void) { - -} +void matrix_init_user(void) {} __attribute__ ((weak)) -void matrix_scan_user(void) { +void matrix_scan_user(void) {} -} +__attribute__ ((weak)) +void process_action_user(keyrecord_t *record) {} void matrix_init_kb(void) { - #ifdef BACKLIGHT_ENABLE - backlight_init_ports(); - #endif +#ifdef BACKLIGHT_ENABLE + backlight_init_ports(); +#endif - #ifdef RGBLIGHT_ENABLE - rgblight_init(); - #endif +#ifdef RGBLIGHT_ENABLE + rgblight_init(); +#endif - - // Turn status LED on - DDRE |= (1<<6); - PORTE |= (1<<6); + // Turn status LED on + DDRE |= (1<<6); + PORTE |= (1<<6); matrix_init_user(); } @@ -30,3 +28,7 @@ void matrix_init_kb(void) { void matrix_scan_kb(void) { matrix_scan_user(); } + +void process_action_kb(keyrecord_t *record) { + process_action_user(record); +} diff --git a/keyboard/planck/planck.h b/keyboard/planck/planck.h index e9566b92286..edcb5fbff6d 100644 --- a/keyboard/planck/planck.h +++ b/keyboard/planck/planck.h @@ -42,5 +42,6 @@ void matrix_init_user(void); void matrix_scan_user(void); +void process_action_user(keyrecord_t *record); #endif diff --git a/keyboard/preonic/Makefile b/keyboard/preonic/Makefile index 0145e44bc6b..89c48e50a9c 100644 --- a/keyboard/preonic/Makefile +++ b/keyboard/preonic/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. @@ -39,25 +39,41 @@ #---------------------------------------------------------------------------- # Target file name (without extension). -TARGET = preonic_lufa +TARGET = preonic + # Directory common source filess exist TOP_DIR = ../.. +TMK_DIR = ../../tmk_core # Directory keyboard dependent files exist TARGET_DIR = . # # project specific files -SRC = extended_keymap_common.c \ - matrix.c \ - led.c \ - backlight.c +SRC = preonic.c + +ifdef keymap + KEYMAP = $(keymap) +endif ifdef KEYMAP - SRC := extended_keymaps/extended_keymap_$(KEYMAP).c $(SRC) +ifneq ("$(wildcard keymaps/$(KEYMAP).c)","") + KEYMAP_FILE = keymaps/$(KEYMAP).c else - SRC := extended_keymaps/extended_keymap_default.c $(SRC) +ifneq ("$(wildcard keymaps/$(KEYMAP)/keymap.c)","") + KEYMAP_FILE = keymaps/$(KEYMAP)/keymap.c +else +$(error Keymap file does not exist) endif +endif +else +ifneq ("$(wildcard keymaps/default.c)","") + KEYMAP_FILE = keymaps/default.c +else + KEYMAP_FILE = keymaps/default/keymap.c +endif +endif +SRC := $(KEYMAP_FILE) $(SRC) CONFIG_H = config.h @@ -120,24 +136,26 @@ 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 +# 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 -BACKLIGHT_ENABLE = yes +# 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 MIDI_ENABLE - SRC += keymap_midi.c \ - beeps.c +ifdef BACKLIGHT_ENABLE + SRC += backlight.c endif + # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax # Search Path VPATH += $(TARGET_DIR) VPATH += $(TOP_DIR) +VPATH += $(TMK_DIR) -include $(TOP_DIR)/protocol/lufa.mk -include $(TOP_DIR)/common.mk -include $(TOP_DIR)/rules.mk +include $(TOP_DIR)/quantum/quantum.mk diff --git a/keyboard/preonic/Makefile.pjrc b/keyboard/preonic/Makefile.pjrc deleted file mode 100644 index be83ba18b17..00000000000 --- a/keyboard/preonic/Makefile.pjrc +++ /dev/null @@ -1,116 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# 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, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = gh60_pjrc - -# Directory common source filess exist -TOP_DIR = ../.. - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# project specific files -SRC = keymap_common.c \ - matrix.c \ - led.c - -ifdef KEYMAP - SRC := keymap_$(KEYMAP).c $(SRC) -else - SRC := keymap_jack.c $(SRC) -endif - -CONFIG_H = config.h - - -# MCU name, you MUST set this to match the board you are using -# type "make clean" after changing this, so all files will be rebuilt -MCU = atmega32u4 -#MCU = at90usb1286 - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 16000000 - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -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(+5000) -EXTRAKEY_ENABLE = yes # Audio control and System control(+600) -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover(+500) -#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TOP_DIR) - -include $(TOP_DIR)/protocol/pjrc.mk -include $(TOP_DIR)/common.mk -include $(TOP_DIR)/rules.mk - -plain: OPT_DEFS += -DKEYMAP_PLAIN -plain: all - -poker: OPT_DEFS += -DKEYMAP_POKER -poker: all - -poker_set: OPT_DEFS += -DKEYMAP_POKER_SET -poker_set: all - -poker_bit: OPT_DEFS += -DKEYMAP_POKER_BIT -poker_bit: all diff --git a/keyboard/preonic/PCB_GUIDE.md b/keyboard/preonic/PCB_GUIDE.md deleted file mode 100644 index c3004c75a48..00000000000 --- a/keyboard/preonic/PCB_GUIDE.md +++ /dev/null @@ -1,116 +0,0 @@ -# Planck Firmware Guide - -## Setting up the environment - -### Windows -1. Install [WinAVR Tools](http://sourceforge.net/projects/winavr/) for AVR GCC compiler. -2. Install [DFU-Programmer][dfu-prog] (the -win one). -3. Start DFU bootloader on the chip first time you will see 'Found New Hardware Wizard' to install driver. If you install device driver properly you can find chip name like 'ATmega32U4' under 'LibUSB-Win32 Devices' tree on 'Device Manager'. If not you will need to update its driver on 'Device Manager' to the `dfu-programmer` driver. - -### Mac -1. Install [CrossPack](http://www.obdev.at/products/crosspack/index.html) or install Xcode from the App Store and install the Command Line Tools from `Xcode->Preferences->Downloads`. -2. Install [DFU-Programmer][dfu-prog]. - -### Linux -1. Install AVR GCC with your favorite package manager. -2. Install [DFU-Programmer][dfu-prog]. - -##Verify Your Installation -1. Clone the following repository: https://github.com/jackhumbert/tmk_keyboard -2. Open a Terminal and `cd` into `tmk_keyboard/keyboard/planck` -3. Run `make`. This should output a lot of information about the build process. - -## Using the built-in functions - -Here is a list of some of the functions available from the command line: - -* `make clean`: clean the environment - may be required in-between builds -* `make`: compile the code -* `make COMMON=true`: compile with the common (non-extended) keymap -* `make MATRIX=`: compile with the referenced matrix file. Default if unspecified is `matrix_pcb.c`. For handwired boards, use `matrix_handwired.c`. -* `make KEYMAP=`: compile with the extended keymap file `extended_keymaps/extended_keymap_.c` -* `make COMMON=true KEYMAP=`: compile with the common keymap file `common_keymaps/keymap_.c` -* `make dfu`: build and flash the layout to the PCB -* `make dfu-force`: build and force-flash the layout to the PCB (may be require for first flash) - -Generally, the instructions to flash the PCB are as follows: - -1. Make changes to the appropriate keymap file -2. Save the file -3. `make clean` -4. Press the reset button on the PCB/press the key with the `RESET` keycode -5. `make dfu` - use the necessary `KEYMAP=` and/or `COMMON=true` arguments here. - -## Extended keymap - -### Keymap - -Unlike the common keymap, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/jackhumbert/tmk_keyboard/blob/master/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/jackhumbert/tmk_keyboard/blob/master/keyboard/planck/extended_keymap_common.h). - -You can use modifiers with keycodes like this: - - LCTL(KC_C) - -Which will generate Ctrl+c. These are daisy-chainable, meaning you can do things like: - - LCTL(LALT(KC_C)) - -That will generate Ctrl+Alt+c. The entire list of these functions is here: - -* `LCTL()`: Left control -* `LSFT()` / `S()`: Left shift -* `LALT()`: Left alt/opt -* `LGUI()`: Left win/cmd -* `RCTL()`: Right control -* `RSFT()`: Right shift -* `RALT()`: Right alt/opt -* `RGUI()`: Right win/cmd - -`S(KC_1)`-like entries are useful in writing keymaps for the Planck. - -### Other keycodes - -A number of other keycodes have been added that you may find useful: - -* `CM_`: the Colemak equivalent of a key (in place of `KC_`), when using Colemak in software (`CM_O` generates `KC_SCLN`) -* `RESET`: jump to bootloader for flashing (same as press the reset button) -* `BL_STEP`: step through the backlight brightnesses -* `BL_<0-15>`: set backlight brightness to 0-15 -* `BL_DEC`: lower the backlight brightness -* `BL_INC`: raise the backlight brightness -* `BL_TOGG`: toggle the backlight on/off - -### Function layers - -The extended keymap extends the number of function layers from 32 to the near-infinite value of 256. Rather than using `FN` notation (still available, but limited to `FN0`-`FN31`), you can use the `FUNC()` notation. `F()` is a shortcut for this. - -The function actions are unchanged, and you can see the full list of them [here](https://github.com/jackhumbert/tmk_keyboard/blob/master/common/action_code.h). They are explained in detail [here](https://github.com/jackhumbert/tmk_keyboard/blob/master/doc/keymap.md#2-action). - -### Macros - -Macros have been setup in the `extended_keymaps/extended_keymaps_default.c` file so that you can use `M()` to access a macro in the `action_get_macro` section on your keymap. The switch/case structure you see here is required, and is setup for `M(0)` - you'll need to copy and paste the code to look like this (e.g. to support `M(3)`): - - switch(id) { - case 0: - return MACRODOWN(TYPE(KC_A), END); - break; - case 1: - return MACRODOWN(TYPE(KC_B), END); - break; - case 2: - return MACRODOWN(TYPE(KC_C), END); - break; - case 3: - return MACRODOWN(TYPE(KC_D), END); - break; - } - return MACRO_NONE; - -`MACRODOWN()` is a shortcut for `(record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)` which tells the macro to execute when the key is pressed. Without this, the macro will be executed on both the down and up stroke. - -[cygwin]: https://www.cygwin.com/ -[mingw]: http://www.mingw.org/ -[mhv]: https://infernoembedded.com/products/avr-tools -[winavr]: http://winavr.sourceforge.net/ -[crosspack]: http://www.obdev.at/products/crosspack/index.html -[dfu-prog]: http://dfu-programmer.sourceforge.net/ diff --git a/keyboard/preonic/README.md b/keyboard/preonic/README.md index ee824d26e0d..4a33a3e4e08 100644 --- a/keyboard/preonic/README.md +++ b/keyboard/preonic/README.md @@ -1,56 +1,25 @@ -Planck keyboard firmware +Preonic keyboard firmware ====================== -DIY/Assembled compact ortholinear 40% keyboard by [Ortholinear Keyboards](http://ortholinearkeyboards.com). +DIY/Assembled compact ortholinear 50% keyboard by [Ortholinear Keyboards](http://ortholinearkeyboards.com). -## Extended Keymap -If you include extended_keymap_common.h instead of keymap_common.h at the top of your file, you'll have access to a bunch of goodies: +## Quantum MK Firmware -- Use `LSFT()`, `LCTL()`, et. al. (listed in extended_keymap_common.h) as modifiers for keys (daisy-chain-able) -- Use `FUNC(1)` instead of `FN1` (etc.) to access the function layers beyond the 32 function layer limit -- Use `CM_F` instead of `KC_F` to get the ColeMak equivilent for shortcuts (maps backwards) -- Use `MACRODOWN()` instead of `MACRO()` to easily make a keydown macro (`CM_*` works here too) +For the full Quantum feature list, see [the parent README.md](/README.md). -### Some notes on usage: +## Building -- The `KEYMAP()` macro is unable to be used due to the bitwise modifications that take place - refer to extended_keymap_jack.c to see how to set things up with the `KC_` prefix -- Keep an eye on the Makefile - this needs to include the correct files to work -- Don't forget to use `const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {` instead of the 8bit equivilent - -## Build - -Follow [this guide](http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177.html) to setup your development environment before anything else. Abbreviated instructions are provide at the [bottom of this document](https://github.com/rswiernik/tmk_keyboard/tree/rswiernik_dev/keyboard/planck#environment-setup) - -Download the whole firmware [here](https://github.com/jackhumbert/tmk_keyboard/archive/master.zip) and navigate to the keyboard/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex that you can load with the Teensy app onto your Planck (once you've hit reset/shorted GND & RST). +Download or clone the whole firmware and navigate to the keyboard/preonic folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. Depending on which keymap you would like to use, you will have to compile slightly differently. -####Default -To build with the default keymap, simply move to the tmk\_keyboard/keyboard/planck/ and run `make` as follows: -``` -$ make -``` +### Default +To build with the default keymap, simply run `make`. -## Keymap -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_.c` and see keymap document (you can find in top README.md) and existent keymap files. - -####**Extended Keymaps** +### Other Keymaps +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap, create a file in the keymaps folder named `.c` and see keymap document (you can find in top README.md) and existent keymap files. -To build the firmware binary hex file with an extended keymap just do `make` with `KEYMAP` option like: +To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: ``` -$ make KEYMAP=[common|jack|] +$ make KEYMAP=[default|jack|] ``` -_The only applicable keymaps will work with this option._ Extended keymaps follow the format **__extended\_keymap\_\.c__** - -####**Common Keymaps** - -Building with a common keymap is as simple as adding the COMMON option. Note that only -``` -$ make KEYMAP=[common|jack|] COMMON=true -``` -_The only applicable keymaps will work with this option._ Common keymaps follow the format **__keymap\_\.c__** - -## Notable TMK forks (which some of the keymap files are from) -- [Shane's Fork](https://github.com/shanecelis/tmk_keyboard/tree/master/keyboard/planck) -- [Pierre's Fork](https://github.com/pcarrier/tmk_keyboard/blob/pcarrier/planck/keyboard/gh60/keymap_planck.c) -- [Nathan's Fork](https://github.com/nathanrosspowell/tmk_keyboard/tree/planck-jack/keyboard/planck) -- [Matthew's Fork](https://github.com/pepers/tmk_keyboard/tree/master/keyboard/planck_grid) +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboard/preonic/__avr_gdbinit b/keyboard/preonic/__avr_gdbinit deleted file mode 100644 index afc51e6d193..00000000000 --- a/keyboard/preonic/__avr_gdbinit +++ /dev/null @@ -1,6 +0,0 @@ -define reset -SIGNAL SIGHUP -end -file planck_lufa.elf -target remote localhost:4242 -break main diff --git a/keyboard/preonic/analog.c b/keyboard/preonic/analog.c deleted file mode 100644 index 49b84ee0e89..00000000000 --- a/keyboard/preonic/analog.c +++ /dev/null @@ -1,53 +0,0 @@ -// Simple analog to digitial conversion - -#include -#include -#include -#include "analog.h" - - -static uint8_t aref = (1<= 12) return 0; - return adc_read(pgm_read_byte(pin_to_mux + pin)); -#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) - if (pin >= 8) return 0; - return adc_read(pin); -#else - return 0; -#endif -} - -// Mux input -int16_t adc_read(uint8_t mux) -{ -#if defined(__AVR_AT90USB162__) - return 0; -#else - uint8_t low; - - ADCSRA = (1< - -void analogReference(uint8_t mode); -int16_t analogRead(uint8_t pin); -int16_t adc_read(uint8_t mux); - -#define ADC_REF_POWER (1< -#include -#include -#include - -#define PI 3.14159265 - -void delay_us(int count) { - while(count--) { - _delay_us(1); - } -} - -int voices = 0; -double frequency = 0; -int volume = 0; -int position = 0; - -double frequencies[8] = {0, 0, 0, 0, 0, 0, 0, 0}; -int volumes[8] = {0, 0, 0, 0, 0, 0, 0, 0}; -bool sliding = false; -#define RANGE 1000 -volatile int i=0; //elements of the wave - - -void beeps() { - play_notes(); -} - -void send_freq(double freq, int vol) { - int duty = (((double)F_CPU) / freq); - ICR3 = duty; // Set max to the period - OCR3A = duty >> (0x10 - vol); // Set compare to half the period -} - -void stop_all_notes() { - voices = 0; - TCCR3A = 0; - TCCR3B = 0; - frequency = 0; - volume = 0; - - for (int i = 0; i < 8; i++) { - frequencies[i] = 0; - volumes[i] = 0; - } -} - -void stop_note(double freq) { - 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) { - TCCR3A = 0; - TCCR3B = 0; - frequency = 0; - volume = 0; - } else { - double freq = frequencies[voices - 1]; - int vol = volumes[voices - 1]; - if (frequency < freq) { - sliding = true; - for (double f = frequency; f <= freq; f += ((freq - frequency) / 500.0)) { - send_freq(f, vol); - } - sliding = false; - } else if (frequency > freq) { - sliding = true; - for (double f = frequency; f >= freq; f -= ((frequency - freq) / 500.0)) { - send_freq(f, vol); - } - sliding = false; - } - send_freq(freq, vol); - frequency = freq; - volume = vol; - } -} - -void init_notes() { - // TCCR1A = (1 << COM1A1) | (0 << COM1A0) | (1 << WGM11) | (1 << WGM10); - // TCCR1B = (1 << COM1B1) | (0 << COM1A0) | (1 << WGM13) | (1 << WGM12) | (0 << CS12) | (0 << CS11) | (1 << CS10); - - // DDRC |= (1<<6); - - // TCCR3A = (1 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30); - // TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (0 << CS31) | (1 << CS30); - - // ICR3 = 0xFFFF; - // OCR3A = (int)((float)wave[i]*ICR3/RANGE); //go to next array element - - - // cli(); - - // /* Enable interrupt on timer2 == 127, with clk/8 prescaler. At 16MHz, - // this gives a timer interrupt at 15625Hz. */ - // TIMSK3 = (1 << OCIE3A); - - // /* clear/reset timer on match */ - // // TCCR3A = 1<> 8) & 0x00FF) -// #define lowByte(c) (c & 0x00FF) - -ISR(TIMER3_COMPA_vect) { - - if (ICR3 > 0 && !sliding) { - switch (position) { - case 0: { - int duty = (((double)F_CPU) / (frequency)); - ICR3 = duty; // Set max to the period - OCR3A = duty >> 1; // Set compare to half the period - break; - } - case 1: { - int duty = (((double)F_CPU) / (frequency*2)); - ICR3 = duty; // Set max to the period - OCR3A = duty >> 1; // Set compare to half the period - break; - } - case 2: { - int duty = (((double)F_CPU) / (frequency*3)); - ICR3 = duty; // Set max to the period - OCR3A = duty >> 1; // Set compare to half the period - break; - } - } - position = (position + 1) % 3; - } -// /* OCR2A has been cleared, per TCCR2A above */ -// // OCR3A = 127; - -// // pos1 += incr1; -// // pos2 += incr2; -// // pos3 += incr3; - -// // sample = sinewave[highByte(pos1)] + sinewave[highByte(pos2)] + sinewave[highByte(pos3)]; - -// // OCR3A = sample; - - -// OCR3A=pgm_read_byte(&sinewave[pos1]); -// pos1++; -// // PORTC &= ~(1<<6); - -// /* buffered, 1x gain, active mode */ -// // SPDR = highByte(sample) | 0x70; -// // while (!(SPSR & (1< 0) { - DDRC |= (1<<6); - - TCCR3A = (1 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30); - TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30); - - if (frequency != 0) { - if (frequency < freq) { - for (double f = frequency; f <= freq; f += ((freq - frequency) / 500.0)) { - send_freq(f, vol); - } - } else if (frequency > freq) { - for (double f = frequency; f >= freq; f -= ((frequency - freq) / 500.0)) { - send_freq(f, vol); - } - } - } - send_freq(freq, vol); - frequency = freq; - volume = vol; - - frequencies[voices] = frequency; - volumes[voices] = volume; - voices++; - } - // ICR3 = 0xFFFF; - // for (int i = 0; i < 10000; i++) { - // OCR3A = round((sin(i*freq)*.5)+.5)*0xFFFF; - // // _delay_us(50); - // } - - // TCCR3A = 0; - // TCCR3B = 0; -} - -// void note(int x, float length) { -// DDRC |= (1<<6); -// int t = (int)(440*pow(2,-x/12.0)); // starting note -// for (int y = 0; y < length*1000/t; y++) { // note length -// PORTC |= (1<<6); -// delay_us(t); -// PORTC &= ~(1<<6); -// delay_us(t); -// } -// PORTC &= ~(1<<6); -// } - -// void true_note(float x, float y, float length) { -// for (uint32_t i = 0; i < length * 50; i++) { -// uint32_t v = (uint32_t) (round(sin(PI*2*i*640000*pow(2, x/12.0))*.5+1 + sin(PI*2*i*640000*pow(2, y/12.0))*.5+1) / 2 * pow(2, 8)); -// for (int u = 0; u < 8; u++) { -// if (v & (1 << u) && !(PORTC&(1<<6))) -// PORTC |= (1<<6); -// else if (PORTC&(1<<6)) -// PORTC &= ~(1<<6); -// } -// } -// PORTC &= ~(1<<6); -// } \ No newline at end of file diff --git a/keyboard/preonic/beeps.h b/keyboard/preonic/beeps.h deleted file mode 100644 index 378983c605b..00000000000 --- a/keyboard/preonic/beeps.h +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include -#include -#include - -void note(int x, float length); -void beeps(); -void true_note(float x, float y, float length); -void play_note(double freq, int vol); -void stop_note(double freq); -void stop_all_notes(); -void init_notes(); \ No newline at end of file diff --git a/keyboard/preonic/config.h b/keyboard/preonic/config.h index cad269c9d4c..5528667fa72 100644 --- a/keyboard/preonic/config.h +++ b/keyboard/preonic/config.h @@ -18,11 +18,11 @@ along with this program. If not, see . #ifndef CONFIG_H #define CONFIG_H -#include "config_definitions.h" +#include "config_common.h" /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6062 +#define PRODUCT_ID 0x6061 #define DEVICE_VER 0x0001 #define MANUFACTURER Ortholinear Keyboards #define PRODUCT The Preonic Keyboard @@ -34,7 +34,10 @@ along with this program. If not, see . /* Planck PCB default pin-out */ #define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } -#define ROWS (int []){ D1, D0, D5, B5, B6 } +#define ROWS (int []){ D2, D5, B5, B6, D3 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -55,6 +58,15 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) +/* ws2812 RGB LED */ +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD +#define ws2812_pin PD1 +#define RGBLED_NUM 28 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboard/preonic/config_definitions.h b/keyboard/preonic/config_definitions.h deleted file mode 100644 index fd138b8841d..00000000000 --- a/keyboard/preonic/config_definitions.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef CONFIG_DEFINITIONS_H -#define CONFIG_DEFINITIONS_H - -#define B0 0x20 -#define B1 0x21 -#define B2 0x22 -#define B3 0x23 -#define B4 0x24 -#define B5 0x25 -#define B6 0x26 -#define B7 0x27 -#define C0 0x30 -#define C1 0x31 -#define C2 0x32 -#define C3 0x33 -#define C4 0x34 -#define C5 0x35 -#define C6 0x36 -#define C7 0x37 -#define D0 0x40 -#define D1 0x41 -#define D2 0x42 -#define D3 0x43 -#define D4 0x44 -#define D5 0x45 -#define D6 0x46 -#define D7 0x47 -#define E0 0x50 -#define E1 0x51 -#define E2 0x52 -#define E3 0x53 -#define E4 0x54 -#define E5 0x55 -#define E6 0x56 -#define E7 0x57 -#define F0 0x60 -#define F1 0x61 -#define F2 0x62 -#define F3 0x63 -#define F4 0x64 -#define F5 0x65 -#define F6 0x66 -#define F7 0x67 - - - - - -#endif - diff --git a/keyboard/preonic/extended_keymap_common.c b/keyboard/preonic/extended_keymap_common.c deleted file mode 100644 index 4fa80de7cfa..00000000000 --- a/keyboard/preonic/extended_keymap_common.c +++ /dev/null @@ -1,216 +0,0 @@ -/* -Copyright 2012,2013 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 . -*/ - -#include "extended_keymap_common.h" -#include "report.h" -#include "keycode.h" -#include "action_layer.h" -#include "action.h" -#include "action_macro.h" -#include "debug.h" -#include "backlight.h" -#include "keymap_midi.h" -#include - -static action_t keycode_to_action(uint16_t keycode); - -/* converts key to action */ -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); - return action; - } else if (keycode >= 0x2000 && keycode < 0x3000) { - // Is a shortcut for function layer, pull last 12bits - return keymap_func_to_action(keycode & 0xFFF); - } else if (keycode >= 0x3000 && keycode < 0x4000) { - action_t action; - action.code = ACTION_MACRO(keycode & 0xFF); - return action; - } 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; - } else if (keycode == RESET) { - bootloader_jump(); - return; - } else if (keycode == DEBUG) { - print("\nDEBUG: enabled.\n"); - debug_enable = true; - return; - } else if (keycode >= 0x6000 && keycode < 0x7000) { - action_t action; - action.code = ACTION_FUNCTION_OPT(keycode & 0xFF, (keycode & 0x0F00) >> 8); - return action; - } - - 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) { - return keycode_to_action(KC_LCTL); - } - return keycode_to_action(keycode); - case KC_LCTL: - if (keymap_config.swap_control_capslock) { - return keycode_to_action(KC_CAPSLOCK); - } - return keycode_to_action(KC_LCTL); - case KC_LALT: - if (keymap_config.swap_lalt_lgui) { - if (keymap_config.no_gui) { - return keycode_to_action(ACTION_NO); - } - return keycode_to_action(KC_LGUI); - } - return keycode_to_action(KC_LALT); - case KC_LGUI: - if (keymap_config.swap_lalt_lgui) { - return keycode_to_action(KC_LALT); - } - if (keymap_config.no_gui) { - return keycode_to_action(ACTION_NO); - } - return keycode_to_action(KC_LGUI); - case KC_RALT: - if (keymap_config.swap_ralt_rgui) { - if (keymap_config.no_gui) { - return keycode_to_action(ACTION_NO); - } - return keycode_to_action(KC_RGUI); - } - return keycode_to_action(KC_RALT); - case KC_RGUI: - if (keymap_config.swap_ralt_rgui) { - return keycode_to_action(KC_RALT); - } - if (keymap_config.no_gui) { - return keycode_to_action(ACTION_NO); - } - return keycode_to_action(KC_RGUI); - case KC_GRAVE: - if (keymap_config.swap_grave_esc) { - return keycode_to_action(KC_ESC); - } - return keycode_to_action(KC_GRAVE); - case KC_ESC: - if (keymap_config.swap_grave_esc) { - return keycode_to_action(KC_GRAVE); - } - return keycode_to_action(KC_ESC); - case KC_BSLASH: - if (keymap_config.swap_backslash_backspace) { - return keycode_to_action(KC_BSPACE); - } - return keycode_to_action(KC_BSLASH); - case KC_BSPACE: - if (keymap_config.swap_backslash_backspace) { - return keycode_to_action(KC_BSLASH); - } - return keycode_to_action(KC_BSPACE); -#endif - default: - return keycode_to_action(keycode); - } -} - - -/* Macro */ -__attribute__ ((weak)) -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - return MACRO_NONE; -} - -/* Function */ -__attribute__ ((weak)) -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) -{ -} - -/* translates keycode to action */ -static action_t keycode_to_action(uint16_t keycode) -{ - action_t action; - switch (keycode) { - case KC_A ... KC_EXSEL: - case KC_LCTRL ... KC_RGUI: - action.code = ACTION_KEY(keycode); - break; - case KC_SYSTEM_POWER ... KC_SYSTEM_WAKE: - action.code = ACTION_USAGE_SYSTEM(KEYCODE2SYSTEM(keycode)); - break; - case KC_AUDIO_MUTE ... KC_WWW_FAVORITES: - action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode)); - break; - case KC_MS_UP ... KC_MS_ACCEL2: - action.code = ACTION_MOUSEKEY(keycode); - break; - case KC_TRNS: - action.code = ACTION_TRANSPARENT; - break; - default: - action.code = ACTION_NO; - break; - } - return action; -} - - -/* translates key to keycode */ -uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - // Read entire word (16bits) - return pgm_read_word(&keymaps[(layer)][(key.row)][(key.col)]); -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint16_t keycode) -{ - return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; -} - -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]) }; -} diff --git a/keyboard/preonic/extended_keymap_common.h b/keyboard/preonic/extended_keymap_common.h deleted file mode 100644 index 7ccfa1b0393..00000000000 --- a/keyboard/preonic/extended_keymap_common.h +++ /dev/null @@ -1,181 +0,0 @@ -/* -Copyright 2012,2013 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 KEYMAP_H -#define KEYMAP_H - -#include -#include -#include "action.h" -#include -#include "keycode.h" -#include "keymap.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -// #include "print.h" -#include "debug.h" - -#ifdef BOOTMAGIC_ENABLE -/* NOTE: Not portable. Bit field order depends on implementation */ -typedef union { - uint16_t raw; - struct { - bool swap_control_capslock:1; - bool capslock_to_control:1; - bool swap_lalt_lgui:1; - bool swap_ralt_rgui:1; - bool no_gui:1; - bool swap_grave_esc:1; - bool swap_backslash_backspace:1; - bool nkro:1; - }; -} keymap_config_t; -keymap_config_t keymap_config; -#endif - - -/* translates key to keycode */ -uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key); - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint16_t keycode); - -/* translates Fn keycode to action */ -action_t keymap_func_to_action(uint16_t keycode); - -extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; -extern const uint16_t fn_actions[]; - -// Ability to use mods in layouts -#define LCTL(kc) kc | 0x0100 -#define LSFT(kc) kc | 0x0200 -#define LALT(kc) kc | 0x0400 -#define LGUI(kc) kc | 0x0800 -#define RCTL(kc) kc | 0x1100 -#define RSFT(kc) kc | 0x1200 -#define RALT(kc) kc | 0x1400 -#define RGUI(kc) kc | 0x1800 - -// Alias for function layers than expand past FN31 -#define FUNC(kc) kc | 0x2000 - -// Aliases -#define S(kc) LSFT(kc) -#define F(kc) FUNC(kc) - -// For software implementation of colemak -#define CM_Q KC_Q -#define CM_W KC_W -#define CM_F KC_E -#define CM_P KC_R -#define CM_G KC_T -#define CM_J KC_Y -#define CM_L KC_U -#define CM_U KC_I -#define CM_Y KC_O -#define CM_SCLN KC_P - -#define CM_A KC_A -#define CM_R KC_S -#define CM_S KC_D -#define CM_T KC_F -#define CM_D KC_G -#define CM_H KC_H -#define CM_N KC_J -#define CM_E KC_K -#define CM_I KC_L -#define CM_O KC_SCLN - -#define CM_Z KC_Z -#define CM_X KC_X -#define CM_C KC_C -#define CM_V KC_V -#define CM_B KC_B -#define CM_K KC_N -#define CM_M KC_M -#define CM_COMM KC_COMM -#define CM_DOT KC_DOT -#define CM_SLSH KC_SLSH - -// Make it easy to support these in macros -#define KC_CM_Q CM_Q -#define KC_CM_W CM_W -#define KC_CM_F CM_F -#define KC_CM_P CM_P -#define KC_CM_G CM_G -#define KC_CM_J CM_J -#define KC_CM_L CM_L -#define KC_CM_U CM_U -#define KC_CM_Y CM_Y -#define KC_CM_SCLN CM_SCLN - -#define KC_CM_A CM_A -#define KC_CM_R CM_R -#define KC_CM_S CM_S -#define KC_CM_T CM_T -#define KC_CM_D CM_D -#define KC_CM_H CM_H -#define KC_CM_N CM_N -#define KC_CM_E CM_E -#define KC_CM_I CM_I -#define KC_CM_O CM_O - -#define KC_CM_Z CM_Z -#define KC_CM_X CM_X -#define KC_CM_C CM_C -#define KC_CM_V CM_V -#define KC_CM_B CM_B -#define KC_CM_K CM_K -#define KC_CM_M CM_M -#define KC_CM_COMM CM_COMM -#define KC_CM_DOT CM_DOT -#define KC_CM_SLSH CM_SLSH - -#define M(kc) kc | 0x3000 - -#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) - -#define BL_ON 0x4009 -#define BL_OFF 0x4000 -#define BL_0 0x4000 -#define BL_1 0x4001 -#define BL_2 0x4002 -#define BL_3 0x4003 -#define BL_4 0x4004 -#define BL_5 0x4005 -#define BL_6 0x4006 -#define BL_7 0x4007 -#define BL_8 0x4008 -#define BL_9 0x4009 -#define BL_10 0x400A -#define BL_11 0x400B -#define BL_12 0x400C -#define BL_13 0x400D -#define BL_14 0x400E -#define BL_15 0x400F -#define BL_DEC 0x4010 -#define BL_INC 0x4011 -#define BL_TOGG 0x4012 -#define BL_STEP 0x4013 - -#define RESET 0x5000 -#define DEBUG 0x5001 - -#define MIDI(n) n | 0x6000 - -#endif diff --git a/keyboard/preonic/extended_keymaps/extended_keymap_default.c b/keyboard/preonic/extended_keymaps/extended_keymap_default.c deleted file mode 100644 index b52f60fd08b..00000000000 --- a/keyboard/preonic/extended_keymaps/extended_keymap_default.c +++ /dev/null @@ -1,70 +0,0 @@ -#include "extended_keymap_common.h" -#include "backlight.h" -#include "lufa.h" -#include "debug.h" - -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_DEL}, - {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, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - // Space is repeated to accommadate for both spacebar wiring positions -}, -[1] = { /* Colemak */ - {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_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}, - {KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[2] = { /* RAISE */ - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {KC_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, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[3] = { /* LOWER */ - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, - {KC_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)}, - {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[4] = { /* TENKEY */ - {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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_KP_7, KC_KP_8, KC_KP_9, KC_P, KC_BSPC}, - {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_KP_4, KC_KP_5, KC_KP_6, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_KP_1, KC_KP_2, KC_KP_3, KC_SLSH, KC_ENT}, - {KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_SPC, KC_SPC, KC_KP_0, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -} -}; - -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: - if (record->event.pressed) { - register_code(KC_RSFT); - midi_send_noteon(&midi_device, 1, 64, 127); - backlight_step(); - } else { - unregister_code(KC_RSFT); - midi_send_noteoff(&midi_device, 1, 64, 127); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboard/preonic/extended_keymaps/extended_keymap_lock.c b/keyboard/preonic/extended_keymaps/extended_keymap_lock.c deleted file mode 100644 index ec7bc776ac9..00000000000 --- a/keyboard/preonic/extended_keymaps/extended_keymap_lock.c +++ /dev/null @@ -1,81 +0,0 @@ -#include "extended_keymap_common.h" -#include "backlight.h" -#include "action_layer.h" -#include "keymap_midi.h" -#include "beeps.h" - -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_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_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, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - // Space is repeated to accommadate for both spacebar wiring positions -}, -[1] = { /* Colemak */ - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {KC_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}, - {KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[2] = { /* 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, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[3] = { /* LOWER */ - {KC_GRV, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, - {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, - {KC_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)}, - {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, -[4] = { /* TENKEY */ - {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_KP_7, KC_KP_8, KC_KP_9, KC_P, KC_BSPC}, - {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_KP_4, KC_KP_5, KC_KP_6, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_KP_1, KC_KP_2, KC_KP_3, KC_SLSH, KC_ENT}, - {KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_SPC, KC_SPC, KC_KP_0, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, -[5] = { - { MIDI12 }, - { MIDI12 }, - { MIDI12 }, - { MIDI12 }, - {M(0), KC_LCTL, KC_LALT, KC_LGUI, FUNC(2), KC_SPC, KC_SPC, FUNC(1), MIDI, MIDI, MIDI, MIDI} -} - -}; - -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) -{ - switch(id) { - case 0: - if (record->event.pressed) { - // register_code(KC_RSFT); - backlight_set(BACKLIGHT_LEVELS); - default_layer_and(0); - default_layer_or((1<<5)); - } else { - // unregister_code(KC_RSFT); - backlight_set(0); - default_layer_and(0); - default_layer_or(0); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboard/preonic/keymap_midi.c b/keyboard/preonic/keymap_midi.c deleted file mode 100644 index a0fa59990c2..00000000000 --- a/keyboard/preonic/keymap_midi.c +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright 2015 Jack Humbert - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "extended_keymap_common.h" -#include "keymap_midi.h" -#include - -uint8_t starting_note = 0x0C; -int offset = 7; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - if (id != 0) { - if (record->event.pressed) { - midi_send_noteon(&midi_device, opt, (id & 0xFF), 127); - } else { - midi_send_noteoff(&midi_device, opt, (id & 0xFF), 127); - } - } - - if (record->event.key.col == (MATRIX_COLS - 1) && record->event.key.row == (MATRIX_ROWS - 1)) { - if (record->event.pressed) { - starting_note++; - play_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(starting_note + SCALE[0 + offset])/12.0+(MATRIX_ROWS - 1)), 0xC); - midi_send_cc(&midi_device, 0, 0x7B, 0); - midi_send_cc(&midi_device, 1, 0x7B, 0); - midi_send_cc(&midi_device, 2, 0x7B, 0); - midi_send_cc(&midi_device, 3, 0x7B, 0); - midi_send_cc(&midi_device, 4, 0x7B, 0); - return; - } else { - stop_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(starting_note + SCALE[0 + offset])/12.0+(MATRIX_ROWS - 1))); - stop_all_notes(); - return; - } - } - if (record->event.key.col == (MATRIX_COLS - 2) && record->event.key.row == (MATRIX_ROWS - 1)) { - if (record->event.pressed) { - starting_note--; - play_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(starting_note + SCALE[0 + offset])/12.0+(MATRIX_ROWS - 1)), 0xC); - midi_send_cc(&midi_device, 0, 0x7B, 0); - midi_send_cc(&midi_device, 1, 0x7B, 0); - midi_send_cc(&midi_device, 2, 0x7B, 0); - midi_send_cc(&midi_device, 3, 0x7B, 0); - midi_send_cc(&midi_device, 4, 0x7B, 0); - return; - } else { - stop_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(starting_note + SCALE[0 + offset])/12.0+(MATRIX_ROWS - 1))); - stop_all_notes(); - return; - } - } - - if (record->event.key.col == (MATRIX_COLS - 3) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) { - offset++; - midi_send_cc(&midi_device, 0, 0x7B, 0); - midi_send_cc(&midi_device, 1, 0x7B, 0); - midi_send_cc(&midi_device, 2, 0x7B, 0); - midi_send_cc(&midi_device, 3, 0x7B, 0); - midi_send_cc(&midi_device, 4, 0x7B, 0); - stop_all_notes(); - for (int i = 0; i <= 7; i++) { - play_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(starting_note + SCALE[i + offset])/12.0+(MATRIX_ROWS - 1)), 0xC); - _delay_us(80000); - stop_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(starting_note + SCALE[i + offset])/12.0+(MATRIX_ROWS - 1))); - _delay_us(8000); - } - return; - } - if (record->event.key.col == (MATRIX_COLS - 4) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) { - offset--; - midi_send_cc(&midi_device, 0, 0x7B, 0); - midi_send_cc(&midi_device, 1, 0x7B, 0); - midi_send_cc(&midi_device, 2, 0x7B, 0); - midi_send_cc(&midi_device, 3, 0x7B, 0); - midi_send_cc(&midi_device, 4, 0x7B, 0); - stop_all_notes(); - for (int i = 0; i <= 7; i++) { - play_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(starting_note + SCALE[i + offset])/12.0+(MATRIX_ROWS - 1)), 0xC); - _delay_us(80000); - stop_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(starting_note + SCALE[i + offset])/12.0+(MATRIX_ROWS - 1))); - _delay_us(8000); - } - return; - } - - if (record->event.pressed) { - // midi_send_noteon(&midi_device, record->event.key.row, starting_note + SCALE[record->event.key.col], 127); - midi_send_noteon(&midi_device, 0, (starting_note + SCALE[record->event.key.col + offset])+12*(MATRIX_ROWS - record->event.key.row), 127); - play_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF); - } else { - // midi_send_noteoff(&midi_device, record->event.key.row, starting_note + SCALE[record->event.key.col], 127); - midi_send_noteoff(&midi_device, 0, (starting_note + SCALE[record->event.key.col + offset])+12*(MATRIX_ROWS - record->event.key.row), 127); - stop_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); - } -} \ No newline at end of file diff --git a/keyboard/preonic/keymap_midi.h b/keyboard/preonic/keymap_midi.h deleted file mode 100644 index c5917f884e7..00000000000 --- a/keyboard/preonic/keymap_midi.h +++ /dev/null @@ -1,220 +0,0 @@ -/* -Copyright 2015 Jack Humbert - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef KEYMAP_MIDI_H -#define KEYMAP_MIDI_H - -#define MIDI 0x6000 -#define MIDI12 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000 - -#define CHNL(note, channel) (note + (channel << 8)) - -#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), } - -#define N_CN1 (0x600C + (12 * -1) + 0 ) -#define N_CN1S (0x600C + (12 * -1) + 1 ) -#define N_DN1F (0x600C + (12 * -1) + 1 ) -#define N_DN1 (0x600C + (12 * -1) + 2 ) -#define N_DN1S (0x600C + (12 * -1) + 3 ) -#define N_EN1F (0x600C + (12 * -1) + 3 ) -#define N_EN1 (0x600C + (12 * -1) + 4 ) -#define N_FN1 (0x600C + (12 * -1) + 5 ) -#define N_FN1S (0x600C + (12 * -1) + 6 ) -#define N_GN1F (0x600C + (12 * -1) + 6 ) -#define N_GN1 (0x600C + (12 * -1) + 7 ) -#define N_GN1S (0x600C + (12 * -1) + 8 ) -#define N_AN1F (0x600C + (12 * -1) + 8 ) -#define N_AN1 (0x600C + (12 * -1) + 9 ) -#define N_AN1S (0x600C + (12 * -1) + 10) -#define N_BN1F (0x600C + (12 * -1) + 10) -#define N_BN1 (0x600C + (12 * -1) + 11) -#define N_C0 (0x600C + (12 * 0) + 0 ) -#define N_C0S (0x600C + (12 * 0) + 1 ) -#define N_D0F (0x600C + (12 * 0) + 1 ) -#define N_D0 (0x600C + (12 * 0) + 2 ) -#define N_D0S (0x600C + (12 * 0) + 3 ) -#define N_E0F (0x600C + (12 * 0) + 3 ) -#define N_E0 (0x600C + (12 * 0) + 4 ) -#define N_F0 (0x600C + (12 * 0) + 5 ) -#define N_F0S (0x600C + (12 * 0) + 6 ) -#define N_G0F (0x600C + (12 * 0) + 6 ) -#define N_G0 (0x600C + (12 * 0) + 7 ) -#define N_G0S (0x600C + (12 * 0) + 8 ) -#define N_A0F (0x600C + (12 * 0) + 8 ) -#define N_A0 (0x600C + (12 * 0) + 9 ) -#define N_A0S (0x600C + (12 * 0) + 10) -#define N_B0F (0x600C + (12 * 0) + 10) -#define N_B0 (0x600C + (12 * 0) + 11) -#define N_C1 (0x600C + (12 * 1) + 0 ) -#define N_C1S (0x600C + (12 * 1) + 1 ) -#define N_D1F (0x600C + (12 * 1) + 1 ) -#define N_D1 (0x600C + (12 * 1) + 2 ) -#define N_D1S (0x600C + (12 * 1) + 3 ) -#define N_E1F (0x600C + (12 * 1) + 3 ) -#define N_E1 (0x600C + (12 * 1) + 4 ) -#define N_F1 (0x600C + (12 * 1) + 5 ) -#define N_F1S (0x600C + (12 * 1) + 6 ) -#define N_G1F (0x600C + (12 * 1) + 6 ) -#define N_G1 (0x600C + (12 * 1) + 7 ) -#define N_G1S (0x600C + (12 * 1) + 8 ) -#define N_A1F (0x600C + (12 * 1) + 8 ) -#define N_A1 (0x600C + (12 * 1) + 9 ) -#define N_A1S (0x600C + (12 * 1) + 10) -#define N_B1F (0x600C + (12 * 1) + 10) -#define N_B1 (0x600C + (12 * 1) + 11) -#define N_C2 (0x600C + (12 * 2) + 0 ) -#define N_C2S (0x600C + (12 * 2) + 1 ) -#define N_D2F (0x600C + (12 * 2) + 1 ) -#define N_D2 (0x600C + (12 * 2) + 2 ) -#define N_D2S (0x600C + (12 * 2) + 3 ) -#define N_E2F (0x600C + (12 * 2) + 3 ) -#define N_E2 (0x600C + (12 * 2) + 4 ) -#define N_F2 (0x600C + (12 * 2) + 5 ) -#define N_F2S (0x600C + (12 * 2) + 6 ) -#define N_G2F (0x600C + (12 * 2) + 6 ) -#define N_G2 (0x600C + (12 * 2) + 7 ) -#define N_G2S (0x600C + (12 * 2) + 8 ) -#define N_A2F (0x600C + (12 * 2) + 8 ) -#define N_A2 (0x600C + (12 * 2) + 9 ) -#define N_A2S (0x600C + (12 * 2) + 10) -#define N_B2F (0x600C + (12 * 2) + 10) -#define N_B2 (0x600C + (12 * 2) + 11) -#define N_C3 (0x600C + (12 * 3) + 0 ) -#define N_C3S (0x600C + (12 * 3) + 1 ) -#define N_D3F (0x600C + (12 * 3) + 1 ) -#define N_D3 (0x600C + (12 * 3) + 2 ) -#define N_D3S (0x600C + (12 * 3) + 3 ) -#define N_E3F (0x600C + (12 * 3) + 3 ) -#define N_E3 (0x600C + (12 * 3) + 4 ) -#define N_F3 (0x600C + (12 * 3) + 5 ) -#define N_F3S (0x600C + (12 * 3) + 6 ) -#define N_G3F (0x600C + (12 * 3) + 6 ) -#define N_G3 (0x600C + (12 * 3) + 7 ) -#define N_G3S (0x600C + (12 * 3) + 8 ) -#define N_A3F (0x600C + (12 * 3) + 8 ) -#define N_A3 (0x600C + (12 * 3) + 9 ) -#define N_A3S (0x600C + (12 * 3) + 10) -#define N_B3F (0x600C + (12 * 3) + 10) -#define N_B3 (0x600C + (12 * 3) + 11) -#define N_C4 (0x600C + (12 * 4) + 0 ) -#define N_C4S (0x600C + (12 * 4) + 1 ) -#define N_D4F (0x600C + (12 * 4) + 1 ) -#define N_D4 (0x600C + (12 * 4) + 2 ) -#define N_D4S (0x600C + (12 * 4) + 3 ) -#define N_E4F (0x600C + (12 * 4) + 3 ) -#define N_E4 (0x600C + (12 * 4) + 4 ) -#define N_F4 (0x600C + (12 * 4) + 5 ) -#define N_F4S (0x600C + (12 * 4) + 6 ) -#define N_G4F (0x600C + (12 * 4) + 6 ) -#define N_G4 (0x600C + (12 * 4) + 7 ) -#define N_G4S (0x600C + (12 * 4) + 8 ) -#define N_A4F (0x600C + (12 * 4) + 8 ) -#define N_A4 (0x600C + (12 * 4) + 9 ) -#define N_A4S (0x600C + (12 * 4) + 10) -#define N_B4F (0x600C + (12 * 4) + 10) -#define N_B4 (0x600C + (12 * 4) + 11) -#define N_C5 (0x600C + (12 * 5) + 0 ) -#define N_C5S (0x600C + (12 * 5) + 1 ) -#define N_D5F (0x600C + (12 * 5) + 1 ) -#define N_D5 (0x600C + (12 * 5) + 2 ) -#define N_D5S (0x600C + (12 * 5) + 3 ) -#define N_E5F (0x600C + (12 * 5) + 3 ) -#define N_E5 (0x600C + (12 * 5) + 4 ) -#define N_F5 (0x600C + (12 * 5) + 5 ) -#define N_F5S (0x600C + (12 * 5) + 6 ) -#define N_G5F (0x600C + (12 * 5) + 6 ) -#define N_G5 (0x600C + (12 * 5) + 7 ) -#define N_G5S (0x600C + (12 * 5) + 8 ) -#define N_A5F (0x600C + (12 * 5) + 8 ) -#define N_A5 (0x600C + (12 * 5) + 9 ) -#define N_A5S (0x600C + (12 * 5) + 10) -#define N_B5F (0x600C + (12 * 5) + 10) -#define N_B5 (0x600C + (12 * 5) + 11) -#define N_C6 (0x600C + (12 * 6) + 0 ) -#define N_C6S (0x600C + (12 * 6) + 1 ) -#define N_D6F (0x600C + (12 * 6) + 1 ) -#define N_D6 (0x600C + (12 * 6) + 2 ) -#define N_D6S (0x600C + (12 * 6) + 3 ) -#define N_E6F (0x600C + (12 * 6) + 3 ) -#define N_E6 (0x600C + (12 * 6) + 4 ) -#define N_F6 (0x600C + (12 * 6) + 5 ) -#define N_F6S (0x600C + (12 * 6) + 6 ) -#define N_G6F (0x600C + (12 * 6) + 6 ) -#define N_G6 (0x600C + (12 * 6) + 7 ) -#define N_G6S (0x600C + (12 * 6) + 8 ) -#define N_A6F (0x600C + (12 * 6) + 8 ) -#define N_A6 (0x600C + (12 * 6) + 9 ) -#define N_A6S (0x600C + (12 * 6) + 10) -#define N_B6F (0x600C + (12 * 6) + 10) -#define N_B6 (0x600C + (12 * 6) + 11) -#define N_C7 (0x600C + (12 * 7) + 0 ) -#define N_C7S (0x600C + (12 * 7) + 1 ) -#define N_D7F (0x600C + (12 * 7) + 1 ) -#define N_D7 (0x600C + (12 * 7) + 2 ) -#define N_D7S (0x600C + (12 * 7) + 3 ) -#define N_E7F (0x600C + (12 * 7) + 3 ) -#define N_E7 (0x600C + (12 * 7) + 4 ) -#define N_F7 (0x600C + (12 * 7) + 5 ) -#define N_F7S (0x600C + (12 * 7) + 6 ) -#define N_G7F (0x600C + (12 * 7) + 6 ) -#define N_G7 (0x600C + (12 * 7) + 7 ) -#define N_G7S (0x600C + (12 * 7) + 8 ) -#define N_A7F (0x600C + (12 * 7) + 8 ) -#define N_A7 (0x600C + (12 * 7) + 9 ) -#define N_A7S (0x600C + (12 * 7) + 10) -#define N_B7F (0x600C + (12 * 7) + 10) -#define N_B7 (0x600C + (12 * 7) + 11) -#define N_C8 (0x600C + (12 * 8) + 0 ) -#define N_C8S (0x600C + (12 * 8) + 1 ) -#define N_D8F (0x600C + (12 * 8) + 1 ) -#define N_D8 (0x600C + (12 * 8) + 2 ) -#define N_D8S (0x600C + (12 * 8) + 3 ) -#define N_E8F (0x600C + (12 * 8) + 3 ) -#define N_E8 (0x600C + (12 * 8) + 4 ) -#define N_F8 (0x600C + (12 * 8) + 5 ) -#define N_F8S (0x600C + (12 * 8) + 6 ) -#define N_G8F (0x600C + (12 * 8) + 6 ) -#define N_G8 (0x600C + (12 * 8) + 7 ) -#define N_G8S (0x600C + (12 * 8) + 8 ) -#define N_A8F (0x600C + (12 * 8) + 8 ) -#define N_A8 (0x600C + (12 * 8) + 9 ) -#define N_A8S (0x600C + (12 * 8) + 10) -#define N_B8F (0x600C + (12 * 8) + 10) -#define N_B8 (0x600C + (12 * 8) + 11) -#define N_C8 (0x600C + (12 * 8) + 0 ) -#define N_C8S (0x600C + (12 * 8) + 1 ) -#define N_D8F (0x600C + (12 * 8) + 1 ) -#define N_D8 (0x600C + (12 * 8) + 2 ) -#define N_D8S (0x600C + (12 * 8) + 3 ) -#define N_E8F (0x600C + (12 * 8) + 3 ) -#define N_E8 (0x600C + (12 * 8) + 4 ) -#define N_F8 (0x600C + (12 * 8) + 5 ) -#define N_F8S (0x600C + (12 * 8) + 6 ) -#define N_G8F (0x600C + (12 * 8) + 6 ) -#define N_G8 (0x600C + (12 * 8) + 7 ) -#define N_G8S (0x600C + (12 * 8) + 8 ) -#define N_A8F (0x600C + (12 * 8) + 8 ) -#define N_A8 (0x600C + (12 * 8) + 9 ) -#define N_A8S (0x600C + (12 * 8) + 10) -#define N_B8F (0x600C + (12 * 8) + 10) -#define N_B8 (0x600C + (12 * 8) + 11) - -#endif \ No newline at end of file diff --git a/keyboard/preonic/led.c b/keyboard/preonic/led.c deleted file mode 100644 index 2c05746607d..00000000000 --- a/keyboard/preonic/led.c +++ /dev/null @@ -1,38 +0,0 @@ -/* -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 . -*/ - -#include -#include "stdint.h" -#include "led.h" - - -void led_set(uint8_t usb_led) -{ - // // Using PE6 Caps Lock LED - // if (usb_led & (1<. -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 10 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - // To use PORTF disable JTAG with writing JTD bit twice within four cycles. - MCUCR |= (1<. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ + +/* Force NKRO Mode - If forced on, must be disabled via magic key (default = LShift+RShift+N) */ +#define FORCE_NKRO + +/* + * Magic key options + * These options 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 + +/* remap magic keys */ +//#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 BSLS +//#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. @@ -76,4 +119,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif +#endif \ No newline at end of file diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 7068ca4f315..2eef4f15a7c 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -25,6 +25,7 @@ along with this program. If not, see . #include "debug.h" #include "backlight.h" #include "keymap_midi.h" +#include "bootloader.h" #include #include diff --git a/quantum/keymap_midi.c b/quantum/keymap_midi.c index e37ea310398..ac45d25892e 100644 --- a/quantum/keymap_midi.c +++ b/quantum/keymap_midi.c @@ -99,11 +99,11 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { // midi_send_noteon(&midi_device, record->event.key.row, starting_note + SCALE[record->event.key.col], 127); - midi_send_noteon(&midi_device, 0, (starting_note + SCALE[record->event.key.col + offset])+12*(MATRIX_ROWS - record->event.key.row), 127); + // midi_send_noteon(&midi_device, 0, (starting_note + SCALE[record->event.key.col + offset])+12*(MATRIX_ROWS - record->event.key.row), 127); play_note(((double)261.626)*pow(2.0, -1.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF); } else { // midi_send_noteoff(&midi_device, record->event.key.row, starting_note + SCALE[record->event.key.col], 127); - midi_send_noteoff(&midi_device, 0, (starting_note + SCALE[record->event.key.col + offset])+12*(MATRIX_ROWS - record->event.key.row), 127); + // midi_send_noteoff(&midi_device, 0, (starting_note + SCALE[record->event.key.col + offset])+12*(MATRIX_ROWS - record->event.key.row), 127); stop_note(((double)261.626)*pow(2.0, -1.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); } } \ No newline at end of file diff --git a/quantum/template/Makefile b/quantum/template/Makefile index 2efa691380f..4fa195468d1 100644 --- a/quantum/template/Makefile +++ b/quantum/template/Makefile @@ -113,18 +113,19 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512 # 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 +KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key # 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 -# UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +# 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 +# UNICODE_ENABLE = YES # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID # Optimize size but this may cause error "relocation truncated to fit" diff --git a/quantum/template/README.md b/quantum/template/README.md index dc163a2f4b4..39f9f59d10a 100644 --- a/quantum/template/README.md +++ b/quantum/template/README.md @@ -15,7 +15,7 @@ Depending on which keymap you would like to use, you will have to compile slight To build with the default keymap, simply run `make`. ### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top README.md) and existent keymap files. +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document (you can find in top README.md) and existent keymap files. To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: ``` diff --git a/quantum/template/config.h b/quantum/template/config.h index 7d6149f436e..e6fb7866c6c 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -32,34 +32,110 @@ along with this program. If not, see . #define MATRIX_ROWS 2 #define MATRIX_COLS 3 -// 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 } #define ROWS (int []){ D0, D5 } /* 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 */ #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 * These options are also useful to firmware size reduction. diff --git a/quantum/template/template.c b/quantum/template/template.c index 58e73cb09f1..cc52e496ffe 100644 --- a/quantum/template/template.c +++ b/quantum/template/template.c @@ -10,6 +10,11 @@ void matrix_scan_user(void) { // leave this function blank - it can be defined in a keymap file } +__attribute__ ((weak)) +void process_action_user(keyrecord_t *record) { + // leave this function blank - it can be defined in a keymap file +} + __attribute__ ((weak)) void led_set_user(uint8_t usb_led) { // leave this function blank - it can be defined in a keymap file @@ -18,19 +23,26 @@ void led_set_user(uint8_t usb_led) { void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up - + matrix_init_user(); } void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) + // put your looping keyboard code here + // runs every cycle (a lot) matrix_scan_user(); } +void process_action_kb(keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + process_action_user(record); +} + void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here led_set_user(usb_led); -} \ No newline at end of file +} diff --git a/quantum/template/template.h b/quantum/template/template.h index ba91abac3e6..b1c34d3cbee 100644 --- a/quantum/template/template.h +++ b/quantum/template/template.h @@ -17,10 +17,11 @@ { \ { k00, k01, k02 }, \ { k10, KC_NO, k11 }, \ -} +} 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); -#endif \ No newline at end of file +#endif diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 4197c53ed21..2ccc0e0b947 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -53,6 +53,9 @@ void action_exec(keyevent_t event) #endif } +__attribute__ ((weak)) +void process_action_kb(keyrecord_t *record) {} + void process_action(keyrecord_t *record) { keyevent_t event = record->event; @@ -62,6 +65,8 @@ void process_action(keyrecord_t *record) if (IS_NOEVENT(event)) { return; } + process_action_kb(record); + action_t action = layer_switch_get_action(event.key); dprint("ACTION: "); debug_action(action); #ifndef NO_ACTION_LAYER diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 8a4736d7bc1..9f528af4b98 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -58,6 +58,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); /* user defined special function */ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt); +/* keyboard-specific key event (pre)processing */ +void process_action_kb(keyrecord_t *record); + /* Utilities for actions. */ void process_action(keyrecord_t *record); void register_code(uint8_t code); diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index caf0b062546..c07c2801d5e 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -66,9 +66,12 @@ static void power_down(uint8_t wdto) wdt_intr_enable(wdto); #ifdef BACKLIGHT_ENABLE -backlight_set(0); + backlight_set(0); #endif + // Turn off LED indicators + led_set(0); + // TODO: more power saving // See PicoPower application note // - I/O port input with pullup diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index d59bb01bbcb..b4cd3ca56b9 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -52,6 +52,8 @@ along with this program. If not, see . static bool command_common(uint8_t code); static void command_common_help(void); +static void print_version(void); +static void print_status(void); static bool command_console(uint8_t code); static void command_console_help(void); #ifdef MOUSEKEY_ENABLE @@ -112,35 +114,140 @@ bool command_console_extra(uint8_t code) ***********************************************************/ static void command_common_help(void) { - print("\n\t- Magic -\n" - "d: debug\n" - "x: debug matrix\n" - "k: debug keyboard\n" - "m: debug mouse\n" - "v: version\n" - "s: status\n" - "c: console mode\n" - "0-4: layer0-4(F10-F4)\n" - "Paus: bootloader\n" + print( "\n\t- Magic -\n" + STR(MAGIC_KEY_DEBUG ) ": Debug Message Toggle\n" + STR(MAGIC_KEY_DEBUG_MATRIX) ": Matrix Debug Mode Toggle - Show keypresses in matrix grid\n" + STR(MAGIC_KEY_DEBUG_KBD ) ": Keyboard Debug Toggle - Show keypress report\n" + STR(MAGIC_KEY_DEBUG_MOUSE ) ": Debug Mouse Toggle\n" + STR(MAGIC_KEY_VERSION ) ": Version\n" + STR(MAGIC_KEY_STATUS ) ": Status\n" + STR(MAGIC_KEY_CONSOLE ) ": Activate Console Mode\n" + +#if MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM + STR(MAGIC_KEY_LAYER0 ) ": Switch to Layer 0\n" + STR(MAGIC_KEY_LAYER1 ) ": Switch to Layer 1\n" + STR(MAGIC_KEY_LAYER2 ) ": Switch to Layer 2\n" + STR(MAGIC_KEY_LAYER3 ) ": Switch to Layer 3\n" + STR(MAGIC_KEY_LAYER4 ) ": Switch to Layer 4\n" + STR(MAGIC_KEY_LAYER5 ) ": Switch to Layer 5\n" + STR(MAGIC_KEY_LAYER6 ) ": Switch to Layer 6\n" + STR(MAGIC_KEY_LAYER7 ) ": Switch to Layer 7\n" + STR(MAGIC_KEY_LAYER8 ) ": Switch to Layer 8\n" + STR(MAGIC_KEY_LAYER9 ) ": Switch to Layer 9\n" +#endif + +#if MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS + "F1-F10: Switch to Layer 0-9 (F10 = L0)\n" +#endif + +#if MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS + "0-9: Switch to Layer 0-9\n" +#endif + + STR(MAGIC_KEY_LAYER0_ALT1 ) ": Switch to Layer 0 (alternate key 1)\n" + STR(MAGIC_KEY_LAYER0_ALT2 ) ": Switch to Layer 0 (alternate key 2)\n" + STR(MAGIC_KEY_BOOTLOADER ) ": Jump to Bootloader (Reset)\n" #ifdef KEYBOARD_LOCK_ENABLE - "Caps: Lock\n" + STR(MAGIC_KEY_LOCK ) ": Lock\n" #endif #ifdef BOOTMAGIC_ENABLE - "e: eeprom\n" + STR(MAGIC_KEY_EEPROM ) ": Print EEPROM Settings\n" #endif #ifdef NKRO_ENABLE - "n: NKRO\n" + STR(MAGIC_KEY_NKRO ) ": NKRO Toggle\n" #endif #ifdef SLEEP_LED_ENABLE - "z: sleep LED test\n" + STR(MAGIC_KEY_SLEEP_LED ) ": Sleep LED Test\n" #endif ); } +static void print_version(void) +{ + // print version & information + print("\n\t- Version -\n"); + print("DESC: " STR(DESCRIPTION) "\n"); + print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") " + "PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") " + "VER: " STR(DEVICE_VER) "\n"); + print("BUILD: " STR(VERSION) " (" __TIME__ " " __DATE__ ")\n"); + + /* build options */ + print("OPTIONS:" + +#ifdef PROTOCOL_PJRC + " PJRC" +#endif +#ifdef PROTOCOL_LUFA + " LUFA" +#endif +#ifdef PROTOCOL_VUSB + " VUSB" +#endif +#ifdef BOOTMAGIC_ENABLE + " BOOTMAGIC" +#endif +#ifdef MOUSEKEY_ENABLE + " MOUSEKEY" +#endif +#ifdef EXTRAKEY_ENABLE + " EXTRAKEY" +#endif +#ifdef CONSOLE_ENABLE + " CONSOLE" +#endif +#ifdef COMMAND_ENABLE + " COMMAND" +#endif +#ifdef NKRO_ENABLE + " NKRO" +#endif +#ifdef KEYMAP_SECTION_ENABLE + " KEYMAP_SECTION" +#endif + + " " STR(BOOTLOADER_SIZE) "\n"); + + print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__) + " AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ + " AVR_ARCH: avr" STR(__AVR_ARCH__) "\n"); + + return; +} + +static void print_status(void) +{ + + print("\n\t- Status -\n"); + + print_val_hex8(host_keyboard_leds()); + print_val_hex8(keyboard_protocol); + print_val_hex8(keyboard_idle); +#ifdef NKRO_ENABLE + print_val_hex8(keyboard_nkro); +#endif + print_val_hex32(timer_count); + +#ifdef PROTOCOL_PJRC + print_val_hex8(UDCON); + print_val_hex8(UDIEN); + print_val_hex8(UDINT); + print_val_hex8(usb_keyboard_leds); + print_val_hex8(usb_keyboard_idle_count); +#endif + +#ifdef PROTOCOL_PJRC +# if USB_COUNT_SOF + print_val_hex8(usbSofCount); +# endif +#endif + return; +} + #ifdef BOOTMAGIC_ENABLE static void print_eeconfig(void) { @@ -178,24 +285,36 @@ static void print_eeconfig(void) static bool command_common(uint8_t code) { + +#ifdef KEYBOARD_LOCK_ENABLE static host_driver_t *host_driver = 0; +#endif + switch (code) { + #ifdef SLEEP_LED_ENABLE - case KC_Z: - // test breathing sleep LED - print("Sleep LED test\n"); + + // test breathing sleep LED + case MAGIC_KC(MAGIC_KEY_SLEEP_LED): + print("Sleep LED Test\n"); sleep_led_toggle(); led_set(host_keyboard_leds()); break; #endif + #ifdef BOOTMAGIC_ENABLE - case KC_E: + + // print stored eeprom config + case MAGIC_KC(MAGIC_KEY_EEPROM): print("eeconfig:\n"); print_eeconfig(); break; #endif + #ifdef KEYBOARD_LOCK_ENABLE - case KC_CAPSLOCK: + + // lock/unlock keyboard + case MAGIC_KC(MAGIC_KEY_LOCK): if (host_get_driver()) { host_driver = host_get_driver(); clear_keyboard(); @@ -207,11 +326,15 @@ static bool command_common(uint8_t code) } break; #endif - case KC_H: - case KC_SLASH: /* ? */ + + // print help + case MAGIC_KC(MAGIC_KEY_HELP1): + case MAGIC_KC(MAGIC_KEY_HELP2): command_common_help(); break; - case KC_C: + + // activate console + case MAGIC_KC(MAGIC_KEY_CONSOLE): debug_matrix = false; debug_keyboard = false; debug_mouse = false; @@ -220,25 +343,33 @@ static bool command_common(uint8_t code) print("C> "); command_state = CONSOLE; break; - case KC_PAUSE: - clear_keyboard(); - print("\n\nbootloader... "); + + // jump to bootloader + case MAGIC_KC(MAGIC_KEY_BOOTLOADER): + clear_keyboard(); // clear to prevent stuck keys + print("\n\nJumping to bootloader... "); _delay_ms(1000); bootloader_jump(); // not return break; - case KC_D: + + // debug toggle + case MAGIC_KC(MAGIC_KEY_DEBUG): + debug_enable = !debug_enable; if (debug_enable) { + print("\ndebug: on\n"); + debug_matrix = true; + debug_keyboard = true; + debug_mouse = true; + } else { print("\ndebug: off\n"); debug_matrix = false; debug_keyboard = false; debug_mouse = false; - debug_enable = false; - } else { - print("\ndebug: on\n"); - debug_enable = true; } break; - case KC_X: // debug matrix toggle + + // debug matrix toggle + case MAGIC_KC(MAGIC_KEY_DEBUG_MATRIX): debug_matrix = !debug_matrix; if (debug_matrix) { print("\nmatrix: on\n"); @@ -247,7 +378,9 @@ static bool command_common(uint8_t code) print("\nmatrix: off\n"); } break; - case KC_K: // debug keyboard toggle + + // debug keyboard toggle + case MAGIC_KC(MAGIC_KEY_DEBUG_KBD): debug_keyboard = !debug_keyboard; if (debug_keyboard) { print("\nkeyboard: on\n"); @@ -256,87 +389,33 @@ static bool command_common(uint8_t code) print("\nkeyboard: off\n"); } break; - case KC_M: // debug mouse toggle + + // debug mouse toggle + case MAGIC_KC(MAGIC_KEY_DEBUG_MOUSE): debug_mouse = !debug_mouse; if (debug_mouse) { print("\nmouse: on\n"); debug_enable = true; } else { - print("\nmouse: off\n"); + print("\nmouse: off\n"); } break; - case KC_V: // print version & information - print("\n\t- Version -\n"); - print("DESC: " STR(DESCRIPTION) "\n"); - print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") " - "PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") " - "VER: " STR(DEVICE_VER) "\n"); - print("BUILD: " STR(VERSION) " (" __TIME__ " " __DATE__ ")\n"); - /* build options */ - print("OPTIONS:" -#ifdef PROTOCOL_PJRC - " PJRC" -#endif -#ifdef PROTOCOL_LUFA - " LUFA" -#endif -#ifdef PROTOCOL_VUSB - " VUSB" -#endif -#ifdef BOOTMAGIC_ENABLE - " BOOTMAGIC" -#endif -#ifdef MOUSEKEY_ENABLE - " MOUSEKEY" -#endif -#ifdef EXTRAKEY_ENABLE - " EXTRAKEY" -#endif -#ifdef CONSOLE_ENABLE - " CONSOLE" -#endif -#ifdef COMMAND_ENABLE - " COMMAND" -#endif -#ifdef NKRO_ENABLE - " NKRO" -#endif -#ifdef KEYMAP_SECTION_ENABLE - " KEYMAP_SECTION" -#endif - " " STR(BOOTLOADER_SIZE) "\n"); - print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__) - " AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ - " AVR_ARCH: avr" STR(__AVR_ARCH__) "\n"); + // print version + case MAGIC_KC(MAGIC_KEY_VERSION): + print_version(); + break; + + // print status + case MAGIC_KC(MAGIC_KEY_STATUS): + print_status(); break; - case KC_S: - print("\n\t- Status -\n"); - print_val_hex8(host_keyboard_leds()); - print_val_hex8(keyboard_protocol); - print_val_hex8(keyboard_idle); -#ifdef NKRO_ENABLE - print_val_hex8(keyboard_nkro); -#endif - print_val_hex32(timer_count); -#ifdef PROTOCOL_PJRC - print_val_hex8(UDCON); - print_val_hex8(UDIEN); - print_val_hex8(UDINT); - print_val_hex8(usb_keyboard_leds); - print_val_hex8(usb_keyboard_idle_count); -#endif - -#ifdef PROTOCOL_PJRC -# if USB_COUNT_SOF - print_val_hex8(usbSofCount); -# endif -#endif - break; #ifdef NKRO_ENABLE - case KC_N: - clear_keyboard(); //Prevents stuck keys. + + // NKRO toggle + case MAGIC_KC(MAGIC_KEY_NKRO): + clear_keyboard(); // clear to prevent stuck keys keyboard_nkro = !keyboard_nkro; if (keyboard_nkro) print("NKRO: on\n"); @@ -344,18 +423,78 @@ static bool command_common(uint8_t code) print("NKRO: off\n"); break; #endif - case KC_ESC: - case KC_GRV: - case KC_0: - case KC_F10: + + // switch layers + + case MAGIC_KC(MAGIC_KEY_LAYER0_ALT1): + case MAGIC_KC(MAGIC_KEY_LAYER0_ALT2): switch_default_layer(0); break; - case KC_1 ... KC_9: - switch_default_layer((code - KC_1) + 1); + +#if MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM + + case MAGIC_KC(MAGIC_KEY_LAYER0): + switch_default_layer(0); break; + + case MAGIC_KC(MAGIC_KEY_LAYER1): + switch_default_layer(1); + break; + + case MAGIC_KC(MAGIC_KEY_LAYER2): + switch_default_layer(2); + break; + + case MAGIC_KC(MAGIC_KEY_LAYER3): + switch_default_layer(3); + break; + + case MAGIC_KC(MAGIC_KEY_LAYER4): + switch_default_layer(4); + break; + + case MAGIC_KC(MAGIC_KEY_LAYER5): + switch_default_layer(5); + break; + + case MAGIC_KC(MAGIC_KEY_LAYER6): + switch_default_layer(6); + break; + + case MAGIC_KC(MAGIC_KEY_LAYER7): + switch_default_layer(7); + break; + + case MAGIC_KC(MAGIC_KEY_LAYER8): + switch_default_layer(8); + break; + + case MAGIC_KC(MAGIC_KEY_LAYER9): + switch_default_layer(9); + break; +#endif + + +#if MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS + case KC_F1 ... KC_F9: switch_default_layer((code - KC_F1) + 1); break; + case KC_F10: + switch_default_layer(0); + break; +#endif + +#if MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS + + case KC_1 ... KC_9: + switch_default_layer((code - KC_1) + 1); + break; + case KC_0: + switch_default_layer(0); + break; +#endif + default: print("?"); return false; diff --git a/tmk_core/common/command.h b/tmk_core/common/command.h index b57a6c1cedc..92b18849bf3 100644 --- a/tmk_core/common/command.h +++ b/tmk_core/common/command.h @@ -32,4 +32,125 @@ bool command_proc(uint8_t code); #define command_proc(code) false #endif + +#ifndef MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true #endif + +#ifndef MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +#endif + +#ifndef MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false +#endif + +#ifndef MAGIC_KEY_HELP1 +#define MAGIC_KEY_HELP1 H +#endif + +#ifndef MAGIC_KEY_HELP2 +#define MAGIC_KEY_HELP2 SLASH +#endif + +#ifndef MAGIC_KEY_DEBUG +#define MAGIC_KEY_DEBUG D +#endif + +#ifndef MAGIC_KEY_DEBUG_MATRIX +#define MAGIC_KEY_DEBUG_MATRIX X +#endif + +#ifndef MAGIC_KEY_DEBUG_KBD +#define MAGIC_KEY_DEBUG_KBD K +#endif + +#ifndef MAGIC_KEY_DEBUG_MOUSE +#define MAGIC_KEY_DEBUG_MOUSE M +#endif + +#ifndef MAGIC_KEY_VERSION +#define MAGIC_KEY_VERSION V +#endif + +#ifndef MAGIC_KEY_STATUS +#define MAGIC_KEY_STATUS S +#endif + +#ifndef MAGIC_KEY_CONSOLE +#define MAGIC_KEY_CONSOLE C +#endif + +#ifndef MAGIC_KEY_LAYER0_ALT1 +#define MAGIC_KEY_LAYER0_ALT1 ESC +#endif + +#ifndef MAGIC_KEY_LAYER0_ALT2 +#define MAGIC_KEY_LAYER0_ALT2 GRAVE +#endif + +#ifndef MAGIC_KEY_LAYER0 +#define MAGIC_KEY_LAYER0 0 +#endif + +#ifndef MAGIC_KEY_LAYER1 +#define MAGIC_KEY_LAYER1 1 +#endif + +#ifndef MAGIC_KEY_LAYER2 +#define MAGIC_KEY_LAYER2 2 +#endif + +#ifndef MAGIC_KEY_LAYER3 +#define MAGIC_KEY_LAYER3 3 +#endif + +#ifndef MAGIC_KEY_LAYER4 +#define MAGIC_KEY_LAYER4 4 +#endif + +#ifndef MAGIC_KEY_LAYER5 +#define MAGIC_KEY_LAYER5 5 +#endif + +#ifndef MAGIC_KEY_LAYER6 +#define MAGIC_KEY_LAYER6 6 +#endif + +#ifndef MAGIC_KEY_LAYER7 +#define MAGIC_KEY_LAYER7 7 +#endif + +#ifndef MAGIC_KEY_LAYER8 +#define MAGIC_KEY_LAYER8 8 +#endif + +#ifndef MAGIC_KEY_LAYER9 +#define MAGIC_KEY_LAYER9 9 +#endif + +#ifndef MAGIC_KEY_BOOTLOADER +#define MAGIC_KEY_BOOTLOADER PAUSE +#endif + +#ifndef MAGIC_KEY_LOCK +#define MAGIC_KEY_LOCK CAPS +#endif + +#ifndef MAGIC_KEY_EEPROM +#define MAGIC_KEY_EEPROM E +#endif + +#ifndef MAGIC_KEY_NKRO +#define MAGIC_KEY_NKRO N +#endif + +#ifndef MAGIC_KEY_SLEEP_LED +#define MAGIC_KEY_SLEEP_LED Z + +#endif + +#define XMAGIC_KC(key) KC_##key +#define MAGIC_KC(key) XMAGIC_KC(key) + +#endif \ No newline at end of file diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index eb7b096bed5..302b3ec87c9 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -70,6 +70,7 @@ void keyboard_setup(void) void keyboard_init(void) { + timer_init(); matrix_init(); #ifdef PS2_MOUSE_ENABLE @@ -90,6 +91,11 @@ void keyboard_init(void) #ifdef BACKLIGHT_ENABLE backlight_init(); #endif + +#if defined(NKRO_ENABLE) && defined(FORCE_NKRO) + keyboard_nkro = true; +#endif + } /*