summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-05-15 00:47:25 -0400
committerJack Humbert <jack.humb@gmail.com>2016-05-15 00:47:25 -0400
commitbf5c2ccee5497523c214dae7aacdc27fdbb0f235 (patch)
tree0bd27929ab759c0b7fd454e9a684bb1618330af6 /quantum
parent15719f3574c6274ee0f3ec87431927c5a523aa3e (diff)
splits process_action up to handle records separately (#329)
* implements leader key for planck experimental * allows override of leader timeout * adds ability to use the leader key in seq * fixes leader keycode * adds chording prototype * fixes keycode detection * moves music mode to quantum.c * disables chording by default * adds music sequencer functionality * implements audio/music functions in quantum.c * splits up process_action to allow independent processing of actions * merging?
Diffstat (limited to 'quantum')
-rw-r--r--quantum/keymap_common.h3
-rw-r--r--quantum/quantum.c11
2 files changed, 13 insertions, 1 deletions
diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h
index 4107d575be..0074ab164d 100644
--- a/quantum/keymap_common.h
+++ b/quantum/keymap_common.h
@@ -191,6 +191,9 @@ extern const uint16_t fn_actions[];
#define RESET 0x5000
#define DEBUG 0x5001
+#define KC_LEAD 0x5014
+
+
// MAGIC keycodes
#define MAGIC_SWAP_CONTROL_CAPSLOCK 0x5002
diff --git a/quantum/quantum.c b/quantum/quantum.c
index cd7fdbb7fe..dd5d84f826 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -70,7 +70,7 @@ static uint8_t music_sequence_position = 0;
static uint16_t music_sequence_timer = 0;
static uint16_t music_sequence_interval = 100;
-bool process_action_quantum(keyrecord_t *record) {
+bool process_record_quantum(keyrecord_t *record) {
/* This gets the keycode from the key pressed */
keypos_t key = record->event.key;
@@ -90,6 +90,14 @@ bool process_action_quantum(keyrecord_t *record) {
keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key);
#endif
+ // This is how you use actions here
+ // if (keycode == KC_LEAD) {
+ // action_t action;
+ // action.code = ACTION_DEFAULT_LAYER_SET(0);
+ // process_action(record, action);
+ // return false;
+ // }
+
#ifdef AUDIO_ENABLE
if (keycode == AU_ON && record->event.pressed) {
audio_on();
@@ -259,5 +267,6 @@ void matrix_scan_quantum() {
}
#endif
+
matrix_scan_kb();
} \ No newline at end of file