qmk_firmware/keyboard/atomic/keymaps/pc_atomic.c

76 lines
5.1 KiB
C
Raw Normal View History

2016-04-13 19:43:09 +00:00
#include "atomic.h"
#define _QW 0
#define _LW 1
#define _RS 2
#define _FN 3
#define _______ KC_TRNS
#define XXXXXXX KC_NO
/*
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
* | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN |
* |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
* | LCTRL | LWIN | FN | LALT | RAISED | XXXXXX . SPACE | LOWER | RALT | HOME | END | RCTRL | LEFT | DOWN | RIGHT |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// [_QW] = { /* QWERTY */
[0] = { /* QWERTY */
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC },
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL },
{ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_PGUP },
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, KC_UP, KC_PGDN },
{ KC_LCTL, KC_LGUI, MO(_FN), KC_LALT, MO(_RS), XXXXXXX, KC_SPC, MO(_LW), KC_RALT, KC_HOME, KC_END, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
},
[_LW] = { /* LOWERED */
{ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PAUS },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
},
[_RS] = { /* RAISED */
{ KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PAUS },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
},
[_FN] = { /* FUNCTION */
{ KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_PAUS },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
},
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_MOMENTARY(2), // to RAISE
[2] = ACTION_LAYER_MOMENTARY(3), // to LOWER
[3] = ACTION_DEFAULT_LAYER_SET(0),
[4] = ACTION_DEFAULT_LAYER_SET(1),
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
return MACRODOWN(TYPE(KC_T), END);
break;
}
return MACRO_NONE;
};