2016-11-21 16:22:14 +00:00
|
|
|
#include "miuni32.h"
|
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
2017-04-16 20:40:03 +00:00
|
|
|
/* Level 0: Default Layer
|
|
|
|
* ,---------------------------------------------------------------------------------------.
|
|
|
|
* | Q | W | E | R | T | Y | U | I | O | P | BSP |
|
|
|
|
* |---------------------------------------------------------------------------------------|
|
|
|
|
* | A | S | D | F | G | H | J | K | L | ENT |LT(1|,)|
|
|
|
|
* |---------------------------------------------------------------------------------------|
|
|
|
|
* |LT(3|Z)| X | C | V | NO | SPC | B | N | M | RSFT |LT(2|.)|
|
|
|
|
* |---------------------------------------------------------------------------------------|
|
|
|
|
*/
|
2017-04-12 08:12:10 +00:00
|
|
|
[0] ={
|
|
|
|
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
2017-04-13 16:25:05 +00:00
|
|
|
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, LT(1, KC_COMMA)},
|
|
|
|
{LT(3, KC_Z), KC_X, KC_C, KC_V, KC_NO, KC_SPC, KC_B, KC_N, KC_M, KC_RSFT, LT(2, KC_DOT)}
|
2017-04-12 08:12:10 +00:00
|
|
|
},
|
2017-04-16 20:40:03 +00:00
|
|
|
/* Level 1: Numbers Layer
|
|
|
|
* ,---------------------------------------------------------------------------------------.
|
|
|
|
* | ESC | 7 | 8 | 9 | / | * | . | , | ( | ) | BSP |
|
|
|
|
* |---------------------------------------------------------------------------------------|
|
|
|
|
* | TAB | 4 | 5 | 6 | - | + | = | UP | HOME | PGUP | TRNS |
|
|
|
|
* |---------------------------------------------------------------------------------------|
|
|
|
|
* | LATL | 1 | 2 | 3 | 0 | NO | LEFT | DOWN | RGHT | PGDN | RALT |
|
|
|
|
* |---------------------------------------------------------------------------------------|
|
|
|
|
*/
|
2017-04-12 08:12:10 +00:00
|
|
|
[1] ={
|
|
|
|
{KC_ESC, KC_7, KC_8, KC_9, KC_SLSH, KC_ASTR, KC_DOT, KC_COMM, KC_LPRN, KC_RPRN, KC_BSPC},
|
2017-04-13 16:25:05 +00:00
|
|
|
{KC_TAB, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, KC_EQL, KC_UP, KC_HOME, KC_PGUP, KC_TRNS},
|
|
|
|
{KC_LALT, KC_1, KC_2, KC_3, KC_0, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_RALT}
|
2017-04-12 08:12:10 +00:00
|
|
|
},
|
2017-04-16 20:40:03 +00:00
|
|
|
/* Level 2: Symbols Layer
|
|
|
|
* ,---------------------------------------------------------------------------------------.
|
|
|
|
* | ! | @ | # | $ | % | ^ | & | * | - | + | = |
|
|
|
|
* |---------------------------------------------------------------------------------------|
|
|
|
|
* | { | } | [ | ] | TRNS | TRNS | \ | ; | : | ` | ? |
|
|
|
|
* |---------------------------------------------------------------------------------------|
|
|
|
|
* | LSFT | LCTL | L | T | TRNS | TAB | N | TRNS | TRNS | RCTL | TRNS |
|
|
|
|
* |---------------------------------------------------------------------------------------|
|
|
|
|
*/
|
2017-04-12 08:12:10 +00:00
|
|
|
[2] ={
|
|
|
|
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_PLUS, KC_EQL},
|
2017-04-13 16:25:05 +00:00
|
|
|
{KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_BSLS, KC_SCLN, KC_COLN, KC_GRV, KC_QUES},
|
2017-04-14 07:02:25 +00:00
|
|
|
{KC_LSFT, KC_LCTL, KC_L, KC_T, KC_TRNS, KC_TAB, KC_N, KC_TRNS, KC_TRNS, KC_RCTL, KC_TRNS}
|
2017-04-12 08:12:10 +00:00
|
|
|
},
|
2017-04-16 20:40:03 +00:00
|
|
|
/* Level 3: RGB Layer
|
|
|
|
* ,---------------------------------------------------------------------------------------.
|
|
|
|
* | RESET | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS |
|
|
|
|
* |---------------------------------------------------------------------------------------|
|
|
|
|
* |RGB_TOG|RGB_MOD|RGB_HUI|RGB_HUD| NO |RGB_SAI|RGB_SAD|RGB_VAI|RGB_VAD| TRNS | TRNS |
|
|
|
|
* |---------------------------------------------------------------------------------------|
|
|
|
|
* | TRNS | TRNS | TRNS | TRNS | NO | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS |
|
|
|
|
* |---------------------------------------------------------------------------------------|
|
|
|
|
*/
|
2017-04-12 08:12:10 +00:00
|
|
|
[3] ={
|
2017-04-13 16:25:05 +00:00
|
|
|
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
|
|
|
|
{RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_NO, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS},
|
|
|
|
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
|
2017-04-12 08:12:10 +00:00
|
|
|
}
|
2016-11-21 16:22:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
void matrix_init_user(void) {
|
|
|
|
}
|
|
|
|
|
|
|
|
void matrix_scan_user(void) {
|
|
|
|
}
|
|
|
|
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
2017-04-12 08:12:10 +00:00
|
|
|
return true;
|
2016-11-21 16:22:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void led_set_user(uint8_t usb_led) {
|
|
|
|
|
2017-04-12 08:12:10 +00:00
|
|
|
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (usb_led & (1 << USB_LED_KANA)) {
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-11-21 16:22:14 +00:00
|
|
|
}
|