Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90f9fb4eee | ||
|
|
77ed9e3a73 | ||
|
|
faef966a4d | ||
|
|
a054b5a06c | ||
|
|
952a30ef34 | ||
|
|
bada74e2a1 | ||
|
|
ecd21b44a8 | ||
|
|
edb6c98fd2 |
No files matched your search
@@ -28,6 +28,6 @@ Sometimes it's useful to print debug messages from within your [custom code](cus
|
|||||||
After that you can use a few different print functions:
|
After that you can use a few different print functions:
|
||||||
|
|
||||||
* `print("string")`: Print a simple string.
|
* `print("string")`: Print a simple string.
|
||||||
* `sprintf("%s string", var)`: Print a formatted string
|
* `uprintf("%s string", var)`: Print a formatted string
|
||||||
* `dprint("string")` Print a simple string, but only when debug mode is enabled
|
* `dprint("string")` Print a simple string, but only when debug mode is enabled
|
||||||
* `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled
|
* `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled
|
||||||
@@ -41,5 +41,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define RGBLIGHT_HUE_STEP 8
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
#define RGBLIGHT_SAT_STEP 8
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
#define RGBLIGHT_VAL_STEP 8
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
#define RGBLIGHT_LIMIT_VAL 120
|
#define RGBLIGHT_LIMIT_VAL 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define B6_AUDIO
|
||||||
|
// #define NO_MUSIC_MODE
|
||||||
#endif
|
#endif
|
||||||
@@ -26,10 +26,10 @@ enum crkbd_keycodes {
|
|||||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||||
) \
|
) \
|
||||||
LAYOUT_wrapper( \
|
LAYOUT_wrapper( \
|
||||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
||||||
KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \
|
||||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
|
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, LALT_T(KC_BSPC), KC_DEL, KC_ENT, RAISE \
|
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \
|
||||||
)
|
)
|
||||||
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)
|
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)
|
||||||
|
|
||||||
@@ -66,14 +66,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
),
|
),
|
||||||
|
|
||||||
[_LOWER] = LAYOUT_wrapper(
|
[_LOWER] = LAYOUT_wrapper(
|
||||||
KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC,
|
KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11,
|
||||||
KC_F11, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE,
|
KC_F12, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE,
|
||||||
KC_F12, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______,
|
_______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______,
|
||||||
_______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
[_RAISE] = LAYOUT_wrapper( \
|
[_RAISE] = LAYOUT_wrapper( \
|
||||||
KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC,
|
_______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______,
|
||||||
_______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS,
|
_______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS,
|
||||||
_______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______,
|
_______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______,
|
||||||
_______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______
|
||||||
@@ -81,18 +81,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_ADJUST] = LAYOUT_wrapper( \
|
[_ADJUST] = LAYOUT_wrapper( \
|
||||||
KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET,
|
KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET,
|
||||||
VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EPRM,
|
VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST,
|
||||||
TG_MODS, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY,
|
_______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY,
|
||||||
_______, _______, _______, _______, _______, _______
|
_______, _______, _______, KC_NUKE, TG_MODS, _______
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
int RGB_current_mode;
|
|
||||||
|
|
||||||
void matrix_init_keymap(void) {
|
void matrix_init_keymap(void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
RGB_current_mode = rgblight_config.mode;
|
|
||||||
#endif
|
|
||||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
iota_gfx_init(!has_usb()); // turns on the display
|
iota_gfx_init(!has_usb()); // turns on the display
|
||||||
@@ -102,53 +97,118 @@ void matrix_init_keymap(void) {
|
|||||||
PORTD &= ~(1<<5);
|
PORTD &= ~(1<<5);
|
||||||
|
|
||||||
DDRB &= ~(1<<0);
|
DDRB &= ~(1<<0);
|
||||||
PORTB &= ~(1<<0);}
|
PORTB &= ~(1<<0);
|
||||||
|
}
|
||||||
|
|
||||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
|
|
||||||
// When add source files to SRC in rules.mk, you can use functions.
|
// When add source files to SRC in rules.mk, you can use functions.
|
||||||
const char *read_layer_state(void);
|
|
||||||
const char *read_logo(void);
|
const char *read_logo(void);
|
||||||
void set_keylog(uint16_t keycode, keyrecord_t *record);
|
|
||||||
const char *read_keylog(void);
|
|
||||||
const char *read_keylogs(void);
|
|
||||||
char layer_state_str[24];
|
char layer_state_str[24];
|
||||||
|
char modifier_state_str[24];
|
||||||
|
char host_led_state_str[24];
|
||||||
|
char keylog_str[24] = {};
|
||||||
|
char keylogs_str[21] = {};
|
||||||
|
int keylogs_str_idx = 0;
|
||||||
|
|
||||||
// const char *read_mode_icon(bool swap);
|
// const char *read_mode_icon(bool swap);
|
||||||
const char *read_host_led_state(void);
|
|
||||||
// void set_timelog(void);
|
// void set_timelog(void);
|
||||||
// const char *read_timelog(void);
|
// const char *read_timelog(void);
|
||||||
|
|
||||||
|
const char code_to_name[60] = {
|
||||||
|
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||||
|
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
|
||||||
|
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||||
|
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
|
||||||
|
'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
|
||||||
|
'#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||||
|
|
||||||
|
void set_keylog(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
char name = ' ';
|
||||||
|
if (keycode < 60) {
|
||||||
|
name = code_to_name[keycode];
|
||||||
|
}
|
||||||
|
|
||||||
|
// update keylog
|
||||||
|
snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c",
|
||||||
|
record->event.key.row, record->event.key.col,
|
||||||
|
keycode, name);
|
||||||
|
|
||||||
|
// update keylogs
|
||||||
|
if (keylogs_str_idx == sizeof(keylogs_str) - 1) {
|
||||||
|
keylogs_str_idx = 0;
|
||||||
|
for (int i = 0; i < sizeof(keylogs_str) - 1; i++) {
|
||||||
|
keylogs_str[i] = ' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
keylogs_str[keylogs_str_idx] = name;
|
||||||
|
keylogs_str_idx++;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *read_keylog(void) {
|
||||||
|
return keylog_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *read_keylogs(void) {
|
||||||
|
return keylogs_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char* read_modifier_state(void) {
|
||||||
|
uint8_t modifiers = get_mods();
|
||||||
|
uint8_t one_shot = get_oneshot_mods();
|
||||||
|
|
||||||
|
snprintf(modifier_state_str, sizeof(modifier_state_str), "Mods:%s %s %s %s",
|
||||||
|
(modifiers & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) ? "CTL" : " ",
|
||||||
|
(modifiers & MODS_GUI_MASK || one_shot & MODS_GUI_MASK) ? "GUI" : " ",
|
||||||
|
(modifiers & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) ? "ALT" : " ",
|
||||||
|
(modifiers & MODS_SHIFT_MASK || one_shot & MODS_SHIFT_MASK) ? "SFT" : " "
|
||||||
|
);
|
||||||
|
|
||||||
|
return modifier_state_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *read_host_led_state(void) {
|
||||||
|
uint8_t leds = host_keyboard_leds();
|
||||||
|
|
||||||
|
snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
|
||||||
|
(leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ",
|
||||||
|
(leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ",
|
||||||
|
(leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "
|
||||||
|
);
|
||||||
|
|
||||||
|
return host_led_state_str;
|
||||||
|
}
|
||||||
|
|
||||||
const char* read_layer_state(void) {
|
const char* read_layer_state(void) {
|
||||||
switch (layer_state) {
|
switch (biton32(layer_state)) {
|
||||||
case _QWERTY:
|
case _RAISE:
|
||||||
switch (default_layer_state) {
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise ");
|
||||||
|
break;
|
||||||
|
case _LOWER:
|
||||||
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower ");
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust ");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
switch (biton32(default_layer_state)) {
|
||||||
case _QWERTY:
|
case _QWERTY:
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: QWERTY");
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Qwerty ");
|
||||||
break;
|
break;
|
||||||
case _COLEMAK:
|
case _COLEMAK:
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Colemak");
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Colemak");
|
||||||
break;
|
break;
|
||||||
case _DVORAK:
|
case _DVORAK:
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Dvorak");
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Dvorak ");
|
||||||
break;
|
break;
|
||||||
case _WORKMAN:
|
case _WORKMAN:
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Workman");
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Workman");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case _RAISE:
|
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise");
|
|
||||||
break;
|
|
||||||
case _LOWER:
|
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower");
|
|
||||||
break;
|
|
||||||
case _ADJUST:
|
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return layer_state_str;
|
return layer_state_str;
|
||||||
@@ -160,12 +220,13 @@ void matrix_scan_keymap(void) {
|
|||||||
|
|
||||||
void matrix_render_user(struct CharacterMatrix *matrix) {
|
void matrix_render_user(struct CharacterMatrix *matrix) {
|
||||||
if (is_master) {
|
if (is_master) {
|
||||||
// If you want to change the display of OLED, you need to change here
|
//If you want to change the display of OLED, you need to change here
|
||||||
matrix_write_ln(matrix, read_layer_state());
|
matrix_write_ln(matrix, read_layer_state());
|
||||||
matrix_write_ln(matrix, read_keylog());
|
matrix_write_ln(matrix, read_modifier_state());
|
||||||
|
// matrix_write_ln(matrix, read_keylog());
|
||||||
matrix_write_ln(matrix, read_keylogs());
|
matrix_write_ln(matrix, read_keylogs());
|
||||||
//matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
|
// matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
|
||||||
matrix_write_ln(matrix, read_host_led_state());
|
matrix_write(matrix, read_host_led_state());
|
||||||
//matrix_write_ln(matrix, read_timelog());
|
//matrix_write_ln(matrix, read_timelog());
|
||||||
} else {
|
} else {
|
||||||
matrix_write(matrix, read_logo());
|
matrix_write(matrix, read_logo());
|
||||||
@@ -187,8 +248,14 @@ void iota_gfx_task_user(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
if (record->event.pressed) {
|
switch (keycode) {
|
||||||
set_keylog(keycode, record);
|
case KC_A ... KC_SLASH:
|
||||||
|
case KC_F1 ... KC_F12:
|
||||||
|
case KC_INSERT ... KC_UP:
|
||||||
|
case KC_KP_SLASH ... KC_KP_DOT:
|
||||||
|
case KC_F13 ... KC_F24:
|
||||||
|
if (record->event.pressed) { set_keylog(keycode, record); }
|
||||||
|
break;
|
||||||
// set_timelog();
|
// set_timelog();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -20,12 +20,14 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
|||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
BOOTLOADER = qmk-dfu
|
||||||
|
|
||||||
# If you want to change the display of OLED, you need to change here
|
# If you want to change the display of OLED, you need to change here
|
||||||
SRC += ./lib/glcdfont.c \
|
SRC += ./lib/glcdfont.c \
|
||||||
./lib/rgb_state_reader.c \
|
./lib/rgb_state_reader.c \
|
||||||
./lib/logo_reader.c \
|
./lib/logo_reader.c \
|
||||||
./lib/keylogger.c \
|
# ./lib/keylogger.c \
|
||||||
./lib/host_led_state_reader.c \
|
# ./lib/host_led_state_reader.c \
|
||||||
# ./lib/layer_state_reader.c \
|
|
||||||
# ./lib/mode_icon_reader.c \
|
# ./lib/mode_icon_reader.c \
|
||||||
|
# ./lib/layer_state_reader.c \
|
||||||
# ./lib/timelogger.c \
|
# ./lib/timelogger.c \
|
||||||
@@ -10,4 +10,34 @@
|
|||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
// This is the 21-key keypad to 4x6 element matrix mapping
|
||||||
|
#define LAYOUT( \
|
||||||
|
KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
|
||||||
|
KM_NUM, KM_FSL, KM_AST, KM_MIN, \
|
||||||
|
KM___7, KM___8, KM___9, KM_EQU, \
|
||||||
|
KM___4, KM___5, KM___6, KM_PLS, \
|
||||||
|
KM___1, KM___2, KM___3, ___ENT, \
|
||||||
|
KM___0, _____0, KM_DOT, KM_ENT \
|
||||||
|
) { \
|
||||||
|
{ KM_ESC, KM_TAB, KM_BSL, KM_ARR }, \
|
||||||
|
{ KM_NUM, KM_FSL, KM_AST, KM_MIN }, \
|
||||||
|
{ KM___7, KM___8, KM___9, KM_EQU }, \
|
||||||
|
{ KM___4, KM___5, KM___6, KM_PLS }, \
|
||||||
|
{ KM___1, KM___2, KM___3, KC_NO }, \
|
||||||
|
{ KM___0, KC_NO, KM_DOT, KM_ENT } \
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is the 21-key keypad to 2x11 element matrix mapping
|
||||||
|
#define LAYOUT_pad21( \
|
||||||
|
KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
|
||||||
|
KM_NUM, KM_FSL, KM_AST, KM_MIN, \
|
||||||
|
KM___7, KM___8, KM___9, \
|
||||||
|
KM___4, KM___5, KM___6, KM_PLS, \
|
||||||
|
KM___1, KM___2, KM___3, \
|
||||||
|
KM___0, KM_DOT, KM_ENT \
|
||||||
|
) { \
|
||||||
|
{ KM_ESC, KM_TAB, KM_BSL, KM_ARR, KM___7, KM___8, KM___9, KM_PLS, KM___1, KM___2, KM___3, }, \
|
||||||
|
{ KM_NUM, KM_FSL, KM_AST, KM_MIN, KM___4, KM___5, KM___6, KM_ENT, KC_NO, KM___0, KM_DOT, }, \
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "arrow_pad",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 4,
|
||||||
|
"height": 6,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"KM_ESC", "x":0, "y":0},
|
||||||
|
{"label":"KM_TAB", "x":1, "y":0},
|
||||||
|
{"label":"KM_BSL", "x":2, "y":0},
|
||||||
|
{"label":"KM_ARR", "x":3, "y":0},
|
||||||
|
{"label":"KM_NUM", "x":0, "y":1},
|
||||||
|
{"label":"KM_FSL", "x":1, "y":1},
|
||||||
|
{"label":"KM_AST", "x":2, "y":1},
|
||||||
|
{"label":"KM_MIN", "x":3, "y":1},
|
||||||
|
{"label":"KM___7", "x":0, "y":2},
|
||||||
|
{"label":"KM___8", "x":1, "y":2},
|
||||||
|
{"label":"KM___9", "x":2, "y":2},
|
||||||
|
{"label":"KM_EQU", "x":3, "y":2},
|
||||||
|
{"label":"KM___4", "x":0, "y":3},
|
||||||
|
{"label":"KM___5", "x":1, "y":3},
|
||||||
|
{"label":"KM___6", "x":2, "y":3},
|
||||||
|
{"label":"KM_PLS", "x":3, "y":3},
|
||||||
|
{"label":"KM___1", "x":0, "y":4},
|
||||||
|
{"label":"KM___2", "x":1, "y":4},
|
||||||
|
{"label":"KM___3", "x":2, "y":4},
|
||||||
|
{"label":"___ENT", "x":3, "y":4},
|
||||||
|
{"label":"KM___0", "x":0, "y":5},
|
||||||
|
{"label":"_____0", "x":1, "y":5},
|
||||||
|
{"label":"KM_DOT", "x":2, "y":5},
|
||||||
|
{"label":"KM_ENT", "x":3, "y":5}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LAYOUT_pad21": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"KM_ESC", "x":0, "y":0},
|
||||||
|
{"label":"KM_TAB", "x":1, "y":0},
|
||||||
|
{"label":"KM_BSL", "x":2, "y":0},
|
||||||
|
{"label":"KM_ARR", "x":3, "y":0},
|
||||||
|
{"label":"KM_NUM", "x":0, "y":1},
|
||||||
|
{"label":"KM_FSL", "x":1, "y":1},
|
||||||
|
{"label":"KM_AST", "x":2, "y":1},
|
||||||
|
{"label":"KM_MIN", "x":3, "y":1},
|
||||||
|
{"label":"KM___7", "x":0, "y":2},
|
||||||
|
{"label":"KM___8", "x":1, "y":2},
|
||||||
|
{"label":"KM___9", "x":2, "y":2},
|
||||||
|
{"label":"KM___4", "x":0, "y":3},
|
||||||
|
{"label":"KM___5", "x":1, "y":3},
|
||||||
|
{"label":"KM___6", "x":2, "y":3},
|
||||||
|
{"label":"KM_PLS", "x":3, "y":2, "h":2},
|
||||||
|
{"label":"KM___1", "x":0, "y":4},
|
||||||
|
{"label":"KM___2", "x":1, "y":4},
|
||||||
|
{"label":"KM___3", "x":2, "y":4},
|
||||||
|
{"label":"KM___0", "x":0, "y":5, "w":2},
|
||||||
|
{"label":"KM_DOT", "x":2, "y":5},
|
||||||
|
{"label":"KM_ENT", "x":3, "y":4, "h":2}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,35 +1,18 @@
|
|||||||
|
|
||||||
#include "arrow_pad.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
|
|
||||||
// This is the 21-key keypad to 2x11 element matrix mapping
|
enum layers {
|
||||||
#define LAYOUT( \
|
LAYER_BASE,
|
||||||
KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
|
LAYER_EDIT,
|
||||||
KM_NUM, KM_FSL, KM_AST, KM_MIN, \
|
LAYER_FUNCTION
|
||||||
KM___7, KM___8, KM___9, KM_EQU, \
|
};
|
||||||
KM___4, KM___5, KM___6, KM_PLS, \
|
|
||||||
KM___1, KM___2, KM___3, ___ENT, \
|
|
||||||
KM___0, _____0, KM_DOT, KM_ENT \
|
|
||||||
) { \
|
|
||||||
{ KM_ESC, KM_TAB, KM_BSL, KM_ARR }, \
|
|
||||||
{ KM_NUM, KM_FSL, KM_AST, KM_MIN }, \
|
|
||||||
{ KM___7, KM___8, KM___9, KM_EQU }, \
|
|
||||||
{ KM___4, KM___5, KM___6, KM_PLS }, \
|
|
||||||
{ KM___1, KM___2, KM___3, KC_NO }, \
|
|
||||||
{ KM___0, KC_NO, KM_DOT, KM_ENT } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYER_BASE 0
|
enum custom_keycodes {
|
||||||
#define LAYER_EDIT 1
|
M_COPY = SAFE_RANGE, // KC_FN5: MACRO_COPY_CUT
|
||||||
#define LAYER_FUNCTION 2
|
M_SHFCT, // KC_FN6: MACRO_SHIFT_CONTROL
|
||||||
|
M_CTALT // KC_FN7: MACRO_CONTROL_ALT
|
||||||
#define MACRO_COPY_CUT 0
|
};
|
||||||
#define MACRO_SHIFT_CONTROL 1
|
|
||||||
#define MACRO_CONTROL_ALT 2
|
|
||||||
|
|
||||||
#define M_COPY KC_FN5
|
|
||||||
#define M_SHFCT KC_FN6
|
|
||||||
#define M_CTALT KC_FN7
|
|
||||||
|
|
||||||
#define SC_UNDO LCTL(KC_Z)
|
#define SC_UNDO LCTL(KC_Z)
|
||||||
#define SC_REDO LCTL(KC_Y)
|
#define SC_REDO LCTL(KC_Y)
|
||||||
@@ -42,13 +25,10 @@
|
|||||||
#define SC_ACLS LALT(KC_F4)
|
#define SC_ACLS LALT(KC_F4)
|
||||||
#define SC_CCLS LCTL(KC_F4)
|
#define SC_CCLS LCTL(KC_F4)
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[LAYER_BASE] = LAYOUT( \
|
[LAYER_BASE] = LAYOUT( \
|
||||||
KC_ESC, KC_TAB, KC_BSLS, KC_FN0, \
|
KC_ESC, KC_TAB, KC_BSLS, MO(2), \
|
||||||
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||||
KC_P7, KC_P8, KC_P9, KC_PEQL, \
|
KC_P7, KC_P8, KC_P9, KC_PEQL, \
|
||||||
KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
||||||
@@ -57,15 +37,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[LAYER_EDIT] = LAYOUT( \
|
[LAYER_EDIT] = LAYOUT( \
|
||||||
KC_ESC, KC_TAB, KC_SPC, _______, \
|
KC_ESC, KC_TAB, KC_SPC, _______, \
|
||||||
KC_FN1, SC_PSTE, SC_REDO, SC_UNDO, \
|
TG(1), SC_PSTE, SC_REDO, SC_UNDO, \
|
||||||
KC_HOME, KC_UP, KC_PGUP, KC_LALT, \
|
KC_HOME, KC_UP, KC_PGUP, KC_LALT, \
|
||||||
KC_LEFT, M_COPY, KC_RGHT, KC_LCTL, \
|
KC_LEFT, M_COPY, KC_RGHT, KC_LCTL, \
|
||||||
KC_END, KC_DOWN, KC_PGDN, XXXXXXX, \
|
KC_END, KC_DOWN, KC_PGDN, XXXXXXX, \
|
||||||
KC_BSPC, KC_PENT, KC_DEL, M_SHFCT),
|
KC_BSPC, KC_PENT, KC_DEL, M_SHFCT ),
|
||||||
|
|
||||||
[LAYER_FUNCTION] = LAYOUT( \
|
[LAYER_FUNCTION] = LAYOUT( \
|
||||||
KC_FN2, KC_FN3, KC_FN4, _______, \
|
BL_TOGG, BL_INC, BL_DEC, _______, \
|
||||||
KC_FN1, _______, _______, _______, \
|
TG(1), _______, _______, _______, \
|
||||||
_______, _______, _______, _______, \
|
_______, _______, _______, _______, \
|
||||||
_______, _______, _______, _______, \
|
_______, _______, _______, _______, \
|
||||||
_______, _______, _______, XXXXXXX, \
|
_______, _______, _______, XXXXXXX, \
|
||||||
@@ -74,68 +54,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
bool process_record_user(uint16_t keycode, keyrecord_t * record) {
|
||||||
[0] = ACTION_LAYER_MOMENTARY(LAYER_FUNCTION),
|
|
||||||
[1] = ACTION_LAYER_TOGGLE(LAYER_EDIT),
|
|
||||||
[2] = ACTION_BACKLIGHT_TOGGLE(),
|
|
||||||
[3] = ACTION_BACKLIGHT_INCREASE(),
|
|
||||||
[4] = ACTION_BACKLIGHT_DECREASE(),
|
|
||||||
[5] = ACTION_MACRO_TAP(MACRO_COPY_CUT),
|
|
||||||
[6] = ACTION_MACRO_TAP(MACRO_SHIFT_CONTROL),
|
|
||||||
[7] = ACTION_MACRO_TAP(MACRO_CONTROL_ALT),
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
// MACRODOWN only works in this function
|
// MACRODOWN only works in this function
|
||||||
switch (id) {
|
switch (keycode) {
|
||||||
|
|
||||||
case MACRO_COPY_CUT:
|
case M_COPY:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
register_code(KC_LCTL);
|
register_code(KC_LCTL);
|
||||||
if (record->tap.count == 1) {
|
if (record->tap.count == 1) {
|
||||||
register_code(KC_C);
|
register_code(KC_C);
|
||||||
unregister_code(KC_C);
|
unregister_code(KC_C);
|
||||||
}
|
} else if (record->tap.count == 2) {
|
||||||
else if (record->tap.count == 2) {
|
register_code(KC_X);
|
||||||
register_code(KC_X);
|
unregister_code(KC_X);
|
||||||
unregister_code(KC_X);
|
}
|
||||||
}
|
unregister_code(KC_LCTL);
|
||||||
unregister_code(KC_LCTL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MACRO_SHIFT_CONTROL:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT));
|
|
||||||
if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL));
|
|
||||||
if (record->tap.count == 3) register_code(KC_PENT);;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL));
|
|
||||||
unregister_code(KC_PENT);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MACRO_CONTROL_ALT:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL));
|
|
||||||
if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
return MACRO_NONE;
|
case M_SHFCT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT));
|
||||||
|
if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL));
|
||||||
|
if (record->tap.count == 3) register_code(KC_PENT);;
|
||||||
|
} else {
|
||||||
|
unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL));
|
||||||
|
unregister_code(KC_PENT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case M_CTALT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL));
|
||||||
|
if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT));
|
||||||
|
} else {
|
||||||
|
unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led)
|
void led_set_user(uint8_t usb_led)
|
||||||
|
|||||||
@@ -1,32 +1,18 @@
|
|||||||
|
|
||||||
#include "arrow_pad.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
|
|
||||||
// This is the 21-key keypad to 2x11 element matrix mapping
|
enum layers {
|
||||||
#define LAYOUT( \
|
LAYER_BASE,
|
||||||
KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
|
LAYER_EDIT,
|
||||||
KM_NUM, KM_FSL, KM_AST, KM_MIN, \
|
LAYER_FUNCTION
|
||||||
KM___7, KM___8, KM___9, ___PLS, \
|
};
|
||||||
KM___4, KM___5, KM___6, KM_PLS, \
|
|
||||||
KM___1, KM___2, KM___3, ___ENT, \
|
|
||||||
KM___0, _____0, KM_DOT, KM_ENT \
|
|
||||||
) { \
|
|
||||||
{ KM_ESC, KM_TAB, KM_BSL, KM_ARR, KM___7, KM___8, KM___9, KM_PLS, KM___1, KM___2, KM___3, }, \
|
|
||||||
{ KM_NUM, KM_FSL, KM_AST, KM_MIN, KM___4, KM___5, KM___6, KM_ENT, KC_NO, KM___0, KM_DOT, }, \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
#define LAYER_BASE 0
|
M_COPY = SAFE_RANGE, // KC_FN5: MACRO_COPY_CUT
|
||||||
#define LAYER_EDIT 1
|
M_SHFCT, // KC_FN6: MACRO_SHIFT_CONTROL
|
||||||
#define LAYER_FUNCTION 2
|
M_CTALT // KC_FN7: MACRO_CONTROL_ALT
|
||||||
|
};
|
||||||
#define MACRO_COPY_CUT 0
|
|
||||||
#define MACRO_SHIFT_CONTROL 1
|
|
||||||
#define MACRO_CONTROL_ALT 2
|
|
||||||
|
|
||||||
#define M_COPY KC_FN5
|
|
||||||
#define M_SHFCT KC_FN6
|
|
||||||
#define M_CTALT KC_FN7
|
|
||||||
|
|
||||||
#define SC_UNDO LCTL(KC_Z)
|
#define SC_UNDO LCTL(KC_Z)
|
||||||
#define SC_REDO LCTL(KC_Y)
|
#define SC_REDO LCTL(KC_Y)
|
||||||
@@ -39,100 +25,75 @@
|
|||||||
#define SC_ACLS LALT(KC_F4)
|
#define SC_ACLS LALT(KC_F4)
|
||||||
#define SC_CCLS LCTL(KC_F4)
|
#define SC_CCLS LCTL(KC_F4)
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[LAYER_BASE] = LAYOUT( \
|
[LAYER_BASE] = LAYOUT_pad21( \
|
||||||
KC_ESC, KC_TAB, KC_BSLS, KC_FN0, \
|
KC_ESC, KC_TAB, KC_BSLS, MO(2), \
|
||||||
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||||
KC_P7, KC_P8, KC_P9, XXXXXXX, \
|
KC_P7, KC_P8, KC_P9, \
|
||||||
KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
||||||
KC_P1, KC_P2, KC_P3, XXXXXXX, \
|
KC_P1, KC_P2, KC_P3, \
|
||||||
KC_P0, XXXXXXX, KC_PDOT, KC_PENT ),
|
KC_P0, KC_PDOT, KC_PENT ),
|
||||||
|
|
||||||
[LAYER_EDIT] = LAYOUT( \
|
[LAYER_EDIT] = LAYOUT_pad21( \
|
||||||
KC_ESC, KC_TAB, KC_SPC, _______, \
|
KC_ESC, KC_TAB, KC_SPC, _______, \
|
||||||
KC_FN1, SC_PSTE, SC_REDO, SC_UNDO, \
|
TG(1), SC_PSTE, SC_REDO, SC_UNDO, \
|
||||||
KC_HOME, KC_UP, KC_PGUP, XXXXXXX, \
|
KC_HOME, KC_UP, KC_PGUP, \
|
||||||
KC_LEFT, M_COPY, KC_RGHT, M_CTALT, \
|
KC_LEFT, M_COPY, KC_RGHT, M_CTALT, \
|
||||||
KC_END, KC_DOWN, KC_PGDN, XXXXXXX, \
|
KC_END, KC_DOWN, KC_PGDN, \
|
||||||
KC_BSPC, XXXXXXX, KC_DEL, M_SHFCT),
|
KC_BSPC, KC_DEL, M_SHFCT),
|
||||||
|
|
||||||
[LAYER_FUNCTION] = LAYOUT( \
|
[LAYER_FUNCTION] = LAYOUT_pad21( \
|
||||||
KC_FN2, KC_FN3, KC_FN4, _______, \
|
BL_TOGG, BL_INC, BL_DEC, _______, \
|
||||||
KC_FN1, _______, _______, _______, \
|
TG(1), _______, _______, _______, \
|
||||||
_______, _______, _______, XXXXXXX, \
|
_______, _______, _______, \
|
||||||
_______, _______, _______, _______, \
|
_______, _______, _______, _______, \
|
||||||
_______, _______, _______, XXXXXXX, \
|
_______, _______, _______, \
|
||||||
RESET, XXXXXXX, _______, _______ ),
|
RESET, _______, _______ ),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
bool process_record_user(uint16_t keycode, keyrecord_t * record) {
|
||||||
[0] = ACTION_LAYER_MOMENTARY(LAYER_FUNCTION),
|
|
||||||
[1] = ACTION_LAYER_TOGGLE(LAYER_EDIT),
|
|
||||||
[2] = ACTION_BACKLIGHT_TOGGLE(),
|
|
||||||
[3] = ACTION_BACKLIGHT_INCREASE(),
|
|
||||||
[4] = ACTION_BACKLIGHT_DECREASE(),
|
|
||||||
[5] = ACTION_MACRO_TAP(MACRO_COPY_CUT),
|
|
||||||
[6] = ACTION_MACRO_TAP(MACRO_SHIFT_CONTROL),
|
|
||||||
[7] = ACTION_MACRO_TAP(MACRO_CONTROL_ALT),
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
// MACRODOWN only works in this function
|
// MACRODOWN only works in this function
|
||||||
switch (id) {
|
switch (keycode) {
|
||||||
|
|
||||||
case MACRO_COPY_CUT:
|
case M_COPY:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
register_code(KC_LCTL);
|
register_code(KC_LCTL);
|
||||||
if (record->tap.count == 1) {
|
if (record->tap.count == 1) {
|
||||||
register_code(KC_C);
|
register_code(KC_C);
|
||||||
unregister_code(KC_C);
|
unregister_code(KC_C);
|
||||||
}
|
} else if (record->tap.count == 2) {
|
||||||
else if (record->tap.count == 2) {
|
register_code(KC_X);
|
||||||
register_code(KC_X);
|
unregister_code(KC_X);
|
||||||
unregister_code(KC_X);
|
}
|
||||||
}
|
unregister_code(KC_LCTL);
|
||||||
unregister_code(KC_LCTL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MACRO_SHIFT_CONTROL:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT));
|
|
||||||
if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL));
|
|
||||||
if (record->tap.count == 3) register_code(KC_PENT);;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL));
|
|
||||||
unregister_code(KC_PENT);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MACRO_CONTROL_ALT:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL));
|
|
||||||
if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
return MACRO_NONE;
|
case M_SHFCT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT));
|
||||||
|
if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL));
|
||||||
|
if (record->tap.count == 3) register_code(KC_PENT);;
|
||||||
|
} else {
|
||||||
|
unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL));
|
||||||
|
unregister_code(KC_PENT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case M_CTALT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL));
|
||||||
|
if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT));
|
||||||
|
} else {
|
||||||
|
unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led)
|
void led_set_user(uint8_t usb_led)
|
||||||
|
|||||||
@@ -1,35 +1,18 @@
|
|||||||
|
|
||||||
#include "arrow_pad.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
|
|
||||||
// This is the 21-key keypad to 2x11 element matrix mapping
|
enum layers {
|
||||||
#define LAYOUT( \
|
LAYER_BASE,
|
||||||
KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
|
LAYER_EDIT,
|
||||||
KM_NUM, KM_FSL, KM_AST, KM_MIN, \
|
LAYER_FUNCTION
|
||||||
KM___7, KM___8, KM___9, KM_EQU, \
|
};
|
||||||
KM___4, KM___5, KM___6, KM_PLS, \
|
|
||||||
KM___1, KM___2, KM___3, ___ENT, \
|
|
||||||
KM___0, _____0, KM_DOT, KM_ENT \
|
|
||||||
) { \
|
|
||||||
{ KM_ESC, KM_TAB, KM_BSL, KM_ARR }, \
|
|
||||||
{ KM_NUM, KM_FSL, KM_AST, KM_MIN }, \
|
|
||||||
{ KM___7, KM___8, KM___9, KM_EQU }, \
|
|
||||||
{ KM___4, KM___5, KM___6, KM_PLS }, \
|
|
||||||
{ KM___1, KM___2, KM___3, KC_NO }, \
|
|
||||||
{ KM___0, KC_NO, KM_DOT, KM_ENT } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYER_BASE 0
|
enum custom_keycodes {
|
||||||
#define LAYER_EDIT 1
|
M_COPY = SAFE_RANGE, // KC_FN5: MACRO_COPY_CUT
|
||||||
#define LAYER_FUNCTION 2
|
M_SHFCT, // KC_FN6: MACRO_SHIFT_CONTROL
|
||||||
|
M_CTALT // KC_FN7: MACRO_CONTROL_ALT
|
||||||
#define MACRO_COPY_CUT 0
|
};
|
||||||
#define MACRO_SHIFT_CONTROL 1
|
|
||||||
#define MACRO_CONTROL_ALT 2
|
|
||||||
|
|
||||||
#define M_COPY KC_FN5
|
|
||||||
#define M_SHFCT KC_FN6
|
|
||||||
#define M_CTALT KC_FN7
|
|
||||||
|
|
||||||
#define SC_UNDO LCTL(KC_Z)
|
#define SC_UNDO LCTL(KC_Z)
|
||||||
#define SC_REDO LCTL(KC_Y)
|
#define SC_REDO LCTL(KC_Y)
|
||||||
@@ -42,13 +25,10 @@
|
|||||||
#define SC_ACLS LALT(KC_F4)
|
#define SC_ACLS LALT(KC_F4)
|
||||||
#define SC_CCLS LCTL(KC_F4)
|
#define SC_CCLS LCTL(KC_F4)
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[LAYER_BASE] = LAYOUT( \
|
[LAYER_BASE] = LAYOUT( \
|
||||||
KC_ESC, KC_TAB, KC_BSLS, KC_FN0, \
|
KC_ESC, KC_TAB, KC_BSLS, MO(2), \
|
||||||
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||||
KC_P7, KC_P8, KC_P9, KC_PEQL, \
|
KC_P7, KC_P8, KC_P9, KC_PEQL, \
|
||||||
KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
KC_P4, KC_P5, KC_P6, KC_PPLS, \
|
||||||
@@ -57,15 +37,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[LAYER_EDIT] = LAYOUT( \
|
[LAYER_EDIT] = LAYOUT( \
|
||||||
KC_ESC, KC_TAB, KC_SPC, _______, \
|
KC_ESC, KC_TAB, KC_SPC, _______, \
|
||||||
KC_FN1, SC_PSTE, SC_REDO, SC_UNDO, \
|
TG(1), SC_PSTE, SC_REDO, SC_UNDO, \
|
||||||
KC_HOME, KC_UP, KC_PGUP, KC_LALT, \
|
KC_HOME, KC_UP, KC_PGUP, KC_LALT, \
|
||||||
KC_LEFT, M_COPY, KC_RGHT, KC_LCTL, \
|
KC_LEFT, M_COPY, KC_RGHT, KC_LCTL, \
|
||||||
KC_END, KC_DOWN, KC_PGDN, XXXXXXX, \
|
KC_END, KC_DOWN, KC_PGDN, XXXXXXX, \
|
||||||
KC_BSPC, KC_PENT, KC_DEL, M_SHFCT),
|
KC_BSPC, KC_PENT, KC_DEL, M_SHFCT ),
|
||||||
|
|
||||||
[LAYER_FUNCTION] = LAYOUT( \
|
[LAYER_FUNCTION] = LAYOUT( \
|
||||||
KC_FN2, KC_FN3, KC_FN4, _______, \
|
BL_TOGG, BL_INC, BL_DEC, _______, \
|
||||||
KC_FN1, _______, _______, _______, \
|
TG(1), _______, _______, _______, \
|
||||||
_______, _______, _______, _______, \
|
_______, _______, _______, _______, \
|
||||||
_______, _______, _______, _______, \
|
_______, _______, _______, _______, \
|
||||||
_______, _______, _______, XXXXXXX, \
|
_______, _______, _______, XXXXXXX, \
|
||||||
@@ -74,68 +54,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
bool process_record_user(uint16_t keycode, keyrecord_t * record) {
|
||||||
[0] = ACTION_LAYER_MOMENTARY(LAYER_FUNCTION),
|
|
||||||
[1] = ACTION_LAYER_TOGGLE(LAYER_EDIT),
|
|
||||||
[2] = ACTION_BACKLIGHT_TOGGLE(),
|
|
||||||
[3] = ACTION_BACKLIGHT_INCREASE(),
|
|
||||||
[4] = ACTION_BACKLIGHT_DECREASE(),
|
|
||||||
[5] = ACTION_MACRO_TAP(MACRO_COPY_CUT),
|
|
||||||
[6] = ACTION_MACRO_TAP(MACRO_SHIFT_CONTROL),
|
|
||||||
[7] = ACTION_MACRO_TAP(MACRO_CONTROL_ALT),
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
// MACRODOWN only works in this function
|
// MACRODOWN only works in this function
|
||||||
switch (id) {
|
switch (keycode) {
|
||||||
|
|
||||||
case MACRO_COPY_CUT:
|
case M_COPY:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
register_code(KC_LCTL);
|
register_code(KC_LCTL);
|
||||||
if (record->tap.count == 1) {
|
if (record->tap.count == 1) {
|
||||||
register_code(KC_C);
|
register_code(KC_C);
|
||||||
unregister_code(KC_C);
|
unregister_code(KC_C);
|
||||||
}
|
} else if (record->tap.count == 2) {
|
||||||
else if (record->tap.count == 2) {
|
register_code(KC_X);
|
||||||
register_code(KC_X);
|
unregister_code(KC_X);
|
||||||
unregister_code(KC_X);
|
}
|
||||||
}
|
unregister_code(KC_LCTL);
|
||||||
unregister_code(KC_LCTL);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MACRO_SHIFT_CONTROL:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT));
|
|
||||||
if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL));
|
|
||||||
if (record->tap.count == 3) register_code(KC_PENT);;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL));
|
|
||||||
unregister_code(KC_PENT);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MACRO_CONTROL_ALT:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL));
|
|
||||||
if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
return MACRO_NONE;
|
case M_SHFCT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT));
|
||||||
|
if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL));
|
||||||
|
if (record->tap.count == 3) register_code(KC_PENT);;
|
||||||
|
} else {
|
||||||
|
unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL));
|
||||||
|
unregister_code(KC_PENT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case M_CTALT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL));
|
||||||
|
if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT));
|
||||||
|
} else {
|
||||||
|
unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led)
|
void led_set_user(uint8_t usb_led)
|
||||||
|
|||||||
@@ -94,13 +94,13 @@ More info can be found on [GeekHack](https://geekhack.org/index.php?topic=73632.
|
|||||||
The second ArrowPad was a conversion from a 21-key Genovation keypad. It used a 2 row x 11 column matrix.
|
The second ArrowPad was a conversion from a 21-key Genovation keypad. It used a 2 row x 11 column matrix.
|
||||||
|
|
||||||
```
|
```
|
||||||
#define KEYMAP( \
|
#define LAYOUT_pad21( \
|
||||||
KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
|
KM_ESC, KM_TAB, KM_BSL, KM_ARR, \
|
||||||
KM_NUM, KM_FSL, KM_AST, KM_MIN, \
|
KM_NUM, KM_FSL, KM_AST, KM_MIN, \
|
||||||
KM___7, KM___8, KM___9, ___PLS, \
|
KM___7, KM___8, KM___9, \
|
||||||
KM___4, KM___5, KM___6, KM_PLS, \
|
KM___4, KM___5, KM___6, KM_PLS, \
|
||||||
KM___1, KM___2, KM___3, ___ENT, \
|
KM___1, KM___2, KM___3, \
|
||||||
KM___0, _____0, KM_DOT, KM_ENT \
|
KM___0, KM_DOT, KM_ENT \
|
||||||
) { \
|
) { \
|
||||||
{ KM_ESC, KM_TAB, KM_BSL, KM_ARR, KM___7, KM___8, KM___9, KM_PLS, KM___1, KM___2, KM___3, }, \
|
{ KM_ESC, KM_TAB, KM_BSL, KM_ARR, KM___7, KM___8, KM___9, KM_PLS, KM___1, KM___2, KM___3, }, \
|
||||||
{ KM_NUM, KM_FSL, KM_AST, KM_MIN, KM___4, KM___5, KM___6, KM_ENT, KC_NO, KM___0, KM_DOT, }, \
|
{ KM_NUM, KM_FSL, KM_AST, KM_MIN, KM___4, KM___5, KM___6, KM_ENT, KC_NO, KM___0, KM_DOT, }, \
|
||||||
@@ -119,7 +119,7 @@ Download or clone the whole firmware and navigate to the keyboards/arrow_pad fol
|
|||||||
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
||||||
|
|
||||||
### Default
|
### Default
|
||||||
To build with the default keymap, simply run `make default`.
|
To build with the default keymap, simply run `make handwired/arrow_pad:default`.
|
||||||
|
|
||||||
### Other Keymaps
|
### Other Keymaps
|
||||||
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files.
|
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files.
|
||||||
@@ -127,7 +127,7 @@ Several version of keymap are available in advance but you are recommended to de
|
|||||||
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
|
To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ make [default|pad_21|pad_24|<name>]
|
$ make handwired/arrow_pad:[default|pad_21|pad_24|<name>]
|
||||||
```
|
```
|
||||||
|
|
||||||
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
||||||
@@ -1,3 +1,2 @@
|
|||||||
SRC += pico/matrix.c \
|
SRC += pico/matrix.c
|
||||||
pico/split_util.c \
|
SRC += pico/split_util.c
|
||||||
ws2812.c
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
SRC += rev2/matrix.c
|
SRC += rev2/matrix.c
|
||||||
SRC += rev2/split_util.c
|
SRC += rev2/split_util.c
|
||||||
SRC += rev2/split_scomm.c
|
SRC += rev2/split_scomm.c
|
||||||
SRC += ws2812.c
|
|
||||||
@@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_ADJUST] = LAYOUT_wrapper(
|
[_ADJUST] = LAYOUT_wrapper(
|
||||||
KC_MAKE, _______, _______, _______, _______, _______, _________________ADJUST_R1_________________, KC_RST,
|
KC_MAKE, _______, _______, _______, _______, _______, _________________ADJUST_R1_________________, KC_RST,
|
||||||
VRSN, _________________ADJUST_L1_________________, KC_NUKE, _______, _______, _______, _______, EPRM,
|
VRSN, _________________ADJUST_L1_________________, KC_NUKE, _______, _______, _______, _______, EEP_RST,
|
||||||
_______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG_MODS,
|
_______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG_MODS,
|
||||||
_______, _________________ADJUST_L3_________________, TG_GAME, _______, _________________ADJUST_R3_________________, KC_MPLY,
|
_______, _________________ADJUST_L3_________________, TG_GAME, _______, _________________ADJUST_R3_________________, KC_MPLY,
|
||||||
_______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ RGBLIGHT_ENABLE = yes
|
|||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
NKRO_ENABLE = yes
|
NKRO_ENABLE = yes
|
||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = no
|
||||||
SWAP_HANDS_ENABLE = yes
|
SWAP_HANDS_ENABLE = no
|
||||||
|
|
||||||
INDICATOR_LIGHTS = yes
|
INDICATOR_LIGHTS = yes
|
||||||
MACROS_ENABLED = no
|
MACROS_ENABLED = no
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
#include "eeconfig.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
|||||||
@@ -1 +1,16 @@
|
|||||||
#include "lets_split_eh.h"
|
#include "lets_split_eh.h"
|
||||||
|
|
||||||
|
#ifdef SWAP_HANDS_ENABLE
|
||||||
|
__attribute__ ((weak))
|
||||||
|
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
{{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}},
|
||||||
|
{{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}},
|
||||||
|
{{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}},
|
||||||
|
{{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}},
|
||||||
|
{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}},
|
||||||
|
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
|
||||||
|
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
|
||||||
|
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}},
|
||||||
|
};
|
||||||
|
#endif
|
||||||
@@ -67,4 +67,6 @@ SPLIT_KEYBOARD = yes
|
|||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
LAYOUTS = ortho_4x12
|
||||||
|
|
||||||
DEFAULT_FOLDER = lets_split_eh/eh
|
DEFAULT_FOLDER = lets_split_eh/eh
|
||||||
@@ -0,0 +1,189 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum alt_keycodes {
|
||||||
|
L_BRI = SAFE_RANGE, //LED Brightness Increase
|
||||||
|
L_BRD, //LED Brightness Decrease
|
||||||
|
L_PTN, //LED Pattern Select Next
|
||||||
|
L_PTP, //LED Pattern Select Previous
|
||||||
|
L_PSI, //LED Pattern Speed Increase
|
||||||
|
L_PSD, //LED Pattern Speed Decrease
|
||||||
|
L_T_MD, //LED Toggle Mode
|
||||||
|
L_T_ONF, //LED Toggle On / Off
|
||||||
|
L_ON, //LED On
|
||||||
|
L_OFF, //LED Off
|
||||||
|
L_T_BR, //LED Toggle Breath Effect
|
||||||
|
L_T_PTD, //LED Toggle Scrolling Pattern Direction
|
||||||
|
U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
|
||||||
|
U_T_AGCR, //USB Toggle Automatic GCR control
|
||||||
|
DBG_TOG, //DEBUG Toggle On / Off
|
||||||
|
DBG_MTRX, //DEBUG Toggle Matrix Prints
|
||||||
|
DBG_KBD, //DEBUG Toggle Keyboard Prints
|
||||||
|
DBG_MOU, //DEBUG Toggle Mouse Prints
|
||||||
|
MD_BOOT, //Restart into bootloader after hold timeout
|
||||||
|
};
|
||||||
|
|
||||||
|
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
|
||||||
|
|
||||||
|
keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_ESC, 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_BSPC, KC_DEL, \
|
||||||
|
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_HOME, \
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
|
),
|
||||||
|
[1] = LAYOUT(
|
||||||
|
KC_GRV, 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_TRNS, KC_MUTE, \
|
||||||
|
L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \
|
||||||
|
L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \
|
||||||
|
KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \
|
||||||
|
),
|
||||||
|
/*
|
||||||
|
[X] = LAYOUT(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
|
||||||
|
),
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT))
|
||||||
|
#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL))
|
||||||
|
#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT))
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
static uint32_t key_timer;
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case L_BRI:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
|
||||||
|
else gcr_desired += LED_GCR_STEP;
|
||||||
|
if (led_animation_breathing) gcr_breathe = gcr_desired;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case L_BRD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
|
||||||
|
else gcr_desired -= LED_GCR_STEP;
|
||||||
|
if (led_animation_breathing) gcr_breathe = gcr_desired;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case L_PTN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
|
||||||
|
else led_animation_id++;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case L_PTP:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
|
||||||
|
else led_animation_id--;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case L_PSI:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
led_animation_speed += ANIMATION_SPEED_STEP;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case L_PSD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
led_animation_speed -= ANIMATION_SPEED_STEP;
|
||||||
|
if (led_animation_speed < 0) led_animation_speed = 0;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case L_T_MD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
led_lighting_mode++;
|
||||||
|
if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case L_T_ONF:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
led_enabled = !led_enabled;
|
||||||
|
I2C3733_Control_Set(led_enabled);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case L_ON:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
led_enabled = 1;
|
||||||
|
I2C3733_Control_Set(led_enabled);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case L_OFF:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
led_enabled = 0;
|
||||||
|
I2C3733_Control_Set(led_enabled);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case L_T_BR:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
led_animation_breathing = !led_animation_breathing;
|
||||||
|
if (led_animation_breathing) {
|
||||||
|
gcr_breathe = gcr_desired;
|
||||||
|
led_animation_breathe_cur = BREATHE_MIN_STEP;
|
||||||
|
breathe_dir = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case L_T_PTD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
led_animation_direction = !led_animation_direction;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case U_T_AUTO:
|
||||||
|
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
|
||||||
|
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case U_T_AGCR:
|
||||||
|
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
|
||||||
|
TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case DBG_TOG:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case DBG_MTRX:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case DBG_KBD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case DBG_MOU:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case MD_BOOT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
key_timer = timer_read32();
|
||||||
|
} else {
|
||||||
|
if (timer_elapsed32(key_timer) >= 500) {
|
||||||
|
reset_keyboard();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true; //Process all other keycodes normally
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_ADJUST] = LAYOUT_wrapper(\
|
[_ADJUST] = LAYOUT_wrapper(\
|
||||||
KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET,
|
KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET,
|
||||||
VRSN, _________________ADJUST_L2_________________, _______, _______, _______, KC_NUKE, _________________ADJUST_R2_________________, EPRM,
|
VRSN, _________________ADJUST_L2_________________, _______, _______, _______, KC_NUKE, _________________ADJUST_R2_________________, EEP_RST,
|
||||||
TG_MODS, _________________ADJUST_L3_________________, _______, _______, _______, _______, _______, _______, _________________ADJUST_R3_________________, KC_MPLY
|
TG_MODS, _________________ADJUST_L3_________________, _______, _______, _______, _______, _______, _______, _________________ADJUST_R3_________________, KC_MPLY
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
Copyright 2015 Jack Humbert
|
||||||
|
Copyright 2018 Danny Nguyen <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
// #define USE_I2C
|
||||||
|
|
||||||
|
#define TAPPING_TERM 500
|
||||||
|
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
|
#define PERMISSIVE_HOLD
|
||||||
|
#define FORCE_NKRO
|
||||||
|
#define RETRO_TAPPING
|
||||||
|
|
||||||
|
#define TAPPING_TOGGLE 1
|
||||||
|
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#define RGBLIGHT_SLEEP
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _BASE 0
|
||||||
|
#define _FN1 1
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT_65(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_HOME, \
|
||||||
|
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_END, \
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_DEL, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_INS, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, LT(_FN1,KC_SPC),KC_SPC, KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, XXXXXXX, KC_APP, KC_RCTL, TT(_FN1)
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN1] = LAYOUT_65(
|
||||||
|
KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_BSPC, KC_PGUP, \
|
||||||
|
_______, _______, KC_UP, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, KC_PGDN, \
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, \
|
||||||
|
_______, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, KC_P0, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # 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 = no # 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 = yes # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
SPLIT_KEYBOARD = yes
|
||||||
@@ -18,12 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/* Use I2C or Serial, not both */
|
/* Use I2C or Serial, not both */
|
||||||
|
#define USE_SERIAL
|
||||||
// #define USE_SERIAL
|
// #define USE_I2C
|
||||||
#define USE_I2C
|
|
||||||
|
|
||||||
/* Select hand configuration */
|
/* Select hand configuration */
|
||||||
|
|
||||||
#define MASTER_LEFT
|
#define MASTER_LEFT
|
||||||
// #define MASTER_RIGHT
|
// #define MASTER_RIGHT
|
||||||
// #define EE_HANDS
|
// #define EE_HANDS
|
||||||
|
|||||||
@@ -18,12 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/* Use I2C or Serial, not both */
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
#define USE_SERIAL
|
#define USE_SERIAL
|
||||||
// #define USE_I2C
|
// #define USE_I2C
|
||||||
|
|
||||||
/* Select hand configuration */
|
/* Select hand configuration */
|
||||||
|
|
||||||
#define MASTER_LEFT
|
#define MASTER_LEFT
|
||||||
// #define MASTER_RIGHT
|
// #define MASTER_RIGHT
|
||||||
// #define EE_HANDS
|
// #define EE_HANDS
|
||||||
|
|||||||
@@ -18,14 +18,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/* Use I2C or Serial, not both */
|
/* Use I2C or Serial, not both */
|
||||||
|
#define USE_SERIAL
|
||||||
// #define USE_SERIAL
|
// #define USE_I2C
|
||||||
#define USE_I2C
|
|
||||||
|
|
||||||
/* Select hand configuration */
|
/* Select hand configuration */
|
||||||
|
|
||||||
// #define MASTER_LEFT
|
|
||||||
#define MASTER_LEFT
|
#define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
// #define EE_HANDS
|
// #define EE_HANDS
|
||||||
|
|
||||||
#undef RGBLED_NUM
|
#undef RGBLED_NUM
|
||||||
|
|||||||
@@ -18,12 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/* Use I2C or Serial, not both */
|
/* Use I2C or Serial, not both */
|
||||||
|
#define USE_SERIAL
|
||||||
// #define USE_SERIAL
|
// #define USE_I2C
|
||||||
#define USE_I2C
|
|
||||||
|
|
||||||
/* Select hand configuration */
|
/* Select hand configuration */
|
||||||
|
|
||||||
#define MASTER_LEFT
|
#define MASTER_LEFT
|
||||||
// #define MASTER_RIGHT
|
// #define MASTER_RIGHT
|
||||||
// #define EE_HANDS
|
// #define EE_HANDS
|
||||||
|
|||||||
@@ -17,16 +17,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/* Use I2C or Serial, not both */
|
|
||||||
|
|
||||||
/* Change the default tapping toggle value (normally 5) */
|
/* Change the default tapping toggle value (normally 5) */
|
||||||
#define TAPPING_TOGGLE 2
|
#define TAPPING_TOGGLE 2
|
||||||
|
|
||||||
|
/* Use I2C or Serial, not both */
|
||||||
#define USE_SERIAL
|
#define USE_SERIAL
|
||||||
//#define USE_I2C
|
//#define USE_I2C
|
||||||
|
|
||||||
/* Select hand configuration */
|
/* Select hand configuration */
|
||||||
|
|
||||||
#define MASTER_LEFT
|
#define MASTER_LEFT
|
||||||
// #define MASTER_RIGHT
|
// #define MASTER_RIGHT
|
||||||
// #define EE_HANDS
|
// #define EE_HANDS
|
||||||
|
|||||||
@@ -66,9 +66,7 @@ UNICODE_ENABLE = no # Unicode
|
|||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
SUBPROJECT_rev1 = yes
|
|
||||||
USE_I2C = yes
|
|
||||||
|
|
||||||
SPLIT_KEYBOARD = yes
|
SPLIT_KEYBOARD = yes
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _BL 0
|
||||||
|
#define _FL 1
|
||||||
|
#define _NL 2
|
||||||
|
|
||||||
|
#define SEMI_FN LT(_FL, KC_SCLN)
|
||||||
|
|
||||||
|
//Tap Dance Declarations
|
||||||
|
enum {
|
||||||
|
TD_WIN_LOCK = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
//BL_BRTG - breathing mode. Would like to put in.
|
||||||
|
|
||||||
|
//Tap Dance Definitions
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_WIN_LOCK] = ACTION_TAP_DANCE_DOUBLE(MAGIC_NO_GUI, MAGIC_UNNO_GUI)
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
////In Layer declaration, add tap dance item in place of a key code
|
||||||
|
//TD(TD_WIN_LOCK)
|
||||||
|
|
||||||
|
// Double Tap Fn button to get caps. FN + Tab to get to number layer -> Maybe switch to FN + space?.
|
||||||
|
// Press fn+GUI once to lock, double tap to unlock.
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _BL: (Base Layer) Default Layer
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |FNCAP| A| S| D| F| G| H| J| K| L| ;| '|Enter |PgUp |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig |
|
||||||
|
* `----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT_ansi(
|
||||||
|
KC_GESC, 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_BSPC,KC_GRV, \
|
||||||
|
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_DEL, \
|
||||||
|
LT(_FL, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SEMI_FN,KC_QUOT, KC_ENT,KC_PGUP, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,KC_UP,KC_PGDN, \
|
||||||
|
KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT),
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del | |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |#PAD |Pre| U |NXT| | | |PGD| U |PGU|PSC| | | |Ins |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | |L | D | R |PPl| | | L | D | R | | | |Home|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | CAPS |MUT|VU-|VU+| | | |BRG|BL-|BL+|BLT| |Stp|End |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | |WTOG| | | | | |Pre|PPl|Nxt |
|
||||||
|
* `----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FL] = LAYOUT_ansi(
|
||||||
|
_______, 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_DEL, _______ , \
|
||||||
|
TO(_NL),KC_MPRV, KC_UP ,KC_MNXT,_______, _______,_______,KC_PGDN,KC_UP,KC_PGUP,KC_PSCR,_______,_______, _______,KC_INSERT, \
|
||||||
|
_______,KC_LEFT,KC_DOWN,KC_RGHT,KC_MPLY,_______,_______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______, _______,KC_HOME, \
|
||||||
|
_______,KC_MUTE,KC_VOLD,KC_VOLU, _______,_______, _______,BL_BRTG,BL_DEC,BL_INC,BL_TOGG,_______, KC_STOP, KC_END, \
|
||||||
|
_______,TD(TD_WIN_LOCK),_______, _______, _______,KC_TRNS,_______,KC_MPRV,KC_MPLY, KC_MNXT),
|
||||||
|
|
||||||
|
|
||||||
|
//Press either of function keys to get back to base layer.
|
||||||
|
|
||||||
|
/* Keymap _NL: Number Layer
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* |ESC| F1 | F2| F3| F4| |#L | 7 | 8 | 9 | - | | = | | |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | TAB | | UP| | | | / | 4 | 5 | 6 | + | | | | DEL|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | _BL |LFT|DWN|RGT| | | * | 1 | 2 | 3 |ENT| | ENT |PgUp|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | SHIFT | | | | | | 0 | 0 | , | . |BKS| SHIFT| U |PgDn|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |CTRL|WIN |ALT | |ALT| _BL |CTRL| L | D | R|
|
||||||
|
* `----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_NL] = LAYOUT_ansi(
|
||||||
|
_______, KC_F1 ,KC_F2, KC_F3, KC_F4, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_PEQL, KC_PEQL, _______, _______ , \
|
||||||
|
KC_TAB,_______, KC_UP,_______,_______, _______,KC_PSLS,KC_P4,KC_P5,KC_P6,KC_PPLS,_______,_______, _______,KC_DEL, \
|
||||||
|
TO(_BL),KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,KC_PAST,KC_P1,KC_P2,KC_P3,KC_PENT,_______, KC_ENT,KC_PGUP, \
|
||||||
|
KC_LSFT,_______,_______,_______, _______,_______, KC_P0,KC_P0,KC_PCMM,KC_PDOT,KC_BSPC,KC_RSFT, KC_UP, KC_PGDN, \
|
||||||
|
KC_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,TO(_BL),KC_RCTRL,KC_LEFT,KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Godolphins13 Tada68
|
||||||
|
|
||||||
|
My Tada68 layout.
|
||||||
|
Caps lock acts as a function key when held, otherwise just caps lock.
|
||||||
|
In the function layer, arrow keys mapped to both wasd and ijkl, as I haven't really decided which I like best.
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # 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 = yes # 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 = yes # Breathing sleep LED during USB suspend
|
||||||
|
TAP_DANCE_ENABLE = yes # Tappa Dance Bitch
|
||||||
@@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_MEDIA] = LAYOUT_ortho_5x7(
|
[_MEDIA] = LAYOUT_ortho_5x7(
|
||||||
KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD,
|
KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD,
|
||||||
MEDIA, EPRM, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI,
|
MEDIA, EEP_RST, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI,
|
||||||
RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_HUD,
|
RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_HUD,
|
||||||
KC_MPLY, KC_MPRV, KC_MNXT, RGB_M_X, RGB_M_G, RGB_M_P, RGB_HUI,
|
KC_MPLY, KC_MPRV, KC_MNXT, RGB_M_X, RGB_M_G, RGB_M_P, RGB_HUI,
|
||||||
KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI
|
KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI
|
||||||
@@ -94,5 +94,3 @@ void matrix_init_keymap(void) {
|
|||||||
DDRB &= ~(1<<0);
|
DDRB &= ~(1<<0);
|
||||||
PORTB &= ~(1<<0);
|
PORTB &= ~(1<<0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -20,8 +20,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifdef UNICODEMAP_ENABLE
|
#ifdef UNICODEMAP_ENABLE
|
||||||
#include "drashna_unicode.h"
|
#include "drashna_unicode.h"
|
||||||
#endif // UNICODEMAP_ENABLE
|
#endif // UNICODEMAP_ENABLE
|
||||||
|
extern uint8_t input_mode;
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
extern bool g_suspend_state;
|
||||||
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
#endif
|
||||||
|
extern userspace_config_t userspace_config;
|
||||||
|
|
||||||
//enum more_custom_keycodes {
|
//enum more_custom_keycodes {
|
||||||
// KC_P00 = NEW_SAFE_RANGE
|
// KC_P00 = NEW_SAFE_RANGE
|
||||||
@@ -40,7 +45,7 @@ bool skip_leds = false;
|
|||||||
KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \
|
KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||||
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, CTL_T(K2A), KC_MRSF, \
|
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, CTL_T(K2A), KC_MRSF, \
|
||||||
KC_GRV, OSM(MOD_MEH),OSM(MOD_LGUI),KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC_SHRG, \
|
KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \
|
||||||
OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \
|
OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \
|
||||||
KC_HOME, KC_PGUP, \
|
KC_HOME, KC_PGUP, \
|
||||||
LT(_LOWER, KC_SPACE),KC_BSPC, KC_END, KC_PGDN, KC_DEL, LT(_RAISE, KC_ENTER) \
|
LT(_LOWER, KC_SPACE),KC_BSPC, KC_END, KC_PGDN, KC_DEL, LT(_RAISE, KC_ENTER) \
|
||||||
@@ -198,7 +203,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
[_GAMEPAD] = LAYOUT_ergodox_pretty_wrapper(
|
[_GAMEPAD] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
KC_ESC, KC_NO, KC_1, KC_2, KC_3, HYPR(KC_Q), HYPR(KC_GRV), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
KC_ESC, KC_NO, KC_1, KC_2, KC_3, HYPR(KC_Q), HYPR(KC_GRV), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||||
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, UC_SHRG, UC_DISA, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, UC_SHRG, UC_DISA, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO,
|
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO,
|
KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO,
|
||||||
@@ -263,7 +268,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_ADJUST] = LAYOUT_ergodox_pretty_wrapper(
|
[_ADJUST] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _________________ADJUST_R1_________________, KC_RST,
|
KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _________________ADJUST_R1_________________, KC_RST,
|
||||||
VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EPRM,
|
VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EEP_RST,
|
||||||
_______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG(_MODS),
|
_______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG(_MODS),
|
||||||
_______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, KC_MPLY,
|
_______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, KC_MPLY,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
@@ -290,10 +295,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_init_keymap(void) { // Runs boot tasks for keyboard
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void matrix_scan_keymap(void) { // runs frequently to update info
|
void matrix_scan_keymap(void) { // runs frequently to update info
|
||||||
uint8_t modifiers = get_mods();
|
uint8_t modifiers = get_mods();
|
||||||
uint8_t led_usb_state = host_keyboard_leds();
|
uint8_t led_usb_state = host_keyboard_leds();
|
||||||
@@ -335,3 +336,106 @@ bool indicator_is_this_led_used_keyboard(uint8_t index) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
|
||||||
|
void suspend_power_down_keymap(void) {
|
||||||
|
rgb_matrix_set_suspend_state(true);
|
||||||
|
rgb_matrix_config.enable = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void suspend_wakeup_init_keymap(void) {
|
||||||
|
rgb_matrix_config.enable = true;
|
||||||
|
rgb_matrix_set_suspend_state(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
|
rgb_led led;
|
||||||
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
|
led = g_rgb_leds[i];
|
||||||
|
if (led.matrix_co.raw < 0xFF) {
|
||||||
|
if (led.modifier) {
|
||||||
|
rgb_matrix_set_color( i, red, green, blue );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgb_matrix_indicators_user(void) {
|
||||||
|
if (g_suspend_state || !rgb_matrix_config.enable || !userspace_config.rgb_layer_change) return;
|
||||||
|
|
||||||
|
switch (biton32(layer_state)) {
|
||||||
|
case _MODS:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
|
||||||
|
case _GAMEPAD:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0x80, 0x00);
|
||||||
|
rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q
|
||||||
|
rgb_matrix_set_color(31, 0x00, 0xFF, 0xFF); // W
|
||||||
|
rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); // E
|
||||||
|
rgb_matrix_set_color(29, 0xFF, 0x80, 0x00); // R
|
||||||
|
rgb_matrix_set_color(37, 0x00, 0xFF, 0xFF); // A
|
||||||
|
rgb_matrix_set_color(36, 0x00, 0xFF, 0xFF); // S
|
||||||
|
rgb_matrix_set_color(35, 0x00, 0xFF, 0xFF); // D
|
||||||
|
rgb_matrix_set_color(34, 0x7A, 0x00, 0xFF); // F
|
||||||
|
|
||||||
|
rgb_matrix_set_color(27, 0xFF, 0xFF, 0xFF); // 1
|
||||||
|
rgb_matrix_set_color(26, 0x00, 0xFF, 0x00); // 2
|
||||||
|
rgb_matrix_set_color(25, 0x7A, 0x00, 0xFF); // 3
|
||||||
|
|
||||||
|
break;
|
||||||
|
case _DIABLO:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break;
|
||||||
|
case _RAISE:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
|
||||||
|
case _LOWER:
|
||||||
|
rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
|
||||||
|
case _ADJUST:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break;
|
||||||
|
default:
|
||||||
|
switch (biton32(default_layer_state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
rgb_matrix_layer_helper(0x00, 0xFF, 0xFF); break;
|
||||||
|
case _COLEMAK:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0x00, 0xFF); break;
|
||||||
|
case _DVORAK:
|
||||||
|
rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
|
||||||
|
case _WORKMAN:
|
||||||
|
rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#if 0
|
||||||
|
if (this_mod & MODS_SHIFT_MASK || this_led & (1<<USB_LED_CAPS_LOCK) || this_osm & MODS_SHIFT_MASK) {
|
||||||
|
rgb_matrix_set_color(24, 0x00, 0xFF, 0x00);
|
||||||
|
rgb_matrix_set_color(36, 0x00, 0xFF, 0x00);
|
||||||
|
}
|
||||||
|
if (this_mod & MODS_CTRL_MASK || this_osm & MODS_CTRL_MASK) {
|
||||||
|
rgb_matrix_set_color(25, 0xFF, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(34, 0xFF, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(37, 0xFF, 0x00, 0x00);
|
||||||
|
|
||||||
|
}
|
||||||
|
if (this_mod & MODS_GUI_MASK || this_osm & MODS_GUI_MASK) {
|
||||||
|
rgb_matrix_set_color(39, 0xFF, 0xD9, 0x00);
|
||||||
|
}
|
||||||
|
if (this_mod & MODS_ALT_MASK || this_osm & MODS_ALT_MASK) {
|
||||||
|
rgb_matrix_set_color(38, 0x00, 0x00, 0xFF);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_keymap(void) {
|
||||||
|
#ifdef RGB_MATRIX_KEYPRESSES
|
||||||
|
rgblight_mode(RGB_MATRIX_MULTISPLASH);
|
||||||
|
#else
|
||||||
|
rgblight_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
input_mode = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
void matrix_init_keymap(void) {
|
||||||
|
input_mode = 2;
|
||||||
|
}
|
||||||
|
#endif //RGB_MATRIX_INIT
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Note: This board will not flash if the "g_rgb_leds" const is not set to weak in the ergodox_ez.c file
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../drashna/config.h"
|
||||||
|
|
||||||
|
#undef PRODUCT
|
||||||
|
#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Glow
|
||||||
|
|
||||||
|
#undef DEBOUNCE
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
// #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
/* placeholder file */
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||||
|
|
||||||
|
/*{row | col << 4}
|
||||||
|
| {x=0..224, y=0..64}
|
||||||
|
| | modifier
|
||||||
|
| | | */
|
||||||
|
{{0|(0<<4)}, {24.9*5, 16*0}, 0}, // LED 1 on right
|
||||||
|
{{0|(1<<4)}, {24.9*6, 16*0}, 0}, // LED 2
|
||||||
|
{{0|(2<<4)}, {24.9*7, 16*0}, 0}, // LED 3
|
||||||
|
{{0|(3<<4)}, {24.9*8, 16*0}, 0}, // LED 4
|
||||||
|
{{0|(4<<4)}, {24.9*9, 16*0}, 0}, // LED 5
|
||||||
|
|
||||||
|
{{1|(5<<4)}, {24.9*5, 16*1}, 0}, // LED 6
|
||||||
|
{{1|(6<<4)}, {24.9*6, 16*1}, 0}, // LED 7
|
||||||
|
{{1|(7<<4)}, {24.9*7, 16*1}, 0}, // LED 8
|
||||||
|
{{1|(8<<4)}, {24.9*8, 16*1}, 0}, // LED 9
|
||||||
|
{{1|(9<<4)}, {24.9*9, 16*1}, 0}, // LED 10
|
||||||
|
|
||||||
|
{{2|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 11
|
||||||
|
{{2|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 12
|
||||||
|
{{2|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 13
|
||||||
|
{{2|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 14
|
||||||
|
{{2|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 15
|
||||||
|
|
||||||
|
{{3|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 16
|
||||||
|
{{3|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 17
|
||||||
|
{{3|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 18
|
||||||
|
{{3|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 19
|
||||||
|
{{3|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 20
|
||||||
|
|
||||||
|
{{4|(6<<4)}, {24.9*6, 16*2}, 1}, // LED 21
|
||||||
|
{{4|(7<<4)}, {24.9*7, 16*2}, 1}, // LED 22
|
||||||
|
{{4|(8<<4)}, {24.9*8, 16*2}, 1}, // LED 23
|
||||||
|
{{4|(9<<4)}, {24.9*9, 16*2}, 1}, // LED 24
|
||||||
|
|
||||||
|
{{0|(0<<4)}, {24.9*4, 16*0}, 0}, // LED 1 on left
|
||||||
|
{{0|(1<<4)}, {24.9*3, 16*0}, 0}, // LED 2
|
||||||
|
{{0|(2<<4)}, {24.9*2, 16*0}, 0}, // LED 3
|
||||||
|
{{0|(3<<4)}, {24.9*1, 16*0}, 0}, // LED 4
|
||||||
|
{{0|(4<<4)}, {24.9*0, 16*0}, 0}, // LED 5
|
||||||
|
|
||||||
|
{{1|(5<<4)}, {24.9*4, 16*1}, 0}, // LED 6
|
||||||
|
{{1|(6<<4)}, {24.9*3, 16*1}, 0}, // LED 7
|
||||||
|
{{1|(7<<4)}, {24.9*2, 16*1}, 0}, // LED 8
|
||||||
|
{{1|(8<<4)}, {24.9*1, 16*1}, 0}, // LED 9
|
||||||
|
{{1|(9<<4)}, {24.9*0, 16*1}, 0}, // LED 10
|
||||||
|
|
||||||
|
{{2|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 11
|
||||||
|
{{2|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 12
|
||||||
|
{{2|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 13
|
||||||
|
{{2|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 14
|
||||||
|
{{2|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 15
|
||||||
|
|
||||||
|
{{3|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 16
|
||||||
|
{{3|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 17
|
||||||
|
{{3|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 18
|
||||||
|
{{3|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 19
|
||||||
|
{{3|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 20
|
||||||
|
|
||||||
|
{{4|(6<<4)}, {24.9*3, 16*2}, 1}, // LED 21
|
||||||
|
{{4|(7<<4)}, {24.9*2, 16*2}, 1}, // LED 22
|
||||||
|
{{4|(8<<4)}, {24.9*1, 16*2}, 1}, // LED 23
|
||||||
|
{{4|(9<<4)}, {24.9*0, 16*2}, 1}, // LED 24
|
||||||
|
};
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
USER_NAME := drashna
|
||||||
|
SRC += ../drashna/keymap.c
|
||||||
|
|
||||||
|
-include $$(LAYOUT_KEYMAP_PATH)/../drashna/rules.mk
|
||||||
|
|
||||||
|
ifneq (,$(findstring ergodox_ez,$(KEYBOARD)))
|
||||||
|
RGBLIGHT_ENABLE = no
|
||||||
|
RGB_MATRIX_ENABLE = yes
|
||||||
|
endif
|
||||||
@@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_ADJUST] = LAYOUT_ortho_4x12_wrapper(
|
[_ADJUST] = LAYOUT_ortho_4x12_wrapper(
|
||||||
KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST,
|
KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST,
|
||||||
VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EPRM,
|
VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST,
|
||||||
_______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS,
|
_______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
# define println(s) xputs(PSTR(s "\r\n"))
|
# define println(s) xputs(PSTR(s "\r\n"))
|
||||||
# define uprint(s) print(s)
|
# define uprint(s) print(s)
|
||||||
# define uprintln(s) println(s)
|
# define uprintln(s) println(s)
|
||||||
# define uprintf(fmt, ...) xprintf(fmt, ...)
|
# define uprintf(fmt, ...) xprintf(fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
# endif /* USER_PRINT / NORMAL PRINT */
|
# endif /* USER_PRINT / NORMAL PRINT */
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ void print_set_sendchar(int8_t (*print_sendchar_func)(uint8_t));
|
|||||||
# define println(s) xprintf(s "\r\n")
|
# define println(s) xprintf(s "\r\n")
|
||||||
# define uprint(s) print(s)
|
# define uprint(s) print(s)
|
||||||
# define uprintln(s) println(s)
|
# define uprintln(s) println(s)
|
||||||
# define uprintf(fmt, ...) xprintf(fmt, ...)
|
# define uprintf(fmt, ...) xprintf(fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
# endif /* USER_PRINT / NORMAL PRINT */
|
# endif /* USER_PRINT / NORMAL PRINT */
|
||||||
|
|
||||||
@@ -141,19 +141,19 @@ void print_set_sendchar(int8_t (*print_sendchar_func)(uint8_t));
|
|||||||
# define xprintf(fmt, ...)
|
# define xprintf(fmt, ...)
|
||||||
|
|
||||||
// Create user print defines
|
// Create user print defines
|
||||||
# define uprintf(fmt, ...) __xprintf(fmt, ...)
|
# define uprintf(fmt, ...) __xprintf(fmt, ##__VA_ARGS__)
|
||||||
# define uprint(s) xprintf(s)
|
# define uprint(s) xprintf(s)
|
||||||
# define uprintln(s) xprintf(s "\r\n")
|
# define uprintln(s) xprintf(s "\r\n")
|
||||||
|
|
||||||
# else /* NORMAL PRINT */
|
# else /* NORMAL PRINT */
|
||||||
|
|
||||||
// Create user & normal print defines
|
// Create user & normal print defines
|
||||||
# define xprintf(fmt, ...) __xprintf(fmt, ...)
|
# define xprintf(fmt, ...) __xprintf(fmt, ##__VA_ARGS__)
|
||||||
# define print(s) xprintf(s)
|
# define print(s) xprintf(s)
|
||||||
# define println(s) xprintf(s "\r\n")
|
# define println(s) xprintf(s "\r\n")
|
||||||
# define uprint(s) print(s)
|
# define uprint(s) print(s)
|
||||||
# define uprintln(s) println(s)
|
# define uprintln(s) println(s)
|
||||||
# define uprintf(fmt, ...) xprintf(fmt, ...)
|
# define uprintf(fmt, ...) xprintf(fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
# endif /* USER_PRINT / NORMAL PRINT */
|
# endif /* USER_PRINT / NORMAL PRINT */
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,10 @@
|
|||||||
#ifdef TAPPING_TERM
|
#ifdef TAPPING_TERM
|
||||||
#undef TAPPING_TERM
|
#undef TAPPING_TERM
|
||||||
#endif // TAPPING_TERM
|
#endif // TAPPING_TERM
|
||||||
#ifdef KEYBOARD_ergodox_ez
|
#if defined(KEYBOARD_ergodox_ez)
|
||||||
#define TAPPING_TERM 185
|
#define TAPPING_TERM 185
|
||||||
|
#elif defined(KEYBOARD_crkbd)
|
||||||
|
#define TAPPING_TERM 200
|
||||||
#else
|
#else
|
||||||
#define TAPPING_TERM 175
|
#define TAPPING_TERM 175
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+12
-10
@@ -173,12 +173,15 @@ void matrix_init_user(void) {
|
|||||||
get_unicode_input_mode();
|
get_unicode_input_mode();
|
||||||
#endif //UNICODE_ENABLE
|
#endif //UNICODE_ENABLE
|
||||||
matrix_init_keymap();
|
matrix_init_keymap();
|
||||||
}
|
|
||||||
|
|
||||||
void startup_user (void) {
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
matrix_init_rgb();
|
matrix_init_rgb();
|
||||||
#endif //RGBLIGHT_ENABLE
|
#endif //RGBLIGHT_ENABLE
|
||||||
|
}
|
||||||
|
|
||||||
|
void startup_user (void) {
|
||||||
|
// #ifdef RGBLIGHT_ENABLE
|
||||||
|
// matrix_init_rgb();
|
||||||
|
// #endif //RGBLIGHT_ENABLE
|
||||||
startup_keymap();
|
startup_keymap();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,11 +297,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EPRM: // Resets EEPROM
|
|
||||||
if (record->event.pressed) {
|
|
||||||
eeconfig_init();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case VRSN: // Prints firmware version
|
case VRSN: // Prints firmware version
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), MACRO_TIMER);
|
send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), MACRO_TIMER);
|
||||||
@@ -392,7 +390,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return process_record_keymap(keycode, record) &&
|
return process_record_keymap(keycode, record) &&
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||||
process_record_user_rgb(keycode, record) &&
|
process_record_user_rgb(keycode, record) &&
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
process_record_secrets(keycode, record);
|
process_record_secrets(keycode, record);
|
||||||
@@ -413,7 +411,11 @@ uint32_t layer_state_set_user(uint32_t state) {
|
|||||||
|
|
||||||
|
|
||||||
uint32_t default_layer_state_set_user(uint32_t state) {
|
uint32_t default_layer_state_set_user(uint32_t state) {
|
||||||
return default_layer_state_set_keymap(state);
|
state = default_layer_state_set_keymap(state);
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
state = default_layer_state_set_rgb(state);
|
||||||
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ typedef union {
|
|||||||
};
|
};
|
||||||
} userspace_config_t;
|
} userspace_config_t;
|
||||||
|
|
||||||
|
extern userspace_config_t userspace_config;
|
||||||
|
|
||||||
#if defined(KEYMAP_SAFE_RANGE)
|
#if defined(KEYMAP_SAFE_RANGE)
|
||||||
#define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE
|
#define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE
|
||||||
#else
|
#else
|
||||||
@@ -80,8 +82,7 @@ typedef union {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum userspace_custom_keycodes {
|
enum userspace_custom_keycodes {
|
||||||
EPRM = PLACEHOLDER_SAFE_RANGE, // Resets EEPROM do defaults (as in eeconfig_init)
|
VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info
|
||||||
VRSN, // Prints QMK Firmware and board info
|
|
||||||
KC_QWERTY, // Sets default layer to QWERTY
|
KC_QWERTY, // Sets default layer to QWERTY
|
||||||
KC_COLEMAK, // Sets default layer to COLEMAK
|
KC_COLEMAK, // Sets default layer to COLEMAK
|
||||||
KC_DVORAK, // Sets default layer to DVORAK
|
KC_DVORAK, // Sets default layer to DVORAK
|
||||||
@@ -159,6 +160,9 @@ enum userspace_custom_keycodes {
|
|||||||
#define OS_RCTL OSM(MOD_RCTL)
|
#define OS_RCTL OSM(MOD_RCTL)
|
||||||
#define OS_LALT OSM(MOD_LALT)
|
#define OS_LALT OSM(MOD_LALT)
|
||||||
#define OS_RALT OSM(MOD_RALT)
|
#define OS_RALT OSM(MOD_RALT)
|
||||||
|
#define OS_MEH OSM(MOD_MEH)
|
||||||
|
#define OS_HYPR OSM(MOD_HYPR)
|
||||||
|
|
||||||
#define ALT_APP ALT_T(KC_APP)
|
#define ALT_APP ALT_T(KC_APP)
|
||||||
|
|
||||||
#define MG_NKRO MAGIC_TOGGLE_NKRO
|
#define MG_NKRO MAGIC_TOGGLE_NKRO
|
||||||
|
|||||||
+60
-26
@@ -2,8 +2,11 @@
|
|||||||
#include "rgb_stuff.h"
|
#include "rgb_stuff.h"
|
||||||
#include "eeprom.h"
|
#include "eeprom.h"
|
||||||
|
|
||||||
|
#if defined(RGBLIGHT_ENABLE)
|
||||||
extern rgblight_config_t rgblight_config;
|
extern rgblight_config_t rgblight_config;
|
||||||
extern userspace_config_t userspace_config;
|
#elif defined(RGB_MATRIX_ENABLE)
|
||||||
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
void rgblight_sethsv_default_helper(uint8_t index) {
|
void rgblight_sethsv_default_helper(uint8_t index) {
|
||||||
@@ -209,7 +212,7 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
return true; break;
|
return true; break;
|
||||||
#endif // RGBLIGHT_TWINKLE
|
#endif // RGBLIGHT_TWINKLE
|
||||||
case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
|
case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
userspace_config.rgb_layer_change ^= 1;
|
userspace_config.rgb_layer_change ^= 1;
|
||||||
xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
|
xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
|
||||||
@@ -237,24 +240,25 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void matrix_init_rgb(void) {
|
void matrix_init_rgb(void) {
|
||||||
|
|
||||||
if (userspace_config.rgb_layer_change) {
|
// #ifdef RGBLIGHT_ENABLE
|
||||||
rgblight_init();
|
// if (userspace_config.rgb_layer_change) {
|
||||||
rgblight_enable_noeeprom();
|
// rgblight_enable_noeeprom();
|
||||||
switch (biton32(eeconfig_read_default_layer())) {
|
// switch (biton32(eeconfig_read_default_layer())) {
|
||||||
case _COLEMAK:
|
// case _COLEMAK:
|
||||||
rgblight_sethsv_noeeprom_magenta(); break;
|
// rgblight_sethsv_noeeprom_magenta(); break;
|
||||||
case _DVORAK:
|
// case _DVORAK:
|
||||||
rgblight_sethsv_noeeprom_springgreen(); break;
|
// rgblight_sethsv_noeeprom_springgreen(); break;
|
||||||
case _WORKMAN:
|
// case _WORKMAN:
|
||||||
rgblight_sethsv_noeeprom_goldenrod(); break;
|
// rgblight_sethsv_noeeprom_goldenrod(); break;
|
||||||
default:
|
// default:
|
||||||
rgblight_sethsv_noeeprom_cyan(); break;
|
// rgblight_sethsv_noeeprom_cyan(); break;
|
||||||
}
|
// }
|
||||||
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
|
// rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
}
|
// }
|
||||||
}
|
// #endif
|
||||||
|
}
|
||||||
|
|
||||||
void matrix_scan_rgb(void) {
|
void matrix_scan_rgb(void) {
|
||||||
#ifdef RGBLIGHT_TWINKLE
|
#ifdef RGBLIGHT_TWINKLE
|
||||||
@@ -270,7 +274,6 @@ void matrix_scan_rgb(void) {
|
|||||||
|
|
||||||
uint32_t layer_state_set_rgb(uint32_t state) {
|
uint32_t layer_state_set_rgb(uint32_t state) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
static bool has_ran;
|
|
||||||
if (userspace_config.rgb_layer_change) {
|
if (userspace_config.rgb_layer_change) {
|
||||||
switch (biton32(state)) {
|
switch (biton32(state)) {
|
||||||
case _MACROS:
|
case _MACROS:
|
||||||
@@ -312,12 +315,7 @@ uint32_t layer_state_set_rgb(uint32_t state) {
|
|||||||
default:
|
default:
|
||||||
rgblight_sethsv_noeeprom_cyan(); break;
|
rgblight_sethsv_noeeprom_cyan(); break;
|
||||||
}
|
}
|
||||||
if (has_ran) {
|
biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
|
||||||
biton32(state) == _MODS ? rgblight_mode(RGBLIGHT_MODE_BREATHING) : rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
|
|
||||||
} else {
|
|
||||||
biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
|
|
||||||
has_ran = true;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// layer_state_set_indicator(); // Runs every scan, so need to call this here .... since I can't get it working "right" anyhow
|
// layer_state_set_indicator(); // Runs every scan, so need to call this here .... since I can't get it working "right" anyhow
|
||||||
@@ -326,3 +324,39 @@ uint32_t layer_state_set_rgb(uint32_t state) {
|
|||||||
|
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t default_layer_state_set_rgb(uint32_t state) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
if (userspace_config.rgb_layer_change) {
|
||||||
|
rgblight_config_t temp_rgblight_config = rgblight_config;
|
||||||
|
switch (biton32(state)) {
|
||||||
|
case _COLEMAK:
|
||||||
|
temp_rgblight_config.hue = 300;
|
||||||
|
temp_rgblight_config.val = 255;
|
||||||
|
temp_rgblight_config.sat = 255;
|
||||||
|
temp_rgblight_config.mode = 1;
|
||||||
|
break;
|
||||||
|
case _DVORAK:
|
||||||
|
temp_rgblight_config.hue = 150;
|
||||||
|
temp_rgblight_config.val = 255;
|
||||||
|
temp_rgblight_config.sat = 255;
|
||||||
|
temp_rgblight_config.mode = 1;
|
||||||
|
case _WORKMAN:
|
||||||
|
temp_rgblight_config.hue = 43;
|
||||||
|
temp_rgblight_config.val = 218;
|
||||||
|
temp_rgblight_config.sat = 218;
|
||||||
|
temp_rgblight_config.mode = 1;
|
||||||
|
default:
|
||||||
|
temp_rgblight_config.hue = 180;
|
||||||
|
temp_rgblight_config.val = 255;
|
||||||
|
temp_rgblight_config.sat = 255;
|
||||||
|
temp_rgblight_config.mode = 1;
|
||||||
|
}
|
||||||
|
if (temp_rgblight_config.raw != eeconfig_read_rgblight()) {
|
||||||
|
xprintf("rgblight set default layer hsv [EEPROM]: %u,%u,%u,%u\n", temp_rgblight_config.hue, temp_rgblight_config.sat, temp_rgblight_config.val, temp_rgblight_config.mode);
|
||||||
|
eeconfig_update_rgblight(temp_rgblight_config.raw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
return state;
|
||||||
|
}
|
||||||
@@ -12,4 +12,4 @@ void scan_rgblight_fadeout(void);
|
|||||||
void matrix_init_rgb(void);
|
void matrix_init_rgb(void);
|
||||||
void matrix_scan_rgb(void);
|
void matrix_scan_rgb(void);
|
||||||
uint32_t layer_state_set_rgb(uint32_t state);
|
uint32_t layer_state_set_rgb(uint32_t state);
|
||||||
|
uint32_t default_layer_state_set_rgb(uint32_t state);
|
||||||
@@ -27,6 +27,11 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||||
|
SRC += rgb_stuff.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(strip $(MACROS_ENABLED)), yes)
|
ifeq ($(strip $(MACROS_ENABLED)), yes)
|
||||||
OPT_DEFS += -DMACROS_ENABLED
|
OPT_DEFS += -DMACROS_ENABLED
|
||||||
endif
|
endif
|
||||||
@@ -37,3 +42,15 @@ ifdef CONSOLE_ENABLE
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
||||||
|
SRC += send_unicode.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
|
||||||
|
SRC += send_unicode.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(UNICODE_ENABLE)), yes)
|
||||||
|
SRC += send_unicode.c
|
||||||
|
endif
|
||||||
@@ -56,3 +56,57 @@ void send_unicode_hex_string(const char* str) {
|
|||||||
|
|
||||||
|
|
||||||
// If you need a good converter: https://r12a.github.io/app-conversion/
|
// If you need a good converter: https://r12a.github.io/app-conversion/
|
||||||
|
uint8_t saved_mods;
|
||||||
|
|
||||||
|
void unicode_input_start (void) {
|
||||||
|
// save current mods
|
||||||
|
saved_mods = get_mods(); // Save current mods
|
||||||
|
clear_mods(); // Unregister mods to start from a clean state
|
||||||
|
|
||||||
|
switch(get_unicode_input_mode()) {
|
||||||
|
case UC_OSX:
|
||||||
|
register_code(KC_LALT);
|
||||||
|
break;
|
||||||
|
case UC_OSX_RALT:
|
||||||
|
register_code(KC_RALT);
|
||||||
|
break;
|
||||||
|
case UC_LNX:
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
register_code(KC_U);
|
||||||
|
unregister_code(KC_U);
|
||||||
|
unregister_code(KC_LSFT);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
break;
|
||||||
|
case UC_WIN:
|
||||||
|
register_code(KC_LALT);
|
||||||
|
register_code(KC_PPLS);
|
||||||
|
unregister_code(KC_PPLS);
|
||||||
|
break;
|
||||||
|
case UC_WINC:
|
||||||
|
register_code(KC_RALT);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
register_code(KC_U);
|
||||||
|
unregister_code(KC_U);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
wait_ms(UNICODE_TYPE_DELAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
void unicode_input_finish (void) {
|
||||||
|
switch(get_unicode_input_mode()) {
|
||||||
|
case UC_OSX:
|
||||||
|
case UC_WIN:
|
||||||
|
unregister_code(KC_LALT);
|
||||||
|
break;
|
||||||
|
case UC_OSX_RALT:
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
break;
|
||||||
|
case UC_LNX:
|
||||||
|
register_code(KC_SPC);
|
||||||
|
unregister_code(KC_SPC);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
set_mods(saved_mods); // Reregister previously set mods
|
||||||
|
}
|
||||||
@@ -50,12 +50,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EPRM:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
eeconfig_init();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case VRSN:
|
case VRSN:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
@@ -128,4 +122,3 @@ void shutdown_keymap(void) {}
|
|||||||
void shutdown_user (void) {
|
void shutdown_user (void) {
|
||||||
shutdown_keymap();
|
shutdown_keymap();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9,9 +9,7 @@
|
|||||||
#define BASE 0
|
#define BASE 0
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
VRSN = SAFE_RANGE, // can always be here
|
||||||
EPRM,
|
|
||||||
VRSN,
|
|
||||||
KC_MAKE,
|
KC_MAKE,
|
||||||
KC_RESET,
|
KC_RESET,
|
||||||
NEWPLACEHOLDER //use "NEWPLACEHOLDER for keymap specific codes
|
NEWPLACEHOLDER //use "NEWPLACEHOLDER for keymap specific codes
|
||||||
|
|||||||
@@ -108,7 +108,9 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|||||||
extern backlight_config g_config;
|
extern backlight_config g_config;
|
||||||
#endif
|
#endif
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
#ifdef ZEAL_RGB
|
||||||
static uint8_t last_effect;
|
static uint8_t last_effect;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
static uint32_t savedRgbMode;
|
static uint32_t savedRgbMode;
|
||||||
|
|||||||
Reference in new issue
Block a user