Add my layouts (#1822)
* all of my updates * return to base config for xd60.c * remove janky keymap header definition * update readme for xd60 * update Planck readme
This commit is contained in:
parent
d8c62e4238
commit
6d2cb1d9ac
6 changed files with 351 additions and 0 deletions
66
keyboards/xd60/keymaps/kmontag42/keymap.c
Normal file
66
keyboards/xd60/keymaps/kmontag42/keymap.c
Normal file
|
@ -0,0 +1,66 @@
|
|||
#include "xd60.h"
|
||||
#include "action_layer.h"
|
||||
#include "backlight.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// 0: Base Layer
|
||||
KEYMAP(
|
||||
KC_LEAD, 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_GRV, 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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DOT, KC_ENT, \
|
||||
KC_LSPO, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSPC, KC_RGUI, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT),
|
||||
|
||||
// 1: Function Layer
|
||||
KEYMAP(
|
||||
RESET, 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_F13, KC_F14, \
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, F(0), KC_NO, KC_NO, KC_NO, KC_NO),
|
||||
|
||||
};
|
||||
|
||||
// Custom Actions
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay
|
||||
};
|
||||
|
||||
// Macros
|
||||
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);
|
||||
rgblight_step();
|
||||
}
|
||||
else { unregister_code(KC_RSFT); }
|
||||
break;
|
||||
}
|
||||
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Loop
|
||||
void matrix_scan_user(void) {
|
||||
static uint8_t old_layer = 255;
|
||||
uint8_t new_layer = biton32(layer_state);
|
||||
|
||||
if (old_layer != new_layer) {
|
||||
switch (new_layer) {
|
||||
case 0:
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0xFF, 0xFF, 0xFF);
|
||||
break;
|
||||
case 1:
|
||||
rgblight_mode(18);
|
||||
rgblight_setrgb(0x00, 0xFF, 0xFF);
|
||||
break;
|
||||
}
|
||||
|
||||
old_layer = new_layer;
|
||||
}
|
||||
};
|
18
keyboards/xd60/keymaps/kmontag42/readme.md
Normal file
18
keyboards/xd60/keymaps/kmontag42/readme.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# KMontag42's XD60/XD64 Keymap and Layout
|
||||
|
||||
[](http://spacemacs.org)
|
||||
|
||||
## Additional Notes
|
||||
This layout is WIP for me as I use my shiny new keyboard more and more. I will work to keep this updated.
|
||||
|
||||
## Notable features
|
||||
* Arrows only on the bottom row
|
||||
** i prefer vim style movement, so this works well for me
|
||||
* Layer based RGB lighting
|
||||
** i use rgb lights to determine what layer is currently active
|
||||
* Maximum key usage
|
||||
** unless someone tells me otherwise, I believe this is the maximum number of keys the board can support without PCB modding
|
||||
* I use emacs, which could account for some of the oddities in my layout and macros
|
||||
|
||||
## Build
|
||||
To build the default keymap, simply run `make xd60-kmontag42`.
|
Loading…
Add table
Add a link
Reference in a new issue