From 6d2cb1d9ace025bb563244f66e09a855ae8519de Mon Sep 17 00:00:00 2001 From: Kyle Montag Date: Tue, 10 Oct 2017 13:06:41 -0400 Subject: 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 --- keyboards/xd60/keymaps/kmontag42/keymap.c | 66 ++++++++++++++++++++++++++++++ keyboards/xd60/keymaps/kmontag42/readme.md | 18 ++++++++ 2 files changed, 84 insertions(+) create mode 100644 keyboards/xd60/keymaps/kmontag42/keymap.c create mode 100644 keyboards/xd60/keymaps/kmontag42/readme.md (limited to 'keyboards/xd60/keymaps') diff --git a/keyboards/xd60/keymaps/kmontag42/keymap.c b/keyboards/xd60/keymaps/kmontag42/keymap.c new file mode 100644 index 0000000000..4831a548df --- /dev/null +++ b/keyboards/xd60/keymaps/kmontag42/keymap.c @@ -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; + } +}; diff --git a/keyboards/xd60/keymaps/kmontag42/readme.md b/keyboards/xd60/keymaps/kmontag42/readme.md new file mode 100644 index 0000000000..946ae56063 --- /dev/null +++ b/keyboards/xd60/keymaps/kmontag42/readme.md @@ -0,0 +1,18 @@ +# KMontag42's XD60/XD64 Keymap and Layout + +[![Built with Spacemacs](https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg)](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`. -- cgit v1.2.1