Merge remote-tracking branch 'remotes/jackhumbert/master'

pull/372/head
IBNobody 9 years ago
commit 76e36a787a

@ -47,8 +47,8 @@ If you have any problems building the firmware, you can try using a tool called
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. 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. 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, duplicate the folder `keymaps/default`, and rename it with your name, for example `jack`. 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=<name>` after `make`. So if I've named my keymap jack.c, the full command would be `make KEYMAP=jack`. 2. To build a keymap other than the default, type `KEYMAP=<name>` after `make`. So if I've named my keymap `jack`, 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=<name> dfu` to both build and deploy the firmware. If you're using a Teensy, you'll probably need to take the <keyboardname>.hex file that make produces in the keyboard's folder, and deploy it using the [Teensy Loader.](https://www.pjrc.com/teensy/loader.html) 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=<name> dfu` to both build and deploy the firmware. If you're using a Teensy, you'll probably need to take the <keyboardname>.hex file that make produces in the keyboard's folder, and deploy it using the [Teensy Loader.](https://www.pjrc.com/teensy/loader.html)
## Helpful Tips ## Helpful Tips

@ -2,7 +2,7 @@
This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.co), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.co), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/).
QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, TMK. QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, TMK. In fact, this repo used to be a fork of TMK, and we are incredibly grateful for his founding contributions to the firmware. We've had to break the fork due to purely technical reasons -- it simply became too different over time, and we've had to start refactoring some of the basic bits and pieces. We are huge fans of TMK, both the firmware and the person. :)
This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/jackhumbert/qmk_firmware/issues/new). This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/jackhumbert/qmk_firmware/issues/new).
@ -33,6 +33,10 @@ If your keymap directory has a file called `makefile.mk` (note the lowercase fil
So let's say your keyboard's makefile has `CONSOLE_ENABLE = yes` (or maybe doesn't even list the `CONSOLE_ENABLE` option, which would cause it to revert to the global Quantum default). You want your particular keymap to not have the debug console, so you make a file called `makefile.mk` and specify `CONSOLE_ENABLE = no`. So let's say your keyboard's makefile has `CONSOLE_ENABLE = yes` (or maybe doesn't even list the `CONSOLE_ENABLE` option, which would cause it to revert to the global Quantum default). You want your particular keymap to not have the debug console, so you make a file called `makefile.mk` and specify `CONSOLE_ENABLE = no`.
### Customizing config.h on a per-keymap basis
If you use the ErgoDox EZ, you can make a `config_user.h` file in your keymap directory and use it to override any `config.h` settings you don't like. Anything you set there will take precedence over the global `config.h` for the ErgoDox EZ. To see an example of this, check out `keymaps/erez_experimental`.
## Quick aliases to common actions ## Quick aliases to common actions
Your keymap can include shortcuts to common operations (called "function actions" in tmk). Your keymap can include shortcuts to common operations (called "function actions" in tmk).
@ -41,10 +45,13 @@ Your keymap can include shortcuts to common operations (called "function actions
`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack. `MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack.
`OSL(layer)` - momentary switch to *layer*, as a one-shot operation. So if you have a key that's defined as `OSL(1)`, and you tap that key, then only the very next keystroke would come from layer 1. You would drop back to layer zero immediately after that one keystroke. That's handy if you have a layer full of custom shortcuts -- for example, a dedicated key for closing a window. So you tap your one-shot layer mod, then tap that magic 'close window' key, and keep typing like a boss. Layer 1 would remain active as long as you hold that key down, too (so you can use it like a momentary toggle-layer key with extra powers).
`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer). `LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer).
`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack. `TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack.
### Fun with modifier keys ### Fun with modifier keys
* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias * `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias
@ -80,17 +87,24 @@ The following shortcuts automatically add `LSFT()` to keycodes to get commonly u
KC_PLUS + KC_PLUS +
KC_LCBR { KC_LCBR {
KC_RCBR } KC_RCBR }
KC_LABK <
KC_RABK >
KC_PIPE | KC_PIPE |
KC_COLN : KC_COLN :
`OSM(mod)` - this is a "one shot" modifier. So let's say you have your left Shift key defined as `OSM(MOD_LSFT)`. Tap it, let go, and Shift is "on" -- but only for the next character you'll type. So to write "The", you don't need to hold down Shift -- you tap it, tap t, and move on with life. And if you hold down the left Shift key, it just works as a left Shift key, as you would expect (so you could type THE). There's also a magical, secret way to "lock" a modifier by tapping it multiple times. If you want to learn more about that, open an issue. :)
`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down. `MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down.
These are the values you can use for the `mod` in `MT()` (right-hand modifiers are not available): These are the values you can use for the `mod` in `MT()` and `OSM()` (right-hand modifiers are not available for `MT()`):
* MOD_LCTL * MOD_LCTL
* MOD_LSFT * MOD_LSFT
* MOD_LALT * MOD_LALT
* MOD_LGUI * MOD_LGUI
* MOD_HYPR
* MOD_MEH
These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped.
@ -363,6 +377,55 @@ You can currently send 4 hex digits with your OS-specific modifier key (RALT for
Enable the backlight from the Makefile. Enable the backlight from the Makefile.
## Driving a speaker - audio support
Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any keyboard that allows access to the C6 port, you can hook up a simple speaker and have it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
The audio code lives in [quantum/audio/audio.h](/quantum/audio/audio.h) and in the other files in the audio directory. It's enabled by default on the Planck [stock keymap](/keyboard/planck/keymaps/default/keymap.c). Here are the important bits:
```
#include "audio.h"
```
Then, lower down the file:
```
float tone_startup[][2] = {
ED_NOTE(_E7 ),
E__NOTE(_CS7),
E__NOTE(_E6 ),
E__NOTE(_A6 ),
M__NOTE(_CS7, 20)
};
```
This is how you write a song. Each of these lines is a note, so we have a little ditty composed of five notes here.
Then, we have this chunk:
```
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_plover[][2] = SONG(PLOVER_SOUND);
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND);
```
Wherein we bind predefined songs (from [audio/song_list.h](/audio/song_list.h)) into named variables. This is one optimization that helps save on memory: These songs only take up memory when you reference them in your keymap, because they're essentially all preprocessor directives.
So now you have something called `tone_plover` for example. How do you make it play the Plover tune, then? If you look further down the keymap, you'll see this:
```
PLAY_NOTE_ARRAY(tone_plover, false, 0); // Signature is: Song name, repeat, rest style
```
This is inside one of the macros. So when that macro executes, your keyboard plays that particular chime.
"Rest style" in the method signature above (the last parameter) specifies if there's a rest (a moment of silence) between the notes.
## MIDI functionalty ## MIDI functionalty
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.

@ -11,8 +11,9 @@ void matrix_scan_user(void) {
} }
__attribute__ ((weak)) __attribute__ ((weak))
void process_action_user(keyrecord_t *record) { bool process_action_user(keyrecord_t *record) {
// leave this function blank - it can be defined in a keymap file // leave this function blank - it can be defined in a keymap file
return true;
} }
__attribute__ ((weak)) __attribute__ ((weak))
@ -45,11 +46,11 @@ void matrix_scan_kb(void) {
matrix_scan_user(); matrix_scan_user();
} }
void process_action_kb(keyrecord_t *record) { bool process_action_kb(keyrecord_t *record) {
// put your per-action keyboard code here // put your per-action keyboard code here
// runs for every action, just before processing by the firmware // runs for every action, just before processing by the firmware
process_action_user(record); return process_action_user(record);
} }
void led_set_kb(uint8_t usb_led) { void led_set_kb(uint8_t usb_led) {
@ -60,6 +61,14 @@ void led_set_kb(uint8_t usb_led) {
#ifdef BACKLIGHT_ENABLE #ifdef BACKLIGHT_ENABLE
#define CHANNEL OCR1C #define CHANNEL OCR1C
#define BREATHING_NO_HALT 0
#define BREATHING_HALT_OFF 1
#define BREATHING_HALT_ON 2
static uint8_t breath_intensity;
static uint8_t breath_speed;
static uint16_t breathing_index;
static uint8_t breathing_halt;
void backlight_init_ports() void backlight_init_ports()
{ {
@ -85,36 +94,232 @@ void backlight_init_ports()
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
backlight_init(); backlight_init();
breathing_defaults();
} }
void backlight_set(uint8_t level) void backlight_set(uint8_t level)
{ {
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
if ( level == 0 ) if ( level == 0 )
{ {
// Turn off PWM control on PB7, revert to output low. // Turn off PWM control on PB7, revert to output low.
TCCR1A &= ~(_BV(COM1C1)); TCCR1A &= ~(_BV(COM1C1));
// Set the brightness to 0
CHANNEL = 0x0; CHANNEL = 0x0;
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
} }
else if ( level == BACKLIGHT_LEVELS ) else if ( level >= BACKLIGHT_LEVELS )
{ {
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
// Turn on PWM control of PB7 // Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1); TCCR1A |= _BV(COM1C1);
// Set the brightness
// Set the brightness to max
CHANNEL = 0xFFFF; CHANNEL = 0xFFFF;
} }
else else
{ {
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
// Turn on PWM control of PB7 // Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1); TCCR1A |= _BV(COM1C1);
// Set the brightness // Set the brightness
CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2)); CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
} }
breathing_intensity_default();
}
void breathing_enable(void)
{
if (get_backlight_level() == 0)
{
breathing_index = 0;
}
else
{
// Set breathing_index to be at the midpoint (brightest point)
breathing_index = 0x20 << breath_speed;
}
breathing_halt = BREATHING_NO_HALT;
// Enable breathing interrupt
TIMSK1 |= _BV(OCIE1A);
}
void breathing_pulse(void)
{
if (get_backlight_level() == 0)
{
breathing_index = 0;
}
else
{
// Set breathing_index to be at the midpoint + 1 (brightest point)
breathing_index = 0x21 << breath_speed;
}
breathing_halt = BREATHING_HALT_ON;
// Enable breathing interrupt
TIMSK1 |= _BV(OCIE1A);
}
void breathing_disable(void)
{
// Disable breathing interrupt
TIMSK1 &= ~_BV(OCIE1A);
backlight_set(get_backlight_level());
}
void breathing_self_disable(void)
{
if (get_backlight_level() == 0)
{
breathing_halt = BREATHING_HALT_OFF;
}
else
{
breathing_halt = BREATHING_HALT_ON;
}
//backlight_set(get_backlight_level());
} }
void breathing_toggle(void)
{
if (!is_breathing())
{
if (get_backlight_level() == 0)
{
breathing_index = 0;
}
else
{
// Set breathing_index to be at the midpoint + 1 (brightest point)
breathing_index = 0x21 << breath_speed;
}
breathing_halt = BREATHING_NO_HALT;
}
// Toggle breathing interrupt
TIMSK1 ^= _BV(OCIE1A);
// Restore backlight level
if (!is_breathing())
{
backlight_set(get_backlight_level());
}
}
bool is_breathing(void)
{
return (TIMSK1 && _BV(OCIE1A));
}
void breathing_intensity_default(void)
{
//breath_intensity = (uint8_t)((uint16_t)100 * (uint16_t)get_backlight_level() / (uint16_t)BACKLIGHT_LEVELS);
breath_intensity = ((BACKLIGHT_LEVELS - get_backlight_level()) * ((BACKLIGHT_LEVELS + 1) / 2));
}
void breathing_intensity_set(uint8_t value)
{
breath_intensity = value;
}
void breathing_speed_default(void)
{
breath_speed = 4;
}
void breathing_speed_set(uint8_t value)
{
bool is_breathing_now = is_breathing();
uint8_t old_breath_speed = breath_speed;
if (is_breathing_now)
{
// Disable breathing interrupt
TIMSK1 &= ~_BV(OCIE1A);
}
breath_speed = value;
if (is_breathing_now)
{
// Adjust index to account for new speed
breathing_index = (( (uint8_t)( (breathing_index) >> old_breath_speed ) ) & 0x3F) << breath_speed;
// Enable breathing interrupt
TIMSK1 |= _BV(OCIE1A);
}
}
void breathing_speed_inc(uint8_t value)
{
if ((uint16_t)(breath_speed - value) > 10 )
{
breathing_speed_set(0);
}
else
{
breathing_speed_set(breath_speed - value);
}
}
void breathing_speed_dec(uint8_t value)
{
if ((uint16_t)(breath_speed + value) > 10 )
{
breathing_speed_set(10);
}
else
{
breathing_speed_set(breath_speed + value);
}
}
void breathing_defaults(void)
{
breathing_intensity_default();
breathing_speed_default();
breathing_halt = BREATHING_NO_HALT;
}
/* Breathing Sleep LED brighness(PWM On period) table
* (64[steps] * 4[duration]) / 64[PWM periods/s] = 4 second breath cycle
*
* http://www.wolframalpha.com/input/?i=%28sin%28+x%2F64*pi%29**8+*+255%2C+x%3D0+to+63
* (0..63).each {|x| p ((sin(x/64.0*PI)**8)*255).to_i }
*/
static const uint8_t breathing_table[64] PROGMEM = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 6, 10,
15, 23, 32, 44, 58, 74, 93, 113, 135, 157, 179, 199, 218, 233, 245, 252,
255, 252, 245, 233, 218, 199, 179, 157, 135, 113, 93, 74, 58, 44, 32, 23,
15, 10, 6, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
ISR(TIMER1_COMPA_vect)
{
// CHANNEL = (pgm_read_byte(&breathing_table[ ( (uint8_t)( (breathing_index++) >> breath_speed ) ) & 0x3F ] )) * breath_intensity;
uint8_t local_index = ( (uint8_t)( (breathing_index++) >> breath_speed ) ) & 0x3F;
if (((breathing_halt == BREATHING_HALT_ON) && (local_index == 0x20)) || ((breathing_halt == BREATHING_HALT_OFF) && (local_index == 0x3F)))
{
// Disable breathing interrupt
TIMSK1 &= ~_BV(OCIE1A);
}
CHANNEL = (uint16_t)(((uint16_t)pgm_read_byte(&breathing_table[local_index]) * 257)) >> breath_intensity;
}
#endif #endif

@ -1,11 +1,7 @@
#ifndef ATOMIC_H #ifndef ATOMIC_H
#define ATOMIC_H #define ATOMIC_H
#include "matrix.h" #include "quantum.h"
#include "keymap_common.h"
#ifdef BACKLIGHT_ENABLE
#include "backlight.h"
#endif
#include <stddef.h> #include <stddef.h>
#include <avr/io.h> #include <avr/io.h>
@ -29,8 +25,24 @@
void matrix_init_user(void); void matrix_init_user(void);
void matrix_scan_user(void); void matrix_scan_user(void);
void process_action_user(keyrecord_t *record); bool process_action_user(keyrecord_t *record);
void led_set_user(uint8_t usb_led); void led_set_user(uint8_t usb_led);
void backlight_init_ports(void); void backlight_init_ports(void);
void breathing_enable(void);
void breathing_pulse(void);
void breathing_disable(void);
void breathing_self_disable(void);
void breathing_toggle(void);
bool is_breathing(void);
void breathing_defaults(void);
void breathing_intensity_default(void);
void breathing_speed_default(void);
void breathing_speed_set(uint8_t value);
void breathing_speed_inc(uint8_t value);
void breathing_speed_dec(uint8_t value);
#endif #endif

@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060 #define PRODUCT_ID 0x0419
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER Ortholinear Keyboards #define MANUFACTURER Ortholinear Keyboards
#define PRODUCT The Atomic Keyboard #define PRODUCT The Atomic Keyboard
@ -158,4 +158,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_MACRO //#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION //#define NO_ACTION_FUNCTION
//#define VIBRATO_ENABLE
//#define VIBRATO_STRENGTH_ENABLE
#endif #endif

@ -11,18 +11,17 @@
#define LAYER_QWERTY 0 #define LAYER_QWERTY 0
#define LAYER_COLEMAK 1 #define LAYER_COLEMAK 1
#define LAYER_DVORAK 2 #define LAYER_DVORAK 2
#define LAYER_LOWER 3 #define LAYER_UPPER 3
#define LAYER_RAISE 4 #define LAYER_LOWER 4
#define LAYER_FUNCTION 5 #define LAYER_FUNCTION 5
#define LAYER_MOUSE 6 #define LAYER_MOUSE 6
#define LAYER_MUSIC 7 #define LAYER_ADJUST 7
#define LAYER_ADJUST 8
#define MACRO_QWERTY 0 #define MACRO_QWERTY 0
#define MACRO_COLEMAK 1 #define MACRO_COLEMAK 1
#define MACRO_DVORAK 2 #define MACRO_DVORAK 2
#define MACRO_LOWER 3 #define MACRO_UPPER 3
#define MACRO_RAISE 4 #define MACRO_LOWER 4
#define MACRO_FUNCTION 5 #define MACRO_FUNCTION 5
#define MACRO_MOUSE 6 #define MACRO_MOUSE 6
#define MACRO_TIMBRE_1 7 #define MACRO_TIMBRE_1 7
@ -32,18 +31,21 @@
#define MACRO_TEMPO_U 11 #define MACRO_TEMPO_U 11
#define MACRO_TEMPO_D 12 #define MACRO_TEMPO_D 12
#define MACRO_TONE_DEFAULT 13 #define MACRO_TONE_DEFAULT 13
#define MACRO_MUSIC_ON 14 #define MACRO_MUSIC_TOGGLE 14
#define MACRO_MUSIC_OFF 15 #define MACRO_AUDIO_TOGGLE 16
#define MACRO_AUDIO_ON 16
#define MACRO_AUDIO_OFF 17
#define MACRO_INC_VOICE 18 #define MACRO_INC_VOICE 18
#define MACRO_DEC_VOICE 19 #define MACRO_DEC_VOICE 19
#define MACRO_BACKLIGHT 20
#define MACRO_BREATH_TOGGLE 21
#define MACRO_BREATH_SPEED_INC 23
#define MACRO_BREATH_SPEED_DEC 24
#define MACRO_BREATH_DEFAULT 25
#define M_QWRTY M(MACRO_QWERTY) #define M_QWRTY M(MACRO_QWERTY)
#define M_COLMK M(MACRO_COLEMAK) #define M_COLMK M(MACRO_COLEMAK)
#define M_DVORK M(MACRO_DVORAK) #define M_DVORK M(MACRO_DVORAK)
#define M_UPPER M(MACRO_UPPER)
#define M_LOWER M(MACRO_LOWER) #define M_LOWER M(MACRO_LOWER)
#define M_RAISE M(MACRO_RAISE)
#define M_FUNCT M(MACRO_FUNCTION) #define M_FUNCT M(MACRO_FUNCTION)
#define M_MOUSE M(MACRO_MOUSE) #define M_MOUSE M(MACRO_MOUSE)
#define TIMBR_1 M(MACRO_TIMBRE_1) #define TIMBR_1 M(MACRO_TIMBRE_1)
@ -53,12 +55,15 @@
#define TMPO_UP M(MACRO_TEMPO_U) #define TMPO_UP M(MACRO_TEMPO_U)
#define TMPO_DN M(MACRO_TEMPO_D) #define TMPO_DN M(MACRO_TEMPO_D)
#define TMPO_DF M(MACRO_TONE_DEFAULT) #define TMPO_DF M(MACRO_TONE_DEFAULT)
#define M_BACKL M(MACRO_BACKLIGHT)
#define M_BRTOG M(MACRO_BREATH_TOGGLE)
#define M_BSPDU M(MACRO_BREATH_SPEED_INC)
#define M_BSPDD M(MACRO_BREATH_SPEED_DEC)
#define M_BDFLT M(MACRO_BREATH_DEFAULT)
#define MUS_ON M(MACRO_MUSIC_ON) //#define MU_TOG M(MACRO_MUSIC_TOGGLE)
#define MUS_OFF M(MACRO_MUSIC_OFF) //#define AU_TOG M(MACRO_AUDIO_TOGGLE)
#define AUD_OFF M(MACRO_AUDIO_OFF)
#define AUD_ON M(MACRO_AUDIO_ON)
#define VC_UP M(MACRO_INC_VOICE) #define VC_UP M(MACRO_INC_VOICE)
#define VC_DOWN M(MACRO_DEC_VOICE) #define VC_DOWN M(MACRO_DEC_VOICE)
@ -74,6 +79,7 @@
#define SC_ACLS LALT(KC_F4) #define SC_ACLS LALT(KC_F4)
#define SC_CCLS LCTL(KC_F4) #define SC_CCLS LCTL(KC_F4)
#define OS_SHFT KC_FN0
#define _______ KC_TRNS #define _______ KC_TRNS
#define XXXXXXX KC_NO #define XXXXXXX KC_NO
@ -92,16 +98,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | LCTRL | LWIN | FN | LALT | RAISE | XXXXXX . SPACE | LOWER | RALT | RWIN | MENU | RCTRL | LEFT | DOWN | RIGHT | * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------' * '--------------------------------------------------------------------------------------------------------------------------------------'
*/ */
[LAYER_QWERTY] = { /* QWERTY */ [LAYER_QWERTY] = { // QWERTY
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC },
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL },
{ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, KC_SPC, M_LOWER, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
}, },
/* COLEMAK /* COLEMAK
@ -114,17 +120,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | LCTRL | LWIN | FN | LALT | RAISE | XXXXXX . SPACE | LOWER | RALT | RWIN | MENU | RCTRL | LEFT | DOWN | RIGHT | * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------' * '--------------------------------------------------------------------------------------------------------------------------------------'
*/ */
[LAYER_COLEMAK] = { /* COLEMAK */ [LAYER_COLEMAK] = { // COLEMAK
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC },
{ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL },
{ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, { KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, KC_SPC, M_LOWER, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
}, },
/* DVORAK /* DVORAK
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------. * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
@ -136,36 +142,63 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN | * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | LCTRL | LWIN | FN | LALT | RAISE | XXXXXX . SPACE | LOWER | RALT | RWIN | MENU | RCTRL | LEFT | DOWN | RIGHT | * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------' * '--------------------------------------------------------------------------------------------------------------------------------------'
*/ */
[LAYER_DVORAK] = { /* DVORAK */ [LAYER_DVORAK] = { // DVORAK
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_BSPC }, { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_BSPC },
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL }, { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL },
{ KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_ENT, KC_PGUP }, { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, KC_SPC, M_LOWER, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
}, },
/* UPPER
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | PRINT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | NUM LK | / | * | - | NUM LK | SCR LK | XXXXXX . PAUSE |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | | F1 | F2 | F3 | F4 | | | 7 | 8 | 9 | + | ~ | | | INS |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | CAP LK | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | + | ` | XXXXXX . | HOME |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | ENTER | XXXXXX . | | END |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | | | | | | 0 | | RALT | . | ENTER | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_LOWER] = { /* LOWERED */ [LAYER_UPPER] = { // UPPER
{ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ________________ }, { KC_PSCR, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PAUS },
{ _______, _______, _______, _______, SC_CCLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS }, { _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, KC_HOME }, { KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, ________________, KC_HOME },
{ _______, SC_REDO, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______, KC_END }, { _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, ________________, _______, KC_END },
{ _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, _______, _______, _______, _______, _______, _______, _______ }, { _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ },
}, },
[LAYER_RAISE] = { /* RAISED */ /* LOWER
{ KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ________________ }, * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
{ _______, _______, _______, _______, SC_ACLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS }, * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . BACKSP |
{ _______, SC_SELA, SC_SAVE, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, KC_HOME }, * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
{ _______, SC_UNDO, SC_CUT, SC_COPY, SC_PSTE, _______, _______, _______, _______, _______, _______, ________________, _______, KC_END }, * | | $ | { | [ | ( | % | # | ) | ] | } | @ | | | | INS |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | | ^ | * | + | - | ; | : | _ | ' | " | ` | | XXXXXX . | HOME |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | | | | & | ! | ~ | / | \ | = | < | > | ? | XXXXXX . | | END |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | | | | | | | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_LOWER] = { // LOWER
{ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ________________ },
{ _______, KC_DLR, KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT, _______, _______, _______, KC_INS },
{ _______, KC_CIRC, KC_ASTR, KC_PPLS, KC_PMNS, KC_SCLN, KC_COLN, KC_UNDS, KC_QUOT, KC_DQT, KC_GRV, _______, ________________, KC_HOME },
{ _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SLSH, KC_BSLS, KC_EQL, KC_LT, KC_GT, KC_QUES, ________________, _______, KC_END },
{ _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ }, { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ },
}, },
[LAYER_FUNCTION] = { /* FUNCTION */ [LAYER_FUNCTION] = { // FUNCTION
{ KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ________________ }, { KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ________________ },
{ KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, KC_PAUS }, { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______, KC_PAUS },
{ KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, KC_PSCR }, { KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, KC_PSCR },
@ -175,7 +208,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef MOUSEKEY_ENABLE #ifdef MOUSEKEY_ENABLE
[LAYER_MOUSE] = { /* MOUSE */ [LAYER_MOUSE] = { // MOUSE
{ _______, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX }, { _______, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX },
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, KC_WH_U }, { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, KC_WH_U },
@ -185,25 +218,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#endif #endif
[LAYER_MUSIC] = { /* MUSIC */ [LAYER_ADJUST] = { // ADJUST
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, { _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, _______, _______, _______, MU_TOG, AU_TOG, ________________ },
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
{ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_RAISE, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
},
[LAYER_ADJUST] = { /* ADJUST */
{ _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, _______, MUS_ON, MUS_OFF, AUD_ON, AUD_OFF, ________________ },
{ _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, { _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ }, { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ },
{ _______, _______, _______, _______, _______, RESET, _______, M_MOUSE, _______, _______, _______, ________________, VC_UP, _______ }, { _______, _______, _______, _______, M_BACKL, RESET, _______, M_MOUSE, _______, _______, _______, ________________, MUV_IN, _______ },
{ _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, VC_DOWN, _______ }, { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, MUV_DE, _______ },
}, },
/* /*
[LAYER_EMPTY] = { [LAYER_EMPTY] = { // LAYER
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________ }, { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ }, { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ },
@ -225,13 +250,14 @@ float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_audio_on[][2] = SONG(CLOSE_ENCOUNTERS_5_NOTE); float tone_audio_on[][2] = SONG(CLOSE_ENCOUNTERS_5_NOTE);
float tone_music_on[][2] = SONG(DOE_A_DEER); float tone_music_on[][2] = SONG(DOE_A_DEER);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float tone_caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND); float tone_caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
float tone_caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); float tone_caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND);
float tone_numlk_on[][2] = SONG(NUM_LOCK_ON_SOUND); float tone_numlk_on[][2] = SONG(NUM_LOCK_ON_SOUND);
float tone_numlk_off[][2] = SONG(NUM_LOCK_OFF_SOUND); float tone_numlk_off[][2] = SONG(NUM_LOCK_OFF_SOUND);
float tone_scroll_on[][2] = SONG(SCROLL_LOCK_ON_SOUND); float tone_scroll_on[][2] = SONG(SCROLL_LOCK_ON_SOUND);
float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND); float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */
@ -242,6 +268,7 @@ void persistant_default_layer_set(uint16_t default_layer)
} }
const uint16_t PROGMEM fn_actions[] = { const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_MODS_ONESHOT(MOD_LSFT),
}; };
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
@ -251,6 +278,34 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
switch(id) switch(id)
{ {
case MACRO_BREATH_TOGGLE:
if (record->event.pressed)
{
breathing_toggle();
}
break;
case MACRO_BREATH_SPEED_INC:
if (record->event.pressed)
{
breathing_speed_inc(1);
}
break;
case MACRO_BREATH_SPEED_DEC:
if (record->event.pressed)
{
breathing_speed_dec(1);
}
break;
case MACRO_BREATH_DEFAULT:
if (record->event.pressed)
{
breathing_defaults();
}
break;
case MACRO_QWERTY: case MACRO_QWERTY:
if (record->event.pressed) if (record->event.pressed)
{ {
@ -281,39 +336,47 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
} }
break; break;
case MACRO_LOWER: case MACRO_UPPER:
if (record->event.pressed) if (record->event.pressed)
{ {
layer_on(LAYER_LOWER); layer_on(LAYER_UPPER);
update_tri_layer(LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); breathing_speed_set(2);
breathing_pulse();
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
} }
else else
{ {
layer_off(LAYER_LOWER); layer_off(LAYER_UPPER);
update_tri_layer(LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
} }
break; break;
case MACRO_RAISE: case MACRO_LOWER:
if (record->event.pressed) if (record->event.pressed)
{ {
layer_on(LAYER_RAISE); layer_on(LAYER_LOWER);
update_tri_layer(LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); breathing_speed_set(2);
breathing_pulse();
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
} }
else else
{ {
layer_off(LAYER_RAISE); layer_off(LAYER_LOWER);
update_tri_layer(LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
} }
break; break;
case MACRO_FUNCTION: case MACRO_FUNCTION:
if (record->event.pressed) if (record->event.pressed)
{ {
breathing_speed_set(3);
breathing_enable();
layer_on(LAYER_FUNCTION); layer_on(LAYER_FUNCTION);
} }
else else
{ {
breathing_speed_set(1);
breathing_self_disable();
layer_off(LAYER_FUNCTION); layer_off(LAYER_FUNCTION);
} }
break; break;
@ -363,45 +426,37 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
} }
break; break;
case MACRO_AUDIO_OFF: /*
case MACRO_AUDIO_TOGGLE:
if (record->event.pressed) if (record->event.pressed)
{ {
#ifdef AUDIO_ENABLE if (is_audio_on())
{
audio_off(); audio_off();
#endif
} }
break; else
case MACRO_AUDIO_ON:
if (record->event.pressed)
{ {
#ifdef AUDIO_ENABLE
audio_on(); audio_on();
PLAY_NOTE_ARRAY(tone_audio_on, false, STACCATO); PLAY_NOTE_ARRAY(tone_audio_on, false, STACCATO);
#endif
} }
break;
case MACRO_MUSIC_ON:
if (record->event.pressed)
{
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_music_on, false, STACCATO);
layer_on(LAYER_MUSIC);
#endif
} }
break; break;
case MACRO_MUSIC_OFF: case MACRO_MUSIC_TOGGLE:
if (record->event.pressed) if (record->event.pressed)
{ {
#ifdef AUDIO_ENABLE if (IS_LAYER_ON(LAYER_MUSIC))
{
layer_off(LAYER_MUSIC); layer_off(LAYER_MUSIC);
stop_all_notes(); stop_all_notes();
#endif }
else
{
PLAY_NOTE_ARRAY(tone_music_on, false, STACCATO);
layer_on(LAYER_MUSIC);
}
} }
break; break;
case MACRO_INC_VOICE: case MACRO_INC_VOICE:
if (record->event.pressed) if (record->event.pressed)
{ {
@ -421,9 +476,18 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#endif #endif
} }
break; break;
*/
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */
#ifdef BACKLIGHT_ENABLE
case MACRO_BACKLIGHT:
if (record->event.pressed)
{
backlight_step();
}
#endif
default: default:
break; break;
@ -434,8 +498,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
/*
void process_action_user(keyrecord_t *record) bool process_action_user(keyrecord_t *record)
{ {
uint8_t starting_note = 0x0C; uint8_t starting_note = 0x0C;
@ -453,7 +517,7 @@ void process_action_user(keyrecord_t *record)
} }
} }
} }
*/
void matrix_init_user(void) void matrix_init_user(void)
{ {
@ -468,6 +532,8 @@ void led_set_user(uint8_t usb_led)
_delay_ms(10); // gets rid of tick _delay_ms(10); // gets rid of tick
if (!is_playing_notes())
{
if ((usb_led & (1<<USB_LED_CAPS_LOCK)) && !(old_usb_led & (1<<USB_LED_CAPS_LOCK))) if ((usb_led & (1<<USB_LED_CAPS_LOCK)) && !(old_usb_led & (1<<USB_LED_CAPS_LOCK)))
{ {
// If CAPS LK LED is turning on... // If CAPS LK LED is turning on...
@ -498,6 +564,8 @@ void led_set_user(uint8_t usb_led)
// If SCROLL LED is turning off... // If SCROLL LED is turning off...
PLAY_NOTE_ARRAY(tone_scroll_off, false, LEGATO); PLAY_NOTE_ARRAY(tone_scroll_off, false, LEGATO);
} }
}
old_usb_led = usb_led; old_usb_led = usb_led;
} }
@ -511,7 +579,23 @@ void play_startup_tone()
void play_goodbye_tone() void play_goodbye_tone()
{ {
PLAY_NOTE_ARRAY(tone_my_goodbye, false, STACCATO); PLAY_NOTE_ARRAY(tone_my_goodbye, false, STACCATO);
_delay_ms(1000); _delay_ms(2000);
stop_all_notes();
}
void play_audio_on_tone(void)
{
PLAY_NOTE_ARRAY(tone_audio_on, false, STACCATO);
}
void play_music_on_tone(void)
{
PLAY_NOTE_ARRAY(tone_music_on, false, STACCATO);
}
void play_music_scale(void)
{
PLAY_NOTE_ARRAY(music_scale, false, STACCATO);
} }
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */

@ -4,7 +4,7 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6 AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode

@ -36,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Change this to how you wired your keyboard // Change this to how you wired your keyboard
// COLS: Left to right, ROWS: Top to bottom // COLS: Left to right, ROWS: Top to bottom
#if defined(ATREUS_ASTAR) #if defined(ATREUS_ASTAR)
#define COLS (int []){ B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } #define COLS (int []){ D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 }
#define ROWS (int []){ D0, D1, D3, D2 } #define ROWS (int []){ D0, D1, D3, D2 }
#elif defined(ATREUS_TEENSY2) #elif defined(ATREUS_TEENSY2)
#define COLS (int []){ F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0} #define COLS (int []){ F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0}

@ -101,6 +101,22 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: ht
# MIDI_ENABLE = yes # MIDI controls # MIDI_ENABLE = yes # MIDI controls
# UNICODE_ENABLE = yes # Unicode # UNICODE_ENABLE = yes # Unicode
# If you want to have your own config_user.h, you can just put it in
# your keymap directory. Anything you set there will take precedence
# over the global config.h.
ifneq ("$(wildcard keymaps/$(KEYMAP)/config_user.h)","")
CONFIG_USER_H = keymaps/$(KEYMAP)/config_user.h
endif
ifdef KEYMAP
ifeq ("$(wildcard keymaps/$(KEYMAP).c)","")
ifneq ("$(wildcard keymaps/$(KEYMAP)/makefile.mk)","")
include keymaps/$(KEYMAP)/makefile.mk
endif
endif
endif
# Optimize size but this may cause error "relocation truncated to fit" # Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax #EXTRALDFLAGS = -Wl,--relax

@ -0,0 +1,1152 @@
:100000000C9465020C94A9020C94A9020C94A90208
:100010000C94A9020C94A9020C94A9020C94A902B4
:100020000C94A9020C94A9020C946B0C0C943D0D39
:100030000C94A9020C94A9020C94A9020C94A90294
:100040000C94A9020C940F220C94A9020C94A902FE
:100050000C94A9020C94B31B0C94A9020C94A90251
:100060000C94A9020C94A9020C94A9020C94A90264
:100070000C94A9020C94A9020C94A9020C94A90254
:100080000C94A9020C94A9020C94A9020C94A90244
:100090000C94A9020C94A9020C94A9020C94A90234
:1000A0000C94A9020C94A9020C94A902A20DC40DEF
:1000B000AF0EC40DAF0E060E290EAF0E7E0E910EC2
:1000C0008B118B11CC11CC110E124A124A144A1406
:1000D00062124A145913591324144A144A14381436
:1000E0000000F0A12E004C002A00E1003581000044
:1000F0001E000E000B001B7134004D001F00370066
:1001000004001400E104280020001200080034005C
:1001100050002C00210036000C002F004F004A0038
:1001200022001D00180033000000657450000154C7
:100130000000007F0000E3004F0001540000007742
:100140000000E200230019000700050000002971EB
:1001500024000A001700130052004B00250006007F
:1001600015001A005100E50026000F0011001000D4
:100170002F002B0027002D0016820D7130004E003D
:100180002D001C000978E500C100000001000100FD
:1001900001000100010000003A001E0220022202BC
:1001A000010001003B001F022102230201000100A7
:1001B0003C002F0226022F00010001003D0030020A
:1001C00027023000010001003E00310235003502F7
:1001D000000001000100010000000100000001001A
:1001E0000100010000000100000001003F0052007A
:1001F00051002402000001004000240021001E00E4
:10020000010001004100250022001F00370001000D
:1002100042002600230020002700010043002502A1
:100220002E0231002E0001004400450001000100B3
:1002300001000000010001000100010001000000B8
:1002400001000100010001000100010001000100A6
:10025000F2000100010001000100F000F1000100C6
:10026000F400010001000100F3000100F5000100AD
:100270000100010001000100000001000100010077
:100280000000010000000100010001000000010069
:100290000000010001000100010001000000010058
:1002A0000100010001000100A9000100010001009E
:1002B0000100AC00AA00B600010001000100AB0083
:1002C000A80001000100010001000100010001007F
: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
:10052000FFE3099511E0A0E0B1E0ECEAF7E402C0D6
:1005300005900D92A433B107D9F721E0A4E3B1E00F
:1005400001C01D92AE3EB207E1F70E94B1090C94C2
:10055000D4230C94000061110BC0FC01828188231C
:1005600021F085EE0E94131003C085EE0E94DB107F
:1005700080E090E0089508956091B1017091B2011A
:100580008091B3019091B4010E94DC1A56985E9854
:1005900025982D9826982E9827982F98813019F015
:1005A000823021F00895259A2D9A0895269A2E9A40
:1005B00008950C94BC0256985E9825982D9826981C
:1005C0002E9827982F988FEF90E090938900809332
:1005D000880090938B0080938A0090938D00809385
:1005E0008C00259A2D9A2FEF80E792E021508040D1
:1005F0009040E1F700C00000269A2E9A2FEF80E786
:1006000092E0215080409040E1F700C00000279A1E
:100610002F9A2FEF80E792E0215080409040E1F741
:1006200000C0000025982D982FEF80E792E0215020
:1006300080409040E1F700C0000026982E982FEFF0
:1006400080E792E0215080409040E1F700C0000038
:1006500027982F9856985E9825982D9826982E982A
:1006600027982F98089589EA8093800089E08093E5
:10067000810024982C983F988AB18F748AB96E981B
:10068000479A8BB1806B8BB9769A0E94DB020C94EF
:10069000BB0280E2809300018091340181110EC081
:1006A0000E94980381E0809334012FEF83ED90E363
:1006B000215080409040E1F700C0000080E40E949B
:1006C0009E038093000181112EC00E94C803809375
:1006D0000001811128C00E94C8038093000181118C
:1006E00022C08FE30E94C8038093000181111BC0C8
:1006F0000E94C00380E40E949E0380930001811148
:1007000012C08CE00E94C8038093000181110BC0CD
:100710000E94C80380930001811105C08FE30E94ED
:10072000C803809300010E94C003809100010895D6
:100730001092B9008AE08093B800089594EA9093EB
:10074000BC009091BC0097FFFCCF9091B900987FBE
:10075000983021F0903111F081E008958093BB0032
:1007600084E88093BC008091BC0087FFFCCF80911F
:10077000B900887F883111F0803471F780E00895E6
:1007800084E98093BC008091BC0084FDFCCF089577
:100790008093BB0084E88093BC008091BC0087FFFD
:1007A000FCCF9091B900987F81E0983209F480E005
:1007B000089584E88093BC008091BC0087FFFCCF43
:1007C0008091BB00089580910001811115C080E4E3
:1007D0000E949E038093000181110CC082E10E945F
:1007E000C80380930001811105C08FEF0E94C803E8
:1007F000809300010E94C00384B1807F84B985B1D9
:10080000807F85B98AB1837F8AB98BB1837F8BB9A9
:100810003E98469808950E944903809300010E94E3
:10082000E30380B38C7080BB81B3836F81BBE4E44E
:10083000F1E0A6E3B1E011921D9281E0E235F80704
:10084000D1F70C943303BF92CF92DF92EF92FF92D5
:100850000F931F93CF93DF9380910001882379F04A
:10086000809135018F5F80933501811108C00E940E
:10087000490380930001811102C00E94DB0206E35C
:1008800011E0C0E0D0E0DD24D39482E0C82EEE2455
:10089000E394F12CC73000F580910001811162C012
:1008A00080E40E949E0380930001811112C082E1C6
:1008B0000E94C8038093000181110BC0C7010C2E58
:1008C00001C0880F0A94EAF780950E94C8038093BC
:1008D00000010E94C00346C0CA30A1F028F4C8300D
:1008E00059F0C93061F005C0CC3089F070F0CD30DE
:1008F00089F0209A289810C0219A29980DC0229A30
:100900002A980AC0239A2B9807C0529A01C0539A7A
:100910005B9802C03E9A4698E0EAEA95F1F78FB1FB
:1009200079995AC092E081708D25892B7C9B02C0F9
:1009300090E001C094E0892B7D9B02C090E001C053
:1009400098E0892B7E9B02C090E001C090E1892B4A
:100950009FB19095991F9927991F9295990F907E15
:10096000892B0FC08091000181114BC080E40E944F
:100970009E0380930001882389F1B12C0E94C0035B
:100980008B2DF8019081981719F08083C092010196
:100990000E94E30321960F5F1F4FCE30D10509F06F
:1009A00079CF80910101882371F1815080930101F9
:1009B000882339F08FE99FE00197F1F700C000002C
:1009C00022C0A4E4B1E0E6E3F1E081918D9391E0EF
:1009D000E434F907D1F717C090E0A5CF83E10E9476
:1009E000C803809300018111C8CF81E40E949E0357
:1009F000809300018111C1CF0E94D903B82EB09419
:100A0000BDCF80E0BECF0E94D90281E0DF91CF91BF
:100A10001F910F91FF90EF90DF90CF90BF900895BE
:100A2000E82FF0E0EC5BFE4F808108950895089573
:100A300096E0799FF001112494E5899FE00DF11D66
:100A40001124E60FF11DEE0FFF1FEC51FF4F8591B2
:100A500094910895880F991F805A9040FC018591C8
:100A600094910895880F991F80529F4FFC018591A2
:100A7000949108950F931F93CF93DF93EC01811509
:100A800020E3920730F5811530E2930708F0B1C0FA
:100A90008B3B910588F4883A910508F058C0853A57
:100AA000910508F049C08430910508F043C08130B9
:100AB000910509F4B2C1AEC18F3F910509F0D0F59F
:100AC000803F910508F092C0805E9109089790F1EF
:100AD000A1C1C11581E5D807A8F4C23090E5D907B6
:100AE00008F09FC0C11520E5D20709F486C008F0C0
:100AF00092C0C11580E4D80708F08CC18E0111277F
:100B0000106CCCC1C11590E8D90758F4C11520E785
:100B1000D20708F07BC1C11530E6D30708F423C122
:100B200079C1C11580E9D80708F074C18E011F7022
:100B3000106AB4C18E01B2C1853A910509F470C141
:100B4000863A910509F46FC103E810E4A7C1883A19
:100B5000910509F46BC1893A910509F46AC18A3A91
:100B6000910509F469C18B3A910509F468C18C3A81
:100B7000910509F467C18D3A910509F466C1803B7E
:100B8000910509F465C18E3A910509F464C18F3A63
:100B9000910509F463C1813B910509F462C1823B6F
:100BA000910509F461C1833B910509F460C1843B5F
:100BB000910509F45FC1853B910509F45EC1863B4F
:100BC000910509F45DC1873B910509F45CC1883B3F
:100BD000910509F45BC1893B910509F45AC18A3B2F
:100BE000910509F059C10AE216E458C18C0110655B
:100BF00055C19F700E94320552C10E946D149FEF33
:100C000024E33CE0915020403040E1F700C0000078
:100C10000E94D81B43C18091CD0181608093CD019A
:100C20003DC10E94801D811102C00E94661D0E946C
:100C30009D1D90E09093EE018093ED01C23080E520
:100C4000D80721F48091ED01816086C0C43090E521
:100C5000D90721F48091ED0182607EC0C63020E585
:100C6000D20721F48091ED01846076C0C83030E570
:100C7000D30719F48091ED0127C0CA3080E5D80769
:100C800021F48091ED01806167C0CC3090E5D907F7
:100C900021F48091ED0180625FC0CE3020E5D20763
:100CA00021F48091ED01806457C0C03130E5D30755
:100CB00021F48091ED0180684FC0C23180E5D807F2
:100CC00029F48091ED018460886046C0C33090E5CE
:100CD000D90721F48091ED018E7F3EC0C53020E51B
:100CE000D20721F48091ED018D7F36C0C73030E509
:100CF000D30721F48091ED018B7F2EC0C93080E5B0
:100D0000D80719F48091ED0126C0CB3090E5D907C2
:100D100021F48091ED018F7E1FC0CD3020E5D207F8
:100D200021F48091ED018F7D17C0CF3030E5D307DE
:100D300021F48091ED018F7B0FC0C13180E5D80790
:100D400021F48091ED018F7707C0C331D04531F494
:100D50008091ED018B7F877F8093ED018091ED0184
:100D60000E94A11D9BC08D2F99278F7099278130DC
:100D70009105E9F48E01037011279C0102C0220F36
:100D8000331F0A95E2F789011C68CE0164E0880FE1
:100D9000991F6A95E1F788279370082B192B73E048
:100DA000CC0FDD1F7A95E1F7C076DD272CC08230AD
:100DB000910529F41C2F0027016F106A6FC0833042
:100DC000910561F4CE018370992701E010E002C023
:100DD000000F111F8A95E2F71C680EC0049709F0F6
:100DE0005DC0CE018370992701E010E002C0000FC2
:100DF000111F8A95E2F71A6843E0CC0FDD1F4A9570
:100E0000E1F7C07ED7700C2B1D2B48C08E011F70E0
:100E1000106244C000E010E041C001E010E03EC0BC
:100E200001E810E43BC002E810E438C002EE14E42C
:100E300035C009EE14E432C00AEE14E42FC005EB0D
:100E400014E42CC006EB14E429C007EB14E426C01C
:100E50000CEC14E423C00DEC14E420C003E815E40A
:100E60001DC00AE815E41AC002E915E417C004E938
:100E700015E414C001E216E411C003E216E40EC04A
:100E800004E216E40BC005E216E408C006E216E42C
:100E900005C007E216E402C000E014E4C801DF91D7
:100EA000CF911F910F91089596E0799FF001112441
:100EB00094E5899FE00DF11D1124E60FF11DEE0F61
:100EC000FF1FEC51FF4F85919491803E9105E0F416
:100ED000803C910558F58133910509F46FC048F4C1
:100EE0008932910509F463C08A32910509F46DC015
:100EF00072C089339105E9F082389105D1F08533CC
:100F0000910509F44DC067C0833E910581F138F425
:100F1000803E9105B9F0823E9105D9F05CC0863ED5
:100F2000910561F1873E9105A1F155C00E942A0506
:100F300008952091ED0120FD02C021FF4CC080EEFC
:100F400090E049C08091ED0180FFF9CF89E390E006
:100F500042C08091ED0182FF0EC08091ED0184FFBF
:100F600003C080E090E037C083EE90E034C0809111
:100F7000ED0182FFF2CF82EE90E02DC08091ED0175
:100F800083FF0BC08091ED0184FDEBCF87EE90E0F5
:100F900022C08091ED0183FFF5CF86EE90E01BC06B
:100FA0008091ED0185FF07C089E290E014C0809137
:100FB000ED0185FFF9CF85E390E00DC08091ED0153
:100FC00086FF07C08AE290E006C08091ED0186FFAF
:100FD000F9CF81E390E00E943A05089508950C94BA
:100FE000EE07809162010895CF93DF9300D01F92A6
:100FF000CDB7DEB72091E401243019F523E0298331
:101000009B838A832093E9008FEF9091E8008150C1
:1010100095FD06C095ED9A95F1F700008111F5CF89
:101020008091E80085FF0DC040E050E063E070E093
:10103000CE0101960E945E0A8091E8008E7780932F
:10104000E8000F900F900F90DF91CF910895CF930C
:10105000DF9300D01F92CDB7DEB72091E40124309A
:1010600021F522E029839B838A8383E08093E90032
:101070008FEF9091E800815095FD06C095ED9A950F
:10108000F1F700008111F5CF8091E80085FF0DC0D8
:1010900040E050E063E070E0CE0101960E945E0AFD
:1010A0008091E8008E778093E8000F900F900F906A
:1010B000DF91CF9108952091E4012430F1F422E0F2
:1010C0002093E9002FEF3091E800215035FD06C054
:1010D00035ED3A95F1F700002111F5CF2091E800A8
:1010E00025FF0BC040E050E065E070E00E945E0A22
:1010F0008091E8008E778093E8000895CF93DF9386
:10110000EC018091E401843009F046C090910C011B
:101110009923D9F090910D019923B9F08093E900BA
:101120008FEF9091E800815095FD06C095E19A956A
:10113000F1F700008111F5CF8091E80085FF2CC008
:1011400040E050E060E170E017C081E08093E9008A
:101150008FEF9091E800815095FD06C095ED9A952E
:10116000F1F700008111F5CF8091E80085FF14C0F0
:1011700040E050E068E070E0CE010E945E0A80919D
:10118000E8008E778093E80080E1FE01A2E5B1E0FF
:1011900001900D928A95E1F7DF91CF9108958091AA
:1011A000E301811109C00E94F00B0E944D0C809157
:1011B000E20084608093E20008951092E3010895B4
:1011C00008950C94FC210E946F1B0E9402220E9431
:1011D000EA0E0C94EF0742E061EC81E00E946A0B9A
:1011E00042E061EC82E00E946A0B42E061EC83E045
:1011F0000E946A0B42E161EC84E00C946A0B8091DE
:10120000E601833009F455C030F4813071F082304A
:1012100009F48EC008958A3009F47AC08B3009F43D
:1012200060C0893009F09CC020C08091E501813AFE
:1012300009F096C08091E800877F8093E800809154
:10124000E9019091EA01892B21F060E080E090E0D3
:1012500003C060E182E591E070E00E94A70A8091FE
:10126000E8008B778093E80008958091E501813252
:1012700009F076C08091E9019091EA01009719F098
:10128000039709F06DC08091E800877F8093E800A4
:101290008091E80082FD05C08091E4018111F8CFC2
:1012A0005FC08091F100809362018091E8008B77AC
:1012B00053C08091E501813A09F052C08091E90163
:1012C0009091EA01892B09F04BC08091E800877F5B
:1012D0008093E8008091E80080FFFCCF80910C01B2
:1012E00036C08091E5018132D9F58091E901909174
:1012F000EA01892BA9F58091E800877F8093E800B7
:101300000E949F0B8091E70180930C010C946D1457
:101310008091E501813221F58091E800877F8093FB
:10132000E8000E949F0B8091E8018093630108957B
:101330008091E501813AA1F48091E800877F809354
:10134000E8008091E80080FFFCCF809163018093EA
:10135000F1008091E8008E778093E8000C949F0B59
:10136000089584B7877F84BF88E10FB6F89480938F
:101370006000109260000FBE90E080E80FB6F89415
:1013800080936100909361000FBE0E94390F0E940C
:10139000F00B0E944D0C8091E20084608093E2008B
:1013A00078940E94C80E0E943B0F82E091E00E9458
:1013B000E50E0E94EA218091E401853069F40E94E3
:1013C0002F1B8091E2018823B1F30E945A1B8823CE
:1013D00091F30E94480AEFCF0E94410FECCF292FD2
:1013E000332723303105A9F06CF42130310509F49D
:1013F00042C02230310509F043C08DE690E020E183
:1014000033E042C021323105C9F02232310519F1F1
:1014100037C099278130910541F08230910541F024
:10142000892B71F5ECE0F3E005C0E4EFF2E002C0D7
:10143000ECEDF2E0849190E09F0126C0643000F56D
:10144000E62FF0E0EE0FFF1FEE5DFE4F20813181B1
:1014500089E090E019C0643098F4E62FF0E0DF01F5
:10146000AA0FBB1FA65EBE4F2D913C91EA5EFE4FB8
:10147000808190E009C082E190E02DE733E004C074
:1014800080E090E020E030E0FA013183208308958D
:1014900080E189BD82E189BD09B400FEFDCF809164
:1014A000D8008F7D8093D8008091E0008260809387
:1014B000E0008091E00081FDFCCF0895CF92DF92A3
:1014C000EF92FF920F931F93CF93DF937C018B01D9
:1014D000EA010E94C00B811131C0209731F0888150
:1014E0009981081B190BE80EF91EC12CD12C01158E
:1014F000110519F18091E80085FD14C08091E80084
:101500008E778093E800209741F0888199818C0D37
:101510009D1D9983888385E011C00E94C00B88239C
:1015200031F30CC0F70181917F018093F1000150EC
:101530001109FFEFCF1ADF0ADACF80E0DF91CF91F8
:101540001F910F91FF90EF90DF90CF900895209121
:10155000EB013091EC012617370748F06115710552
:1015600039F42091E8002E772093E80001C0B901FA
:10157000FC0120E061157105B9F18091E401882337
:1015800009F440C0853009F43FC08091E80083FD34
:101590003DC08091E80082FF06C08091E80082FF94
:1015A00026C080E008958091E80080FFE3CF20917D
:1015B000F3008091F20090E0922B6115710551F0DB
:1015C0008830910538F421912093F1006150710920
:1015D0000196F3CF21E0089709F020E08091E80020
:1015E0008E778093E800C6CF2111C7CFD6CF8091E8
:1015F000E401882339F0853039F08091E80083FFD9
:10160000CCCF04C082E0089583E0089581E008957E
:101610002091EB013091EC012617370748F0611556
:10162000710539F42091E8002E772093E80001C07D
:10163000B901FC0120E061157105C1F18091E4015F
:10164000882309F441C0853009F440C08091E80046
:1016500083FD3EC08091E80082FF06C08091E800D3
:1016600082FF27C080E008958091E80080FFE3CFEB
:101670002091F3008091F20090E0922B61157105AA
:1016800059F08830910540F424912093F10031966F
:10169000615071090196F2CF21E0089709F020E02E
:1016A0008091E8008E778093E800C5CF2111C6CFE6
:1016B000D5CF8091E401882339F0853039F08091CD
:1016C000E80083FFCBCF04C082E0089583E0089553
:1016D00081E00895982F973058F59093E900981776
:1016E00039F07091EC002091ED005091F00003C0B2
:1016F000242F762F50E021FF19C03091EB003E7F60
:101700003093EB003091ED003D7F3093ED00309150
:10171000EB0031603093EB007093EC002093ED0010
:101720005093F0002091EE0027FF07C09F5FD3CFBA
:101730008F708093E90081E0089580E008958091A2
:10174000E50187FD05C08091E80080FF0EC012C052
:101750008091E80082FD05C08091E4018111F8CFFD
:1017600008958091E8008B7708C08091E401811191
:10177000EACF08958091E8008E778093E80008957D
:101780008091E4009091E50045E62091EC0020FF77
:1017900021C02091E80020FD21C02091E4012223F6
:1017A00089F0253089F02091EB0025FD0FC02091B4
:1017B000E4003091E5002817390739F3415041F032
:1017C000C901E3CF82E0089583E0089581E00895A0
:1017D00084E008952091E80022FFDFCF80E00895A3
:1017E0000E945E0C0E94660CE0EEF0E08081816059
:1017F0008083E8EDF0E080818F77808319BCA7EDCE
:10180000B0E08C918E7F8C9380818F7E808310924C
:10181000E30108950F931F93CF93DF930E945E0C13
:101820000E94660CC8EDD0E088818F77888388811C
:101830008068888388818F7D888319BC1092E40139
:101840001092E0011092E2011092E10100EE10E02E
:10185000F80180818B7F808388818160888342E06A
:1018600060E080E00E946A0BE1EEF0E080818E7F14
:101870008083E2EEF0E080818160808380818860F7
:101880008083F80180818E7F808388818061888356
:10189000DF91CF911F910F910895E8EDF0E08081E5
:1018A0008F7E8083E7EDF0E080818160808384E03B
:1018B00082BF81E08093E3010C940A0CE8EDF0E034
:1018C00080818E7F80831092E20008951092DA006A
:1018D0001092E10008951F920F920FB60F921124FB
:1018E0002F933F934F935F936F937F938F939F9328
:1018F000AF93BF93EF93FF938091E10082FF0BC002
:101900008091E20082FF07C08091E1008B7F80938D
:10191000E1000E94C70E8091DA0080FF1FC0809115
:10192000D80080FF1BC08091DA008E7F8093DA00A0
:101930008091D90080FF0DC080E189BD82E189BD21
:1019400009B400FEFDCF81E08093E4010E94CF083E
:1019500005C019BC1092E4010E94DD088091E100ED
:1019600080FF19C08091E20080FF15C08091E200E5
:101970008E7F8093E2008091E20080618093E2009C
:101980008091D80080628093D80019BC85E0809354
:10199000E4010E94E1088091E10084FF30C0809161
:1019A000E20084FF2CC080E189BD82E189BD09B4D9
:1019B00000FEFDCF8091D8008F7D8093D80080916C
:1019C000E1008F7E8093E1008091E2008F7E809322
:1019D000E2008091E20081608093E2008091E0016A
:1019E000882311F084E007C08091E30087FF02C0E4
:1019F00083E001C081E08093E4010E94E3088091CC
:101A0000E10083FF29C08091E20083FF25C080911F
:101A1000E100877F8093E10082E08093E4011092EF
:101A2000E0018091E1008E7F8093E1008091E200EF
:101A30008E7F8093E2008091E20080618093E200DB
:101A400042E060E080E00E946A0B8091F0008860D4
:101A50008093F0000E94E008FF91EF91BF91AF9159
:101A60009F918F917F916F915F914F913F912F91B6
:101A70000F900FBE0F901F9018951F920F920FB6E8
:101A80000F9211242F933F934F935F936F937F9304
:101A90008F939F93AF93BF93CF93EF93FF93C09197
:101AA000E900CF708091EC001092E9008091F00085
:101AB000877F8093F00078940E94790D1092E9005E
:101AC0008091F00088608093F000C093E900FF915E
:101AD000EF91CF91BF91AF919F918F917F916F9136
:101AE0005F914F913F912F910F900FBE0F901F90DC
:101AF00018951F93CF93DF93CDB7DEB7AA970FB694
:101B0000F894DEBF0FBECDBFE5EEF1E08091F100AD
:101B1000819321E0ED3EF207C9F70E94FF08809112
:101B2000E80083FF1CC12091E5013091E601832F7D
:101B300090E08A30910508F012C1FC01EA5AFF4F8B
:101B40000C948423203881F0223809F008C1809158
:101B5000E9018F708093E9008091EB0085FB882775
:101B600080F91092E90006C08091E1019091E201B4
:101B7000911182609091E800977F9093E8008093A4
:101B8000F1001092F100C5C0822F8D7F09F0E7C0EF
:101B9000222319F0223061F0E2C08091E701813008
:101BA00009F0DDC0333009F080E08093E20128C005
:101BB0008091E701811124C02091E9012F7009F47F
:101BC000CEC02093E9008091EB0080FF19C0809186
:101BD000EB00333011F4806211C080618093EB0020
:101BE00081E090E0022E01C0880F0A94EAF780930A
:101BF000EA001092EA008091EB0088608093EB008D
:101C00001092E9008091E800877F86C02111A7C06B
:101C10001091E7011F778091E3008078812B8093FA
:101C2000E3008091E800877F8093E8000E949F0B8B
:101C30008091E80080FFFCCF8091E3008068809372
:101C4000E300112311F083E001C082E08093E401FE
:101C500086C02058223008F082C08091E701909120
:101C6000E8018C3D23E0920779F583E08A838AE2DC
:101C700089834FB7F894DE01139620E03EE051E2ED
:101C8000E32FF0E050935700E49120FF03C0E2956A
:101C9000EF703F5FEF708E2F90E0EA3010F0C79644
:101CA00001C0C0968D939D932F5F243149F74FBF9C
:101CB0008091E800877F8093E8006AE270E0CE01BF
:101CC00001960E94A70A14C0AE014F5F5F4F60915A
:101CD000E9010E94EF09009709F441C02091E80052
:101CE000277F2093E800BC0189819A810E94080B1C
:101CF0008091E8008B778093E80031C0203879F537
:101D00008091E800877F8093E8008091E0018093D4
:101D1000F1008091E8008E778093E8000E949F0B8D
:101D20001EC021111CC09091E7019230C0F4809137
:101D3000E800877F8093E8009093E0010E949F0B6A
:101D40008091E001811104C08091E30087FF02C00F
:101D500084E001C081E08093E4010E94EB0880915F
:101D6000E80083FF0AC08091E800877F8093E80045
:101D70008091EB0080628093EB00AA960FB6F894F6
:101D8000DEBF0FBECDBFDF91CF911F9108950895A3
:101D9000CF938091E4018823B1F08091E9008F70A6
:101DA0009091EC0090FF02C090E801C090E0C92F34
:101DB000C82B1092E9008091E80083FD0E94790D04
:101DC000CF70C093E900CF910895909369018093FB
:101DD00068010895E0916801F0916901309721F060
:101DE0000190F081E02D099480E00895E091680170
:101DF000F0916901309721F00280F381E02D099480
:101E00000895E0916801F0916901309721F0048014
:101E1000F581E02D099408952091660130916701C4
:101E20008217930771F09093670180936601E091A8
:101E30006801F0916901309721F00680F781E02D6B
:101E400009940895209164013091650182179307E8
:101E500071F09093650180936401E0916801F091C5
:101E60006901309721F00084F185E02D09940895EF
:101E700008950C94380F0E94751B0E940B040C945B
:101E80003B1CCF92DF92EF92FF920F931F93CF9361
:101E9000DF93CDB7DEB72B970FB6F894DEBF0FBE3A
:101EA000CDBF0E9423043BE6E32E31E0F32E00E099
:101EB00010E0C02E802F0E941005F701D1907F0105
:101EC000D826B1F40F5F1F4F0E30110591F78FEF39
:101ED00089838A831B820E947E1B8160782F9D8369
:101EE0008C8349815A816B818D810E94E40F41C0AE
:101EF0009091CD0191FF04C08B870E9416058B85C0
:101F000020E030E04D2D50E0922FBA01022E02C0A9
:101F1000759567950A94E2F760FF25C02E83CF82FE
:101F2000EE24E394F12C02C0EE0CFF1C9A95E2F72C
:101F300090E08E219F2121E0892B09F420E0288761
:101F40000E947E1B8160782F9A8789874E815F81EE
:101F500068858A850E94E40FF801E559FE4F80816B
:101F60008E25808306C02F5F3F4F2630310561F6F6
:101F7000A9CF0E941F1F10916A010E94EA0E181734
:101F8000A1F00E94EA0E80936A012B960FB6F89496
:101F9000DEBF0FBECDBFDF91CF911F910F91FF909C
:101FA000EF90DF90CF900C94EF072B960FB6F8943C
:101FB000DEBF0FBECDBFDF91CF911F910F91FF907C
:101FC000EF90DF90CF900895CF93DF93CDB7DEB73A
:101FD0002B970FB6F894DEBF0FBECDBF4F83588747
:101FE00069877A878B87DE01119686E0FD01119261
:101FF0008A95E9F785E0FE01379601900D928A9562
:10200000E1F749815A816B817C818D819E810E949B
:1020100039172B960FB6F894DEBF0FBECDBFDF91F8
:10202000CF9108950895CF93C82F882309F4C1C094
:10203000823859F40E94EA0E81FDBBC089E30E94F8
:10204000E3190E94AD1A89E30CC0833879F40E9429
:10205000EA0E80FDAEC083E50E94E3190E94AD1A2E
:1020600083E50E94231ACF910C94AD1A843859F459
:102070000E94EA0E82FD9DC087E40E94E3190E943F
:10208000AD1A87E4EECF8CEF8C0F813A48F48C2F99
:102090000E94522181118DC08C2F0E94E319E3CF41
:1020A00080E28C0F883048F4C77081E001C0880F4F
:1020B000CA95EAF70E94641AD6CF8BE58C0F83305D
:1020C00078F4C53A29F0C63A31F482E890E005C0C8
:1020D00081E890E002C083E890E0CF910C940C0F6F
:1020E00088E58C0F833108F064C0C83A39F1C93AE9
:1020F00041F1CA3A49F1CB3A51F1CC3A59F1CD3AD2
:1021000061F1C03B69F1CE3A71F1CF3A79F1C13B4F
:1021100081F1C23B89F1C33B91F1C43B99F1C53BCD
:10212000A1F1C63BA9F1C73BB1F1C83BB9F1C93B2D
:10213000C1F1CA3BC9F58AE292E038C082EE90E074
:1021400035C089EE90E032C08AEE90E02FC085EB7A
:1021500090E02CC086EB90E029C087EB90E026C091
:102160008CEC90E023C08DEC90E020C083E891E0FF
:102170001DC08AE891E01AC082E991E017C084E9A5
:1021800091E014C081E292E011C083E292E00EC0BF
:1021900084E292E00BC085E292E008C086E292E021
:1021A00005C087E292E002C080E090E0CF910C94FD
:1021B000220FCF910895882309F44BC0823859F437
:1021C0000E94EA0E81FF45C089E30E94E3190E9444
:1021D000AD1A89E30CC0833871F40E94EA0E80FFC7
:1021E00038C083E50E94E3190E94AD1A83E50E947E
:1021F000231A0C94AD1A843859F40E94EA0E82FF17
:1022000028C087E40E94E3190E94AD1A87E4EFCF4B
:102210009CEF980F913A58F390E2980F983050F451
:10222000877091E001C0990F8A95EAF7892F0E9483
:102230006A1ADFCF9BE5980F933020F480E090E09E
:102240000C940C0F885A833120F480E090E00C94B9
:10225000220F0895882321F00E94641A0C94AD1A6D
:102260000895882321F00E946A1A0C94AD1A0895EB
:10227000CF92DF92EF92FF920F931F93CF93DF9352
:10228000CDB7DEB728970FB6F894DEBF0FBECDBF2F
:102290008C0185E0F801DE01119601900D928A957E
:1022A000E1F7F801D080E180F280558152955F70AE
:1022B00023813481232B39F0FFEFEF1206C081E038
:1022C000DF1203C003C081E001C080E080FDE2C2F4
:1022D000C8015F830E941210D982EA8269817A81E3
:1022E0008F2D0E94DF199E8388870E9493190E9478
:1022F00066184E815F816885FF2029F00E94811A4F
:1023000068855F814E81E42FE295EF70F0E0E05A3E
:10231000FF4F0C948423842F807F142F1F708823F9
:1023200011F01295107FFF20B1F0112309F467C25C
:1023300080E2860F883028F4812F68870E94641A13
:1023400004C0812F68870E94741A688568870E947C
:10235000AD1A688554C2862F68870E94DB10688595
:10236000112309F497C2605E812F683018F40E942F
:102370006A1A02C00E947A1A28960FB6F894DEBF35
:102380000FBECDBFDF91CF911F910F91FF90EF90C6
:10239000DF90CF900C94AD1A242F207F842F8F7064
:1023A000203211F08295807F662319F0613019F197
:1023B0002BC0FF20B1F0552309F493C1513009F02F
:1023C00090C128960FB6F894DEBF0FBECDBFDF9147
:1023D000CF911F910F91FF90EF90DF90CF900C94D1
:1023E000941A552319F0513009F454C28E830E9477
:1023F000971A8E8189C1FF2021F0523008F04AC21D
:1024000070C1511147C280C1FF2021F0552309F44A
:1024100068C1F5C1552309F477C105C2242F26955B
:102420002695237030E02115310521F0213031054A
:10243000C9F030C2FF2021F0862F942F937002C084
:1024400080E090E028960FB6F894DEBF0FBECDBFB7
:10245000DF91CF911F910F91FF90EF90DF90CF9080
:102460000C940C0FFF2021F0862F942F937002C044
:1024700080E090E028960FB6F894DEBF0FBECDBF87
:10248000DF91CF911F910F91FF90EF90DF90CF9050
:102490000C94220F862FFF2019F00E94271E02C0E5
:1024A0000E948F1E28960FB6F894DEBF0FBECDBFD8
:1024B000DF91CF911F910F91FF90EF90DF90CF9020
:1024C0000C94141F842F837009F076C0F110E2C1C0
:1024D000262F229526952770220F220F862F8F7088
:1024E000C82ED12CE12CF12C022E04C0CC0CDD1C0A
:1024F000EE1CFF1C0A94D2F764FF10C06FE070E07E
:1025000080E090E004C0660F771F881F991F2A950E
:10251000D2F7609570958095909503C060E070E06B
:10252000CB01242F269526952370422F50E0423070
:102530005105D1F04330510559F16C297D298E297F
:102540009F294130510541F128960FB6F894DEBF1E
:102550000FBECDBFDF91CF911F910F91FF90EF90F4
:10256000DF90CF900C948B186C297D298E299F29A0
:1025700028960FB6F894DEBF0FBECDBFDF91CF9186
:102580001F910F91FF90EF90DF90CF900C94A518C2
:102590000E948B18C701B60128960FB6F894DEBFCB
:1025A0000FBECDBFDF91CF911F910F91FF90EF90A4
:1025B000DF90CF900C947118FF2019F0842F817058
:1025C00001C08695882309F465C1262F229526959A
:1025D0002770220F220F862F8F70C82ED12CE12C4E
:1025E000F12C022E04C0CC0CDD1CEE1CFF1C0A9446
:1025F000D2F764FF10C06FE070E080E090E004C0AC
:10260000660F771F881F991F2A95D2F760957095DE
:102610008095909503C060E070E0CB01242F269553
:1026200026952370422F50E042305105D1F04330BF
:10263000510559F16C297D298E299F294130510579
:1026400041F128960FB6F894DEBF0FBECDBFDF91E3
:10265000CF911F910F91FF90EF90DF90CF900C944E
:102660005F196C297D298E299F2928960FB6F89429
:10267000DEBF0FBECDBFDF91CF911F910F91FF90B5
:10268000EF90DF90CF900C9479190E945F19C701E9
:10269000B60128960FB6F894DEBF0FBECDBFDF910E
:1026A000CF911F910F91FF90EF90DF90CF900C94FE
:1026B0004519603FC9F118F4603E50F49BC0623F79
:1026C00009F460C008F44AC0633F09F46FC092C0C7
:1026D000162F1F70842F8F71FF2099F00E94DE1833
:1026E000812F28960FB6F894DEBF0FBECDBFDF91C5
:1026F000CF911F910F91FF90EF90DF90CF900C94AE
:102700002A110E94FF18812F28960FB6F894DEBF79
:102710000FBECDBFDF91CF911F910F91FF90EF9032
:10272000DF90CF900C943111FF20A1F05111B2C075
:10273000842F8F7128960FB6F894DEBF0FBECDBFE1
:10274000DF91CF911F910F91FF90EF90DF90CF908D
:102750000C942419523008F09DC0EACFFF20A1F05C
:10276000842F8F7128960FB6F894DEBF0FBECDBFB1
:10277000DF91CF911F910F91FF90EF90DF90CF905D
:102780000C94DE18FF2061F3842F8F7128960FB60A
:10279000F894DEBF0FBECDBFDF91CF911F910F9197
:1027A000FF90EF90DF90CF900C94FF18FF2091F0F6
:1027B000842F8F7128960FB6F894DEBF0FBECDBF61
:1027C000DF91CF911F910F91FF90EF90DF90CF900D
:1027D0000C94C91828960FB6F894DEBF0FBECDBF73
:1027E000DF91CF911F910F91FF90EF90DF90CF90ED
:1027F0000C94BF18FF20A1F0552309F4B1CF862F08
:1028000028960FB6F894DEBF0FBECDBFDF91CF91F3
:102810001F910F91FF90EF90DF90CF900C941310C9
:10282000552309F4B1CF862F28960FB6F894DEBF52
:102830000FBECDBFDF91CF911F910F91FF90EF9011
:10284000DF90CF900C94DB104F70C8010E94AB0258
:1028500028960FB6F894DEBF0FBECDBFDF91CF91A3
:102860001F910F91FF90EF90DF90CF900C94E6179F
:102870004F70C80128960FB6F894DEBF0FBECDBFCB
:10288000DF91CF911F910F91FF90EF90DF90CF904C
:102890000C94170528960FB6F894DEBF0FBECDBF77
:1028A000DF91CF911F910F91FF90EF90DF90CF902C
:1028B00008950E94811A0E94911A0E94561A0E943D
:1028C000AD1A0E94C01F0E94141F80E090E00E9479
:1028D0000C0F80E090E00C94220F0E94711A0C946F
:1028E00059140E94D419292F22952F7030E02C30D2
:1028F00031054CF42A3031056CF422503109223074
:10290000310590F407C02C30310551F02F303105DE
:1029100039F00AC0803E10F0803F31F481E0089524
:1029200093FB882780F9089580E00895CF93DF9383
:1029300000D000D01F92CDB7DEB70F900F900F9050
:102940000F900F90DF91CF910895CF93DF9300D038
:1029500000D000D0CDB7DEB726960FB6F894DEBF14
:102960000FBECDBFDF91CF9108951F93CF93DF931B
:10297000C091790116E080917A01C81799F0D0E0F2
:102980001C9FF0011D9FF00D1124E558FE4F408162
:10299000518162817381848195810E94A514219661
:1029A000C770E9CFDF91CF911F9108954091AB019E
:1029B0005091AC016091AD017091AE018091AF0179
:1029C0009091B0010C94A514CF938091B0018295A1
:1029D0008F7009F05FC08091AD01882309F45AC05F
:1029E00020917901A0917A016091AB017091AC01C5
:1029F0008091AE019091AF0131E06F3F09F030E07E
:102A0000B32FC6E02A1709F445C0009721F07F3F95
:102A100021F44B2F03C041E001C040E030E040FD15
:102A200035C0C29FF001C39FF00D1124E558FE4F41
:102A3000418174132BC04081641328C0428141112D
:102A400025C0438154814817590710F4415051095A
:102A5000481B590B483C5105C8F48091B0018F7058
:102A600080618093B00186E0829FF001839FF00D2A
:102A70001124E058FE4F80818F70806180838BEA43
:102A800091E00E943811CF910C94B5142F5F3F4F05
:102A90002770B8CFCF910895CF92DF92EF92FF9237
:102AA0000F931F93CF93DF93CDB7DEB762970FB627
:102AB000F894DEBF0FBECDBF8C0185E0F801DE01CA
:102AC0001D9601900D928A95E1F7D8014C911196CF
:102AD0005C91119712966C9112971396ED90FC9061
:102AE00014977091AB01E091AC012091AE0130914F
:102AF000AF012115310531F0EF3F31F481E07F3F27
:102B000019F403C081E001C080E0B82FB170CB2E72
:102B100080FD6CC1D090AD01DD2009F4F5C0F091CD
:102B2000B001E216F30638F0C701821B930B883C14
:102B3000910548F09BC0209530952E0D3F1D283CF7
:102B4000310508F093C08F2F807F09F052C0E51344
:102B500014C0741312C0D62E61110FC0FF70F06143
:102B6000F093B0010E94D6148BEA91E00E943811D4
:102B70008091B001F80185836CC1EF2831F05F3F8F
:102B800031F481E04F3F19F403C081E001C080E0DF
:102B900080FD03C081E0862701C080E0F82FF1703E
:102BA000FF2E80FF1CC08091790120917A0136E0D0
:102BB000821709F428C190E0389FF001399FF00D89
:102BC0001124E558FE4F7181571306C070814713D9
:102BD00003C07281671303C001968770E9CFD62EB8
:102BE000662309F436C18091B00181608093B00101
:102BF00053C0E51308C0741306C0611104C0D801A6
:102C00001596FC93AEC04D875E878D859E856A8B39
:102C10000E9471146A89882329F1D62E662311F146
:102C20002091B001822F82958F7090E002970CF472
:102C300060C08091AB019091AC0198878F83198619
:102C4000FB86EA862C87CE01079651C0E51731F145
:102C50004D875E878D859E856A8B0E9471146A8977
:102C600081112EC0C8010E943811A4C08F2F807F0F
:102C700069F77E2DF98AE88A89890E9496148BEA81
:102C800091E00E943811EBEAF1E086E0DF011D924D
:102C90008A95E9F70E94D614D12CDBC07413D8CFE3
:102CA0006111D6CFD8011596FC93C8010E94381146
:102CB000EBEAF1E086E0DF011D928A95E9F7C9C0F1
:102CC000D62E662379F22091B001822F82958F70E3
:102CD00090E0029774F08091AB019091AC019A83DF
:102CE00089831B82FD82EC822E83CE0101960E9495
:102CF000381186E0F801ABEAB1E001900D928A95B7
:102D0000E1F70E94E4146FC0E216F30628F0C70151
:102D1000821B930B9C0104C0209530952E0D3F1D06
:102D2000283C310508F052C0D62E662309F49ACF0C
:102D3000E5132CC074132AC08091B00180FD1DC022
:102D4000982F92959F70C9F0D80115968C9315977E
:102D50009F3039F09F5F9295907F8F70892B1596E9
:102D60008C93C8010E94381186E0F801ABEAB1E00B
:102D700001900D928A95E1F736C086E0F801ABEA42
:102D8000B1E001900D928A95E1F763C04D875E87AF
:102D90008D859E850E947114882379F086E0F80164
:102DA000ABEAB1E001900D928A95E1F70E94E4143C
:102DB0000E94D614DD24D3944CC08091B001816070
:102DC0008093B001C8010E94381143C07E2DF98A5A
:102DD000E88A89890E949614EBEAF1E086E0DF0137
:102DE0001D928A95E9F70E94D61433C0662309F430
:102DF00039CF4D875E878D859E850E94711488230B
:102E000009F430CFCBCF4D875E878D859E850E949C
:102E1000D419292F22952F7030E0223031052CF45F
:102E20009F7041F0811106C00CC0243031052CF494
:102E30009F7049F4805E883020F0C8010E943811EC
:102E4000CF2CDC2C06C0D80115969C91907F91F771
:102E5000F8CF8D2D62960FB6F894DEBF0FBECDBFB2
:102E6000DF91CF911F910F91FF90EF90DF90CF9066
:102E700008951F93CF93DF93CDB7DEB72C970FB68E
:102E8000F894DEBF0FBECDBF4F83588769877A871E
:102E90008B879C87CE0107960E944C158823C1F032
:102EA0002F8138858A859B85892B31F03F3F11F032
:102EB00080E003C02F3FE1F781E0811147C04F81DF
:102EC000588569857A858B859C850E94A5143EC0AE
:102ED00086E0FE013796DE01119601900D928A95EB
:102EE000E1F7FF81E8854A855B854115510531F0A1
:102EF000EF3F31F481E0FF3F19F403C081E001C0EE
:102F000080E080FD23C020917A0130E0C901019664
:102F1000877099276091790170E086179707F1F122
:102F2000F983EA835D834C8396E0929FD001939F5F
:102F3000B00D1124A558BE4FFE01319601900D929F
:102F40009A95E1F780937A010E94B51416E080917A
:102F5000790190917A01891779F1189FC0011124A4
:102F600085589E4F0E944C15882331F1E0917901DC
:102F70001E9FF0011124E558FE4F4081518162816E
:102F80007381848195810E94A5148091790190E0DC
:102F900001968770992780937901D9CF0E946D148B
:102FA00010927A0110927901EBEAF1E086E0DF01FC
:102FB0001D928A95E9F7CACF2C960FB6F894DEBF1A
:102FC0000FBECDBFDF91CF911F910895EF92FF9279
:102FD0000F931F93CF93DF93FC01009709F46FC009
:102FE000F12CEE24E394EF0121968491843740F490
:102FF000843008F055C0813081F0823021F15FC00B
:10300000853709F447C0C0F19CE7980F903708F066
:1030100056C08F770E94DB1045C08F010E5F1F4F97
:10302000FE01849190E2980F983050F48770FE2D45
:1030300001C0FF0F8A95EAF78F2F0E94841A15C0EE
:103040000E94131014C08F010E5F1F4FFE01849168
:1030500090E2980F983068F48770FE2D01C0FF0F42
:103060008A95EAF78F2F0E948A1A0E94AD1AE8010A
:1030700019C00E94DB10FBCFCF010296FE01C49164
:10308000CC2361F0EFE9FFE03197F1F700C00000D9
:10309000C150F6CFCF010296FE01F490EC0102C0C0
:1030A0000E9413108F2D882341F0EFE9FFE0319744
:1030B000F1F700C000008150F6CFFE0194CFDF9100
:1030C000CF911F910F91FF90EF9008950895609315
:1030D000B5017093B6018093B7019093B8010C9439
:1030E00059140F931F930091B5011091B6012091CF
:1030F000B7013091B801062B172B282B392B0093E1
:10310000B5011093B6012093B7013093B8011F9118
:103110000F910C9459140F931F930091B5011091C6
:10312000B6012091B7013091B80106231723282357
:1031300039230093B5011093B6012093B701309362
:10314000B8011F910F910C9459140F931F93009184
:10315000B5011091B6012091B7013091B801062751
:103160001727282739270093B5011093B60120931C
:10317000B7013093B8011F910F910C94591410921C
:10318000B1011092B2011092B3011092B4010C94EB
:10319000591441E050E060E070E004C0440F551F56
:1031A000661F771F8A95D2F74093B1015093B20101
:1031B0006093B3017093B4010C94591441E050E052
:1031C00060E070E004C0440F551F661F771F8A95AA
:1031D000D2F78091B1019091B201A091B301B09169
:1031E000B401842B952BA62BB72B8093B101909320
:1031F000B201A093B301B093B4010C94591441E00F
:1032000050E060E070E004C0440F551F661F771F58
:103210008A95D2F740955095609570958091B1014F
:103220009091B201A091B301B091B4018423952390
:10323000A623B7238093B1019093B201A093B30169
:10324000B093B4010C94591441E050E060E070E098
:1032500004C0440F551F661F771F8A95D2F78091CF
:10326000B1019091B201A091B301B091B401842752
:103270009527A627B7278093B1019093B201A09319
:10328000B301B093B4010C9459140F931F930091A0
:10329000B1011091B2012091B3013091B401062B1C
:1032A000172B282B392B0093B1011093B2012093D7
:1032B000B3013093B4011F910F910C9459140F93E3
:1032C0001F930091B1011091B2012091B30130918F
:1032D000B40106231723282339230093B101109347
:1032E000B2012093B3013093B4011F910F910C945C
:1032F00059140F931F930091B1011091B2012091C5
:10330000B3013091B40106271727282739270093E6
:10331000B1011093B2012093B3013093B4011F9116
:103320000F910C9459140895CF92DF92EF92FF926F
:103330000F931F93CF93DF93EC01C090B501D09012
:10334000B601E090B701F090B8018091B101909181
:10335000B201A091B301B091B401C82AD92AEA2AD6
:10336000FB2A0FE110E0B701A601002E04C07695FC
:103370006795579547950A94D2F740FD05C00150CF
:10338000110988F780E007C0BE01802F0E94540712
:103390000197A9F3802FDF91CF911F910F91FF909B
:1033A000EF90DF90CF900895CF93DF93EC010E94D0
:1033B0009419BE010E945407DF91CF910895CB016B
:1033C0000E94D419089590910C019923D9F09091FD
:1033D0000D019923B9F0982F9695969596959F3063
:1033E00088F5E0910E01F0910F01E90FF11D877052
:1033F00021E030E001C0220F8A95EAF78181822B1B
:103400008183089540910E0150910F0120E030E03A
:103410009FEFFA01E20FF31F6281681799F09F3F57
:1034200019F4611101C0922F2F5F3F4F2E303105EB
:1034300081F79F3F39F0FA01E90FF11D97FDFA95E9
:1034400082830895089590910C019923E1F0909161
:103450000D019923C1F0982F9695969596959F30DA
:1034600020F5E0910E01F0910F01E90FF11D877039
:1034700021E030E001C0220F8A95EAF72095818192
:1034800028232183089540910E0150910F0120E0DF
:1034900030E0FA01E20FF31F9281981301C012820B
:1034A0002F5F3F4F2E303105A1F7089581E090E066
:1034B000E0910E01F0910F01E80FF91F10820196C3
:1034C00080319105A9F708959091CC01982B9093A4
:1034D000CC01089580959091CC0198239093CC01D4
:1034E00008951092CC0108959091CB01982B909360
:1034F000CB01089580959091CB0198239093CB01B7
:1035000008951092CB0108959091CA01982B909341
:10351000CA01089580959091CA0198239093CA0199
:1035200008951092CA0108958093B90108951092E8
:10353000B901089540910E0150910F0120E030E053
:1035400080E0FA01E20FF31F918191118F5F2F5FED
:103550003F4F2F303105A9F70895E0910E01F0910A
:103560000F018091CC018083E0910E01F0910F0159
:1035700080819091CB01892B8083E0910E01F091A5
:103580000F0180819091CA01892B80839091B901AC
:10359000992361F0E0910E01F0910F018081892B58
:1035A00080830E949A1A81111092B90180910E01B4
:1035B00090910F010C94F60ECF92DF92EF92FF9252
:1035C0000F931F936C01EE24FF24C114D104E10476
:1035D000F10421F46B017C0180E001C080E133271C
:1035E0002F2D1E2D0D2D011511052105310519F069
:1035F000885F6801790197018601A4E036952795D7
:1036000017950795AA95D1F70115110521053105E3
:1036100019F08C5F6801790197018601F2E0369517
:10362000279517950795FA95D1F7011511052105ED
:10363000310519F08E5F68017901B701A601769511
:10364000679557954795452B462B472B09F08F5F7C
:103650001F910F91FF90EF90DF90CF900895809190
:10366000E401843021F11092CE0120E488E190E061
:103670000FB6F894A895809360000FBE2093600069
:1036800080E00E94EF0783B7817F846083BF83B7A8
:10369000816083BF7894889583B78E7F83BF88E1EC
:1036A0000FB6F89480936000109260000FBE0895EA
:1036B00008950895CF930E94581B0E9423040E94EE
:1036C000591BC0E08C2F0E941005811105C0CF5FEF
:1036D000CE30C1F780E001C081E0CF9108950E9413
:1036E0006D140E94EA0E0C94EF0782E084BD93E013
:1036F00095BD9AEF97BD80936E0008952FB7F8940B
:103700008091CF019091D001A091D101B091D201CF
:103710002FBF0895CF92DF92EF92FF920F931F93E6
:103720002FB7F8944091CF015091D0016091D10111
:103730007091D2012FBF6A017B01EE24FF248C011E
:1037400020E030E0C016D106E206F30610F4415046
:103750005109481B590BCA011F910F91FF90EF901F
:10376000DF90CF9008951F920F920FB60F92112401
:103770008F939F93AF93BF938091CF019091D0018E
:10378000A091D101B091D2010196A11DB11D8093EC
:10379000CF019093D001A093D101B093D201BF91FA
:1037A000AF919F918F910F900FBE0F901F90189522
:1037B0000E94F00BF8942FEF87EA91E621508040A9
:1037C0009040E1F700C0000087E090EBDC018093BF
:1037D000EE019093EF01A093F001B093F1012CE082
:1037E00088E190E00FB6F894A895809360000FBE32
:1037F00020936000FFCFEF92FF920F931F93CF9320
:10380000DF93E82EF12C8F2D0E941005C0E0D0E050
:10381000082F10E098010C2E02C0359527950A94C8
:10382000E2F720FD05C02196C630D10599F709C001
:103830006C2F7F2D80E00E941805E812F4CF81E004
:1038400005C0F3948EE0F812DECF80E0DF91CF91D7
:103850001F910F91FF90EF900895CF93C82F8CE2A6
:103860000E94FB1B882321F08C2FCF910C94FB1B13
:1038700080E0CF910895CF930E94801D811102C0F6
:103880000E94661DC5E6C15049F00E9423048FE3E3
:103890009CE90197F1F700C00000F5CF89E20E9492
:1038A0002D1C811111C18AE20E942D1C81110E94E0
:1038B000661D85E00E942D1C81110E94D81B0E946C
:1038C0008B1D8093CD0187E00E942D1C882399F1E8
:1038D0008BE10E942D1C882351F09091CD0191FB2A
:1038E000882780F921E0822780FB91F922C08EE0B1
:1038F0000E942D1C882351F09091CD0192FB8827C6
:1039000080F921E0822780FB92F913C080E10E94B8
:103910002D1C9091CD01882341F093FB882780F9DD
:1039200021E0822780FB93F904C0892F809580FBDA
:1039300090F99093CD018091CD010E948F1D0E943E
:103940009D1D8093ED0180EE0E942D1C882341F087
:103950008091ED01982F909590FB80F98093ED0177
:1039600089E30E942D1C882359F09091ED0191FB71
:10397000882780F921E0822780FB91F99093ED015F
:1039800082EE0E942D1C882359F09091ED0192FB4C
:10399000882780F921E0822780FB92F99093ED013E
:1039A00086EE0E942D1C882359F09091ED0193FB27
:1039B000882780F921E0822780FB93F99093ED011D
:1039C00083EE0E942D1C882359F09091ED0194FB09
:1039D000882780F921E0822780FB94F99093ED01FC
:1039E00085E30E942D1C882359F09091ED0195FBF1
:1039F000882780F921E0822780FB95F99093ED01DB
:103A000081E30E942D1C882359F09091ED0196FBD3
:103A1000882780F921E0822780FB96F99093ED01B9
:103A200081E10E942D1C882359F09091ED0197FBB4
:103A3000882780F921E0822780FB97F99093ED0198
:103A40008091ED010E94A11D8091ED0187FB8827E7
:103A500080F980930D0187E20E942D1CC82F8EE112
:103A60000E942D1C8111C2608FE10E942D1C8111CA
:103A7000C46080E20E942D1C8111C86081E20E9416
:103A80002D1C8111C06182E20E942D1C8111C06237
:103A900083E20E942D1C8111C06484E20E942D1CCF
:103AA000882311F0C06802C0CC2329F08C2F0E941B
:103AB000981D6C2F03C00E94941D682F70E080E059
:103AC00090E0CF910C946718CF9108956DEE7EEF42
:103AD00080E090E00E94BE2360E082E090E00E94DF
:103AE000AC2360E083E090E00E94AC2360E084E0DF
:103AF00090E00E94AC2360E085E090E00C94AC2361
:103B000080E090E00E94A62321E08D3E9E4F09F0C8
:103B100020E0822F089582E090E00C949E23682F8D
:103B200082E090E00C94AC2383E090E00C949E2320
:103B3000682F83E090E00C94AC2384E090E00C9438
:103B40009E23682F84E090E00C94AC238091D501F3
:103B500080FF0BC06091130185E0689FB0011124C4
:103B600075956795759567952AC081FF09C0609125
:103B7000130185E0689FB0011124759567951FC0FA
:103B800082FF07C06091130185E0689FB001112496
:103B900016C04091D6014423C9F060911201461726
:103BA00088F72091130185E0289F90011124429FFE
:103BB000C001439F900D112470E00E947023603873
:103BC000710540F46115710539F002C065E070E0DF
:103BD000862F08958FE7089581E008958091D5019B
:103BE00080FF08C06091110170E07595679575952B
:103BF000679521C081FF06C06091110170E0759545
:103C0000679519C082FF04C06091110170E010C077
:103C10008091D6018823C1F0609110018617A0F72A
:103C200090911101989FC001112470E00E947023AF
:103C30006038710528F46115710521F0862F08950B
:103C40008FE7089581E0089561E070E0F4CF803F50
:103C500021F40E94A61D819504C0813F29F40E9491
:103C6000A61D8093D9010895823F21F40E94A61DCC
:103C7000819504C0833F29F40E94A61D8093D8013A
:103C80000895893F19F40E94EE1D05C08A3F31F462
:103C90000E94EE1D81958093DA0108958B3F21F4F7
:103CA0000E94EE1D819504C08C3F29F40E94EE1DF8
:103CB0008093DB010895843F21F48091D7018160D6
:103CC00017C0853F21F48091D701826011C0863FE3
:103CD00021F48091D70184600BC0873F21F480914B
:103CE000D701886005C0883F31F48091D701806199
:103CF0008093D70108958D3F21F48091D501816093
:103D00000BC08E3F21F48091D501826005C08F3FAA
:103D100029F48091D50184608093D5010895803F76
:103D200039F48091D90187FF6CC01092D90169C024
:103D3000813F29F48091D9011816BCF362C090919B
:103D4000D801823F29F497FF5CC01092D80159C076
:103D5000833F19F41916CCF354C0893F41F4809184
:103D6000DA0118160CF04DC01092DA014AC08A3FF1
:103D700029F48091DA0187FF44C0F6CF8B3F39F4F4
:103D80008091DB0187FF3DC01092DB013AC08C3F80
:103D900029F48091DB011816BCF333C0843F21F471
:103DA0008091D7018E7F17C0853F21F48091D70184
:103DB0008D7F11C0863F21F48091D7018B7F0BC08E
:103DC000873F21F48091D701877F05C0883F31F478
:103DD0008091D7018F7E8093D70113C08D3F21F44E
:103DE0008091D5018E7F0BC08E3F21F48091D5014B
:103DF0008D7F05C08F3F29F48091D5018B7F809303
:103E0000D5018091D80181110EC08091D901811115
:103E10000AC08091DA01811106C08091DB01811115
:103E200002C01092D601089587ED91E00E94010F23
:103E30000E947E1B9093D4018093D30108951F9319
:103E4000CF93DF938091D3019091D4010E948A1B7C
:103E50004091D601442321F02091140130E006C0A6
:103E6000209115015AE0259F900111248217930794
:103E700008F482C08091D8011091D901D091DA0163
:103E8000C091DB01811107C0111105C0D11103C020
:103E9000CC2309F471C04F3F19F04F5F4093D60116
:103EA000181624F40E94A61D8093D8018091D80191
:103EB00087FF05C00E94A61D81958093D801111629
:103EC00024F40E94A61D8093D9018091D90187FF17
:103ED00005C00E94A61D81958093D9016091D801EB
:103EE000662339F11091D901112319F1772767FD64
:103EF0007095872F972F0E94812223E333E343E3BA
:103F00005FE30E94E5220E944E226093D801612F58
:103F1000772767FD7095872F972F0E94812223E3D3
:103F200033E343E35FE30E94E5220E944E22609365
:103F3000D9011D1624F40E94EE1D8093DA018091B0
:103F4000DA0187FF05C00E94EE1D81958093DA019A
:103F50001C1624F40E94EE1D8093DB018091DB018E
:103F600087FF05C00E94EE1D81958093DB01DF91E4
:103F7000CF911F910C94141FDF91CF911F91089541
:103F8000E7EDF1E085E0DF011D928A95E9F71092F7
:103F9000D6011092D5010895833081F128F4813043
:103FA00059F08230D1F00895853009F449C0B8F154
:103FB000863009F456C0089520911501862F90E0AF
:103FC000820F911D8F3F910520F4620F60931501C0
:103FD00008958FEF80931501089520911401862F85
:103FE00090E0820F911D8F3F910520F4620F609346
:103FF000140108958FEF8093140108952091130107
:10400000862F90E0820F911D8F3F910520F4620F63
:104010006093130108958FEF809313010895209109
:104020001201862F90E0820F911D8F3F910520F4A1
:10403000620F6093120108958FEF8093120108952B
:1040400020911101862F90E0820F911D8F3F9105E5
:1040500020F4620F6093110108958FEF8093110196
:10406000089520911001862F90E0820F911D8F3FBF
:10407000910520F4620F6093100108958FEF8093F3
:1040800010010895833011F128F4813049F0823015
:1040900091F00895853081F120F18630C1F10895C5
:1040A00080911501681720F4861B809315010895EF
:1040B00010921501089580911401681720F4861B51
:1040C00080931401089510921401089580911301B2
:1040D000681720F4861B8093130108951092130132
:1040E000089580911201681720F4861B80931201B5
:1040F000089510921201089580911101681720F41B
:10410000861B8093110108951092110108958091EA
:104110001001681720F4861B8093100108951092F7
:10412000100108958D3109F442C020F58E3009F454
:1041300077C070F4873009F459C018F48630F1F173
:1041400034C0883009F4A8C08B3009F4A5C02DC054
:10415000863109F4A1C038F4803109F472C081318C
:1041600009F479C022C0893109F496C08B3109F471
:104170004DC01BC0853309F487C048F4873209F469
:1041800083C008F473C0893209F47EC00EC0833442
:1041900038F48A3308F068C0883309F47DC005C05C
:1041A000833409F471C0883499F080E008950E9446
:1041B00008220E94EA0E0E94EF076EC08091CD0196
:1041C000817F8E7F8093CD0181E08093DD01089512
:1041D0000E946D142FEF83ED90E3215080409040BA
:1041E000E1F700C000000E94D81B56C09091CD019D
:1041F000892F8095817080FB90F919F09660986006
:104200001DC0997F977F9093CD0146C09091CD01BD
:1042100091FB882780F921E0822780FB91F909C072
:104220009091CD0192FB882780F921E0822780FBC5
:1042300092F99093CD01882379F191609093CD010B
:1042400008959091CD0193FB882780F921E0822782
:1042500080FB93F9EECF0E946D1480910D0191E0E7
:10426000892780930D0118C027EC01C023EE280F89
:1042700061E070E080E090E004C0660F771F881F67
:10428000991F2A95D2F704C061E070E080E090E0C9
:104290000E9467180E946D1481E0089580E00895DF
:1042A00080E00895CF93C82F8091DD01813079F0AF
:1042B00018F08230D1F184C0A0910E01B0910F01AD
:1042C0008C91813169F0823209F07CC009C0A091E3
:1042D0000E01B0910F018C91813111F0823249F4BD
:1042E0008C2F0E944E2181111DC08C2F0E94922084
:1042F0001AC08C2F0E945021811114C0C43179F052
:1043000048F4CB3079F0C03109F060C082E080938E
:10431000DD0108C0C93219F0C83321F057C010922E
:10432000DD0154C081E0817053C0C93289F118F5B4
:10433000C43171F1A8F4C73009F046C08AE0809317
:10434000150194E19093140193E0909313018093ED
:10435000120188E08093110188E28093100134C03B
:10436000CE51C63088F5EC2FF0E0E65DFE4F80813F
:104370008093DC0129C0CE34E9F020F4CB3421F560
:104380006AE013C0C13579F0C235F1F461E00DC0C7
:104390008091DC01882319F01092DC0115C081E0C6
:1043A0008093DD0115C061E006C08091DC010E94B0
:1043B000CC1F0AC06AE08091DC010E94422004C048
:1043C0001092DD0180E004C081E002C080E0ABCF4C
:1043D000CF910895E1E8F0E080818860808380815A
:1043E000816080838FB7F89493E09093890090ED7B
:1043F000909388008FBF0895EFE6F0E0808182609F
:1044000080830895EFE6F0E080818D7F80830895BA
:10441000EFE6F0E0808192E08927808308951F9283
:104420000F920FB60F9211242F933F934F935F93E8
:104430006F937F938F939F93AF93BF93EF93FF936C
:104440008091DE019091DF0101969093DF018093CE
:10445000DE01811103C082E00E94EF07E091DF01DD
:10446000E695E695F0E0E657FB4FE4918091DE019A
:104470008E1303C080E00E94EF07FF91EF91BF9180
:10448000AF919F918F917F916F915F914F913F91EC
:104490002F910F900FBE0F901F90189504D0689425
:1044A000B1118DC0089570D088F09F5790F0B92F4A
:1044B0009927B751A0F0D1F0660F771F881F991F79
:1044C0001AF0BA95C9F712C0B13081F077D0B1E0D7
:1044D000089574C0672F782F8827B85F39F0B93FE7
:1044E000CCF3869577956795B395D9F73EF490957B
:1044F0008095709561957F4F8F4F9F4F0895E894F9
:1045000009C097FB3EF490958095709561957F4F1B
:104510008F4F9F4F9923A9F0F92F96E9BB279395C9
:10452000F695879577956795B795F111F8CFFAF4D9
:10453000BB0F11F460FF1BC06F5F7F4F8F4F9F4F0A
:1045400016C0882311F096E911C0772321F09EE868
:10455000872F762F05C0662371F096E8862F70E0CE
:1045600060E02AF09A95660F771F881FDAF7880FA8
:104570009695879597F9089557FD9058440F551FC4
:1045800059F05F3F71F04795880F97FB991F61F0D5
:104590009F3F79F087950895121613061406551F4C
:1045A000F2CF4695F1DF08C0161617061806991FB8
:1045B000F1CF86957105610508940895E894BB27AD
:1045C00066277727CB0197F908950BD078C069D07B
:1045D00028F06ED018F0952309F05AC05FC011245E
:1045E000EECFCADFA0F3959FD1F3950F50E0551F92
:1045F000629FF001729FBB27F00DB11D639FAA2738
:10460000F00DB11DAA1F649F6627B00DA11D661F86
:10461000829F2227B00DA11D621F739FB00DA11DA7
:10462000621F839FA00D611D221F749F3327A00D61
:10463000611D231F849F600D211D822F762F6A2FFD
:1046400011249F5750408AF0E1F088234AF0EE0F82
:10465000FF1FBB1F661F771F881F91505040A9F78F
:104660009E3F510570F014C0AACF5F3FECF3983E17
:10467000DCF3869577956795B795F795E7959F5FF6
:10468000C1F7FE2B880F911D9695879597F9089590
:1046900097F99F6780E870E060E008959FEF80ECF5
:1046A000089500240A941616170618060906089598
:1046B00000240A9412161306140605060895092EFE
:1046C0000394000C11F4882352F0BB0F40F4BF2B6D
:1046D00011F460FF04C06F5F7F4F8F4F9F4F0895AD
:1046E00097FB072E16F4009407D077FD09D00E949F
:1046F0008A2307FC05D03EF4909581959F4F08953D
:10470000709561957F4F0895EE0FFF1F0590F4910E
:10471000E02D0994AA1BBB1B51E107C0AA1FBB1FB8
:10472000A617B70710F0A61BB70B881F991F5A953D
:10473000A9F780959095BC01CD010895F999FECF18
:1047400092BD81BDF89A992780B50895A8E1B0E09F
:1047500042E050E00C94C623262FF999FECF92BD7B
:1047600081BDF89A019700B4021639F01FBA20BD36
:104770000FB6F894FA9AF99A0FBE08950196272F6A
:104780000E94AD230C94AC23DC01CB01FC01F99910
:10479000FECF06C0F2BDE1BDF89A319600B40D928D
:0C47A00041505040B8F70895F894FFCF46
:1047AC002002F1077E085B082708F4070101BA0113
:1047BC0028080A03140A3F4D36394B04FE03C8037C
:1047CC008F0322033B0354036D030102030405060C
:0447DC0007080900C1
:00000001FF

@ -0,0 +1,185 @@
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_extras/keymap_german.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 | K | . | O | , | Y | L1 | | L1 | V | G | C | L | ß | Z |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | H | A | E | I | U |------| |------| D | T | R | N | S | F |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift |X/Ctrl| Q | Ä | Ü | Ö | | | | B | P | W | M | J | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | App | LGui | | Alt |Ctrl/Esc|
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|Enter |------| |------| Tab |RShift|
* | | | 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, DE_K, DE_DOT, DE_O, DE_COMM,DE_Y, TG(SYMB),
KC_BSPC, DE_H, DE_A, DE_E, DE_I, DE_U,
KC_LSFT, CTL_T(DE_X), DE_Q, DE_AE, DE_UE, DE_OE, ALL_T(KC_NO),
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
ALT_T(KC_APP), KC_LGUI,
KC_HOME,
KC_SPC,KC_ENT ,KC_END,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
TG(SYMB), DE_V, DE_G, DE_C, DE_L, DE_SS, DE_Z,
DE_D, DE_T, DE_R, DE_N, LT(MDIA, DE_S), GUI_T(KC_F),
MEH_T(KC_NO),KC_B, KC_P, KC_W, KC_M, CTL_T(KC_J), KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
KC_LALT, CTL_T(KC_ESC),
KC_PGUP,
KC_PGDN,KC_TAB, KC_RSFT
),
/* 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 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | |Brwser|
* | | |------| |------| |Back |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[MDIA] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
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;
}
};

@ -0,0 +1,7 @@
# Basic implementation for k.o,y variant of the adnw layout
adnw is a layout optimised for usage with german and english language
k.o,y is a variant of this layout
http://www.adnw.de/index.php?n=Main.SeitlicheNachbaranschl%C3%A4ge
The os must use the de_DE layout

@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = KEYMAP( // layer 0 : default [BASE] = KEYMAP( // layer 0 : default
// left hand // left hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, 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(1), 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_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_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_SPC,KC_BSPC,KC_END, KC_SPC,KC_BSPC,KC_END,
// right hand // right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_LGUI, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_LGUI,
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
// MEDIA AND MOUSE // MEDIA AND MOUSE
KEYMAP( [MDIA] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_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_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,

@ -0,0 +1,8 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "config.h"
#define ONESHOT_TAP_TOGGLE 2
#define ONESHOT_TIMEOUT 3000
#endif

@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* |LShift/(|Z/Ctrl| X | C | V | B | [ | | ] | N | M | , | . |//Ctrl|RShift/)| * |LShift/(|Z/Ctrl| X | C | V | B | [ | | ] | N | M | , | . |//Ctrl|RShift/)|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | - | * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | -/L1 |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | App | LGui | | Alt |Ctrl/Esc| * | App | LGui | | Alt |Ctrl/Esc|
@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TG(SYMB), KC_Y,KC_U, KC_I, KC_O, KC_P, KC_BSLS, TG(SYMB), KC_Y,KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H,ALT_T(KC_J),KC_K, KC_L, LT(MDIA,KC_SCLN),GUI_T(KC_QUOT), KC_H,ALT_T(KC_J),KC_K, KC_L, LT(MDIA,KC_SCLN),GUI_T(KC_QUOT),
MEH_T(KC_RBRC),KC_N,KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), RSFTC, MEH_T(KC_RBRC),KC_N,KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), RSFTC,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_MINS, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, LT(SYMB,KC_MINS),
KC_LALT, CTL_T(KC_ESC), KC_LALT, CTL_T(KC_ESC),
KC_PGUP, KC_PGUP,
KC_PGDN,LT(SYMB, KC_TAB), KC_ENT KC_PGDN,LT(SYMB, KC_TAB), KC_ENT
@ -59,13 +59,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | 1 | 2 | 3 | 4 | | | | | | % | = | @ | | F12 | * | | | | | | | | | | | | | | | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | 5 | 6 | 7 | 8 | 9 |------| |------| & | _ | - | ; | + | | * | | 1 | 2 | 3 | 4 | 5 |------| |------| & | _ | - | ; | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | ( | ) | [ | ] | 0 | | | | | | ( | ) | | | | * | | 6 | 7 | 8 | 9 | 0 | | | | | | @ | = | % | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | | * | | | |NxtTab|PrvTab| | | | | | |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | | | | | | * | | | | | |
@ -79,19 +79,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[SYMB] = KEYMAP( [SYMB] = KEYMAP(
// left hand // left hand
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_5, KC_6, KC_7, KC_8, KC_9, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5,
KC_TRNS, KC_LPRN,KC_RPRN,KC_LBRC, KC_RBRC, KC_0, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_TRNS, KC_TRNS,KC_TRNS,LCTL(KC_PGUP), LCTL(KC_PGDN), KC_TRNS, KC_TRNS,KC_TRNS,LCTL(KC_PGUP), LCTL(KC_PGDN),
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 // right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRNS, KC_TRNS, KC_PERC,KC_EQL, KC_AT, KC_TRNS, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12,
KC_AMPR, KC_UNDS,KC_MINS, CM_SCLN, KC_PLUS, KC_TRNS, KC_AMPR, KC_UNDS, KC_MINS, CM_SCLN, KC_PLUS, KC_TRNS,
KC_TRNS, KC_PIPE, KC_LPRN,KC_RPRN, KC_3, KC_TRNS, KC_TRNS, KC_TRNS, KC_PIPE, KC_AT, KC_EQL, KC_PERC, KC_TRNS, KC_TRNS,
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS KC_TRNS, KC_TRNS, KC_TRNS
@ -101,13 +101,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | | * | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | * | | PgUp | Home | End | PgDn | |------| |------| | | | | | Play |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | | * | | | | | | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | * | | | | | | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | | | | | | * | | | | | |
@ -120,10 +120,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// MEDIA AND MOUSE // MEDIA AND MOUSE
[MDIA] = KEYMAP( [MDIA] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_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_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_PGUP, KC_HOME, KC_END, KC_PGDN, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@ -140,7 +140,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
const uint16_t PROGMEM fn_actions[] = { const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) [1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Layer 1 (Symbols)
[2] = ACTION_MACRO_TAP(0), // Eric Tang's Famous Macro!
[3] = ACTION_MACRO_TAP(1) // Eric Tang's Famous Macro!
}; };
static uint16_t key_timer; static uint16_t key_timer;
@ -148,32 +150,45 @@ static uint16_t key_timer;
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{ {
switch(id) { switch(id) {
case 0: { case 0:
if (record->event.pressed) { if (record->event.pressed) {
key_timer = timer_read(); // if the key is being pressed, we start the timer. register_mods(MOD_BIT(KC_LSFT));
register_code(KC_LSFT); // we're now holding down Shift. if (record->tap.count && !record->tap.interrupted) {
} else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down"). register_code(KC_9);
if (timer_elapsed(key_timer) < 70) { // the threshhold we pick for counting something as a tap.
register_code(KC_9); // sending 9 while Shift is held down gives us an opening paren
unregister_code(KC_9); // now let's let go of that key
} }
unregister_code(KC_LSFT); // let's release the Shift key now. else {
record->tap.count = 0;
} }
break;
} }
case 1: { else {
if (record->tap.count) {
unregister_code(KC_9);
}
else {
}
unregister_mods(MOD_BIT(KC_LSFT));
}
break;
case 1:
if (record->event.pressed) { if (record->event.pressed) {
key_timer = timer_read(); // Now we're doing the same thing, only for the right shift/close paren key register_mods(MOD_BIT(KC_LSFT));
register_code(KC_RSFT); if (record->tap.count && !record->tap.interrupted) {
} else {
if (timer_elapsed(key_timer) < 70) {
register_code(KC_0); register_code(KC_0);
}
else {
record->tap.count = 0;
}
}
else {
if (record->tap.count) {
unregister_code(KC_0); unregister_code(KC_0);
} }
unregister_code(KC_RSFT); else {
} }
break; unregister_mods(MOD_BIT(KC_LSFT));
} }
break;
} }
return MACRO_NONE; return MACRO_NONE;
}; };

@ -0,0 +1,5 @@
# Having a file like this allows you to override Makefile definitions
# for your own particular keymap
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend

@ -4,6 +4,14 @@ This is my personal layout which I use to test out ideas which may or may not ma
Changelog: Changelog:
## May 8, 2016:
* Makes bottom-right key send minus/underscore when tapped, L1 temporary toggle when held
* Tweaked the positions of the numbers on the symbol layer. Basically, 12345 are now directly under their number-row counterparts in layer 0. You can imagine pulling the number row down to the home row. And 67890 are directly under 12345 - so it's a matter of just adding 5 and going to the next row (1+5 = 6, 2+5 = 7 and so on).
* Tweaks media/nav layer
* Removes mouse control, as I don't use it
* Makes left home row keys PgUp, Home, End, PgDn
## Apr 29, 2016: ## Apr 29, 2016:
* Tweaks the Hyper and Meh key to send brackets when tapped * Tweaks the Hyper and Meh key to send brackets when tapped

@ -5,35 +5,49 @@
#include "action_util.h" #include "action_util.h"
#define BASE 0 // default layer #define BASE 0 // default layer
#define LOCK 1 // shift-lock layer #define SYMB 1 // symbols layer
#define SYMB_SH 2 // symbols shift layer #define MDIA 2 // media layer
#define SYMB_LK 3 // symbols lock layer #define SPEC 3 // special layer
#define SYMB_UN 4 // symbols unlock layer
#define MDIA_SH 5 // media shift layer #define LCaps 10 // left caps-shift key
#define MDIA_LK 6 // media lock layer #define LSymb 11 // left symbol-shift key
#define MDIA_UN 7 // media unlock layer #define LMdia 12 // left media-shift key
#define UNLOCK 8 // clear to base layer #define LSpec 13 // left special-shift key
#define RCaps 14 // right caps-shift key
#define RSymb 15 // right symbol-shift key
#define RMdia 16 // right media-shift key
#define RSpec 17 // right special-shift key
#define MUL 20 // mouse up left
#define MUR 21 // mouse up right
#define MDL 22 // mouse down left
#define MDR 23 // mouse down right
/* /*
* The Ordinary Layout for the Ergodox EZ keyboard, v3.1 * The Ordinary Layout for the Ergodox EZ keyboard, v4
* modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com *
* Modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com
*
* No rights reserved. This software is in the public domain.
* Credit me if you are friendly but if you're a jerk don't bother.
*
* Details: readme.md * Details: readme.md
* https://github.com/nrrkeene/qmk_firmware/tree/master/keyboard/ergodox_ez/keymaps/ordinary * https://github.com/nrrkeene/qmk_firmware/tree/master/keyboard/ergodox_ez/keymaps/ordinary
*/ */
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Base Layer /******* Base Layer ********************************************************************************************************
* *
* ,-----------------------------------------------------. ,-----------------------------------------------------. * ,------------------------------------------------------. ,------------------------------------------------------.
* | LOCK `~ | 1 | 2 | 3 | 4 | 5 | ESC | | - | 6 | 7 | 8 | 9 | 0 | = LOCK | * | Special `~ | 1 | 2 | 3 | 4 | 5 | ESC | | - | 6 | 7 | 8 | 9 | 0 | =+ Special |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * |------------+------+------+------+------+-------------| |------+------+------+------+------+------+------------|
* | Media Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ Media | * | Media Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \| Media |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| * |------------+------+------+------+------+------| | | |------+------+------+------+------+------------|
* | Symbol | A | S | D | F | G |------| |------| H | J | K | L | ; | ' Symbol | * | Symbol | A | S | D | F | G |------| |------| H | J | K | L | ; | '" Symbol |
* |-----------+------+------+------+------+------|Shift | | Tab |------+------+------+------+------+-----------| * |------------+------+------+------+------+------|Shift | | Tab |------+------+------+------+------+------------|
* | LShift | Z | X | C | V | B | -Tab | | | N | M | , | . | / | RShift | * | Capitals | Z | X | C | V | B | -Tab | | | N | M | , | . | / | Capitals |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * `------------+------+------+------+------+-------------' `-------------+------+------+------+------+------------'
* | LCtrl | Meh |Hyper | LAlt | LGui | | RGui | RAlt | Hyper| Meh | RCtrl | * | LCtrl | Meh |Hyper | LAlt | LGui | | RGui | RAlt | Hyper| Meh | RCtrl |
* `-----------------------------------' `-----------------------------------' * `-----------------------------------' `-----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
@ -46,128 +60,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[BASE] = KEYMAP( [BASE] = KEYMAP(
// left hand // left hand
LT(LOCK, KC_GRV) ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC F(LSpec),KC_1,KC_2,KC_3 ,KC_4 ,KC_5 ,KC_ESC
,LT(MDIA_SH, KC_TAB),KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC ,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC
,MO(SYMB_SH) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,M(LSymb) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G
,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB) ,M(LCaps) ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB)
,KC_LCTL ,MEH_T(KC_NO),ALL_T(KC_NO),KC_LALT,KC_LGUI ,KC_LCTL ,KC_MEH ,KC_HYPR,KC_LALT,KC_LGUI
,KC_HOME,KC_END ,KC_HOME,KC_END
,KC_PGUP ,KC_PGUP
,KC_BSPC,KC_DEL ,KC_PGDN ,KC_BSPC,KC_DEL ,KC_PGDN
// right hand // right hand
,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,LT(LOCK, KC_EQL) ,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RSpec)
,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,LT(MDIA_SH, KC_BSLS) ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,F(RMdia)
,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,LT(SYMB_SH, KC_QUOT) ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,F(RSymb)
,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,KC_RSFT ,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,M(RCaps)
,KC_RGUI,KC_RALT,ALL_T(KC_NO),MEH_T(KC_NO),KC_RCTL ,KC_RGUI,KC_RALT,KC_HYPR ,KC_MEH ,KC_RCTL
,KC_LEFT ,KC_RGHT ,KC_LEFT ,KC_RGHT
,KC_UP ,KC_UP
,KC_DOWN ,KC_ENT ,KC_SPC ,KC_DOWN ,KC_ENT ,KC_SPC
), ),
/* Keymap 1: Layer Lock Keys /******* Symbols Layer *****************************************************************************************************
*
* ,-------------------------------------------------------. ,-------------------------------------------------------.
* | | Esc | | | | | | | | | | | | Bspc | |
* |-------------+------+------+------+------+-------------| |------+------+------+------+------+------+-------------|
* | Media LOCK | | | | | | | | | | | | | | Media LOCK |
* |-------------+------+------+------+------+------| | | |------+------+------+------+------+-------------|
* | Symbol LOCK | | | | | |------| |------| | | | | | Symbol LOCK |
* |-------------+------+------+------+------+------| | | |------+------+------+------+------+-------------|
* | Caps LOCK | | | | | | | | | | | | | | Caps LOCK |
* `-------------+------+------+------+------+-------------' `-------------+------+------+------+------+-------------'
* | | | | | | | | | | | |
* `------------------------------------' `------------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[LOCK] = KEYMAP(
// left hand
KC_TRNS ,KC_ESC ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_FN3 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_FN2 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_CAPS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS
,KC_TRNS
,KC_TRNS,KC_TRNS ,KC_TRNS
// right hand
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_BSPC ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_FN3
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_FN2
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_CAPS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS
,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS
),
/* Keymap 2: Symbol Shift Layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | LOCK | F1 | F2 | F3 | F4 | F5 | | | - | F6 | F7 | F8 | F9 | F10 | LOCK |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | Media | ! | @ | { | } | & | < | | > | | | 7 | 8 | 9 | / | Media |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | Symbol | # | $ | ( | ) | ` |------| |------| / | 4 | 5 | 6 | * | Symbol |
* |-----------+------+------+------+------+------| Tab | | Shift|------+------+------+------+------+-----------|
* | LShift | % | ^ | [ | ] | ~ | | | -Tab| \ | 1 | 2 | 3 | - | RShift |
* `-----------+------+------+------+------+-------------' `------------+------+------+------+------+------------'
* | | | | | | | 0 | . | = | + | Entr |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Left | Right| | Home | End |
* ,------|------|------| |------+------+------.
* | | | Up | | PgUp | | |
* |Space |Enter |------| |------|BackSp| Del |
* | | | Down | | PgDn | | |
* `--------------------' `--------------------'
*/
[SYMB_SH] = KEYMAP(
// left hand
KC_FN2 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_TRNS
,MO(MDIA_SH) ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM)
,MO(SYMB_SH) ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV
,KC_LSFT ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_LEFT ,KC_RGHT
,KC_UP
,KC_SPC ,KC_ENT ,KC_DOWN
// right hand
,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_FN2
,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,MO(MDIA_SH)
,KC_SLSH ,KC_4 ,KC_5 ,KC_6 ,KC_ASTR ,MO(SYMB_SH)
,LSFT(KC_TAB),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_RSFT
,GUI_T(KC_0),ALT_T(KC_DOT),ALL_T(KC_EQL),MEH_T(KC_PLUS),CTL_T(KC_ENT)
,KC_HOME ,KC_END
,KC_PGUP
,KC_PGDN ,KC_BSPC ,KC_DEL
),
/* Keymap 3: Symbol Lock Layer
* *
* ,-----------------------------------------------------. ,-----------------------------------------------------. * ,-----------------------------------------------------. ,-----------------------------------------------------.
* | LOCK | F1 | F2 | F3 | F4 | F5 | | | - | F6 | F7 | F8 | F9 | F10 | LOCK | * | | F1 | F2 | F3 | F4 | F5 | Esc | | - | F6 | F7 | F8 | F9 | F10 | |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | Media | ! | @ | { | } | & | < | | > | | | 7 | 8 | 9 | / | Media | * | | ! | @ | { | } | & | < | | > | | | 7 | 8 | 9 | / | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | Symbol | # | $ | ( | ) | ` |------| |------| / | 4 | 5 | 6 | * | Symbol | * | | # | $ | ( | ) | ` |------| |------| / | 4 | 5 | 6 | * | |
* |-----------+------+------+------+------+------| Tab | | Shift|------+------+------+------+------+-----------| * |-----------+------+------+------+------+------| Tab | | Shift|------+------+------+------+------+-----------|
* | LShift | % | ^ | [ | ] | ~ | | | -Tab| \ | 1 | 2 | 3 | - | RShift | * | | % | ^ | [ | ] | ~ | | | -Tab| \ | 1 | 2 | 3 | - | |
* `-----------+------+------+------+------+-------------' `------------+------+------+------+------+------------' * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | | | | | | 0 | . | = | + | Entr | * | LCtrl | Meh |Hyper | LAlt | LGui | |RGui/0|RAlt/.|Hypr/=|Meh/+ |RCtrl/Ent|
* `----------------------------------' `----------------------------------' * `-----------------------------------' `-------------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | Left | Right| | Home | End | * | Left | Right| | Home | End |
* ,------|------|------| |------+------+------. * ,------|------|------| |------+------+------.
@ -176,82 +100,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | Down | | PgDn | | | * | | | Down | | PgDn | | |
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
[SYMB_LK] = KEYMAP( [SYMB] = KEYMAP(
// left hand // left hand
MO(SYMB_UN) ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_TRNS KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_ESC
,MO(MDIA_SH) ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM) ,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM)
,MO(UNLOCK) ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV ,KC_TRNS ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV
,KC_LSFT ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB ,KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_LCTL ,KC_MEH ,KC_HYPR,KC_LALT ,KC_LGUI
,KC_LEFT ,KC_RGHT ,KC_LEFT ,KC_RGHT
,KC_UP ,KC_UP
,KC_SPC ,KC_ENT ,KC_DOWN ,KC_SPC ,KC_ENT ,KC_DOWN
// right hand // right hand
,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,MO(SYMB_UN) ,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS
,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,MO(MDIA_SH) ,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,KC_TRNS
,KC_SLSH ,KC_4 ,KC_5 ,KC_6 ,KC_ASTR ,MO(UNLOCK) ,KC_SLSH ,KC_4 ,KC_5 ,KC_6 ,KC_ASTR ,KC_TRNS
,LSFT(KC_TAB),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_RSFT ,LSFT(KC_TAB),KC_BSLS ,KC_1 ,KC_2 ,KC_3 ,KC_MINS ,KC_TRNS
,GUI_T(KC_0),ALT_T(KC_DOT),ALL_T(KC_EQL),MEH_T(KC_PLUS),CTL_T(KC_ENT) ,GUI_T(KC_0),ALT_T(KC_DOT),ALL_T(KC_EQL),MEH_T(KC_PLUS),CTL_T(KC_ENT)
,KC_HOME ,KC_END ,KC_HOME ,KC_END
,KC_PGUP ,KC_PGUP
,KC_PGDN ,KC_BSPC ,KC_DEL ,KC_PGDN ,KC_BSPC ,KC_DEL
),
/* Keymap 4: Symbol Unlock Layer
*
* ,------------------------------------------------------. ,------------------------------------------------------.
* | | Esc | | | | | | | | | | | | Bspc | |
* |------------+------+------+------+------+-------------| |------+------+------+------+------+------+------------|
* | Media LOCK | | | | | | | | | | | | | | Media LOCK |
* |------------+------+------+------+------+------| | | |------+------+------+------+------+------------|
* | UNLOCK | | | | | |------| |------| | | | | | UNLOCK |
* |------------+------+------+------+------+------| | | |------+------+------+------+------+------------|
* | Caps LOCK | | | | | | | | | | | | | | Caps LOCK |
* `------------+------+------+------+------+-------------' `-------------+------+------+------+------+------------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[SYMB_UN] = KEYMAP(
// left hand
KC_TRNS ,KC_ESC ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,TG(MDIA_LK) ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_FN1 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_CAPS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS
,KC_TRNS
,KC_TRNS,KC_TRNS ,KC_TRNS
// right hand
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_BSPC ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,TG(MDIA_LK)
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_FN1
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_CAPS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS
,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS
), ),
/* Keymap 5: Media Shift Layer /******* Media Layer *******************************************************************************************************
* *
* ,-----------------------------------------------------. ,-----------------------------------------------------. * ,---------------------------------------------------------------. ,---------------------------------------------------------------.
* | LOCK | F11 | F12 | F13 | F14 | F15 | | | | F16 | F17 | F18 | F19 | F20 | LOCK | * | | F11 | F12 | F13 | F14 | F15 | Esc | | | F16 | F17 | F18 | F19 | F20 | |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * |------+---------+---------+---------+---------+----------------| |------+---------+---------+---------+---------+---------+------|
* | Media |ShutDn|LClick| MsUp |RClick|Vol Up|ScrlUp| |ScrlUp|PrtScr| Home | Up | PgUp | Mail | Media | * | |Shut Down|MouseUpLf|Mouse Up |MouseUpRg|Volume Up|Scroll| |Scroll|PrintScrn| Home | Up | PgUp | Mail | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| * |------+---------+---------+---------+---------+---------| Up | | Up |---------+---------+---------+---------+---------+------|
* | Symbol | Sleep|MsLeft|MsDown|MsRght|Vol Dn|------| |------|NumLok| Left | Down | Right|MyComp| Symbol | * | | Sleep |MouseLeft|MouseDown|MouseRght|Volume Dn|------| |------| Num Lock| Left | Down | Right | MyComp | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| * |------+---------+---------+---------+---------+---------|Scroll| |Scroll|---------+---------+---------+---------+---------+------|
* | LShift | | |MsDown| | Mute |ScrlDn| |ScrlDn| | End | Down | PgDn | | RShift | * | | |MouseDnLf|MouseDown|MouseDnRg| Mute | Down | | Down | | End | Down | PgDn | | |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * `------+---------+---------+---------+---------+----------------' `----------------+---------+---------+---------+---------+------'
* | LCtrl| Meh |Hyper | LAlt | LGui | |Insert|Delete| Hyper| LAlt | LGui | * |LCtrl| Meh | MClick | LClick | R Click| |Cmd/Insrt|Optn/Del | Hyper | Meh |RCtrl|
* `----------------------------------' `----------------------------------' * `---------------------------------------------' `---------------------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | Stop |Refrsh| | Prev | Next | * | Stop |Refrsh| | Prev | Next |
* ,------|------|------| |------+------+------. * ,------|------|------| |------+------+------.
@ -260,124 +142,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | Home | |VolDn | | Pause| * | | | Home | |VolDn | | Pause|
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
[MDIA_SH] = KEYMAP( [MDIA] = KEYMAP(
// left hand // left hand
KC_FN3 ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,KC_NO KC_TRNS ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,KC_ESC
,MO(MDIA_SH) ,KC_POWER ,KC_BTN1 ,KC_MS_U ,KC_BTN2 ,KC_VOLU ,KC_WH_U ,KC_TRNS ,KC_POWER ,M(MUL) ,KC_MS_U ,M(MUR) ,KC_VOLU ,KC_WH_U
,MO(SYMB_SH) ,KC_SLEP ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_VOLD ,KC_TRNS ,KC_SLEP ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_VOLD
,KC_LSFT ,KC_NO ,KC_NO ,KC_MS_D ,KC_NO ,KC_MUTE ,KC_WH_D ,KC_TRNS ,KC_NO ,M(MDL) ,KC_MS_D ,M(MDR) ,KC_MUTE ,KC_WH_D
,KC_LCTL ,MEH_T(KC_NO),ALL_T(KC_NO),KC_LALT,KC_LGUI ,KC_LCTL ,KC_MEH ,KC_BTN3 ,KC_BTN1 ,KC_BTN2
,KC_WSTP ,KC_WREF ,KC_WSTP ,KC_WREF
,KC_WSCH ,KC_WSCH
,KC_WBAK ,KC_NO ,KC_WHOM ,KC_WBAK ,KC_NO ,KC_WHOM
// right hand // right hand
,KC_NO ,KC_F16 ,KC_F17 ,KC_F18 ,KC_F19 ,KC_F20 ,KC_FN3 ,KC_NO ,KC_F16 ,KC_F17 ,KC_F18 ,KC_F19 ,KC_F20 ,KC_TRNS
,KC_WH_U ,KC_PSCR ,KC_HOME,KC_UP ,KC_PGUP ,KC_MAIL ,MO(MDIA_SH) ,KC_WH_U ,KC_PSCR ,KC_HOME ,KC_UP ,KC_PGUP ,KC_MAIL ,KC_TRNS
,KC_NLCK ,KC_LEFT,KC_DOWN ,KC_RIGHT,KC_MYCM ,MO(SYMB_SH) ,KC_NLCK ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_MYCM ,KC_TRNS
,KC_WH_D ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_RSFT ,KC_WH_D ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_TRNS
,GUI_T(KC_INS),ALT_T(KC_DEL),ALL_T(KC_NO),MEH_T(KC_NO),KC_RCTL ,GUI_T(KC_INS),ALT_T(KC_DEL),KC_HYPR ,KC_MEH ,KC_RCTL
,KC_MPRV ,KC_MNXT ,KC_MPRV ,KC_MNXT
,KC_VOLU ,KC_VOLU
,KC_VOLD ,KC_MSTP ,KC_MPLY ,KC_VOLD ,KC_MSTP ,KC_MPLY
), ),
/* Keymap 6: Media Lock Layer /******* Special Layer *****************************************************************************************************
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | LOCK | F11 | F12 | F13 | F14 | F15 | | | | F16 | F17 | F18 | F19 | F20 | LOCK |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | Media |ShutDn|LClick| MsUp |RClick|Vol Up|ScrlUp| |ScrlUp|PrtScr| Home | Up | PgUp | Mail | Media |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | | Sleep|MsLeft|MsDown|MsRght|Vol Dn|------| |------|NumLok| Left | Down | Right|MyComp| |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | LShift | | |MsDown| | Mute |ScrlDn| |ScrlDn| | End | Down | PgDn | | RShift |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | LCtrl| Meh |Hyper | LAlt | LGui | |Insert|Delete| Hyper| LAlt | LGui |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Stop |Refrsh| | Prev | Next |
* ,------|------|------| |------+------+------.
* |Brwser|Brwser|Search| |VolUp | | |
* |Back | Fwd |------| |------| Stop | Play-|
* | | | Home | |VolDn | | Pause|
* `--------------------' `--------------------'
*/
[MDIA_LK] = KEYMAP(
// left hand
MO(MDIA_UN),KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,KC_NO
,MO(UNLOCK) ,KC_POWER ,KC_BTN1 ,KC_MS_U ,KC_BTN2 ,KC_VOLU ,KC_WH_U
,KC_NO ,KC_SLEP ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_VOLD
,KC_LSFT ,KC_NO ,KC_NO ,KC_MS_D ,KC_NO ,KC_MUTE ,KC_WH_D
,KC_LCTL ,MEH_T(KC_NO),ALL_T(KC_NO),KC_LALT,KC_LGUI
,KC_WSTP ,KC_WREF
,KC_WSCH
,KC_WBAK ,KC_NO ,KC_WHOM
// right hand
,KC_NO ,KC_F16 ,KC_F17 ,KC_F18 ,KC_F19 ,KC_F20 ,MO(MDIA_UN)
,KC_WH_U ,KC_PSCR ,KC_HOME,KC_UP ,KC_PGUP ,KC_MAIL ,MO(UNLOCK)
,KC_NLCK ,KC_LEFT,KC_DOWN ,KC_RIGHT,KC_MYCM ,KC_NO
,KC_WH_D ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_RSFT
,GUI_T(KC_INS),ALT_T(KC_DEL),ALL_T(KC_NO),MEH_T(KC_NO),KC_RCTL
,KC_MPRV ,KC_MNXT
,KC_VOLU
,KC_VOLD ,KC_MSTP ,KC_MPLY
),
/* Keymap 7: Media Unlock Layer
* *
* ,-----------------------------------------------------. ,-----------------------------------------------------. * ,-----------------------------------------------------. ,-----------------------------------------------------.
* | | Esc | | | | | | | | | | | | Bspc | | * | | Esc | | | | | | | | | | | | Bspc | |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | UNLOCK | | | | | | | | | | | | | | UNLOCK |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | | | | | | |------| |------| | | | | | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | Caps LOCK | | | | | | | | | | | | | | Caps LOCK |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[MDIA_UN] = KEYMAP(
// left hand
KC_TRNS ,KC_ESC ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_FN1 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_CAPS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS
,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS
// right hand
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_BSPC ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_FN1
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_CAPS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS
,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS
),
/* Keymap 8: Unlock Layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | UNLOCK | | | | | | | | | | | | | | UNLOCK |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | | | | | | |------| |------| | | | | | | * | | | | | | |------| |------| | | | | | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | RShift |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | | | | | | | | | | | * | | | | | | | | | | | |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
@ -389,9 +184,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | * | | | | | | | |
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
[UNLOCK] = KEYMAP( [SPEC] = KEYMAP(
// left hand // left hand
KC_FN1 ,KC_ESC ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS KC_TRNS ,KC_ESC ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
@ -399,13 +194,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
,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 // right hand
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_FN1 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_BSPC ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_RSFT
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
@ -415,23 +209,216 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
const uint16_t PROGMEM fn_actions[] = { const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_CLEAR(ON_PRESS) // FN1 - clear to base layer // the faux shift keys are implemented as macro taps
,[2] = ACTION_LAYER_INVERT(SYMB_LK, ON_PRESS) // FN2 - toggle to Symbols on press [LCaps] = ACTION_MACRO_TAP(LCaps)
,[3] = ACTION_LAYER_INVERT(MDIA_LK, ON_PRESS) // FN3 - toggle to Media on press ,[LSymb] = ACTION_MACRO_TAP(LSymb)
,[LMdia] = ACTION_MACRO_TAP(LMdia)
,[LSpec] = ACTION_MACRO_TAP(LSpec)
,[RCaps] = ACTION_MACRO_TAP(RCaps)
,[RSymb] = ACTION_MACRO_TAP(RSymb)
,[RMdia] = ACTION_MACRO_TAP(RMdia)
,[RSpec] = ACTION_MACRO_TAP(RSpec)
}; };
uint16_t caps_shift = 0;
uint16_t symb_shift = 0;
uint16_t mdia_shift = 0;
bool symb_lock = false;
bool mdia_lock = false;
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{ {
// MACRODOWN only works in this function
switch(id) { switch(id) {
case 0: // There are two shift keys for each layer so we increment a layer_shift var when one
// is pressed and decrement when one is released. If both are pressed at the same time
// then the layer is locked (or unlocked). The shift counts are bound between 0 and 2
// only because sometimes rapid pressing led to irregular events; this way the states
// are self healing during use.
case LCaps: // both caps-shift keys trigger Left Shift
case RCaps: // so they don't interfere with the magic combo
if (record->event.pressed && !record->tap.count) {
if(++caps_shift > 2) caps_shift = 2;
if(caps_shift == 2) {
register_code(KC_CAPS);
unregister_code(KC_CAPS);
} else if(caps_shift == 1) {
register_code(KC_LSFT);
}
} else {
if(--caps_shift < 0) caps_shift = 0;
if(caps_shift == 0) unregister_code(KC_LSFT);
}
break;
case LSymb:
if (record->event.pressed) {
if(++symb_shift > 2) symb_shift = 2;
if(symb_shift == 2) {
symb_lock = !symb_lock;
} else if(symb_shift == 1) {
layer_on(SYMB);
}
} else {
if(--symb_shift < 0) symb_shift = 0;
if((symb_shift == 0) && (!symb_lock)) layer_off(SYMB);
}
break;
case LMdia:
if (record->event.pressed) {
if (record->tap.count && (!mdia_shift) && (!mdia_lock)) {
register_code(KC_TAB);
} else {
if(++mdia_shift > 2) mdia_shift = 2;
if(mdia_shift == 2) {
mdia_lock = !mdia_lock;
} else if(mdia_shift == 1) {
layer_on(MDIA);
}
}
} else {
if(record->tap.count && (!mdia_shift) && (!mdia_lock)) {
unregister_code(KC_TAB);
} else {
if(--mdia_shift < 0) mdia_shift = 0;
if((!mdia_shift) && (!mdia_lock)) layer_off(MDIA);
}
}
break;
case LSpec:
if (record->event.pressed) { if (record->event.pressed) {
register_code(KC_RSFT); if (record->tap.count && !record->tap.interrupted) {
register_code(KC_GRV);
} else { } else {
unregister_code(KC_RSFT); layer_on(SPEC);
}
} else {
if(record->tap.count && !record->tap.interrupted) {
unregister_code(KC_GRV);
} else {
layer_off(SPEC);
}
} }
break; break;
case RSymb:
if (record->event.pressed) {
if (record->tap.count && (!symb_shift) && (!symb_lock)) {
register_code(KC_QUOT);
} else {
if(++symb_shift > 2) symb_shift = 2;
if(symb_shift == 2) {
symb_lock = !symb_lock;
} else if(symb_shift == 1) {
layer_on(SYMB);
}
}
} else {
if(record->tap.count && symb_shift == 0) {
unregister_code(KC_QUOT);
} else {
if(--symb_shift < 0) symb_shift = 0;
if((!symb_shift) && (!symb_lock)) layer_off(SYMB);
} }
}
break;
case RMdia:
if (record->event.pressed) {
if (record->tap.count && (!mdia_shift) && (!mdia_lock)) {
register_code(KC_BSLS);
} else {
if(++mdia_shift > 2) mdia_shift = 2;
if(mdia_shift == 2) {
mdia_lock = !mdia_lock;
} else if(mdia_shift == 1) {
layer_on(MDIA);
}
}
} else {
if(record->tap.count && (!mdia_shift) && (!mdia_lock)) {
unregister_code(KC_BSLS);
} else {
if(--mdia_shift < 0) mdia_shift = 0;
if((!mdia_shift) && (!mdia_lock)) layer_off(MDIA);
}
}
break;
case RSpec:
if (record->event.pressed) {
if (record->tap.count && !record->tap.interrupted) {
register_code(KC_EQL);
} else {
layer_on(SPEC);
}
} else {
if(record->tap.count && !record->tap.interrupted) {
unregister_code(KC_EQL);
} else {
layer_off(SPEC);
}
}
break;
// mouse diagonals
case MUL: // mouse up left
if (record->event.pressed) {
mousekey_on(KC_MS_UP);
mousekey_on(KC_MS_LEFT);
mousekey_send();
} else {
mousekey_off(KC_MS_UP);
mousekey_off(KC_MS_LEFT);
mousekey_send();
}
break;
case MUR: // mouse up right
if (record->event.pressed) {
mousekey_on(KC_MS_UP);
mousekey_on(KC_MS_RIGHT);
mousekey_send();
} else {
mousekey_off(KC_MS_UP);
mousekey_off(KC_MS_RIGHT);
mousekey_send();
}
break;
case MDL: // mouse down left
if (record->event.pressed) {
mousekey_on(KC_MS_DOWN);
mousekey_on(KC_MS_LEFT);
mousekey_send();
} else {
mousekey_off(KC_MS_DOWN);
mousekey_off(KC_MS_LEFT);
mousekey_send();
}
break;
case MDR: // mouse down right
if (record->event.pressed) {
mousekey_on(KC_MS_DOWN);
mousekey_on(KC_MS_RIGHT);
mousekey_send();
} else {
mousekey_off(KC_MS_DOWN);
mousekey_off(KC_MS_RIGHT);
mousekey_send();
}
break;
default:
// none
break;
}
return MACRO_NONE; return MACRO_NONE;
}; };
@ -442,31 +429,22 @@ void matrix_init_user(void) {
// Runs constantly in the background, in a loop. // Runs constantly in the background, in a loop.
void matrix_scan_user(void) { void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
// shift or caps lock turns on red light // shift or caps lock turns on red light
if((keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) || (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK))) { if(caps_shift || (keyboard_report->mods & MOD_BIT(KC_RSFT)) || (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK))) {
ergodox_right_led_1_on(); ergodox_right_led_1_on();
} else { } else {
ergodox_right_led_1_off(); ergodox_right_led_1_off();
} }
// do not change lights while locking and unlocking // Symbol layer turns on green light
if(layer == LOCK || layer == SYMB_UN || layer == MDIA_UN || layer == UNLOCK) { if(layer_state & (1UL<<SYMB)) {
return;
}
//ergodox_board_led_off();
// symbol turns on green light
if(layer == SYMB_SH || layer == SYMB_LK) {
ergodox_right_led_2_on(); ergodox_right_led_2_on();
} else { } else {
ergodox_right_led_2_off(); ergodox_right_led_2_off();
} }
// media turns on blue light // Media layer turns on blue light
if(layer == MDIA_SH || layer == MDIA_LK) { if(layer_state & (1UL<<MDIA)) {
ergodox_right_led_3_on(); ergodox_right_led_3_on();
} else { } else {
ergodox_right_led_3_off(); ergodox_right_led_3_off();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 97 KiB

@ -1,7 +1,7 @@
[{x:3.5},"#\n3",{x:10.5},"*\n8"], [{x:3.5},"#\n3",{x:10.5},"*\n8"],
[{y:-0.875,x:2.5},"@\n2",{x:1},"$\n4",{x:8.5},"&\n7",{x:1},"(\n9"], [{y:-0.875,x:2.5},"@\n2",{x:1},"$\n4",{x:8.5},"&\n7",{x:1},"(\n9"],
[{y:-0.875,x:5.5},"%\n5",{c:"#ff4444"},"Esc",{x:4.5,c:"#cccccc"},"_\n\n\n\n\n\n-","^\n6"], [{y:-0.875,x:5.5},"%\n5",{c:"#ff4444"},"Esc",{x:4.5,c:"#cccccc"},"_\n\n\n\n\n\n-","^\n6"],
[{y:-0.875,c:"#2277ff",w:1.5},"Shift\n\n~\n\n\n\nLock\n`",{c:"#cccccc"},"!\n1",{x:14.5},")\n0",{c:"#2277ff",w:1.5},"+\n\nShift\n\n\n\n=\nLock"], [{y:-0.875,c:"#2277ff",w:1.5},"Special\n\n~\n\n\n\nShift\n`",{c:"#cccccc"},"!\n1",{x:14.5},")\n0",{c:"#2277ff",w:1.5},"+\n\nSpecial\n\n\n\n=\nShift"],
[{y:-0.375,x:3.5,c:"#cccccc"},"E",{x:10.5},"I"], [{y:-0.375,x:3.5,c:"#cccccc"},"E",{x:10.5},"I"],
[{y:-0.875,x:2.5},"W",{x:1},"R",{x:8.5},"U",{x:1},"O"], [{y:-0.875,x:2.5},"W",{x:1},"R",{x:8.5},"U",{x:1},"O"],
[{y:-0.875,x:5.5},"T",{h:1.5},"{\n\n\n\n\n\n[",{x:4.5,h:1.5},"}\n\n\n\n\n\n]","Y"], [{y:-0.875,x:5.5},"T",{h:1.5},"{\n\n\n\n\n\n[",{x:4.5,h:1.5},"}\n\n\n\n\n\n]","Y"],
@ -14,7 +14,7 @@
[{y:-0.75,x:3.5,c:"#cccccc"},"C",{x:10.5},"<\n,"], [{y:-0.75,x:3.5,c:"#cccccc"},"C",{x:10.5},"<\n,"],
[{y:-0.875,x:2.5},"X",{x:1},"V",{x:8.5},"M",{x:1},">\n."], [{y:-0.875,x:2.5},"X",{x:1},"V",{x:8.5},"M",{x:1},">\n."],
[{y:-0.875,x:5.5},"B",{x:6.5},"N"], [{y:-0.875,x:5.5},"B",{x:6.5},"N"],
[{y:-0.875,c:"#2277ff",fa:[0,1,0,1,0,0,0],w:1.5},"Capitals\nShift\n\n\n\n\nShift",{c:"#cccccc"},"Z",{x:14.5,f:3},"?\n/",{c:"#2277ff",w:1.5},"\n\nCapitals\nShift\n\n\n\nShift"], [{y:-0.875,c:"#2277ff",w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#cccccc"},"Z",{x:14.5},"?\n/",{c:"#2277ff",w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
[{y:-0.375,x:3.5,c:"#77aaff"},"Option\n\n\nLAlt",{x:10.5},"Option\n\n\nRAlt"], [{y:-0.375,x:3.5,c:"#77aaff"},"Option\n\n\nLAlt",{x:10.5},"Option\n\n\nRAlt"],
[{y:-0.875,x:2.5},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5},"Cmd\n\n\nSuper",{x:1},"Hyper"], [{y:-0.875,x:2.5},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5},"Cmd\n\n\nSuper",{x:1},"Hyper"],
[{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Ctrl\n\n\nRCtrl"], [{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Ctrl\n\n\nRCtrl"],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 121 KiB

@ -1,22 +1,22 @@
[{x:3.5,c:"#99de2a"},"F13",{x:10.5},"F18"], [{x:3.5,c:"#99de2a"},"F13",{x:10.5},"F18"],
[{y:-0.875,x:2.5},"F12",{x:1},"F14",{x:8.5},"F17",{x:1},"F19"], [{y:-0.875,x:2.5},"F12",{x:1},"F14",{x:8.5},"F17",{x:1},"F19"],
[{y:-0.875,x:5.5},"F15",{c:"#ff4444"},"Esc",{x:4.5,c:"#cccccc",a:7},"",{c:"#99de2a",a:4},"F16"], [{y:-0.875,x:5.5},"F15",{c:"#ff4444"},"Esc",{x:4.5,c:"#737373",a:7},"",{c:"#99de2a",a:4},"F16"],
[{y:-0.875,c:"#2277ff",w:1.5},"Shift\n\n\n\n\n\nLock",{c:"#99de2a"},"F11",{x:14.5},"F20",{c:"#2277ff",w:1.5},"\n\nShift\n\n\n\n\nLock"], [{y:-0.875,c:"#2277ff",w:1.5},"Special\n\n\n\n\n\nShift",{c:"#99de2a"},"F11",{x:14.5},"F20",{c:"#2277ff",w:1.5},"\n\nSpecial\n\n\n\n\nShift"],
[{y:-0.375,x:3.5,c:"#ff8500"},"Mouse\n\n\n\n\n\nUp",{x:10.5},"Cursor\n\n\n\n\n\nUp"], [{y:-0.375,x:3.5,c:"#ff8500"},"Mouse\n\n\n\n\n\nUp",{x:10.5},"Cursor\n\n\n\n\n\nUp"],
[{y:-0.875,x:2.5},"Left\n\n\n\n\n\nClick",{x:1},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#ffb063"},"Home",{x:1},"Page\n\n\n\n\n\nUp"], [{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nUpLeft",{x:1},"Mouse\n\n\n\n\n\nUpRgt",{x:8.5,c:"#ffb063"},"Home",{x:1},"Page\n\n\n\n\n\nUp"],
[{y:-0.875,x:5.5,c:"#e6e067"},"Vol\n\n\n\n\n\nUp",{c:"#ffb063",h:1.5},"Scroll\n\n\n\n\n\nUp",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nUp",{c:"#e6e067"},"Print\n\n\n\n\n\nScreen"], [{y:-0.875,x:5.5,c:"#e6e067"},"Vol\n\n\n\n\n\nUp",{c:"#ffb063",h:1.5},"Scroll\n\n\n\n\n\nUp",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nUp",{c:"#e6e067"},"Print\n\n\n\n\n\nScreen"],
[{y:-0.875,c:"#000000",t:"#ff0000",w:1.5},"Media\n\n\n\n\n\nShift",{c:"#e6e067",t:"#000000"},"Shut\n\n\n\n\n\nDown",{x:14.5},"Mail",{c:"#000000",t:"#ff0000",w:1.5},"\n\nMedia\n\n\n\n\nShift"], [{y:-0.875,c:"#000000",t:"#ff0000",w:1.5},"Media\n\n\n\n\n\nShift",{c:"#e6e067",t:"#000000"},"Shut\n\n\n\n\n\nDown",{x:14.5},"Mail",{c:"#000000",t:"#ff0000",w:1.5},"\n\nMedia\n\n\n\n\nShift"],
[{y:-0.375,x:3.5,c:"#ff8500",t:"#000000"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"], [{y:-0.375,x:3.5,c:"#ff8500",t:"#000000"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
[{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nLeft",{x:1},"Mouse\n\n\n\n\n\nRight",{x:8.5},"Cursor\n\n\n\n\n\nLeft",{x:1},"Cursor\n\n\n\n\n\nRight"], [{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nLeft",{x:1},"Mouse\n\n\n\n\n\nRight",{x:8.5},"Cursor\n\n\n\n\n\nLeft",{x:1},"Cursor\n\n\n\n\n\nRight"],
[{y:-0.875,x:5.5,c:"#e6e067"},"Vol\n\n\n\n\n\nDown",{x:6.5},"Num\n\n\n\n\n\nLock"], [{y:-0.875,x:5.5,c:"#e6e067"},"Vol\n\n\n\n\n\nDown",{x:6.5},"Num\n\n\n\n\n\nLock"],
[{y:-0.875,c:"#cccccc",a:7,w:1.5},"",{c:"#e6e067",a:4},"Sleep",{x:14.5},"My\n\n\n\n\n\nComp",{c:"#cccccc",a:7,w:1.5},""], [{y:-0.875,c:"#2277ff",w:1.5},"Symbols\n\n\n\n\n\nShift",{c:"#e6e067"},"Sleep",{x:14.5},"My\n\n\n\n\n\nComp",{c:"#2277ff",w:1.5},"\n\nSymbols\n\n\n\n\nShift"],
[{y:-0.625,x:6.5,c:"#ffb063",a:4,h:1.5},"Scroll\n\n\n\n\n\nDown",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nDown"], [{y:-0.625,x:6.5,c:"#ffb063",h:1.5},"Scroll\n\n\n\n\n\nDown",{x:4.5,h:1.5},"Scroll\n\n\n\n\n\nDown"],
[{y:-0.75,x:3.5,c:"#ff8500"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"], [{y:-0.75,x:3.5,c:"#ff8500"},"Mouse\n\n\n\n\n\nDown",{x:10.5},"Cursor\n\n\n\n\n\nDown"],
[{y:-0.875,x:2.5,c:"#cccccc",a:7},"",{x:1},"",{x:8.5,c:"#ffb063",a:4},"End",{x:1},"Page\n\n\n\n\n\nDown"], [{y:-0.875,x:2.5},"Mouse\n\n\n\n\n\nDnLeft",{x:1},"Mouse\n\n\n\n\n\nDnRgt",{x:8.5,c:"#ffb063"},"End",{x:1},"Page\n\n\n\n\n\nDown"],
[{y:-0.875,x:5.5,c:"#e6e067"},"Mute",{x:6.5,c:"#cccccc",a:7},""], [{y:-0.875,x:5.5,c:"#e6e067"},"Mute",{x:6.5,c:"#737373",a:7},""],
[{y:-0.875,c:"#2277ff",a:4,f2:1,w:1.5},"Capitals\nShift\n\n\n\n\nShift",{c:"#cccccc",a:7},"",{x:14.5},"",{c:"#2277ff",a:4,fa:[0,1,0,1],w:1.5},"\n\nCapitals\nShift\n\n\n\nShift"], [{y:-0.875,c:"#2277ff",a:4,w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#737373",a:7},"",{x:14.5},"",{c:"#2277ff",a:4,w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
[{y:-0.375,x:3.5,c:"#77aaff"},"Option\n\n\nLAlt",{x:10.5,c:"#ffb063"},"Delete\n\n\nOption"], [{y:-0.375,x:3.5,c:"#ff8500"},"Middle\n\n\n\n\n\nClick",{x:10.5,c:"#ffb063",fa:[0,0,0,1]},"Delete\n\n\nOption"],
[{y:-0.875,x:2.5,c:"#77aaff"},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5,c:"#ffb063"},"Insert\n\n\nCmd",{x:1,c:"#77aaff"},"Hyper"], [{y:-0.875,x:2.5,c:"#ff8500"},"Left\n\n\n\n\n\nClick",{x:1},"Right\n\n\n\n\n\nClick",{x:8.5,c:"#ffb063"},"Insert\n\n\nCmd",{x:1,c:"#77aaff"},"Hyper"],
[{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Crtl\n\n\nRCtrl"], [{y:-0.75,x:0.5},"Ctrl\n\n\nLCtrl","Meh",{x:14.5},"Meh","Crtl\n\n\nRCtrl"],
[{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#ccbb00"},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"], [{r:30,rx:6.5,ry:4.25,y:-1,x:1,c:"#ccbb00"},"Stop\n\n\nBrowser","Reload\n\n\nBrowser"],
[{h:2},"< Web\n\n\nBrowser",{h:2},"Web >\n\n\nBrowser","Search\n\n\nBrowser"], [{h:2},"< Web\n\n\nBrowser",{h:2},"Web >\n\n\nBrowser","Search\n\n\nBrowser"],

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

@ -0,0 +1,27 @@
[{x:3.5,a:7},"",{x:10.5},""],
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
[{y:-0.875,x:5.5},"",{c:"#ff4444",a:4},"Esc",{x:4.5,c:"#cccccc",a:7},"",""],
[{y:-0.875,c:"#000000",t:"#ff0000",a:4,w:1.5},"Special\n\n\n\n\n\nShift",{c:"#ff4444",t:"#000000"},"Esc",{x:14.5,c:"#54d6de"},"Back\n\n\n\n\n\nspace",{c:"#000000",t:"#ff0000",w:1.5},"\n\nSpecial\n\n\n\n\nShift"],
[{y:-0.375,x:3.5,c:"#cccccc",t:"#000000",a:7},"",{x:10.5},""],
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
[{y:-0.875,x:5.5},"",{h:1.5},"",{x:4.5,h:1.5},"",""],
[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""],
[{y:-0.375,x:3.5},"",{x:10.5},""],
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
[{y:-0.875,x:5.5},"",{x:6.5},""],
[{y:-0.875,w:1.5},"","",{x:14.5},"",{w:1.5},""],
[{y:-0.625,x:6.5,h:1.5},"",{x:4.5,h:1.5},""],
[{y:-0.75,x:3.5},"",{x:10.5},""],
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
[{y:-0.875,x:5.5},"",{x:6.5},""],
[{y:-0.875,w:1.5},"","",{x:14.5},"",{c:"#2277ff",w:1.5},"RShift"],
[{y:-0.375,x:3.5,c:"#cccccc"},"",{x:10.5},""],
[{y:-0.875,x:2.5},"",{x:1},"",{x:8.5},"",{x:1},""],
[{y:-0.75,x:0.5},"","",{x:14.5},"",""],
[{r:30,rx:6.5,ry:4.25,y:-1,x:1},"",""],
[{h:2},"",{h:2},"",""],
[{x:2},""],
[{r:-30,rx:13,y:-1,x:-3},"",""],
[{x:-3},"",{h:2},"",{h:2},""],
[{x:-3},""]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

@ -1,7 +1,7 @@
[{x:3.5,c:"#99de2a"},"F3",{x:10.5},"F8"], [{x:3.5,c:"#99de2a"},"F3",{x:10.5},"F8"],
[{y:-0.875,x:2.5},"F2",{x:1},"F4",{x:8.5},"F7",{x:1},"F9"], [{y:-0.875,x:2.5},"F2",{x:1},"F4",{x:8.5},"F7",{x:1},"F9"],
[{y:-0.875,x:5.5},"F5",{c:"#ff4444"},"Esc",{x:4.5,c:"#bbddbb"},"_\n\n\n\n\n\n-",{c:"#99de2a"},"F6"], [{y:-0.875,x:5.5},"F5",{c:"#ff4444"},"Esc",{x:4.5,c:"#bbddbb"},"_\n\n\n\n\n\n-",{c:"#99de2a"},"F6"],
[{y:-0.875,c:"#2277ff",w:1.5},"Shift\n\n\n\n\n\nLock",{c:"#99de2a"},"F1",{x:14.5},"F10",{c:"#2277ff",w:1.5},"\n\nShift\n\n\n\n\nLock"], [{y:-0.875,c:"#2277ff",w:1.5},"Special\n\n\n\n\n\nShift",{c:"#99de2a"},"F1",{x:14.5},"F10",{c:"#2277ff",w:1.5},"\n\nSpecial\n\n\n\n\nShift"],
[{y:-0.375,x:3.5,c:"#bbddbb"},"{",{x:10.5,c:"#89b087"},"8"], [{y:-0.375,x:3.5,c:"#bbddbb"},"{",{x:10.5,c:"#89b087"},"8"],
[{y:-0.875,x:2.5,c:"#bbddbb"},"@",{x:1},"}",{x:8.5,c:"#89b087"},"7",{x:1},"9"], [{y:-0.875,x:2.5,c:"#bbddbb"},"@",{x:1},"}",{x:8.5,c:"#89b087"},"7",{x:1},"9"],
[{y:-0.875,x:5.5,c:"#bbddbb"},"&",{h:1.5},"<",{x:4.5,h:1.5},">","|"], [{y:-0.875,x:5.5,c:"#bbddbb"},"&",{h:1.5},"<",{x:4.5,h:1.5},">","|"],
@ -14,7 +14,7 @@
[{y:-0.75,x:3.5,c:"#bbddbb"},"[",{x:10.5,c:"#89b087"},"2"], [{y:-0.75,x:3.5,c:"#bbddbb"},"[",{x:10.5,c:"#89b087"},"2"],
[{y:-0.875,x:2.5,c:"#bbddbb"},"^",{x:1},"]",{x:8.5,c:"#89b087"},"1",{x:1},"3"], [{y:-0.875,x:2.5,c:"#bbddbb"},"^",{x:1},"]",{x:8.5,c:"#89b087"},"1",{x:1},"3"],
[{y:-0.875,x:5.5,c:"#bbddbb"},"~",{x:6.5},"\\"], [{y:-0.875,x:5.5,c:"#bbddbb"},"~",{x:6.5},"\\"],
[{y:-0.875,c:"#2277ff",fa:[0,1,0,1,0,0,1],w:1.5},"Capitals\nShift\n\n\n\n\nShift",{c:"#bbddbb"},"%",{x:14.5,c:"#89b087"},"-",{c:"#2277ff",w:1.5},"\n\nCapitals\nShift\n\n\n\nShift"], [{y:-0.875,c:"#2277ff",w:1.5},"Capitals\n\n\n\n\n\nShift",{c:"#bbddbb"},"%",{x:14.5,c:"#89b087"},"-",{c:"#2277ff",w:1.5},"\n\nCapitals\n\n\n\n\nShift"],
[{y:-0.375,x:3.5,c:"#77aaff"},"Option\n\n\nLAlt",{x:10.5,c:"#89b087"},".\n\n\nOption"], [{y:-0.375,x:3.5,c:"#77aaff"},"Option\n\n\nLAlt",{x:10.5,c:"#89b087"},".\n\n\nOption"],
[{y:-0.875,x:2.5,c:"#77aaff"},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5,c:"#89b087"},"0\n\n\nCmd",{x:1},"=\n\n\nHyper"], [{y:-0.875,x:2.5,c:"#77aaff"},"Hyper",{x:1},"Cmd\n\n\nSuper",{x:8.5,c:"#89b087"},"0\n\n\nCmd",{x:1},"=\n\n\nHyper"],
[{y:-0.75,x:0.5,c:"#77aaff"},"Ctrl\n\n\nLCtrl","Meh",{x:14.5,c:"#89b087"},"+\n\n\nMeh","Enter\n\n\nCtrl"], [{y:-0.75,x:0.5,c:"#77aaff"},"Ctrl\n\n\nLCtrl","Meh",{x:14.5,c:"#89b087"},"+\n\n\nMeh","Enter\n\n\nCtrl"],
@ -22,6 +22,6 @@
[{h:2},"Space",{h:2},"Enter","Up"], [{h:2},"Space",{h:2},"Enter","Up"],
[{x:2},"Down"], [{x:2},"Down"],
[{r:-30,rx:13,y:-1,x:-3},"Home","End"], [{r:-30,rx:13,y:-1,x:-3},"Home","End"],
[{x:-3,f:3},"Page\n\n\n\n\n\nUp",{h:2},"< Del\n\n\nBackspace",{h:2},"Del >\n\n\nDelete"], [{x:-3},"Page\n\n\n\n\n\nUp",{h:2},"< Del\n\n\nBackspace",{h:2},"Del >\n\n\nDelete"],
[{x:-3,f:3},"Page\n\n\n\n\n\nDown"] [{x:-3},"Page\n\n\n\n\n\nDown"]

File diff suppressed because it is too large Load Diff

@ -55,7 +55,7 @@ Finally, consider the turquoise text-nav keys. Here in the Symbols layer, these
* The bright green keys are more F-keys * The bright green keys are more F-keys
* The dark yellow keys signal Web and Audio applications * The dark yellow keys signal Web and Audio applications
* The light yellow keys signal the operating system * The light yellow keys signal the operating system
* The uncolored keys do nothing in case you bump them by accident * The dark gray keys do nothing in case you bump them by accident
![Ordinary media layout](ordinary-media.png) ![Ordinary media layout](ordinary-media.png)
@ -67,14 +67,37 @@ Alas, the yellow keys have at best spotty success with common software. Good luc
## Switching Between Layers ## ## Switching Between Layers ##
The three Shift keys correspond to three logical layers on top of the ever-present base layer, and are represented in the three LEDs on the keyboard: Capitals (red), Symbols (green), Media (blue). The color of a layer illuminates when the layer is active. Shift keys work in the expected way: press them and the keys shift to that layer; release them and the keys shift back to the base layer. The Ordinary Layout also features a Shift Lock key to keep a layer active indefinitely. Hold down the Shift Lock key then press any Shift key to lock to that layer. Or, hold down the Shift key and press the Shift Lock key; it works either way. To revert to the base layer, use the Shift Lock key again in combination with the Shift key. In addition to Symbols and Media there is the Capitals layer which is exactly the same as pressing the shift key. Each layer is accessed by a shift key on each edge of the keyboard and corresponds to one of the three LEDs on the keyboard: Capitals (red), Symbols (green), Media (blue). The color of a layer illuminates when the layer is active.
This layout attempts to treat the Capitals Shift layer the same as the other two Shift layers, but internally they are different which causes some inconsistencies. For instance, it is possible to switch from any layer to any other layer, and to lock to any layer, *except* it is not possible to go from Media to Symbols. You must exit the Media layer before engaging the Symbols layer. Also, the Caps Lock feature must be triggered by first pressing the Shift Lock key then a Capitals Shift key; it doesn't work if you press the Shift key first (instead you get the secondary symbol character associated with the Shift Lock button). Shift buttons work in the expected way: press them and all of the keys switch to that layer; release them and the keys switch back to the base layer. If you press both of a pair of shift keys, the layer will lock on until you press both shift keys again. For instance, the widely and rightly loathed Caps Lock is engaged by pressing both Capitals Shift buttons. All the Shift keys work this way.
## Special Escape & Backspace Sequences ## Multiple layers can be turned on at once. The Capitals layer will affect characters on other layers to capitalize. Other layers, however, don't 'mix': Symbols blankets the base layout; Media blankets Symbols.
In the Ordinary Layout, the most unsatisfying key location is the Escape key which rightly belongs segregated on its own way up on the top left of the keyboard. The Ergodox does not have a physical button in such a location and the nearest one, in the top left corner, is home to the tilde (er, grave) which is commonly found there. The Escape key is important so it features prominently on the other top corner on the left side of the keyboard, and is always there in all layers. Nevertheless, alas, it isn't Ordinary to put the escape in that different corner! ## Special Sequences ##
That tilde key has a second function as the Shift Lock key and that makes possible a special feature. To make this layout as Ordinary as possible, the Escape key can *also* be accessed by pressing Shift Lock then the 1 button right next to it. This easy gesture is a way to partially maintain the ease of flicking your wrist to the left and tapping Escape. This gesture works in all layers. ![Ordinary special layout](ordinary-special.png)
Finally, because the special Escape sequence is so natural and useful, on the top right corner of the Ergodox EZ you can do the same gesture with the 0 key to produce a Backspace. Users of this keyboard and this layout are well advised to learn to use their thumbs for deleting text, but sometimes you are doing other computery things and just want to flick your digits up to the right and press backspace a bunch times. These special sequences should feel unremarkably mundane but might prove to be remarkably useful. ### Escape ###
The One True Location for the Escape key is segregated way up on the top left of the keyboard. The Ergodox does not have a physical button in such a location and the nearest one is home to the tilde (er, grave) which is commonly found there. In the Ordinary layout the Escape key is found on all layers in the prominent location in the corner next to the 5, whnich is easy to remember, and yet it isn't natural for those of us with muscle memory flicking our wrists up and to the left looking for Escape.
The Ordinary layout offers as a consolation prize a Special sequence for Escape: Special Shift + 1. This is natural so you can tap the top left button, then the button next to it and get Escape. This gesture works in all layers.
### Backspace ###
At the top right corner of the Ergodox EZ you can a gesture similar to the special Escape sequence, using the 0 key, to produce a Backspace. Users of this keyboard and this layout are well advised to learn to use their thumbs for deleting text, but sometimes you are doing other computery things and just want to flick your digits up to the right and press backspace a bunch times.
### RShift ###
The Ordinary Layout locks layers by pressing both of a pair of shift keys. This interferes with the QMK firmware magic sequence, which is LShift+RShift. To work around this, both of the Capitals Shift keys produce a *Left Shift* keystroke. If for some reason a person needs *Right Shift* they can find it by pressing a Special Shift key, then the Capitals Shift key on the right side of the keyboard.
****
The Ordinary Layout for the Ergodox EZ keyboard, v4
Modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com
No rights reserved. This software is in the public domain. Credit me if you are friendly but if you're a jerk don't bother.
Details: readme.md
https://github.com/nrrkeene/qmk_firmware/tree/master/keyboard/ergodox_ez/keymaps/ordinary

@ -15,6 +15,15 @@
#include "keymap_extras/keymap_spanish.h" #include "keymap_extras/keymap_spanish.h"
#include "keymap_extras/keymap_bepo.h" #include "keymap_extras/keymap_bepo.h"
/**
* This layout was generated using the ErgodoxLayoutGenerator (ELG). You can download it from https://github.com/sboesebeck/ErgodoxLayoutGenerator/releases
* documentation about it can be found here https://boesebeck.name/2016/04/16/ergodoxlayoutgenerator-documentation/
* Thanks to the team of Erez Zukerman for building the great Ergodox-EZ!
*
* use at own risk!
**/
#define BASE 0 #define BASE 0
#define SYMB 1 #define SYMB 1
#define MDIA 2 #define MDIA 2
@ -23,24 +32,73 @@
#define EGOS 5 #define EGOS 5
#define SMLY_TOG_QUOT 0 #define SMLY_TOG_QUOT 0
#define M_TOGGLE_5 1 #define M_TOGGLE_5 1
#define TGH_NUM 2 #define TGH_NUM 2
#define M_DE_OSX_PLUS_CTRLALT 3 #define M_DE_OSX_PLUS_CTRLALT 3
#define SM_KISS 4 #define SM_KISS 4
#define SM_FROWN 5 #define SM_FROWN 5
#define SM_CRY 6 #define SM_CRY 6
#define SM_SMILE 7 #define SM_SMILE 7
#define SM_SMIRK 8 #define SM_SMIRK 8
#define M_LGUI_SHFT 9 #define M_LGUI_SHFT 9
#define SM_HEART 10 #define SM_HEART 10
#define TOG_HLD_MDIA 11 #define TOG_HLD_MDIA 11
#define SM_LAUGH 12 #define SM_LAUGH 12
#define SM_SAD 13 #define SM_SAD 13
#define M_DE_OSX_CIRC_CTRLCMD 14 #define M_DE_OSX_CIRC_CTRLCMD 14
#define M_MEH_SH_ACUT 15 #define M_MEH_SH_ACUT 15
//Layout keymap.c generated with ErgodoxLayoutGenerator V1.0BETA1 //Layout keymap.c generated with ErgodoxLayoutGenerator V1.0BETA1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/**
* Layer: BASE
* /-------------------//-------------------//-------------------//-------------------//-------------------//-------------------//-------------------/ /-------------------//-------------------//-------------------//-------------------//-------------------//-------------------//-------------------/
* | ESC | 1 | 2 | 3 | 4 | 5 | Hold or toggle | | Hold or toggle | 6 | 7 | 8 | 9 | 0 | ß |
* | | | | | | | Layer NUMB | | Layer MDIA | | | | | | |
* /-------------------//-------------------//-------------------//-------------------//-------------------//-------------------//-------------------/ /-------------------//-------------------//-------------------//-------------------//-------------------//-------------------//-------------------/
* | TAB | Q | W | E | R | T | Cmd | | Cmd | Z | U | I | O | P | Ü |
* | | | | | | | | | | | | | | | |
* /-------------------//-------------------//-------------------//-------------------//-------------------//-------------------/\-------------------\ \-------------------\/-------------------//-------------------//-------------------//-------------------//-------------------//-------------------/
* | Alt | A | S | D | F | G | | H | J | K | L | Ö | Ä |
* | | | | | | | | | | | | | ALT |
* /-------------------//-------------------//-------------------//-------------------//-------------------//-------------------//-------------------/ /-------------------//-------------------//-------------------//-------------------//-------------------//-------------------//-------------------/
* | Shift | Y | X | C | V | B | Alt | | Alt | N | M | , | . | - | Shift |
* | | Ctrl | | | | | | | | | | | | Ctrl | |
* \-------------------\\-------------------\\-------------------\\-------------------\\-------------------\\-------------------\\-------------------\ \-------------------\\-------------------\\-------------------\\-------------------\\-------------------\\-------------------\\-------------------\
*
*
* /-------------------//-------------------//-------------------//-------------------//-------------------/ /-------------------//-------------------//-------------------//-------------------//-------------------/
* | < | LongPress / Type | LongPress / Type | Shift+Ctrl | Type | | # | ACUT | CMD+Shift | ALT+Shift | + |
* | SYMB | DE_OSX_CIRC_CTRLCMD| DE_OSX_PLUS_CTRAlt | | Toggle SMLY | | Meh | Hyper | | | SYMB |
* \-------------------\\-------------------\\-------------------\\-------------------\/-------------------//-------------------/ /-------------------//-------------------/ \-------------------\\-------------------\\-------------------\\-------------------\\-------------------\
* | HOME | END | | LEFT | RIGHT |
* | | | | | |
* \-------------------\/-------------------/ /-------------------/\-------------------\
* | PGUP | | UP |
* | | | |
* /-------------------//-------------------//-------------------/ /-------------------//-------------------//-------------------/
* | BSPC | DEL | PGDN | | DOWN | ENT | SPC |
* | | | | | | | |
* \-------------------\\-------------------\\-------------------\ \-------------------\\-------------------\\-------------------\
*
*
**/
[BASE]=KEYMAP( [BASE]=KEYMAP(
//left half //left half
KC_ESC, DE_OSX_1, DE_OSX_2, DE_OSX_3, DE_OSX_4, DE_OSX_5, M(TGH_NUM), KC_ESC, DE_OSX_1, DE_OSX_2, DE_OSX_3, DE_OSX_4, DE_OSX_5, M(TGH_NUM),
@ -60,6 +118,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LEFT, KC_RIGHT, KC_LEFT, KC_RIGHT,
KC_UP, KC_UP,
KC_DOWN, KC_ENT, KC_SPC), KC_DOWN, KC_ENT, KC_SPC),
/**
* Layer: SYMB
* /-----------//-----------//-----------//-----------//-----------//-----------//-----------/ /-----------//-----------//-----------//-----------//-----------//-----------//-----------/
* | APPLICATION| F1 | F2 | F3 | F4 | F5 | F5 | | F6 | F6 | F7 | F8 | F9 | F10 | F11 |
* | | | | | | | | | | | | | | | |
* /-----------//-----------//-----------//-----------//-----------//-----------//-----------/ /-----------//-----------//-----------//-----------//-----------//-----------//-----------/
* | | < | > | ! | ? | | | | | \ | [ | ] | < | > | ! |
* | | | | | | | | | | | | | | | |
* /-----------//-----------//-----------//-----------//-----------//-----------/\-----------\ \-----------\/-----------//-----------//-----------//-----------//-----------//-----------/
* | | # | $ | \ | / | . | | / | ( | ) | { | } | # |
* | | | | | | | | | | | | | |
* /-----------//-----------//-----------//-----------//-----------//-----------//-----------/ /-----------//-----------//-----------//-----------//-----------//-----------//-----------/
* | | | < | % | | | ~ | | | | | | ~ | | | | |
* | | | | | | | | | | | | | | | |
* \-----------\\-----------\\-----------\\-----------\\-----------\\-----------\\-----------\ \-----------\\-----------\\-----------\\-----------\\-----------\\-----------\\-----------\
*
*
* /-----------//-----------//-----------//-----------//-----------/ /-----------//-----------//-----------//-----------//-----------/
* | | | | | | | ' | DQOT | | Toggle 5 | |
* | | | | | | | | | | | |
* \-----------\\-----------\\-----------\\-----------\/-----------//-----------/ /-----------//-----------/ \-----------\\-----------\\-----------\\-----------\\-----------\
* | | | | F13 | F12 |
* | | | | | |
* \-----------\/-----------/ /-----------/\-----------\
* | | | F14 |
* | | | |
* /-----------//-----------//-----------/ /-----------//-----------//-----------/
* | | DEL | | | F15 | | |
* | | | | | | | |
* \-----------\\-----------\\-----------\ \-----------\\-----------\\-----------\
*
*
**/
[SYMB]=KEYMAP( [SYMB]=KEYMAP(
//left half //left half
KC_APPLICATION, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F5, KC_APPLICATION, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F5,
@ -79,6 +170,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_F13, KC_F12, KC_F13, KC_F12,
KC_F14, KC_F14,
KC_F15, KC_TRNS, KC_TRNS), KC_F15, KC_TRNS, KC_TRNS),
/**
* Layer: MDIA
* /-----//-----//-----//-----//-----//-----//-----/ /-----//-----//-----//-----//-----//-----//-----/
* | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | |
* /-----//-----//-----//-----//-----//-----//-----/ /-----//-----//-----//-----//-----//-----//-----/
* | | | BTN1 | U | BTN2 | U | | | | | | | | | |
* | | | | | | | | | | | | | | | |
* /-----//-----//-----//-----//-----//-----/\-----\ \-----\/-----//-----//-----//-----//-----//-----/
* | | | L | D | R | D | | | | | | | |
* | | | | | | | | | | | | | |
* /-----//-----//-----//-----//-----//-----//-----/ /-----//-----//-----//-----//-----//-----//-----/
* | | | L | D | R | BTN3 | | | | | | | | UP | |
* | | | | | | | | | | | | | | | |
* \-----\\-----\\-----\\-----\\-----\\-----\\-----\ \-----\\-----\\-----\\-----\\-----\\-----\\-----\
*
*
* /-----//-----//-----//-----//-----/ /-----//-----//-----//-----//-----/
* | | | | | | | | | LEFT | DOWN | RIGHT|
* | | | | | | | | | | | |
* \-----\\-----\\-----\\-----\/-----//-----/ /-----//-----/ \-----\\-----\\-----\\-----\\-----\
* | | | | MPRV | MNXT |
* | | | | | |
* \-----\/-----/ /-----/\-----\
* | | | VOLU |
* | | | |
* /-----//-----//-----/ /-----//-----//-----/
* | | | | | VOLD | MUTE | MPLY |
* | | | | | | | |
* \-----\\-----\\-----\ \-----\\-----\\-----\
*
*
**/
[MDIA]=KEYMAP( [MDIA]=KEYMAP(
//left half //left half
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@ -90,14 +214,47 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
//right half //right half
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_VOLD, KC_TRNS, KC_MPRV, KC_MNXT, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_MUTE, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,
KC_TRNS, KC_MPRV, KC_MNXT,
KC_TRNS, KC_TRNS, KC_WBAK), KC_VOLU,
KC_VOLD, KC_MUTE, KC_MPLY),
/**
* Layer: SMLY
* /--------//--------//--------//--------//--------//--------//--------/ /--------//--------//--------//--------//--------//--------//--------/
* | | | | | | | | | Typing | Typing | Typing | | | | |
* | | | | | | | | | SM_SMILE| SM_SMIRK| SM_LAUGH| | | | |
* /--------//--------//--------//--------//--------//--------//--------/ /--------//--------//--------//--------//--------//--------//--------/
* | | | | | | | | | | Typing | Typing | Typing | | | |
* | | | | | | | | | | SM_FROWN| SM_SAD | SM_CRY | | | |
* /--------//--------//--------//--------//--------//--------/\--------\ \--------\/--------//--------//--------//--------//--------//--------/
* | | | | | | | | Typing | Typing | | | | |
* | | | | | | | | SM_HEART| SM_KISS | | | | |
* /--------//--------//--------//--------//--------//--------//--------/ /--------//--------//--------//--------//--------//--------//--------/
* | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | |
* \--------\\--------\\--------\\--------\\--------\\--------\\--------\ \--------\\--------\\--------\\--------\\--------\\--------\\--------\
*
*
* /--------//--------//--------//--------//--------/ /--------//--------//--------//--------//--------/
* | | | | | | | | | | | |
* | | | | | | | | | | | |
* \--------\\--------\\--------\\--------\/--------//--------/ /--------//--------/ \--------\\--------\\--------\\--------\\--------\
* | | | | | |
* | | | | | |
* \--------\/--------/ /--------/\--------\
* | | | |
* | | | |
* /--------//--------//--------/ /--------//--------//--------/
* | | | | | | | |
* | | | | | | | |
* \--------\\--------\\--------\ \--------\\--------\\--------\
*
*
**/
[SMLY]=KEYMAP( [SMLY]=KEYMAP(
//left half //left half
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@ -117,6 +274,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS), KC_TRNS, KC_TRNS, KC_TRNS),
/**
* Layer: NUMB
* /----//----//----//----//----//----//----/ /----//----//----//----//----//----//----/
* | | | | | | | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* | | | | | | | | | | | | | | | |
* /----//----//----//----//----//----//----/ /----//----//----//----//----//----//----/
* | | | | UP | | | | | | / | 7 | 8 | 9 | * | F12 |
* | | | | | | | | | | | | | | | |
* /----//----//----//----//----//----/\----\ \----\/----//----//----//----//----//----/
* | | | LEFT| DOWN| RGHT| | | / | 4 | 5 | 6 | + | - |
* | | | | | | | | | | | | | |
* /----//----//----//----//----//----//----/ /----//----//----//----//----//----//----/
* | | | | | | | | | | % | 1 | 2 | 3 | | |
* | | | | | | | | | | | | | | | |
* \----\\----\\----\\----\\----\\----\\----\ \----\\----\\----\\----\\----\\----\\----\
*
*
* /----//----//----//----//----/ /----//----//----//----//----/
* | | | | | | | 0 | . | , | = | |
* | | | | | | | | | | | |
* \----\\----\\----\\----\/----//----/ /----//----/ \----\\----\\----\\----\\----\
* | | | | | |
* | | | | | |
* \----\/----/ /----/\----\
* | | | |
* | | | |
* /----//----//----/ /----//----//----/
* | | | | | | | |
* | | | | | | | |
* \----\\----\\----\ \----\\----\\----\
*
*
**/
[NUMB]=KEYMAP( [NUMB]=KEYMAP(
//left half //left half
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@ -136,6 +326,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS), KC_TRNS, KC_TRNS, KC_TRNS),
/**
* Layer: EGOS
* /--------//--------//--------//--------//--------//--------//--------/ /--------//--------//--------//--------//--------//--------//--------/
* | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | |
* /--------//--------//--------//--------//--------//--------//--------/ /--------//--------//--------//--------//--------//--------//--------/
* | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | |
* /--------//--------//--------//--------//--------//--------/\--------\ \--------\/--------//--------//--------//--------//--------//--------/
* | Shift | | | | | | | | | | | | |
* | | | | | | | | | | | | | |
* /--------//--------//--------//--------//--------//--------//--------/ /--------//--------//--------//--------//--------//--------//--------/
* | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | |
* \--------\\--------\\--------\\--------\\--------\\--------\\--------\ \--------\\--------\\--------\\--------\\--------\\--------\\--------\
*
*
* /--------//--------//--------//--------//--------/ /--------//--------//--------//--------//--------/
* | Ctrl | | | | | | | | | Toggle 5| |
* | | | | | | | | | | | |
* \--------\\--------\\--------\\--------\/--------//--------/ /--------//--------/ \--------\\--------\\--------\\--------\\--------\
* | F1 | F2 | | | |
* | | | | | |
* \--------\/--------/ /--------/\--------\
* | F3 | | |
* | | | |
* /--------//--------//--------/ /--------//--------//--------/
* | SPC | Ctrl | F4 | | | | |
* | | | | | | | |
* \--------\\--------\\--------\ \--------\\--------\\--------\
*
*
**/
[EGOS]=KEYMAP( [EGOS]=KEYMAP(
//left half //left half
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@ -259,7 +482,7 @@ case M_LGUI_SHFT:
if (record->event.pressed){ if (record->event.pressed){
return MACRO(DOWN(KC_LGUI),DOWN(KC_LSFT),END); return MACRO(DOWN(KC_LGUI),DOWN(KC_LSFT),END);
}else{ }else{
return MACRO(UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),U(LGUI),U(LSFT),END); return MACRO(UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),UP(KC_LGUI),UP(KC_LSFT),U(LGUI),U(LSFT),END);
} }
break; break;

@ -0,0 +1,1247 @@
:100000000C9430040C9474040C9474040C947404D4
:100010000C9474040C9474040C9474040C94740480
:100020000C9474040C9474040C94680F0C943A109F
:100030000C9474040C9474040C9474040C94740460
:100040000C9474040C9404250C9474040C9474049F
:100050000C9474040C94931E0C9474040C94740407
:100060000C9474040C9474040C9474040C94740430
:100070000C9474040C9474040C9474040C94740420
:100080000C9474040C9474040C9474040C94740410
:100090000C9474040C9474040C9474040C94740400
:1000A0000C9474040C9474040C9474048404BE04BE
:1000B000D004F2040A05100516051C0522052805C2
:1000C0002D0533055D05620567057E05A710C9107E
:1000D000B711C910B7110E113111B711861199114D
:1000E00085148514C214C214051543155C175C17DA
:1000F0005C155C175D165D1630175C175C174717AB
:1001000002E002E2012E022E02E10002E002E10220
:10011000E20001E001E101E20002E002E301640229
:10012000640002E002E30001E001E30001E10137C5
:10013000023702E10138023801E10125022502E11E
:100140000001E10137023702E10138023801E10123
:1001500007020702E10001350235012002200002FA
:10016000E302E102E302E102E302E102E302E1026F
:10017000E302E102E302E102E302E102E302E1025F
:10018000E302E102E302E102E302E102E302E1024F
:10019000E302E102E302E102E302E102E302E1023F
:1001A000E302E102E302E102E302E102E302E1022F
:1001B000E302E102E302E102E302E102E302E1021F
:1001C000E302E102E302E102E302E102E302E1020F
:1001D000E302E102E302E102E302E102E302E102FF
:1001E000E302E102E302E102E302E102E302E102EF
:1001F000E302E102E302E10001E301E10001E101C8
:1002000036023602E10138023801E10126022602F7
:10021000E10001E10137023702E10138023801E172
:100220000126022602E10001E10136023602E10167
:1002300038023801E10125022502E10001E1013720
:10024000023702E10138023801E20125022502E20B
:100250000001E10137023702E10138023801E10112
:1002600030023002E10002E002E20130023000021E
:10027000E002E20001E001E20001E10131023102AD
:10028000E10029002B00E200E100358100001E00A2
:10029000140004001D710E304E001F001A001600DD
:1002A0001B0003304C002000080007000600E0029D
:1002B0002A00210015000900190000304B0022001F
:1002C00017000A00050000004A000230E3000000A9
:1002D000E20000004D000B30E7000000E6000000E7
:1002E000500023001C000B00110000004F002400F0
:1002F00018000D0010003177520025000C000E0090
:1003000036002E7F2C00260012000F003700E10877
:1003100028002700130033003871E10451002D003C
:100320002F003474E50030810000650001000100F9
:100330000100010000003A00350031000100010019
:1003400001003B0035022102350001004C003C0059
:100350001E0224062202010001003D002D0224029B
:100360002404010001003E000100370011040000D8
:1003700001003E00010000000100000001003F00FC
:10038000010000000100000068003F002406240274
:10039000240400004500400022042502110431021B
:1003A000690041002304260201001F0201004200EF
:1003B0003500250401000100010043003502260438
:1003C000010001306A0044001E02310001000100FA
:1003D0000000010001000100010001000000010017
:1003E000010001000100010001000100F400F20021
:1003F000FB00010001000100F000F100FA00010023
:1004000001000100F500F300FC0001000100010003
:10041000F900FA00F60000000100010001000000F0
:1004200001000000010001000100000001000000C7
:10043000AC0001000100010001000000AB00010060
:100440000100010001000100A900010001000100FC
:1004500001000100AE000100010001000100500098
:10046000A80001000100010052005100AA00010093
:100470000100010001004F00000001000100010027
:100480000100010000000100010001000100010065
:100490000100010001000100010001000100010054
:1004A0000100010001000100010001000100010044
:1004B0000100010001000100010001000100000035
:1004C00001000100010000000100000001000730F0
:1004D00001000000010000000100083005300A3072
:1004E0000100000001000C300D300430010001005B
:1004F00001000100063001000100010001000100BF
:1005000001000100010001000100010001000100E3
:1005100001000100010001000100010001000100D3
:1005200000000100010001000100010000000100C5
:100530000100010001000100010001000100500064
:100540000100010001000100520051000100010002
:100550000100010001004F00010001000100010045
:100560000100010001000000010001000100000085
:100570000100000001000100010000000100000076
:1005800001003F002402240222020000010040007A
:10059000240021001E002700010041002500220048
:1005A0001F00370001004200260023002000360013
:1005B0000100430030023000010027020100440026
:1005C0004500380001000100000001000100E100C9
:1005D0000100E00000000100010001000100010035
:1005E0003D0001000100010001000100E0000100E8
:1005F00001000100010001002C00010001000100C8
:10060000010001003C0001000100010001000000A8
:100610003A00010001000000010000003B00010061
:1006200001000000010000000100010001000100C4
:1006300001000000010001000100010001000100B3
:1006400001000100010001000100010001000100A2
:100650000100010001000100010001000100010092
:100660000100013001000100010001000100010052
:10067000000016034500720067006F0044006F0021
:100680007800200045005A00000016034500720063
:1006900067006F0044006F007800200045005A009A
:1006A00000000403090409026D00040100A0FA0916
:1006B0000400000103010100092111010001223F92
:1006C000000705810308000A090401000103010273
:1006D00000092111010001224D00070582030800D5
:1006E0000A090402000103000000092111010001B0
:1006F0002236000705830308000A090403000103EA
:1007000000000009211101000122390007058403BE
:100710001000011201100100000008EDFE07130196
:10072000000102000105010906A101050719E029E0
:10073000E7150025019508750181020508190129B1
:10074000059505750191029501750391010507193C
:1007500000297715002501957875018102C00501F2
:100760000980A101850216010026B7001A01002A9E
:10077000B700751095018100C0050C0901A1018524
:1007800003160100269C021A01002A9C027510958E
:10079000018100C005010902A1010901A1000509AB
:1007A000190129051500250195057501810295019D
:1007B000750381010501093009311581257F9502F5
:1007C0007508810609381581257F95017508810610
:1007D000050C0A38021581257F950175088106C030
:1007E000C005010906A101050719E029E715002543
:1007F00001950875018102950175088101050819A7
:100800000129059505750191029501750391010571
:1008100007190029FF150025FF950675088100C0FE
:100820000000000000000000000000010204060AB1
:100830000F17202C3A4A5D71879DB3C7DAE9F5FCA2
:10084000FFFCF5E9DAC7B39D87715D4A3A2C2017A2
:100850000F0A060402010000000000000000000072
:1008600011241FBECFEFDAE0DEBFCDBF04B603FE1A
:1008700024C08091F0019091F101A091F201B0911A
:10088000F3018730904BA740B04BB9F41092F001C0
:100890001092F1011092F2011092F30114BE84B78C
:1008A000877F84BF88E10FB6F89480936000109230
:1008B00060000FBEE0E0FFE3099511E0A0E0B1E0C9
:1008C000E6E9FDE402C005900D92A433B107D9F723
:1008D00011E0A4E3B1E001C01D92A03FB107E1F730
:1008E0000E94AC0C0C94C9260C940000462F50E0DA
:1008F0004031510508F01FC1DC01FA01EA5AFF4FEF
:1009000012968C910C9479268823A9F00E945D1E82
:1009100090933501809334018091B3019091B4019B
:10092000A091B501B091B60128E08227887099277F
:10093000AA27BB27AEC08091B3019091B401A091CA
:10094000B501B091B60128E0822788709927AA27BF
:10095000BB278093B3019093B401A093B501B093EA
:10096000B60180913401909135010E94691E87394A
:1009700091050CF0E0C089E792E00895882309F41E
:10098000DAC08091B3019091B401A091B501B0910A
:10099000B60120E2822780729927AA27BB2779C057
:1009A000882339F00E945D1E9093350180933401B5
:1009B0000AC080913401909135010E94691E8739E7
:1009C00091050CF4B8C08091B3019091B401A0914D
:1009D000B501B091B60120E1822780719927AA273D
:1009E000BB2757C0882349F00E945D1E90933501B4
:1009F0008093340184E792E00895809134019091CE
:100A000035010E94691E873991050CF08EC086E67B
:100A100092E00895882309F48EC081E592E008955C
:100A2000882309F488C08CE392E00895882309F4B0
:100A300082C087E292E00895882309F47CC082E1B5
:100A400092E00895882309F476C08DEF91E008952F
:100A500081116EC08FE591E00895882309F46BC081
:100A600086E591E008958823E9F00E945D1E909349
:100A70003501809334018091B3019091B401A0912C
:100A8000B501B091B60124E0822784709927AA2786
:100A9000BB278093B3019093B401A093B501B093A9
:100AA000B60149C080913401909135010E94691EC0
:100AB000873991050CF43FC0DECF8823E1F181E452
:100AC00091E008958823B9F18CE291E0089588239C
:100AD00049F00E945D1E909335018093340187E2B6
:100AE00091E0089580913401909135010E94691E32
:100AF000873991051CF589E191E00895882349F033
:100B00000E945D1E909335018093340182E191E053
:100B1000089580913401909135010E94691E8739B2
:100B200091057CF480E091E008958FE692E00895CD
:100B300088EF91E0089580E090E0089582E291E0EE
:100B400008958BE091E0089508956091B30170914C
:100B5000B4018091B5019091B6010E94BF1D5698D5
:100B60005E9825982D9826982E9827982F98823051
:100B700061F018F4813031F00895843069F08530E7
:100B800039F00895259A2D9A0895269A2E9A089557
:100B9000259A2D9A269A2E9A279A2F9A08950C9480
:100BA000A50556985E9825982D9826982E982798F2
:100BB0002F988FEF90E09093890080938800909316
:100BC0008B0080938A0090938D0080938C00259AEF
:100BD0002D9A2FEF80E792E0215080409040E1F77E
:100BE00000C00000269A2E9A2FEF80E792E0215055
:100BF00080409040E1F700C00000279A2F9A2FEF25
:100C000080E792E0215080409040E1F700C0000072
:100C100025982D982FEF80E792E02150804090405A
:100C2000E1F700C0000026982E982FEF80E792E0B1
:100C3000215080409040E1F700C0000027982F9895
:100C400056985E9825982D9826982E9827982F9834
:100C5000089589EA8093800089E080938100249838
:100C60002C983F988AB18F748AB96E98479A8BB145
:100C7000806B8BB9769A0E94D1050C94A40580E212
:100C8000809300018091360181110EC00E948E0672
:100C900081E0809336012FEF83ED90E32150804077
:100CA0009040E1F700C0000080E40E949406809329
:100CB000000181112EC00E94BE06809300018111A7
:100CC00028C00E94BE0680930001811122C08FE3DC
:100CD0000E94BE068093000181111BC00E94B606CF
:100CE00080E40E94940680930001811112C08CE080
:100CF0000E94BE068093000181110BC00E94BE06B7
:100D000080930001811105C08FE30E94BE0680938D
:100D100000010E94B6068091000108951092B9006A
:100D20008AE08093B800089594EA9093BC00909173
:100D3000BC0097FFFCCF9091B900987F983021F0CC
:100D4000903111F081E008958093BB0084E8809396
:100D5000BC008091BC0087FFFCCF8091B900887FE8
:100D6000883111F0803471F780E0089584E9809330
:100D7000BC008091BC0084FDFCCF08958093BB0033
:100D800084E88093BC008091BC0087FFFCCF9091E9
:100D9000B900987F81E0983209F480E0089584E8F2
:100DA0008093BC008091BC0087FFFCCF8091BB008A
:100DB000089580910001811115C080E40E9494067D
:100DC0008093000181110CC082E10E94BE068093D5
:100DD0000001811105C08FEF0E94BE0680930001C3
:100DE0000E94B60684B1807F84B985B1807F85B9C1
:100DF0008AB1837F8AB98BB1837F8BB93E9846983D
:100E000008950E943F06809300010E94D90680B396
:100E10008C7080BB81B3836F81BBA8E3B1E0E6E453
:100E2000F1E08EE08E0F11921D928E13FCCF0C9488
:100E30002906BF92CF92DF92EF92FF920F931F93FA
:100E4000CF93DF9380910001882379F0809137015F
:100E50008F5F80933701811108C00E943F06809305
:100E60000001811102C00E94D10508E311E0C0E039
:100E7000D0E0DD24D39482E0C82EEE24E394F12C5C
:100E8000C730D10500F580910001811164C080E474
:100E90000E94940680930001811112C082E10E9499
:100EA000BE068093000181110BC0C7010C2E01C04A
:100EB000880F0A94EAF780950E94BE06809300018D
:100EC0000E94B60648C0CA30A1F028F4C83059F0D4
:100ED000C93061F005C0CC3089F070F0CD3089F0B8
:100EE000209A289810C0219A29980DC0229A2A98F1
:100EF0000AC0239A2B9807C0529A01C0539A5B9854
:100F000002C03E9A469890EA9A95F1F79FB1799976
:100F100002C082E001C080E091709D25982B7C99F1
:100F200002C084E001C080E0892B7D9902C038E0D6
:100F300001C030E0832B7E9902C020E101C020E097
:100F4000822B9FB19095991F9927991F9295990F80
:100F5000907E892B0FC080910001811149C080E4EF
:100F60000E94940680930001882379F1B12C0E949D
:100F7000B6068B2DF8019081981719F08083C092E6
:100F800001010E94D90621960F5F1F4FCE30D10577
:100F900009F076CF80910101882361F1815080931F
:100FA0000101882339F08FE99FE00197F1F700C034
:100FB000000020C0A6E4B1E0E8E3F1E0CF01825FE9
:100FC00091919D938E13FCCF15C083E10E94BE06C4
:100FD000809300018111CACF81E40E94940680931E
:100FE00000018111C3CF0E94CF06B82EB094BFCFAD
:100FF00080E0C0CF0E94CF0581E0DF91CF911F91AB
:101000000F91FF90EF90DF90CF90BF900895E82F61
:10101000F0E0EA5BFE4F808108950895089596E020
:10102000799FF001112494E5899FE00DF11D1124B1
:10103000E60FF11DEE0FFF1FEE57FD4F85919491C6
:101040000895880F991FFC01EE5FFE4F85919491E2
:101050000895880F991FFC01EE57FD4F85919491DB
:1010600008950F931F93CF93DF93EC018115904365
:1010700050F5C11580E2D80708F0B3C0CB3BD105CD
:1010800090F4C83AD10508F05AC0C53AD10508F025
:101090004BC0C430D10508F0BBC1219709F0B5C1E0
:1010A00001E010E0F5C1CF3FD10511F008F0B0C16B
:1010B000C03FD10508F092C0CE01805E910908972B
:1010C00008F4A6C1A2C1C11591E5D907A8F4C230A0
:1010D00020E5D20708F09EC0C11580E5D80709F4C5
:1010E00085C008F091C0C11520E4D20708F08DC179
:1010F000DD278E01106CCCC1C11580E8D80758F4EB
:10110000C11590E7D90708F07CC1C11520E6D207C8
:1011100008F422C17AC1C11580E9D80708F075C169
:10112000DF708E01106AB4C1C53AD10509F472C1ED
:10113000C63AD10509F071C102E810E4A9C1C83A64
:10114000D10509F46DC1C93AD10509F46CC1CA3A97
:10115000D10509F46BC1CB3AD10509F46AC1CC3A87
:10116000D10509F469C1CD3AD10509F468C1C03B84
:10117000D10509F467C1CE3AD10509F466C1CF3A69
:10118000D10509F465C1C13BD10509F464C1C23B75
:10119000D10509F463C1C33BD10509F462C1C43B65
:1011A000D10509F461C1C53BD10509F460C1C63B55
:1011B000D10509F45FC1C73BD10509F45EC1C83B45
:1011C000D10509F45DC1C93BD10509F45CC1CA3B35
:1011D000D10509F45BC100E014E45AC18E01106529
:1011E00057C1CE019F700E94290853C10E948017E9
:1011F0009FEF24E38CE0915020408040E1F700C055
:1012000000000E94B81E44C18091CF01816080938C
:10121000CF013EC10E946120811102C00E9447207F
:101220000E947E2090E09093F0018093EF01C23005
:1012300090E5D90721F48091EF01816086C0C43028
:1012400020E5D20721F48091EF0182607EC0C63094
:1012500080E5D80721F48091EF01846076C0C83022
:1012600090E5D90719F48091EF0127C0CA3020E535
:10127000D20721F48091EF01806167C0CC3080E516
:10128000D80721F48091EF0180625FC0CE3090E5F5
:10129000D90721F48091EF01806457C0C03120E567
:1012A000D20721F48091EF0180684FC0C23180E500
:1012B000D80729F48091EF018460886046C0C3306C
:1012C00090E5D90721F48091EF018E7F3EC0C530B3
:1012D00020E5D20721F48091EF018D7F36C0C73021
:1012E00080E5D80721F48091EF018B7F2EC0C930B3
:1012F00090E5D90719F48091EF0126C0CB3020E5A5
:10130000D20721F48091EF018F7E1FC0CD3080E5A0
:10131000D80721F48091EF018F7D17C0CF3090E581
:10132000D90721F48091EF018F7B0FC0C13120E5F7
:10133000D20721F48091EF018F7707C0C331D045E8
:1013400031F48091EF018B7F877F8093EF01809153
:10135000EF010E9482209CC08D2F99278F709927C2
:1013600081309105D9F49E012370332702C0880F84
:10137000991F2A95E2F79C688E0144E0000F111F27
:101380004A95E1F700271370802B912B53E0CC0F87
:10139000DD1F5A95E1F7C076DD272FC08230910519
:1013A00031F4DC2FCC278E01016F106A71C08330BD
:1013B000910569F4CE018370992701E010E002C025
:1013C000000F111F8A95E2F7C8019C680FC00497AF
:1013D00009F05EC0CE018370992701E010E002C0E1
:1013E000000F111F8A95E2F7C8019A6823E0CC0F1D
:1013F000DD1F2A95E1F7C07ED7708C010C2B1D2BC9
:1014000047C0DF708E01106243C000E010E040C0B2
:101410008E013EC001E810E43BC003E810E438C090
:1014200002EE14E435C009EE14E432C00AEE14E40E
:101430002FC005EB14E42CC006EB14E429C007EB25
:1014400014E426C00CEC14E423C00DEC14E420C01A
:1014500003E815E41DC00AE815E41AC002E915E422
:1014600017C004E915E414C001E216E411C003E258
:1014700016E40EC004E216E40BC005E216E408C050
:1014800006E216E405C007E216E402C00AE216E42A
:10149000C801DF91CF911F910F91089596E0799F38
:1014A000F001112494E5899FE00DF11D1124E60F50
:1014B000F11DEE0FFF1FEE57FD4F85919491803E79
:1014C0009105E0F4803C910558F58133910509F4CC
:1014D0006FC048F48932910509F463C08A329105DE
:1014E00009F46DC072C089339105E9F08238910525
:1014F000D1F08533910509F44DC067C0833E910555
:1015000081F138F4803E9105B9F0823E9105D9F021
:101510005CC0863E910561F1873E9105A1F155C001
:101520000E94210808952091EF0120FD02C021FFB3
:101530004CC080EE90E049C08091EF0180FFF9CF70
:1015400089E390E042C08091EF0182FF0EC080915C
:10155000EF0184FF03C080E090E037C083EE90E0AD
:1015600034C08091EF0182FFF2CF82EE90E02DC077
:101570008091EF0183FF0BC08091EF0184FDEBCFE1
:1015800087EE90E022C08091EF0183FFF5CF86EED9
:1015900090E01BC08091EF0185FF07C089E290E0D9
:1015A00014C08091EF0185FFF9CF85E390E00DC075
:1015B0008091EF0186FF07C08AE290E006C080912B
:1015C000EF0186FFF9CF81E390E00E943108089592
:1015D00008950C94E80A809164010895CF93DF93F5
:1015E00000D01F92CDB7DEB79C018091E601843018
:1015F00019F593E099833B832A839093E9008FEF59
:101600009091E800815095FD06C095ED9A95F1F70F
:1016100000008111F5CF8091E80085FF0DC040E00A
:1016200050E063E070E0CE0101960E94580D809179
:10163000E8008E778093E8000F900F900F90DF9175
:10164000CF910895CF93DF9300D01F92CDB7DEB72F
:101650002091E601243021F522E029839B838A83AF
:1016600083E08093E9008FEF9091E800815095FD31
:1016700006C095ED9A95F1F700008111F5CF8091A4
:10168000E80085FF0DC040E050E063E070E0CE016F
:1016900001960E94580D8091E8008E778093E800B3
:1016A0000F900F900F90DF91CF9108952091E60158
:1016B0002430F1F422E02093E9002FEF3091E8008C
:1016C000215035FD06C035ED3A95F1F700002111A6
:1016D000F5CF2091E80025FF0BC040E050E065E029
:1016E00070E00E94580D8091E8008E778093E800AA
:1016F0000895CF93DF93EC019091E601943009F0C7
:1017000046C080910C018823D9F080910D01882377
:10171000B9F09093E9008FEF9091E800815095FD2A
:1017200006C095E19A95F1F700008111F5CF8091FF
:10173000E80085FF2CC040E050E060E170E017C099
:1017400081E08093E9008FEF9091E800815095FD52
:1017500006C095ED9A95F1F700008111F5CF8091C3
:10176000E80085FF14C040E050E068E070E0CE0182
:101770000E94580D8091E8008E778093E80080E108
:10178000FE01A4E5B1E001900D928A95E1F7DF91A9
:10179000CF9108958091E501811109C00E94ED0E5D
:1017A0000E944A0F8091E20084608093E2000895D5
:1017B0001092E501089508950C94F1240E944E1EA4
:1017C0000E94F7240E94F0110C94E90A42E061ECB7
:1017D00081E00E94670E42E061EC82E00E94670EA9
:1017E00042E061EC83E00E94670E42E161EC84E03C
:1017F0000C94670E8091E801833009F455C030F4F1
:10180000813071F0823009F48EC008958A3009F475
:101810007AC08B3009F460C0893009F09CC020C0C8
:101820008091E701813A09F096C08091E800877FB6
:101830008093E8008091EB019091EC01892B21F4D9
:1018400060E184E591E003C060E080E090E070E05A
:101850000E94A30D8091E8008B778093E8000895A3
:101860008091E701813209F076C08091EB0190917F
:10187000EC01009719F0039709F06DC08091E80022
:10188000877F8093E8008091E80082FD05C0809109
:10189000E6018111F8CF5FC08091F100809364016F
:1018A0008091E8008B7753C08091E701813A09F07D
:1018B00052C08091EB019091EC01892B09F04BC053
:1018C0008091E800877F8093E8008091E80080FFA6
:1018D000FCCF80910C0136C08091E7018132D9F5AF
:1018E0008091EB019091EC01892BA9F58091E800A2
:1018F000877F8093E8000E949C0E8091E90180938D
:101900000C010C9480178091E701813221F58091C0
:10191000E800877F8093E8000E949C0E8091EA0196
:101920008093650108958091E701813AA1F4809147
:10193000E800877F8093E8008091E80080FFFCCF7B
:10194000809165018093F1008091E8008E7780930B
:10195000E8000C949C0E089584B7877F84BF88E1CB
:101960000FB6F89480936000109260000FBE90E074
:1019700080E80FB6F89480936100909361000FBEE9
:101980000E943F120E94ED0E0E944A0F8091E200D9
:1019900084608093E20078940E94D0110E944112EA
:1019A00082E091E00E94EB110E94DF248091E60129
:1019B000853069F40E940F1E8091E4018823B1F301
:1019C0000E943A1E882391F30E94420DEFCF0E949D
:1019D0004712ECCF292F332723303105C9F064F4A7
:1019E0002130310581F02230310509F043C08DE608
:1019F00090E026EA36E042C021323105F1F0223291
:101A0000310541F137C082E190E023E137E036C093
:101A100099278130910541F08230910541F0892B61
:101A200049F5E2EAF6E005C0EAE8F6E002C0E2E7DE
:101A3000F6E0849190E09F0121C06430D8F4E62F55
:101A4000F0E0EE0FFF1FEE5DFE4F2081318189E057
:101A500090E014C0643070F470E0FB01EE0FFF1FE3
:101A6000E65EFE4F20813181FB01EA5EFE4F808100
:101A700090E004C080E090E020E030E0FA013183A3
:101A80002083089580E189BD82E189BD09B400FE0B
:101A9000FDCF8091D8008F7D8093D8008091E000A9
:101AA00082608093E0008091E00081FDFCCF08958A
:101AB000CF92DF92EF92FF920F931F93CF93DF931A
:101AC000EC018B016A010E94BB0E811133C0C1146D
:101AD000D10439F0F60180819181081B190BC80FE0
:101AE000D91FE12CF12C0115110519F18091E800A5
:101AF00085FD16C08091E8008E778093E800C114C0
:101B0000D10449F0F60180819181E80EF91EF1823D
:101B1000E08285E00FC00E94BB0E882321F30AC03B
:101B200089918093F10001501109FFEFEF1AFF0A2C
:101B3000DACF80E0DF91CF911F910F91FF90EF906E
:101B4000DF90CF9008952091ED013091EE0126179E
:101B5000370748F06115710539F42091E8002E77B8
:101B60002093E80001C0B90140E061157105A9F1B9
:101B70002091E601222309F443C0253009F442C034
:101B80002091E80023FD40C02091E80022FD32C0F2
:101B90002091E80020FFE9CF4091F3002091F2006E
:101BA00030E0342BFC01CF016115710559F028306C
:101BB000310540F481918093F100615071092F5FEC
:101BC0003F4FF1CF41E02830310509F040E020914E
:101BD000E8002E772093E800C8CF4111C9CF0AC092
:101BE0008091E601882361F0853061F08091E80002
:101BF00083FD0AC08091E80082FFF2CF80E0089563
:101C000082E0089583E0089581E008952091ED0138
:101C10003091EE012617370748F06115710539F448
:101C20002091E8002E772093E80001C0B901FC0163
:101C300020E06115710591F18091E601882309F496
:101C400040C0853009F43FC08091E80083FD3DC06D
:101C50008091E80082FD2FC08091E80080FFE9CFED
:101C60002091F3008091F20090E0922B61157105B4
:101C700059F08830910540F424912093F100319679
:101C8000615071090196F2CF21E0089709F020E038
:101C90008091E8008E778093E800CBCF2111CCCFE4
:101CA0000AC08091E601882361F0853061F080915F
:101CB000E80083FD0AC08091E80082FFF2CF80E057
:101CC000089582E0089583E0089581E00895982FB3
:101CD000973058F59093E900981739F07091EC001F
:101CE0002091ED005091F00003C0242F762F50E09A
:101CF00021FF19C03091EB003E7F3093EB00309113
:101D0000ED003D7F3093ED003091EB00316030937A
:101D1000EB007093EC002093ED005093F0002091C5
:101D2000EE0027FF07C09F5FD3CF8F708093E9003D
:101D300081E0089580E008958091E70187FF11C058
:101D40008091E80082FD05C08091E6018111F8CF05
:101D500011C08091E8008B770BC08091E601882349
:101D600049F08091E80080FFF8CF8091E8008E77FD
:101D70008093E80008952091E4003091E50095E615
:101D80004091EC00842F817040FF22C08091E800D8
:101D900080FD1CC08091E601882391F0853091F090
:101DA0008091EB0085FD10C04091E4005091E5006A
:101DB0004217530729F39A01915011F784E00895CF
:101DC00082E0089583E0089581E0089580E0089519
:101DD0004091E80042FFDECF08950E945B0F0E9411
:101DE000630FE0EEF0E0808181608083E8EDF0E059
:101DF00080818F77808319BCA7EDB0E08C918E7FB6
:101E00008C9380818F7E80831092E50108950F93DB
:101E10001F93CF93DF930E945B0F0E94630FC8ED67
:101E2000D0E088818F7788838881806888838881E3
:101E30008F7D888319BC1092E6011092E201109206
:101E4000E4011092E30100EE10E0F80180818B7F45
:101E5000808388818160888342E060E080E00E9426
:101E6000670EE1EEF0E080818E7F8083E2EEF0E0AD
:101E7000808181608083808188608083F801808197
:101E80008E7F8083888180618883DF91CF911F91CD
:101E90000F910895E8EDF0E080818F7E8083E7ED7B
:101EA000F0E080818160808384E082BF81E0809364
:101EB000E5010C94070FE8EDF0E080818E7F8083D0
:101EC0001092E20008951092DA001092E100089555
:101ED0001F920F920FB60F9211242F933F934F939F
:101EE0005F936F937F938F939F93AF93BF93EF9382
:101EF000FF938091E10082FF0BC08091E20082FF9E
:101F000007C08091E1008B7F8093E1000E94CF1198
:101F10008091DA0080FF1FC08091D80080FF1BC035
:101F20008091DA008E7F8093DA008091D90080FF63
:101F30000DC080E189BD82E189BD09B400FEFDCFFD
:101F400081E08093E6010E94CA0B05C019BC109283
:101F5000E6010E94D80B8091E10080FF19C08091BA
:101F6000E20080FF15C08091E2008E7F8093E20046
:101F70008091E20080618093E2008091D8008062CD
:101F80008093D80019BC85E08093E6010E94DC0BA9
:101F90008091E10084FF30C08091E20084FF2CC07A
:101FA00080E189BD82E189BD09B400FEFDCF809149
:101FB000D8008F7D8093D8008091E1008F7E809340
:101FC000E1008091E2008F7E8093E2008091E20048
:101FD00081608093E2008091E201882311F084E027
:101FE00007C08091E30087FD02C081E001C083E06B
:101FF0008093E6010E94DE0B8091E10083FF29C0FF
:102000008091E20083FF25C08091E100877F80936B
:10201000E10082E08093E6011092E2018091E1000C
:102020008E7F8093E1008091E2008E7F8093E200BA
:102030008091E20080618093E20042E060E080E015
:102040000E94670E8091F00088608093F0000E94EB
:10205000DB0BFF91EF91BF91AF919F918F917F919A
:102060006F915F914F913F912F910F900FBE0F9005
:102070001F9018951F920F920FB60F9211242F9355
:102080003F934F935F936F937F938F939F93AF9300
:10209000BF93CF93DF93EF93FF93C091E900CF708D
:1020A0008091EC00D82FD17080FDD0E81092E9002B
:1020B0008091F000877F8093F00078940E947E10DA
:1020C0001092E9008091F00088608093F000CD2BA1
:1020D000CF70C093E900FF91EF91DF91CF91BF9155
:1020E000AF919F918F917F916F915F914F913F91B0
:1020F0002F910F900FBE0F901F9018951F93CF93A5
:10210000DF93CDB7DEB7AA970FB6F894DEBF0FBE48
:10211000CDBFE7EEF1E088E08E0F9091F100919352
:102120008E13FBCF0E94FA0B8091E80083FF1FC142
:102130008091E7019091E801492F50E04A30510524
:1021400008F015C1FA01EA59FF4F0C94792680383E
:1021500081F0823809F00BC18091EB018F70809380
:10216000E9008091EB0085FB882780F91092E90057
:1021700006C08091E3019091E401911182609091F9
:10218000E800977F9093E8008093F1001092F100AF
:10219000C8C0282F2D7F09F0EAC0882319F08230AB
:1021A00061F0E5C08091E901813009F0E0C0933031
:1021B00009F080E08093E4012BC08091E901811156
:1021C00027C08091EB018F7009F4D1C08093E900A2
:1021D0002091EB0020FF1CC0933021F48091EB0094
:1021E000806214C09091EB0090619093EB0021E02D
:1021F00030E0A90102C0440F551F8A95E2F74093D1
:10220000EA001092EA008091EB0088608093EB0076
:102210001092E9008091E800877F86C08111A7C0F5
:102220001091E9011F778091E3008078812B8093E2
:10223000E3008091E800877F8093E8000E949C0E75
:102240008091E80080FFFCCF8091E300806880935C
:10225000E300111102C082E001C083E08093E60137
:1022600086C08058823008F082C08091E901909148
:10227000EA018C3D53E0950779F583E08A838AE291
:1022800089834FB7F894DE01139620E03EE051E2D7
:10229000E32FF0E050935700E49120FF03C0E29554
:1022A000EF703F5FEF708E2F90E0EA3010F0C7962E
:1022B00001C0C0968D939D932F5F243149F74FBF86
:1022C0008091E800877F8093E8006AE270E0CE01A9
:1022D00001960E94A30D14C0AE014F5F5F4F609145
:1022E000EB010E94EA0CBC01892B09F440C09091DB
:1022F000E800977F9093E80089819A810E94060EFA
:102300008091E8008B778093E80031C0803879F5C0
:102310008091E800877F8093E8008091E2018093BC
:10232000F1008091E8008E778093E8000E949C0E77
:102330001EC081111CC09091E9019230C0F48091BF
:10234000E800877F8093E8009093E2010E949C0E52
:102350008091E201811106C08091E30087FD02C0F7
:1023600081E001C084E08093E6010E94E60B809149
:10237000E80083FF0AC08091E800877F8093E8002F
:102380008091EB0080628093EB00AA960FB6F894E0
:10239000DEBF0FBECDBFDF91CF911F91089508958D
:1023A000CF938091E6018823A1F0C091E900CF701E
:1023B0009091EC00892F817090FD80E8C82B1092DD
:1023C000E9008091E80083FD0E947E10CF70C093E9
:1023D000E900CF91089590936B0180936A0108956D
:1023E000E0916A01F0916B01309721F00190F0814A
:1023F000E02D099480E00895E0916A01F0916B016D
:10240000309721F00280F381E02D09940895E09146
:102410006A01F0916B01309721F00480F581E02D85
:1024200009940895209168013091690182179307FA
:1024300071F09093690180936801E0916A01F091D5
:102440006B01309721F00680F781E02D0994089503
:1024500020916601309167018217930771F0909384
:10246000670180936601E0916A01F0916B013097FA
:1024700021F00084F185E02D0994089508950C94CD
:102480003E120E94541E0E9401070C941A1FCF9204
:10249000DF92EF92FF920F931F93CF93DF93CDB70D
:1024A000DEB72B970FB6F894DEBF0FBECDBF0E94EC
:1024B00019078DE6C82E81E0D82E00E010E0E02E4E
:1024C000802F0E940708F60141916F01F42EF82633
:1024D000B1F40F5F1F4F0E30110589F78FEF89831D
:1024E0008A831B820E945D1E8160782F9D838C836E
:1024F00049815A816B818D810E94EA1240C090917E
:10250000CF0191FF04C08B870E940D088B8520E0CE
:1025100030E04F2D50E0922FBA01022E02C0759587
:1025200067950A94E2F760FF24C02E83EF8221E0D2
:1025300030E0690102C0CC0CDD1C9A95E2F790E016
:102540008C219D21892B09F420E028870E945D1EA3
:102550008160782F9A8789874E815F8168858A8517
:102560000E94EA12F801E359FE4F8081C826C0821A
:1025700006C02F5F3F4F2630310569F6AACF0E9473
:10258000012210916C010E94F0111817A1F00E9415
:10259000F01180936C012B960FB6F894DEBF0FBE3E
:1025A000CDBFDF91CF911F910F91FF90EF90DF9002
:1025B000CF900C94E90A2B960FB6F894DEBF0FBEAD
:1025C000CDBFDF91CF911F910F91FF90EF90DF90E2
:1025D000CF900895CF93DF93CDB7DEB72B970FB68B
:1025E000F894DEBF0FBECDBF4F83588769877A87C7
:1025F0008B87DE01119686E0FD0111928A95E9F73D
:1026000085E0FE01379601900D928A95E1F74981A8
:102610005A816B817C818D819E810E941A1A2B9632
:102620000FB6F894DEBF0FBECDBFDF91CF910895F6
:102630000895CF93882309F4C2C0C82F823859F473
:102640000E94F01181FDBBC089E30E94C31C0E945F
:10265000901D89E30CC0833879F40E94F01180FD4D
:10266000AEC083E50E94C31C0E94901D83E50E94BA
:10267000051DCF910C94901D843859F40E94F011DF
:1026800082FD9DC087E40E94C31C0E94901D87E4C8
:10269000EECF8CEF8C0F813A48F48C2F0E944424AB
:1026A00081118DC08C2F0E94C31CE3CF80E28C0F60
:1026B000883048F4C77081E001C0880FCA95EAF7F6
:1026C0000E94491DD6CF8BE58C0F833078F4C53A34
:1026D00029F0C63A31F083E890E005C081E890E047
:1026E00002C082E890E0CF910C94121288E58C0F22
:1026F000833108F064C0C83A39F1C93A41F1CA3AA5
:1027000049F1CB3A51F1CC3A59F1CD3A61F1C03BA4
:1027100069F1CE3A71F1CF3A79F1C13B81F1C23B17
:1027200089F1C33B91F1C43B99F1C53BA1F1C63B93
:10273000A9F1C73BB1F1C83BB9F1C93BC1F1CA3BF3
:10274000C9F180E090E038C082EE90E035C089EEBB
:1027500090E032C08AEE90E02FC085EB90E02CC074
:1027600086EB90E029C087EB90E026C08CEC90E0EF
:1027700023C08DEC90E020C083E891E01DC08AE882
:1027800091E01AC082E991E017C084E991E014C099
:1027900081E292E011C083E292E00EC084E292E016
:1027A0000BC085E292E008C086E292E005C087E2B5
:1027B00092E002C08AE292E0CF910C942812CF916D
:1027C0000895882309F44BC0823859F40E94F0110F
:1027D00081FF45C089E30E94C31C0E94901D89E3CC
:1027E0000CC0833871F40E94F01180FF38C083E57B
:1027F0000E94C31C0E94901D83E50E94051D0C943D
:10280000901D843859F40E94F01182FF28C087E49B
:102810000E94C31C0E94901D87E4EFCF9CEF980F8D
:10282000913A58F390E2980F983050F4877091E005
:1028300001C0990F8A95EAF7892F0E944F1DDFCFBB
:102840009BE5980F933020F480E090E00C941212F6
:10285000885A833120F480E090E00C942812089587
:10286000882321F00E94491D0C94901D089588230F
:1028700021F00E944F1D0C94901D0895BF92CF929D
:10288000DF92EF92FF920F931F93CF93DF9300D0CD
:1028900000D000D0CDB7DEB725E0FC01DE011196F7
:1028A00001900D922A95E1F7FC01D08011810281FF
:1028B000258122952F7043815481452B09F4FCC258
:1028C0001F3F21F4FFEFDF1609F4F6C27C012E83CF
:1028D0000E941813D9821A8369817A81802F0E94FD
:1028E000BF1C182FB92E0E94741C0E943B1B2E8106
:1028F000002319F00E94661D2E81EB2DE295EF70EA
:10290000F0E0E059FF4F0C9479268B2D807F9B2DB2
:102910009F70F92E882319F0F29480EFF82200239B
:1029200089F0FF2009F475C280E2810F883020F41D
:102930008F2D0E94491D03C08F2D0E94591D0E949A
:10294000901D67C2812F0E94E113FF2009F4B4C2D9
:10295000105E8F2D183018F40E944F1D02C00E9487
:102960005F1D26960FB6F894DEBF0FBECDBFDF9178
:10297000CF911F910F91FF90EF90DF90CF90BF907C
:102980000C94901D3B2D307F8B2D8F70303211F0C9
:102990008295807F112319F0113021F12CC0002382
:1029A000B9F0222309F4A0C1213009F09DC1269677
:1029B0000FB6F894DEBF0FBECDBFDF91CF911F9150
:1029C0000F91FF90EF90DF90CF90BF900C94791D06
:1029D000222319F0213009F46FC28E830E947C1DDE
:1029E0008E8196C1002321F0223008F065C27CC19F
:1029F000211162C28DC1002321F0222309F474C188
:102A000008C2222309F484C119C22B2D26952695CC
:102A1000237030E02115310521F021303105D1F04E
:102A20004BC2002321F0812F9B2D937002C080E0C8
:102A300090E026960FB6F894DEBF0FBECDBFDF91B3
:102A4000CF911F910F91FF90EF90DF90CF90BF90AB
:102A50000C941212002321F0812F9B2D937002C041
:102A600080E090E026960FB6F894DEBF0FBECDBF93
:102A7000DF91CF911F910F91FF90EF90DF90CF905A
:102A8000BF900C942812812F002319F00E94092175
:102A900002C00E94712126960FB6F894DEBF0FBEC9
:102AA000CDBFDF91CF911F910F91FF90EF90DF90FD
:102AB000CF90BF900C94F6218B2D837009F07BC0D2
:102AC0000111FAC1812F829586958770880F880F32
:102AD000912F9F70C92ED12CE12CF12C082E04C00F
:102AE000CC0CDD1CEE1CFF1C0A94D2F714FF12C0A4
:102AF0004FE050E060E070E004C0440F551F661FD7
:102B0000771F8A95D2F7CB01BA01609570958095B1
:102B1000909503C060E070E0CB012B2D26952695A3
:102B20002370422F50E042305105D9F04330510517
:102B300069F16C297D298E299F294130510551F178
:102B400026960FB6F894DEBF0FBECDBFDF91CF91B2
:102B50001F910F91FF90EF90DF90CF90BF900C945A
:102B6000621B6C297D298E299F2926960FB6F89421
:102B7000DEBF0FBECDBFDF91CF911F910F91FF90B0
:102B8000EF90DF90CF90BF900C947E1B0E94621B51
:102B9000C701B60126960FB6F894DEBF0FBECDBFB3
:102BA000DF91CF911F910F91FF90EF90DF90CF9029
:102BB000BF900C94461B002319F08B2D817001C02F
:102BC0008695882309F478C1812F82958695877030
:102BD000880F880F912F9F70C92ED12CE12CF12CDA
:102BE000082E04C0CC0CDD1CEE1CFF1C0A94D2F78E
:102BF00014FF12C04FE050E060E070E004C0440FEA
:102C0000551F661F771F8A95D2F7CB01BA016095D1
:102C100070958095909503C060E070E0CB012B2DFE
:102C2000269526952370422F50E042305105D9F069
:102C30004330510569F16C297D298E299F29413046
:102C4000510551F126960FB6F894DEBF0FBECDBFE9
:102C5000DF91CF911F910F91FF90EF90DF90CF9078
:102C6000BF900C943C1C6C297D298E299F292696A7
:102C70000FB6F894DEBF0FBECDBFDF91CF911F918D
:102C80000F91FF90EF90DF90CF90BF900C94581C65
:102C90000E943C1CC701B60126960FB6F894DEBF11
:102CA0000FBECDBFDF91CF911F910F91FF90EF909D
:102CB000DF90CF90BF900C94201C103FD1F118F4FE
:102CC000103E50F4A1C0123F09F463C008F44CC098
:102CD000133F09F473C098C01F708B2D8F710023B0
:102CE000A1F00E94B91B812F26960FB6F894DEBF83
:102CF0000FBECDBFDF91CF911F910F91FF90EF904D
:102D0000DF90CF90BF900C9430140E94DA1B812F7B
:102D100026960FB6F894DEBF0FBECDBFDF91CF91E0
:102D20001F910F91FF90EF90DF90CF90BF900C9488
:102D300037140023A9F02111BFC08B2D8F71269667
:102D40000FB6F894DEBF0FBECDBFDF91CF911F91BC
:102D50000F91FF90EF90DF90CF90BF900C94FF1BEE
:102D6000223008F0A9C0E9CF0023A9F08B2D8F7184
:102D700026960FB6F894DEBF0FBECDBFDF91CF9180
:102D80001F910F91FF90EF90DF90CF90BF900C9428
:102D9000B91B002359F38B2D8F7126960FB6F8942B
:102DA000DEBF0FBECDBFDF91CF911F910F91FF907E
:102DB000EF90DF90CF90BF900C94DA1B002399F036
:102DC0008B2D8F7126960FB6F894DEBF0FBECDBF48
:102DD000DF91CF911F910F91FF90EF90DF90CF90F7
:102DE000BF900C94A41B26960FB6F894DEBF0FBEBE
:102DF000CDBFDF91CF911F910F91FF90EF90DF90AA
:102E0000CF90BF900C949A1B0023A9F0222309F4C1
:102E1000ADCF812F26960FB6F894DEBF0FBECDBF83
:102E2000DF91CF911F910F91FF90EF90DF90CF90A6
:102E3000BF900C941913222309F4ADCF812F26964D
:102E40000FB6F894DEBF0FBECDBFDF91CF911F91BB
:102E50000F91FF90EF90DF90CF90BF900C94E11313
:102E60004B2D4F70612FC7010E94760426960FB636
:102E7000F894DEBF0FBECDBFDF91CF911F910F91B0
:102E8000FF90EF90DF90CF90BF900C94BE1A4B2D27
:102E90004F70612FC70126960FB6F894DEBF0FBEA4
:102EA000CDBFDF91CF911F910F91FF90EF90DF90F9
:102EB000CF90BF900C940E0826960FB6F894DEBF04
:102EC0000FBECDBFDF91CF911F910F91FF90EF907B
:102ED000DF90CF90BF9008950E94661D0E94761DDE
:102EE0000E943B1D0E94901D0E94A7220E94F62175
:102EF00080E090E00E94121280E090E00C94281292
:102F00000E94561D0C946C170E94B41C292F229508
:102F10002F7030E02C3031054CF42A3031056CF440
:102F2000225031092230310588F407C02C30310598
:102F300049F02F30310531F009C0803E48F0803F24
:102F400029F406C093FB882780F9089580E008954E
:102F500081E00895CF93DF9300D000D01F92CDB7CA
:102F6000DEB70F900F900F900F900F90DF91CF91E1
:102F70000895CF93DF9300D000D000D0CDB7DEB757
:102F800026960FB6F894DEBF0FBECDBFDF91CF916E
:102F900008951F93CF93DF93C0917B0116E080913A
:102FA0007C01C81799F0D0E01C9FF0011D9FF00D27
:102FB0001124E358FE4F40815181628173818481E5
:102FC00095810E94B9172196C770E9CFDF91CF9103
:102FD0001F9108954091AD015091AE016091AF01F4
:102FE0007091B0018091B1019091B2010C94B91728
:102FF0008091B20182958F7009F054C08091AF0129
:10300000882309F44FC080917B01A0917C016091DD
:10301000AD017091AE014091B0015091B101B6E0A7
:103020008A1709F43FC090E041155105C1F17F3F77
:1030300011F46F3FA1F1B89FF001B99FF00D112479
:10304000E358FE4F218172132AC02081621327C0EA
:103050002281211124C0238134812417350710F4E3
:1030600021503109241B350B283C3105C0F4209137
:10307000B2012F7020612093B20126E0289FF00159
:10308000299FF00D1124EE57FE4F80818F708061D3
:1030900080838DEA91E00E943E140C94C91701963A
:1030A0008770BECF0895CF92DF92EF92FF920F9379
:1030B0001F93CF93DF93CDB7DEB762970FB6F89427
:1030C000DEBF0FBECDBF8C0185E0F801DE011D968D
:1030D00001900D928A95E1F7D8014C9111965C917F
:1030E000119712966C9112971396CD90DC901497CD
:1030F0003091AD017091AE018091B0019091B1011C
:10310000009709F46BC17F3F19F43F3F09F466C192
:10311000E090AF01EE2009F4C0C02091B201C816C2
:10312000D90628F0F601E81BF90BCF0104C0809501
:1031300090958C0D9D1DFF24F394883C910578F0AB
:10314000F12C207F09F0C6C07C2DD98AC88A8989D4
:103150000E94AA178DEA91E00E943E14B1C0822F0E
:10316000807F09F046C0751314C0341312C061117A
:1031700010C02F7020612093B2010E94EA178DEADF
:1031800091E00E943E148091B201D80115968C9373
:103190002EC0CD2819F15F3F11F44F3FF9F0F62E04
:1031A00061111CC080917B0120917C0136E0821767
:1031B00009F45AC090E0389FF001399FF00D1124B6
:1031C000E358FE4F7181571306C07081471303C047
:1031D0007281711103C001968770E9CFF62E6623C4
:1031E00009F418C18091B20181608093B201F12C81
:1031F00011C1751308C0341306C0611104C0809159
:10320000B201D801C3C04D875E878D859E856A8BCC
:103210000E9484176A898823E1F16623D1F1209105
:10322000B201822F82958F7090E0029774F08091A6
:10323000AD019091AE0198878F831986DB86CA868F
:103240002C87CE0107960E943E1486E0F801ADEA75
:10325000B1E001900D928A95E1F70E94F8170E9463
:10326000EA17FF24F394D6C04D875E878D859E852F
:103270000E94B41C292F22952F7030E02230310596
:103280000CF0BCC09F7009F0B6C0805E883008F4B6
:10329000C1C0C8010E943E14E4CFC816D90608F484
:1032A00053C0F601E81BF90BCF01883C910508F4E7
:1032B00050C0F12C7C2DD98AC88A89890E94AA170E
:1032C000EDEAF1E086E0DF011D928A95E9F70E94C0
:1032D000EA17A0C0751314C0341312C0611110C0D6
:1032E0008091B201F8018583C8010E943E1486E0F6
:1032F000EDEAF1E0DF011D928A95E9F7FE2C8AC024
:103300004D875E878D859E856A8B0E9484176A89AA
:10331000882309F4BECF662309F4BBCF2091B20104
:10332000822F82958F7090E002970CF48ECF80915F
:10333000AD019091AE019A8389831B82DD82CC829C
:103340002E83CE0101967FCF809590958C0D9D1D8B
:10335000ACCFF62E662309F49CCF75132EC0341320
:103360002CC02091B20120FD1FC0822F82958F704A
:10337000D9F0D80115962C9315978F3049F08F5FAF
:10338000982F9295907F822F8F70892B15968C9312
:10339000C8010E943E1486E0F801ADEAB1E0019058
:1033A0000D928A95E1F793CF86E0F801ADEAB1E09E
:1033B00001900D928A95E1F72DC04D875E878D852E
:1033C0009E850E948417811140CF8091B201816057
:1033D0008093B201C8010E943E141CC0662309F408
:1033E00058CF4D875E878D859E850E9484178823E0
:1033F00009F44FCF2ACF811148CF0CC024303105BA
:103400000CF047CF9F7009F440CFF8019581907F71
:1034100009F03BCF8F2D62960FB6F894DEBF0FBE3A
:10342000CDBFDF91CF911F910F91FF90EF90DF9073
:10343000CF9008951F93CF93DF93CDB7DEB72C972E
:103440000FB6F894DEBF0FBECDBF4F835887698794
:103450007A878B879C87CE0107960E945318882312
:1034600069F08F8198852A853B85232BF1F19F3F59
:1034700009F063C08F3F09F060C037C086E0FE01ED
:103480003796DE01119601900D928A95E1F76F81D2
:103490007885EA85FB85309741F17F3F11F46F3FD6
:1034A00021F120917C0130E0C901019687709927B4
:1034B00040917B0150E08417950709F447C0698368
:1034C0007A83FD83EC8396E0929FD001939FB00DA9
:1034D0001124A358BE4FFE01319601900D929A958A
:1034E000E1F780937C010E94C91716E080917B016F
:1034F00090917C018917C1F1189FC0011124835854
:103500009E4F0E945318882379F1E0917B011E9F02
:10351000F0011124E358FE4F408151816281738193
:10352000848195810E94B91780917B0190E001967A
:103530008770992780937B01D9CF4F815885698502
:103540007A858B859C850E94B917CFCF0E94801702
:1035500010927C0110927B01EDEAF1E086E0DF0140
:103560001D928A95E9F7C1CF2C960FB6F894DEBF6D
:103570000FBECDBFDF91CF911F910895EF92FF92C3
:103580000F931F93CF93DF938C01892B09F46CC0A9
:10359000F12CEE24E394E8012196F801849184371C
:1035A00040F4843008F051C0813081F0823019F14C
:1035B0005BC0853709F444C0A8F19CE7980F9037A9
:1035C00008F052C08F770E94E11341C00E5F1F4F79
:1035D000FE01C49180E28C0F883048F4C7708E2DB4
:1035E00001C0880FCA95EAF70E94691D14C08C2F8C
:1035F0000E9419132DC00E5F1F4FFE01C49180E27F
:103600008C0F883058F4C7708E2D01C0880FCA9572
:10361000EAF70E946F1D0E94901D1AC08C2F0E9415
:10362000E11316C00E5F1F4FFE01C491CC2381F041
:103630008FE99FE00197F1F700C00000C150F6CF7D
:103640000E5F1F4FFE01F49003C00E9419138E01FC
:103650008F2D882309F49FCFEFE9FFE03197F1F731
:1036600000C000008150F5CFDF91CF911F910F91E5
:10367000FF90EF90089508956093B7017093B8019B
:103680008093B9019093BA010C946C170F931F9318
:103690000091B7011091B8012091B9013091BA01A0
:1036A000DC01CB01802B912BA22BB32B8093B70194
:1036B0009093B801A093B901B093BA011F910F91F3
:1036C0000C946C170F931F930091B7011091B801E0
:1036D0002091B9013091BA01DC01CB018023912303
:1036E000A223B3238093B7019093B801A093B901AB
:1036F000B093BA011F910F910C946C170F931F9305
:103700000091B7011091B8012091B9013091BA012F
:10371000DC01CB0180279127A227B3278093B70133
:103720009093B801A093B901B093BA011F910F9182
:103730000C946C171092B3011092B4011092B50161
:103740001092B6010C946C1741E050E060E070E01C
:1037500004C0440F551F661F771F8A95D2F7409308
:10376000B3015093B4016093B5017093B6010C940A
:103770006C1741E050E060E070E004C0440F551F5A
:10378000661F771F8A95D2F78091B3019091B4019B
:10379000A091B501B091B601482B592B6A2B7B2B18
:1037A0004093B3015093B4016093B5017093B60197
:1037B0000C946C1741E050E060E070E004C0440FEE
:1037C000551F661F771F8A95D2F7409550956095D3
:1037D00070958091B3019091B401A091B501B09121
:1037E000B601482359236A237B234093B3015093A6
:1037F000B4016093B5017093B6010C946C1741E06D
:1038000050E060E070E004C0440F551F661F771F52
:103810008A95D2F78091B3019091B401A091B5013E
:10382000B091B601482759276A277B274093B301F7
:103830005093B4016093B5017093B6010C946C176A
:103840000F931F930091B3011091B4012091B50122
:103850003091B601DC01CB01802B912BA22BB32B35
:103860008093B3019093B401A093B501B093B601D6
:103870001F910F910C946C170F931F930091B3013C
:103880001091B4012091B5013091B601DC01CB015A
:1038900080239123A223B3238093B3019093B40197
:1038A000A093B501B093B6011F910F910C946C17C2
:1038B0000F931F930091B3011091B4012091B501B2
:1038C0003091B601DC01CB0180279127A227B327D5
:1038D0008093B3019093B401A093B501B093B60166
:1038E0001F910F910C946C170895CF92DF92EF9275
:1038F000FF920F931F93CF93DF938C01C090B7017A
:10390000D090B801E090B901F090BA018091B30174
:103910009091B401A091B501B091B601C82AD92AFD
:10392000EA2AFB2ACFE1D0E0D701C6010C2E04C061
:10393000B695A795979587950A94D2F780FF06C00C
:10394000B8018C2F0E944E0A019721F4219760F74D
:1039500080E001C08C2FDF91CF911F910F91FF90DC
:10396000EF90DF90CF900895CF93DF93EC010E940A
:10397000751CBE010E944E0ADF91CF910895CB01C4
:103980000E94B41C089590910C01992321F090910C
:103990000D01911109C020910E0130910F01F90123
:1039A00032969FEF40E01FC0982F9695969596957A
:1039B0009F3050F5E0910E01F0910F01E90FF11DDC
:1039C000877021E030E0A90102C0440F551F8A959D
:1039D000E2F7CA019181892B818308959F3F39F0D5
:1039E0004F5F4E3041F051915813F8CF0DC0511137
:1039F000F7CF942FF5CF9F3F39F0F901E90FF11D73
:103A000097FDFA9582830895089590910C0199236A
:103A100021F090910D01911109C020910E0130917A
:103A20000F01F9013296205F3F4F1FC0982F9695E6
:103A3000969596959F30F0F4E0910E01F0910F016C
:103A4000E90FF11D877021E030E0A90102C0440FA9
:103A5000551F8A95E2F7CA01809591818923818358
:103A600008953196E217F30729F090819813F9CF62
:103A70001082F7CF089581E090E0E0910E01F0917F
:103A80000F01E80FF91F1082019680319105A9F707
:103A900008959091CE01892B8093CE010895809551
:103AA0009091CE0189238093CE0108951092CE018A
:103AB00008959091CD01892B8093CD010895809533
:103AC0009091CD0189238093CD0108951092CD016D
:103AD00008959091CC01892B8093CC010895809515
:103AE0009091CC0189238093CC0108951092CC0150
:103AF00008958093BB0108951092BB0108958091B1
:103B00000E0190910F01FC0131969C01205F3F4F07
:103B100080E0919191118F5FE217F307D1F708953B
:103B2000E0910E01F0910F018091CE018083E09130
:103B30000E01F0910F0190818091CD01892B80833E
:103B4000E0910E01F0910F0190818091CC01892BC1
:103B500080838091BB01882361F0E0910E01F09198
:103B60000F019081892B80830E947F1D811110920B
:103B7000BB0180910E0190910F010C94FC11CF922A
:103B8000DF92EF92FF926C01EE24FF24C114D10466
:103B9000E104F10421F0C701B60120E101C020E0F9
:103BA000C72ED82EE92EFF24C114D104E104F1045C
:103BB00019F0285FC701B6016B017C0154E0F6944F
:103BC000E794D794C7945A95D1F7C114D104E1046E
:103BD000F10419F02C5FC701B6016B017C0142E0D2
:103BE000F694E794D794C7944A95D1F7C114D104B9
:103BF000E104F10419F02E5FC701B601DC01CB012D
:103C0000B695A79597958795892B8A2B8B2B09F0CD
:103C10002F5F822FFF90EF90DF90CF9008958091DB
:103C2000E601843021F11092D00120E488E190E097
:103C30000FB6F894A895809360000FBE20936000A3
:103C400080E00E94E90A83B7817F846083BF83B7E5
:103C5000816083BF7894889583B78E7F83BF88E126
:103C60000FB6F89480936000109260000FBE089524
:103C700008950895CF930E94381E0E9419070E944C
:103C8000391EC0E08C2F0E940708811104C0CF5F4D
:103C9000CE30C1F701C081E0CF9108950E94801716
:103CA0000E94F0110C94E90A82E084BD93E095BD76
:103CB0009AEF97BD80936E0008952FB7F894809186
:103CC000D1019091D201A091D301B091D4012FBF25
:103CD0000895CF92DF92EF92FF920F931F932FB729
:103CE000F8944091D1015091D2016091D30170912B
:103CF000D4012FBF6A017B01EE24FF248C0120E058
:103D000030E0C016D106E206F30610F44150510926
:103D10009A01281B390BC9011F910F91FF90EF9059
:103D2000DF90CF9008951F920F920FB60F9211243B
:103D30008F939F93AF93BF938091D1019091D201C4
:103D4000A091D301B091D4010196A11DB11D809322
:103D5000D1019093D201A093D301B093D401BF912C
:103D6000AF919F918F910F900FBE0F901F9018955C
:103D70000E94ED0EF8942FEF87EA91E621508040E3
:103D80009040E1F700C0000087E090EBDC018093F9
:103D9000F0019093F101A093F201B093F3019CE044
:103DA00088E10FB6F894A895809360000FBE9093B9
:103DB0006000FFCFEF92FF920F931F93CF93DF939B
:103DC000D82FC0E08C2F0E94070800E010E0E82EFA
:103DD000F12CC701002E02C0959587950A94E2F751
:103DE00080FD06C00F5F1F4F0630110591F709C017
:103DF000602F7C2F80E00E940F08D813F3CF81E062
:103E000004C0CF5FCE30F1F680E0DF91CF911F91FB
:103E10000F91FF90EF900895CF93C82F8CE20E94EE
:103E2000DA1E882321F08C2FCF910C94DA1E80E0CB
:103E3000CF910895CF930E946120811102C00E940A
:103E40004720C5E6C15049F00E9419078FE39CE95D
:103E50000197F1F700C00000F5CF89E20E940C1F26
:103E6000811113C18AE20E940C1F81110E94472018
:103E700085E00E940C1F81110E94B81E0E946C20D8
:103E80008093CF0187E00E940C1F8823A9F18BE16A
:103E90000E940C1F882351F08091CF0181FB2227C3
:103EA00020F991E0922790FB81F90EC08EE00E94EC
:103EB0000C1F882361F08091CF0182FB222720F91B
:103EC00091E0922790FB82F98093CF0115C080E1A9
:103ED0000E940C1F9091CF01882341F093FB222771
:103EE00020F981E0822780FB93F904C0892F809517
:103EF00080FB90F99093CF018091CF010E947020B8
:103F00000E947E208093EF0180EE0E940C1F882388
:103F100041F08091EF01982F909590FB80F980936C
:103F2000EF0189E30E940C1F882359F08091EF0173
:103F300081FB222720F991E0922790FB81F9809361
:103F4000EF0182EE0E940C1F882359F08091EF014F
:103F500082FB222720F991E0922790FB82F980933F
:103F6000EF0186EE0E940C1F882359F08091EF012B
:103F700083FB222720F991E0922790FB83F980931D
:103F8000EF0183EE0E940C1F882359F08091EF010E
:103F900084FB222720F991E0922790FB84F98093FB
:103FA000EF0185E30E940C1F882359F08091EF01F7
:103FB00085FB222720F991E0922790FB85F98093D9
:103FC000EF0181E30E940C1F882359F08091EF01DB
:103FD00086FB222720F991E0922790FB86F98093B7
:103FE000EF0181E10E940C1F882359F08091EF01BD
:103FF00087FB222720F991E0922790FB87F9809395
:10400000EF018091EF010E9482208091EF0187FBF8
:10401000882780F980930D0187E20E940C1FC82F2A
:104020008EE10E940C1F8111C2608FE10E940C1F63
:104030008111C46080E20E940C1F8111C86081E27E
:104040000E940C1F8111C06182E20E940C1F81112D
:10405000C06283E20E940C1F8111C06484E20E944E
:104060000C1F882311F0C06802C0CC2329F08C2FCC
:104070000E9479206C2F03C00E947520682F70E089
:1040800080E090E0CF910C943C1BCF9108956DEEB1
:104090007EEF80E090E00E94B32660E082E090E056
:1040A0000E94A12660E083E090E00E94A12660E0EB
:1040B00084E090E00E94A12660E085E090E00C940E
:1040C000A12680E090E00E949B2621E08D3E9E4F3D
:1040D00009F020E0822F089582E090E00C9493266E
:1040E000682F82E090E00C94A12683E090E00C948D
:1040F0009326682F83E090E00C94A12684E090E062
:104100000C949326682F84E090E00C94A126809173
:10411000D70180FF0BC06091130185E0689FB0015B
:10412000112475956795759567952BC081FF09C01A
:104130006091130185E0689FB00111247595679522
:1041400020C082FF07C06091130185E0689FB00125
:10415000112417C09091D8019923D1F060911201D8
:10416000961788F72091130185E0289F900111246C
:10417000929FA001939F500D112470E0CA010E94EC
:1041800065266038710540F46115710539F002C08B
:1041900065E070E0862F08958FE7089581E0089527
:1041A0008091D70180FF08C06091110170E0759582
:1041B00067957595679521C081FF06C060911101D3
:1041C00070E07595679519C082FF04C06091110178
:1041D00070E010C09091D8019923C1F06091100156
:1041E0009617A0F780911101899FC001112470E0FA
:1041F0000E9465266038710528F46115710521F06B
:10420000862F08958FE7089581E0089561E070E0BA
:10421000F4CF803F21F40E948720819504C0813F24
:1042200029F40E9487208093DB010895823F21F4C6
:104230000E948720819504C0833F29F40E94872033
:104240008093DA010895893F19F40E94D02005C0B7
:104250008A3F31F40E94D02081958093DC0108953B
:104260008B3F21F40E94D020819504C08C3F29F41B
:104270000E94D0208093DD010895843F21F4809135
:10428000D901816017C0853F21F48091D9018260F6
:1042900011C0863F21F48091D90184600BC0873F13
:1042A00021F48091D901886005C0883F31F4809164
:1042B000D90180618093D90108958D3F21F48091C7
:1042C000D70181600BC08E3F21F48091D7018260BD
:1042D00005C08F3F29F48091D70184608093D70176
:1042E0000895803F39F48091DB0187FF6CC0109204
:1042F000DB0169C0813F29F48091DB011816BCF312
:1043000062C09091DA01823F29F497FF5CC010925D
:10431000DA0159C0833F19F41916CCF354C0893F10
:1043200041F48091DC0118160CF04DC01092DC01B4
:104330004AC08A3F29F48091DC0187FF44C0F6CF50
:104340008B3F39F48091DD0187FF3DC01092DD0184
:104350003AC08C3F29F48091DD011816BCF333C0BC
:10436000843F21F48091D9018E7F17C0853F21F4CD
:104370008091D9018D7F11C0863F21F48091D901B0
:104380008B7F0BC0873F21F48091D901877F05C0C7
:10439000883F31F48091D9018F7E8093D90113C079
:1043A0008D3F21F48091D7018E7F0BC08E3F21F489
:1043B0008091D7018D7F05C08F3F29F48091D7016F
:1043C0008B7F8093D7018091DA0181110EC080919B
:1043D000DB0181110AC08091DC01811106C080914E
:1043E000DD01811102C01092D801089589ED91E09C
:1043F0000E9407120E945D1E9093D6018093D50102
:1044000008951F93CF93DF938091D5019091D601AA
:104410000E94691EAC019091D801992321F020914E
:10442000140130E006C0209115018AE0289F900118
:1044300011244217530708F486C08091DA01C09115
:10444000DB01D091DC011091DD01811107C0C111A8
:1044500076C0D11174C0111172C075C09F3F19F0A0
:104460009F5F9093D801181624F40E9487208093B0
:10447000DA018091DA0187FF05C00E9487208195CB
:104480008093DA011C1624F40E9487208093DB01BC
:104490008091DB0187FF05C00E9487208195809372
:1044A000DB016091DA01662339F1C091DB01CC2395
:1044B00019F1772767FD7095872F972F0E94762532
:1044C00023E333E343E35FE30E94DA250E944325BD
:1044D0006093DA016C2F772767FD7095872F972FF0
:1044E0000E94762523E333E343E35FE30E94DA256A
:1044F0000E9443256093DB011D1624F40E94D02006
:104500008093DC018091DC0187FF05C00E94D020F0
:1045100081958093DC01111624F40E94D0208093B1
:10452000DD018091DD0187FF05C00E94D0208195CB
:104530008093DD01DF91CF911F910C94F6219F3F75
:1045400009F08ECF96CFDF91CF911F910895E9EDBD
:10455000F1E085E0DF011D928A95E9F71092D8011C
:104560001092D7010895833081F128F4813059F0F9
:104570008230D1F00895853009F449C0B8F1863011
:1045800009F456C0089580911501262F30E0280FB8
:10459000311D2F3F310524F4680F609315010895F4
:1045A0008FEF80931501089580911401262F30E03C
:1045B000280F311D2F3F310524F4680F609314013B
:1045C00008958FEF80931401089580911301262F91
:1045D00030E0280F311D2F3F310524F4680F609320
:1045E000130108958FEF80931301089580911201B4
:1045F000262F30E0280F311D2F3F310524F4680F9E
:104600006093120108958FEF8093120108958091B5
:104610001101262F30E0280F311D2F3F310524F4E2
:10462000680F6093110108958FEF80931101089531
:1046300080911001262F30E0280F311D2F3F3105CA
:1046400024F4680F6093100108958FEF8093100198
:104650000895833011F128F4813049F0823091F0CF
:104660000895853081F120F18630C1F1089580915F
:104670001501681720F4861B809315010895109288
:104680001501089580911401681720F4861B80930A
:104690001401089510921401089580911301681770
:1046A00020F4861B8093130108951092130108953E
:1046B00080911201681720F4861B809312010895DF
:1046C00010921201089580911101681720F4861B41
:1046D00080931101089510921101089580911001A5
:1046E000681720F4861B8093100108951092100122
:1046F00008950F931F938D3109F46BC008F03FC0EC
:104700008E3009F47FC0C0F4873009F469C068F4C2
:10471000863009F0B1C08091CF01817F8E7F809378
:10472000CF0181E08093DF01A8C0883009F4A2C0E6
:104730008B3009F49FC0A0C0863109F49BC078F487
:10474000803109F472C0813109F096C00E9480174F
:1047500090910D0181E0892780930D018BC08931F3
:1047600009F488C08B3109F087C08091CF0181FBAB
:10477000222720F991E0922790FB81F94CC08533E4
:1047800009F470C048F4873209F46CC008F459C0C9
:10479000893209F467C070C0833438F48A3308F072
:1047A0004EC0883309F466C067C0833409F45AC028
:1047B000883409F061C00E9480170FEF13ED20E3E9
:1047C000015010402040E1F700C000000E94B81ED8
:1047D00051C00E94FD240E94F0110E94E90A4AC0C3
:1047E0009091CF01892F8095817080FB90F929F0FD
:1047F000966098609093CF0140C0997F977F909387
:10480000CF0138C08091CF0182FB222720F991E0AF
:10481000922790FB82F98093CF01992359F18091DF
:10482000CF0181608093CF0125C08091CF0183FBB0
:10483000222720F991E0922790FB83F9ECCF89534E
:1048400001C08D5141E050E060E070E08A019B01C1
:1048500004C0000F111F221F331F8A95D2F7C90110
:10486000B80104C061E070E080E090E00E943C1B71
:104870000E94801781E001C080E01F910F91089590
:1048800080E0089580E00895CF93C82F8091DF01E4
:10489000813079F018F08230E9F187C0E0910E01A3
:1048A000F0910F018081813169F0823209F07FC07F
:1048B00009C0E0910E01F0910F018081813111F06A
:1048C000823261F48C2F0E944024811104C08C2F0D
:1048D0000E9479231DC081E090E01AC08C2F0E94B5
:1048E0004224811114C0C43179F048F4CB3079F0FE
:1048F000C03109F060C082E08093DF0108C0C93296
:1049000019F0C83321F057C01092DF0154C081E084
:10491000817053C0C93289F118F5C43171F1A8F41E
:10492000C73009F046C08AE08093150194E1909366
:10493000140193E0909313018093120188E0809317
:10494000110188E28093100134C0CE51C63088F541
:10495000EC2FF0E0E65DFE4F80818093DE0129C000
:10496000CE34E9F020F4CB3421F56AE013C0C13530
:1049700079F0C235F1F461E00DC08091DE01882349
:1049800019F01092DE0115C081E08093DF0115C09F
:1049900061E006C08091DE010E94B3220AC06AE095
:1049A0008091DE010E94292304C01092DF0180E083
:1049B00004C081E002C080E0ABCFCF910895E1E870
:1049C000F0E08081886080838081816080838FB700
:1049D000F89493E09093890090ED909388008FBFB6
:1049E0000895EFE6F0E08081826080830895EFE62D
:1049F000F0E080818D7F80830895EFE6F0E0908184
:104A000082E08927808308951F920F920FB60F923C
:104A100011242F933F934F935F936F937F938F93C3
:104A20009F93AF93BF93EF93FF938091E001909199
:104A3000E10101969093E1018093E001811103C0AF
:104A400082E00E94E90AE091E101E695E695F0E056
:104A5000E05EF74FE4918091E0018E1303C080E0A7
:104A60000E94E90AFF91EF91BF91AF919F918F91C1
:104A70007F916F915F914F913F912F910F900FBE5A
:104A80000F901F90189504D06894B1118DC00895AF
:104A900070D088F09F5790F0B92F9927B751A0F0A8
:104AA000D1F0660F771F881F991F1AF0BA95C9F7C2
:104AB00012C0B13081F077D0B1E0089574C0672F93
:104AC000782F8827B85F39F0B93FCCF38695779572
:104AD0006795B395D9F73EF490958095709561955B
:104AE0007F4F8F4F9F4F0895E89409C097FB3EF486
:104AF00090958095709561957F4F8F4F9F4F99232B
:104B0000A9F0F92F96E9BB279395F69587957795A8
:104B10006795B795F111F8CFFAF4BB0F11F460FF68
:104B20001BC06F5F7F4F8F4F9F4F16C0882311F0C0
:104B300096E911C0772321F09EE8872F762F05C0D4
:104B4000662371F096E8862F70E060E02AF09A956F
:104B5000660F771F881FDAF7880F9695879597F964
:104B6000089557FD9058440F551F59F05F3F71F05D
:104B70004795880F97FB991F61F09F3F79F08795C4
:104B80000895121613061406551FF2CF4695F1DF4D
:104B900008C0161617061806991FF1CF86957105DD
:104BA000610508940895E894BB2766277727CB0111
:104BB00097F908950BD078C069D028F06ED018F01E
:104BC000952309F05AC05FC01124EECFCADFA0F3CD
:104BD000959FD1F3950F50E0551F629FF001729F92
:104BE000BB27F00DB11D639FAA27F00DB11DAA1FB1
:104BF000649F6627B00DA11D661F829F2227B00DFE
:104C0000A11D621F739FB00DA11D621F839FA00D88
:104C1000611D221F749F3327A00D611D231F849FD8
:104C2000600D211D822F762F6A2F11249F5750402F
:104C30008AF0E1F088234AF0EE0FFF1FBB1F661FCA
:104C4000771F881F91505040A9F79E3F510570F083
:104C500014C0AACF5F3FECF3983EDCF386957795BE
:104C60006795B795F795E7959F5FC1F7FE2B880F7E
:104C7000911D9695879597F9089597F99F6780E814
:104C800070E060E008959FEF80EC089500240A949E
:104C90001616170618060906089500240A94121617
:104CA0001306140605060895092E0394000C11F44A
:104CB000882352F0BB0F40F4BF2B11F460FF04C0F7
:104CC0006F5F7F4F8F4F9F4F089597FB072E16F40E
:104CD000009407D077FD09D00E947F2607FC05D0FD
:104CE0003EF4909581959F4F0895709561957F4F03
:104CF0000895EE0FFF1F0590F491E02D0994AA1B73
:104D0000BB1B51E107C0AA1FBB1FA617B70710F0B6
:104D1000A61BB70B881F991F5A95A9F780959095E8
:104D2000BC01CD010895F999FECF92BD81BDF89ADD
:104D3000992780B50895A8E1B0E042E050E00C94D6
:104D4000BB26262FF999FECF92BD81BDF89A019717
:104D500000B4021639F01FBA20BD0FB6F894FA9AC3
:104D6000F99A0FBE08950196272F0E94A2260C944F
:104D7000A126DC01CB01FC01F999FECF06C0F2BDF2
:104D8000E1BDF89A319600B40D9241505040B8F709
:064D90000895F894FFCF26
:104D96002002EB0A790B560B220BEE0A0101BC012D
:104DA60028080A03140A3F4D3639E10794075E07BF
:104DB6002507B806D106EA0603070102030405061D
:044DC60007080900D1
:00000001FF

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 KiB

After

Width:  |  Height:  |  Size: 297 KiB

@ -0,0 +1,22 @@
# Ergodox und Ergodox-EZ experimentelles Layout
dieses layout ist experimentell und wird im Lufe der Zeit viele Änderungen und Verbesserungen durchlaufen. Falls diese sich als vorteilhaft erweisen, werden sie evtl. auch in das `osx_de` layout übernommen.
# Erstellt Mit Dem ErgodoxLayoutGenerator
Der ErgodoxLayoutGenerator (ELG) ist ein kleines Werkzeug, welches die Erstellung und Pflege der eigenen Keymaps erleichtern soll. Es ist in java geschrieben und kann [hier](https://github.com/sboesebeck/ErgodoxLayoutGenerator/releases) heruntergeladen werden. Damit das Tool funktioniert sollte das offizielle Oracle JDK in aktueller Version installiert sein.
Die Dokumentation für den ELG kann man [hier](https://boesebeck.name/2016/04/16/ergodoxlayoutgenerator-documentation/) nachlesen (momentan leider nur in Englisch verfügbar).
---------------------------------------------------------------------------------------------------------------------
# Ergodox and Ergodox-EZ experimental layout
This is an experimental layout which will undergo heavy changes over time. If changes prove to be good, they might also move into the `osx_de` layout.
Created Using the ErgodoxLayoutGenerator
The ErgodoxLayoutGenerator (ELG) is a little tool, which makes the creation and maintenance of keycaps a lot easier. It was written in Java and can be downloaded [here](https://github.com/sboesebeck/ErgodoxLayoutGenerator/releases). To use the tool, you need to have a current version of Oracles JDK installed.
The documentation of the ELG can be viewed [here](https://boesebeck.name/2016/04/16/ergodoxlayoutgenerator-documentation/).

@ -0,0 +1,92 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1307
#define DEVICE_VER 0x0001
#define MANUFACTURER ErgoDox EZ
#define PRODUCT ErgoDox EZ
#define DESCRIPTION t.m.k. keyboard firmware for Ergodox
/* key matrix size */
#define MATRIX_ROWS 14
#define MATRIX_COLS 6
#define MOUSEKEY_DELAY 100
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_MAX_SPEED 3
#define MOUSEKEY_TIME_TO_MAX 10
#define TAPPING_TOGGLE 1
#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
#define ROWS (int []){ D0, D5, B5, B6 }
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 2
#define TAPPING_TERM 200
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
)
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
#define NO_DEBUG
/* disable print */
// #define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
//#define DEBUG_MATRIX_SCAN_RATE
#define ONESHOT_TAP_TOGGLE 2
#define ONESHOT_TIMEOUT 3000
#endif

@ -0,0 +1,285 @@
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#include "action_util.h"
#include "led.h"
#include "keymap_common.h"
#include "timer.h"
/*
# Why this Layout
This layout was based on Kinesis layout and other ErgoDox user layouts
available. It's target to be used on a MacOS but I'm pretty sure it can be
addapted to Windows and/or Linux easily.
## Function Key
The `fn` key work almost like it would in any other keyboard with the exception
it has a semi-sticky behavior. What does that mean?
Well, if you press the `fn` and release it, the keyboard will be put on the
_function layout_ and the next key stroke will be processed as if the `fn` key
was pressed. Aftwards, the leyout get back to _normal_. If you hold `fn` and
press any other key, when you release them, the keyboard leyout is back to
_normal_.
While pressing the `fn` with the left hand and strikeing the other keys on the
right hand is farly easy, the same cannot being said for the other keys on the
left side. So, instead of trying to do contorcionism with my left hand, I
decided to do a semi-sticky version of `fn`. This way, I can press the `fn`
key with my pinky, release it and press the `1` key to issue an `F1` to the
operating system.
## Key-Pad Key
The `key pad` key is a layout switch key. If pressed, it will put the keyboard
on the _key pad layout_ and stay there until key is pressed again.
This is used to make the keyboard behave mostly like a **num pad keyboard**.
## Notes
- Regardless in which layout you are, keys from other layouts are not
accessible. This means that if you are on the _key pad layout_, the left hand
will be pretty much unusable.
Of course that like anything else, there are exceptions to this rule.
Modifiers should remain accessible throughout the layers.
- The _shift key_ is, like the _function key_, also configured to have a sticky
behavior.
- All sticky keys have a timeout of 3 seconds.
*/
#define BASE 0
#define KEYPAD 1
#define FN 2
#define MACRO_TMUX_ESC 10
#define MACRO_TMUX_PASTE 11
#define MACRO_OSX_COPY 12
#define MACRO_OSX_PASTE 13
#define M_TESC M(MACRO_TMUX_ESC)
#define M_TPASTE M(MACRO_TMUX_PASTE)
#define M_OSXCPY M(MACRO_OSX_COPY)
#define M_OSXPST M(MACRO_OSX_PASTE)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Base Layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | `~ | 1 | 2 | 3 | 4 | 5 | ESC | | Pwr | 6 | 7 | 8 | 9 | 0 | - _ |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | Tab | Q | W | E | R | T | F16 | | F17 | Y | U | I | O | P | = + |
* |-----------+------+------+------+------+------| Meh | | Meh |------+------+------+------+------+-----------|
* | \ (Ctrl) | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " (Ctrl)|
* |-----------+------+------+------+------+------| F18 | | F19 |------+------+------+------+------+-----------|
* | LShift | Z | X | C | V | B | Hyper| | Hyper| N | M | , | . | / | RShift |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | FN | KPAD |LCtrl | LAlt | LGui | | RGui | RAlt | RCtrl| KPAD | FN |
* `-----------------------------------' `-----------------------------------'
* ,-------------. ,-------------.
* | M(0) | M(1) | | M(2) | M(3) |
* ,------|------|------| |------+------+------.
* | | | Home | | PgUp | | |
* |Backsp| Del |------| |------| Enter| Space|
* | | | End | | PgDn | | |
* `--------------------' `--------------------'
*
* M(0) = Ctrk+A Esc
* (this is used to issue the Esc key to the Tmux application)
* M(1) = Ctrk+A P
* (this is used to issue the Paste key to the Tmux application)
* M(2) = Cmd+C
* M(3) = Cmd+V
*/
[BASE]=KEYMAP(//left half
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MEH_T(KC_F16),
CTL_T(KC_BSLS), KC_A, KC_S, KC_D, KC_F, KC_G,
KC_FN2, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_F18),
KC_FN1, TG(KEYPAD), KC_LCTRL, KC_LALT, KC_LGUI,
M_TESC, M_TPASTE,
KC_HOME,
KC_BSPC, KC_DELT, KC_END,
//right half
KC_POWER, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
MEH_T(KC_F17), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTL_T(KC_QUOT),
ALL_T(KC_F19), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_FN2,
KC_RGUI, KC_RALT, CTL_T(KC_LBRC), KC_FN3, KC_FN1,
M_OSXCPY, M_OSXPST,
KC_PGUP,
KC_PGDN, KC_ENT, KC_SPC),
/* Keymap 1: KeyPad Layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | | | LClk | RClk | MClk | | | | BTab | Clear| / | * | ^ | ( | |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | M.Accel 2 | |ScrlUp| U |ScrlDn| | | | Tab | 7 | 8 | 9 | + | ) | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | M.Accel 1 | | L | D | R | |------| |------| 4 | 5 | 6 | - | | |
* |-----------+------+------+------+------+------| | |Return|------+------+------+------+------+-----------|
* | M.Accel 0 | |ScrlL | |ScrlR | | | | | 1 | 2 | 3 | = | | |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | XXXX | | | | | 0 | . | , | XXXX | |
* `-----------------------------------' `-----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | XXXX | |
* | | |------| |------| XXXX | |
* | | | | | | XXXX | |
* `--------------------' `--------------------'
*/
[KEYPAD]=KEYMAP(//left half
KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO,
KC_MS_ACCEL2, KC_NO, KC_MS_WH_UP, KC_MS_U, KC_MS_WH_DOWN, KC_NO, KC_NO,
KC_MS_ACCEL1, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO,
KC_MS_ACCEL0, KC_NO, KC_MS_WH_LEFT, KC_NO, KC_MS_WH_RIGHT, KC_NO, KC_NO,
KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_NO, KC_NO, KC_NO,
//right half
LSFT(KC_TAB), KC_CLEAR, KC_KP_SLASH, KC_KP_ASTERISK, KC_CIRCUMFLEX, KC_LPRN, KC_NO,
KC_TAB, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_RPRN, KC_NO,
KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, KC_NO, KC_NO,
KC_KP_ENTER, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_EQUAL, KC_NO, KC_NO,
KC_KP_0, KC_KP_DOT, KC_KP_COMMA, KC_TRNS, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_NO, KC_TRNS, KC_NO),
/* Keymap 2: Functions Layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | Vol. Up |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | | Stop | Rw | Rec | FF | | XXXX | | XXXX | | | | | | Vol. Down |
* |-----------+------+------+------+------+------| XXXX | | XXXX |------+------+------+------+------+-----------|
* | CapsLock | Eject| Prev | Play | Next | |------| |------| Left | Down | Up | Right| | Mute |
* |-----------+------+------+------+------+------| XXXX | | XXXX |------+------+------+------+------+-----------|
* | L Shift | | | | | | XXXX | | XXXX | | | | | | R Shift |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | XXXXX | | XXXX | XXXX | XXXX | | XXXX | XXXX | XXXX | | XXXXX |
* `-----------------------------------' `-----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*
* XXX = These keys are transparent keys that, when pressed, they issue the key from the previous layer.
*/
[FN]=KEYMAP(//left half
KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
KC_NO, KC_MEDIA_STOP, KC_MEDIA_REWIND, KC_MEDIA_SELECT, KC_MEDIA_FAST_FORWARD, KC_NO, KC_TRNS,
KC_CAPS, KC_MEDIA_EJECT, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_NO,
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,
KC_NO, KC_NO,
KC_NO,
KC_NO, KC_NO, KC_NO,
//right half
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLU,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD,
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO, KC_MUTE,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT,
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS,
KC_NO, KC_NO,
KC_NO,
KC_NO, KC_NO, KC_NO)};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_ONESHOT(FN),
[2] = ACTION_MODS_ONESHOT(MOD_LSFT), // Sticky shift light. Tap for the next keypress to be shifted. Hold for regular shift.
[3] = ACTION_LAYER_TAP_KEY(KEYPAD, KC_RBRC),
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
// MACRODOWN only works in this function
switch(id) {
case MACRO_TMUX_ESC:
if (record->event.pressed) {
return MACRO(D(LCTRL), T(A), U(LCTRL), D(ESC), END);
}
return MACRO(U(ESC), END);
case MACRO_TMUX_PASTE:
if (record->event.pressed) {
return MACRO(D(LCTRL), T(A), U(LCTRL), D(P), END);
}
return MACRO(U(P), END);
case MACRO_OSX_COPY:
if (record->event.pressed) {
return MACRO(D(LGUI), D(C), END);
}
return MACRO(U(C), U(LGUI), END);
case MACRO_OSX_PASTE:
if (record->event.pressed) {
return MACRO(D(LGUI), D(V), END);
}
return MACRO(U(V), U(LGUI), END);
}
return MACRO_NONE;
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
uint8_t current_layer = BASE;
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_led_all_off();
ergodox_led_all_set(LED_BRIGHTNESS_LO);
switch (layer) {
case BASE:
current_layer = BASE;
break;
case KEYPAD:
current_layer = KEYPAD;
break;
default:
// none
break;
}
// layer leds
if (current_layer == KEYPAD) {
ergodox_right_led_3_on();
}
// capslock
if (host_keyboard_leds() & (3<<USB_LED_CAPS_LOCK)) {
ergodox_right_led_1_on();
}
// Temporary leds
// The function layer takes over other layers and we need to reflect that on the leds.
// If the current layer is the BASE, we simply turn on the FN led, but if the current
// layer is the KEYPAD, than we must turn it off before turning on the FN led.
if (layer == FN && !has_oneshot_layer_timed_out()) {
ergodox_right_led_3_off();
ergodox_right_led_2_on();
}
// if the shifted is pressed I show the case led in a brighter color. This is nice to
// differenciate the shift from the capslock.
// Notice that I make sure that we're not using the shift on a chord shortcut (pressing
// shift togather with other modifiers).
if((keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) && // is shift pressed and there is no other
!(keyboard_report->mods & (~MOD_BIT(KC_LSFT) & ~MOD_BIT(KC_RSFT)))) || // modifier being pressed as well
(get_oneshot_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) && !has_oneshot_mods_timed_out())) { // or the one shot shift didn't timed out
ergodox_right_led_1_set(LED_BRIGHTNESS_HI);
ergodox_right_led_1_on();
}
};

@ -0,0 +1,4 @@
# I don't want my keyboard blinking lights when is suppose to be asleep.
SLEEP_LED_ENABLE = no
CONFIG_H = keymaps/$(KEYMAP)/config.h

@ -0,0 +1,77 @@
# Townk's Keymap
Trying to take care of an enjury on my arm I borrow an ergonomic keyboard from
a frient ([Kinesis Advantage](http://www.kinesis-ergo.com/shop/advantage-pro-for-pc-mac/)).
I really enjoyed my time with it but there were some anoyancies:
* The curvature on the keys bothered me since I'm a Vim user and using the
motion keys on my editor was awkard.
* I had to spend too much time remapping the keyboard to make some symbol keys
more accessible to me.
* The fact that my hands had to stay close to each other was a bit stressfull
to my sholders.
After a long research I find out that Ergodox EZ would be perfect for my needs
and purchase one. Before the keyboard even got in my hands I started to think
on the layout I would use on it and soon enough I planed couple adjustments
from the Kinesis I was using so far.
## The layout
Here are the layout mapping in images so you can have a glimpse on it:
![Base Layout](townk_osx_base.png)
![fn Layout](townk_osx_fn.png)
![Keypad & Mouse Layout](townk_osx_keypad.png)
Notice that, differently from the default behavior, my layer keys are not transparent
by default, which means that if you press any non-labeled white key, nothing will be
handled to the OS.
### One shot keys
It all started with the access to the function keys (F1, F2, F3...), since
those keys are located on a different layer I needed a way to press them with
minimal effort without disrupting my flow.
For me, togglihg a layer to press a button and than toggle it back is a waste
of time (although I admit it's a single tap from what I have), so I decided to
do it as a one shot key. I could press it and the next pressed key would be
handled by the target layer which just after it delivers the key to the OS it
would get back to the previous layer.
After setting up my layout to do just that I realized that occasionally I
would stop myseld on the middle of the process and the one shot layer would be
still triggered until I press any other key. So to prevent me from tapping
keys I don't want I added a timeout of 3 seconds for the one shot actions.
Ultimately I tested the shift key as a one shot one and really like it, so
here you have it, all the one shot keys on my layout.
## Glossary
If you're not familiar with the Mac symbols used on some keys, here is a
reference to them:
| Symbol | Description |
| :----: | ------------------- |
| ⌘ | Command |
| ⇪ | Caps Lock |
| ⇧ | Shift |
| ⌥ | Option (alt) |
| ⎋ | Esc |
| ⇥ | Tab forward |
| ⇤ | Tab backward |
| ⌃ | Control |
| ␣ | Space |
| ⌫ | Backspace |
| ⌦ | Delete |
| ⏎ | Enter |
| ⌤ | Return |
| ⌽ | Power on/off button |
| ↖ | Home |
| ↘ | End |
| ⇞ | Page up |
| ⇟ | Page down |
| ⌧ | Clear |

@ -0,0 +1,1166 @@
:100000000C9474020C94B8020C94B8020C94B802CC
:100010000C94B8020C94B8020C94B8020C94B80278
:100020000C94B8020C94B8020C94ED0C0C94BF0D17
:100030000C94141C0C94B8020C94B8020C94B802E2
:100040000C94B8020C94B8020C94B8020C94B80248
:100050000C94B8020C947C1C0C94B8020C94B8025A
:100060000C94B8020C94B8020C94B8020C94B80228
:100070000C94B8020C94B8020C94B8020C94B80218
:100080000C94B8020C94B8020C94B8020C94B80208
:100090000C94B8020C94B8020C94B8020C94B802F8
:1000A0000C94B8020C94B8020C94B8022C0E4E0EAC
:1000B0003C0F4E0E3C0F930EB60E3C0F0B0F1E0F57
:1000C00029122912551255129D12BB1237143714DA
:1000D000C61237147B137B132814371437143114CA
:1000E0008813881388138813881388138813881338
:1000F0008813881388138813881388138813881328
:100100009913A713AE13B513BF13021902E300012D
:10011000E3011900020602E30001E30106000213F5
:100120000001E00104020402E001130002290001C1
:10013000E00104020402E00129000000F4A2002210
:1001400030A135002B003171C200C10000001E003B
:10015000140004001D0001544D001F001A00160079
:100160001B00E0004C002000080007000600E20031
:100170002A002100150009001900E3004A002200AE
:1001800017000A00050000000A3029006B77000004
:100190006D7F00000B3066006C7700006E7F000002
:1001A0000C3023001C000B00110000000D30240057
:1001B00018000D001000E7004B0025000C000E0099
:1001C0003600E6002C00260012000F0037002F71C9
:1001D00028002700130033003800C3004E002D0014
:1001E0002E003471C200C10000000000FF00FE00BC
:1001F000FD00000000000000000000000000010001
:100200000000F400F900F200FB0000000000F5001F
:10021000F000F100000000000000F600FA00F3001A
:10022000FC000000000000000000000000000000D2
:1002300000000000000000000000000000002B0291
:100240002B0000005800000000009C005F005C00D4
:10025000590000000000540060005D005A00620078
:100260000000550061005E005B0063000000230297
:100270005700560067008500010026022702000093
:10028000000001000000000000000000000000006D
:100290000000000000003900E100010000003A0009
:1002A000AD00B0000000000000003B00BC00AC004E
:1002B0000000010000003C00AF00AE0000000100A3
:1002C00000003D00BB00AB000000010000003E004C
:1002D000000000000000000000003F0001000000DE
:1002E00001000000000040000100000001000000CB
:1002F000000041000000500000000000000042002B
:100300000000510000000100000043000000520006
:10031000000001000000440000004F000000010048
:100320000000450000000000000000000000A900DF
:10033000AA00A800E50001000000160345007200B5
:1003400067006F0044006F007800200045005A00ED
:10035000000016034500720067006F0044006F0044
:100360007800200045005A00000004030904090237
:100370006D00040100A0FA0904000001030101005E
:10038000092111010001223F000705810308000A2D
:1003900009040100010301020009211101000122E9
:1003A0004D000705820308000A090402000103004A
:1003B000000009211101000122360007058303080E
:1003C000000A0904030001030000000921110100D3
:1003D00001223900070584031000011201100100F9
:1003E000000008EDFE0713010001020001050109EC
:1003F00006A101050719E029E715002501950875F3
:1004000001810205081901290595057501910295DB
:10041000017503910105071900297715002501953C
:100420007875018102C005010980A10185021601CC
:100430000026B7001A01002AB70075109501810047
:10044000C0050C0901A1018503160100269C021AB2
:1004500001002A9C02751095018100C00501090266
:10046000A1010901A10005091901290515002501AE
:10047000950575018102950175038101050109301A
:1004800009311581257F9502750881060938158186
:10049000257F950175088106050C0A38021581250E
:1004A0007F950175088106C0C005010906A10105F7
:1004B0000719E029E71500250195087501810295C6
:1004C0000175088101050819012905950575019136
:1004D000029501750391010507190029FF150025F3
:1004E000FF950675088100C011241FBECFEFDAE02A
:1004F000DEBFCDBF04B603FE24C08091F30190910E
:10050000F401A091F501B091F6018730904BA7401E
:10051000B04BB9F41092F3011092F4011092F5016E
:100520001092F60114BE84B7877F84BF88E10FB6AE
:10053000F89480936000109260000FBEE0E0FFE34B
:10054000099511E0A0E0B1E0E0E9F8E402C005900F
:100550000D92A433B107D9F711E0A4E3B1E001C0D3
:100560001D92A33FB107E1F70E94330A0C94462481
:100570000C940000FC016B3079F018F46A3031F013
:100580001DC06C3079F06D3099F018C082818111F6
:1005900018C08CE291E008958281811115C08EE12E
:1005A00091E008958281811112C084E191E0089563
:1005B000828181110FC08AE091E0089580E090E08F
:1005C00008958FE291E0089581E291E0089589E134
:1005D00091E008958FE091E008950895CF936091A0
:1005E000B2017091B3018091B4019091B5010E9464
:1005F0007F1BC82F56985E9825982D9826982E9880
:1006000027982F988FE090E090938900809388003E
:1006100090938B0080938A0090938D0080938C0040
:10062000CC2329F0C13029F4C093340102C01092C8
:10063000340180913401813011F4279A2F9A0E945D
:10064000750F867011F0259A2D9AC23041F40E94E0
:10065000081A811104C027982F98269A2E9AE091A3
:100660000E01F0910F018081982F927259F08D7DCB
:1006700049F48FEF90E09093890080938800259A49
:100680002D9A08C00E94351B827221F00E94DB194E
:10069000882379F3CF9108950C94EE0256985E98D2
:1006A00025982D9826982E9827982F988FEF90E0D0
:1006B000909389008093880090938B0080938A00A8
:1006C00090938D0080938C00259A2D9A2FEF80E7D0
:1006D00092E0215080409040E1F700C00000269A4F
:1006E0002E9A2FEF80E792E0215080409040E1F772
:1006F00000C00000279A2F9A2FEF80E792E0215048
:1007000080409040E1F700C0000025982D982FEF21
:1007100080E792E0215080409040E1F700C0000067
:1007200026982E982FEF80E792E02150804090404D
:10073000E1F700C0000027982F9856985E982598FA
:100740002D9826982E9827982F98089589EA8093B7
:10075000800089E08093810024982C983F988AB18A
:100760008F748AB96E98479A8BB1806B8BB9769AE1
:100770000E944E030C94ED0280E280930001809170
:10078000350181110EC00E940B0481E08093350178
:100790002FEF83ED90E3215080409040E1F700C0BF
:1007A000000080E40E9411048093000181112EC09A
:1007B0000E943B0480930001811128C00E943B04E9
:1007C00080930001811122C08FE30E943B0480933B
:1007D000000181111BC00E94330480E40E941104B7
:1007E00080930001811112C08CE00E943B04809331
:1007F000000181110BC00E943B0480930001811114
:1008000005C08FE30E943B04809300010E943304E3
:100810008091000108951092B9008AE08093B80099
:10082000089594EA9093BC009091BC0097FFFCCF90
:100830009091B900987F983021F0903111F081E0CB
:1008400008958093BB0084E88093BC008091BC0035
:1008500087FFFCCF8091B900887F883111F0803408
:1008600071F780E0089584E98093BC008091BC001A
:1008700084FDFCCF08958093BB0084E88093BC0086
:100880008091BC0087FFFCCF9091B900987F81E0F8
:10089000983209F480E0089584E88093BC00809148
:1008A000BC0087FFFCCF8091BB00089580910001C0
:1008B000811115C080E40E94110480930001811110
:1008C0000CC082E10E943B0480930001811105C0AD
:1008D0008FEF0E943B04809300010E94330484B197
:1008E000807F84B985B1807F85B98AB1837F8AB9D9
:1008F0008BB1837F8BB93E98469808950E94BC03C4
:10090000809300010E94560480B38C7080BB81B339
:10091000836F81BBA7E3B1E0E5E4F1E08EE08E0FE9
:1009200011921D928E13FCCF0C94A603BF92CF920E
:10093000DF92EF92FF920F931F93CF93DF938091FB
:100940000001882379F0809136018F5F8093360112
:10095000811108C00E94BC0380930001811102C074
:100960000E944E0307E311E0C0E0D0E0DD24D39401
:1009700082E0C82EEE24E394F12CC730D10500F5B7
:1009800080910001811164C080E40E941104809371
:100990000001811112C082E10E943B04809300019A
:1009A00081110BC0C7010C2E01C0880F0A94EAF711
:1009B00080950E943B04809300010E94330448C04C
:1009C000CA30A1F028F4C83059F0C93061F005C030
:1009D000CC3089F070F0CD3089F0209A289810C082
:1009E000219A29980DC0229A2A980AC0239A2B98F6
:1009F00007C0529A01C0539A5B9802C03E9A46982B
:100A000090EA9A95F1F79FB1799902C082E001C00E
:100A100080E091709D25982B7C9902C084E001C0F4
:100A200080E0892B7D9902C038E001C030E0832B43
:100A30007E9902C020E101C020E0822B9FB19095F9
:100A4000991F9927991F9295990F907E892B0FC016
:100A500080910001811149C080E40E9411048093BB
:100A60000001882379F1B12C0E9433048B2DF80109
:100A70009081981719F08083C09201010E9456045A
:100A800021960F5F1F4FCE30D10509F076CF8091B0
:100A90000101882361F1815080930101882339F09D
:100AA0008FE99FE00197F1F700C0000020C0A5E4A6
:100AB000B1E0E7E3F1E0CF01825F91919D938E1366
:100AC000FCCF15C083E10E943B048093000181119B
:100AD000CACF81E40E941104809300018111C3CF29
:100AE0000E944C04B82EB094BFCF80E0C0CF0E94CB
:100AF0004C0381E0DF91CF911F910F91FF90EF9018
:100B0000DF90CF90BF900895E82FF0E0EB5BFE4FB1
:100B1000808108950895089596E0799FF001112449
:100B200094E5899FE00DF11D1124E60FF11DEE0FF4
:100B3000FF1FEE5BFE4F859194910895880F991FDA
:100B4000FC01E654F040859194910895880F991F17
:100B5000FC01E65CFE4F8591949108950F931F93DD
:100B6000CF93DF93EC018115904350F5C11580E2DE
:100B7000D80708F0B3C0CB3BD10590F4C83AD105F3
:100B800008F05AC0C53AD10508F04BC0C430D105B1
:100B900008F0CCC1219709F0C6C101E010E006C2FF
:100BA000CF3FD10511F008F0C1C1C03FD10508F019
:100BB00092C0CE01805E9109089708F4B7C1B3C115
:100BC000C11591E5D907A8F4C23020E5D20708F095
:100BD0009EC0C11580E5D80709F485C008F091C012
:100BE000C11520E4D20708F09EC1DD278E01106CEC
:100BF000DDC1C11580E8D80758F4C11590E7D907C1
:100C000008F08DC1C11520E6D20708F422C18BC1BE
:100C1000C11580E9D80708F086C1DF708E01106A1F
:100C2000C5C1C53AD10509F483C1C63AD10509F059
:100C300082C102E810E4BAC1C83AD10509F47EC104
:100C4000C93AD10509F47DC1CA3AD10509F47CC17C
:100C5000CB3AD10509F47BC1CC3AD10509F47AC16C
:100C6000CD3AD10509F479C1C03BD10509F478C169
:100C7000CE3AD10509F477C1CF3AD10509F476C14E
:100C8000C13BD10509F475C1C23BD10509F474C15A
:100C9000C33BD10509F473C1C43BD10509F472C14A
:100CA000C53BD10509F471C1C63BD10509F470C13A
:100CB000C73BD10509F46FC1C83BD10509F46EC12A
:100CC000C93BD10509F46DC1CA3BD10509F46CC11A
:100CD00000E014E46BC18E01106568C1CE019F7005
:100CE0000E94A60564C10E948B149FEF24E38CE050
:100CF000915020408040E1F700C000000E94A11CFC
:100D000055C18091D40181608093D4014FC10E946C
:100D10004A1E811102C00E94301E0E94671E90E090
:100D20009093F3018093F201C23090E5D90721F44A
:100D30008091F201816086C0C43020E5D20721F4A1
:100D40008091F20182607EC0C63080E5D80721F430
:100D50008091F201846076C0C83090E5D90719F41B
:100D60008091F20127C0CA3020E5D20721F480919A
:100D7000F201806167C0CC3080E5D80721F4809112
:100D8000F20180625FC0CE3090E5D90721F48091F6
:100D9000F201806457C0C03120E5D20721F4809170
:100DA000F20180684FC0C23180E5D80729F48091F4
:100DB000F2018460886046C0C33090E5D90721F411
:100DC0008091F2018E7F3EC0C53020E5D20721F42C
:100DD0008091F2018D7F36C0C73080E5D80721F4BD
:100DE0008091F2018B7F2EC0C93090E5D90719F4AC
:100DF0008091F20126C0CB3020E5D20721F480910A
:100E0000F2018F7E1FC0CD3080E5D80721F480919C
:100E1000F2018F7D17C0CF3090E5D90721F4809182
:100E2000F2018F7B0FC0C13120E5D20721F4809100
:100E3000F2018F7707C0C331D04531F48091F201C0
:100E40008B7F877F8093F2018091F2010E946B1E5D
:100E5000ADC08D2F99278F70992781309105D9F4D6
:100E60009E012370332702C0880F991F2A95E2F74D
:100E70009C688E0144E0000F111F4A95E1F700279E
:100E80001370802B912B53E0CC0FDD1F5A95E1F7A7
:100E9000C076DD272FC08230910531F4DC2FCC27BE
:100EA0008E01016F106A82C08330910569F4CE0112
:100EB0008370992701E010E002C0000F111F8A958E
:100EC000E2F7C8019C680FC084309105B9F4CE01E7
:100ED0008370992701E010E002C0000F111F8A956E
:100EE000E2F7C8019A6823E0CC0FDD1F2A95E1F7ED
:100EF000C07ED7708C010C2B1D2B58C085309105FE
:100F000031F4DC2FCC278E01046F106A4FC0069796
:100F100009F04CC0CF71DD27DC2FCC2701C0DF707A
:100F20008E01106243C000E010E040C08E013EC060
:100F300001E810E43BC003E810E438C002EE14E41A
:100F400035C009EE14E432C00AEE14E42FC005EBFC
:100F500014E42CC006EB14E429C007EB14E426C00B
:100F60000CEC14E423C00DEC14E420C003E815E4F9
:100F70001DC00AE815E41AC002E915E417C004E927
:100F800015E414C001E216E411C003E216E40EC039
:100F900004E216E40BC005E216E408C006E216E41B
:100FA00005C007E216E402C00AE216E4C801DF91B8
:100FB000CF911F910F91089596E0799FF001112430
:100FC00094E5899FE00DF11D1124E60FF11DEE0F50
:100FD000FF1FEE5BFE4F85919491803E9105E0F4FA
:100FE000803C910558F58133910509F46FC048F4B0
:100FF0008932910509F463C08A32910509F46DC004
:1010000072C089339105E9F082389105D1F08533BA
:10101000910509F44DC067C0833E910581F138F414
:10102000803E9105B9F0823E9105D9F05CC0863EC4
:10103000910561F1873E9105A1F155C00E949E0581
:1010400008952091F20120FD02C021FF4CC080EEE6
:1010500090E049C08091F20180FFF9CF89E390E0F0
:1010600042C08091F20182FF0EC08091F20184FFA4
:1010700003C080E090E037C083EE90E034C0809100
:10108000F20182FFF2CF82EE90E02DC08091F2015A
:1010900083FF0BC08091F20184FDEBCF87EE90E0DF
:1010A00022C08091F20183FFF5CF86EE90E01BC055
:1010B0008091F20185FF07C089E290E014C0809121
:1010C000F20185FFF9CF85E390E00DC08091F20138
:1010D00086FF07C08AE290E006C08091F20186FF99
:1010E000F9CF81E390E00E94AE05089508950C9435
:1010F0007608809163010895CF93DF9300D01F920B
:10110000CDB7DEB79C018091E901843019F593E0F9
:1011100099833B832A839093E9008FEF9091E800B5
:10112000815095FD06C095ED9A95F1F7000081116B
:10113000F5CF8091E80085FF0DC040E050E063E00E
:1011400070E0CE0101960E94DD0A8091E8008E7762
:101150008093E8000F900F900F90DF91CF9108954A
:10116000CF93DF9300D01F92CDB7DEB72091E90176
:10117000243021F522E029839B838A8383E08093B6
:10118000E9008FEF9091E800815095FD06C095ED44
:101190009A95F1F700008111F5CF8091E80085FF65
:1011A0000DC040E050E063E070E0CE0101960E9487
:1011B000DD0A8091E8008E778093E8000F900F9011
:1011C0000F90DF91CF9108952091E9012430F1F43F
:1011D00022E02093E9002FEF3091E800215035FD07
:1011E00006C035ED3A95F1F700002111F5CF2091B9
:1011F000E80025FF0BC040E050E065E070E00E9491
:10120000DD0A8091E8008E778093E8000895CF93FF
:10121000DF93EC019091E901943009F046C0809190
:101220000C018823D9F080910D018823B9F09093A7
:10123000E9008FEF9091E800815095FD06C095E19F
:101240009A95F1F700008111F5CF8091E80085FFB4
:101250002CC040E050E060E170E017C081E0809376
:10126000E9008FEF9091E800815095FD06C095ED63
:101270009A95F1F700008111F5CF8091E80085FF84
:1012800014C040E050E068E070E0CE010E94DD0A4A
:101290008091E8008E778093E80080E1FE01A3E56D
:1012A000B1E001900D928A95E1F7DF91CF91089519
:1012B0008091E801811109C00E94720C0E94CF0C3C
:1012C0008091E20084608093E20008951092E8012A
:1012D0000895089508950C940E1C42E061EC81E09D
:1012E0000E94EC0B42E061EC82E00E94EC0B42E0D9
:1012F00061EC83E00E94EC0B42E161EC84E00C9431
:10130000EC0B8091EB01833009F455C030F481304F
:1013100071F0823009F48EC008958A3009F47AC0E1
:101320008B3009F460C0893009F09CC020C08091E6
:10133000EA01813A09F096C08091E800877F8093A6
:10134000E8008091EE019091EF01892B21F460E19A
:1013500083E591E003C060E080E090E070E00E94EF
:10136000280B8091E8008B778093E80008958091A6
:10137000EA01813209F076C08091EE019091EF018F
:10138000009719F0039709F06DC08091E800877FFE
:101390008093E8008091E80082FD05C08091E9011A
:1013A0008111F8CF5FC08091F1008093630180913B
:1013B000E8008B7753C08091EA01813A09F052C06E
:1013C0008091EE019091EF01892B09F04BC0809143
:1013D000E800877F8093E8008091E80080FFFCCFE1
:1013E00080910C0136C08091EA018132D9F580915B
:1013F000EE019091EF01892BA9F58091E800877F9C
:101400008093E8000E94210C8091EC0180930C01F4
:101410000C948B148091EA01813221F58091E800CF
:10142000877F8093E8000E94210C8091ED018093DA
:10143000640108958091EA01813AA1F48091E80065
:10144000877F8093E8008091E80080FFFCCF809147
:1014500064018093F1008091E8008E778093E8002A
:101460000C94210C089584B7877F84BF88E10FB660
:10147000F89480936000109260000FBE90E080E8C6
:101480000FB6F89480936100909361000FBE0E94A4
:10149000C40F0E94720C0E94CF0C8091E200846005
:1014A0008093E20078940E94550F0E94C60F82E05C
:1014B00091E00E94700F8091E901853069F40E94EB
:1014C000CF1B8091E7018823B1F30E94FA1B882388
:1014D00091F30E94C70AEFCF0E94CC0FECCF292FC7
:1014E000332723303105C9F064F42130310581F010
:1014F0002230310509F043C08DE690E02EE633E05E
:1015000042C021323105F1F02232310541F137C0BC
:1015100082E190E02BED33E036C0992781309105D0
:1015200041F08230910541F0892B49F5EAE6F3E07C
:1015300005C0E2E5F3E002C0EAE3F3E0849190E065
:101540009F0121C06430D8F4E62FF0E0EE0FFF1FBA
:10155000EE5DFE4F2081318189E090E014C064305F
:1015600070F470E0FB01EE0FFF1FE65EFE4F20817E
:101570003181FB01EA5EFE4F808190E004C080E093
:1015800090E020E030E0FA0131832083089580E18B
:1015900089BD82E189BD09B400FEFDCF8091D800EC
:1015A0008F7D8093D8008091E00082608093E0007E
:1015B0008091E00081FDFCCF0895CF92DF92EF9201
:1015C000FF920F931F93CF93DF93EC018B016A017E
:1015D0000E94400C811133C0C114D10439F0F601CE
:1015E00080819181081B190BC80FD91FE12CF12CA8
:1015F0000115110519F18091E80085FD16C0809153
:10160000E8008E778093E800C114D10449F0F60118
:1016100080819181E80EF91EF182E08285E00FC0A1
:101620000E94400C882321F30AC089918093F10025
:1016300001501109FFEFEF1AFF0ADACF80E0DF91C6
:10164000CF911F910F91FF90EF90DF90CF90089571
:101650002091F0013091F1012617370748F061150C
:10166000710539F42091E8002E772093E80001C03D
:10167000B90140E061157105A9F12091E90122232A
:1016800009F443C0253009F442C02091E80023FD4D
:1016900040C02091E80022FD32C02091E80020FFE8
:1016A000E9CF4091F3002091F20030E0342BFC01AF
:1016B000CF016115710559F02830310540F4819151
:1016C0008093F100615071092F5F3F4FF1CF41E0EE
:1016D0002830310509F040E02091E8002E77209372
:1016E000E800C8CF4111C9CF0AC08091E901882321
:1016F00061F0853061F08091E80083FD0AC080913F
:10170000E80082FFF2CF80E0089582E0089583E050
:10171000089581E008952091F0013091F10126179C
:10172000370748F06115710539F42091E8002E77EC
:101730002093E80001C0B901FC0120E061157105AA
:1017400091F18091E901882309F440C0853009F4C2
:101750003FC08091E80083FD3DC08091E80082FD9C
:101760002FC08091E80080FFE9CF2091F3008091A5
:10177000F20090E0922B6115710559F088309105C7
:1017800040F424912093F100319661507109019643
:10179000F2CF21E0089709F020E08091E8008E77F1
:1017A0008093E800CBCF2111CCCF0AC08091E90112
:1017B000882361F0853061F08091E80083FD0AC0E4
:1017C0008091E80082FFF2CF80E0089582E00895E2
:1017D00083E0089581E00895982F973058F590930D
:1017E000E900981739F07091EC002091ED005091CC
:1017F000F00003C0242F762F50E021FF19C0309154
:10180000EB003E7F3093EB003091ED003D7F309355
:10181000ED003091EB0031603093EB007093EC0001
:101820002093ED005093F0002091EE0027FF07C0B9
:101830009F5FD3CF8F708093E90081E0089580E0AF
:1018400008958091EA0187FF11C08091E80082FD30
:1018500005C08091E9018111F8CF11C08091E800A5
:101860008B770BC08091E901882349F08091E800D3
:1018700080FFF8CF8091E8008E778093E80008958C
:101880002091E4003091E50095E64091EC00842F32
:10189000817040FF22C08091E80080FD1CC08091D3
:1018A000E901882391F0853091F08091EB0085FD6E
:1018B00010C04091E4005091E5004217530729F30E
:1018C0009A01915011F784E0089582E0089583E031
:1018D000089581E0089580E008954091E80042FF76
:1018E000DECF08950E94E00C0E94E80CE0EEF0E0EC
:1018F000808181608083E8EDF0E080818F77808354
:1019000019BCA7EDB0E08C918E7F8C9380818F7E87
:1019100080831092E80108950F931F93CF93DF9374
:101920000E94E00C0E94E80CC8EDD0E088818F771F
:10193000888388818068888388818F7D888319BCAB
:101940001092E9011092E5011092E7011092E60170
:1019500000EE10E0F80180818B7F808388818160B8
:10196000888342E060E080E00E94EC0BE1EEF0E072
:1019700080818E7F8083E2EEF0E0808181608083D1
:10198000808188608083F80180818E7F8083888158
:1019900080618883DF91CF911F910F910895E8EDC9
:1019A000F0E080818F7E8083E7EDF0E080818160D0
:1019B000808384E082BF81E08093E8010C948C0CEA
:1019C000E8EDF0E080818E7F80831092E200089540
:1019D0001092DA001092E10008951F920F920FB654
:1019E0000F9211242F933F934F935F936F937F93A5
:1019F0008F939F93AF93BF93EF93FF938091E100F9
:101A000082FF0BC08091E20082FF07C08091E1005D
:101A10008B7F8093E1000E94540F8091DA0080FF59
:101A20001FC08091D80080FF1BC08091DA008E7F9C
:101A30008093DA008091D90080FF0DC080E189BDDC
:101A400082E189BD09B400FEFDCF81E08093E90108
:101A50000E94580905C019BC1092E9010E9466094C
:101A60008091E10080FF19C08091E20080FF15C0E5
:101A70008091E2008E7F8093E2008091E20080619D
:101A80008093E2008091D80080628093D80019BCD6
:101A900085E08093E9010E946A098091E10084FF5A
:101AA00030C08091E20084FF2CC080E189BD82E1DA
:101AB00089BD09B400FEFDCF8091D8008F7D809351
:101AC000D8008091E1008F7E8093E1008091E20058
:101AD0008F7E8093E2008091E20081608093E2003B
:101AE0008091E501882311F084E007C08091E30034
:101AF00087FD02C081E001C083E08093E9010E947C
:101B00006B098091E10083FF29C08091E20083FF8F
:101B100025C08091E100877F8093E10082E080937F
:101B2000E9011092E5018091E1008E7F8093E10050
:101B30008091E2008E7F8093E2008091E2008061DC
:101B40008093E20042E060E080E00E94EC0B809134
:101B5000F00088608093F0000E946909FF91EF9186
:101B6000BF91AF919F918F917F916F915F914F91B5
:101B70003F912F910F900FBE0F901F9018951F92BD
:101B80000F920FB60F9211242F933F934F935F93B1
:101B90006F937F938F939F93AF93BF93CF93DF9375
:101BA000EF93FF93C091E900CF708091EC00D82FA4
:101BB000D17080FDD0E81092E9008091F000877F1D
:101BC0008093F00078940E94030E1092E9008091B7
:101BD000F00088608093F000CD2BCF70C093E900B7
:101BE000FF91EF91DF91CF91BF91AF919F918F9135
:101BF0007F916F915F914F913F912F910F900FBE09
:101C00000F901F9018951F93CF93DF93CDB7DEB73A
:101C1000AA970FB6F894DEBF0FBECDBFEAEEF1E093
:101C200088E08E0F9091F10091938E13FBCF0E946C
:101C300081098091E80083FF1FC18091EA019091A2
:101C4000EB01492F50E04A30510508F015C1FA0167
:101C5000EA5AFF4F0C94F623803881F0823809F05D
:101C60000BC18091EE018F708093E9008091EB00B1
:101C700085FB882780F91092E90006C08091E60173
:101C80009091E701911182609091E800977F909385
:101C9000E8008093F1001092F100C8C0282F2D7F3A
:101CA00009F0EAC0882319F0823061F0E5C0809124
:101CB000EC01813009F0E0C0933009F080E08093BE
:101CC000E7012BC08091EC01811127C08091EE01CA
:101CD0008F7009F4D1C08093E9002091EB0020FFC0
:101CE0001CC0933021F48091EB00806214C090916D
:101CF000EB0090619093EB0021E030E0A90102C07D
:101D0000440F551F8A95E2F74093EA001092EA00CB
:101D10008091EB0088608093EB001092E900809145
:101D2000E800877F86C08111A7C01091EC011F7762
:101D30008091E3008078812B8093E3008091E8001C
:101D4000877F8093E8000E94210C8091E80080FF4B
:101D5000FCCF8091E30080688093E300111102C002
:101D600082E001C083E08093E90186C08058823020
:101D700008F082C08091EC019091ED018C3D53E020
:101D8000950779F583E08A838AE289834FB7F894CF
:101D9000DE01139620E03EE051E2E32FF0E05093A5
:101DA0005700E49120FF03C0E295EF703F5FEF70B2
:101DB0008E2F90E0EA3010F0C79601C0C0968D9348
:101DC0009D932F5F243149F74FBF8091E800877FB3
:101DD0008093E8006AE270E0CE0101960E94280B31
:101DE00014C0AE014F5F5F4F6091EE010E946F0A19
:101DF000BC01892B09F440C09091E800977F909333
:101E0000E80089819A810E948B0B8091E8008B7792
:101E10008093E80031C0803879F58091E800877FB1
:101E20008093E8008091E5018093F1008091E800C3
:101E30008E778093E8000E94210C1EC081111CC087
:101E40009091EC019230C0F48091E800877F8093FC
:101E5000E8009093E5010E94210C8091E501811139
:101E600006C08091E30087FD02C081E001C084E0EC
:101E70008093E9010E946D098091E80083FF0AC008
:101E80008091E800877F8093E8008091EB0080627A
:101E90008093EB00AA960FB6F894DEBF0FBECDBFBD
:101EA000DF91CF911F9108950895CF938091E9011B
:101EB0008823A1F0C091E900CF709091EC00892FA8
:101EC000817090FD80E8C82B1092E9008091E800B5
:101ED00083FD0E94030ECF70C093E900CF91089557
:101EE00090936A01809369010895E0916901F091EE
:101EF0006A01309721F00190F081E02D099480E093
:101F00000895E0916901F0916A01309721F0028013
:101F1000F381E02D09940895E0916901F0916A013F
:101F2000309721F00480F581E02D099408952091E7
:101F30006701309168018217930771F090936801EF
:101F400080936701E0916901F0916A01309721F077
:101F50000680F781E02D0994089520916501309164
:101F600066018217930771F0909366018093650173
:101F7000E0916901F0916A01309721F00084F185C8
:101F8000E02D0994089508950C94C30F0E943D1C00
:101F90000E947E040C94031DCF92DF92EF92FF9279
:101FA0000F931F93CF93DF93CDB7DEB72B970FB669
:101FB000F894DEBF0FBECDBF0E9496048CE6C82EFB
:101FC00081E0D82E00E010E0E02E802F0E948405F2
:101FD000F60141916F01F42EF826B1F40F5F1F4F07
:101FE0000E30110589F78FEF89838A831B820E9447
:101FF000461C8160782F9D838C8349815A816B8137
:102000008D810E946F1040C09091D40191FF04C057
:102010008B870E948A058B8520E030E04F2D50E0B1
:10202000922FBA01022E02C0759567950A94E2F7C5
:1020300060FF24C02E83EF8221E030E0690102C0FE
:10204000CC0CDD1C9A95E2F790E08C219D21892B28
:1020500009F420E028870E94461C8160782F9A8727
:1020600089874E815F8168858A850E946F10F8019B
:10207000E459FE4F8081C826C08206C02F5F3F4FC3
:102080002630310569F6AACF0E94EA1F10916B0134
:102090000E94750F1817A1F00E94750F80936B01B5
:1020A0002B960FB6F894DEBF0FBECDBFDF91CF9158
:1020B0001F910F91FF90EF90DF90CF900C947708D5
:1020C0002B960FB6F894DEBF0FBECDBFDF91CF9138
:1020D0001F910F91FF90EF90DF90CF900895CF93D5
:1020E000DF93CDB7DEB72B970FB6F894DEBF0FBEE8
:1020F000CDBF4F83588769877A878B87DE0111961A
:1021000086E0FD0111928A95E9F785E0FE01379698
:1021100001900D928A95E1F749815A816B817C810A
:102120008D819E810E9429172B960FB6F894DEBFF1
:102130000FBECDBFDF91CF9108950895CF9388232F
:1021400009F4C2C0C82F823859F40E94750F81FD6E
:10215000BBC089E30E946C1A0E94491B89E30CC032
:10216000833879F40E94750F80FDAEC083E50E942C
:102170006C1A0E94491B83E50E94AE1ACF910C9401
:10218000491B843859F40E94750F82FD9DC087E475
:102190000E946C1A0E94491B87E4EECF8CEF8C0FD3
:1021A000813A48F48C2F0E94252281118DC08C2FFA
:1021B0000E946C1AE3CF80E28C0F883048F4C7701D
:1021C00081E001C0880FCA95EAF70E94F51AD6CFC0
:1021D0008BE58C0F833078F4C53A29F0C63A31F09C
:1021E00083E890E005C081E890E002C082E890E0DA
:1021F000CF910C94970F88E58C0F833108F064C061
:10220000C83A39F1C93A41F1CA3A49F1CB3A51F1E8
:10221000CC3A59F1CD3A61F1C03B69F1CE3A71F156
:10222000CF3A79F1C13B81F1C23B89F1C33B91F1D6
:10223000C43B99F1C53BA1F1C63BA9F1C73BB1F144
:10224000C83BB9F1C93BC1F1CA3BC9F180E090E09C
:1022500038C082EE90E035C089EE90E032C08AEE60
:1022600090E02FC085EB90E02CC086EB90E029C079
:1022700087EB90E026C08CEC90E023C08DEC90E0E2
:1022800020C083E891E01DC08AE891E01AC082E98D
:1022900091E017C084E991E014C081E292E011C09E
:1022A00083E292E00EC084E292E00BC085E292E00D
:1022B00008C086E292E005C087E292E002C08AE2AE
:1022C00092E0CF910C94AD0FCF910895882309F43B
:1022D0004BC0823859F40E94750F81FF45C089E3D5
:1022E0000E946C1A0E94491B89E30CC0833871F468
:1022F0000E94750F80FF38C083E50E946C1A0E940F
:10230000491B83E50E94AE1A0C94491B843859F48A
:102310000E94750F82FF28C087E40E946C1A0E94F9
:10232000491B87E4EFCF9CEF980F913A58F390E266
:10233000980F983050F4877091E001C0990F8A95FA
:10234000EAF7892F0E94FB1ADFCF9BE5980F9330A5
:1023500020F480E090E00C94970F885A833120F4A9
:1023600080E090E00C94AD0F0895882321F00E9446
:10237000F51A0C94491B0895882321F00E94FB1A3A
:102380000C94491B08952F923F924F925F927F9237
:102390008F929F92AF92BF92CF92DF92EF92FF9275
:1023A0000F931F93CF93DF9300D000D01F92CDB730
:1023B000DEB725E0FC01DE01119601900D922A9511
:1023C000E1F7FC0100811181F280E580E2943FE0B9
:1023D000E32223813481232B09F472C21F3F19F4B5
:1023E0000F3F09F46DC26C010E94081A882319F08E
:1023F00082E00E944A1AC6010E949D1009831A8336
:1024000069817A818F2D0E94CE198C010E948319D7
:102410000E944A18F1100E94121B0E94651A88231C
:1024200079F0FF2069F080E2800F883048F082E088
:102430000E944A1A0E94651A91E0782E792601C0FE
:10244000712CE12FE295EF70F0E0E05AFF4F0C9411
:10245000F623812F807F1F70882311F01295107F43
:10246000FF2089F0112309F4E8C180E2800F883051
:1024700020F4812F0E94F51A03C0812F0E94051BB2
:102480000E94491BDAC1802F0E946611112309F4B2
:10249000EEC1005E812F083018F40E94FB1A02C0C2
:1024A0000E940B1B0E94491BE2C1812F807F1F707D
:1024B000803211F01295107F002319F0013049F19C
:1024C00032C0FF2091F0EE2091F1F1E0EF1204C054
:1024D000812F0E94251BCBC122E0E21228C00E945E
:1024E0002E1B812F0E94D51922C0EE2079F031E0F9
:1024F000E31208C00E94F21A812309F4B8C10E94B5
:10250000D81904C042E0E41609F4B1C10E942E1BA0
:1025100012C0FF2029F051E05E1508F4A8C107C0E1
:10252000E110A5C108C0FF2021F0E11086C1812F74
:10253000F7C0E11089C1812FF9C0812F869586955A
:10254000837090E0009719F0019759F090C1FF2037
:1025500019F0C801937002C080E090E00E94970FCC
:1025600086C1FF2019F0C801937002C080E090E09E
:102570000E94AD0F7CC1802FFF2019F00E94F21E37
:1025800002C00E945A1F0E94DF1F71C1812F8370F9
:1025900009F055C0F1106BC1802F82958695877028
:1025A000880F880F902F9F70492F50E060E070E0F7
:1025B0001A012B01082E04C0220C331C441C551C8C
:1025C0000A94D2F704FF15C02FE0822E912CA12C83
:1025D000B12CA501940104C0220F331F441F551FC5
:1025E0008A95D2F7CA01B90160957095809590954A
:1025F00003C060E070E0CB01169516951370412F73
:1026000050E04230510569F04330510589F06229AC
:102610007329842995294130510571F00E94711860
:1026200026C162297329842995290E948D181FC10A
:102630000E947118C201B1010E94551818C1FF20F3
:1026400019F0812F817001C08695882309F40FC18C
:10265000802F829586958770880F880F902F9F70A6
:10266000492F50E060E070E01A012B01082E04C0F1
:10267000220C331C441C551C0A94D2F704FF15C0CD
:102680009FE0892E912CA12CB12CA501940104C0AE
:10269000220F331F441F551F8A95D2F7CA01B90173
:1026A000609570958095909503C060E070E0CB01D7
:1026B000169516951370412F50E04230510569F080
:1026C0004330510589F062297329842995294130C5
:1026D000510571F00E944B19CAC0622973298429DF
:1026E00095290E946719C3C00E944B19C201B1010C
:1026F0000E942F19BCC0802F90E0FC01E05EF10920
:10270000E531F10508F094C0E059FF4F0C94F62331
:102710000F70812F8F71FF2031F00E94C818802F19
:102720000E94B511A4C00E94E918802F0E94BC111C
:102730009EC0FF2039F0E1109AC0812F8F710E9456
:102740000E1995C031E03E1508F491C0F6CFFF2078
:1027500039F0812F8F710E94C81889C0FF20C9F3FA
:10276000812F8F710E94E91882C0FF2029F0812FEC
:102770008F710E94B3187BC00E94A91878C0FF20F7
:10278000C1F00E94D2190E94FB1A0E94041A8430E0
:1027900029F40E94431A812F8F717AC041E04E15AF
:1027A00008F48EC01F71812F0E94C81863E0812F2A
:1027B0000EC00E94D2190E94F51A51E05E15F8F47D
:1027C0000E94431A0E94D81964E0812F8F710F90E4
:1027D0000F900F900F900F90DF91CF911F910F915D
:1027E000FF90EF90DF90CF90BF90AF909F908F9031
:1027F0007F905F904F903F902F900C94331A81E020
:102800000F900F900F900F900F90DF91CF911F912D
:102810000F91FF90EF90DF90CF90BF90AF909F907F
:102820008F907F905F904F903F902F900C944A1A1A
:10283000FF2039F0EE2009F48CCF802F0E949E10EB
:1028400016C0EE2009F48CCF802F0E9466110FC0B5
:10285000412F4F70602FC6010E94BA020E94CD170F
:1028600006C0412F4F70602FC6010E948B05772054
:1028700039F10E94041A80FD23C0F60112820E94E1
:10288000FE190E94C818C6010E94C3110E94FE19B9
:102890000F900F900F900F900F90DF91CF911F919D
:1028A0000F91FF90EF90DF90CF90BF90AF909F90EF
:1028B0008F907F905F904F903F902F900C94E918ED
:1028C0000F900F900F900F900F90DF91CF911F916D
:1028D0000F91FF90EF90DF90CF90BF90AF909F90BF
:1028E0008F907F905F904F903F902F9008950E941F
:1028F000121B0E94221B0E94E41A0E94491B0E9484
:1029000090200E94DF1F80E090E00E94970F80E0FF
:1029100090E00C94AD0F0E94021B0C9477140E945F
:10292000C319292F22952F7030E02C3031054CF43B
:102930002A3031056CF42250310922303105A8F4D7
:1029400007C02C30310569F02F30310551F00DC032
:10295000803F69F018F4803E40F409C0843F29F4B8
:1029600006C093FB882780F9089580E0089581E0F0
:102970000895CF93DF9300D000D01F92CDB7DEB77C
:102980000F900F900F900F900F90DF91CF910895BF
:10299000CF93DF9300D000D000D0CDB7DEB726961E
:1029A0000FB6F894DEBF0FBECDBFDF91CF91089573
:1029B0001F93CF93DF93C0917A0116E080917B0142
:1029C000C81799F0D0E01C9FF0011D9FF00D112455
:1029D000E458FE4F408151816281738184819581E9
:1029E0000E94C8142196C770E9CFDF91CF911F9143
:1029F00008954091AC015091AD016091AE0170918C
:102A0000AF018091B0019091B1010C94C8148091F4
:102A1000B10182958F7009F054C08091AE01882376
:102A200009F44FC080917A01A0917B016091AC01C3
:102A30007091AD014091AF015091B001B6E08A179D
:102A400009F43FC090E041155105C1F17F3F11F4F9
:102A50006F3FA1F1B89FF001B99FF00D1124E45828
:102A6000FE4F218172132AC02081621327C0228168
:102A7000211124C0238134812417350710F42150FB
:102A80003109241B350B283C3105C0F42091B101DC
:102A90002F7020612093B10126E0289FF001299F2B
:102AA000F00D1124EF57FE4F80818F70806180837D
:102AB0008CEA91E00E94C3110C94D814019687709F
:102AC000BECF0895CF92DF92EF92FF920F931F93A4
:102AD000CF93DF93CDB7DEB762970FB6F894DEBF22
:102AE0000FBECDBF8C0185E0F801DE011D9601907F
:102AF0000D928A95E1F7D8014C9111965C9111974E
:102B000012966C9112971396CD90DC901497309199
:102B1000AC017091AD018091AF019091B00100972F
:102B200009F46BC17F3F19F43F3F09F466C1E0909F
:102B3000AE01EE2009F4C0C02091B101C816D9063B
:102B400028F0F601E81BF90BCF0104C080959095A1
:102B50008C0D9D1DFF24F394883C910578F0F12C99
:102B6000207F09F0C6C07C2DD98AC88A89890E9435
:102B7000B9148CEA91E00E94C311B1C0822F807F0A
:102B800009F046C0751314C0341312C0611110C08F
:102B90002F7020612093B1010E94F9148CEA91E01A
:102BA0000E94C3118091B101D80115968C932EC05B
:102BB000CD2819F15F3F11F44F3FF9F0F62E611166
:102BC0001CC080917A0120917B0136E0821709F4C4
:102BD0005AC090E0389FF001399FF00D1124E4585D
:102BE000FE4F7181571306C07081471303C0728175
:102BF000711103C001968770E9CFF62E662309F4A0
:102C000018C18091B10181608093B101F12C11C193
:102C1000751308C0341306C0611104C08091B1015E
:102C2000D801C3C04D875E878D859E856A8B0E94C3
:102C30008F146A898823E1F16623D1F12091B101D3
:102C4000822F82958F7090E0029774F08091AC0192
:102C50009091AD0198878F831986DB86CA862C8771
:102C6000CE0107960E94C31186E0F801ACEAB1E0FC
:102C700001900D928A95E1F70E9407150E94F914C0
:102C8000FF24F394D6C04D875E878D859E850E9474
:102C9000C319292F22952F7030E0223031050CF016
:102CA000BCC09F7009F0B6C0805E883008F4C1C017
:102CB000C8010E94C311E4CFC816D90608F453C056
:102CC000F601E81BF90BCF01883C910508F450C0D0
:102CD000F12C7C2DD98AC88A89890E94B914ECEA22
:102CE000F1E086E0DF011D928A95E9F70E94F91470
:102CF000A0C0751314C0341312C0611110C08091AC
:102D0000B101F8018583C8010E94C31186E0ECEA95
:102D1000F1E0DF011D928A95E9F7FE2C8AC04D870C
:102D20005E878D859E856A8B0E948F146A898823B1
:102D300009F4BECF662309F4BBCF2091B101822FE5
:102D400082958F7090E002970CF48ECF8091AC0149
:102D50009091AD019A8389831B82DD82CC822E8380
:102D6000CE0101967FCF809590958C0D9D1DACCFA7
:102D7000F62E662309F49CCF75132EC034132CC095
:102D80002091B10120FD1FC0822F82958F70D9F054
:102D9000D80115962C9315978F3049F08F5F982F97
:102DA0009295907F822F8F70892B15968C93C801F6
:102DB0000E94C31186E0F801ACEAB1E001900D92E7
:102DC0008A95E1F793CF86E0F801ACEAB1E0019093
:102DD0000D928A95E1F72DC04D875E878D859E8582
:102DE0000E948F14811140CF8091B1018160809346
:102DF000B101C8010E94C3111CC0662309F458CF59
:102E00004D875E878D859E850E948F14882309F4E7
:102E10004FCF2ACF811148CF0CC0243031050CF0A0
:102E200047CF9F7009F440CFF8019581907F09F05A
:102E30003BCF8F2D62960FB6F894DEBF0FBECDBF8D
:102E4000DF91CF911F910F91FF90EF90DF90CF9086
:102E500008951F93CF93DF93CDB7DEB72C970FB6AE
:102E6000F894DEBF0FBECDBF4F83588769877A873E
:102E70008B879C87CE0107960E946215882369F094
:102E80008F8198852A853B85232BF1F19F3F09F09F
:102E900063C08F3F09F060C037C086E0FE013796FF
:102EA000DE01119601900D928A95E1F76F81788588
:102EB000EA85FB85309741F17F3F11F46F3F21F1A7
:102EC00020917B0130E0C9010196877099274091DC
:102ED0007A0150E08417950709F447C069837A8323
:102EE000FD83EC8396E0929FD001939FB00D112457
:102EF000A458BE4FFE01319601900D929A95E1F7CC
:102F000080937B010E94D81416E080917A01909101
:102F10007B018917C1F1189FC001112484589E4F6D
:102F20000E946215882379F1E0917A011E9FF001D9
:102F30001124E458FE4F4081518162817381848164
:102F400095810E94C81480917A0190E00196877063
:102F5000992780937A01D9CF4F81588569857A85E1
:102F60008B859C850E94C814CFCF0E948B14109231
:102F70007B0110927A01ECEAF1E086E0DF011D921C
:102F80008A95E9F7C1CF2C960FB6F894DEBF0FBE35
:102F9000CDBFDF91CF911F910895EF92FF920F93D4
:102FA0001F93CF93DF938C01892B09F46CC0F12C14
:102FB000EE24E394E8012196F8018491843740F4EB
:102FC000843008F051C0813081F0823019F15BC04B
:102FD000853709F444C0A8F19CE7980F903708F0B2
:102FE00052C08F770E94661141C00E5F1F4FFE01D5
:102FF000C49180E28C0F883048F4C7708E2D01C0D8
:10300000880FCA95EAF70E94151B14C08C2F0E94E6
:103010009E102DC00E5F1F4FFE01C49180E28C0FE9
:10302000883058F4C7708E2D01C0880FCA95EAF712
:103030000E941B1B0E94491B1AC08C2F0E94661104
:1030400016C00E5F1F4FFE01C491CC2381F08FE9A3
:103050009FE00197F1F700C00000C150F6CF0E5F6E
:103060001F4FFE01F49003C00E949E108E018F2D11
:10307000882309F49FCFEFE9FFE03197F1F700C013
:1030800000008150F5CFDF91CF911F910F91FF90FC
:10309000EF90089508956093B6017093B7018093FF
:1030A000B8019093B9010C9477140F931F9300917A
:1030B000B6011091B7012091B8013091B901DC013E
:1030C000CB01802B912BA22BB32B8093B601909335
:1030D000B701A093B801B093B9011F910F910C945F
:1030E00077140F931F930091B6011091B7012091AF
:1030F000B8013091B901DC01CB0180239123A223D7
:10310000B3238093B6019093B701A093B801B09315
:10311000B9011F910F910C9477140F931F93009195
:10312000B6011091B7012091B8013091B901DC01CD
:10313000CB0180279127A227B3278093B6019093D4
:10314000B701A093B801B093B9011F910F910C94EE
:1031500077141092B2011092B3011092B401109240
:10316000B5010C94771441E050E060E070E004C0D9
:10317000440F551F661F771F8A95D2F74093B201FF
:103180005093B3016093B4017093B5010C9477141C
:1031900041E050E060E070E004C0440F551F661F3E
:1031A000771F8A95D2F78091B2019091B301A091D7
:1031B000B401B091B501482B592B6A2B7B2B40935E
:1031C000B2015093B3016093B4017093B5010C94B4
:1031D000771441E050E060E070E004C0440F551FF8
:1031E000661F771F8A95D2F7409550956095709528
:1031F0008091B2019091B301A091B401B091B50159
:10320000482359236A237B234093B2015093B3018F
:103210006093B4017093B5010C94771441E050E0D1
:1032200060E070E004C0440F551F661F771F8A9549
:10323000D2F78091B2019091B301A091B401B09105
:10324000B501482759276A277B274093B20150933D
:10325000B3016093B4017093B5010C9477140F938C
:103260001F930091B2011091B3012091B4013091EC
:10327000B501DC01CB01802B912BA22BB32B8093CA
:10328000B2019093B301A093B401B093B5011F9123
:103290000F910C9477140F931F930091B20110912A
:1032A000B3012091B4013091B501DC01CB01802341
:1032B0009123A223B3238093B2019093B301A093EF
:1032C000B401B093B5011F910F910C9477140F9333
:1032D0001F930091B2011091B3012091B40130917C
:1032E000B501DC01CB0180279127A227B32780936A
:1032F000B2019093B301A093B401B093B5011F91B3
:103300000F910C9477140895CF92DF92EF92FF9271
:103310000F931F93CF93DF938C01C090B601D09091
:10332000B701E090B801F090B9018091B20190919D
:10333000B301A091B401B091B501C82AD92AEA2AF3
:10334000FB2ACFE1D0E0D701C6010C2E04C0B69510
:10335000A795979587950A94D2F780FF06C0B80184
:103360008C2F0E94DC07019721F4219760F780E001
:1033700001C08C2FDF91CF911F910F91FF90EF90A3
:10338000DF90CF900895CF93DF93EC010E948419D2
:10339000BE010E94DC07DF91CF910895CB010E940E
:1033A000C31908958091BF0108958093BF010895C6
:1033B0001092BF0108950E94461C2091BD013091DA
:1033C000BE018217930750F00E94461C2091BD0158
:1033D0003091BE01821B930B9C010AC00E94461CC7
:1033E0002091BD013091BE0120953095280F391FE5
:1033F00081E0283B3B4008F480E008958091BC01C7
:1034000085958595859508958091BC01877008956F
:103410000E94461C2091BA013091BB01821793078C
:10342000A8F00E94461C2091BA013091BB01821B7A
:10343000930B883B9B4010F480E013C08091BC014B
:1034400082FB882780F991E089270BC00E94461CE7
:103450002091BA013091BB0120953095820F931FC6
:10346000E8CF8170089598E0899F90011124262B60
:103470002093BC010E94C8180E94461C9093BB0177
:103480008093BA0108951092BC011092BB01109272
:10349000BA0108952091BC01809582238093BC01DC
:1034A000982F977089F430E0482F552747FD5095A5
:1034B0002417350749F08595859585950E94E9186B
:1034C0001092BB011092BA0108959091BC019770BF
:1034D00081E009F480E0089590910C01992321F096
:1034E00090910D01911109C020910E0130910F01B1
:1034F000F90132969FEF40E01FC0982F9695969560
:1035000096959F3050F5E0910E01F0910F01E90F73
:10351000F11D877021E030E0A90102C0440F551F62
:103520008A95E2F7CA019181892B818308959F3F93
:1035300039F04F5F4E3041F051915813F8CF0DC024
:103540005111F7CF942FF5CF9F3F39F0F901E90FD3
:10355000F11D97FDFA9582830895089590910C01CD
:10356000992321F090910D01911109C020910E0134
:1035700030910F01F9013296205F3F4F1FC0982F05
:103580009695969596959F30F0F4E0910E01F09106
:103590000F01E90FF11D877021E030E0A90102C0A1
:1035A000440F551F8A95E2F7CA01809591818923BE
:1035B000818308953196E217F30729F090819813DB
:1035C000F9CF1082F7CF089581E090E0E0910E01ED
:1035D000F0910F01E80FF91F1082019680319105DB
:1035E000A9F708958091D30108959091D301892B73
:1035F0008093D301089580959091D301892380937E
:10360000D30108951092D30108959091D201892B8E
:103610008093D201089580959091D201892380935F
:10362000D20108951092D20108959091D101892B71
:103630008093D101089580959091D1018923809341
:10364000D10108951092D10108958093C0010E9484
:10365000461C9093BE018093BD0108951092C00155
:103660001092BE011092BD0108958091C00108958D
:1036700080910E0190910F01FC0131969C01205F19
:103680003F4F80E0919191118F5FE217F307D1F7DF
:103690000895E0910E01F0910F018091D301808394
:1036A000E0910E01F0910F0190818091D201892B60
:1036B0008083E0910E01F0910F0190818091D10102
:1036C000892B80838091C001882399F00E94DB19A7
:1036D00081110E942E1BE0910E01F0910F0190814B
:1036E0008091C001892B80830E94381B81110E9428
:1036F0002E1B80910E0190910F010C94810FCF929F
:10370000DF92EF92FF926C01EE24FF24C114D104EA
:10371000E104F10421F0C701B60120E101C020E07D
:10372000C72ED82EE92EFF24C114D104E104F104E0
:1037300019F0285FC701B6016B017C0154E0F694D3
:10374000E794D794C7945A95D1F7C114D104E104F2
:10375000F10419F02C5FC701B6016B017C0142E056
:10376000F694E794D794C7944A95D1F7C114D1043D
:10377000E104F10419F02E5FC701B601DC01CB01B1
:10378000B695A79597958795892B8A2B8B2B09F052
:103790002F5F822FFF90EF90DF90CF900895809160
:1037A000E901843021F11092D50120E488E190E014
:1037B0000FB6F894A895809360000FBE2093600028
:1037C00080E00E94770883B7817F846083BF83B7DE
:1037D000816083BF7894889583B78E7F83BF88E1AB
:1037E0000FB6F89480936000109260000FBE0895A9
:1037F00008950895CF930E94F81B0E9496040E949A
:10380000F91BC0E08C2F0E948405811104C0CF5F9A
:10381000CE30C1F701C081E0CF9108950E948B1492
:103820000E94750F0C9477081F920F920FB60F929B
:1038300011248F939F93AF93BF938091D5018111F2
:1038400013C08091D6019091D701A091D801B09179
:10385000D9014196A11DB11D8093D6019093D70146
:10386000A093D801B093D901BF91AF919F918F914F
:103870000F900FBE0F901F90189582E084BD93E0CB
:1038800095BD9AEF97BD80936E0008952FB7F89479
:103890008091D6019091D701A091D801B091D90122
:1038A0002FBF0895CF92DF92EF92FF920F931F9355
:1038B0002FB7F8944091D6015091D7016091D8016B
:1038C0007091D9012FBF6A017B01EE24FF248C0186
:1038D00020E030E0C016D106E206F30610F44150B5
:1038E00051099A01281B390BC9011F910F91FF90B3
:1038F000EF90DF90CF9008951F920F920FB60F9226
:1039000011248F939F93AF93BF938091D601909191
:10391000D701A091D801B091D9010196A11DB11D87
:103920008093D6019093D701A093D801B093D90189
:10393000BF91AF919F918F910F900FBE0F901F90ED
:1039400018950E94720CF8942FEF87EA91E62150A7
:1039500080409040E1F700C0000087E090EBDC0180
:103960008093F3019093F401A093F501B093F601D5
:103970009CE088E10FB6F894A895809360000FBE94
:1039800090936000FFCFEF92FF920F931F93CF931E
:10399000DF93D82FC0E08C2F0E94840500E010E058
:1039A000E82EF12CC701002E02C0959587950A9448
:1039B000E2F780FD06C00F5F1F4F0630110591F73B
:1039C00009C0602F7C2F80E00E948C05D813F3CFB4
:1039D00081E004C0CF5FCE30F1F680E0DF91CF917F
:1039E0001F910F91FF90EF900895CF93C82F8CE215
:1039F0000E94C31C882321F08C2FCF910C94C31CF0
:103A000080E0CF910895CF930E944A1E811102C099
:103A10000E94301EC5E6C15049F00E9496048FE313
:103A20009CE90197F1F700C00000F5CF89E20E9400
:103A3000F51C811113C18AE20E94F51C81110E94BC
:103A4000301E85E00E94F51C81110E94A11C0E947D
:103A5000551E8093D40187E00E94F51C8823A9F1AC
:103A60008BE10E94F51C882351F08091D40181FBE9
:103A7000222720F991E0922790FB81F90EC08EE079
:103A80000E94F51C882361F08091D40182FB2227DB
:103A900020F991E0922790FB82F98093D40115C020
:103AA00080E10E94F51C9091D401882341F093FBA2
:103AB000222720F981E0822780FB93F904C0892F17
:103AC000809580FB90F99093D4018091D4010E945D
:103AD000591E0E94671E8093F20180EE0E94F51C21
:103AE000882341F08091F201982F909590FB80F906
:103AF0008093F20189E30E94F51C882359F080919C
:103B0000F20181FB222720F991E0922790FB81F9B5
:103B10008093F20182EE0E94F51C882359F0809177
:103B2000F20182FB222720F991E0922790FB82F993
:103B30008093F20186EE0E94F51C882359F0809153
:103B4000F20183FB222720F991E0922790FB83F971
:103B50008093F20183EE0E94F51C882359F0809136
:103B6000F20184FB222720F991E0922790FB84F94F
:103B70008093F20185E30E94F51C882359F080911F
:103B8000F20185FB222720F991E0922790FB85F92D
:103B90008093F20181E30E94F51C882359F0809103
:103BA000F20186FB222720F991E0922790FB86F90B
:103BB0008093F20181E10E94F51C882359F08091E5
:103BC000F20187FB222720F991E0922790FB87F9E9
:103BD0008093F2018091F2010E946B1E8091F201AC
:103BE00087FB882780F980930D0187E20E94F51CEE
:103BF000C82F8EE10E94F51C8111C2608FE10E94E6
:103C0000F51C8111C46080E20E94F51C8111C8601E
:103C100081E20E94F51C8111C06182E20E94F51CC4
:103C20008111C06283E20E94F51C8111C06484E2AC
:103C30000E94F51C882311F0C06802C0CC2329F033
:103C40008C2F0E94621E6C2F03C00E945E1E682F84
:103C500070E080E090E0CF910C944B18CF910895E4
:103C60006DEE7EEF80E090E00E94302460E082E024
:103C700090E00E941E2460E083E090E00E941E24F9
:103C800060E084E090E00E941E2460E085E090E027
:103C90000C941E2480E090E00E94182421E08D3EC8
:103CA0009E4F09F020E0822F089582E090E00C946E
:103CB0001024682F82E090E00C941E2483E090E0B2
:103CC0000C941024682F83E090E00C941E2484E070
:103CD00090E00C941024682F84E090E00C941E2453
:103CE0008091DC0180FF0BC06091130185E0689F2B
:103CF000B001112475956795759567952BC081FF67
:103D000009C06091130185E0689FB0011124759589
:103D1000679520C082FF07C06091130185E0689F0E
:103D2000B001112417C09091DD019923D1F0609169
:103D30001201961788F72091130185E0289F9001C2
:103D40001124929FA001939F500D112470E0CA018D
:103D50000E94E2236038710540F46115710539F065
:103D600002C065E070E0862F08958FE7089581E036
:103D700008958091DC0180FF08C06091110170E01E
:103D8000759567957595679521C081FF06C060910F
:103D9000110170E07595679519C082FF04C06091AC
:103DA000110170E010C09091DD019923C1F0609184
:103DB00010019617A0F780911101899FC00111246D
:103DC00070E00E94E2236038710528F461157105E6
:103DD00021F0862F08958FE7089581E0089561E02E
:103DE00070E0F4CF803F21F40E94701E819504C0E2
:103DF000813F29F40E94701E8093E0010895823F64
:103E000021F40E94701E819504C0833F29F40E9412
:103E1000701E8093DF010895893F19F40E94B91E36
:103E200005C08A3F31F40E94B91E81958093E1015B
:103E300008958B3F21F40E94B91E819504C08C3FE8
:103E400029F40E94B91E8093E2010895843F21F471
:103E50008091DE01816017C0853F21F48091DE01F1
:103E6000826011C0863F21F48091DE0184600BC026
:103E7000873F21F48091DE01886005C0883F31F4DE
:103E80008091DE0180618093DE0108958D3F21F4F1
:103E90008091DC0181600BC08E3F21F48091DC01B8
:103EA000826005C08F3F29F48091DC01846080939B
:103EB000DC010895803F39F48091E00187FF6CC0F8
:103EC0001092E00169C0813F29F48091E001181649
:103ED000BCF362C09091DF01823F29F497FF5CC080
:103EE0001092DF0159C0833F19F41916CCF354C066
:103EF000893F41F48091E10118160CF04DC01092F9
:103F0000E1014AC08A3F29F48091E10187FF44C062
:103F1000F6CF8B3F39F48091E20187FF3DC01092CC
:103F2000E2013AC08C3F29F48091E2011816BCF3FB
:103F300033C0843F21F48091DE018E7F17C0853F1E
:103F400021F48091DE018D7F11C0863F21F48091A4
:103F5000DE018B7F0BC0873F21F48091DE01877FDC
:103F600005C0883F31F48091DE018F7E8093DE01B1
:103F700013C08D3F21F48091DC018E7F0BC08E3FFA
:103F800021F48091DC018D7F05C08F3F29F4809161
:103F9000DC018B7F8093DC018091DF0181110EC0F9
:103FA0008091E00181110AC08091E101811106C078
:103FB0008091E201811102C01092DD0108958EED21
:103FC00091E00E948C0F0E94461C9093DB0180932D
:103FD000DA0108951F93CF93DF938091DA019091D6
:103FE000DB010E94521CAC019091DD01992321F06C
:103FF0002091140130E006C0209115018AE0289F2D
:10400000900111244217530708F486C08091DF0104
:10401000C091E001D091E1011091E201811107C04E
:10402000C11176C0D11174C0111172C075C09F3F0B
:1040300019F09F5F9093DD01181624F40E94701E02
:104040008093DF018091DF0187FF05C00E94701E11
:1040500081958093DF011C1624F40E94701E8093CA
:10406000E0018091E00187FF05C00E94701E8195EC
:104070008093E0016091DF01662339F1C091E00196
:10408000CC2319F1772767FD7095872F972F0E9412
:10409000F32223E333E343E35FE30E9457230E94C9
:1040A000C0226093DF016C2F772767FD7095872F03
:1040B000972F0E94F32223E333E343E35FE30E945D
:1040C00057230E94C0226093E0011D1624F40E9431
:1040D000B91E8093E1018091E10187FF05C00E9434
:1040E000B91E81958093E101111624F40E94B91E36
:1040F0008093E2018091E20187FF05C00E94B91E12
:1041000081958093E201DF91CF911F910C94DF1F85
:104110009F3F09F08ECF96CFDF91CF911F910895E9
:10412000EEEDF1E085E0DF011D928A95E9F710924E
:10413000DD011092DC010895833081F128F4813093
:1041400059F08230D1F00895853009F449C0B8F1B2
:10415000863009F456C0089580911501262F30E06D
:10416000280F311D2F3F310524F4680F609315018E
:1041700008958FEF80931501089580911401262FE3
:1041800030E0280F311D2F3F310524F4680F609374
:10419000140108958FEF8093140108958091130105
:1041A000262F30E0280F311D2F3F310524F4680FF2
:1041B0006093130108958FEF809313010895809108
:1041C0001201262F30E0280F311D2F3F310524F436
:1041D000680F6093120108958FEF80931201089584
:1041E00080911101262F30E0280F311D2F3F31051E
:1041F00024F4680F6093110108958FEF80931101EB
:10420000089580911001262F30E0280F311D2F3F97
:10421000310524F4680F6093100108958FEF8093A7
:1042200010010895833011F128F4813049F0823073
:1042300091F00895853081F120F18630C1F1089523
:1042400080911501681720F4861B8093150108954D
:1042500010921501089580911401681720F4861BAF
:104260008093140108951092140108958091130110
:10427000681720F4861B8093130108951092130190
:10428000089580911201681720F4861B8093120113
:10429000089510921201089580911101681720F479
:1042A000861B809311010895109211010895809149
:1042B0001001681720F4861B809310010895109256
:1042C000100108950F931F938B3109F475C0A0F569
:1042D0008E3009F484C0C0F4873009F45BC068F400
:1042E000863009F0AAC08091D401817F8E7F8093AF
:1042F000D40181E08093E401A1C0883009F496C024
:104300008B3009F493C099C0813109F472C068F40C
:10431000803109F092C08091D40183FB222720F9DB
:1043200091E0922790FB83F950C0863109F47EC05A
:10433000893109F47BC081C0853309F479C068F400
:10434000873209F475C028F48E3108F476C08D5197
:104350005AC0893209F46CC070C0833438F48A338F
:1043600008F050C0883309F461C067C0833409F491
:104370005FC0883409F061C00E948B140FEF13ED09
:1043800020E3015010402040E1F700C000000E94EF
:10439000A11C4CC09091D401892F8095817080FB25
:1043A00090F929F0966098609093D40147C0997F66
:1043B000977F9093D4013AC08091D40181FB22274A
:1043C00020F991E0922790FB81F98093D401992301
:1043D00069F18091D40181608093D40127C08091DC
:1043E000D40182FB222720F991E0922790FB82F9E9
:1043F000ECCF0E948B1490910D0181E0892780936E
:104400000D0114C0895341E050E060E070E08A0182
:104410009B0104C0000F111F221F331F8A95D2F782
:10442000C901B8010E944B180E948B1481E006C09C
:1044300061E070E080E090E0F5CF80E01F910F91A7
:10444000089580E0089580E00895CF93C82F80916B
:10445000E401813079F018F08230E9F187C0E09111
:104460000E01F0910F018081813169F0823209F0F3
:104470007FC009C0E0910E01F0910F018081813170
:1044800011F0823261F48C2F0E942122811104C02C
:104490008C2F0E9462211DC081E090E01AC08C2FF9
:1044A0000E942322811114C0C43179F048F4CB302A
:1044B00079F0C03109F060C082E08093E40108C067
:1044C000C93219F0C83321F057C01092E40154C02A
:1044D00081E0817053C0C93289F118F5C43171F19E
:1044E000A8F4C73009F046C08AE08093150194E132
:1044F0009093140193E0909313018093120188E04C
:104500008093110188E28093100134C0CE51C630EF
:1045100088F5EC2FF0E0E65DFE4F80818093E301AB
:1045200029C0CE34E9F020F4CB3421F56AE013C081
:10453000C13579F0C235F1F461E00DC08091E3013D
:10454000882319F01092E30115C081E08093E40103
:1045500015C061E006C08091E3010E949C200AC062
:104560006AE08091E3010E94122104C01092E401EC
:1045700080E004C081E002C080E0ABCFCF9108951D
:1045800004D06894B1118DC0089570D088F09F5701
:1045900090F0B92F9927B751A0F0D1F0660F771F8F
:1045A000881F991F1AF0BA95C9F712C0B13081F06F
:1045B00077D0B1E0089574C0672F782F8827B85F4F
:1045C00039F0B93FCCF3869577956795B395D9F7D0
:1045D0003EF490958095709561957F4F8F4F9F4FDA
:1045E0000895E89409C097FB3EF4909580957095E6
:1045F00061957F4F8F4F9F4F9923A9F0F92F96E92F
:10460000BB279395F695879577956795B795F111A3
:10461000F8CFFAF4BB0F11F460FF1BC06F5F7F4F40
:104620008F4F9F4F16C0882311F096E911C0772352
:1046300021F09EE8872F762F05C0662371F096E85B
:10464000862F70E060E02AF09A95660F771F881F2A
:10465000DAF7880F9695879597F9089557FD905842
:10466000440F551F59F05F3F71F04795880F97FB36
:10467000991F61F09F3F79F08795089512161306F0
:104680001406551FF2CF4695F1DF08C0161617061F
:104690001806991FF1CF8695710561050894089554
:1046A000E894BB2766277727CB0197F908950BD0AD
:1046B00078C069D028F06ED018F0952309F05AC060
:1046C0005FC01124EECFCADFA0F3959FD1F3950F01
:1046D00050E0551F629FF001729FBB27F00DB11D86
:1046E000639FAA27F00DB11DAA1F649F6627B00D16
:1046F000A11D661F829F2227B00DA11D621F739FFF
:10470000B00DA11D621F839FA00D611D221F749F0C
:104710003327A00D611D231F849F600D211D822F53
:10472000762F6A2F11249F5750408AF0E1F088239A
:104730004AF0EE0FFF1FBB1F661F771F881F9150A7
:104740005040A9F79E3F510570F014C0AACF5F3FBB
:10475000ECF3983EDCF3869577956795B795F795DA
:10476000E7959F5FC1F7FE2B880F911D9695879562
:1047700097F9089597F99F6780E870E060E00895E1
:104780009FEF80EC089500240A9416161706180669
:104790000906089500240A94121613061406050645
:1047A0000895092E0394000C11F4882352F0BB0FD6
:1047B00040F4BF2B11F460FF04C06F5F7F4F8F4F39
:1047C0009F4F089597FB072E16F4009407D077FDAE
:1047D00009D00E94FC2307FC05D03EF490958195FA
:1047E0009F4F0895709561957F4F0895EE0FFF1FBD
:1047F0000590F491E02D0994AA1BBB1B51E107C061
:10480000AA1FBB1FA617B70710F0A61BB70B881F60
:10481000991F5A95A9F780959095BC01CD010895EF
:10482000F999FECF92BD81BDF89A992780B5089578
:10483000A8E1B0E042E050E00C943824262FF9992A
:10484000FECF92BD81BDF89A019700B4021639F0EF
:104850001FBA20BD0FB6F894FA9AF99A0FBE0895C0
:104860000196272F0E941F240C941E24DC01CB01EB
:10487000FC01F999FECF06C0F2BDE1BDF89A319670
:1048800000B40D9241505040B8F70895F894FFCF0E
:10489000200279080709E408B0087C080101C10179
:1048A00028080A03140A3F4D3639A9045C0426047B
:1048B000ED0380039903B203CB0301020304050651
:0448C00007080900DC
:00000001FF

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

@ -49,9 +49,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
KC_ENT, KC_B, KC_M, KC_W, KC_V, KC_Z , KC_RSFT, KC_ENT, KC_B, KC_M, KC_W, KC_V, KC_Z , KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, MO(SYMB), KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, MO(SYMB),
KC_HOME,KC_END, KC_HOME, KC_END,
KC_RALT, KC_RALT,
KC_FN1,KC_SPC,KC_RCTL MO(MDIA),KC_SPC,KC_RCTL
), ),
/* Keymap 1: Symbol Layer /* Keymap 1: Symbol Layer
* *
@ -102,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_STAR, KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_STAR,
KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR,
KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR,
KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,KC_NO, KC_NO, KC_TRNS, KC_TRNS,
KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
PV_A, PV_O, KC_NO, PV_A, PV_O, KC_NO,
@ -111,10 +111,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
PV_STAR, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_STAR, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM,
PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD,
PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ,
KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS,
KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_FN1, PV_E, PV_U KC_TRNS,PV_E, PV_U
), ),
/* Keymap 3: Media and mouse keys /* Keymap 3: Media and mouse keys
@ -122,19 +122,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | | * | | | | MsUp | | | | | | | Back | | Frwd | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | * | | |MsLeft|MsDown|MsRght| |------| |------| | Prev | Play | Next | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | | * | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | | | | | | * | | | | | |
* ,------|------|------| |------+------+------. * ,------|------|------| |------+------+------.
* | | | | | | |Brwser| * | | | | | | | |
* | | |------| |------| |Back | * | | |------| |------| | |
* | | | | | | | | * | | | | | | | |
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
@ -150,9 +150,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
// right hand // 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_WBAK, KC_TRNS, KC_WFWD, KC_TRNS, KC_TRNS,
KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
@ -171,15 +171,19 @@ void toggle_steno(int pressed)
if (pressed) { if (pressed) {
if (layer != STEN) layer_on(STEN); else layer_off(STEN); if (layer != STEN) layer_on(STEN); else layer_off(STEN);
register_code(PV_LS); register_code(PV_LP);
register_code(PV_LH); register_code(PV_LH);
register_code(PV_RF); register_code(PV_LR);
register_code(PV_RT); register_code(PV_O);
register_code(PV_RL);
register_code(PV_RG);
} else { } else {
unregister_code(PV_LS); unregister_code(PV_LP);
unregister_code(PV_LH); unregister_code(PV_LH);
unregister_code(PV_RF); unregister_code(PV_LR);
unregister_code(PV_RT); unregister_code(PV_O);
unregister_code(PV_RL);
unregister_code(PV_RG);
} }
} }

@ -3,8 +3,8 @@
- Layer 0: Non-ANSI Dvorak layout, with modified modifiers — all - Layer 0: Non-ANSI Dvorak layout, with modified modifiers — all
modifiers on thumb keys, as well as return and space. modifiers on thumb keys, as well as return and space.
- Layer 1: Default symbol layout. - Layer 1: Default symbol layout.
- Layer 2: Default media/mouse layout. - Layer 2: Plover-oriented stenography layer.
- Layer 3: Plover-oriented stenography layer. - Layer 3: Extended media/mouse layout.
## Unusual features ## Unusual features
The Plover key (top right key on the left half) also sends my Plover The Plover key (top right key on the left half) also sends my Plover
@ -12,8 +12,6 @@ The Plover key (top right key on the left half) also sends my Plover
layer, so you can toggle between steno and typing modes with a single layer, so you can toggle between steno and typing modes with a single
keypress. keypress.
If you want to use this feature, you'll need to add: If you want to use this feature, you'll need to add the
`commands.json` dictionary to your Plover dictionaries, or define the
"SH-FT": "{PLOVER:TOGGLE}" toggle stroke (`PHROLG`) yourself.
to your Plover dictionary.

@ -55,11 +55,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | / | 7 | 8 | 9 | * | F12 | * | | [ | ] | { | } | | | | | / | 7 | 8 | 9 | * | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| - | 4 | 5 | 6 | + | | * | | < | > | ( | ) | |------| |------| - | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | = | | * | | | | | | | | | | & | 1 | 2 | 3 | = | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | 0 | . | | | | * | | | | | | | 0 | . | | | |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
@ -75,9 +75,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[SYMB] = KEYMAP( [SYMB] = KEYMAP(
// left hand // left hand
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, 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_LBRC,KC_RBRC,KC_LCBR,KC_RCBR,KC_TRNS,KC_TRNS,
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, KC_TRNS,KC_LABK,KC_RABK,KC_LPRN,KC_RPRN,KC_TRNS,
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,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,
KC_TRNS, KC_TRNS,
@ -109,8 +109,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | * | | | | | |
* ,------|------|------| |------+------+------. * ,------|------|------| |------+------+------.
* | | | | | | | | * | | | | | | | |
* | | |------| |------| | | * | | |------| |------| C | V |
* | | | | | | | | * | | | | | X | | |
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
// MEDIA AND MOUSE // MEDIA AND MOUSE
@ -131,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS LGUI(KC_X), LGUI(KC_C), LGUI(KC_V)
), ),
}; };
@ -139,6 +139,8 @@ const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
}; };
// action_get_macro() is unused — remove the “#if 0” and “#endif” lines to reenable
#if 0
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{ {
// MACRODOWN only works in this function // MACRODOWN only works in this function
@ -153,6 +155,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
} }
return MACRO_NONE; return MACRO_NONE;
}; };
#endif
// Runs just one time when the keyboard initializes. // Runs just one time when the keyboard initializes.
void matrix_init_user(void) { void matrix_init_user(void) {

@ -12,8 +12,9 @@ void matrix_scan_user(void) {
} }
__attribute__ ((weak)) __attribute__ ((weak))
void process_action_user(keyrecord_t *record) { bool process_action_user(keyrecord_t *record) {
// leave this function blank - it can be defined in a keymap file // leave this function blank - it can be defined in a keymap file
return true;
} }
__attribute__ ((weak)) __attribute__ ((weak))
@ -35,11 +36,11 @@ void matrix_scan_kb(void) {
matrix_scan_user(); matrix_scan_user();
} }
void process_action_kb(keyrecord_t *record) { bool process_action_kb(keyrecord_t *record) {
// put your per-action keyboard code here // put your per-action keyboard code here
// runs for every action, just before processing by the firmware // runs for every action, just before processing by the firmware
process_action_user(record); return process_action_user(record);
} }
void led_set_kb(uint8_t usb_led) { void led_set_kb(uint8_t usb_led) {

@ -75,7 +75,7 @@ inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
void matrix_init_user(void); void matrix_init_user(void);
void matrix_scan_user(void); void matrix_scan_user(void);
void process_action_user(keyrecord_t *record); bool process_action_user(keyrecord_t *record);
void led_set_user(uint8_t usb_led); void led_set_user(uint8_t usb_led);
#endif #endif

@ -19,8 +19,7 @@ extern keymap_config_t keymap_config;
#define _DVORAK 2 #define _DVORAK 2
#define _LOWER 3 #define _LOWER 3
#define _RAISE 4 #define _RAISE 4
#define _MUSIC 5 #define _PLOVER 5
#define _PLOVER 6
#define _ADJUST 16 #define _ADJUST 16
// Macro name shortcuts // Macro name shortcuts
@ -30,14 +29,9 @@ extern keymap_config_t keymap_config;
#define LOWER M(_LOWER) #define LOWER M(_LOWER)
#define RAISE M(_RAISE) #define RAISE M(_RAISE)
#define M_BL 5 #define M_BL 5
#define AUD_OFF M(6)
#define AUD_ON M(7)
#define MUS_OFF M(8)
#define MUS_ON M(9)
#define VC_IN M(10)
#define VC_DE M(11)
#define PLOVER M(12) #define PLOVER M(12)
#define EXT_PLV M(13) #define EXT_PLV M(13)
#define TOG_OUT M(14)
// Fillers to make layering more clear // Fillers to make layering more clear
#define _______ KC_TRNS #define _______ KC_TRNS
@ -105,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------| * |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------| * |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play | * | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
@ -113,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = { [_LOWER] = {
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
}, },
@ -123,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------| * |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------| * |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play | * | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
@ -131,27 +125,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_RAISE] = { [_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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
}, },
/* Music (reserved for process_action_user)
*
*/
[_MUSIC] = {
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
},
/* Plover layer (http://opensteno.org) /* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
* | # | # | # | # | # | # | # | # | # | # | # | # | * | # | # | # | # | # | # | # | # | # | # | # | # |
* |------+------+------+------+------+-------------+------+------+------+------+------| * |------+------+------+------+------+-------------+------+------+------+------+------|
* | | S | T | P | H | * | * | F | P | L | T | D | * | | S | T | P | H | * | * | F | P | L | T | D |
* |------+------+------+------+------+------|------+------+------+------+------+------| * |------+------+------+------+------+------|------+------+------+------+------+------|
* | | S | K | W | R | * | * | R | B | G | S | Z | * |TogOut| S | K | W | R | * | * | R | B | G | S | Z |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | Exit | | | A | O | | E | U | | | | * | Exit | | | A | O | | E | U | | | |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
@ -160,7 +144,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_PLOVER] = { [_PLOVER] = {
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, {TOG_OUT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
}, },
@ -177,8 +161,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[_ADJUST] = { [_ADJUST] = {
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
{_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
{_______, VC_DE, VC_IN, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
} }
@ -204,7 +188,6 @@ float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_plover[][2] = SONG(PLOVER_SOUND); float tone_plover[][2] = SONG(PLOVER_SOUND);
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND); float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
@ -269,53 +252,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
unregister_code(KC_RSFT); unregister_code(KC_RSFT);
} }
break; break;
case 6:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
audio_off();
#endif
}
break;
case 7:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
audio_on();
PLAY_NOTE_ARRAY(tone_startup, false, 0);
#endif
}
break;
case 8:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
layer_off(_MUSIC);
stop_all_notes();
#endif
}
break;
case 9:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(music_scale, false, 0);
layer_on(_MUSIC);
#endif
}
break;
case 10:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
voice_iterate();
PLAY_NOTE_ARRAY(music_scale, false, 0);
#endif
}
break;
case 11:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
voice_deiterate();
PLAY_NOTE_ARRAY(music_scale, false, 0);
#endif
}
break;
case 12: case 12:
if (record->event.pressed) { if (record->event.pressed) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
@ -325,7 +261,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
layer_off(_RAISE); layer_off(_RAISE);
layer_off(_LOWER); layer_off(_LOWER);
layer_off(_ADJUST); layer_off(_ADJUST);
layer_off(_MUSIC);
layer_on(_PLOVER); layer_on(_PLOVER);
if (!eeconfig_is_enabled()) { if (!eeconfig_is_enabled()) {
eeconfig_init(); eeconfig_init();
@ -343,7 +278,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
layer_off(_PLOVER); layer_off(_PLOVER);
} }
break; break;
case 14:
if (record->event.pressed) {
return MACRO( D(E), D(R), D(F), D(V), D(O), D(L), U(E), U(R), U(F), U(V), U(O), U(L), END );
}
break;
} }
return MACRO_NONE; return MACRO_NONE;
}; };
@ -361,19 +300,4 @@ void play_goodbye_tone()
PLAY_NOTE_ARRAY(goodbye, false, 0); PLAY_NOTE_ARRAY(goodbye, false, 0);
_delay_ms(150); _delay_ms(150);
} }
uint8_t starting_note = 0x0C;
int offset = 0;
void process_action_user(keyrecord_t *record) {
if (IS_LAYER_ON(_MUSIC)) {
if (record->event.pressed) {
play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF);
} else {
stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)));
}
}
}
#endif #endif

@ -0,0 +1,2 @@
# The Default Planck Layout

@ -0,0 +1,333 @@
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
// this is the style you want to emulate.
#include "planck.h"
#include "action_layer.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
#define _PLOVER 5
#define _ADJUST 16
// Macro name shortcuts
#define QWERTY M(_QWERTY)
#define COLEMAK M(_COLEMAK)
#define DVORAK M(_DVORAK)
#define LOWER M(_LOWER)
#define RAISE M(_RAISE)
#define M_BL 5
#define PLOVER M(12)
#define EXT_PLV M(13)
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = {
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
{M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = {
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
{KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_DVORAK] = {
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
{M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = {
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = {
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUHS, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
* | # | # | # | # | # | # | # | # | # | # | # | # |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | S | T | P | H | * | * | F | P | L | T | D |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | S | K | W | R | * | * | R | B | G | S | Z |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Exit | | | A | O | | E | U | | | |
* `-----------------------------------------------------------------------------------'
*/
[_PLOVER] = {
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
},
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|Musoff| | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = {
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
}
};
const uint16_t PROGMEM fn_actions[] = {
};
#ifdef AUDIO_ENABLE
float tone_startup[][2] = {
{440.0*pow(2.0,(31)/12.0), 12},
{440.0*pow(2.0,(28)/12.0), 8},
{440.0*pow(2.0,(19)/12.0), 8},
{440.0*pow(2.0,(24)/12.0), 8},
{440.0*pow(2.0,(28)/12.0), 20}
};
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_plover[][2] = SONG(PLOVER_SOUND);
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {
case _QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
break;
case _COLEMAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
}
break;
case _DVORAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
}
break;
case _LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
#ifdef BACKLIGHT_ENABLE
breathing_speed_set(2);
breathing_pulse();
#endif
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
case _RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
#ifdef BACKLIGHT_ENABLE
breathing_speed_set(2);
breathing_pulse();
#endif
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
case M_BL:
if (record->event.pressed) {
register_code(KC_RSFT);
#ifdef BACKLIGHT_ENABLE
backlight_step();
#endif
} else {
unregister_code(KC_RSFT);
}
break;
case 12:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
stop_all_notes();
PLAY_NOTE_ARRAY(tone_plover, false, 0);
#endif
layer_off(_RAISE);
layer_off(_LOWER);
layer_off(_ADJUST);
layer_on(_PLOVER);
if (!eeconfig_is_enabled()) {
eeconfig_init();
}
keymap_config.raw = eeconfig_read_keymap();
keymap_config.nkro = 1;
eeconfig_update_keymap(keymap_config.raw);
}
break;
case 13:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);
#endif
layer_off(_PLOVER);
}
break;
}
return MACRO_NONE;
};
void matrix_init_user(void) {
#ifdef AUDIO_ENABLE
_delay_ms(20); // stops the tick
PLAY_NOTE_ARRAY(tone_startup, false, 0);
#endif
}
#ifdef AUDIO_ENABLE
void play_goodbye_tone(void)
{
PLAY_NOTE_ARRAY(goodbye, false, 0);
_delay_ms(150);
}
#endif
LEADER_EXTERNS();
#define LEADER_TIMEOUT 300
void matrix_scan_user(void) {
LEADER_DICTIONARY() {
leading = false;
leader_end();
SEQ_ONE_KEY(KC_F) {
register_code(KC_S);
unregister_code(KC_S);
}
SEQ_TWO_KEYS(KC_A, KC_S) {
register_code(KC_H);
unregister_code(KC_H);
}
SEQ_THREE_KEYS(KC_A, KC_S, KC_D) {
register_code(KC_LGUI);
register_code(KC_S);
unregister_code(KC_S);
unregister_code(KC_LGUI);
}
}
}

@ -0,0 +1,5 @@
AUDIO_ENABLE = yes
NKRO_ENABLE = yes
MIDI_ENABLE = yes
BACKLIGHT_ENABLE = no
COMMAND_ENABLE = no

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@ -0,0 +1,56 @@
#include "planck.h"
#include "action_layer.h"
#ifdef BACKLIGHT_ENABLE
#include "backlight.h"
#endif
//Simple Keymap where CTRL, WINKEY, and ALT keys are placed in a more familiar location for Windows users.
//Focus of this particular keymap is to enable easy transition from more traditional keyboards to OLKB Planck.
// Each layer gets a name for readability, which is then used in the keymap matrix below.
#define _QW 0
#define _LW 1
#define _RS 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QW] = { /* Qwerty */
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT)},
{KC_LCTL, KC_LGUI, KC_LALT, M(0), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
[_RS] = { /* RAISE */
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL },
{KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
{KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
},
[_LW] = { /* LOWER */
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL },
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
}
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
#ifdef BACKLIGHT_ENABLE
backlight_step();
#endif
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};

@ -0,0 +1 @@
Focus of this particular keymap is to enable easy transition from more traditional keyboards to OLKB Planck.

@ -0,0 +1,14 @@
# Planck Layout by Pete
This layout is based on the default layout but uses a FN key in the bottom left corner instead of the shift / backlight key.
On the FN layer you can do the following things
- Step through back light
- Put a mac to sleep
- The Fxx keys in a block to click with the right hand
- The delete key in the upper right corner
- Quick access to screenshot functions
- Control volume and media playback
- Home/PgDown/PgUp/End buttons where the arrow keys are
Pressing the lower and raise buttons allows to reset and change from QWERT to Colemak or Dvorak.

@ -0,0 +1,223 @@
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
// this is the style you want to emulate.
#include "planck.h"
#include "action_layer.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
#define _FCT 5
#define _SETUP 6
#define _MICMUTE 16
// Macro name shortcuts
#define QWERTY M(_QWERTY)
#define COLEMAK M(_COLEMAK)
#define DVORAK M(_DVORAK)
#define LOWER M(_LOWER)
#define RAISE M(_RAISE)
#define FCT M(_FCT)
#define MICMUTE M(_MICMUTE)
#define MACPRNT LGUI(LSFT(KC_3))
#define MACPRNT2 LGUI(LSFT(KC_4))
#define CYCLWIN LGUI(KC_GRV)
#define MAC_SLEP LSFT(LCTL(KC_POWER))
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = {
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
{FCT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
[_COLEMAK] = {
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
{FCT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
[_DVORAK] = {
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
{FCT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
[_LOWER] = {
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
{_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
[_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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
[_FCT] = { /* Function */
{BL_STEP, MAC_SLEP,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DELT},
{_______, MICMUTE, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, MACPRNT},
{_______, CYCLWIN, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, MACPRNT2},
{FCT, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDOWN,KC_PGUP,KC_END }
},
[_SETUP] = { /* Setup */
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______}
}
};
const uint16_t PROGMEM fn_actions[] = {
};
#ifdef AUDIO_ENABLE
float tone_startup[][2] = {
{440.0*pow(2.0,(31)/12.0), 12},
{440.0*pow(2.0,(28)/12.0), 8},
{440.0*pow(2.0,(19)/12.0), 8},
{440.0*pow(2.0,(24)/12.0), 8},
{440.0*pow(2.0,(28)/12.0), 20}
};
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_plover[][2] = SONG(PLOVER_SOUND);
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {
case _QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
break;
case _COLEMAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
}
break;
case _DVORAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
}
break;
case _LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _SETUP);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _SETUP);
}
break;
case _RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _SETUP);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _SETUP);
}
break;
case _FCT:
if (record->event.pressed) {
layer_on(_FCT);
} else {
layer_off(_FCT);
}
break;
case _MICMUTE:
if (record->event.pressed) {
register_code(KC_RSFT);
register_code(KC_RCTL);
register_code(KC_RALT);
register_code(KC_RGUI);
} else {
unregister_code(KC_RSFT);
unregister_code(KC_RCTL);
unregister_code(KC_RALT);
unregister_code(KC_RGUI);
}
break;
}
return MACRO_NONE;
};
void matrix_init_user(void) {
#ifdef AUDIO_ENABLE
_delay_ms(20); // stops the tick
PLAY_NOTE_ARRAY(tone_startup, false, 0);
#endif
}
#ifdef AUDIO_ENABLE
void play_goodbye_tone()
{
PLAY_NOTE_ARRAY(goodbye, false, 0);
_delay_ms(150);
}
uint8_t starting_note = 0x0C;
int offset = 0;
void process_action_user(keyrecord_t *record) {
if (IS_LAYER_ON(_MUSIC)) {
if (record->event.pressed) {
play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF);
} else {
stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)));
}
}
}
#endif

@ -0,0 +1,2 @@
AUDIO_ENABLE = no
NKRO_ENABLE = yes

@ -73,7 +73,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* disable debug print */ /* disable debug print */
//#define NO_DEBUG #define NO_DEBUG
/* disable print */ /* disable print */
//#define NO_PRINT //#define NO_PRINT

@ -38,6 +38,7 @@
#define MACRO_AUDIO_OFF 17 #define MACRO_AUDIO_OFF 17
#define MACRO_INC_VOICE 18 #define MACRO_INC_VOICE 18
#define MACRO_DEC_VOICE 19 #define MACRO_DEC_VOICE 19
#define MACRO_BACKLIGHT 20
#define M_QWRTY M(MACRO_QWERTY) #define M_QWRTY M(MACRO_QWERTY)
#define M_COLMK M(MACRO_COLEMAK) #define M_COLMK M(MACRO_COLEMAK)
@ -53,6 +54,7 @@
#define TMPO_UP M(MACRO_TEMPO_U) #define TMPO_UP M(MACRO_TEMPO_U)
#define TMPO_DN M(MACRO_TEMPO_D) #define TMPO_DN M(MACRO_TEMPO_D)
#define TMPO_DF M(MACRO_TONE_DEFAULT) #define TMPO_DF M(MACRO_TONE_DEFAULT)
#define M_BACKL M(MACRO_BACKLIGHT)
#define MUS_ON M(MACRO_MUSIC_ON) #define MUS_ON M(MACRO_MUSIC_ON)
@ -96,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_QWERTY] = { /* QWERTY */ [LAYER_QWERTY] = { /* QWERTY */
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
{ KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, { 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 }, { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, KC_SPC, M_LOWER, KC_UP, KC_DOWN, KC_LEFT, KC_RGHT }, { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, KC_SPC, M_LOWER, KC_UP, KC_DOWN, KC_LEFT, KC_RGHT },
}, },
@ -115,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_COLEMAK] = { /* COLEMAK */ [LAYER_COLEMAK] = { /* COLEMAK */
{ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_ESC }, { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_ESC },
{ 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_BSPC, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
{ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, KC_SPC, M_LOWER, KC_UP, KC_DOWN, KC_LEFT, KC_RGHT }, { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_RAISE, KC_SPC, KC_SPC, M_LOWER, KC_UP, KC_DOWN, KC_LEFT, KC_RGHT },
}, },
@ -217,7 +219,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_ADJUST] = { /* ADJUST */ [LAYER_ADJUST] = { /* ADJUST */
{ _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, MUS_ON, MUS_OFF, AUD_ON, AUD_OFF }, { _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, MUS_ON, MUS_OFF, AUD_ON, AUD_OFF },
{ _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______ }, { _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, RESET, _______, M_MOUSE, _______, _______, _______, _______ }, { _______, _______, _______, _______, M_BACKL, RESET, _______, M_MOUSE, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, VC_UP, VC_DOWN, _______, _______ }, { _______, _______, _______, _______, _______, _______, _______, _______, VC_UP, VC_DOWN, _______, _______ },
}, },
@ -337,6 +339,15 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
} }
break; break;
#ifdef BACKLIGHT_ENABLE
case MACRO_BACKLIGHT:
if (record->event.pressed)
{
backlight_step();
}
#endif
#ifdef MOUSEKEY_ENABLE #ifdef MOUSEKEY_ENABLE
case MACRO_MOUSE: case MACRO_MOUSE:

@ -1,11 +1,12 @@
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6 AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.

@ -0,0 +1,326 @@
/*
Copyright
2015 Jack Humbert <jack.humb@gmail.com>
2016 Francois Marlier <fmarlier@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
For more info on how this works per OS, see here
https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input
*/
#include "planck.h"
#include "action_layer.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
#define _PLOVER 5
#define _ADJUST 16
// Macro name shortcuts
#define QWERTY M(_QWERTY)
#define COLEMAK M(_COLEMAK)
#define DVORAK M(_DVORAK)
#define LOWER M(_LOWER)
#define RAISE M(_RAISE)
#define M_BL 5
#define PLOVER M(12)
#define EXT_PLV M(13)
#define TOG_OUT M(14)
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = {
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
{M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = {
{KC_TAB, UC_q, UC_w, UC_f, UC_p, UC_g, UC_j, UC_l, UC_u, UC_y, UC_SCLN, UC_BSPC},
{KC_ESC, UC_a, UC_r, UC_s, UC_t, UC_d, UC_h, UC_n, UC_e, UC_i, UC_o, UC_QUOT},
{KC_LSFT, UC_z, UC_x, UC_c, UC_v, UC_b, UC_k, UC_m, UC_COMM, UC_DOT, UC_SLSH, KC_ENT},
{KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_DVORAK] = {
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
{M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = {
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = {
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
* | # | # | # | # | # | # | # | # | # | # | # | # |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | S | T | P | H | * | * | F | P | L | T | D |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* |TogOut| S | K | W | R | * | * | R | B | G | S | Z |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Exit | | | A | O | | E | U | | | |
* `-----------------------------------------------------------------------------------'
*/
[_PLOVER] = {
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
{TOG_OUT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
},
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|Musoff| | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = {
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
}
};
const uint16_t PROGMEM fn_actions[] = {
};
#ifdef AUDIO_ENABLE
float tone_startup[][2] = {
{440.0*pow(2.0,(31)/12.0), 12},
{440.0*pow(2.0,(28)/12.0), 8},
{440.0*pow(2.0,(19)/12.0), 8},
{440.0*pow(2.0,(24)/12.0), 8},
{440.0*pow(2.0,(28)/12.0), 20}
};
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_plover[][2] = SONG(PLOVER_SOUND);
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {
case _QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
break;
case _COLEMAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
}
break;
case _DVORAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
#endif
persistant_default_layer_set(1UL<<_DVORAK);
}
break;
case _LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
case _RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
case M_BL:
if (record->event.pressed) {
register_code(KC_RSFT);
#ifdef BACKLIGHT_ENABLE
backlight_step();
#endif
} else {
unregister_code(KC_RSFT);
}
break;
case 12:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
stop_all_notes();
PLAY_NOTE_ARRAY(tone_plover, false, 0);
#endif
layer_off(_RAISE);
layer_off(_LOWER);
layer_off(_ADJUST);
layer_on(_PLOVER);
if (!eeconfig_is_enabled()) {
eeconfig_init();
}
keymap_config.raw = eeconfig_read_keymap();
keymap_config.nkro = 1;
eeconfig_update_keymap(keymap_config.raw);
}
break;
case 13:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);
#endif
layer_off(_PLOVER);
}
break;
case 14:
if (record->event.pressed) {
return MACRO( D(E), D(R), D(F), D(V), D(O), D(L), U(E), U(R), U(F), U(V), U(O), U(L), END );
}
break;
}
return MACRO_NONE;
};
void matrix_init_user(void) {
#ifdef AUDIO_ENABLE
_delay_ms(20); // stops the tick
PLAY_NOTE_ARRAY(tone_startup, false, 0);
#endif
}
#ifdef AUDIO_ENABLE
void play_goodbye_tone()
{
PLAY_NOTE_ARRAY(goodbye, false, 0);
_delay_ms(150);
}
#endif

@ -0,0 +1 @@
UNICODE_ENABLE = yes # Unicode

@ -7,7 +7,12 @@ __attribute__ ((weak))
void matrix_scan_user(void) {} void matrix_scan_user(void) {}
__attribute__ ((weak)) __attribute__ ((weak))
void process_action_user(keyrecord_t *record) {} bool process_action_user(keyrecord_t *record) {
return true;
}
__attribute__ ((weak))
void led_set_user(uint8_t usb_led) {}
void matrix_init_kb(void) { void matrix_init_kb(void) {
#ifdef BACKLIGHT_ENABLE #ifdef BACKLIGHT_ENABLE
@ -29,12 +34,26 @@ void matrix_scan_kb(void) {
matrix_scan_user(); matrix_scan_user();
} }
void process_action_kb(keyrecord_t *record) { bool process_action_kb(keyrecord_t *record) {
process_action_user(record); return 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);
} }
#ifdef BACKLIGHT_ENABLE #ifdef BACKLIGHT_ENABLE
#define CHANNEL OCR1C #define CHANNEL OCR1C
#define BREATHING_NO_HALT 0
#define BREATHING_HALT_OFF 1
#define BREATHING_HALT_ON 2
static uint8_t breath_intensity;
static uint8_t breath_speed;
static uint16_t breathing_index;
static uint8_t breathing_halt;
void backlight_init_ports() void backlight_init_ports()
{ {
@ -60,22 +79,22 @@ void backlight_init_ports()
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
backlight_init(); backlight_init();
breathing_defaults();
} }
void backlight_set(uint8_t level) void backlight_set(uint8_t level)
{ {
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
if ( level == 0 ) if ( level == 0 )
{ {
// Turn off PWM control on PB7, revert to output low. // Turn off PWM control on PB7, revert to output low.
TCCR1A &= ~(_BV(COM1C1)); TCCR1A &= ~(_BV(COM1C1));
CHANNEL = 0x0; CHANNEL = 0x0;
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
} }
else if ( level == BACKLIGHT_LEVELS ) else if ( level == BACKLIGHT_LEVELS )
{ {
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
// Turn on PWM control of PB7 // Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1); TCCR1A |= _BV(COM1C1);
// Set the brightness // Set the brightness
@ -83,13 +102,205 @@ void backlight_set(uint8_t level)
} }
else else
{ {
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
// Turn on PWM control of PB7 // Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1); TCCR1A |= _BV(COM1C1);
// Set the brightness // Set the brightness
CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2)); CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
} }
breathing_intensity_default();
}
void breathing_enable(void)
{
if (get_backlight_level() == 0)
{
breathing_index = 0;
}
else
{
// Set breathing_index to be at the midpoint (brightest point)
breathing_index = 0x20 << breath_speed;
}
breathing_halt = BREATHING_NO_HALT;
// Enable breathing interrupt
TIMSK1 |= _BV(OCIE1A);
}
void breathing_pulse(void)
{
if (get_backlight_level() == 0)
{
breathing_index = 0;
}
else
{
// Set breathing_index to be at the midpoint + 1 (brightest point)
breathing_index = 0x21 << breath_speed;
}
breathing_halt = BREATHING_HALT_ON;
// Enable breathing interrupt
TIMSK1 |= _BV(OCIE1A);
}
void breathing_disable(void)
{
// Disable breathing interrupt
TIMSK1 &= ~_BV(OCIE1A);
backlight_set(get_backlight_level());
}
void breathing_self_disable(void)
{
if (get_backlight_level() == 0)
{
breathing_halt = BREATHING_HALT_OFF;
}
else
{
breathing_halt = BREATHING_HALT_ON;
}
//backlight_set(get_backlight_level());
}
void breathing_toggle(void)
{
if (!is_breathing())
{
if (get_backlight_level() == 0)
{
breathing_index = 0;
}
else
{
// Set breathing_index to be at the midpoint + 1 (brightest point)
breathing_index = 0x21 << breath_speed;
}
breathing_halt = BREATHING_NO_HALT;
}
// Toggle breathing interrupt
TIMSK1 ^= _BV(OCIE1A);
// Restore backlight level
if (!is_breathing())
{
backlight_set(get_backlight_level());
}
}
bool is_breathing(void)
{
return (TIMSK1 && _BV(OCIE1A));
}
void breathing_intensity_default(void)
{
//breath_intensity = (uint8_t)((uint16_t)100 * (uint16_t)get_backlight_level() / (uint16_t)BACKLIGHT_LEVELS);
breath_intensity = ((BACKLIGHT_LEVELS - get_backlight_level()) * ((BACKLIGHT_LEVELS + 1) / 2));
}
void breathing_intensity_set(uint8_t value)
{
breath_intensity = value;
}
void breathing_speed_default(void)
{
breath_speed = 4;
}
void breathing_speed_set(uint8_t value)
{
bool is_breathing_now = is_breathing();
uint8_t old_breath_speed = breath_speed;
if (is_breathing_now)
{
// Disable breathing interrupt
TIMSK1 &= ~_BV(OCIE1A);
}
breath_speed = value;
if (is_breathing_now)
{
// Adjust index to account for new speed
breathing_index = (( (uint8_t)( (breathing_index) >> old_breath_speed ) ) & 0x3F) << breath_speed;
// Enable breathing interrupt
TIMSK1 |= _BV(OCIE1A);
}
}
void breathing_speed_inc(uint8_t value)
{
if ((uint16_t)(breath_speed - value) > 10 )
{
breathing_speed_set(0);
}
else
{
breathing_speed_set(breath_speed - value);
}
}
void breathing_speed_dec(uint8_t value)
{
if ((uint16_t)(breath_speed + value) > 10 )
{
breathing_speed_set(10);
}
else
{
breathing_speed_set(breath_speed + value);
}
}
void breathing_defaults(void)
{
breathing_intensity_default();
breathing_speed_default();
breathing_halt = BREATHING_NO_HALT;
} }
/* Breathing Sleep LED brighness(PWM On period) table
* (64[steps] * 4[duration]) / 64[PWM periods/s] = 4 second breath cycle
*
* http://www.wolframalpha.com/input/?i=%28sin%28+x%2F64*pi%29**8+*+255%2C+x%3D0+to+63
* (0..63).each {|x| p ((sin(x/64.0*PI)**8)*255).to_i }
*/
static const uint8_t breathing_table[64] PROGMEM = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 6, 10,
15, 23, 32, 44, 58, 74, 93, 113, 135, 157, 179, 199, 218, 233, 245, 252,
255, 252, 245, 233, 218, 199, 179, 157, 135, 113, 93, 74, 58, 44, 32, 23,
15, 10, 6, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
ISR(TIMER1_COMPA_vect)
{
// CHANNEL = (pgm_read_byte(&breathing_table[ ( (uint8_t)( (breathing_index++) >> breath_speed ) ) & 0x3F ] )) * breath_intensity;
uint8_t local_index = ( (uint8_t)( (breathing_index++) >> breath_speed ) ) & 0x3F;
if (((breathing_halt == BREATHING_HALT_ON) && (local_index == 0x20)) || ((breathing_halt == BREATHING_HALT_OFF) && (local_index == 0x3F)))
{
// Disable breathing interrupt
TIMSK1 &= ~_BV(OCIE1A);
}
CHANNEL = (uint16_t)(((uint16_t)pgm_read_byte(&breathing_table[local_index]) * 257)) >> breath_intensity;
}
#endif #endif

@ -1,19 +1,7 @@
#ifndef PLANCK_H #ifndef PLANCK_H
#define PLANCK_H #define PLANCK_H
#include "matrix.h" #include "quantum.h"
#include "keymap_common.h"
#ifdef BACKLIGHT_ENABLE
#include "backlight.h"
#endif
#ifdef RGBLIGHT_ENABLE
#include "rgblight.h"
#endif
#include <stddef.h>
#include <avr/io.h>
#ifdef MIDI_ENABLE
#include <keymap_midi.h>
#endif
#define PLANCK_MIT( \ #define PLANCK_MIT( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
@ -43,6 +31,24 @@
void matrix_init_user(void); void matrix_init_user(void);
void matrix_scan_user(void); void matrix_scan_user(void);
void process_action_user(keyrecord_t *record); bool process_action_user(keyrecord_t *record);
void led_set_user(uint8_t usb_led);
void backlight_init_ports(void);
void breathing_enable(void);
void breathing_pulse(void);
void breathing_disable(void);
void breathing_self_disable(void);
void breathing_toggle(void);
bool is_breathing(void);
void breathing_defaults(void);
void breathing_intensity_default(void);
void breathing_speed_default(void);
void breathing_speed_set(uint8_t value);
void breathing_speed_inc(uint8_t value);
void breathing_speed_dec(uint8_t value);
#endif #endif

@ -14,7 +14,6 @@
#define _DVORAK 2 #define _DVORAK 2
#define _LOWER 3 #define _LOWER 3
#define _RAISE 4 #define _RAISE 4
#define _MUSIC 5
#define _ADJUST 16 #define _ADJUST 16
// Macro name shortcuts // Macro name shortcuts
@ -24,12 +23,6 @@
#define LOWER M(_LOWER) #define LOWER M(_LOWER)
#define RAISE M(_RAISE) #define RAISE M(_RAISE)
#define M_BL 5 #define M_BL 5
#define AUD_OFF M(6)
#define AUD_ON M(7)
#define MUS_OFF M(8)
#define MUS_ON M(9)
#define VC_IN M(10)
#define VC_DE M(11)
// Fillers to make layering more clear // Fillers to make layering more clear
#define _______ KC_TRNS #define _______ KC_TRNS
@ -108,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------| * |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------| * |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play | * | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
@ -117,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
}, },
@ -129,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------| * |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------| * |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play | * | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------' * `-----------------------------------------------------------------------------------'
@ -138,21 +131,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
}, },
/* Music (reserved for process_action_user)
*
*/
[_MUSIC] = {
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
},
/* Adjust (Lower + Raise) /* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
@ -169,8 +151,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ADJUST] = { [_ADJUST] = {
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
{_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______},
{_______, VC_DE, VC_IN, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
} }
@ -193,7 +175,6 @@ float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND); float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
@ -257,53 +238,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
unregister_code(KC_RSFT); unregister_code(KC_RSFT);
} }
break; break;
case 6:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
audio_off();
#endif
}
break;
case 7:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
audio_on();
PLAY_NOTE_ARRAY(start_up, false, 0);
#endif
}
break;
case 8:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
layer_off(_MUSIC);
stop_all_notes();
#endif
}
break;
case 9:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(music_scale, false, 0);
layer_on(_MUSIC);
#endif
}
break;
case 10:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
voice_iterate();
PLAY_NOTE_ARRAY(music_scale, false, 0);
#endif
}
break;
case 11:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
voice_deiterate();
PLAY_NOTE_ARRAY(music_scale, false, 0);
#endif
}
break;
} }
return MACRO_NONE; return MACRO_NONE;
}; };
@ -318,21 +252,6 @@ void matrix_init_user(void) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
uint8_t starting_note = 0x0C;
int offset = 0;
void process_action_user(keyrecord_t *record) {
if (IS_LAYER_ON(_MUSIC)) {
if (record->event.pressed) {
play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF);
} else {
stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)));
}
}
}
void play_goodbye_tone() void play_goodbye_tone()
{ {
PLAY_NOTE_ARRAY(goodbye, false, 0); PLAY_NOTE_ARRAY(goodbye, false, 0);

@ -11,8 +11,8 @@ void matrix_scan_user(void) {
}; };
__attribute__ ((weak)) __attribute__ ((weak))
void process_action_user(keyrecord_t *record) { bool process_action_user(keyrecord_t *record) {
return true;
}; };
void matrix_init_kb(void) { void matrix_init_kb(void) {
@ -36,8 +36,8 @@ void matrix_scan_kb(void) {
matrix_scan_user(); matrix_scan_user();
}; };
void process_action_kb(keyrecord_t *record) { bool process_action_kb(keyrecord_t *record) {
process_action_user(record); return process_action_user(record);
} }
#ifdef BACKLIGHT_ENABLE #ifdef BACKLIGHT_ENABLE

@ -1,19 +1,7 @@
#ifndef PREONIC_H #ifndef PREONIC_H
#define PREONIC_H #define PREONIC_H
#include "matrix.h" #include "quantum.h"
#include "keymap_common.h"
#ifdef BACKLIGHT_ENABLE
#include "backlight.h"
#endif
#ifdef RGBLIGHT_ENABLE
#include "rgblight.h"
#endif
#include <stddef.h>
#include <avr/io.h>
#ifdef MIDI_ENABLE
#include <keymap_midi.h>
#endif
#define PREONIC_MIT( \ #define PREONIC_MIT( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
@ -47,6 +35,6 @@
void matrix_init_user(void); void matrix_init_user(void);
void matrix_scan_user(void); void matrix_scan_user(void);
void process_action_kb(keyrecord_t *record); bool process_action_kb(keyrecord_t *record);
#endif #endif

@ -1,6 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <math.h> //#include <math.h>
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include <avr/io.h> #include <avr/io.h>
@ -10,30 +10,28 @@
#include "eeconfig.h" #include "eeconfig.h"
#ifdef VIBRATO_ENABLE #define CPU_PRESCALER 8
#include "vibrato_lut.h"
#endif
#define PI 3.14159265 // -----------------------------------------------------------------------------
// Timer Abstractions
// -----------------------------------------------------------------------------
#define CPU_PRESCALER 8 // TIMSK3 - Timer/Counter #3 Interrupt Mask Register
// Turn on/off 3A interputs, stopping/enabling the ISR calls
#define ENABLE_AUDIO_COUNTER_3_ISR TIMSK3 |= _BV(OCIE3A)
#define DISABLE_AUDIO_COUNTER_3_ISR TIMSK3 &= ~_BV(OCIE3A)
#ifdef PWM_AUDIO // TCCR3A: Timer/Counter #3 Control Register
#include "wave.h" // Compare Output Mode (COM3An) = 0b00 = Normal port operation, OC3A disconnected from PC6
#define SAMPLE_DIVIDER 39 #define ENABLE_AUDIO_COUNTER_3_OUTPUT TCCR3A |= _BV(COM3A1);
#define SAMPLE_RATE (2000000.0/SAMPLE_DIVIDER/2048) #define DISABLE_AUDIO_COUNTER_3_OUTPUT TCCR3A &= ~(_BV(COM3A1) | _BV(COM3A0));
// Resistor value of 1/ (2 * PI * 10nF * (2000000 hertz / SAMPLE_DIVIDER / 10)) for 10nF cap
float places[8] = {0, 0, 0, 0, 0, 0, 0, 0}; // Fast PWM Mode Controls
uint16_t place_int = 0; #define TIMER_3_PERIOD ICR3
bool repeat = true; #define TIMER_3_DUTY_CYCLE OCR3A
#endif
// -----------------------------------------------------------------------------
void delay_us(int count) {
while(count--) {
_delay_us(1);
}
}
int voices = 0; int voices = 0;
int voice_place = 0; int voice_place = 0;
@ -45,19 +43,16 @@ float frequencies[8] = {0, 0, 0, 0, 0, 0, 0, 0};
int volumes[8] = {0, 0, 0, 0, 0, 0, 0, 0}; int volumes[8] = {0, 0, 0, 0, 0, 0, 0, 0};
bool sliding = false; bool sliding = false;
int max = 0xFF;
float sum = 0;
float place = 0; float place = 0;
uint8_t * sample; uint8_t * sample;
uint16_t sample_length = 0; uint16_t sample_length = 0;
// float freq = 0;
bool notes = false; bool playing_notes = false;
bool note = false; bool playing_note = false;
float note_frequency = 0; float note_frequency = 0;
float note_length = 0; float note_length = 0;
float note_tempo = TEMPO_DEFAULT; uint8_t note_tempo = TEMPO_DEFAULT;
float note_timbre = TIMBRE_DEFAULT; float note_timbre = TIMBRE_DEFAULT;
uint16_t note_position = 0; uint16_t note_position = 0;
float (* notes_pointer)[][2]; float (* notes_pointer)[][2];
@ -77,175 +72,65 @@ float vibrato_rate = 0.125;
float polyphony_rate = 0; float polyphony_rate = 0;
bool inited = false; static bool audio_initialized = false;
audio_config_t audio_config; audio_config_t audio_config;
uint16_t envelope_index = 0; uint16_t envelope_index = 0;
void audio_toggle(void) { void audio_init()
audio_config.enable ^= 1; {
eeconfig_update_audio(audio_config.raw);
}
void audio_on(void) {
audio_config.enable = 1;
eeconfig_update_audio(audio_config.raw);
}
void audio_off(void) {
audio_config.enable = 0;
eeconfig_update_audio(audio_config.raw);
}
#ifdef VIBRATO_ENABLE
// Vibrato rate functions
void set_vibrato_rate(float rate) {
vibrato_rate = rate;
}
void increase_vibrato_rate(float change) {
vibrato_rate *= change;
}
void decrease_vibrato_rate(float change) {
vibrato_rate /= change;
}
#ifdef VIBRATO_STRENGTH_ENABLE
void set_vibrato_strength(float strength) {
vibrato_strength = strength;
}
void increase_vibrato_strength(float change) {
vibrato_strength *= change;
}
void decrease_vibrato_strength(float change) {
vibrato_strength /= change;
}
#endif
#endif
// Polyphony functions
void set_polyphony_rate(float rate) {
polyphony_rate = rate;
}
void enable_polyphony() {
polyphony_rate = 5;
}
void disable_polyphony() {
polyphony_rate = 0;
}
void increase_polyphony_rate(float change) {
polyphony_rate *= change;
}
void decrease_polyphony_rate(float change) {
polyphony_rate /= change;
}
// Timbre function
void set_timbre(float timbre) {
note_timbre = timbre;
}
// Tempo functions
void set_tempo(float tempo) {
note_tempo = tempo;
}
void decrease_tempo(uint8_t tempo_change) {
note_tempo += (float) tempo_change;
}
void increase_tempo(uint8_t tempo_change) {
if (note_tempo - (float) tempo_change < 10) {
note_tempo = 10;
} else {
note_tempo -= (float) tempo_change;
}
}
void audio_init() {
/* check signature */ // Check EEPROM
if (!eeconfig_is_enabled()) { if (!eeconfig_is_enabled())
{
eeconfig_init(); eeconfig_init();
} }
audio_config.raw = eeconfig_read_audio(); audio_config.raw = eeconfig_read_audio();
#ifdef PWM_AUDIO // Set port PC6 (OC3A and /OC4A) as output
PLLFRQ = _BV(PDIV2);
PLLCSR = _BV(PLLE);
while(!(PLLCSR & _BV(PLOCK)));
PLLFRQ |= _BV(PLLTM0); /* PCK 48MHz */
/* Init a fast PWM on Timer4 */
TCCR4A = _BV(COM4A0) | _BV(PWM4A); /* Clear OC4A on Compare Match */
TCCR4B = _BV(CS40); /* No prescaling => f = PCK/256 = 187500Hz */
OCR4A = 0;
/* Enable the OC4A output */
DDRC |= _BV(PORTC6); DDRC |= _BV(PORTC6);
TIMSK3 &= ~_BV(OCIE3A); // Turn off 3A interputs DISABLE_AUDIO_COUNTER_3_ISR;
TCCR3A = 0x0; // Options not needed
TCCR3B = _BV(CS31) | _BV(CS30) | _BV(WGM32); // 64th prescaling and CTC
OCR3A = SAMPLE_DIVIDER - 1; // Correct count/compare, related to sample playback
#else
DDRC |= _BV(PORTC6);
TIMSK3 &= ~_BV(OCIE3A); // Turn off 3A interputs
// TCCR3A / TCCR3B: Timer/Counter #3 Control Registers
// Compare Output Mode (COM3An) = 0b00 = Normal port operation, OC3A disconnected from PC6
// Waveform Generation Mode (WGM3n) = 0b1110 = Fast PWM Mode 14 (Period = ICR3, Duty Cycle = OCR3A)
// Clock Select (CS3n) = 0b010 = Clock / 8
TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30); TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30);
TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30); TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30);
#endif
inited = true; audio_initialized = true;
} }
void stop_all_notes() { void stop_all_notes()
if (!inited) { {
if (!audio_initialized) {
audio_init(); audio_init();
} }
voices = 0; voices = 0;
#ifdef PWM_AUDIO
TIMSK3 &= ~_BV(OCIE3A); DISABLE_AUDIO_COUNTER_3_ISR;
#else DISABLE_AUDIO_COUNTER_3_OUTPUT;
TIMSK3 &= ~_BV(OCIE3A);
TCCR3A &= ~_BV(COM3A1); playing_notes = false;
#endif playing_note = false;
notes = false;
note = false;
frequency = 0; frequency = 0;
volume = 0; volume = 0;
for (int i = 0; i < 8; i++) { for (uint8_t i = 0; i < 8; i++)
{
frequencies[i] = 0; frequencies[i] = 0;
volumes[i] = 0; volumes[i] = 0;
} }
} }
void stop_note(float freq) { void stop_note(float freq)
if (note) { {
if (!inited) { if (playing_note) {
if (!audio_initialized) {
audio_init(); audio_init();
} }
#ifdef PWM_AUDIO
freq = freq / SAMPLE_RATE;
#endif
for (int i = 7; i >= 0; i--) { for (int i = 7; i >= 0; i--) {
if (frequencies[i] == freq) { if (frequencies[i] == freq) {
frequencies[i] = 0; frequencies[i] = 0;
@ -266,15 +151,11 @@ void stop_note(float freq) {
voice_place = 0; voice_place = 0;
} }
if (voices == 0) { if (voices == 0) {
#ifdef PWM_AUDIO DISABLE_AUDIO_COUNTER_3_ISR;
TIMSK3 &= ~_BV(OCIE3A); DISABLE_AUDIO_COUNTER_3_OUTPUT;
#else
TIMSK3 &= ~_BV(OCIE3A);
TCCR3A &= ~_BV(COM3A1);
#endif
frequency = 0; frequency = 0;
volume = 0; volume = 0;
note = false; playing_note = false;
} }
} }
} }
@ -289,9 +170,9 @@ float mod(float a, int b)
float vibrato(float average_freq) { float vibrato(float average_freq) {
#ifdef VIBRATO_STRENGTH_ENABLE #ifdef VIBRATO_STRENGTH_ENABLE
float vibrated_freq = average_freq * pow(VIBRATO_LUT[(int)vibrato_counter], vibrato_strength); float vibrated_freq = average_freq * pow(vibrato_lut[(int)vibrato_counter], vibrato_strength);
#else #else
float vibrated_freq = average_freq * VIBRATO_LUT[(int)vibrato_counter]; float vibrated_freq = average_freq * vibrato_lut[(int)vibrato_counter];
#endif #endif
vibrato_counter = mod((vibrato_counter + vibrato_rate * (1.0 + 440.0/average_freq)), VIBRATO_LUT_LENGTH); vibrato_counter = mod((vibrato_counter + vibrato_rate * (1.0 + 440.0/average_freq)), VIBRATO_LUT_LENGTH);
return vibrated_freq; return vibrated_freq;
@ -299,58 +180,12 @@ float vibrato(float average_freq) {
#endif #endif
ISR(TIMER3_COMPA_vect) { ISR(TIMER3_COMPA_vect)
if (note) { {
#ifdef PWM_AUDIO float freq;
if (voices == 1) {
// SINE
OCR4A = pgm_read_byte(&sinewave[(uint16_t)place]) >> 2;
// SQUARE
// if (((int)place) >= 1024){
// OCR4A = 0xFF >> 2;
// } else {
// OCR4A = 0x00;
// }
// SAWTOOTH
// OCR4A = (int)place / 4;
// TRIANGLE
// if (((int)place) >= 1024) {
// OCR4A = (int)place / 2;
// } else {
// OCR4A = 2048 - (int)place / 2;
// }
place += frequency;
if (place >= SINE_LENGTH)
place -= SINE_LENGTH;
} else {
int sum = 0;
for (int i = 0; i < voices; i++) {
// SINE
sum += pgm_read_byte(&sinewave[(uint16_t)places[i]]) >> 2;
// SQUARE
// if (((int)places[i]) >= 1024){
// sum += 0xFF >> 2;
// } else {
// sum += 0x00;
// }
places[i] += frequencies[i];
if (places[i] >= SINE_LENGTH) if (playing_note) {
places[i] -= SINE_LENGTH;
}
OCR4A = sum;
}
#else
if (voices > 0) { if (voices > 0) {
float freq;
if (polyphony_rate > 0) { if (polyphony_rate > 0) {
if (voices > 1) { if (voices > 1) {
voice_place %= voices; voice_place %= voices;
@ -359,15 +194,16 @@ ISR(TIMER3_COMPA_vect) {
place = 0.0; place = 0.0;
} }
} }
#ifdef VIBRATO_ENABLE #ifdef VIBRATO_ENABLE
if (vibrato_strength > 0) { if (vibrato_strength > 0) {
freq = vibrato(frequencies[voice_place]); freq = vibrato(frequencies[voice_place]);
} else { } else {
#else
{
#endif
freq = frequencies[voice_place]; freq = frequencies[voice_place];
} }
#else
freq = frequencies[voice_place];
#endif
} else { } else {
if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) { if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) {
frequency = frequency * pow(2, 440/frequency/12/2); frequency = frequency * pow(2, 440/frequency/12/2);
@ -377,97 +213,73 @@ ISR(TIMER3_COMPA_vect) {
frequency = frequencies[voices - 1]; frequency = frequencies[voices - 1];
} }
#ifdef VIBRATO_ENABLE #ifdef VIBRATO_ENABLE
if (vibrato_strength > 0) { if (vibrato_strength > 0) {
freq = vibrato(frequency); freq = vibrato(frequency);
} else { } else {
#else
{
#endif
freq = frequency; freq = frequency;
} }
#else
freq = frequency;
#endif
} }
if (envelope_index < 65535) { if (envelope_index < 65535) {
envelope_index++; envelope_index++;
} }
freq = voice_envelope(freq); freq = voice_envelope(freq);
if (freq < 30.517578125) if (freq < 30.517578125) {
freq = 30.52; freq = 30.52;
ICR3 = (int)(((double)F_CPU) / (freq * CPU_PRESCALER)); // Set max to the period
OCR3A = (int)((((double)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre); // Set compare to half the period
} }
#endif
}
// SAMPLE
// OCR4A = pgm_read_byte(&sample[(uint16_t)place_int]);
// place_int++;
// if (place_int >= sample_length)
// if (repeat)
// place_int -= sample_length;
// else
// TIMSK3 &= ~_BV(OCIE3A);
if (notes) { TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER));
#ifdef PWM_AUDIO TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre);
OCR4A = pgm_read_byte(&sinewave[(uint16_t)place]) >> 0; }
}
place += note_frequency; if (playing_notes) {
if (place >= SINE_LENGTH)
place -= SINE_LENGTH;
#else
if (note_frequency > 0) { if (note_frequency > 0) {
float freq;
#ifdef VIBRATO_ENABLE #ifdef VIBRATO_ENABLE
if (vibrato_strength > 0) { if (vibrato_strength > 0) {
freq = vibrato(note_frequency); freq = vibrato(note_frequency);
} else { } else {
#else
{
#endif
freq = note_frequency; freq = note_frequency;
} }
#else
freq = note_frequency;
#endif
if (envelope_index < 65535) { if (envelope_index < 65535) {
envelope_index++; envelope_index++;
} }
freq = voice_envelope(freq); freq = voice_envelope(freq);
ICR3 = (int)(((double)F_CPU) / (freq * CPU_PRESCALER)); // Set max to the period TIMER_3_PERIOD = (uint16_t)(((float)F_CPU) / (freq * CPU_PRESCALER));
OCR3A = (int)((((double)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre); // Set compare to half the period TIMER_3_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre);
} else { } else {
ICR3 = 0; TIMER_3_PERIOD = 0;
OCR3A = 0; TIMER_3_DUTY_CYCLE = 0;
} }
#endif
note_position++; note_position++;
bool end_of_note = false; bool end_of_note = false;
if (ICR3 > 0) if (TIMER_3_PERIOD > 0) {
end_of_note = (note_position >= (note_length / ICR3 * 0xFFFF)); end_of_note = (note_position >= (note_length / TIMER_3_PERIOD * 0xFFFF));
else } else {
end_of_note = (note_position >= (note_length * 0x7FF)); end_of_note = (note_position >= (note_length * 0x7FF));
}
if (end_of_note) { if (end_of_note) {
current_note++; current_note++;
if (current_note >= notes_count) { if (current_note >= notes_count) {
if (notes_repeat) { if (notes_repeat) {
current_note = 0; current_note = 0;
} else { } else {
#ifdef PWM_AUDIO DISABLE_AUDIO_COUNTER_3_ISR;
TIMSK3 &= ~_BV(OCIE3A); DISABLE_AUDIO_COUNTER_3_OUTPUT;
#else playing_notes = false;
TIMSK3 &= ~_BV(OCIE3A);
TCCR3A &= ~_BV(COM3A1);
#endif
notes = false;
return; return;
} }
} }
@ -478,70 +290,66 @@ ISR(TIMER3_COMPA_vect) {
current_note--; current_note--;
} else { } else {
note_resting = false; note_resting = false;
#ifdef PWM_AUDIO
note_frequency = (*notes_pointer)[current_note][0] / SAMPLE_RATE;
note_length = (*notes_pointer)[current_note][1] * (note_tempo / 100);
#else
envelope_index = 0; envelope_index = 0;
note_frequency = (*notes_pointer)[current_note][0]; note_frequency = (*notes_pointer)[current_note][0];
note_length = ((*notes_pointer)[current_note][1] / 4) * (note_tempo / 100); note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100);
#endif
} }
note_position = 0; note_position = 0;
} }
} }
if (!audio_config.enable) { if (!audio_config.enable) {
notes = false; playing_notes = false;
note = false; playing_note = false;
} }
} }
void play_note(float freq, int vol) { void play_note(float freq, int vol) {
if (!inited) { if (!audio_initialized) {
audio_init(); audio_init();
} }
if (audio_config.enable && voices < 8) { if (audio_config.enable && voices < 8) {
TIMSK3 &= ~_BV(OCIE3A); DISABLE_AUDIO_COUNTER_3_ISR;
// Cancel notes if notes are playing // Cancel notes if notes are playing
if (notes) if (playing_notes)
stop_all_notes(); stop_all_notes();
note = true;
playing_note = true;
envelope_index = 0; envelope_index = 0;
#ifdef PWM_AUDIO
freq = freq / SAMPLE_RATE;
#endif
if (freq > 0) { if (freq > 0) {
frequencies[voices] = freq; frequencies[voices] = freq;
volumes[voices] = vol; volumes[voices] = vol;
voices++; voices++;
} }
#ifdef PWM_AUDIO ENABLE_AUDIO_COUNTER_3_ISR;
TIMSK3 |= _BV(OCIE3A); ENABLE_AUDIO_COUNTER_3_OUTPUT;
#else }
TIMSK3 |= _BV(OCIE3A);
TCCR3A |= _BV(COM3A1);
#endif
}
} }
void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest) { void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest)
{
if (!inited) { if (!audio_initialized) {
audio_init(); audio_init();
} }
if (audio_config.enable) { if (audio_config.enable) {
TIMSK3 &= ~_BV(OCIE3A);
DISABLE_AUDIO_COUNTER_3_ISR;
// Cancel note if a note is playing // Cancel note if a note is playing
if (note) if (playing_note)
stop_all_notes(); stop_all_notes();
notes = true;
playing_notes = true;
notes_pointer = np; notes_pointer = np;
notes_count = n_count; notes_count = n_count;
@ -550,58 +358,137 @@ if (audio_config.enable) {
place = 0; place = 0;
current_note = 0; current_note = 0;
#ifdef PWM_AUDIO
note_frequency = (*notes_pointer)[current_note][0] / SAMPLE_RATE;
note_length = (*notes_pointer)[current_note][1] * (note_tempo / 100);
#else
note_frequency = (*notes_pointer)[current_note][0]; note_frequency = (*notes_pointer)[current_note][0];
note_length = ((*notes_pointer)[current_note][1] / 4) * (note_tempo / 100); note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100);
#endif
note_position = 0; note_position = 0;
#ifdef PWM_AUDIO ENABLE_AUDIO_COUNTER_3_ISR;
TIMSK3 |= _BV(OCIE3A); ENABLE_AUDIO_COUNTER_3_OUTPUT;
#else }
TIMSK3 |= _BV(OCIE3A);
TCCR3A |= _BV(COM3A1);
#endif
} }
bool is_playing_notes(void) {
return playing_notes;
} }
#ifdef PWM_AUDIO bool is_audio_on(void) {
void play_sample(uint8_t * s, uint16_t l, bool r) { return (audio_config.enable != 0);
if (!inited) { }
audio_init();
}
if (audio_config.enable) { void audio_toggle(void) {
TIMSK3 &= ~_BV(OCIE3A); audio_config.enable ^= 1;
stop_all_notes(); eeconfig_update_audio(audio_config.raw);
place_int = 0; if (audio_config.enable)
sample = s; audio_on_user();
sample_length = l; }
repeat = r;
void audio_on(void) {
audio_config.enable = 1;
eeconfig_update_audio(audio_config.raw);
audio_on_user();
}
void audio_off(void) {
audio_config.enable = 0;
eeconfig_update_audio(audio_config.raw);
}
TIMSK3 |= _BV(OCIE3A); #ifdef VIBRATO_ENABLE
// Vibrato rate functions
void set_vibrato_rate(float rate) {
vibrato_rate = rate;
}
void increase_vibrato_rate(float change) {
vibrato_rate *= change;
}
void decrease_vibrato_rate(float change) {
vibrato_rate /= change;
}
#ifdef VIBRATO_STRENGTH_ENABLE
void set_vibrato_strength(float strength) {
vibrato_strength = strength;
}
void increase_vibrato_strength(float change) {
vibrato_strength *= change;
}
void decrease_vibrato_strength(float change) {
vibrato_strength /= change;
}
#endif /* VIBRATO_STRENGTH_ENABLE */
#endif /* VIBRATO_ENABLE */
// Polyphony functions
void set_polyphony_rate(float rate) {
polyphony_rate = rate;
}
void enable_polyphony() {
polyphony_rate = 5;
}
void disable_polyphony() {
polyphony_rate = 0;
}
void increase_polyphony_rate(float change) {
polyphony_rate *= change;
}
void decrease_polyphony_rate(float change) {
polyphony_rate /= change;
}
// Timbre function
void set_timbre(float timbre) {
note_timbre = timbre;
}
// Tempo functions
void set_tempo(uint8_t tempo) {
note_tempo = tempo;
}
void decrease_tempo(uint8_t tempo_change) {
note_tempo += tempo_change;
}
void increase_tempo(uint8_t tempo_change) {
if (note_tempo - tempo_change < 10) {
note_tempo = 10;
} else {
note_tempo -= tempo_change;
} }
} }
#endif
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Override these functions in your keymap file to play different tunes on // Override these functions in your keymap file to play different tunes on
// startup and bootloader jump // startup and bootloader jump
__attribute__ ((weak)) __attribute__ ((weak))
void play_startup_tone() void play_startup_tone() {}
{
}
__attribute__ ((weak))
void play_goodbye_tone() {}
__attribute__ ((weak)) __attribute__ ((weak))
void play_goodbye_tone() void audio_on_user() {}
{
} __attribute__ ((weak))
void play_music_scale() {}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

@ -25,6 +25,7 @@ typedef union {
}; };
} audio_config_t; } audio_config_t;
bool is_audio_on(void);
void audio_toggle(void); void audio_toggle(void);
void audio_on(void); void audio_on(void);
void audio_off(void); void audio_off(void);
@ -56,7 +57,7 @@ void increase_polyphony_rate(float change);
void decrease_polyphony_rate(float change); void decrease_polyphony_rate(float change);
void set_timbre(float timbre); void set_timbre(float timbre);
void set_tempo(float tempo); void set_tempo(uint8_t tempo);
void increase_tempo(uint8_t tempo_change); void increase_tempo(uint8_t tempo_change);
void decrease_tempo(uint8_t tempo_change); void decrease_tempo(uint8_t tempo_change);
@ -71,7 +72,7 @@ void stop_note(float freq);
void stop_all_notes(void); void stop_all_notes(void);
void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest); void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest);
#define SCALE (int []){ 0 + (12*0), 2 + (12*0), 4 + (12*0), 5 + (12*0), 7 + (12*0), 9 + (12*0), 11 + (12*0), \ #define SCALE (int8_t []){ 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*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*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*3), 2 + (12*3), 4 + (12*3), 5 + (12*3), 7 + (12*3), 9 + (12*3), 11 + (12*3), \
@ -83,7 +84,12 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest)
#define NOTE_ARRAY_SIZE(x) ((int16_t)(sizeof(x) / (sizeof(x[0])))) #define NOTE_ARRAY_SIZE(x) ((int16_t)(sizeof(x) / (sizeof(x[0]))))
#define PLAY_NOTE_ARRAY(note_array, note_repeat, note_rest_style) play_notes(&note_array, NOTE_ARRAY_SIZE((note_array)), (note_repeat), (note_rest_style)); #define PLAY_NOTE_ARRAY(note_array, note_repeat, note_rest_style) play_notes(&note_array, NOTE_ARRAY_SIZE((note_array)), (note_repeat), (note_rest_style));
bool is_playing_notes(void);
void play_goodbye_tone(void); void play_goodbye_tone(void);
void play_startup_tone(void); void play_startup_tone(void);
void audio_on_user(void);
void play_music_scale(void);
#endif #endif

@ -0,0 +1,643 @@
#include <stdio.h>
#include <string.h>
//#include <math.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include <avr/io.h>
#include "print.h"
#include "audio.h"
#include "keymap_common.h"
#include "eeconfig.h"
#define PI 3.14159265
#define CPU_PRESCALER 8
// Timer Abstractions
// TIMSK3 - Timer/Counter #3 Interrupt Mask Register
// Turn on/off 3A interputs, stopping/enabling the ISR calls
#define ENABLE_AUDIO_COUNTER_3_ISR TIMSK3 |= _BV(OCIE3A)
#define DISABLE_AUDIO_COUNTER_3_ISR TIMSK3 &= ~_BV(OCIE3A)
// TCCR3A: Timer/Counter #3 Control Register
// Compare Output Mode (COM3An) = 0b00 = Normal port operation, OC3A disconnected from PC6
#define ENABLE_AUDIO_COUNTER_3_OUTPUT TCCR3A |= _BV(COM3A1);
#define DISABLE_AUDIO_COUNTER_3_OUTPUT TCCR3A &= ~(_BV(COM3A1) | _BV(COM3A0));
#define NOTE_PERIOD ICR3
#define NOTE_DUTY_CYCLE OCR3A
#ifdef PWM_AUDIO
#include "wave.h"
#define SAMPLE_DIVIDER 39
#define SAMPLE_RATE (2000000.0/SAMPLE_DIVIDER/2048)
// Resistor value of 1/ (2 * PI * 10nF * (2000000 hertz / SAMPLE_DIVIDER / 10)) for 10nF cap
float places[8] = {0, 0, 0, 0, 0, 0, 0, 0};
uint16_t place_int = 0;
bool repeat = true;
#endif
void delay_us(int count) {
while(count--) {
_delay_us(1);
}
}
int voices = 0;
int voice_place = 0;
float frequency = 0;
int volume = 0;
long position = 0;
float frequencies[8] = {0, 0, 0, 0, 0, 0, 0, 0};
int volumes[8] = {0, 0, 0, 0, 0, 0, 0, 0};
bool sliding = false;
float place = 0;
uint8_t * sample;
uint16_t sample_length = 0;
// float freq = 0;
bool playing_notes = false;
bool playing_note = false;
float note_frequency = 0;
float note_length = 0;
uint8_t note_tempo = TEMPO_DEFAULT;
float note_timbre = TIMBRE_DEFAULT;
uint16_t note_position = 0;
float (* notes_pointer)[][2];
uint16_t notes_count;
bool notes_repeat;
float notes_rest;
bool note_resting = false;
uint8_t current_note = 0;
uint8_t rest_counter = 0;
#ifdef VIBRATO_ENABLE
float vibrato_counter = 0;
float vibrato_strength = .5;
float vibrato_rate = 0.125;
#endif
float polyphony_rate = 0;
static bool audio_initialized = false;
audio_config_t audio_config;
uint16_t envelope_index = 0;
void audio_init() {
// Check EEPROM
if (!eeconfig_is_enabled())
{
eeconfig_init();
}
audio_config.raw = eeconfig_read_audio();
#ifdef PWM_AUDIO
PLLFRQ = _BV(PDIV2);
PLLCSR = _BV(PLLE);
while(!(PLLCSR & _BV(PLOCK)));
PLLFRQ |= _BV(PLLTM0); /* PCK 48MHz */
/* Init a fast PWM on Timer4 */
TCCR4A = _BV(COM4A0) | _BV(PWM4A); /* Clear OC4A on Compare Match */
TCCR4B = _BV(CS40); /* No prescaling => f = PCK/256 = 187500Hz */
OCR4A = 0;
/* Enable the OC4A output */
DDRC |= _BV(PORTC6);
DISABLE_AUDIO_COUNTER_3_ISR; // Turn off 3A interputs
TCCR3A = 0x0; // Options not needed
TCCR3B = _BV(CS31) | _BV(CS30) | _BV(WGM32); // 64th prescaling and CTC
OCR3A = SAMPLE_DIVIDER - 1; // Correct count/compare, related to sample playback
#else
// Set port PC6 (OC3A and /OC4A) as output
DDRC |= _BV(PORTC6);
DISABLE_AUDIO_COUNTER_3_ISR;
// TCCR3A / TCCR3B: Timer/Counter #3 Control Registers
// Compare Output Mode (COM3An) = 0b00 = Normal port operation, OC3A disconnected from PC6
// Waveform Generation Mode (WGM3n) = 0b1110 = Fast PWM Mode 14 (Period = ICR3, Duty Cycle = OCR3A)
// Clock Select (CS3n) = 0b010 = Clock / 8
TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30);
TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30);
#endif
audio_initialized = true;
}
void stop_all_notes() {
if (!audio_initialized) {
audio_init();
}
voices = 0;
#ifdef PWM_AUDIO
DISABLE_AUDIO_COUNTER_3_ISR;
#else
DISABLE_AUDIO_COUNTER_3_ISR;
DISABLE_AUDIO_COUNTER_3_OUTPUT;
#endif
playing_notes = false;
playing_note = false;
frequency = 0;
volume = 0;
for (uint8_t i = 0; i < 8; i++)
{
frequencies[i] = 0;
volumes[i] = 0;
}
}
void stop_note(float freq)
{
if (playing_note) {
if (!audio_initialized) {
audio_init();
}
#ifdef PWM_AUDIO
freq = freq / SAMPLE_RATE;
#endif
for (int i = 7; i >= 0; i--) {
if (frequencies[i] == freq) {
frequencies[i] = 0;
volumes[i] = 0;
for (int j = i; (j < 7); j++) {
frequencies[j] = frequencies[j+1];
frequencies[j+1] = 0;
volumes[j] = volumes[j+1];
volumes[j+1] = 0;
}
break;
}
}
voices--;
if (voices < 0)
voices = 0;
if (voice_place >= voices) {
voice_place = 0;
}
if (voices == 0) {
#ifdef PWM_AUDIO
DISABLE_AUDIO_COUNTER_3_ISR;
#else
DISABLE_AUDIO_COUNTER_3_ISR;
DISABLE_AUDIO_COUNTER_3_OUTPUT;
#endif
frequency = 0;
volume = 0;
playing_note = false;
}
}
}
#ifdef VIBRATO_ENABLE
float mod(float a, int b)
{
float r = fmod(a, b);
return r < 0 ? r + b : r;
}
float vibrato(float average_freq) {
#ifdef VIBRATO_STRENGTH_ENABLE
float vibrated_freq = average_freq * pow(vibrato_lut[(int)vibrato_counter], vibrato_strength);
#else
float vibrated_freq = average_freq * vibrato_lut[(int)vibrato_counter];
#endif
vibrato_counter = mod((vibrato_counter + vibrato_rate * (1.0 + 440.0/average_freq)), VIBRATO_LUT_LENGTH);
return vibrated_freq;
}
#endif
ISR(TIMER3_COMPA_vect)
{
if (playing_note) {
#ifdef PWM_AUDIO
if (voices == 1) {
// SINE
OCR4A = pgm_read_byte(&sinewave[(uint16_t)place]) >> 2;
// SQUARE
// if (((int)place) >= 1024){
// OCR4A = 0xFF >> 2;
// } else {
// OCR4A = 0x00;
// }
// SAWTOOTH
// OCR4A = (int)place / 4;
// TRIANGLE
// if (((int)place) >= 1024) {
// OCR4A = (int)place / 2;
// } else {
// OCR4A = 2048 - (int)place / 2;
// }
place += frequency;
if (place >= SINE_LENGTH)
place -= SINE_LENGTH;
} else {
int sum = 0;
for (int i = 0; i < voices; i++) {
// SINE
sum += pgm_read_byte(&sinewave[(uint16_t)places[i]]) >> 2;
// SQUARE
// if (((int)places[i]) >= 1024){
// sum += 0xFF >> 2;
// } else {
// sum += 0x00;
// }
places[i] += frequencies[i];
if (places[i] >= SINE_LENGTH)
places[i] -= SINE_LENGTH;
}
OCR4A = sum;
}
#else
if (voices > 0) {
float freq;
if (polyphony_rate > 0) {
if (voices > 1) {
voice_place %= voices;
if (place++ > (frequencies[voice_place] / polyphony_rate / CPU_PRESCALER)) {
voice_place = (voice_place + 1) % voices;
place = 0.0;
}
}
#ifdef VIBRATO_ENABLE
if (vibrato_strength > 0) {
freq = vibrato(frequencies[voice_place]);
} else {
#else
{
#endif
freq = frequencies[voice_place];
}
} else {
if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) {
frequency = frequency * pow(2, 440/frequency/12/2);
} else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) {
frequency = frequency * pow(2, -440/frequency/12/2);
} else {
frequency = frequencies[voices - 1];
}
#ifdef VIBRATO_ENABLE
if (vibrato_strength > 0) {
freq = vibrato(frequency);
} else {
#else
{
#endif
freq = frequency;
}
}
if (envelope_index < 65535) {
envelope_index++;
}
freq = voice_envelope(freq);
if (freq < 30.517578125)
freq = 30.52;
NOTE_PERIOD = (int)(((double)F_CPU) / (freq * CPU_PRESCALER)); // Set max to the period
NOTE_DUTY_CYCLE = (int)((((double)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre); // Set compare to half the period
}
#endif
}
// SAMPLE
// OCR4A = pgm_read_byte(&sample[(uint16_t)place_int]);
// place_int++;
// if (place_int >= sample_length)
// if (repeat)
// place_int -= sample_length;
// else
// DISABLE_AUDIO_COUNTER_3_ISR;
if (playing_notes) {
#ifdef PWM_AUDIO
OCR4A = pgm_read_byte(&sinewave[(uint16_t)place]) >> 0;
place += note_frequency;
if (place >= SINE_LENGTH)
place -= SINE_LENGTH;
#else
if (note_frequency > 0) {
float freq;
#ifdef VIBRATO_ENABLE
if (vibrato_strength > 0) {
freq = vibrato(note_frequency);
} else {
#else
{
#endif
freq = note_frequency;
}
if (envelope_index < 65535) {
envelope_index++;
}
freq = voice_envelope(freq);
NOTE_PERIOD = (int)(((double)F_CPU) / (freq * CPU_PRESCALER)); // Set max to the period
NOTE_DUTY_CYCLE = (int)((((double)F_CPU) / (freq * CPU_PRESCALER)) * note_timbre); // Set compare to half the period
} else {
NOTE_PERIOD = 0;
NOTE_DUTY_CYCLE = 0;
}
#endif
note_position++;
bool end_of_note = false;
if (NOTE_PERIOD > 0)
end_of_note = (note_position >= (note_length / NOTE_PERIOD * 0xFFFF));
else
end_of_note = (note_position >= (note_length * 0x7FF));
if (end_of_note) {
current_note++;
if (current_note >= notes_count) {
if (notes_repeat) {
current_note = 0;
} else {
#ifdef PWM_AUDIO
DISABLE_AUDIO_COUNTER_3_ISR;
#else
DISABLE_AUDIO_COUNTER_3_ISR;
DISABLE_AUDIO_COUNTER_3_OUTPUT;
#endif
playing_notes = false;
return;
}
}
if (!note_resting && (notes_rest > 0)) {
note_resting = true;
note_frequency = 0;
note_length = notes_rest;
current_note--;
} else {
note_resting = false;
#ifdef PWM_AUDIO
note_frequency = (*notes_pointer)[current_note][0] / SAMPLE_RATE;
note_length = (*notes_pointer)[current_note][1] * (((float)note_tempo) / 100);
#else
envelope_index = 0;
note_frequency = (*notes_pointer)[current_note][0];
note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100);
#endif
}
note_position = 0;
}
}
if (!audio_config.enable) {
playing_notes = false;
playing_note = false;
}
}
void play_note(float freq, int vol) {
if (!audio_initialized) {
audio_init();
}
if (audio_config.enable && voices < 8) {
DISABLE_AUDIO_COUNTER_3_ISR;
// Cancel notes if notes are playing
if (playing_notes)
stop_all_notes();
playing_note = true;
envelope_index = 0;
#ifdef PWM_AUDIO
freq = freq / SAMPLE_RATE;
#endif
if (freq > 0) {
frequencies[voices] = freq;
volumes[voices] = vol;
voices++;
}
#ifdef PWM_AUDIO
ENABLE_AUDIO_COUNTER_3_ISR;
#else
ENABLE_AUDIO_COUNTER_3_ISR;
ENABLE_AUDIO_COUNTER_3_OUTPUT;
#endif
}
}
void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat, float n_rest)
{
if (!audio_initialized) {
audio_init();
}
if (audio_config.enable) {
DISABLE_AUDIO_COUNTER_3_ISR;
// Cancel note if a note is playing
if (playing_note)
stop_all_notes();
playing_notes = true;
notes_pointer = np;
notes_count = n_count;
notes_repeat = n_repeat;
notes_rest = n_rest;
place = 0;
current_note = 0;
#ifdef PWM_AUDIO
note_frequency = (*notes_pointer)[current_note][0] / SAMPLE_RATE;
note_length = (*notes_pointer)[current_note][1] * (((float)note_tempo) / 100);
#else
note_frequency = (*notes_pointer)[current_note][0];
note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100);
#endif
note_position = 0;
#ifdef PWM_AUDIO
ENABLE_AUDIO_COUNTER_3_ISR;
#else
ENABLE_AUDIO_COUNTER_3_ISR;
ENABLE_AUDIO_COUNTER_3_OUTPUT;
#endif
}
}
#ifdef PWM_AUDIO
void play_sample(uint8_t * s, uint16_t l, bool r) {
if (!audio_initialized) {
audio_init();
}
if (audio_config.enable) {
DISABLE_AUDIO_COUNTER_3_ISR;
stop_all_notes();
place_int = 0;
sample = s;
sample_length = l;
repeat = r;
ENABLE_AUDIO_COUNTER_3_ISR;
}
}
#endif
void audio_toggle(void) {
audio_config.enable ^= 1;
eeconfig_update_audio(audio_config.raw);
}
void audio_on(void) {
audio_config.enable = 1;
eeconfig_update_audio(audio_config.raw);
}
void audio_off(void) {
audio_config.enable = 0;
eeconfig_update_audio(audio_config.raw);
}
#ifdef VIBRATO_ENABLE
// Vibrato rate functions
void set_vibrato_rate(float rate) {
vibrato_rate = rate;
}
void increase_vibrato_rate(float change) {
vibrato_rate *= change;
}
void decrease_vibrato_rate(float change) {
vibrato_rate /= change;
}
#ifdef VIBRATO_STRENGTH_ENABLE
void set_vibrato_strength(float strength) {
vibrato_strength = strength;
}
void increase_vibrato_strength(float change) {
vibrato_strength *= change;
}
void decrease_vibrato_strength(float change) {
vibrato_strength /= change;
}
#endif /* VIBRATO_STRENGTH_ENABLE */
#endif /* VIBRATO_ENABLE */
// Polyphony functions
void set_polyphony_rate(float rate) {
polyphony_rate = rate;
}
void enable_polyphony() {
polyphony_rate = 5;
}
void disable_polyphony() {
polyphony_rate = 0;
}
void increase_polyphony_rate(float change) {
polyphony_rate *= change;
}
void decrease_polyphony_rate(float change) {
polyphony_rate /= change;
}
// Timbre function
void set_timbre(float timbre) {
note_timbre = timbre;
}
// Tempo functions
void set_tempo(uint8_t tempo) {
note_tempo = tempo;
}
void decrease_tempo(uint8_t tempo_change) {
note_tempo += tempo_change;
}
void increase_tempo(uint8_t tempo_change) {
if (note_tempo - tempo_change < 10) {
note_tempo = 10;
} else {
note_tempo -= tempo_change;
}
}
//------------------------------------------------------------------------------
// Override these functions in your keymap file to play different tunes on
// startup and bootloader jump
__attribute__ ((weak))
void play_startup_tone()
{
}
__attribute__ ((weak))
void play_goodbye_tone()
{
}
//------------------------------------------------------------------------------

@ -1,357 +0,0 @@
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#define FREQUENCY_LUT_LENGTH 349
const uint16_t FREQUENCY_LUT[FREQUENCY_LUT_LENGTH] = {
0x8E0B,
0x8C02,
0x8A00,
0x8805,
0x8612,
0x8426,
0x8241,
0x8063,
0x7E8C,
0x7CBB,
0x7AF2,
0x792E,
0x7772,
0x75BB,
0x740B,
0x7261,
0x70BD,
0x6F20,
0x6D88,
0x6BF6,
0x6A69,
0x68E3,
0x6762,
0x65E6,
0x6470,
0x6300,
0x6194,
0x602E,
0x5ECD,
0x5D71,
0x5C1A,
0x5AC8,
0x597B,
0x5833,
0x56EF,
0x55B0,
0x5475,
0x533F,
0x520E,
0x50E1,
0x4FB8,
0x4E93,
0x4D73,
0x4C57,
0x4B3E,
0x4A2A,
0x491A,
0x480E,
0x4705,
0x4601,
0x4500,
0x4402,
0x4309,
0x4213,
0x4120,
0x4031,
0x3F46,
0x3E5D,
0x3D79,
0x3C97,
0x3BB9,
0x3ADD,
0x3A05,
0x3930,
0x385E,
0x3790,
0x36C4,
0x35FB,
0x3534,
0x3471,
0x33B1,
0x32F3,
0x3238,
0x3180,
0x30CA,
0x3017,
0x2F66,
0x2EB8,
0x2E0D,
0x2D64,
0x2CBD,
0x2C19,
0x2B77,
0x2AD8,
0x2A3A,
0x299F,
0x2907,
0x2870,
0x27DC,
0x2749,
0x26B9,
0x262B,
0x259F,
0x2515,
0x248D,
0x2407,
0x2382,
0x2300,
0x2280,
0x2201,
0x2184,
0x2109,
0x2090,
0x2018,
0x1FA3,
0x1F2E,
0x1EBC,
0x1E4B,
0x1DDC,
0x1D6E,
0x1D02,
0x1C98,
0x1C2F,
0x1BC8,
0x1B62,
0x1AFD,
0x1A9A,
0x1A38,
0x19D8,
0x1979,
0x191C,
0x18C0,
0x1865,
0x180B,
0x17B3,
0x175C,
0x1706,
0x16B2,
0x165E,
0x160C,
0x15BB,
0x156C,
0x151D,
0x14CF,
0x1483,
0x1438,
0x13EE,
0x13A4,
0x135C,
0x1315,
0x12CF,
0x128A,
0x1246,
0x1203,
0x11C1,
0x1180,
0x1140,
0x1100,
0x10C2,
0x1084,
0x1048,
0x100C,
0xFD1,
0xF97,
0xF5E,
0xF25,
0xEEE,
0xEB7,
0xE81,
0xE4C,
0xE17,
0xDE4,
0xDB1,
0xD7E,
0xD4D,
0xD1C,
0xCEC,
0xCBC,
0xC8E,
0xC60,
0xC32,
0xC05,
0xBD9,
0xBAE,
0xB83,
0xB59,
0xB2F,
0xB06,
0xADD,
0xAB6,
0xA8E,
0xA67,
0xA41,
0xA1C,
0x9F7,
0x9D2,
0x9AE,
0x98A,
0x967,
0x945,
0x923,
0x901,
0x8E0,
0x8C0,
0x8A0,
0x880,
0x861,
0x842,
0x824,
0x806,
0x7E8,
0x7CB,
0x7AF,
0x792,
0x777,
0x75B,
0x740,
0x726,
0x70B,
0x6F2,
0x6D8,
0x6BF,
0x6A6,
0x68E,
0x676,
0x65E,
0x647,
0x630,
0x619,
0x602,
0x5EC,
0x5D7,
0x5C1,
0x5AC,
0x597,
0x583,
0x56E,
0x55B,
0x547,
0x533,
0x520,
0x50E,
0x4FB,
0x4E9,
0x4D7,
0x4C5,
0x4B3,
0x4A2,
0x491,
0x480,
0x470,
0x460,
0x450,
0x440,
0x430,
0x421,
0x412,
0x403,
0x3F4,
0x3E5,
0x3D7,
0x3C9,
0x3BB,
0x3AD,
0x3A0,
0x393,
0x385,
0x379,
0x36C,
0x35F,
0x353,
0x347,
0x33B,
0x32F,
0x323,
0x318,
0x30C,
0x301,
0x2F6,
0x2EB,
0x2E0,
0x2D6,
0x2CB,
0x2C1,
0x2B7,
0x2AD,
0x2A3,
0x299,
0x290,
0x287,
0x27D,
0x274,
0x26B,
0x262,
0x259,
0x251,
0x248,
0x240,
0x238,
0x230,
0x228,
0x220,
0x218,
0x210,
0x209,
0x201,
0x1FA,
0x1F2,
0x1EB,
0x1E4,
0x1DD,
0x1D6,
0x1D0,
0x1C9,
0x1C2,
0x1BC,
0x1B6,
0x1AF,
0x1A9,
0x1A3,
0x19D,
0x197,
0x191,
0x18C,
0x186,
0x180,
0x17B,
0x175,
0x170,
0x16B,
0x165,
0x160,
0x15B,
0x156,
0x151,
0x14C,
0x148,
0x143,
0x13E,
0x13A,
0x135,
0x131,
0x12C,
0x128,
0x124,
0x120,
0x11C,
0x118,
0x114,
0x110,
0x10C,
0x108,
0x104,
0x100,
0xFD,
0xF9,
0xF5,
0xF2,
0xEE
};

@ -0,0 +1,382 @@
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include "luts.h"
const float vibrato_lut[VIBRATO_LUT_LENGTH] =
{
1.0022336811487,
1.0042529943610,
1.0058584256028,
1.0068905285205,
1.0072464122237,
1.0068905285205,
1.0058584256028,
1.0042529943610,
1.0022336811487,
1.0000000000000,
0.9977712970630,
0.9957650169978,
0.9941756956510,
0.9931566259436,
0.9928057204913,
0.9931566259436,
0.9941756956510,
0.9957650169978,
0.9977712970630,
1.0000000000000,
};
const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH] =
{
0x8E0B,
0x8C02,
0x8A00,
0x8805,
0x8612,
0x8426,
0x8241,
0x8063,
0x7E8C,
0x7CBB,
0x7AF2,
0x792E,
0x7772,
0x75BB,
0x740B,
0x7261,
0x70BD,
0x6F20,
0x6D88,
0x6BF6,
0x6A69,
0x68E3,
0x6762,
0x65E6,
0x6470,
0x6300,
0x6194,
0x602E,
0x5ECD,
0x5D71,
0x5C1A,
0x5AC8,
0x597B,
0x5833,
0x56EF,
0x55B0,
0x5475,
0x533F,
0x520E,
0x50E1,
0x4FB8,
0x4E93,
0x4D73,
0x4C57,
0x4B3E,
0x4A2A,
0x491A,
0x480E,
0x4705,
0x4601,
0x4500,
0x4402,
0x4309,
0x4213,
0x4120,
0x4031,
0x3F46,
0x3E5D,
0x3D79,
0x3C97,
0x3BB9,
0x3ADD,
0x3A05,
0x3930,
0x385E,
0x3790,
0x36C4,
0x35FB,
0x3534,
0x3471,
0x33B1,
0x32F3,
0x3238,
0x3180,
0x30CA,
0x3017,
0x2F66,
0x2EB8,
0x2E0D,
0x2D64,
0x2CBD,
0x2C19,
0x2B77,
0x2AD8,
0x2A3A,
0x299F,
0x2907,
0x2870,
0x27DC,
0x2749,
0x26B9,
0x262B,
0x259F,
0x2515,
0x248D,
0x2407,
0x2382,
0x2300,
0x2280,
0x2201,
0x2184,
0x2109,
0x2090,
0x2018,
0x1FA3,
0x1F2E,
0x1EBC,
0x1E4B,
0x1DDC,
0x1D6E,
0x1D02,
0x1C98,
0x1C2F,
0x1BC8,
0x1B62,
0x1AFD,
0x1A9A,
0x1A38,
0x19D8,
0x1979,
0x191C,
0x18C0,
0x1865,
0x180B,
0x17B3,
0x175C,
0x1706,
0x16B2,
0x165E,
0x160C,
0x15BB,
0x156C,
0x151D,
0x14CF,
0x1483,
0x1438,
0x13EE,
0x13A4,
0x135C,
0x1315,
0x12CF,
0x128A,
0x1246,
0x1203,
0x11C1,
0x1180,
0x1140,
0x1100,
0x10C2,
0x1084,
0x1048,
0x100C,
0xFD1,
0xF97,
0xF5E,
0xF25,
0xEEE,
0xEB7,
0xE81,
0xE4C,
0xE17,
0xDE4,
0xDB1,
0xD7E,
0xD4D,
0xD1C,
0xCEC,
0xCBC,
0xC8E,
0xC60,
0xC32,
0xC05,
0xBD9,
0xBAE,
0xB83,
0xB59,
0xB2F,
0xB06,
0xADD,
0xAB6,
0xA8E,
0xA67,
0xA41,
0xA1C,
0x9F7,
0x9D2,
0x9AE,
0x98A,
0x967,
0x945,
0x923,
0x901,
0x8E0,
0x8C0,
0x8A0,
0x880,
0x861,
0x842,
0x824,
0x806,
0x7E8,
0x7CB,
0x7AF,
0x792,
0x777,
0x75B,
0x740,
0x726,
0x70B,
0x6F2,
0x6D8,
0x6BF,
0x6A6,
0x68E,
0x676,
0x65E,
0x647,
0x630,
0x619,
0x602,
0x5EC,
0x5D7,
0x5C1,
0x5AC,
0x597,
0x583,
0x56E,
0x55B,
0x547,
0x533,
0x520,
0x50E,
0x4FB,
0x4E9,
0x4D7,
0x4C5,
0x4B3,
0x4A2,
0x491,
0x480,
0x470,
0x460,
0x450,
0x440,
0x430,
0x421,
0x412,
0x403,
0x3F4,
0x3E5,
0x3D7,
0x3C9,
0x3BB,
0x3AD,
0x3A0,
0x393,
0x385,
0x379,
0x36C,
0x35F,
0x353,
0x347,
0x33B,
0x32F,
0x323,
0x318,
0x30C,
0x301,
0x2F6,
0x2EB,
0x2E0,
0x2D6,
0x2CB,
0x2C1,
0x2B7,
0x2AD,
0x2A3,
0x299,
0x290,
0x287,
0x27D,
0x274,
0x26B,
0x262,
0x259,
0x251,
0x248,
0x240,
0x238,
0x230,
0x228,
0x220,
0x218,
0x210,
0x209,
0x201,
0x1FA,
0x1F2,
0x1EB,
0x1E4,
0x1DD,
0x1D6,
0x1D0,
0x1C9,
0x1C2,
0x1BC,
0x1B6,
0x1AF,
0x1A9,
0x1A3,
0x19D,
0x197,
0x191,
0x18C,
0x186,
0x180,
0x17B,
0x175,
0x170,
0x16B,
0x165,
0x160,
0x15B,
0x156,
0x151,
0x14C,
0x148,
0x143,
0x13E,
0x13A,
0x135,
0x131,
0x12C,
0x128,
0x124,
0x120,
0x11C,
0x118,
0x114,
0x110,
0x10C,
0x108,
0x104,
0x100,
0xFD,
0xF9,
0xF5,
0xF2,
0xEE,
};

@ -0,0 +1,15 @@
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#ifndef LUTS_H
#define LUTS_H
#define VIBRATO_LUT_LENGTH 20
#define FREQUENCY_LUT_LENGTH 349
extern const float vibrato_lut[VIBRATO_LUT_LENGTH];
extern const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH];
#endif /* LUTS_H */

@ -1,28 +0,0 @@
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#define VIBRATO_LUT_LENGTH 20
const float VIBRATO_LUT[VIBRATO_LUT_LENGTH] = { \
1.00223368114872,
1.00425299436105,
1.00585842560279,
1.00689052852052,
1.0072464122237,
1.00689052852052,
1.00585842560279,
1.00425299436105,
1.00223368114872,
1,
0.99777129706302,
0.99576501699778,
0.994175695650927,
0.993156625943589,
0.992805720491269,
0.993156625943589,
0.994175695650927,
0.99576501699778,
0.99777129706302,
1
};

@ -1,6 +1,6 @@
#include "voices.h" #include "voices.h"
#include "audio.h"
#include "stdlib.h" #include "stdlib.h"
#include "vibrato_lut.h"
// these are imported from audio.c // these are imported from audio.c
extern uint16_t envelope_index; extern uint16_t envelope_index;
@ -109,7 +109,7 @@ float voice_envelope(float frequency) {
case 0 ... VOICE_VIBRATO_DELAY: case 0 ... VOICE_VIBRATO_DELAY:
break; break;
default: default:
frequency = frequency * VIBRATO_LUT[(int)fmod((((float)compensated_index - (VOICE_VIBRATO_DELAY + 1))/1000*VOICE_VIBRATO_SPEED), VIBRATO_LUT_LENGTH)]; frequency = frequency * vibrato_lut[(int)fmod((((float)compensated_index - (VOICE_VIBRATO_DELAY + 1))/1000*VOICE_VIBRATO_SPEED), VIBRATO_LUT_LENGTH)];
break; break;
} }
break; break;
@ -161,3 +161,5 @@ float voice_envelope(float frequency) {
return frequency; return frequency;
} }

@ -2,8 +2,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <avr/io.h> #include <avr/io.h>
#include <util/delay.h> #include <util/delay.h>
#include "musical_notes.h" #include "luts.h"
#include "song_list.h"
#ifndef VOICES_H #ifndef VOICES_H
#define VOICES_H #define VOICES_H

@ -24,10 +24,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "action_macro.h" #include "action_macro.h"
#include "debug.h" #include "debug.h"
#include "backlight.h" #include "backlight.h"
#include "keymap_midi.h"
#include "bootloader.h" #include "bootloader.h"
#include "eeconfig.h" #include "eeconfig.h"
#ifdef MIDI_ENABLE
#include "keymap_midi.h"
#endif
extern keymap_config_t keymap_config; extern keymap_config_t keymap_config;
#include <stdio.h> #include <stdio.h>
@ -150,20 +153,22 @@ static action_t keycode_to_action(uint16_t keycode)
case KC_TRNS: case KC_TRNS:
action.code = ACTION_TRANSPARENT; action.code = ACTION_TRANSPARENT;
break; break;
case 0x0100 ... 0x1FFF: ; case LCTL(0) ... 0x1FFF: ;
// Has a modifier // Has a modifier
// Split it up // Split it up
action.code = ACTION_MODS_KEY(keycode >> 8, keycode & 0xFF); // adds modifier to key action.code = ACTION_MODS_KEY(keycode >> 8, keycode & 0xFF); // adds modifier to key
break; break;
case 0x2000 ... 0x2FFF: case FUNC(0) ... FUNC(0xFFF): ;
// Is a shortcut for function layer, pull last 12bits // Is a shortcut for function layer, pull last 12bits
// This means we have 4,096 FN macros at our disposal // This means we have 4,096 FN macros at our disposal
return keymap_func_to_action(keycode & 0xFFF); return keymap_func_to_action(keycode & 0xFFF);
break; break;
case 0x3000 ... 0x3FFF: ; case M(0) ... M(0xFF):
// When the code starts with 3, it's an action macro.
action.code = ACTION_MACRO(keycode & 0xFF); action.code = ACTION_MACRO(keycode & 0xFF);
break; break;
case LT(0, 0) ... LT(0xFF, 0xF):
action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
break;
#ifdef BACKLIGHT_ENABLE #ifdef BACKLIGHT_ENABLE
case BL_0 ... BL_15: case BL_0 ... BL_15:
action.code = ACTION_BACKLIGHT_LEVEL(keycode & 0x000F); action.code = ACTION_BACKLIGHT_LEVEL(keycode & 0x000F);
@ -197,7 +202,7 @@ static action_t keycode_to_action(uint16_t keycode)
print("\nDEBUG: enabled.\n"); print("\nDEBUG: enabled.\n");
debug_enable = true; debug_enable = true;
break; break;
case 0x5002 ... 0x50FF: case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_UNSWAP_ALT_GUI:
// MAGIC actions (BOOTMAGIC without the boot) // MAGIC actions (BOOTMAGIC without the boot)
if (!eeconfig_is_enabled()) { if (!eeconfig_is_enabled()) {
eeconfig_init(); eeconfig_init();
@ -247,7 +252,7 @@ static action_t keycode_to_action(uint16_t keycode)
} }
eeconfig_update_keymap(keymap_config.raw); eeconfig_update_keymap(keymap_config.raw);
break; break;
case 0x5100 ... 0x5FFF: ; case TO(0, 1) ... OSM(0xFF): ;
// Layer movement shortcuts // Layer movement shortcuts
// See .h to see constraints/usage // See .h to see constraints/usage
int type = (keycode >> 0x8) & 0xF; int type = (keycode >> 0x8) & 0xF;
@ -268,25 +273,19 @@ static action_t keycode_to_action(uint16_t keycode)
// Set default layer // Set default layer
int layer = keycode & 0xFF; int layer = keycode & 0xFF;
action.code = ACTION_LAYER_TOGGLE(layer); action.code = ACTION_LAYER_TOGGLE(layer);
} else if (type == 0x5) {
// OSL(layer) - One-shot layer
int layer = keycode & 0xFF;
action.code = ACTION_LAYER_ONESHOT(layer);
} else if (type == 0x6) {
// OSM(mod) - One-shot mod
int mod = keycode & 0xFF;
action.code = ACTION_MODS_ONESHOT(mod);
} }
break; break;
#ifdef MIDI_ENABLE case MT(0, 0) ... MT(0xF, 0xFF):
case 0x6000 ... 0x6FFF:
action.code = ACTION_FUNCTION_OPT(keycode & 0xFF, (keycode & 0x0F00) >> 8);
break;
#endif
case 0x7000 ... 0x7FFF:
action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); action.code = ACTION_MODS_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
break; break;
case 0x8000 ... 0x8FFF:
action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
break;
#ifdef UNICODE_ENABLE
case 0x8000000 ... 0x8FFFFFF:
uint16_t unicode = keycode & ~(0x8000);
action.code = ACTION_FUNCTION_OPT(unicode & 0xFF, (unicode & 0xFF00) >> 8);
break;
#endif
default: default:
action.code = ACTION_NO; action.code = ACTION_NO;
break; break;

@ -67,6 +67,9 @@ extern const uint16_t fn_actions[];
#define MEH(kc) kc | 0x0700 #define MEH(kc) kc | 0x0700
#define LCAG(kc) kc | 0x0D00 // Modifier Ctrl Alt and GUI #define LCAG(kc) kc | 0x0D00 // Modifier Ctrl Alt and GUI
#define MOD_HYPR 0xf
#define MOD_MEH 0x7
#define RCTL(kc) kc | 0x1100 #define RCTL(kc) kc | 0x1100
#define RSFT(kc) kc | 0x1200 #define RSFT(kc) kc | 0x1200
#define RALT(kc) kc | 0x1400 #define RALT(kc) kc | 0x1400
@ -84,8 +87,11 @@ extern const uint16_t fn_actions[];
#define KC_EXCLAIM KC_EXLM #define KC_EXCLAIM KC_EXLM
#define KC_AT LSFT(KC_2) // @ #define KC_AT LSFT(KC_2) // @
#define KC_HASH LSFT(KC_3) // # #define KC_HASH LSFT(KC_3) // #
#define KC_DLR LSFT(KC_4) // $ #define KC_DLR LSFT(KC_4) // $
#define KC_DOLLAR KC_DLR #define KC_DOLLAR KC_DLR
@ -107,22 +113,43 @@ extern const uint16_t fn_actions[];
#define KC_RPRN LSFT(KC_0) // ) #define KC_RPRN LSFT(KC_0) // )
#define KC_RIGHT_PAREN KC_RPRN #define KC_RIGHT_PAREN KC_RPRN
#define KC_UNDS LSFT(KC_MINS) // _ #define KC_UNDS LSFT(KC_MINS) // _
#define KC_UNDERSCORE KC_UNDS #define KC_UNDERSCORE KC_UNDS
#define KC_PLUS LSFT(KC_EQL) // + #define KC_PLUS LSFT(KC_EQL) // +
#define KC_LCBR LSFT(KC_LBRC) // { #define KC_LCBR LSFT(KC_LBRC) // {
#define KC_LEFT_CURLY_BRACE KC_LCBR #define KC_LEFT_CURLY_BRACE KC_LCBR
#define KC_RCBR LSFT(KC_RBRC) // } #define KC_RCBR LSFT(KC_RBRC) // }
#define KC_RIGHT_CURLY_BRACE KC_RCBR #define KC_RIGHT_CURLY_BRACE KC_RCBR
#define KC_LABK LSFT(KC_COMM) // <
#define KC_LEFT_ANGLE_BRACKET KC_LABK
#define KC_RABK LSFT(KC_DOT) // >
#define KC_RIGHT_ANGLE_BRACKET KC_RABK
#define KC_COLN LSFT(KC_SCLN) // : #define KC_COLN LSFT(KC_SCLN) // :
#define KC_COLON KC_COLN #define KC_COLON KC_COLN
#define KC_PIPE LSFT(KC_BSLS) // | #define KC_PIPE LSFT(KC_BSLS) // |
#define KC_LT LSFT(KC_COMM) // <
#define KC_GT LSFT(KC_DOT) // >
#define KC_QUES LSFT(KC_SLSH) // ?
#define KC_QUESTION KC_QUES
#define KC_DQT LSFT(KC_QUOT) // "
#define KC_DOUBLE_QUOTE KC_DQT
#define KC_DELT KC_DELETE // Del key (four letter code) #define KC_DELT KC_DELETE // Del key (four letter code)
// Alias for function layers than expand past FN31 // Alias for function layers than expand past FN31
@ -132,35 +159,14 @@ extern const uint16_t fn_actions[];
#define S(kc) LSFT(kc) #define S(kc) LSFT(kc)
#define F(kc) FUNC(kc) #define F(kc) FUNC(kc)
#define M(kc) kc | 0x3000 #define M(kc) (kc | 0x3000)
#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) #define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)
// These affect the backlight (if your keyboard has one). // 0x3100+ is free
// We don't need to comment them out if your keyboard doesn't have a backlight,
// since they don't take up any space. // L-ayer, T-ap - 256 keycode max, 16 layer max
#define BL_ON 0x4009 #define LT(layer, kc) (kc | 0x4000 | ((layer & 0xF) << 8))
#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 RESET 0x5000
#define DEBUG 0x5001 #define DEBUG 0x5001
@ -188,6 +194,51 @@ extern const uint16_t fn_actions[];
#define AG_SWAP MAGIC_SWAP_ALT_GUI #define AG_SWAP MAGIC_SWAP_ALT_GUI
#define AG_NORM MAGIC_UNSWAP_ALT_GUI #define AG_NORM MAGIC_UNSWAP_ALT_GUI
#define KC_LEAD 0x5014
// Audio on/off
#define AU_ON 0x5020
#define AU_OFF 0x5021
#define AU_TOG 0x5022
// Music mode on/off
#define MU_ON 0x5023
#define MU_OFF 0x5024
#define MU_TOG 0x5025
// Music voice iterate
#define MUV_IN 0x5026
#define MUV_DE 0x5027
// Midi mode on/off
#define MI_ON 0x5028
#define MI_OFF 0x5029
// These affect the backlight (if your keyboard has one).
// We don't need to comment them out if your keyboard doesn't have a backlight,
// since they don't take up any space.
#define BL_ON 0x5079
#define BL_OFF 0x5070
#define BL_0 0x5070
#define BL_1 0x5071
#define BL_2 0x5072
#define BL_3 0x5073
#define BL_4 0x5074
#define BL_5 0x5075
#define BL_6 0x5076
#define BL_7 0x5077
#define BL_8 0x5078
#define BL_9 0x5079
#define BL_10 0x507A
#define BL_11 0x507B
#define BL_12 0x507C
#define BL_13 0x507D
#define BL_14 0x507E
#define BL_15 0x507F
#define BL_DEC 0x5080
#define BL_INC 0x5081
#define BL_TOGG 0x5082
#define BL_STEP 0x5083
// GOTO layer - 16 layers max // GOTO layer - 16 layers max
// when: // when:
@ -205,6 +256,14 @@ extern const uint16_t fn_actions[];
// Toggle to layer - 256 layer max // Toggle to layer - 256 layer max
#define TG(layer) (layer | 0x5400) #define TG(layer) (layer | 0x5400)
// One-shot layer - 256 layer max
#define OSL(layer) (layer | 0x5500)
// One-shot mod
#define OSM(layer) (layer | 0x5600)
// chording is currently at 0x57xx
// M-od, T-ap - 256 keycode max // M-od, T-ap - 256 keycode max
#define MT(mod, kc) (kc | 0x7000 | ((mod & 0xF) << 8)) #define MT(mod, kc) (kc | 0x7000 | ((mod & 0xF) << 8))
#define CTL_T(kc) MT(0x1, kc) #define CTL_T(kc) MT(0x1, kc)
@ -220,14 +279,13 @@ extern const uint16_t fn_actions[];
#define KC_HYPR HYPR(KC_NO) #define KC_HYPR HYPR(KC_NO)
#define KC_MEH MEH(KC_NO) #define KC_MEH MEH(KC_NO)
// L-ayer, T-ap - 256 keycode max, 16 layer max #ifdef UNICODE_ENABLE
#define LT(layer, kc) (kc | 0x8000 | ((layer & 0xF) << 8)) // For sending unicode codes.
// You may not send codes over 7FFF -- this supports most of UTF8.
// For sending unicode codes. // To have a key that sends out Œ, go UC(0x0152)
// You may not send codes over 1FFF -- this supports most of UTF8. #define UNICODE(n) (n | 0x8000)
// To have a key that sends out Œ, go UC(0x0152) #define UC(n) UNICODE(n)
#define UNICODE(n) (n | 0x8000) #endif
#define UC(n) UNICODE(n)
// For tri-layer // For tri-layer
void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3); void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3);

@ -0,0 +1,102 @@
#ifndef KEYMAP_SWISS_GERMAN
#define KEYMAP_SWISS_GERMAN
#include "keymap_common.h"
// Alt gr
#define ALGR(kc) kc | 0x1400
#define CH_ALGR KC_RALT
// normal characters
#define CH_Z KC_Y
#define CH_Y KC_Z
#define CH_A KC_A
#define CH_B KC_B
#define CH_C KC_C
#define CH_D KC_D
#define CH_E KC_E
#define CH_F KC_F
#define CH_G KC_G
#define CH_H KC_H
#define CH_I KC_I
#define CH_J KC_J
#define CH_K KC_K
#define CH_L KC_L
#define CH_M KC_M
#define CH_N KC_N
#define CH_O KC_O
#define CH_P KC_P
#define CH_Q KC_Q
#define CH_R KC_R
#define CH_S KC_S
#define CH_T KC_T
#define CH_U KC_U
#define CH_V KC_V
#define CH_W KC_W
#define CH_X KC_X
#define CH_0 KC_0
#define CH_1 KC_1
#define CH_2 KC_2
#define CH_3 KC_3
#define CH_4 KC_4
#define CH_5 KC_5
#define CH_6 KC_6
#define CH_7 KC_7
#define CH_8 KC_8
#define CH_9 KC_9
#define CH_DOT KC_DOT
#define CH_COMM KC_COMM
#define CH_QUOT KC_MINS // ' ? ´
#define CH_AE KC_QUOT
#define CH_UE KC_LBRC
#define CH_OE KC_SCLN
#define CH_PARA KC_GRAVE // secction sign § and °
#define CH_CARR KC_EQL // carret ^ ` ~
#define CH_DIER KC_RBRC // dieresis ¨ ! ]
#define CH_DLR KC_BSLS // $ £ }
#define CH_LESS KC_NUBS // < and > and backslash
#define CH_MINS KC_SLSH // - and _
// shifted characters
#define CH_RING LSFT(CH_PARA) // °
#define CH_PLUS LSFT(KC_1) // +
#define CH_DQOT LSFT(KC_2) // "
#define CH_PAST LSFT(KC_3) // *
#define CH_CELA LSFT(KC_4) // ç
#define CH_PERC LSFT(KC_5) // %
#define CH_AMPR LSFT(KC_6) // &
#define CH_SLSH LSFT(KC_7) // /
#define CH_LPRN LSFT(KC_8) // (
#define CH_RPRN LSFT(KC_9) // )
#define CH_EQL LSFT(KC_0) // =
#define CH_QST LSFT(CH_QUOT) // ?
#define CH_GRV LSFT(CH_CARR) // `
#define CH_EXLM LSFT(CH_DIER) // !
#define CH_POND LSFT(CH_DLR) // £
#define CH_MORE LSFT(CH_LESS) // >
#define CH_COLN LSFT(KC_DOT) // :
#define CH_SCLN LSFT(KC_COMM) // ;
#define CH_UNDS LSFT(CH_MINS) // _
// Alt Gr-ed characters
#define CH_BRBR ALGR(KC_1) // ¦ brocken bar
#define CH_AT ALGR(KC_2) // @
#define CH_HASH ALGR(KC_3) // #
#define CH_NOTL ALGR(KC_6) // ¬ negative logic
#define CH_PIPE ALGR(KC_7) // |
#define CH_CENT ALGR(KC_8) // ¢ cent
#define CH_ACUT ALGR(CH_QUOT) // ´
#define CH_TILD ALGR(CH_CARR) // ~
#define CH_EURO ALGR(KC_E) // €
#define CH_LBRC ALGR(CH_UE) // [
#define CH_RBRC ALGR(CH_DIER) // ]
#define CH_LCBR ALGR(CH_AE) // {
#define CH_RCBR ALGR(CH_DLR) // }
#define CH_BSLS ALGR(CH_LESS) // backslash
#endif

@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define CHNL(note, channel) (note + (channel << 8)) #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), \ #define SCALE (int8_t []){ 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*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*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*3), 2 + (12*3), 4 + (12*3), 5 + (12*3), 7 + (12*3), 9 + (12*3), 11 + (12*3), \

@ -1,61 +0,0 @@
/*
Copyright 2015 Jack Humbert <jack.humb@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "keymap_common.h"
uint16_t hextokeycode(int hex) {
if (hex == 0x0) {
return KC_0;
} else if (hex < 0xA) {
return KC_1 + (hex - 0x1);
} else {
return KC_A + (hex - 0xA);
}
}
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// For more info on how this works per OS, see here: https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input
if (record->event.pressed) {
uint16_t unicode = (opt << 8) | id;
register_code(KC_LALT);
register_code(hextokeycode((unicode & 0xF000) >> 12));
unregister_code(hextokeycode((unicode & 0xF000) >> 12));
register_code(hextokeycode((unicode & 0x0F00) >> 8));
unregister_code(hextokeycode((unicode & 0x0F00) >> 8));
register_code(hextokeycode((unicode & 0x00F0) >> 4));
unregister_code(hextokeycode((unicode & 0x00F0) >> 4));
register_code(hextokeycode((unicode & 0x000F)));
unregister_code(hextokeycode((unicode & 0x000F)));
/* Test 'a' */
// register_code(hextokeycode(0x0));
// unregister_code(hextokeycode(0x0));
// register_code(hextokeycode(0x0));
// unregister_code(hextokeycode(0x0));
// register_code(hextokeycode(0x6));
// unregister_code(hextokeycode(0x6));
// register_code(hextokeycode(0x1));
// unregister_code(hextokeycode(0x1));
unregister_code(KC_LALT);
}
return;
}

@ -42,18 +42,25 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
static matrix_row_t matrix_reversed_debouncing[MATRIX_COLS]; static matrix_row_t matrix_reversed_debouncing[MATRIX_COLS];
#endif #endif
#if MATRIX_COLS > 16
#define SHIFTER 1UL
#else
#define SHIFTER 1
#endif
static matrix_row_t read_cols(void); static matrix_row_t read_cols(void);
static void init_cols(void); static void init_cols(void);
static void unselect_rows(void); static void unselect_rows(void);
static void select_row(uint8_t row); static void select_row(uint8_t row);
__attribute__ ((weak)) __attribute__ ((weak))
void matrix_init_kb(void) { void matrix_init_quantum(void) {
} }
__attribute__ ((weak)) __attribute__ ((weak))
void matrix_scan_kb(void) { void matrix_scan_quantum(void) {
} }
@ -86,7 +93,7 @@ void matrix_init(void)
matrix_debouncing[i] = 0; matrix_debouncing[i] = 0;
} }
matrix_init_kb(); matrix_init_quantum();
} }
@ -150,7 +157,7 @@ uint8_t matrix_scan(void)
} }
#endif #endif
matrix_scan_kb(); matrix_scan_quantum();
return 1; return 1;
} }
@ -235,15 +242,15 @@ static matrix_row_t read_cols(void)
#endif #endif
if ((col & 0xF0) == 0x20) { if ((col & 0xF0) == 0x20) {
result |= (PINB&(1<<(col & 0x0F)) ? 0 : (1<<x)); result |= (PINB&(1<<(col & 0x0F)) ? 0 : (SHIFTER<<x));
} else if ((col & 0xF0) == 0x30) { } else if ((col & 0xF0) == 0x30) {
result |= (PINC&(1<<(col & 0x0F)) ? 0 : (1<<x)); result |= (PINC&(1<<(col & 0x0F)) ? 0 : (SHIFTER<<x));
} else if ((col & 0xF0) == 0x40) { } else if ((col & 0xF0) == 0x40) {
result |= (PIND&(1<<(col & 0x0F)) ? 0 : (1<<x)); result |= (PIND&(1<<(col & 0x0F)) ? 0 : (SHIFTER<<x));
} else if ((col & 0xF0) == 0x50) { } else if ((col & 0xF0) == 0x50) {
result |= (PINE&(1<<(col & 0x0F)) ? 0 : (1<<x)); result |= (PINE&(1<<(col & 0x0F)) ? 0 : (SHIFTER<<x));
} else if ((col & 0xF0) == 0x60) { } else if ((col & 0xF0) == 0x60) {
result |= (PINF&(1<<(col & 0x0F)) ? 0 : (1<<x)); result |= (PINF&(1<<(col & 0x0F)) ? 0 : (SHIFTER<<x));
} }
} }
return result; return result;

@ -0,0 +1,463 @@
#include "quantum.h"
#include "timer.h"
__attribute__ ((weak))
void matrix_init_kb(void) {}
__attribute__ ((weak))
void matrix_scan_kb(void) {}
__attribute__ ((weak))
bool process_action_kb(keyrecord_t *record) {
return true;
}
__attribute__ ((weak))
void leader_start(void) {}
__attribute__ ((weak))
void leader_end(void) {}
uint8_t starting_note = 0x0C;
int offset = 7;
#ifdef AUDIO_ENABLE
bool music_activated = false;
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
// music sequencer
static bool music_sequence_recording = false;
static bool music_sequence_playing = false;
static float music_sequence[16] = {0};
static uint8_t music_sequence_count = 0;
static uint8_t music_sequence_position = 0;
static uint16_t music_sequence_timer = 0;
static uint16_t music_sequence_interval = 100;
#endif
#ifdef MIDI_ENABLE
bool midi_activated = false;
#endif
// Leader key stuff
bool leading = false;
uint16_t leader_time = 0;
uint16_t leader_sequence[3] = {0, 0, 0};
uint8_t leader_sequence_size = 0;
// Chording stuff
#define CHORDING_MAX 4
bool chording = false;
uint8_t chord_keys[CHORDING_MAX] = {0};
uint8_t chord_key_count = 0;
uint8_t chord_key_down = 0;
#ifdef UNICODE_ENABLE
static uint8_t input_mode;
#endif
bool keys_chord(uint8_t keys[]) {
uint8_t keys_size = sizeof(keys)/sizeof(keys[0]);
bool pass = true;
uint8_t in = 0;
for (uint8_t i = 0; i < chord_key_count; i++) {
bool found = false;
for (uint8_t j = 0; j < keys_size; j++) {
if (chord_keys[i] == (keys[j] & 0xFF)) {
in++; // detects key in chord
found = true;
break;
}
}
if (found)
continue;
if (chord_keys[i] != 0) {
pass = false; // makes sure rest are blank
}
}
return (pass && (in == keys_size));
}
#ifdef UNICODE_ENABLE
uint16_t hex_to_keycode(uint8_t hex)
{
if (hex == 0x0) {
return KC_0;
} else if (hex < 0xA) {
return KC_1 + (hex - 0x1);
} else {
return KC_A + (hex - 0xA);
}
}
void set_unicode_mode(uint8_t os_target)
{
input_mode = os_target;
}
#endif
bool process_record_quantum(keyrecord_t *record) {
/* This gets the keycode from the key pressed */
keypos_t key = record->event.key;
uint16_t keycode;
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
uint8_t layer;
if (record->event.pressed) {
layer = layer_switch_get_layer(key);
update_source_layers_cache(key, layer);
} else {
layer = read_source_layers_cache(key);
}
keycode = keymap_key_to_keycode(layer, key);
#else
keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key);
#endif
// This is how you use actions here
// if (keycode == KC_LEAD) {
// action_t action;
// action.code = ACTION_DEFAULT_LAYER_SET(0);
// process_action(record, action);
// return false;
// }
#ifdef MIDI_ENABLE
if (keycode == MI_ON && record->event.pressed) {
midi_activated = true;
play_music_scale();
return false;
}
if (keycode == MI_OFF && record->event.pressed) {
midi_activated = false;
midi_send_cc(&midi_device, 0, 0x7B, 0);
return false;
}
if (midi_activated) {
if (record->event.key.col == (MATRIX_COLS - 1) && record->event.key.row == (MATRIX_ROWS - 1)) {
if (record->event.pressed) {
starting_note++; // Change key
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 false;
}
if (record->event.key.col == (MATRIX_COLS - 2) && record->event.key.row == (MATRIX_ROWS - 1)) {
if (record->event.pressed) {
starting_note--; // Change key
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 false;
}
if (record->event.key.col == (MATRIX_COLS - 3) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) {
offset++; // Change scale
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 false;
}
if (record->event.key.col == (MATRIX_COLS - 4) && record->event.key.row == (MATRIX_ROWS - 1) && record->event.pressed) {
offset--; // Change scale
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 false;
}
// basic
// uint8_t note = (starting_note + SCALE[record->event.key.col + offset])+12*(MATRIX_ROWS - record->event.key.row);
// advanced
// uint8_t note = (starting_note + record->event.key.col + offset)+12*(MATRIX_ROWS - record->event.key.row);
// guitar
uint8_t note = (starting_note + record->event.key.col + offset)+5*(MATRIX_ROWS - record->event.key.row);
// violin
// uint8_t note = (starting_note + record->event.key.col + offset)+7*(MATRIX_ROWS - record->event.key.row);
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, note, 127);
} else {
// midi_send_noteoff(&midi_device, record->event.key.row, starting_note + SCALE[record->event.key.col], 127);
midi_send_noteoff(&midi_device, 0, note, 127);
}
if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through
return false;
}
#endif
#ifdef AUDIO_ENABLE
if (keycode == AU_ON && record->event.pressed) {
audio_on();
return false;
}
if (keycode == AU_OFF && record->event.pressed) {
audio_off();
return false;
}
if (keycode == AU_TOG && record->event.pressed) {
if (is_audio_on())
{
audio_off();
}
else
{
audio_on();
}
return false;
}
if (keycode == MU_ON && record->event.pressed) {
music_on();
return false;
}
if (keycode == MU_OFF && record->event.pressed) {
music_off();
return false;
}
if (keycode == MU_TOG && record->event.pressed) {
if (music_activated)
{
music_off();
}
else
{
music_on();
}
return false;
}
if (keycode == MUV_IN && record->event.pressed) {
voice_iterate();
play_music_scale();
return false;
}
if (keycode == MUV_DE && record->event.pressed) {
voice_deiterate();
play_music_scale();
return false;
}
if (music_activated) {
if (keycode == KC_LCTL && record->event.pressed) { // Start recording
stop_all_notes();
music_sequence_recording = true;
music_sequence_playing = false;
music_sequence_count = 0;
return false;
}
if (keycode == KC_LALT && record->event.pressed) { // Stop recording/playing
stop_all_notes();
music_sequence_recording = false;
music_sequence_playing = false;
return false;
}
if (keycode == KC_LGUI && record->event.pressed) { // Start playing
stop_all_notes();
music_sequence_recording = false;
music_sequence_playing = true;
music_sequence_position = 0;
music_sequence_timer = 0;
return false;
}
if (keycode == KC_UP) {
if (record->event.pressed)
music_sequence_interval-=10;
return false;
}
if (keycode == KC_DOWN) {
if (record->event.pressed)
music_sequence_interval+=10;
return false;
}
float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row));
if (record->event.pressed) {
play_note(freq, 0xF);
if (music_sequence_recording) {
music_sequence[music_sequence_count] = freq;
music_sequence_count++;
}
} else {
stop_note(freq);
}
if (keycode < 0xFF) // ignores all normal keycodes, but lets RAISE, LOWER, etc through
return false;
}
#endif
#ifndef DISABLE_LEADER
// Leader key set-up
if (record->event.pressed) {
if (!leading && keycode == KC_LEAD) {
leader_start();
leading = true;
leader_time = timer_read();
leader_sequence_size = 0;
leader_sequence[0] = 0;
leader_sequence[1] = 0;
leader_sequence[2] = 0;
return false;
}
if (leading && timer_elapsed(leader_time) < LEADER_TIMEOUT) {
leader_sequence[leader_sequence_size] = keycode;
leader_sequence_size++;
return false;
}
}
#endif
#define DISABLE_CHORDING
#ifndef DISABLE_CHORDING
if (keycode >= 0x5700 && keycode <= 0x57FF) {
if (record->event.pressed) {
if (!chording) {
chording = true;
for (uint8_t i = 0; i < CHORDING_MAX; i++)
chord_keys[i] = 0;
chord_key_count = 0;
chord_key_down = 0;
}
chord_keys[chord_key_count] = (keycode & 0xFF);
chord_key_count++;
chord_key_down++;
return false;
} else {
if (chording) {
chord_key_down--;
if (chord_key_down == 0) {
chording = false;
// Chord Dictionary
if (keys_chord((uint8_t[]){KC_ENTER, KC_SPACE})) {
register_code(KC_A);
unregister_code(KC_A);
return false;
}
for (uint8_t i = 0; i < chord_key_count; i++) {
register_code(chord_keys[i]);
unregister_code(chord_keys[i]);
return false;
}
}
}
}
}
#endif
#ifdef UNICODE_ENABLE
if (keycode > UNICODE(0) && record->event.pressed) {
uint16_t unicode = keycode & 0x7FFF;
switch(input_mode) {
case UC_OSX:
register_code(KC_LALT);
break;
case UC_LNX:
register_code(KC_LCTL);
register_code(KC_LSFT);
register_code(KC_U);
unregister_code(KC_U);
break;
case UC_WIN:
register_code(KC_LALT);
register_code(KC_PPLS);
unregister_code(KC_PPLS);
break;
}
for(int i = 3; i >= 0; i--) {
uint8_t digit = ((unicode >> (i*4)) & 0xF);
register_code(hex_to_keycode(digit));
unregister_code(hex_to_keycode(digit));
}
switch(input_mode) {
case UC_OSX:
case UC_WIN:
unregister_code(KC_LALT);
break;
case UC_LNX:
unregister_code(KC_LCTL);
unregister_code(KC_LSFT);
break;
}
}
#endif
return process_action_kb(record);
}
void matrix_init_quantum() {
matrix_init_kb();
}
void matrix_scan_quantum() {
#ifdef AUDIO_ENABLE
if (music_sequence_playing) {
if ((music_sequence_timer == 0) || (timer_elapsed(music_sequence_timer) > music_sequence_interval)) {
music_sequence_timer = timer_read();
stop_note(music_sequence[(music_sequence_position - 1 < 0)?(music_sequence_position - 1 + music_sequence_count):(music_sequence_position - 1)]);
play_note(music_sequence[music_sequence_position], 0xF);
music_sequence_position = (music_sequence_position + 1) % music_sequence_count;
}
}
#endif
matrix_scan_kb();
}
#ifdef AUDIO_ENABLE
bool is_music_on(void) {
return (music_activated != 0);
}
void music_toggle(void) {
if (!music_activated) {
music_on();
} else {
music_off();
}
}
void music_on(void) {
music_activated = 1;
music_on_user();
}
void music_off(void) {
music_activated = 0;
stop_all_notes();
}
#endif
__attribute__ ((weak))
void music_on_user() {}

@ -0,0 +1,72 @@
#ifndef QUANTUM_H
#define QUANTUM_H
#include "matrix.h"
#include "keymap_common.h"
#ifdef BACKLIGHT_ENABLE
#include "backlight.h"
#endif
#ifdef RGBLIGHT_ENABLE
#include "rgblight.h"
#endif
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
#ifdef MIDI_ENABLE
#include <lufa.h>
#endif
#ifdef UNICODE_ENABLE
#include "unicode.h"
#endif
#include "action_layer.h"
#include "eeconfig.h"
#include <stddef.h>
#include <avr/io.h>
extern uint32_t default_layer_state;
#ifndef NO_ACTION_LAYER
extern uint32_t layer_state;
#endif
#ifdef AUDIO_ENABLE
bool music_activated;
#endif
#ifdef UNICODE_ENABLE
#define UC_OSX 0
#define UC_LNX 1
#define UC_WIN 2
#define UC_BSD 3
void set_unicode_input_mode(uint8_t os_target);
#endif
#ifndef DISABLE_LEADER
void leader_start(void);
void leader_end(void);
#ifndef LEADER_TIMEOUT
#define LEADER_TIMEOUT 200
#endif
#define SEQ_ONE_KEY(key) if (leader_sequence[0] == (key) && leader_sequence[1] == 0 && leader_sequence[2] == 0)
#define SEQ_TWO_KEYS(key1, key2) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == 0)
#define SEQ_THREE_KEYS(key1, key2, key3) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3))
#define LEADER_EXTERNS() extern bool leading; extern uint16_t leader_time; extern uint16_t leader_sequence[3]; extern uint8_t leader_sequence_size
#define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT)
#endif
void matrix_init_kb(void);
void matrix_scan_kb(void);
bool process_action_kb(keyrecord_t *record);
bool is_music_on(void);
void music_toggle(void);
void music_on(void);
void music_off(void);
void music_on_user(void);
#endif

@ -1,7 +1,8 @@
QUANTUM_DIR = quantum QUANTUM_DIR = quantum
# # project specific files # # project specific files
SRC += $(QUANTUM_DIR)/keymap_common.c \ SRC += $(QUANTUM_DIR)/quantum.c \
$(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/led.c $(QUANTUM_DIR)/led.c
# ifdef KEYMAP_FILE # ifdef KEYMAP_FILE
@ -23,16 +24,14 @@ ifndef CUSTOM_MATRIX
SRC += $(QUANTUM_DIR)/matrix.c SRC += $(QUANTUM_DIR)/matrix.c
endif endif
ifeq ($(strip $(MIDI_ENABLE)), yes) #ifeq ($(strip $(MIDI_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/keymap_midi.c # SRC += $(QUANTUM_DIR)/keymap_midi.c
endif #endif
ifeq ($(strip $(AUDIO_ENABLE)), yes) ifeq ($(strip $(AUDIO_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/audio/audio.c $(QUANTUM_DIR)/audio/voices.c SRC += $(QUANTUM_DIR)/audio/audio.c
endif SRC += $(QUANTUM_DIR)/audio/voices.c
SRC += $(QUANTUM_DIR)/audio/luts.c
ifeq ($(strip $(UNICODE_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/keymap_unicode.c
endif endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)

@ -11,8 +11,9 @@ void matrix_scan_user(void) {
} }
__attribute__ ((weak)) __attribute__ ((weak))
void process_action_user(keyrecord_t *record) { bool process_action_user(keyrecord_t *record) {
// leave this function blank - it can be defined in a keymap file // leave this function blank - it can be defined in a keymap file
return true;
} }
__attribute__ ((weak)) __attribute__ ((weak))
@ -34,11 +35,11 @@ void matrix_scan_kb(void) {
matrix_scan_user(); matrix_scan_user();
} }
void process_action_kb(keyrecord_t *record) { bool process_action_kb(keyrecord_t *record) {
// put your per-action keyboard code here // put your per-action keyboard code here
// runs for every action, just before processing by the firmware // runs for every action, just before processing by the firmware
process_action_user(record); return process_action_user(record);
} }
void led_set_kb(uint8_t usb_led) { void led_set_kb(uint8_t usb_led) {

@ -24,7 +24,7 @@
void matrix_init_user(void); void matrix_init_user(void);
void matrix_scan_user(void); void matrix_scan_user(void);
void process_action_user(keyrecord_t *record); bool process_action_user(keyrecord_t *record);
void led_set_user(uint8_t usb_led); void led_set_user(uint8_t usb_led);
#endif #endif

@ -1,6 +1,6 @@
`eeprom_reset.hex` is to reset the eeprom on the Atmega32u4, like this: `eeprom_reset.hex` is to reset the eeprom on the Atmega32u4, like this:
dfu-programmer atmega32u4 erase dfu-programmer atmega32u4 erase
dfu-programmer atmega32u4 flash --eeprom eeprom-reset.bin dfu-programmer atmega32u4 flash --eeprom eeprom_reset.hex
You'll need to reflash afterwards, because DFU requires the flash to be erased before messing with the eeprom. You'll need to reflash afterwards, because DFU requires the flash to be erased before messing with the eeprom.

@ -0,0 +1,128 @@
/*
Copyright 2016 Jack Humbert <jack.humb@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UNICODE_H
#define UNICODE_H
#include "quantum.h"
#include <math.h>
#define UC_BSPC UC(0x0008)
#define UC_SPC UC(0x0020)
#define UC_EXLM UC(0x0021)
#define UC_DQUT UC(0x0022)
#define UC_HASH UC(0x0023)
#define UC_DLR UC(0x0024)
#define UC_PERC UC(0x0025)
#define UC_AMPR UC(0x0026)
#define UC_QUOT UC(0x0027)
#define UC_LPRN UC(0x0028)
#define UC_RPRN UC(0x0029)
#define UC_ASTR UC(0x002A)
#define UC_PLUS UC(0x002B)
#define UC_COMM UC(0x002C)
#define UC_DASH UC(0x002D)
#define UC_DOT UC(0x002E)
#define UC_SLSH UC(0x002F)
#define UC_0 UC(0x0030)
#define UC_1 UC(0x0031)
#define UC_2 UC(0x0032)
#define UC_3 UC(0x0033)
#define UC_4 UC(0x0034)
#define UC_5 UC(0x0035)
#define UC_6 UC(0x0036)
#define UC_7 UC(0x0037)
#define UC_8 UC(0x0038)
#define UC_9 UC(0x0039)
#define UC_COLN UC(0x003A)
#define UC_SCLN UC(0x003B)
#define UC_LT UC(0x003C)
#define UC_EQL UC(0x003D)
#define UC_GT UC(0x003E)
#define UC_QUES UC(0x003F)
#define UC_AT UC(0x0040)
#define UC_A UC(0x0041)
#define UC_B UC(0x0042)
#define UC_C UC(0x0043)
#define UC_D UC(0x0044)
#define UC_E UC(0x0045)
#define UC_F UC(0x0046)
#define UC_G UC(0x0047)
#define UC_H UC(0x0048)
#define UC_I UC(0x0049)
#define UC_J UC(0x004A)
#define UC_K UC(0x004B)
#define UC_L UC(0x004C)
#define UC_M UC(0x004D)
#define UC_N UC(0x004E)
#define UC_O UC(0x004F)
#define UC_P UC(0x0050)
#define UC_Q UC(0x0051)
#define UC_R UC(0x0052)
#define UC_S UC(0x0053)
#define UC_T UC(0x0054)
#define UC_U UC(0x0055)
#define UC_V UC(0x0056)
#define UC_W UC(0x0057)
#define UC_X UC(0x0058)
#define UC_Y UC(0x0059)
#define UC_Z UC(0x005A)
#define UC_LBRC UC(0x005B)
#define UC_BSLS UC(0x005C)
#define UC_RBRC UC(0x005D)
#define UC_CIRM UC(0x005E)
#define UC_UNDR UC(0x005F)
#define UC_GRV UC(0x0060)
#define UC_a UC(0x0061)
#define UC_b UC(0x0062)
#define UC_c UC(0x0063)
#define UC_d UC(0x0064)
#define UC_e UC(0x0065)
#define UC_f UC(0x0066)
#define UC_g UC(0x0067)
#define UC_h UC(0x0068)
#define UC_i UC(0x0069)
#define UC_j UC(0x006A)
#define UC_k UC(0x006B)
#define UC_l UC(0x006C)
#define UC_m UC(0x006D)
#define UC_n UC(0x006E)
#define UC_o UC(0x006F)
#define UC_p UC(0x0070)
#define UC_q UC(0x0071)
#define UC_r UC(0x0072)
#define UC_s UC(0x0073)
#define UC_t UC(0x0074)
#define UC_u UC(0x0075)
#define UC_v UC(0x0076)
#define UC_w UC(0x0077)
#define UC_x UC(0x0078)
#define UC_y UC(0x0079)
#define UC_z UC(0x007A)
#define UC_LCBR UC(0x007B)
#define UC_PIPE UC(0x007C)
#define UC_RCBR UC(0x007D)
#define UC_TILD UC(0x007E)
#define UC_DEL UC(0x007F)
#endif

@ -60,6 +60,10 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
OPT_DEFS += -DAUDIO_ENABLE OPT_DEFS += -DAUDIO_ENABLE
endif endif
ifeq ($(strip $(UNICODE_ENABLE)), yes)
OPT_DEFS += -DUNICODE_ENABLE
endif
ifeq ($(strip $(USB_6KRO_ENABLE)), yes) ifeq ($(strip $(USB_6KRO_ENABLE)), yes)
OPT_DEFS += -DUSB_6KRO_ENABLE OPT_DEFS += -DUSB_6KRO_ENABLE
endif endif

@ -46,7 +46,7 @@ void action_exec(keyevent_t event)
#ifndef NO_ACTION_TAPPING #ifndef NO_ACTION_TAPPING
action_tapping_process(record); action_tapping_process(record);
#else #else
process_action(&record); process_record(&record);
if (!IS_NOEVENT(record.event)) { if (!IS_NOEVENT(record.event)) {
dprint("processed: "); debug_record(record); dprintln(); dprint("processed: "); debug_record(record); dprintln();
} }
@ -56,34 +56,32 @@ void action_exec(keyevent_t event)
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
bool disable_action_cache = false; bool disable_action_cache = false;
void process_action_nocache(keyrecord_t *record) void process_record_nocache(keyrecord_t *record)
{ {
disable_action_cache = true; disable_action_cache = true;
process_action(record); process_record(record);
disable_action_cache = false; disable_action_cache = false;
} }
#else #else
void process_action_nocache(keyrecord_t *record) void process_record_nocache(keyrecord_t *record)
{ {
process_action(record); process_record(record);
} }
#endif #endif
__attribute__ ((weak)) __attribute__ ((weak))
void process_action_kb(keyrecord_t *record) {} bool process_record_quantum(keyrecord_t *record) {
return true;
}
void process_action(keyrecord_t *record) void process_record(keyrecord_t *record)
{ {
keyevent_t event = record->event; if (IS_NOEVENT(record->event)) { return; }
#ifndef NO_ACTION_TAPPING
uint8_t tap_count = record->tap.count;
#endif
if (IS_NOEVENT(event)) { return; } if(!process_record_quantum(record))
return;
process_action_kb(record);
action_t action = store_or_get_action(event.pressed, event.key); action_t action = store_or_get_action(record->event.pressed, record->event.key);
dprint("ACTION: "); debug_action(action); dprint("ACTION: "); debug_action(action);
#ifndef NO_ACTION_LAYER #ifndef NO_ACTION_LAYER
dprint(" layer_state: "); layer_debug(); dprint(" layer_state: "); layer_debug();
@ -91,10 +89,37 @@ void process_action(keyrecord_t *record)
#endif #endif
dprintln(); dprintln();
process_action(record, action);
}
void process_action(keyrecord_t *record, action_t action)
{
bool do_release_oneshot = false;
keyevent_t event = record->event;
#ifndef NO_ACTION_TAPPING
uint8_t tap_count = record->tap.count;
#endif
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
if (has_oneshot_layer_timed_out()) {
dprintf("Oneshot layer: timeout\n");
clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
}
#endif
if (event.pressed) { if (event.pressed) {
// clear the potential weak mods left by previously pressed keys // clear the potential weak mods left by previously pressed keys
clear_weak_mods(); clear_weak_mods();
} }
#ifndef NO_ACTION_ONESHOT
// notice we only clear the one shot layer if the pressed key is not a modifier.
if (is_oneshot_layer_active() && event.pressed && !IS_MOD(action.key.code)) {
clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
do_release_oneshot = !is_oneshot_layer_active();
}
#endif
switch (action.kind.id) { switch (action.kind.id) {
/* Key and Mods */ /* Key and Mods */
case ACT_LMODS: case ACT_LMODS:
@ -139,24 +164,37 @@ void process_action(keyrecord_t *record)
// Oneshot modifier // Oneshot modifier
if (event.pressed) { if (event.pressed) {
if (tap_count == 0) { if (tap_count == 0) {
dprint("MODS_TAP: Oneshot: 0\n");
register_mods(mods); register_mods(mods);
} } else if (tap_count == 1) {
else if (tap_count == 1) {
dprint("MODS_TAP: Oneshot: start\n"); dprint("MODS_TAP: Oneshot: start\n");
set_oneshot_mods(mods); set_oneshot_mods(mods);
} #if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1
else { } else if (tap_count == ONESHOT_TAP_TOGGLE) {
dprint("MODS_TAP: Toggling oneshot");
clear_oneshot_mods();
set_oneshot_locked_mods(mods);
register_mods(mods);
#endif
} else {
register_mods(mods); register_mods(mods);
} }
} else { } else {
if (tap_count == 0) { if (tap_count == 0) {
clear_oneshot_mods(); clear_oneshot_mods();
unregister_mods(mods); unregister_mods(mods);
} } else if (tap_count == 1) {
else if (tap_count == 1) {
// Retain Oneshot mods // Retain Oneshot mods
#if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1
if (mods & get_mods()) {
clear_oneshot_locked_mods();
clear_oneshot_mods();
unregister_mods(mods);
} }
else { } else if (tap_count == ONESHOT_TAP_TOGGLE) {
// Toggle Oneshot Layer
#endif
} else {
clear_oneshot_mods(); clear_oneshot_mods();
unregister_mods(mods); unregister_mods(mods);
} }
@ -309,6 +347,44 @@ void process_action(keyrecord_t *record)
event.pressed ? layer_move(action.layer_tap.val) : event.pressed ? layer_move(action.layer_tap.val) :
layer_clear(); layer_clear();
break; break;
#ifndef NO_ACTION_ONESHOT
case OP_ONESHOT:
// Oneshot modifier
#if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1
do_release_oneshot = false;
if (event.pressed) {
del_mods(get_oneshot_locked_mods());
if (get_oneshot_layer_state() == ONESHOT_TOGGLED) {
reset_oneshot_layer();
layer_off(action.layer_tap.val);
break;
} else if (tap_count < ONESHOT_TAP_TOGGLE) {
layer_on(action.layer_tap.val);
set_oneshot_layer(action.layer_tap.val, ONESHOT_START);
}
} else {
add_mods(get_oneshot_locked_mods());
if (tap_count >= ONESHOT_TAP_TOGGLE) {
reset_oneshot_layer();
clear_oneshot_locked_mods();
set_oneshot_layer(action.layer_tap.val, ONESHOT_TOGGLED);
} else {
clear_oneshot_layer_state(ONESHOT_PRESSED);
}
}
#else
if (event.pressed) {
layer_on(action.layer_tap.val);
set_oneshot_layer(action.layer_tap.val, ONESHOT_START);
} else {
clear_oneshot_layer_state(ONESHOT_PRESSED);
if (tap_count > 1) {
clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
}
}
#endif
break;
#endif
default: default:
/* tap key */ /* tap key */
if (event.pressed) { if (event.pressed) {
@ -372,6 +448,18 @@ void process_action(keyrecord_t *record)
default: default:
break; break;
} }
#ifndef NO_ACTION_ONESHOT
/* Because we switch layers after a oneshot event, we need to release the
* key before we leave the layer or no key up event will be generated.
*/
if (do_release_oneshot && !(get_oneshot_layer_state() & ONESHOT_PRESSED ) ) {
record->event.pressed = false;
layer_on(get_oneshot_layer());
process_record(record);
layer_off(get_oneshot_layer());
}
#endif
} }
@ -560,6 +648,7 @@ bool is_tap_key(keypos_t key)
switch (action.layer_tap.code) { switch (action.layer_tap.code) {
case 0x00 ... 0xdf: case 0x00 ... 0xdf:
case OP_TAP_TOGGLE: case OP_TAP_TOGGLE:
case OP_ONESHOT:
return true; return true;
} }
return false; return false;

@ -59,14 +59,15 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt);
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt); void action_function(keyrecord_t *record, uint8_t id, uint8_t opt);
/* keyboard-specific key event (pre)processing */ /* keyboard-specific key event (pre)processing */
void process_action_kb(keyrecord_t *record); bool process_record_quantum(keyrecord_t *record);
/* Utilities for actions. */ /* Utilities for actions. */
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
extern bool disable_action_cache; extern bool disable_action_cache;
#endif #endif
void process_action_nocache(keyrecord_t *record); void process_record_nocache(keyrecord_t *record);
void process_action(keyrecord_t *record); void process_record(keyrecord_t *record);
void process_action(keyrecord_t *record, action_t action);
void register_code(uint8_t code); void register_code(uint8_t code);
void unregister_code(uint8_t code); void unregister_code(uint8_t code);
void register_mods(uint8_t mods); void register_mods(uint8_t mods);

@ -76,7 +76,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* 101E|LLLL|1111 0001 On/Off (0xF1) [NOT TAP] * 101E|LLLL|1111 0001 On/Off (0xF1) [NOT TAP]
* 101E|LLLL|1111 0010 Off/On (0xF2) [NOT TAP] * 101E|LLLL|1111 0010 Off/On (0xF2) [NOT TAP]
* 101E|LLLL|1111 0011 Set/Clear (0xF3) [NOT TAP] * 101E|LLLL|1111 0011 Set/Clear (0xF3) [NOT TAP]
* 101E|LLLL|1111 xxxx Reserved (0xF4-FF) * 101E|LLLL|1111 0100 One Shot Layer (0xF4) [TAP]
* 101E|LLLL|1111 xxxx Reserved (0xF5-FF)
* ELLLL: layer 0-31(E: extra bit for layer 16-31) * ELLLL: layer 0-31(E: extra bit for layer 16-31)
* *
* *
@ -250,6 +251,7 @@ enum layer_pram_tap_op {
OP_ON_OFF, OP_ON_OFF,
OP_OFF_ON, OP_OFF_ON,
OP_SET_CLEAR, OP_SET_CLEAR,
OP_ONESHOT,
}; };
#define ACTION_LAYER_BITOP(op, part, bits, on) (ACT_LAYER<<12 | (op)<<10 | (on)<<8 | (part)<<5 | ((bits)&0x1f)) #define ACTION_LAYER_BITOP(op, part, bits, on) (ACT_LAYER<<12 | (op)<<10 | (on)<<8 | (part)<<5 | ((bits)&0x1f))
#define ACTION_LAYER_TAP(layer, key) (ACT_LAYER_TAP<<12 | (layer)<<8 | (key)) #define ACTION_LAYER_TAP(layer, key) (ACT_LAYER_TAP<<12 | (layer)<<8 | (key))
@ -266,6 +268,7 @@ enum layer_pram_tap_op {
#define ACTION_LAYER_ON_OFF(layer) ACTION_LAYER_TAP((layer), OP_ON_OFF) #define ACTION_LAYER_ON_OFF(layer) ACTION_LAYER_TAP((layer), OP_ON_OFF)
#define ACTION_LAYER_OFF_ON(layer) ACTION_LAYER_TAP((layer), OP_OFF_ON) #define ACTION_LAYER_OFF_ON(layer) ACTION_LAYER_TAP((layer), OP_OFF_ON)
#define ACTION_LAYER_SET_CLEAR(layer) ACTION_LAYER_TAP((layer), OP_SET_CLEAR) #define ACTION_LAYER_SET_CLEAR(layer) ACTION_LAYER_TAP((layer), OP_SET_CLEAR)
#define ACTION_LAYER_ONESHOT(layer) ACTION_LAYER_TAP((layer), OP_ONESHOT)
#define ACTION_LAYER_MODS(layer, mods) ACTION_LAYER_TAP((layer), 0xe0 | ((mods)&0x0f)) #define ACTION_LAYER_MODS(layer, mods) ACTION_LAYER_TAP((layer), 0xe0 | ((mods)&0x0f))
/* With Tapping */ /* With Tapping */
#define ACTION_LAYER_TAP_KEY(layer, key) ACTION_LAYER_TAP((layer), (key)) #define ACTION_LAYER_TAP_KEY(layer, key) ACTION_LAYER_TAP((layer), (key))

@ -89,7 +89,7 @@ bool process_tapping(keyrecord_t *keyp)
debug("Tapping: First tap(0->1).\n"); debug("Tapping: First tap(0->1).\n");
tapping_key.tap.count = 1; tapping_key.tap.count = 1;
debug_tapping_key(); debug_tapping_key();
process_action(&tapping_key); process_record(&tapping_key);
// copy tapping state // copy tapping state
keyp->tap = tapping_key.tap; keyp->tap = tapping_key.tap;
@ -103,7 +103,7 @@ bool process_tapping(keyrecord_t *keyp)
*/ */
else if (IS_RELEASED(event) && waiting_buffer_typed(event)) { else if (IS_RELEASED(event) && waiting_buffer_typed(event)) {
debug("Tapping: End. No tap. Interfered by typing key\n"); debug("Tapping: End. No tap. Interfered by typing key\n");
process_action(&tapping_key); process_record(&tapping_key);
tapping_key = (keyrecord_t){}; tapping_key = (keyrecord_t){};
debug_tapping_key(); debug_tapping_key();
// enqueue // enqueue
@ -131,7 +131,7 @@ bool process_tapping(keyrecord_t *keyp)
} }
// Release of key should be process immediately. // Release of key should be process immediately.
debug("Tapping: release event of a key pressed before tapping\n"); debug("Tapping: release event of a key pressed before tapping\n");
process_action(keyp); process_record(keyp);
return true; return true;
} }
else { else {
@ -148,7 +148,7 @@ bool process_tapping(keyrecord_t *keyp)
if (IS_TAPPING_KEY(event.key) && !event.pressed) { if (IS_TAPPING_KEY(event.key) && !event.pressed) {
debug("Tapping: Tap release("); debug_dec(tapping_key.tap.count); debug(")\n"); debug("Tapping: Tap release("); debug_dec(tapping_key.tap.count); debug(")\n");
keyp->tap = tapping_key.tap; keyp->tap = tapping_key.tap;
process_action(keyp); process_record(keyp);
tapping_key = *keyp; tapping_key = *keyp;
debug_tapping_key(); debug_tapping_key();
return true; return true;
@ -157,7 +157,7 @@ bool process_tapping(keyrecord_t *keyp)
if (tapping_key.tap.count > 1) { if (tapping_key.tap.count > 1) {
debug("Tapping: Start new tap with releasing last tap(>1).\n"); debug("Tapping: Start new tap with releasing last tap(>1).\n");
// unregister key // unregister key
process_action(&(keyrecord_t){ process_record(&(keyrecord_t){
.tap = tapping_key.tap, .tap = tapping_key.tap,
.event.key = tapping_key.event.key, .event.key = tapping_key.event.key,
.event.time = event.time, .event.time = event.time,
@ -175,7 +175,7 @@ bool process_tapping(keyrecord_t *keyp)
if (!IS_NOEVENT(event)) { if (!IS_NOEVENT(event)) {
debug("Tapping: key event while last tap(>0).\n"); debug("Tapping: key event while last tap(>0).\n");
} }
process_action(keyp); process_record(keyp);
return true; return true;
} }
} }
@ -185,7 +185,7 @@ bool process_tapping(keyrecord_t *keyp)
if (tapping_key.tap.count == 0) { if (tapping_key.tap.count == 0) {
debug("Tapping: End. Timeout. Not tap(0): "); debug("Tapping: End. Timeout. Not tap(0): ");
debug_event(event); debug("\n"); debug_event(event); debug("\n");
process_action(&tapping_key); process_record(&tapping_key);
tapping_key = (keyrecord_t){}; tapping_key = (keyrecord_t){};
debug_tapping_key(); debug_tapping_key();
return false; return false;
@ -193,7 +193,7 @@ bool process_tapping(keyrecord_t *keyp)
if (IS_TAPPING_KEY(event.key) && !event.pressed) { if (IS_TAPPING_KEY(event.key) && !event.pressed) {
debug("Tapping: End. last timeout tap release(>0)."); debug("Tapping: End. last timeout tap release(>0).");
keyp->tap = tapping_key.tap; keyp->tap = tapping_key.tap;
process_action(keyp); process_record(keyp);
tapping_key = (keyrecord_t){}; tapping_key = (keyrecord_t){};
return true; return true;
} }
@ -201,7 +201,7 @@ bool process_tapping(keyrecord_t *keyp)
if (tapping_key.tap.count > 1) { if (tapping_key.tap.count > 1) {
debug("Tapping: Start new tap with releasing last timeout tap(>1).\n"); debug("Tapping: Start new tap with releasing last timeout tap(>1).\n");
// unregister key // unregister key
process_action(&(keyrecord_t){ process_record(&(keyrecord_t){
.tap = tapping_key.tap, .tap = tapping_key.tap,
.event.key = tapping_key.event.key, .event.key = tapping_key.event.key,
.event.time = event.time, .event.time = event.time,
@ -219,7 +219,7 @@ bool process_tapping(keyrecord_t *keyp)
if (!IS_NOEVENT(event)) { if (!IS_NOEVENT(event)) {
debug("Tapping: key event while last timeout tap(>0).\n"); debug("Tapping: key event while last timeout tap(>0).\n");
} }
process_action(keyp); process_record(keyp);
return true; return true;
} }
} }
@ -233,7 +233,7 @@ bool process_tapping(keyrecord_t *keyp)
keyp->tap = tapping_key.tap; keyp->tap = tapping_key.tap;
if (keyp->tap.count < 15) keyp->tap.count += 1; if (keyp->tap.count < 15) keyp->tap.count += 1;
debug("Tapping: Tap press("); debug_dec(keyp->tap.count); debug(")\n"); debug("Tapping: Tap press("); debug_dec(keyp->tap.count); debug(")\n");
process_action(keyp); process_record(keyp);
tapping_key = *keyp; tapping_key = *keyp;
debug_tapping_key(); debug_tapping_key();
return true; return true;
@ -253,12 +253,12 @@ bool process_tapping(keyrecord_t *keyp)
// should none in buffer // should none in buffer
// FIX: interrupted when other key is pressed // FIX: interrupted when other key is pressed
tapping_key.tap.interrupted = true; tapping_key.tap.interrupted = true;
process_action(keyp); process_record(keyp);
return true; return true;
} }
} else { } else {
if (!IS_NOEVENT(event)) debug("Tapping: other key just after tap.\n"); if (!IS_NOEVENT(event)) debug("Tapping: other key just after tap.\n");
process_action(keyp); process_record(keyp);
return true; return true;
} }
} else { } else {
@ -280,7 +280,7 @@ bool process_tapping(keyrecord_t *keyp)
debug_tapping_key(); debug_tapping_key();
return true; return true;
} else { } else {
process_action(keyp); process_record(keyp);
return true; return true;
} }
} }
@ -347,7 +347,7 @@ void waiting_buffer_scan_tap(void)
WITHIN_TAPPING_TERM(waiting_buffer[i].event)) { WITHIN_TAPPING_TERM(waiting_buffer[i].event)) {
tapping_key.tap.count = 1; tapping_key.tap.count = 1;
waiting_buffer[i].tap.count = 1; waiting_buffer[i].tap.count = 1;
process_action(&tapping_key); process_record(&tapping_key);
debug("waiting_buffer_scan_tap: found at ["); debug_dec(i); debug("]\n"); debug("waiting_buffer_scan_tap: found at ["); debug_dec(i); debug("]\n");
debug_waiting_buffer(); debug_waiting_buffer();

@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "report.h" #include "report.h"
#include "debug.h" #include "debug.h"
#include "action_util.h" #include "action_util.h"
#include "action_layer.h"
#include "timer.h" #include "timer.h"
static inline void add_key_byte(uint8_t code); static inline void add_key_byte(uint8_t code);
@ -47,11 +48,70 @@ report_keyboard_t *keyboard_report = &(report_keyboard_t){};
#ifndef NO_ACTION_ONESHOT #ifndef NO_ACTION_ONESHOT
static int8_t oneshot_mods = 0; static int8_t oneshot_mods = 0;
static int8_t oneshot_locked_mods = 0;
int8_t get_oneshot_locked_mods(void) { return oneshot_locked_mods; }
void set_oneshot_locked_mods(int8_t mods) { oneshot_locked_mods = mods; }
void clear_oneshot_locked_mods(void) { oneshot_locked_mods = 0; }
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
static int16_t oneshot_time = 0; static int16_t oneshot_time = 0;
inline bool has_oneshot_mods_timed_out() {
return TIMER_DIFF_16(timer_read(), oneshot_time) >= ONESHOT_TIMEOUT;
}
#endif #endif
#endif #endif
/* oneshot layer */
#ifndef NO_ACTION_ONESHOT
/* oneshot_layer_data bits
* LLLL LSSS
* where:
* L => are layer bits
* S => oneshot state bits
*/
static int8_t oneshot_layer_data = 0;
inline uint8_t get_oneshot_layer(void) { return oneshot_layer_data >> 3; }
inline uint8_t get_oneshot_layer_state(void) { return oneshot_layer_data & 0b111; }
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
static int16_t oneshot_layer_time = 0;
inline bool has_oneshot_layer_timed_out() {
return TIMER_DIFF_16(timer_read(), oneshot_layer_time) >= ONESHOT_TIMEOUT &&
!(get_oneshot_layer_state() & ONESHOT_TOGGLED);
}
#endif
/* Oneshot layer */
void set_oneshot_layer(uint8_t layer, uint8_t state)
{
oneshot_layer_data = layer << 3 | state;
layer_on(layer);
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
oneshot_layer_time = timer_read();
#endif
}
void reset_oneshot_layer(void) {
oneshot_layer_data = 0;
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
oneshot_layer_time = 0;
#endif
}
void clear_oneshot_layer_state(oneshot_fullfillment_t state)
{
uint8_t start_state = oneshot_layer_data;
oneshot_layer_data &= ~state;
if (!get_oneshot_layer_state() && start_state != oneshot_layer_data) {
layer_off(get_oneshot_layer());
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
oneshot_layer_time = 0;
#endif
}
}
bool is_oneshot_layer_active(void)
{
return get_oneshot_layer_state();
}
#endif
void send_keyboard_report(void) { void send_keyboard_report(void) {
keyboard_report->mods = real_mods; keyboard_report->mods = real_mods;
@ -60,7 +120,7 @@ void send_keyboard_report(void) {
#ifndef NO_ACTION_ONESHOT #ifndef NO_ACTION_ONESHOT
if (oneshot_mods) { if (oneshot_mods) {
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
if (TIMER_DIFF_16(timer_read(), oneshot_time) >= ONESHOT_TIMEOUT) { if (has_oneshot_mods_timed_out()) {
dprintf("Oneshot: timeout\n"); dprintf("Oneshot: timeout\n");
clear_oneshot_mods(); clear_oneshot_mods();
} }
@ -70,6 +130,7 @@ void send_keyboard_report(void) {
clear_oneshot_mods(); clear_oneshot_mods();
} }
} }
#endif #endif
host_keyboard_send(keyboard_report); host_keyboard_send(keyboard_report);
} }
@ -143,11 +204,12 @@ void clear_oneshot_mods(void)
oneshot_time = 0; oneshot_time = 0;
#endif #endif
} }
uint8_t get_oneshot_mods(void)
{
return oneshot_mods;
}
#endif #endif
/* /*
* inspect keyboard state * inspect keyboard state
*/ */

@ -56,10 +56,30 @@ void clear_macro_mods(void);
/* oneshot modifier */ /* oneshot modifier */
void set_oneshot_mods(uint8_t mods); void set_oneshot_mods(uint8_t mods);
uint8_t get_oneshot_mods(void);
void clear_oneshot_mods(void); void clear_oneshot_mods(void);
void oneshot_toggle(void); void oneshot_toggle(void);
void oneshot_enable(void); void oneshot_enable(void);
void oneshot_disable(void); void oneshot_disable(void);
bool has_oneshot_mods_timed_out(void);
int8_t get_oneshot_locked_mods(void);
void set_oneshot_locked_mods(int8_t mods);
void clear_oneshot_locked_mods(void);
typedef enum {
ONESHOT_PRESSED = 0b01,
ONESHOT_OTHER_KEY_PRESSED = 0b10,
ONESHOT_START = 0b11,
ONESHOT_TOGGLED = 0b100
} oneshot_fullfillment_t;
void set_oneshot_layer(uint8_t layer, uint8_t state);
uint8_t get_oneshot_layer(void);
void clear_oneshot_layer_state(oneshot_fullfillment_t state);
void reset_oneshot_layer(void);
bool is_oneshot_layer_active(void);
uint8_t get_oneshot_layer_state(void);
bool has_oneshot_layer_timed_out(void);
/* inspect */ /* inspect */
uint8_t has_anykey(void); uint8_t has_anykey(void);

@ -83,3 +83,8 @@ void backlight_level(uint8_t level)
eeconfig_update_backlight(backlight_config.raw); eeconfig_update_backlight(backlight_config.raw);
backlight_set(backlight_config.level); backlight_set(backlight_config.level);
} }
uint8_t get_backlight_level(void)
{
return backlight_config.level;
}

@ -36,5 +36,6 @@ void backlight_toggle(void);
void backlight_step(void); void backlight_step(void);
void backlight_set(uint8_t level); void backlight_set(uint8_t level);
void backlight_level(uint8_t level); void backlight_level(uint8_t level);
uint8_t get_backlight_level(void);
#endif #endif

@ -357,9 +357,11 @@ static bool command_common(uint8_t code)
clear_keyboard(); // clear to prevent stuck keys clear_keyboard(); // clear to prevent stuck keys
print("\n\nJumping to bootloader... "); print("\n\nJumping to bootloader... ");
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
stop_all_notes();
play_goodbye_tone(); play_goodbye_tone();
#endif #else
_delay_ms(1000); _delay_ms(1000);
#endif
bootloader_jump(); // not return bootloader_jump(); // not return
break; break;

@ -64,8 +64,8 @@ void matrix_power_up(void);
void matrix_power_down(void); void matrix_power_down(void);
/* keyboard-specific setup/loop functionality */ /* keyboard-specific setup/loop functionality */
void matrix_init_kb(void); void matrix_init_quantum(void);
void matrix_scan_kb(void); void matrix_scan_quantum(void);
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -16,10 +16,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef NODEBUG_H #ifndef NODEBUG_H
#define NODEBUG_H 1 #define NODEBUG_H
#define NO_DEBUG #ifndef NO_DEBUG
#include "debug.h" #define NO_DEBUG
#undef NO_DEBUG #include "debug.h"
#undef NO_DEBUG
#else
#include "debug.h"
#endif
#endif #endif

@ -528,14 +528,20 @@ This is a feature to assign both toggle layer and momentary switch layer action
### 4.3 Oneshot Modifier ### 4.3 Oneshot Modifier
This runs onetime effects which modify only on just one following key. It works as normal modifier key when holding down while oneshot modifier when tapping. This runs onetime effects which modify only on just one following key. It works as normal modifier key when holding down while oneshot modifier when tapping. The behavior of oneshot modifiers is similar to the [sticky keys](https://en.wikipedia.org/wiki/StickyKeys) functionality found in most operating systems.
ACTION_MODS_ONESHOT(MOD_LSFT) ACTION_MODS_ONESHOT(MOD_LSFT)
Oneshot layer key:
ACTION_LAYER_ONESHOT(MY_LAYER)
Say you want to type 'The', you have to push and hold Shift key before type 't' then release it before type 'h' and 'e', otherwise you'll get 'THe' or 'the' unintentionally. With Oneshot Modifier you can tap Shift then type 't', 'h' and 'e' normally, you don't need to holding Shift key properly here. This mean you can release Shift before 't' is pressed down. Say you want to type 'The', you have to push and hold Shift key before type 't' then release it before type 'h' and 'e', otherwise you'll get 'THe' or 'the' unintentionally. With Oneshot Modifier you can tap Shift then type 't', 'h' and 'e' normally, you don't need to holding Shift key properly here. This mean you can release Shift before 't' is pressed down.
Oneshot effect is cancel unless following key is pressed down within `ONESHOT_TIMEOUT` of `config.h`. No timeout when it is `0` or not defined. Oneshot effect is cancel unless following key is pressed down within `ONESHOT_TIMEOUT` of `config.h`. No timeout when it is `0` or not defined.
Most implementations of sticky keys allow you to lock a modifier by double tapping the modifier. The layer then remains locked untill the modifier is tapped again. To enable this behaviour for oneshot modifiers set `ONESHOT_TAP_TOGGLE` to the number taps required. The feature is disabled if `ONESHOT_TAP_TOGGLE<2` or not defined.
### 4.4 Tap Toggle Mods ### 4.4 Tap Toggle Mods
Similar to layer tap toggle, this works as a momentary modifier when holding, but toggles on with several taps. A single tap will 'unstick' the modifier again. Similar to layer tap toggle, this works as a momentary modifier when holding, but toggles on with several taps. A single tap will 'unstick' the modifier again.

@ -883,7 +883,7 @@ int main(void)
midi_register_cc_callback(&midi_device, cc_callback); midi_register_cc_callback(&midi_device, cc_callback);
midi_register_sysex_callback(&midi_device, sysex_callback); midi_register_sysex_callback(&midi_device, sysex_callback);
init_notes(); // init_notes();
// midi_send_cc(&midi_device, 0, 1, 2); // midi_send_cc(&midi_device, 0, 1, 2);
// midi_send_cc(&midi_device, 15, 1, 0); // midi_send_cc(&midi_device, 15, 1, 0);
// midi_send_noteon(&midi_device, 0, 64, 127); // midi_send_noteon(&midi_device, 0, 64, 127);

@ -142,6 +142,9 @@ CFLAGS += $(CSTANDARD)
ifdef CONFIG_H ifdef CONFIG_H
CFLAGS += -include $(CONFIG_H) CFLAGS += -include $(CONFIG_H)
endif endif
ifdef CONFIG_USER_H
CFLAGS += -include $(CONFIG_USER_H)
endif
#---------------- Compiler Options C++ ---------------- #---------------- Compiler Options C++ ----------------
@ -176,6 +179,9 @@ CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
ifdef CONFIG_H ifdef CONFIG_H
CPPFLAGS += -include $(CONFIG_H) CPPFLAGS += -include $(CONFIG_H)
endif endif
ifdef CONFIG_USER_H
CPPFLAGS += -include $(CONFIG_USER_H)
endif
#---------------- Assembler Options ---------------- #---------------- Assembler Options ----------------
@ -192,6 +198,9 @@ ASFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
ifdef CONFIG_H ifdef CONFIG_H
ASFLAGS += -include $(CONFIG_H) ASFLAGS += -include $(CONFIG_H)
endif endif
ifdef CONFIG_USER_H
ASFLAGS += -include $(CONFIG_USER_H)
endif
#---------------- Library Options ---------------- #---------------- Library Options ----------------
@ -419,7 +428,7 @@ flip: $(TARGET).hex
batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program
batchisp -hardware usb -device $(MCU) -operation start reset 0 batchisp -hardware usb -device $(MCU) -operation start reset 0
dfu: $(TARGET).hex dfu: $(TARGET).hex sizeafter
ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1))) ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1)))
dfu-programmer $(MCU) erase --force dfu-programmer $(MCU) erase --force
else else

Loading…
Cancel
Save