1
0
Fork 0
This commit is contained in:
Christopher Browne 2016-05-24 12:34:08 -04:00
commit 48871b9b6b
178 changed files with 8261 additions and 3042 deletions

View file

@ -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

View file

@ -51,11 +51,11 @@ A problem arises when you start pressing more than one key at a time. Looking at
x row0 ---(-+-0)---(-+-1) x row0 ---(-+-0)---(-+-1) x row0 ---(-+-0)---(-+-1) x row0 ---(-+-0)---(-+-1)
| | | | | | | |
x row1 ---(key2)---(-+-3) x row1 ---(key2)---(-+-3) x row1 ---(key2)---(-+-3) x row1 ---(key2)---(-+-3)
Remember that this ^ is still connected to row1 Remember that this ^ is still connected to row1
The data we get from that is: The data we get from that is:
col0: 0b11 col0: 0b11
col1: 0b11 col1: 0b11
│└row0 │└row0
@ -73,7 +73,7 @@ Which isn't accurate, since we only have 3 keys pressed down, not all 4. This be
│ │ | │ │ │ | │
(key2) (key3) (key2) (key3) (key2) (key3) (key2) (key3)
! ! ! ! ! ! ! !
row1 ─────┴────────┘ row1 ─────┴────────┘ row1 ─────┴────────┘ row1 ─────┴────────┘
In practical applications, the black line of the diode will be placed facing the row, and away from the keyswitch - the `!` in this case is the diode, where the gap represents the black line. A good way to remember this is to think of this symbol: `>|` In practical applications, the black line of the diode will be placed facing the row, and away from the keyswitch - the `!` in this case is the diode, where the gap represents the black line. A good way to remember this is to think of this symbol: `>|`
@ -89,10 +89,10 @@ Now when we press the three keys, invoking what would be a ghosting scenario:
│ │ │ │ │ │ │ │
(key2) (┌─┘3) (key2) (┌─┘3) (key2) (┌─┘3) (key2) (┌─┘3)
! ! ! ! ! ! ! !
row1 ─────┴────────┘ x row1 ─────┴────────┘ row1 ─────┴────────┘ x row1 ─────┴────────┘
Things act as they should! Which will get us the following data: Things act as they should! Which will get us the following data:
col0: 0b01 col0: 0b01
col1: 0b11 col1: 0b11
│└row0 │└row0
@ -106,7 +106,7 @@ The firmware can then use this correct data to detect what it should do, and eve
When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards. When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards.
To make things easier on yourself, make sure all of the keyswitches are oriented the same way (if they can be - not all layouts support this). Despite this, it's important to remember that the contacts on the keyswitches are completely symmetrical. We'll be using the keyswitch's left side contact for wiring the rows, and the right side one for wiring the columns. To make things easier on yourself, make sure all of the keyswitches are oriented the same way (if they can be - not all layouts support this). Despite this, it's important to remember that the contacts on the keyswitches are completely symmetrical. We'll be using the keyswitch's left side contact for wiring the rows, and the right side one for wiring the columns.
Get your soldering iron heated-up and collect the rest of the materials from the part list at the beginning of the guide. Place your keyboard so that the bottoms of the keyswitches are accessible - it may be a good idea to place it on a cloth to protect your keyswitches/keycaps. Get your soldering iron heated-up and collect the rest of the materials from the part list at the beginning of the guide. Place your keyboard so that the bottoms of the keyswitches are accessible - it may be a good idea to place it on a cloth to protect your keyswitches/keycaps.
@ -155,7 +155,7 @@ When all of the diodes are completely soldered, it's a good idea to quickly insp
### Soldering the columns ### Soldering the columns
You'll have some options in the next process - it's a good idea to insulate the column wires (since the diodes aren't), but if you're careful enough, you can use exposed wires for the columns - it's not recommended, though. If you're using single-cored wire, stripping the plastic off of the whole wire and feeding it back on is probably the best option, but can be difficult depending on the size and materials. You'll want to leave parts of the wire exposed where you're going to be solder it onto the keyswitch. You'll have some options in the next process - it's a good idea to insulate the column wires (since the diodes aren't), but if you're careful enough, you can use exposed wires for the columns - it's not recommended, though. If you're using single-cored wire, stripping the plastic off of the whole wire and feeding it back on is probably the best option, but can be difficult depending on the size and materials. You'll want to leave parts of the wire exposed where you're going to be solder it onto the keyswitch.
If you're using stranded wire, it's probably easiest to just use a lot of small wires to connect each keyswitch along the column. It's possible to use one and melt through the insulation, but this isn't recommended, will produce even more harmful fumes, and can ruin your soldering iron. If you're using stranded wire, it's probably easiest to just use a lot of small wires to connect each keyswitch along the column. It's possible to use one and melt through the insulation, but this isn't recommended, will produce even more harmful fumes, and can ruin your soldering iron.
@ -195,15 +195,13 @@ You'll want to navigate to the `keyboard/<project_name>/` folder by typing, like
#### config.h #### config.h
The first thing we're going to want to modify is the `config.h` file. On line 32 and 33, you'll see `MATRIX_ROWS` and `MATRIX_COLS` - set both these variables to however many rows and columns you have on your keyboard. The first thing you're going to want to modify is the `config.h` file. Find `MATRIX_ROWS` and `MATRIX_COLS` and them to match the dimensions of your keyboard's matrix.
On line 38 and 39 you'll see the `COLS` and `ROWS` definitions - this is where you'll enter the pins you used, in order (left-to-right when looking at the top of the keyboard, but right-to-left when looking at the bottom). Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitions to match how you wired up your matrix (looking from the top of the keyboard, the rows run top-to-bottom and the columns run left-to-right). Likewise, change the definition of `UNUSED_PINS` to match the pins you did not use (this will save power).
There are some other variables that you'll be able to modify (lines 23-29), but it's not necessary to do that now (or ever, really).
#### \<project_name\>.h #### \<project_name\>.h
The next file you'll want to look at is `<project_name>.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix. The next file you'll want to look at is `<project_name>.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix.
We'll dive into how this will work with the following example. Say we have a keyboard like this: We'll dive into how this will work with the following example. Say we have a keyboard like this:
@ -230,7 +228,7 @@ The middle column is unused on the bottom row in this example. Our `KEYMAP` defi
{ \ { \
{ k00, k01, k02 }, \ { k00, k01, k02 }, \
{ k10, KC_NO, k11 }, \ { k10, KC_NO, k11 }, \
} }
Notice how the top half is spaced to resemble our physical layout - this helps us understand which keys are associated with which columns. The bottom half uses the keycode `KC_NO` where there is no keyswitch wired in. It's easiest to keep the bottom half aligned in a grid to help us make sense of how the firmware actually sees the wiring. Notice how the top half is spaced to resemble our physical layout - this helps us understand which keys are associated with which columns. The bottom half uses the keycode `KC_NO` where there is no keyswitch wired in. It's easiest to keep the bottom half aligned in a grid to help us make sense of how the firmware actually sees the wiring.
@ -251,7 +249,7 @@ This would require our `KEYMAP` definition to look like this:
{ \ { \
{ k00, k01, k02 }, \ { k00, k01, k02 }, \
{ k10, k11, KC_NO }, \ { k10, k11, KC_NO }, \
} }
Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it. Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.

View file

@ -2,11 +2,11 @@
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).
The OLKB product firmwares are maintained by Jack, the Ergodox EZ by Erez, and the Clueboard by [skullydazed](/skullydazed). The OLKB product firmwares are maintained by Jack, the Ergodox EZ by Erez, and the Clueboard by [Zach White](https://github.com/skullydazed).
## Important background info: TMK documentation ## Important background info: TMK documentation
@ -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.

View file

@ -35,8 +35,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Planck PCB default pin-out // Planck PCB default pin-out
// 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
#define COLS (int []){ B0, B1, B2, B3, B7, D0, B6, F7, F6, F5, F4, F1 } #define MATRIX_ROW_PINS { F0, D6, D4, D5 }
#define ROWS (int []){ F0, D6, D4, D5 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, B6, F7, F6, F5, F4, F1 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
@ -48,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -171,10 +171,6 @@ endif
endif endif
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
SRC := backlight.c $(SRC)
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

View file

@ -2,27 +2,28 @@
__attribute__ ((weak)) __attribute__ ((weak))
void matrix_init_user(void) { void matrix_init_user(void) {
// leave this function blank - it can be defined in a keymap file // leave this function blank - it can be defined in a keymap file
}; };
__attribute__ ((weak)) __attribute__ ((weak))
void matrix_scan_user(void) { void matrix_scan_user(void) {
// leave this function blank - it can be defined in a keymap file // leave this function blank - it can be defined in a keymap file
} }
__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))
void led_set_user(uint8_t usb_led) { void led_set_user(uint8_t usb_led) {
// leave this function blank - it can be defined in a keymap file // leave this function blank - it can be defined in a keymap file
} }
void matrix_init_kb(void) { void matrix_init_kb(void) {
// put your keyboard start-up code here // put your keyboard start-up code here
// runs once when the firmware starts up // runs once when the firmware starts up
MCUCR |= (1<<JTD); MCUCR |= (1<<JTD);
MCUCR |= (1<<JTD); MCUCR |= (1<<JTD);
@ -35,25 +36,290 @@ void matrix_init_kb(void) {
DDRE |= (1<<6); DDRE |= (1<<6);
PORTE |= (1<<6); PORTE |= (1<<6);
matrix_init_user(); matrix_init_user();
} }
void matrix_scan_kb(void) { void matrix_scan_kb(void) {
// put your looping keyboard code here // put your looping keyboard code here
// runs every cycle (a lot) // runs every cycle (a lot)
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) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led); led_set_user(usb_led);
} }
#ifdef BACKLIGHT_ENABLE
#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()
{
// Setup PB7 as output and output low.
DDRB |= (1<<7);
PORTB &= ~(1<<7);
// Use full 16-bit resolution.
ICR1 = 0xFFFF;
// I could write a wall of text here to explain... but TL;DW
// Go read the ATmega32u4 datasheet.
// And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
// Pin PB7 = OCR1C (Timer 1, Channel C)
// Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
// (i.e. start high, go low when counter matches.)
// WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
// Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
TCCR1A = _BV(COM1C1) | _BV(WGM11); // = 0b00001010;
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
backlight_init();
breathing_defaults();
}
void backlight_set(uint8_t level)
{
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
if ( level == 0 )
{
// Turn off PWM control on PB7, revert to output low.
TCCR1A &= ~(_BV(COM1C1));
// Set the brightness to 0
CHANNEL = 0x0;
}
else if ( level >= BACKLIGHT_LEVELS )
{
// Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1);
// Set the brightness to max
CHANNEL = 0xFFFF;
}
else
{
// Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1);
// Set the brightness
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

View file

@ -1,10 +1,9 @@
#ifndef ATOMIC_H #ifndef ATOMIC_H
#define ATOMIC_H #define ATOMIC_H
#include "matrix.h" #include "quantum.h"
#include "keymap_common.h"
#include "backlight.h"
#include <stddef.h> #include <stddef.h>
#include <avr/io.h>
// This a shortcut to help you visually see your layout. // This a shortcut to help you visually see your layout.
// The following is an example using the Planck MIT layout // The following is an example using the Planck MIT layout
@ -26,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

View file

@ -1,63 +0,0 @@
#include <avr/io.h>
#include "backlight.h"
#include "atomic.h"
#define CHANNEL OCR1C
void backlight_init_ports()
{
// Setup PB7 as output and output low.
DDRB |= (1<<7);
PORTB &= ~(1<<7);
// Use full 16-bit resolution.
ICR1 = 0xFFFF;
// I could write a wall of text here to explain... but TL;DW
// Go read the ATmega32u4 datasheet.
// And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
// Pin PB7 = OCR1C (Timer 1, Channel C)
// Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
// (i.e. start high, go low when counter matches.)
// WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
// Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
TCCR1A = _BV(COM1C1) | _BV(WGM11); // = 0b00001010;
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
backlight_init();
}
void backlight_set(uint8_t level)
{
if ( level == 0 )
{
// Turn off PWM control on PB7, revert to output low.
TCCR1A &= ~(_BV(COM1C1));
CHANNEL = 0x0;
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
}
else if ( level == BACKLIGHT_LEVELS )
{
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
// Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1);
// Set the brightness
CHANNEL = 0xFFFF;
}
else
{
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
// Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1);
// Set the brightness
CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
}
}

View file

@ -41,15 +41,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
* *
*/ */
#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 } #define MATRIX_ROW_PINS { D0, D5, B5, B6, C6 }
#define ROWS (int []){ D0, D5, B5, B6, C6 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5 #define DEBOUNCING_DELAY 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
@ -62,17 +63,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
/* /*
* Force NKRO * Force NKRO
* *
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
* makefile for this to work.) * makefile for this to work.)
* *
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
* until the next keyboard reset. * until the next keyboard reset.
* *
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
* fully operational during normal computer usage. * fully operational during normal computer usage.
* *
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
@ -90,7 +91,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* the keyboard. They are best used in combination with the HID Listen program, * the keyboard. They are best used in combination with the HID Listen program,
* found here: https://www.pjrc.com/teensy/hid_listen.html * found here: https://www.pjrc.com/teensy/hid_listen.html
* *
* The options below allow the magic key functionality to be changed. This is * The options below allow the magic key functionality to be changed. This is
* useful if your keyboard/keypad is missing keys and you want magic key support. * useful if your keyboard/keypad is missing keys and you want magic key support.
* *
*/ */

View file

@ -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
@ -42,14 +42,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
* *
*/ */
#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 } #define MATRIX_ROW_PINS { D0, D5, B5, B6, B3 }
#define ROWS (int []){ D0, D5, B5, B6, B3 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5 #define DEBOUNCING_DELAY 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
@ -158,4 +159,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

View file

@ -8,42 +8,44 @@
#include "song_list.h" #include "song_list.h"
#endif #endif
#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
#define MACRO_TIMBRE_2 8 #define MACRO_TIMBRE_2 8
#define MACRO_TIMBRE_3 9 #define MACRO_TIMBRE_3 9
#define MACRO_TIMBRE_4 10 #define MACRO_TIMBRE_4 10
#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_INC_VOICE 18
#define MACRO_AUDIO_OFF 17 #define MACRO_DEC_VOICE 19
#define MACRO_INC_VOICE 18 #define MACRO_BACKLIGHT 20
#define MACRO_DEC_VOICE 19 #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,13 @@
#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 MUS_OFF M(MACRO_MUSIC_OFF)
#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 +77,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 +96,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 +118,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 +140,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 +206,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 +216,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 +248,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 +266,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,13 +276,41 @@ 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)
{ {
persistant_default_layer_set(1UL<<LAYER_QWERTY); persistant_default_layer_set(1UL<<LAYER_QWERTY);
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, STACCATO); PLAY_NOTE_ARRAY(tone_qwerty, false, STACCATO);
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */
} }
break; break;
@ -265,9 +318,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
if (record->event.pressed) if (record->event.pressed)
{ {
persistant_default_layer_set(1UL<<LAYER_COLEMAK); persistant_default_layer_set(1UL<<LAYER_COLEMAK);
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, STACCATO); PLAY_NOTE_ARRAY(tone_colemak, false, STACCATO);
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */
} }
break; break;
@ -275,9 +328,24 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
if (record->event.pressed) if (record->event.pressed)
{ {
persistant_default_layer_set(1UL<<LAYER_DVORAK); persistant_default_layer_set(1UL<<LAYER_DVORAK);
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, STACCATO); PLAY_NOTE_ARRAY(tone_dvorak, false, STACCATO);
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */
}
break;
case MACRO_UPPER:
if (record->event.pressed)
{
layer_on(LAYER_UPPER);
breathing_speed_set(2);
breathing_pulse();
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
}
else
{
layer_off(LAYER_UPPER);
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
} }
break; break;
@ -285,35 +353,28 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
if (record->event.pressed) if (record->event.pressed)
{ {
layer_on(LAYER_LOWER); 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_LOWER); layer_off(LAYER_LOWER);
update_tri_layer(LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
}
break;
case MACRO_RAISE:
if (record->event.pressed)
{
layer_on(LAYER_RAISE);
update_tri_layer(LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST);
}
else
{
layer_off(LAYER_RAISE);
update_tri_layer(LAYER_LOWER, LAYER_RAISE, 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 +424,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(); {
#endif audio_off();
}
else
{
audio_on();
PLAY_NOTE_ARRAY(tone_audio_on, false, STACCATO);
}
} }
break; break;
case MACRO_AUDIO_ON: case MACRO_MUSIC_TOGGLE:
if (record->event.pressed) if (record->event.pressed)
{ {
#ifdef AUDIO_ENABLE if (IS_LAYER_ON(LAYER_MUSIC))
audio_on(); {
PLAY_NOTE_ARRAY(tone_audio_on, false, STACCATO); layer_off(LAYER_MUSIC);
#endif stop_all_notes();
} }
break; else
{
case MACRO_MUSIC_ON:
if (record->event.pressed)
{
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_music_on, false, STACCATO); PLAY_NOTE_ARRAY(tone_music_on, false, STACCATO);
layer_on(LAYER_MUSIC); layer_on(LAYER_MUSIC);
#endif }
} }
break; break;
case MACRO_MUSIC_OFF:
if (record->event.pressed)
{
#ifdef AUDIO_ENABLE
layer_off(LAYER_MUSIC);
stop_all_notes();
#endif
}
break;
case MACRO_INC_VOICE: case MACRO_INC_VOICE:
if (record->event.pressed) if (record->event.pressed)
{ {
@ -421,9 +474,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,31 +496,10 @@ 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)
{
uint8_t starting_note = 0x0C;
int offset = 7;
if (IS_LAYER_ON(LAYER_MUSIC))
{
if (record->event.pressed)
{
play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF);
}
else
{
stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)));
}
}
}
void matrix_init_user(void) void matrix_init_user(void)
{ {
set_voice(default_voice); set_voice(default_voice);
play_startup_tone(); startup_user();
println("Matrix Init"); println("Matrix Init");
} }
@ -468,50 +509,70 @@ void led_set_user(uint8_t usb_led)
_delay_ms(10); // gets rid of tick _delay_ms(10); // gets rid of tick
if ((usb_led & (1<<USB_LED_CAPS_LOCK)) && !(old_usb_led & (1<<USB_LED_CAPS_LOCK))) if (!is_playing_notes())
{ {
// If CAPS LK LED is turning on... if ((usb_led & (1<<USB_LED_CAPS_LOCK)) && !(old_usb_led & (1<<USB_LED_CAPS_LOCK)))
PLAY_NOTE_ARRAY(tone_caps_on, false, LEGATO); {
} // If CAPS LK LED is turning on...
else if (!(usb_led & (1<<USB_LED_CAPS_LOCK)) && (old_usb_led & (1<<USB_LED_CAPS_LOCK))) PLAY_NOTE_ARRAY(tone_caps_on, false, LEGATO);
{ }
// If CAPS LK LED is turning off... else if (!(usb_led & (1<<USB_LED_CAPS_LOCK)) && (old_usb_led & (1<<USB_LED_CAPS_LOCK)))
PLAY_NOTE_ARRAY(tone_caps_off, false, LEGATO); {
} // If CAPS LK LED is turning off...
else if ((usb_led & (1<<USB_LED_NUM_LOCK)) && !(old_usb_led & (1<<USB_LED_NUM_LOCK))) PLAY_NOTE_ARRAY(tone_caps_off, false, LEGATO);
{ }
// If NUM LK LED is turning on... else if ((usb_led & (1<<USB_LED_NUM_LOCK)) && !(old_usb_led & (1<<USB_LED_NUM_LOCK)))
PLAY_NOTE_ARRAY(tone_numlk_on, false, LEGATO); {
} // If NUM LK LED is turning on...
else if (!(usb_led & (1<<USB_LED_NUM_LOCK)) && (old_usb_led & (1<<USB_LED_NUM_LOCK))) PLAY_NOTE_ARRAY(tone_numlk_on, false, LEGATO);
{ }
// If NUM LED is turning off... else if (!(usb_led & (1<<USB_LED_NUM_LOCK)) && (old_usb_led & (1<<USB_LED_NUM_LOCK)))
PLAY_NOTE_ARRAY(tone_numlk_off, false, LEGATO); {
} // If NUM LED is turning off...
else if ((usb_led & (1<<USB_LED_SCROLL_LOCK)) && !(old_usb_led & (1<<USB_LED_SCROLL_LOCK))) PLAY_NOTE_ARRAY(tone_numlk_off, false, LEGATO);
{ }
// If SCROLL LK LED is turning on... else if ((usb_led & (1<<USB_LED_SCROLL_LOCK)) && !(old_usb_led & (1<<USB_LED_SCROLL_LOCK)))
PLAY_NOTE_ARRAY(tone_scroll_on, false, LEGATO); {
} // If SCROLL LK LED is turning on...
else if (!(usb_led & (1<<USB_LED_SCROLL_LOCK)) && (old_usb_led & (1<<USB_LED_SCROLL_LOCK))) PLAY_NOTE_ARRAY(tone_scroll_on, false, LEGATO);
{ }
// If SCROLL LED is turning off... else if (!(usb_led & (1<<USB_LED_SCROLL_LOCK)) && (old_usb_led & (1<<USB_LED_SCROLL_LOCK)))
PLAY_NOTE_ARRAY(tone_scroll_off, false, LEGATO); {
// If SCROLL LED is turning off...
PLAY_NOTE_ARRAY(tone_scroll_off, false, LEGATO);
}
} }
old_usb_led = usb_led; old_usb_led = usb_led;
} }
void play_startup_tone() void startup_user()
{ {
_delay_ms(10); // gets rid of tick _delay_ms(10); // gets rid of tick
PLAY_NOTE_ARRAY(tone_my_startup, false, STACCATO); PLAY_NOTE_ARRAY(tone_my_startup, false, STACCATO);
} }
void play_goodbye_tone() void shutdown_user()
{ {
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 audio_on_user(void)
{
PLAY_NOTE_ARRAY(tone_audio_on, false, STACCATO);
}
void music_on_user(void)
{
PLAY_NOTE_ARRAY(tone_music_on, false, STACCATO);
}
void music_scale_user(void)
{
PLAY_NOTE_ARRAY(music_scale, false, STACCATO);
} }
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */

View file

@ -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

View file

@ -36,11 +36,13 @@ 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 MATRIX_ROW_PINS { D0, D1, D3, D2 }
#define ROWS (int []){ D0, D1, D3, D2 } # define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 }
# define UNUSED_PINS
#elif defined(ATREUS_TEENSY2) #elif defined(ATREUS_TEENSY2)
#define COLS (int []){ F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0} # define MATRIX_ROW_PINS { D0, D1, D2, D3 }
#define ROWS (int []){ D0, D1, D2, D3 } # define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 }
# define UNUSED_PINS
#endif #endif
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
@ -53,7 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -114,15 +114,16 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
# comment out to disable the options. # comment out to disable the options.
# #
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = no # 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 = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
# RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality AUDIO_ENABLE = no
# MIDI_ENABLE = YES # MIDI controls RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality
# UNICODE_ENABLE = YES # Unicode MIDI_ENABLE = no # MIDI controls
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
# Optimize size but this may cause error "relocation truncated to fit" # Optimize size but this may cause error "relocation truncated to fit"

View file

@ -32,19 +32,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 5 #define MATRIX_ROWS 5
#define MATRIX_COLS 16 #define MATRIX_COLS 16
// COLS: Left to right, ROWS: Top to bottom // ROWS: Top to bottom, COLS: Left to right
/* Column pin configuration /* Column pin configuration
* col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
* pin: B3 F1 F4 F5 F6 C7 C6 B6 B5 B4 D7 D6 D4 F7 B0 B1 * pin: B3 F1 F4 F5 F6 C7 C6 B6 B5 B4 D7 D6 D4 F7 B0 B1
*/ */
#define COLS (int []){ B3, F1, F4, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, F7, B0, B1 } #define MATRIX_COL_PINS { B3, F1, F4, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, F7, B0, B1 }
/* Row pin configuration
/* Row pin configuration * row: 0 1 2 3 4
* row: 0 1 2 3 4 * pin: D1 D0 D2 D5 D3
* pin: D1 D0 D2 D5 D3 */
*/ #define MATRIX_ROW_PINS { D1, D0, D2, D5, D3 }
#define ROWS (int []){ D1, D0, D2, D5, D3 } #define UNUSED_PINS
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
@ -53,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -114,16 +114,17 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
# comment out to disable the options. # comment out to disable the options.
# #
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = no # 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 = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870)
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150)
# MIDI_ENABLE = YES # MIDI controls MIDI_ENABLE = no # MIDI controls
# UNICODE_ENABLE = YES # Unicode AUDIO_ENABLE = no
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
#ifdef BACKLIGHT_ENABLE #ifdef BACKLIGHT_ENABLE
SRC := backlight.c $(SRC) SRC := backlight.c $(SRC)

View file

@ -32,19 +32,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 10 #define MATRIX_ROWS 10
#define MATRIX_COLS 8 #define MATRIX_COLS 8
// COLS: Left to right, ROWS: Top to bottom // ROWS: Top to bottom, COLS: Left to right
/* Row pin configuration
* row: 0 1 2 3 4 5 6 7 8 9
* pin: B2 C7 C6 B6 B5 B0 B3 D5 D3 D2
*/
#define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 }
/* Column pin configuration /* Column pin configuration
* col: 0 1 2 3 4 5 6 7 * col: 0 1 2 3 4 5 6 7
* pin: F0 F1 F4 F5 F6 F7 E6 B1 * pin: F0 F1 F4 F5 F6 F7 E6 B1
*/ */
#define COLS (int []){ F0, F1, F4, F5, F6, F7, E6, B1 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 }
#define UNUSED_PINS
/* Row pin configuration
* row: 0 1 2 3 4 5 6 7 8 9
* pin: B2 C7 C6 B6 B5 B0 B3 D5 D3 D2
*/
#define ROWS (int []){ B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 }
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
@ -53,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -115,9 +115,9 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
# #
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 = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration # COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable numpad's backlight functionality BACKLIGHT_ENABLE = yes # Enable numpad's backlight functionality
RGBLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes

View file

@ -32,19 +32,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 5 #define MATRIX_ROWS 5
#define MATRIX_COLS 4 #define MATRIX_COLS 4
// COLS: Left to right, ROWS: Top to bottom // ROWS: Top to bottom, COLS: Left to right
/* Row pin configuration
* row: 0 1 2 3 4
* pin:
*/
#define MATRIX_ROW_PINS { B0, D3, D5, D4, D6 }
/* Column pin configuration /* Column pin configuration
* col: 0 1 2 3 * col: 0 1 2 3
* pin: F4 E6 B1 D2 * pin: F4 E6 B1 D2
*/ */
#define COLS (int []){ F4, E6, B1, D2 } #define MATRIX_COL_PINS { F4, E6, B1, D2 }
#define UNUSED_PINS
/* Row pin configuration
* row: 0 1 2 3 4
* pin:
*/
#define ROWS (int []){ B0, D3, D5, D4, D6 }
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
@ -53,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCING_DELAY 5
/* Number of backlighting levels */ /* Number of backlighting levels */
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3

View file

@ -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

Binary file not shown.

View file

@ -0,0 +1,385 @@
[
{
"name": "Beginner's Keymap for Ergodox-EZ",
"author": "Anand Babu Periasamy"
},
[
{
"x": 3.5
},
"#\n3\n\n\nF3",
{
"x": 10.5
},
")\n0\n\n\nF10"
],
[
{
"y": -0.875,
"x": 2.5
},
"@\n2\n\n\nF2",
{
"x": 1
},
"$\n4\n\n\nF4",
{
"x": 8.5
},
"(\n9\n\n\nF9",
{
"x": 1
},
"_\n-\n\n\nF11"
],
[
{
"y": -0.875,
"x": 5.5
},
"%\n5\n\n\nF5",
"^\n6\n\n\nF6",
{
"x": 4.5
},
"&\n7\n\n\nF7",
"*\n8\n\n\nF8"
],
[
{
"y": -0.875,
"w": 1.5
},
"~\n`\n\n\nEsc",
"!\n1\n\n\nF1",
{
"x": 14.5
},
"+\n=\n\n\nF12",
{
"a": 7,
"w": 1.5
},
"Backspace\n\n\n\nBackspace"
],
[
{
"y": -0.375,
"x": 3.5
},
"E\n\n\n\n<i class=\"fa fa-caret-up\" aria-hidden=\"true\"></i>",
{
"x": 10.5
},
"I"
],
[
{
"y": -0.8799999999999999,
"x": 2.5
},
"W"
],
[
{
"y": -0.9950000000000001,
"x": 4.5,
"a": 4
},
"R",
{
"x": 8.5,
"a": 7
},
"U",
{
"x": 1
},
"O"
],
[
{
"y": -0.875,
"x": 5.5
},
"T",
{
"h": 1.5
},
"<i class=\"fa fa-chevron-circle-left\" aria-hidden=\"true\"></i>",
{
"x": 4.5,
"h": 1.5
},
"<i class=\"fa fa-chevron-circle-right\" aria-hidden=\"true\"></i>",
"Y"
],
[
{
"y": -0.875,
"a": 6,
"w": 1.5
},
"Tab",
{
"a": 7
},
"Q",
{
"x": 14.5
},
"P",
{
"a": 4,
"w": 1.5
},
"|\n\\"
],
[
{
"y": -0.375,
"x": 3.5,
"a": 7
},
"D\n\n\n\n<i class=\"fa fa-caret-down\" aria-hidden=\"true\"></i>",
{
"x": 10.5
},
"K"
],
[
{
"y": -0.875,
"x": 2.5
},
"S\n\n\n\n<i class=\"fa fa-caret-left\" aria-hidden=\"true\"></i>",
{
"x": 1
},
"F\n\n\n\n<i class=\"fa fa-caret-right\" aria-hidden=\"true\"></i>",
{
"x": 8.5
},
"J",
{
"x": 1
},
"L"
],
[
{
"y": -0.875,
"x": 5.5
},
"G",
{
"x": 6.5
},
"H"
],
[
{
"y": -0.875,
"a": 4,
"fa": [
0,
0,
0,
2
],
"w": 1.5
},
"\n\n\nCtrl\n\n\nCaps",
{
"a": 7
},
"A",
{
"x": 14.5,
"a": 4
},
":\n;",
{
"a": 7,
"w": 1.5
},
"Enter"
],
[
{
"y": -0.625,
"x": 6.5,
"h": 1.5
},
"PgUp",
{
"x": 4.5,
"h": 1.5
},
"PgDn"
],
[
{
"y": -0.75,
"x": 3.5
},
"C",
{
"x": 10.5,
"a": 4
},
"<\n,"
],
[
{
"y": -0.875,
"x": 2.5,
"a": 7
},
"X",
{
"x": 1
},
"V",
{
"x": 8.5
},
"M",
{
"x": 1,
"a": 4
},
">\n."
],
[
{
"y": -0.875,
"x": 5.5,
"a": 7
},
"B",
{
"x": 6.5
},
"N"
],
[
{
"y": -0.875,
"w": 1.5
},
"Shift",
"Z",
{
"x": 14.5,
"a": 4
},
"?\n/",
{
"w": 1.5
},
"\"\n'"
],
[
{
"y": -0.375,
"x": 3.5,
"a": 7
},
"Alt\n\n\n\n<i class=\"fa fa-hand-o-left\" aria-hidden=\"true\"></i>",
{
"x": 10.5
},
"<i class=\"fa fa-long-arrow-down\" aria-hidden=\"true\"></i>\n\n\n\n<i class='fa fa-volume-down'></i>"
],
[
{
"y": -0.875,
"x": 2.5
},
"<i class='fa fa-linux'></i>",
{
"x": 1
},
"Alt\n\n\n\n<i class=\"fa fa-hand-o-right\" aria-hidden=\"true\"></i>",
{
"x": 8.5
},
"<i class=\"fa fa-long-arrow-left\" aria-hidden=\"true\"></i>",
{
"x": 1
},
"<i class=\"fa fa-long-arrow-up\" aria-hidden=\"true\"></i>\n\n\n\n<i class='fa fa-volume-up'></i>"
],
[
{
"y": -0.75,
"x": 0.5
},
"Ctrl\n\n\n\n<i class='fa fa-download'></i>",
"Esc",
{
"x": 14.5
},
"<i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"></i>\n\n\n\n<i class='fa fa-volume-off'></i>",
"Fn"
],
[
{
"r": 30,
"rx": 6.5,
"ry": 4.25,
"y": -1,
"x": 1
},
"<i class=\"fa fa-clone\" aria-hidden=\"true\"></i>",
"("
],
[
{
"h": 2
},
"Space",
{
"h": 2
},
"Del",
"["
],
[
{
"x": 2
},
"{"
],
[
{
"r": -30,
"rx": 13,
"y": -1,
"x": -3
},
")",
"<i class=\"fa fa-paste\" aria-hidden=\"true\"></i>"
],
[
{
"x": -3
},
"]",
{
"h": 2
},
"Enter",
{
"h": 2
},
"<i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i>"
],
[
{
"x": -3
},
"}"
]
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View file

@ -0,0 +1,140 @@
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define FN1 1 // media layer
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BSpace |
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | Fwd | | Back | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* |Caps/Ctl| A | S | D | F | G |------| |------| H | J | K | L | ; | Enter |
* |--------+------+------+------+------+------| PgUp | | PgDn |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | ' |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | Ctrl | Esc | LGui | Alt | Alt | | Left | Up | Dn | Right| Fn |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Copy | ( | | ) | Paste|
* ,------|------+------| |------+------+------.
* | | | [ | | ] | | |
* |Space | Del |------| |------| Enter|BSpace|
* | | | { | | } | | |
* `--------------------' `--------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default
// left hand
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_WBAK,
CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP,
KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, KC_LALT,
LCTL(KC_C), KC_LCBR,
KC_LPRN,
KC_SPC, KC_DEL, KC_LBRC,
// right hand
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_WFWD, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
KC_UP, KC_LEFT, KC_RIGHT,KC_DOWN, TG(FN1),
KC_RCBR, LCTL(KC_V),
KC_RPRN,
KC_RBRC, KC_ENT, KC_BSPC
),
/* Keymap 1: Fn Keys, media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | BSpace |
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Teensy| | | Lclk | Rclk | | |VolUp |VolDn | Mute | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------+------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// FN1 Layer
[FN1] = KEYMAP(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
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,
RESET, KC_TRNS, KC_TRNS,
// right hand
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, 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_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, 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);
} 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;
}
};

View file

@ -0,0 +1,21 @@
# Beginner's keymap for Ergodox-EZ
Beginner's keymap emulates standard QWERTY keyboard for beginners. Once you get comfortable with the Ergodox-EZ, you may fork this keymap and customize it for your own needs or find a suitable one from the community contributed keymaps.
![Beginner's Keymap](keyboard-layout.png)
#### Pros
* Easier to switch between regular keyboards and Ergodox-EZ.
* Easy on beginners. It has everything you need for your day to day usage.
#### Cons
* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/jackhumbert/qmk_firmware/blob/master/keyboard/ergodox_ez/keymaps/default/readme.md)
* While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys.
#### Notes
* Ideally number key [6] should have started from the right-hand side of the keyboard. Doing so breaks the familiar QWERTY layout.
* Quote key ['] should have been placed between [:] and [Enter]. Due to lack of key space, it is placed below [Enter].
* Double [Alt] keys are placed adjacent to each other for convenience.
* [CapsLock] also acts as [Ctrl] key when you press and hold. It is convenient for GNU Emacs users.
* Additional bracket keys are placed in the center of the keyboard for programmer's convenience.

Binary file not shown.

View file

@ -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;
}
};

View file

@ -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

View file

@ -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,

View file

@ -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

View file

@ -20,9 +20,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | A | S | D | F | G |------| |------| H | Alt/J| K | L |; / L2| LGui/' | * | BkSp | A | S | D | F | G |------| |------| H | Alt/J| K | L |; / L2| LGui/' |
* |--------+------+------+------+------+------| 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 | [ | ] | ~L1 | * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | -/L1 |
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | App | LGui | | Alt |Ctrl/Esc| * | App | LGui | | Alt |Ctrl/Esc|
@ -39,18 +39,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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(SYMB), 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,
LSFTO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LSFTO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_LBRC),
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,
ALT_T(KC_APP), KC_LGUI, ALT_T(KC_APP), KC_LGUI,
KC_HOME, KC_HOME,
KC_SPC,KC_FN1,KC_END, KC_SPC,KC_FN1,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(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_NO),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_FN1, 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,33 +150,46 @@ 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 else {
unregister_code(KC_9); // now let's let go of that key record->tap.count = 0;
} }
unregister_code(KC_LSFT); // let's release the Shift key now. }
} else {
break; if (record->tap.count) {
unregister_code(KC_9);
}
else {
}
unregister_mods(MOD_BIT(KC_LSFT));
}
break;
case 1:
if (record->event.pressed) {
register_mods(MOD_BIT(KC_LSFT));
if (record->tap.count && !record->tap.interrupted) {
register_code(KC_0);
}
else {
record->tap.count = 0;
}
}
else {
if (record->tap.count) {
unregister_code(KC_0);
}
else {
}
unregister_mods(MOD_BIT(KC_LSFT));
}
break;
} }
case 1: {
if (record->event.pressed) {
key_timer = timer_read(); // Now we're doing the same thing, only for the right shift/close paren key
register_code(KC_RSFT);
} else {
if (timer_elapsed(key_timer) < 70) {
register_code(KC_0);
unregister_code(KC_0);
}
unregister_code(KC_RSFT);
}
break;
}
}
return MACRO_NONE; return MACRO_NONE;
}; };

View file

@ -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

View file

@ -4,6 +4,23 @@ 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:
* Tweaks the Hyper and Meh key to send brackets when tapped
* Turns bottom-right key into a minus/underscore (easy to reach with the right pinky)
## Apr 25, 2016:
* Made it so that the right and left Shift keys send opening and closing parens ( ) when tapped
## Feb 11, 2016: ## Feb 11, 2016:
* Updated ASCII legend for thumb clusters * Updated ASCII legend for thumb clusters

View file

@ -4,434 +4,421 @@
#include "action_layer.h" #include "action_layer.h"
#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 |
* `-----------------------------------' `-----------------------------------' * `-----------------------------------' `-----------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | Home | End | | Left | Right| * | Home | End | | Left | Right|
* ,------|------|------| |------+------+------. * ,------|------|------| |------+------+------.
* | | | PgUp | | Up | | | * | | | PgUp | | Up | | |
* |Backsp| Del |------| |------| Enter| Space| * |Backsp| Del |------| |------| Enter| Space|
* | | | PgDn | | Down | | | * | | | PgDn | | Down | | |
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
[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
,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RSpec)
// right hand ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,F(RMdia)
,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,LT(LOCK, KC_EQL) ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,F(RSymb)
,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,LT(MDIA_SH, KC_BSLS) ,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,M(RCaps)
,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,LT(SYMB_SH, KC_QUOT) ,KC_RGUI,KC_RALT,KC_HYPR ,KC_MEH ,KC_RCTL
,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,KC_RSFT ,KC_LEFT ,KC_RGHT
,KC_RGUI,KC_RALT,ALL_T(KC_NO),MEH_T(KC_NO),KC_RCTL ,KC_UP
,KC_DOWN ,KC_ENT ,KC_SPC
,KC_LEFT ,KC_RGHT
,KC_UP
,KC_DOWN ,KC_ENT ,KC_SPC
), ),
/* Keymap 1: Layer Lock Keys /******* Symbols Layer *****************************************************************************************************
* *
* ,-------------------------------------------------------. ,-------------------------------------------------------. * ,-----------------------------------------------------. ,-----------------------------------------------------.
* | | Esc | | | | | | | | | | | | Bspc | | * | | F1 | F2 | F3 | F4 | F5 | Esc | | - | F6 | F7 | F8 | F9 | F10 | |
* |-------------+------+------+------+------+-------------| |------+------+------+------+------+------+-------------| * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | Media LOCK | | | | | | | | | | | | | | Media LOCK | * | | ! | @ | { | } | & | < | | > | | | 7 | 8 | 9 | / | |
* |-------------+------+------+------+------+------| | | |------+------+------+------+------+-------------| * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | Symbol LOCK | | | | | |------| |------| | | | | | Symbol LOCK | * | | # | $ | ( | ) | ` |------| |------| / | 4 | 5 | 6 | * | |
* |-------------+------+------+------+------+------| | | |------+------+------+------+------+-------------| * |-----------+------+------+------+------+------| Tab | | Shift|------+------+------+------+------+-----------|
* | Caps LOCK | | | | | | | | | | | | | | Caps LOCK | * | | % | ^ | [ | ] | ~ | | | -Tab| \ | 1 | 2 | 3 | - | |
* `-------------+------+------+------+------+-------------' `-------------+------+------+------+------+-------------' * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | | | | | | | | | | | * | LCtrl | Meh |Hyper | LAlt | LGui | |RGui/0|RAlt/.|Hypr/=|Meh/+ |RCtrl/Ent|
* `------------------------------------' `------------------------------------' * `-----------------------------------' `-------------------------------------'
* ,-------------. ,-------------. * ,-------------. ,-------------.
* | | | | | | * | Left | Right| | Home | End |
* ,------|------|------| |------+------+------. * ,------|------|------| |------+------+------.
* | | | | | | | | * | | | Up | | PgUp | | |
* | | |------| |------| | | * |Space |Enter |------| |------|BackSp| Del |
* | | | | | | | | * | | | Down | | PgDn | | |
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
[LOCK] = KEYMAP( [SYMB] = KEYMAP(
// left hand
KC_TRNS ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_ESC
,KC_TRNS ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_AMPR ,LSFT(KC_COMM)
,KC_TRNS ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV
,KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB
,KC_LCTL ,KC_MEH ,KC_HYPR,KC_LALT ,KC_LGUI
,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_TRNS
,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 ,KC_TRNS
,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)
,KC_HOME ,KC_END
,KC_PGUP
,KC_PGDN ,KC_BSPC ,KC_DEL
),
/******* Media Layer *******************************************************************************************************
*
* ,---------------------------------------------------------------. ,---------------------------------------------------------------.
* | | F11 | F12 | F13 | F14 | F15 | Esc | | | F16 | F17 | F18 | F19 | F20 | |
* |------+---------+---------+---------+---------+----------------| |------+---------+---------+---------+---------+---------+------|
* | |Shut Down|MouseUpLf|Mouse Up |MouseUpRg|Volume Up|Scroll| |Scroll|PrintScrn| Home | Up | PgUp | Mail | |
* |------+---------+---------+---------+---------+---------| Up | | Up |---------+---------+---------+---------+---------+------|
* | | Sleep |MouseLeft|MouseDown|MouseRght|Volume Dn|------| |------| Num Lock| Left | Down | Right | MyComp | |
* |------+---------+---------+---------+---------+---------|Scroll| |Scroll|---------+---------+---------+---------+---------+------|
* | | |MouseDnLf|MouseDown|MouseDnRg| Mute | Down | | Down | | End | Down | PgDn | | |
* `------+---------+---------+---------+---------+----------------' `----------------+---------+---------+---------+---------+------'
* |LCtrl| Meh | MClick | LClick | R Click| |Cmd/Insrt|Optn/Del | Hyper | Meh |RCtrl|
* `---------------------------------------------' `---------------------------------------------'
* ,-------------. ,-------------.
* | Stop |Refrsh| | Prev | Next |
* ,------|------|------| |------+------+------.
* |Brwser|Brwser|Search| |VolUp | | |
* |Back | Fwd |------| |------| Stop | Play-|
* | | | Home | |VolDn | | Pause|
* `--------------------' `--------------------'
*/
[MDIA] = KEYMAP(
// left hand
KC_TRNS ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,KC_ESC
,KC_TRNS ,KC_POWER ,M(MUL) ,KC_MS_U ,M(MUR) ,KC_VOLU ,KC_WH_U
,KC_TRNS ,KC_SLEP ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_VOLD
,KC_TRNS ,KC_NO ,M(MDL) ,KC_MS_D ,M(MDR) ,KC_MUTE ,KC_WH_D
,KC_LCTL ,KC_MEH ,KC_BTN3 ,KC_BTN1 ,KC_BTN2
,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 ,KC_TRNS
,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 ,KC_TRNS
,KC_WH_D ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_TRNS
,GUI_T(KC_INS),ALT_T(KC_DEL),KC_HYPR ,KC_MEH ,KC_RCTL
,KC_MPRV ,KC_MNXT
,KC_VOLU
,KC_VOLD ,KC_MSTP ,KC_MPLY
),
/******* Special Layer *****************************************************************************************************
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
* | | Esc | | | | | | | | | | | | Bspc | |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | | | | | | | | | | | | | | | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | | | | | | |------| |------| | | | | | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | | | | | | | | | | | | | | | RShift |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[SPEC] = KEYMAP(
// left hand // left hand
KC_TRNS ,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_FN3 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,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_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 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,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 |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | 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_LK] = KEYMAP(
// left hand
MO(SYMB_UN) ,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(UNLOCK) ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV
,KC_LSFT ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_TAB
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_LEFT ,KC_RGHT
,KC_UP
,KC_SPC ,KC_ENT ,KC_DOWN
// right hand
,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,MO(SYMB_UN)
,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(UNLOCK)
,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 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 // 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_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_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_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
,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
),
/* Keymap 5: Media Shift 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 |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | Symbol | Sleep|MsLeft|MsDown|MsRght|Vol Dn|------| |------|NumLok| Left | Down | Right|MyComp| Symbol |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | 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_SH] = KEYMAP(
// left hand
KC_FN3 ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,KC_NO
,MO(MDIA_SH) ,KC_POWER ,KC_BTN1 ,KC_MS_U ,KC_BTN2 ,KC_VOLU ,KC_WH_U
,MO(SYMB_SH) ,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 ,KC_FN3
,KC_WH_U ,KC_PSCR ,KC_HOME,KC_UP ,KC_PGUP ,KC_MAIL ,MO(MDIA_SH)
,KC_NLCK ,KC_LEFT,KC_DOWN ,KC_RIGHT,KC_MYCM ,MO(SYMB_SH)
,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 6: Media Lock 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 | |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | 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 |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | | | | | | | | | | | | | | | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | | | | | | |------| |------| | | | | | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
* | | | | | | | | | | | | | | | |
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[UNLOCK] = KEYMAP(
// left hand
KC_FN1 ,KC_ESC ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS
,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS
// right hand
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_FN1
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
,KC_TRNS ,KC_TRNS
,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS
) )
}; };
const uint16_t PROGMEM fn_actions[] = { 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) { // There are two shift keys for each layer so we increment a layer_shift var when one
case 0: // is pressed and decrement when one is released. If both are pressed at the same time
if (record->event.pressed) { // then the layer is locked (or unlocked). The shift counts are bound between 0 and 2
register_code(KC_RSFT); // 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 { } else {
unregister_code(KC_RSFT); if(--caps_shift < 0) caps_shift = 0;
if(caps_shift == 0) unregister_code(KC_LSFT);
} }
break; 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->tap.count && !record->tap.interrupted) {
register_code(KC_GRV);
} else {
layer_on(SPEC);
}
} else {
if(record->tap.count && !record->tap.interrupted) {
unregister_code(KC_GRV);
} else {
layer_off(SPEC);
}
}
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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"]

View file

@ -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

View file

@ -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;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 KiB

After

Width:  |  Height:  |  Size: 297 KiB

View file

@ -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/).

View file

@ -0,0 +1,45 @@
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = KEYMAP(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5,
KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_BSLS,
CTL_T(KC_ESC), KC_A, KC_S, KC_E, KC_T, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
KC_F1, KC_F2, KC_F3, KC_F4, KC_LGUI,
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE,
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU,
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_LALT,
//
/*-*/ KC_F6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
/*-*/ KC_NO, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS,
/*-*/ /*-*/ KC_Y, KC_N, KC_I, KC_O, KC_H, KC_ENT,
/*-*/ KC_RBRC, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
/*-*/ /*-*/ /*-*/ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
KC_MPLY, KC_MNXT,
KC_MPRV,
KC_RALT, KC_QUOT, KC_SPC
)
};
const uint16_t PROGMEM fn_actions[] = {
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
};

View file

@ -0,0 +1,28 @@
# Roman's Layout
There is only one layer based on [Norman layout](https://normanlayout.info/).
Looking for multiple-layer layouts?
- [Symbols, arrows, plover, HJKL arrows](../romanzolotarev-norman-plover-osx-hjkl/)
- [Same with IJKL arrows](../romanzolotarev-norman-plover-osx/)
[![keyboard-layout](romanzolotarev-norman-osx.png)](http://www.keyboard-layout-editor.com/#/gists/9e89d54f1ea6eeeb7dab1b2d19d28195)
## Functional Keys
- Tap `F1` to mute microphone via [Shush](http://mizage.com/shush/).
- Tap `F2` to copy screenshot to the clipboard.
- Hold `SHIFT` and tap `F2` to save screenshot as a file.
- Tap `F3`, `F4`, `F5`, `F6` to resize a window via [Divvy](http://mizage.com/divvy/).
## CTRL/ESC
CTRL and ESC are frequently used in Vim.
- Tap `CTRL/ESC` to send `ESC`.
- Hold `CTRL/ESC` to use as `CTRL`.
## Activate N-rollover
- Hold left `SHIFT` and right `SHIRT` and then tap `N`.

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

View file

@ -0,0 +1,73 @@
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0
#define QWRT 1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = KEYMAP(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5,
KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_BSLS,
KC_LCTL, KC_A, KC_S, KC_E, KC_T, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
KC_F1, KC_F2, KC_F3, KC_F4, KC_LGUI,
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE,
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU,
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_LALT,
//
/*-*/ KC_F6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
/*-*/ TG(QWRT), KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS,
/*-*/ /*-*/ KC_Y, KC_N, KC_I, KC_O, KC_H, KC_ENT,
/*-*/ KC_RBRC, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
/*-*/ /*-*/ /*-*/ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
KC_MPLY, KC_MNXT,
KC_MPRV,
KC_RALT, KC_QUOT, KC_SPC
),
[QWRT] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_E, KC_R, KC_T, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_D, KC_F, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS,
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
/*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS,
//
/*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
/*-*/ KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TRNS,
/*-*/ /*-*/ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_TRNS,
/*-*/ KC_TRNS, KC_N, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) {
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case QWRT:
ergodox_right_led_1_on();
break;
default:
break;
}
};

View file

@ -0,0 +1,34 @@
# Roman's Layout
There are two layers:
- **BASE** is [Norman layout](https://normanlayout.info/).
- **QWRT** is QWERTY.
[![keyboard-layout](romanzolotarev-norman-qwerty-osx.png)](http://www.keyboard-layout-editor.com/#/gists/3b236f450da474dc506a5a80390c3cc7)
## Switching
- Tap `QWRT` to toggle **QWRT**.
## LEDs
- Red: QWRT is on.
## Functional Keys
- Tap `F1` to mute microphone via [Shush](http://mizage.com/shush/).
- Tap `F2` to copy screenshot to the clipboard.
- Hold `SHIFT` and tap `F2` to save screenshot as a file.
- Tap `F3`, `F4`, `F5`, `F6` to resize a window via [Divvy](http://mizage.com/divvy/).
## CTRL/ESC
Both CTRL and ESC are frequently used in Vim.
- Tap `CTRL/ESC` to send `ESC`.
- Hold `CTRL/ESC` to use as `CTRL`.
## Activate N-rollover
- Hold left `SHIFT` and right `SHIRT` and then tap `N`.

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View file

@ -0,0 +1,6 @@
# ergodox_keymap
Based on the default Ergodox EZ firmware
Replaced the left side Bksp with a Crtl/Esc, this really helps in vim.
Removed the Ctrls from the Z and / keys.

View file

@ -0,0 +1,187 @@
// Based on `default_osx`
// Replace left Bksp with Ctrl/Esc
// Remove the Ctrl from Z and /
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media keys
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* |Ctrl/Esc| A | S | D | F | G |------| |------| H | J | K | L |; / L2| LGui |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | App | LGui | | Alt |Ctrl/Esc|
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter |
* | |ace | End | | PgDn | | |
* `--------------------' `----------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default
// left hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1),
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, 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,
ALT_T(KC_APP), KC_LGUI,
KC_HOME,
KC_SPC,KC_BSPC,KC_END,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, 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_ENT
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | . | 0 | = | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = KEYMAP(
// left hand
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 2: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | |Brwser|
* | | |------| |------| |Back |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
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;
}
};

Binary file not shown.

View file

@ -0,0 +1,231 @@
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media
#define CNTL 3 // control layer
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | L1/` | 1 | 2 | 3 | 4 | 5 |CmdSpc| | - | 6 | 7 | 8 | 9 | 0 | = |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* |Meh/Tab | Q | W | E | R | T | STab | | L3 | Y | U | I | O | P | Meh/\ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* |Hyp/Esc | L3/A | S | D | F | G |------| |------| H | J | K | L | L2/; | Hyp/' |
* |--------+------+------+------+------+------| Tab | |AltGui|------+------+------+------+------+--------|
* | LShift | L3/Z | X | C | V | B | | | | N | M | , | . | L2// | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCtrl | LAlt | LGui |Left |Right | | UP | Down | [ | ] | L1 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | LCtl | LGui | | LAlt |ShfGui|
* ,-------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Backsp|Delete|------| |------| Enter | Space |
* | | | 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
LT(SYMB,KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, LGUI(KC_SPC),
MEH_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, S(KC_TAB),
ALL_T(KC_ESC), LT(CNTL,KC_A), KC_S, KC_D, KC_F, KC_G,
KC_LSFT, LT(CNTL,KC_Z), KC_X, KC_C, KC_V, KC_B, KC_TAB,
KC_LCTL, KC_LALT, KC_LGUI, KC_LEFT, KC_RIGHT,
KC_LCTL, KC_LGUI,
KC_HOME,
KC_BSPC, KC_DELETE, KC_END,
// right hand
KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
KC_FN3, KC_Y, KC_U, KC_I, KC_O, KC_P, MEH_T(KC_BSLS),
KC_H, KC_J, KC_K, KC_L, LT(MDIA,KC_SCLN), ALL_T(KC_QUOT),
LALT(KC_LGUI), KC_N, KC_M, KC_COMM, KC_DOT, LT(MDIA,KC_SLSH), KC_RSFT,
KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1,
KC_LALT, S(KC_LGUI),
KC_PGUP,
KC_PGDN,KC_ENT, KC_SPC
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | < | | > | : | 7 | 8 | 9 | / | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| ; | 4 | 5 | 6 | * | Prnt |
* |--------+------+------+------+------+------| F14 | | F15 |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | - | Entr |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | 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,S(KC_COMM),
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_F14,
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,
S(KC_DOT), KC_COLN, KC_7, KC_8, KC_9, KC_BSLS, KC_F12,
KC_SCLN, KC_4, KC_5, KC_6, KC_ASTR, KC_PSCR,
KC_F15, KC_AMPR, KC_1, KC_2, KC_3, KC_MINS, KC_ENT,
KC_0, KC_DOT, KC_EQL, KC_PLUS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 2: Media Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Prev | Next | | Prev | Next |
* ,------|------|------| |------+------+------.
* | | | VolUp| | VolUp| | |
* | Play | Mute |------| |------| Mute | Play |
* | | | VolDn| | VolDn| | |
* `--------------------' `--------------------'
*/
// Control
[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_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_MPRV, KC_MNXT,
KC_VOLU,
KC_MPLY, KC_MUTE, KC_VOLD,
// 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_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_MPRV, KC_MNXT,
KC_VOLU,
KC_VOLD, KC_MUTE, KC_MPLY
),
/* Keymap 3: Control Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Sleep | | | | | | Pwr | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| Lclk |------| |------| Lft | Down | Up | Right| | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | Rclk | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// Control
[CNTL] = KEYMAP(
KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PWR,
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_BTN1,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// 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_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB),
[2] = ACTION_LAYER_TAP_TOGGLE(MDIA),
[3] = ACTION_LAYER_TAP_TOGGLE(CNTL) // 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;
case 3:
ergodox_right_led_3_on();
break;
default:
// none
break;
}
};

View file

@ -0,0 +1,36 @@
# Techtomas Configuration
## Base Layer
The base layer is a merge of what I liked with the default layout and the ordinary layout. The thumb cluster is more like the Kinesis advantage and the top row of the cluster is convient for use on the mac.
* The Caps Lock postion handles [Hyper/Esc](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)
* The Tab key toggles MEH.
* The two vertical mods on the left board are Shift+Tab and Tab.
* The two vertical mods on the right board are Control Layer tap/toggle and Alt+Cmd.
* The HYPER and MEH key are made in the same location on the right side of the board as well. Using Keyboard Maestro for OS X makes one-handed shortcuts very easy.
## Symbol Layer
The symbol layer can be tap/toggled through the bottom right key and also toggled holding the tilde/grave key in the upper left corner. I haven't used the symbol layer enough to tell if this was a good place or not but it made sense in my head
The bottom two vertical mods are set to F14 and F15 which is the default for changing screen brightness on the mac
## Media Layer
/ & ; will toggle the media layer which has play and volume controls assigned to the thumb cluster. I found this an easy way to quickly play/pause
## Control Layer
The a and z keys toggle the control layer.
On the left board you have mouse control with left & right click in the location of the G and B keys.
On the right board you have vim-style arrow keys using hjkl
The thumb cluster and mods all pass down to this layer.
## Changelog
* Apr 29, 2016 (V1.1):
* Added F14 and F15 to symbol layer
* Added control layer toggle to A key.
* Apr 28, 2016 (V1.0):
* Modified config based on the default layout plus inspiration from the ordinary layout

Binary file not shown.

View file

@ -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

View file

@ -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();
}
};

View file

@ -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

View file

@ -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 |

Binary file not shown.

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

View file

@ -5,8 +5,8 @@
#define BASE 0 // default layer #define BASE 0 // default layer
#define SYMB 1 // symbols #define SYMB 1 // symbols
#define MDIA 2 // media keys #define STEN 2 // steno
#define STEN 3 // steno #define MDIA 3 // media keys
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -17,19 +17,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+-------+-------------| |-------+------+------+------+------+------+--------| * |--------+------+------+------+-------+-------------| |-------+------+------+------+------+------+--------|
* | Del | ' | , | . | P | Y | Esc | | Caps | F | G | C | R | L | / | * | Del | ' | , | . | P | Y | Esc | | Caps | F | G | C | R | L | / |
* |--------+------+------+------+-------+------| | | |------+------+------+------+------+--------| * |--------+------+------+------+-------+------| | | |------+------+------+------+------+--------|
* | BkSp | A | O | E | U | I |------| |-------| D | H | T | N |S / L2|- / Cmd | * | BkSp | A | O | E | U | I |------| |-------| D | H | T | N | S | - |
* |--------+------+------+------+-------+------| Tab | | Enter |------+------+------+------+------+--------| * |--------+------+------+------+-------+------| Tab | | Enter |------+------+------+------+------+--------|
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift | * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift |
* `--------+------+------+------+-------+-------------' `--------------+------+------+------+------+--------' * `--------+------+------+------+-------+-------------' `--------------+------+------+------+------+--------'
* |Grv/L1| '" |AltShf| Left | Right | | Up | Down | [ | ] | ~L1 | * | L1 | NONE | Grv | Left | Right | | Up | Down | [ | ] | L1 |
* `-----------------------------------' `----------------------------------' * `-----------------------------------' `----------------------------------'
* ,-------------. ,---------------. * ,--------------. ,---------------.
* | PgUp | PgDn | | Home | End | * | PgUp | PgDn | | Home | End |
* ,------|------|------| |-------+-------+------. * ,------|-------|------| |-------+-------+------.
* | | | NONE | | NONE | | | * | | | NONE | | AltGr | | |
* | Alt | NONE |------| |-------| Space | Ctrl | * | Alt | Enter |------| |-------| Space | Ctrl |
* | | | Supr | | AltGr | | | * | | | Supr | | ~MDIA | | |
* `--------------------' `----------------------' * `---------------------' `----------------------'
*/ */
// If it accepts an argument (i.e, is a function), it doesn't need KC_. // If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_* // Otherwise, it needs KC_*
@ -39,19 +39,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_DELT, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_ESC, KC_DELT, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_ESC,
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_TAB, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_TAB,
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, MO(SYMB), KC_NO, KC_GRV, KC_LEFT,KC_RGHT,
KC_PGUP,KC_PGDN, KC_PGUP,KC_PGDN,
KC_NO, KC_NO,
KC_LALT,KC_ENT ,KC_LGUI, KC_LALT,KC_ENT ,KC_LGUI,
// right hand // right hand
KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
KC_CAPS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_CAPS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
KC_D, KC_H, KC_T, KC_N, LT(MDIA, KC_S), GUI_T(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, KC_FN1, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, MO(SYMB),
KC_HOME,KC_END, KC_HOME, KC_END,
KC_NO, KC_RALT,
KC_RALT,KC_SPC,KC_RCTL MO(MDIA),KC_SPC,KC_RCTL
), ),
/* Keymap 1: Symbol Layer /* Keymap 1: Symbol Layer
* *
@ -95,24 +95,46 @@ 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
), ),
/* Keymap 2: Media and mouse keys
[STEN] = KEYMAP( // layout: layer 2: Steno for Plover
// left hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
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_LK, PV_LW, PV_LR, PV_STAR, PV_STAR,
KC_TRNS,KC_NO, KC_NO, KC_TRNS, KC_TRNS,
KC_NO, KC_NO,
KC_NO,
PV_A, PV_O, KC_NO,
// right hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
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_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ,
KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS,
KC_NO, KC_NO,
KC_NO,
KC_TRNS,PV_E, PV_U
),
/* Keymap 3: Media and mouse keys
* *
* ,--------------------------------------------------. ,--------------------------------------------------. * ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | 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 | * | | |------| |------| | |
* | | | | | | | | * | | | | | | | |
* `--------------------' `--------------------' * `--------------------' `--------------------'
*/ */
@ -128,39 +150,18 @@ 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,
KC_TRNS, KC_TRNS, KC_WBAK KC_TRNS, KC_TRNS, KC_WBAK
), ),
[STEN] = KEYMAP( // layout: layer 4: Steno for Plover
// left hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
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_LK, PV_LW, PV_LR, PV_STAR, PV_STAR,
KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS,
KC_NO, KC_NO,
KC_NO,
PV_A, PV_O, KC_NO,
// right hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
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_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ,
KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO,
KC_NO,
KC_NO, PV_E, PV_U
),
}; };
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(MDIA) // FN1 - Momentary Layer 3 (Media)
}; };
void toggle_steno(int pressed) void toggle_steno(int pressed)
@ -170,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);
} }
} }
@ -200,26 +205,17 @@ 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); uint32_t layer0 = layer_state & (1UL << 0),
layer1 = layer_state & (1UL << 1),
layer2 = layer_state & (1UL << 2),
layer3 = layer_state & (1UL << 3);
ergodox_board_led_off(); ergodox_board_led_off();
ergodox_right_led_1_off(); ergodox_right_led_1_off();
ergodox_right_led_2_off(); ergodox_right_led_2_off();
ergodox_right_led_3_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;
case 3:
ergodox_right_led_3_on();
break;
default:
// none
break;
}
if (layer1) ergodox_right_led_1_on();
if (layer2) ergodox_right_led_2_on();
if (layer3) ergodox_right_led_3_on();
}; };

View file

@ -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.

View file

@ -0,0 +1,187 @@
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media keys
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ' / L |
* |--------+------+------+------+------+------| L | | L |------+------+------+------+------+--------|
* | L | Z | X | C | V | B | | | | N | M | , | . | / / | R |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | L | L | L | | | | | | [ | ] | ~L1 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,---------------.
* | `~ | '" | | ⎋ | ⌫ |
* ,------|------|------| |------+--------+------.
* | | | PgUp | | PgDn | | |
* | | |------| |------| |Enter |
* | | | L | | L | | |
* `--------------------' `----------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default
// left hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI,
KC_LCTL, KC_LALT, KC_LGUI,KC_LEFT,KC_RGHT,
KC_GRV, KC_QUOT,
KC_PGUP,
KC_SPC,KC_BSPC,KC_LALT,
// right hand
KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
KC_LGUI, KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
KC_ESC, KC_BSPC,
KC_PGDN,
KC_LCTL, KC_TAB, KC_ENT
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | [ | ] | { | } | | | | | / | 7 | 8 | 9 | * | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | < | > | ( | ) | |------| |------| - | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | & | 1 | 2 | 3 | = | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | 0 | . | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | Home | | |
* | | |------| |------| | |
* | | | | | End | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = KEYMAP(
// left hand
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS,KC_LBRC,KC_RBRC,KC_LCBR,KC_RCBR,KC_TRNS,KC_TRNS,
KC_TRNS,KC_LABK,KC_RABK,KC_LPRN,KC_RPRN,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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_SLSH, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
KC_MINS, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_EQL, KC_TRNS,
KC_0, KC_DOT, KC_LEFT, KC_RGHT, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_HOME,
KC_END , KC_TRNS, KC_TRNS
),
/* Keymap 2: Media keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F14 | F15 | | | | | | Q | W | ` | ` | | | Power |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | PgUp | | | | | | ] | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | Home | PgDn | End | |------| |------| [ | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | |L+Spc| Spc | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| C | V |
* | | | | | X | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[MDIA] = KEYMAP(
KC_TRNS, KC_F14 , KC_F15 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, /* F14 dims screen, F15 brightens */
KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END , KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
LGUI(KC_Q), LGUI(KC_W), LGUI(LSFT(KC_GRV)), LGUI(KC_GRV), LALT(LSFT(KC_TAB)), LALT(KC_TAB), KC_PWR,
KC_TRNS, LGUI(KC_RBRC), LGUI(LALT(KC_UP)), KC_UP , LGUI(LALT(KC_DOWN)), KC_TRNS, KC_TRNS,
LGUI(KC_LBRC), KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_MPLY,
KC_TRNS, LSFT(KC_SPC), KC_SPC , KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
LGUI(KC_X), LGUI(KC_C), LGUI(KC_V)
),
};
const uint16_t PROGMEM fn_actions[] = {
[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)
{
// 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;
};
#endif
// 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;
}
};

View file

@ -0,0 +1,45 @@
# The Zweihander Layout
NB: the backtick (\`) is special in Markdown. If I write ⌘\` in this readme, I mean “command-backtick”, not “command-backslash-backtick”.
This layout is tuned for people who…
## use OS X
This layout doesnt make any concessions for Windows use. While it should work fine in Windows, Im not about to devote precious keyboard space to Windows-specific shortcuts.
## mouse left-handed while doing other things with the right hand
I tend to have my mouse in my left hand, but I like to use my other hand to make things go faster. Ive added a bunch of buttons to the media layer to speed up browsing in Safari and Finder:
- Close Window (⌘W)
- Back (⌘[)
- Forward (⌘])
- Open and Close Parent Folder (⌥⌘↓)
- Go Up and Close Just-Left Folder (⌥⌘↑)
- Cycle through open windows in current application (⌘\` and ⌘⇧\`)
- Cycle through tabs in current window (⌥⇥ and ⌥⇧⇥)
- Space (page down in browsers; Quick Look in the Finder)
- Shift-Space (page up in web browsers)
Because moving letter-by-letter is way slower than moving word-by-word, I added Option (⌥) to the bottommost button on the left side. This key can be held easily while holding ; (activate media layer) and pressing J and L to move left and right by word.
## use lots of modifier keys in OS X menu-item shortcuts
I wanted to preserve the feel of a number of shortcuts that involve pressing lots of modifier keys at once; this is why the bottom left of the keyboard has shift, control, option, and command in the usual spaces. Further, some common shortcuts I press have a key on the right side of the keyboard. These shortcuts include:
- Empty Trash Without Asking for Confirmation (⇧⌥⌘⌫)
- Shut Down Without Asking for Confirmation (⇧⌥⌘ power)
## use Emacs-style shortcuts
I press C-a, C-e, and C-k all the time. Its difficult to press these key combinations with the control key on the bottom left and Im too quick on the draw for the control function on the / key to work reliably, so the bottommost thumb button on the right side is another control key.
## use spreadsheets
All the common spreadsheet operations (+-*/=) are now on the right side of the symbol layer.

View file

@ -17,7 +17,7 @@ This requires a little bit of familiarity with coding.
2. Clone the repository (download it) 2. Clone the repository (download it)
3. Set up a build environment as per [the build guide](/BUILD_GUIDE.md) 3. Set up a build environment as per [the build guide](/BUILD_GUIDE.md)
- Using a Mac and have homebrew? just run `brew tap osx-cross/avr && brew install avr-libc` - Using a Mac and have homebrew? just run `brew tap osx-cross/avr && brew install avr-libc`
4. Copy `keymaps/default/keymap.c` into `keymaps/your_name/keymap.c` (for example, `keymaps/german/keymap.c`) 4. Copy `keyboard/ergodox_ez/keymaps/default/keymap.c` into `keymaps/your_name/keymap.c` (for example, `keymaps/german/keymap.c`)
5. Edit this file, changing keycodes to your liking (see "Finding the keycodes you need" below). Try to edit the comments as well, so the "text graphics" represent your layout correctly. See below for more tips on sharing your work. 5. Edit this file, changing keycodes to your liking (see "Finding the keycodes you need" below). Try to edit the comments as well, so the "text graphics" represent your layout correctly. See below for more tips on sharing your work.
6. Compile your firmware by running `make clean` followed by `make KEYMAP=your_name`. For example, `make KEYMAP=german`. This will result in a hex file, which will always be called `ergodox_ez.hex`, regardless of your keymap name. 6. Compile your firmware by running `make clean` followed by `make KEYMAP=your_name`. For example, `make KEYMAP=german`. This will result in a hex file, which will always be called `ergodox_ez.hex`, regardless of your keymap name.
6. Flash this hex file using the [Teensy loader](https://www.pjrc.com/teensy/loader.html) as described in step 4 in the "Easy Way" above. 6. Flash this hex file using the [Teensy loader](https://www.pjrc.com/teensy/loader.html) as described in step 4 in the "Easy Way" above.

View file

@ -41,15 +41,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
* *
*/ */
#define COLS (int []){ F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
#define ROWS (int []){ D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5 #define DEBOUNCING_DELAY 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
@ -62,17 +63,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
/* /*
* Force NKRO * Force NKRO
* *
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
* makefile for this to work.) * makefile for this to work.)
* *
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
* until the next keyboard reset. * until the next keyboard reset.
* *
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
* fully operational during normal computer usage. * fully operational during normal computer usage.
* *
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
@ -90,7 +91,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* the keyboard. They are best used in combination with the HID Listen program, * the keyboard. They are best used in combination with the HID Listen program,
* found here: https://www.pjrc.com/teensy/hid_listen.html * found here: https://www.pjrc.com/teensy/hid_listen.html
* *
* The options below allow the magic key functionality to be changed. This is * The options below allow the magic key functionality to be changed. This is
* useful if your keyboard/keypad is missing keys and you want magic key support. * useful if your keyboard/keypad is missing keys and you want magic key support.
* *
*/ */

View file

@ -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) {

View file

@ -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

View file

@ -30,11 +30,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* key matrix size */ /* key matrix size */
#define MATRIX_ROWS 4 #define MATRIX_ROWS 4
#define MATRIX_COLS 13 #define MATRIX_COLS 13
/* Planck PCB default pin-out */ /* Planck PCB default pin-out */
#define COLS (int []){F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2, B0} #define MATRIX_ROW_PINS { F0, F1, F5, B4 }
#define ROWS (int []){F0, F1, F5, B4} #define MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2, B0 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
@ -46,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -171,10 +171,6 @@ endif
endif endif
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
SRC := backlight.c $(SRC)
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

View file

@ -1,61 +0,0 @@
#include <avr/io.h>
#include "backlight.h"
#define CHANNEL OCR1C
void backlight_init_ports()
{
// Setup PB7 as output and output low.
DDRB |= (1<<7);
PORTB &= ~(1<<7);
// Use full 16-bit resolution.
ICR1 = 0xFFFF;
// I could write a wall of text here to explain... but TL;DW
// Go read the ATmega32u4 datasheet.
// And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
// Pin PB7 = OCR1C (Timer 1, Channel C)
// Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
// (i.e. start high, go low when counter matches.)
// WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
// Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
TCCR1A = _BV(COM1C1) | _BV(WGM11); // = 0b00001010;
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
backlight_init();
}
void backlight_set(uint8_t level)
{
if ( level == 0 )
{
// Turn off PWM control on PB7, revert to output low.
TCCR1A &= ~(_BV(COM1C1));
CHANNEL = 0x0;
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
}
else if ( level == BACKLIGHT_LEVELS )
{
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
// Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1);
// Set the brightness
CHANNEL = 0xFFFF;
}
else
{
// Prevent backlight blink on lowest level
PORTB &= ~(_BV(PORTB7));
// Turn on PWM control of PB7
TCCR1A |= _BV(COM1C1);
// Set the brightness
CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
}
}

View file

@ -33,8 +33,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COLS 12 #define MATRIX_COLS 12
/* Planck PCB default pin-out */ /* Planck PCB default pin-out */
#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } #define MATRIX_ROW_PINS { D0, D5, B5, B6 }
#define ROWS (int []){ D0, D5, B5, B6 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
@ -46,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE

View file

@ -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, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
} }
@ -190,22 +174,16 @@ const uint16_t PROGMEM fn_actions[] = {
}; };
#ifdef AUDIO_ENABLE #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_startup[][2] = SONG(STARTUP_SOUND);
float tone_qwerty[][2] = SONG(QWERTY_SOUND); 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 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 music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif #endif
@ -269,63 +247,15 @@ 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
stop_all_notes();
PLAY_NOTE_ARRAY(tone_plover, false, 0); PLAY_NOTE_ARRAY(tone_plover, false, 0);
#endif #endif
layer_off(_RAISE); layer_off(_RAISE);
layer_off(_LOWER); layer_off(_LOWER);
layer_off(_ADJUST); layer_off(_ADJUST);
layer_off(_MUSIC);
stop_all_notes();
layer_on(_PLOVER); layer_on(_PLOVER);
if (!eeconfig_is_enabled()) { if (!eeconfig_is_enabled()) {
eeconfig_init(); eeconfig_init();
@ -343,37 +273,44 @@ 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;
}; };
void matrix_init_user(void) { void matrix_init_user(void) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
_delay_ms(20); // stops the tick startup_user();
PLAY_NOTE_ARRAY(tone_startup, false, 0); #endif
#endif
} }
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
void play_goodbye_tone()
void startup_user()
{ {
PLAY_NOTE_ARRAY(goodbye, false, 0); _delay_ms(20); // gets rid of tick
_delay_ms(150); PLAY_NOTE_ARRAY(tone_startup, false, 0);
} }
uint8_t starting_note = 0x0C; void shutdown_user()
int offset = 7; {
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
void process_action_user(keyrecord_t *record) { _delay_ms(150);
stop_all_notes();
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 music_on_user(void)
{
music_scale_user();
}
void music_scale_user(void)
{
PLAY_NOTE_ARRAY(music_scale, false, 0);
}
#endif #endif

View file

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

View file

@ -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);
}
}
}

View file

@ -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

View file

@ -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;
};

Some files were not shown because too many files have changed in this diff Show more