From d2ff66a985b938e87fffe55c1d9f1dc55e356f91 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 23 Aug 2017 22:29:07 -0400 Subject: Creates a layouts/ folder for keymaps shared between keyboards (#1609) * include variables and .h files as pp directives * start layout compilation * split ergodoxes up * don't compile all layouts for everything * might seg fault * reset layouts variable * actually reset layouts * include rules.mk instead * remove includes from rules.mk * update variable setting * load visualizer from path * adds some more examples * adds more layouts * more boards added * more boards added * adds documentation for layouts * use lowercase names for LAYOUT_ * add layout.json files for each layout * add community folder, default keymaps for layouts * touch-up default layouts * touch-up layouts, some keyboard rules.mk * update documentation for layouts * fix up serial/i2c switches --- layouts/community/ergodox/alphadox/config.h | 12 ++++ layouts/community/ergodox/alphadox/keymap.c | 107 ++++++++++++++++++++++++++++ layouts/community/ergodox/alphadox/rules.mk | 15 ++++ 3 files changed, 134 insertions(+) create mode 100644 layouts/community/ergodox/alphadox/config.h create mode 100644 layouts/community/ergodox/alphadox/keymap.c create mode 100644 layouts/community/ergodox/alphadox/rules.mk (limited to 'layouts/community/ergodox/alphadox') diff --git a/layouts/community/ergodox/alphadox/config.h b/layouts/community/ergodox/alphadox/config.h new file mode 100644 index 000000000..6fc64f508 --- /dev/null +++ b/layouts/community/ergodox/alphadox/config.h @@ -0,0 +1,12 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + +#define FORCE_NKRO +#define PREVENT_STUCK_MODIFIERS + +#undef TAPPING_TERM +#undef IGNORE_MOD_TAP_INTERRUPT + +#endif diff --git a/layouts/community/ergodox/alphadox/keymap.c b/layouts/community/ergodox/alphadox/keymap.c new file mode 100644 index 000000000..8acd86b7a --- /dev/null +++ b/layouts/community/ergodox/alphadox/keymap.c @@ -0,0 +1,107 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define ETC 2 // etc + +enum macro_id { + TEENSY, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[BASE] = LAYOUT_ergodox( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_PGUP, + CTL_T(KC_ESC), LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, + KC_GRV, KC_DEL, KC_DEL, KC_LALT, GUI_T(KC_TAB), + KC_NO, KC_NO, + KC_NO, + LT(SYMB,KC_BSPC), CTL_T(KC_ESC), KC_NO, + + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_VOLU, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSLS, + KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT, + KC_VOLD, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + GUI_T(KC_TAB), KC_LEFT, KC_DOWN, KC_UP, LCAG_T(KC_RGHT), + KC_NO, KC_NO, + KC_NO, + KC_NO, SFT_T(KC_ENT), LT(SYMB,KC_SPC) +), + +[SYMB] = LAYOUT_ergodox( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, + KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS, + KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_TRNS, + KC_TILD, KC_AMPR, KC_AMPR, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS, KC_NO, + KC_MINS, KC_4, KC_5, KC_6, KC_QUOT, KC_NO, + KC_TRNS, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO, KC_TRNS, + KC_0, KC_NO, KC_DOT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +[ETC] = LAYOUT_ergodox( + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_TRNS, + KC_TRNS, LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME, KC_NO, + KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END, KC_NO, + KC_TRNS, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + case TEENSY: + break; + } + return MACRO_NONE; +}; + +void matrix_init_user(void) { +}; + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + break; + } +}; diff --git a/layouts/community/ergodox/alphadox/rules.mk b/layouts/community/ergodox/alphadox/rules.mk new file mode 100644 index 000000000..f93ff3bb6 --- /dev/null +++ b/layouts/community/ergodox/alphadox/rules.mk @@ -0,0 +1,15 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ # nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + + -- cgit v1.2.3-24-g4f1b