qmk_firmware/keyboards/xd75/keymaps/mtdjr/keymap.c
noroadsleft e30c993d75 [Keyboard] XD75 refactor (#5420)
* Refactor layout macro names

Update the names of the layout macros to reflect QMK's desired usage.

- KEYMAP renamed to LAYOUT
  - colinta keymap updated accordingly
- KC_KEYMAP renamed to LAYOUT_kc
  - mtdjr keymap updated accordingly

* Update xd75.h to use #pragma once include guard

* Update keymaps to use QMK_KEYBOARD_H

* Refactor default keymap

- updated to use layout macro
- remove deprecated action_get_macro function
- add functions from QMK keymap.c template
  - process_record_user
  - matrix_init_user
  - matrix_scan_user
  - led_set_user

* Update supporting files

- updated config.h files to use #pragma once include guard
- remove errant QUANTUM_DIR code block

* Rename readme files to fully lowercase filenames

* Restructure keyboard readme

Updated the readme to better align with the current QMK template.

* Bugfixes to supporting files
2019-03-17 10:04:50 -07:00

56 lines
2.9 KiB
C

#include QMK_KEYBOARD_H
#include "mtdjr.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_kc(
// .--------------------------------------------------------------------------.
EXC, 1 , 2 , 3 , 4 , 5 ,PGUP,MPNT,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
TAB, Q , W , E , R , T , INS,HOME, DEL, Y , U , I , O , P ,QUOT,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
LCTL, A , S , D , F , G , EQL,ELCK,MINS, H , J , K , L ,SCLN, ENT,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
LSFT, Z , X , C , V , B ,LBRC,BSLS,RBRC, N , M ,COMM, DOT,SLSH,ELCK,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
LOWR,LCTL,LALT,LGUI,xxxx, SPC,LOWR,RASE,xxxx, SPC, APP,LEFT,DOWN, UP,RGHT
// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----'
),
[_LOWER] = LAYOUT_kc(
// .--------------------------------------------------------------------------.
xxxx, F1 , F2 , F3 , F4 , F5 , F6 ,xxxx, F7 , F8 , F9 , F10, F11, F12, DEL,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
xxxx,ROOT,PPLY,PSEF,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,CALC,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,MUTE,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
,xxxx,xxxx,xxxx,xxxx,xxxx, , ,xxxx,MPLY,xxxx,MNXT,VOLD,VOLU,MNXT
// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----'
),
[_RAISE] = LAYOUT_kc(
// .--------------------------------------------------------------------------.
xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
xxxx,xxxx,xxxx,xxxx, RST,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
CAPS,xxxx,xxxx,xxxx,xxxx,xxxx, BLI,xxxx, BLD,xxxx,xxxx,xxxx,XLCK,xxxx,xxxx,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
RGB,RHUI,RHUD,RSAI,RSAD,RVAI,RVAD,xxxx,xxxx,xxxx,xxxx,xxxx,BTN1,MS_U,BTN2,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
,xxxx,xxxx,xxxx,xxxx,xxxx, , ,xxxx,xxxx,xxxx,xxxx,MS_L,MS_D,MS_R
// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----'
)
};
void led_set_user(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
capslock_led_on();
} else {
capslock_led_off();
}
}