aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/massdrop/alt
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/massdrop/alt')
-rw-r--r--keyboards/massdrop/alt/alt.h10
-rw-r--r--keyboards/massdrop/alt/keymaps/default/keymap.c35
-rw-r--r--keyboards/massdrop/alt/keymaps/mac/keymap.c33
-rw-r--r--keyboards/massdrop/alt/rules.mk1
4 files changed, 26 insertions, 53 deletions
diff --git a/keyboards/massdrop/alt/alt.h b/keyboards/massdrop/alt/alt.h
index 387985512..8dfed8d2d 100644
--- a/keyboards/massdrop/alt/alt.h
+++ b/keyboards/massdrop/alt/alt.h
@@ -22,3 +22,13 @@
{ K45, KC_NO, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, }, \
{ K59, K60, K61, KC_NO, KC_NO, KC_NO, K62, KC_NO, KC_NO, KC_NO, K63, K64, K65, K66, K67, }, \
}
+
+#define TOGGLE_FLAG_AND_PRINT(var, name) { \
+ if (var) { \
+ dprintf(name " disabled\r\n"); \
+ var = !var; \
+ } else { \
+ var = !var; \
+ dprintf(name " enabled\r\n"); \
+ } \
+ }
diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c
index 0cbce8629..a5c443ffc 100644
--- a/keyboards/massdrop/alt/keymaps/default/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/default/keymap.c
@@ -136,8 +136,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case L_T_BR:
if (record->event.pressed) {
led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing)
- {
+ if (led_animation_breathing) {
gcr_breathe = gcr_desired;
led_animation_breathe_cur = BREATHE_MIN_STEP;
breathe_dir = 1;
@@ -151,50 +150,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
- usb_extra_manual = !usb_extra_manual;
- CDC_print("USB extra port manual mode ");
- CDC_print(usb_extra_manual ? "enabled" : "disabled");
- CDC_print("\r\n");
+ 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) {
- usb_gcr_auto = !usb_gcr_auto;
- CDC_print("USB GCR auto mode ");
- CDC_print(usb_gcr_auto ? "enabled" : "disabled");
- CDC_print("\r\n");
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
}
return false;
case DBG_TOG:
if (record->event.pressed) {
- debug_enable = !debug_enable;
- CDC_print("Debug mode ");
- CDC_print(debug_enable ? "enabled" : "disabled");
- CDC_print("\r\n");
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
}
return false;
case DBG_MTRX:
if (record->event.pressed) {
- debug_matrix = !debug_matrix;
- CDC_print("Debug matrix ");
- CDC_print(debug_matrix ? "enabled" : "disabled");
- CDC_print("\r\n");
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
}
return false;
case DBG_KBD:
if (record->event.pressed) {
- debug_keyboard = !debug_keyboard;
- CDC_print("Debug keyboard ");
- CDC_print(debug_keyboard ? "enabled" : "disabled");
- CDC_print("\r\n");
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
}
return false;
case DBG_MOU:
if (record->event.pressed) {
- debug_mouse = !debug_mouse;
- CDC_print("Debug mouse ");
- CDC_print(debug_mouse ? "enabled" : "disabled");
- CDC_print("\r\n");
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
}
return false;
case MD_BOOT:
@@ -209,4 +190,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
default:
return true; //Process all other keycodes normally
}
-} \ No newline at end of file
+}
diff --git a/keyboards/massdrop/alt/keymaps/mac/keymap.c b/keyboards/massdrop/alt/keymaps/mac/keymap.c
index e886290e7..d6978fd80 100644
--- a/keyboards/massdrop/alt/keymaps/mac/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/mac/keymap.c
@@ -136,8 +136,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case L_T_BR:
if (record->event.pressed) {
led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing)
- {
+ if (led_animation_breathing) {
gcr_breathe = gcr_desired;
led_animation_breathe_cur = BREATHE_MIN_STEP;
breathe_dir = 1;
@@ -151,50 +150,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
- usb_extra_manual = !usb_extra_manual;
- CDC_print("USB extra port manual mode ");
- CDC_print(usb_extra_manual ? "enabled" : "disabled");
- CDC_print("\r\n");
+ 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) {
- usb_gcr_auto = !usb_gcr_auto;
- CDC_print("USB GCR auto mode ");
- CDC_print(usb_gcr_auto ? "enabled" : "disabled");
- CDC_print("\r\n");
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
}
return false;
case DBG_TOG:
if (record->event.pressed) {
- debug_enable = !debug_enable;
- CDC_print("Debug mode ");
- CDC_print(debug_enable ? "enabled" : "disabled");
- CDC_print("\r\n");
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
}
return false;
case DBG_MTRX:
if (record->event.pressed) {
- debug_matrix = !debug_matrix;
- CDC_print("Debug matrix ");
- CDC_print(debug_matrix ? "enabled" : "disabled");
- CDC_print("\r\n");
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
}
return false;
case DBG_KBD:
if (record->event.pressed) {
- debug_keyboard = !debug_keyboard;
- CDC_print("Debug keyboard ");
- CDC_print(debug_keyboard ? "enabled" : "disabled");
- CDC_print("\r\n");
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
}
return false;
case DBG_MOU:
if (record->event.pressed) {
- debug_mouse = !debug_mouse;
- CDC_print("Debug mouse ");
- CDC_print(debug_mouse ? "enabled" : "disabled");
- CDC_print("\r\n");
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
}
return false;
case MD_BOOT:
diff --git a/keyboards/massdrop/alt/rules.mk b/keyboards/massdrop/alt/rules.mk
index daf679585..c5539158f 100644
--- a/keyboards/massdrop/alt/rules.mk
+++ b/keyboards/massdrop/alt/rules.mk
@@ -30,3 +30,4 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
VIRTSER_ENABLE = no # USB Serial Driver
RAW_ENABLE = no # Raw device
+AUTO_SHIFT_ENABLE = no # Auto Shift