summaryrefslogtreecommitdiff
path: root/quantum/quantum.c
diff options
context:
space:
mode:
authorJoshua Colbeck <Skrymir@users.noreply.github.com>2016-07-12 23:14:30 -0500
committerGitHub <noreply@github.com>2016-07-12 23:14:30 -0500
commit68ceffe53e299fb504bdd4733b1555a8558b472b (patch)
treeae9cc958d239374478338fee2783c203517d6762 /quantum/quantum.c
parentac978a50a2f523f2de7f928a6b41ac40469911c2 (diff)
parenta998a48673372e409991066d7d2d9ba282f79d59 (diff)
Merge pull request #2 from jackhumbert/master
Pull from upstream
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c66
1 files changed, 64 insertions, 2 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index d8e43a4655..d5b9753b76 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -93,16 +93,66 @@ bool process_record_quantum(keyrecord_t *record) {
*(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
#endif
bootloader_jump();
- return false;
}
+ return false;
break;
case DEBUG:
if (record->event.pressed) {
print("\nDEBUG: enabled.\n");
debug_enable = true;
- return false;
}
+ return false;
+ break;
+ #ifdef RGBLIGHT_ENABLE
+ case RGB_TOG:
+ if (record->event.pressed) {
+ rgblight_toggle();
+ }
+ return false;
+ break;
+ case RGB_MOD:
+ if (record->event.pressed) {
+ rgblight_step();
+ }
+ return false;
break;
+ case RGB_HUI:
+ if (record->event.pressed) {
+ rgblight_increase_hue();
+ }
+ return false;
+ break;
+ case RGB_HUD:
+ if (record->event.pressed) {
+ rgblight_decrease_hue();
+ }
+ return false;
+ break;
+ case RGB_SAI:
+ if (record->event.pressed) {
+ rgblight_increase_sat();
+ }
+ return false;
+ break;
+ case RGB_SAD:
+ if (record->event.pressed) {
+ rgblight_decrease_sat();
+ }
+ return false;
+ break;
+ case RGB_VAI:
+ if (record->event.pressed) {
+ rgblight_increase_val();
+ }
+ return false;
+ break;
+ case RGB_VAD:
+ if (record->event.pressed) {
+ rgblight_decrease_val();
+ }
+ return false;
+ break;
+ #endif
case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_UNSWAP_ALT_GUI:
if (record->event.pressed) {
// MAGIC actions (BOOTMAGIC without the boot)
@@ -162,6 +212,12 @@ bool process_record_quantum(keyrecord_t *record) {
register_mods(MOD_BIT(KC_LSFT));
}
else {
+ #ifdef DISABLE_SPACE_CADET_ROLLOVER
+ if (get_mods() & MOD_BIT(KC_RSFT)) {
+ shift_interrupted[0] = true;
+ shift_interrupted[1] = true;
+ }
+ #endif
if (!shift_interrupted[0]) {
register_code(LSPO_KEY);
unregister_code(LSPO_KEY);
@@ -178,6 +234,12 @@ bool process_record_quantum(keyrecord_t *record) {
register_mods(MOD_BIT(KC_RSFT));
}
else {
+ #ifdef DISABLE_SPACE_CADET_ROLLOVER
+ if (get_mods() & MOD_BIT(KC_LSFT)) {
+ shift_interrupted[0] = true;
+ shift_interrupted[1] = true;
+ }
+ #endif
if (!shift_interrupted[1]) {
register_code(RSPC_KEY);
unregister_code(RSPC_KEY);