Created
September 14, 2016 02:41
-
-
Save bestguy/361fa90fadd06af1250f4eacbd35d50e to your computer and use it in GitHub Desktop.
Atomic Keyboard keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "atomic.h" | |
// Fillers to make layering more clear | |
#define _______ KC_TRNS | |
#define ___T___ KC_TRNS | |
#define XXXXXXX KC_NO | |
// Layer shorthand | |
#define _QW 0 | |
#define _CM 1 | |
#define _DV 2 | |
#define _LW 3 | |
#define _RS 4 | |
#define _FN 5 | |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
/* QWERTY - MIT ENHANCED / GRID COMPATIBLE | |
* .--------------------------------------------------------------------------------------------------------------------------------------. | |
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | DEL | BACKSP | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| | |
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | PG UP | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---+--------+--------| | |
* | BACKSP | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PG DN | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | |
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | ` | HOME | UP | END | | |
* |--------+--------+--------+--------+--------+- 2u ---+--------+--------+--------+--------+--------+--------+--------+--------+--------| | |
* | LGUI | LCTRL | LALT | FN | BACKSP | SPACE | [ | ] | - | = | \ | LEFT | DOWN | RIGHT | | |
* '--------------------------------------------------------------------------------------------------------------------------------------' | |
*/ | |
[_QW] = { /* QWERTY */ | |
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, 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_PGUP }, | |
{ KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, 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_GRV, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT) }, | |
{ KC_LGUI, KC_LCTL, KC_LALT, MO(_FN), KC_BSPC, KC_SPC, KC_SPC, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_BSLS, KC_LEFT, KC_DOWN, KC_RGHT }, | |
}, | |
/* COLEMAK - MIT ENHANCED / GRID COMPATIBLE | |
* .--------------------------------------------------------------------------------------------------------------------------------------. | |
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | DEL | BACKSP | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | |
* | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | PG UP | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---+--------+--------| | |
* | BSPC | A | R | S | T | D | H | N | E | I | O | ' | ENTER | PG DN | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | |
* | LSHIFT | Z | X | C | V | B | K | M | , | . | / | ` | HOME | UP | END | | |
* |--------+--------+--------+--------+--------+- 2u ---+--------+--------+--------+--------+--------+--------+--------+--------+--------| | |
* | LGUI | LCTRL | LALT | FN | BACKSP | SPACE | [ | ] | - | = | \ | LEFT | DOWN | RIGHT | | |
* '--------------------------------------------------------------------------------------------------------------------------------------' | |
*/ | |
[_CM] = { /* 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_DEL, 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_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_PGDN }, | |
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_GRV, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT) }, | |
{ KC_LGUI, KC_LCTL, KC_LALT, MO(_FN), KC_BSPC, KC_SPC, KC_SPC, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_BSLS, KC_LEFT, KC_DOWN, KC_RGHT }, | |
}, | |
/* DVORAK - MIT ENHANCED / GRID COMPATIBLE | |
* .--------------------------------------------------------------------------------------------------------------------------------------. | |
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | DEL | BACKSP | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | |
* | TAB | ' | , | . | P | Y | F | G | C | R | L | [ | ] | \ | PG UP | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------- 2u ----+--------+--------| | |
* | BACKSP | A | O | E | U | I | D | H | T | N | S | / | ENTER | PG DN | | |
* |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | |
* | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | ` | HOME | UP | END | | |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| | |
* | LGUI | LCTRL | LALT | FN | BACKSP | SPACE | [ | ] | - | = | \ | LEFT | DOWN | RIGHT | | |
* '--------------------------------------------------------------------------------------------------------------------------------------' | |
*/ | |
[_DV] = { /* DVORAK */ | |
{ 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_DEL, KC_BSPC }, | |
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP }, | |
{ KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_ENT, KC_ENT, KC_PGDN }, | |
{ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_GRV, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT) }, | |
{ KC_LGUI, KC_LCTL, KC_LALT, MO(_FN), KC_BSPC, KC_SPC, KC_SPC, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_BSLS, KC_LEFT, KC_DOWN, KC_RGHT }, | |
}, | |
/* LOWERED (Not used) | |
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------. | |
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| | |
* | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| | |
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| | |
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | | |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| | |
* | | | | | | XXXXXX . | | | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------' | |
*/ | |
[_LW] = { /* LOWERED (Not used) */ | |
{ _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___ }, | |
{ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_INS }, | |
{ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, ___T___, ___T___, _______ }, | |
{ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, | |
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, | |
}, | |
/* RAISED | |
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------. | |
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| | |
* | | 1 | QWERTY | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| | |
* | | F1 | F2 | F3 | F4 | F5 | DVORAK | - | = | [ | ] | \ | XXXXXX . | | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| | |
* | | F7 | F8 | F9 | COLEMK | F11 | F12 | | | | | XXXXXX . | | | | |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| | |
* | | | | | | XXXXXX . | | | | | | | | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------' | |
*/ | |
[_RS] = { /* RAISED */ | |
{ _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___ }, | |
{ _______, KC_1, DF(_QW), KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_INS }, | |
{ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, DF(_DV), KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___, _______ }, | |
{ _______, KC_F7, KC_F8, KC_F9, DF(_CM), KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, | |
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, | |
}, | |
/* FUNCTION | |
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------. | |
* | | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | MUTE | VOL- | VOL+ | BRITE | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| | |
* | SCR LK | F13 | QWERTY | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| | |
* | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | DVORAK | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| | |
* | | | UNDO | CUT | COPY | PASTE | | | | | | | XXXXXX | MOUS U | WHEEL- | | |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| | |
* | | | | | | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | | |
* '--------------------------------------------------------------------------------------------------------------------------------------' | |
*/ | |
[_FN] = { /* FUNCTION */ | |
{ _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC__MUTE,KC_VOLD, KC_VOLU, M(0) }, | |
{ KC_SLCK, KC_F13, LGUI(KC_Q), LGUI(KC_W), KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, | |
{ KC_CAPS, KC_BTN5, LGUI(KC_A), LGUI(KC_R), LGUI(KC_S), KC_ACL0, DF(_DV), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U }, | |
{ _______, _______,LGUI(KC_Z),LGUI(KC_X), LGUI(KC_C),LGUI(KC_V),_______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D }, | |
{ _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, | |
}, | |
}; | |
const uint16_t PROGMEM fn_actions[] = { | |
}; | |
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |
{ | |
// MACRODOWN only works in this function | |
switch(id) { | |
case 0: | |
if (record->event.pressed) { | |
register_code(KC_RSFT); | |
#ifdef BACKLIGHT_ENABLE | |
backlight_step(); | |
#endif | |
} else { | |
unregister_code(KC_RSFT); | |
} | |
break; | |
} | |
return MACRO_NONE; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment