Moved Clueboard layout to community/66_ansi.

This commit is contained in:
Ian Sterling 2019-10-22 22:43:25 -07:00
parent d03b83fdc9
commit 51c08690bd
4 changed files with 24 additions and 84 deletions

View File

@ -1,46 +0,0 @@
#----------------------------------------------------------------------------
# On command line:
#
# make all = Make software.
#
# make clean = Clean out built project files.
#
# make coff = Convert ELF to AVR COFF.
#
# make extcoff = Convert ELF to AVR Extended COFF.
#
# make program = Download the hex file to the device.
# Please customize your programmer settings(PROGRAM_CMD)
#
# make teensy = Download the hex file to the device, using teensy_loader_cli.
# (must have teensy_loader_cli installed).
#
# make dfu = Download the hex file to the device, using dfu-programmer (must
# have dfu-programmer installed).
#
# make flip = Download the hex file to the device, using Atmel FLIP (must
# have Atmel FLIP installed).
#
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
# (must have dfu-programmer installed).
#
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
# (must have Atmel FLIP installed).
#
# make debug = Start either simulavr or avarice as specified for debugging,
# with avr-gdb or avr-insight as the front end for debugging.
#
# make filename.s = Just compile filename.c into the assembler code only.
#
# make filename.i = Create a preprocessed source file for use in submitting
# bug reports to the GCC project.
#
# To rebuild project do "make clean" then "make all".
#----------------------------------------------------------------------------
# Build Options
# change to "no" to disable the options, or define them in the makefile.mk in
# the appropriate keymap folder that will get included automatically
#
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.

View File

@ -3,17 +3,13 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern keymap_config_t keymap_config; enum layer_names {
_QWERTY,
// Each layer gets a name for readability, which is then used in the keymap matrix below. _DVORAK,
// The underscores don't mean anything - you can have a layer called STUFF or any other name. _COLEMAK,
// Layer names don't all need to be of the same length, obviously, and you can also skip them _FL,
// entirely and just use numbers. _CL
#define _QWERTY 0 };
#define _COLEMAK 1
#define _DVORAK 2
#define _FL 3
#define _CL 4
enum planck_keycodes { enum planck_keycodes {
QWERTY = SAFE_RANGE, QWERTY = SAFE_RANGE,
@ -25,6 +21,7 @@ enum planck_keycodes {
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
#define FN_CAPS LT(_FL, KC_CAPS) // Tap for Caps Lock, Hold for Function Layer #define FN_CAPS LT(_FL, KC_CAPS) // Tap for Caps Lock, Hold for Function Layer
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _QWERTY: Base Layer (Default Layer) /* Keymap _QWERTY: Base Layer (Default Layer)
* ,-----------------------------------------------------------. ,---. * ,-----------------------------------------------------------. ,---.
@ -105,33 +102,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \
_______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI),
}; };
// clang-format on
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { if (record->event.pressed) {
case QWERTY: switch (keycode) {
if (record->event.pressed) { case QWERTY:
persistent_default_layer_set(1UL<<_QWERTY); set_single_persistent_default_layer(_QWERTY);
} return false;
return false; case DVORAK:
break; set_single_persistent_default_layer(_DVORAK);
case COLEMAK: return false;
if (record->event.pressed) { case COLEMAK:
persistent_default_layer_set(1UL<<_COLEMAK); set_single_persistent_default_layer(_COLEMAK);
} return false;
return false; }
break; }
case DVORAK: return true;
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
break;
}
return true;
} }

View File

@ -0,0 +1 @@
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.