aboutsummaryrefslogtreecommitdiff
path: root/quantum/quantum.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 326c8370b..ac8857df8 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -25,10 +25,6 @@
25# include "backlight.h" 25# include "backlight.h"
26#endif 26#endif
27 27
28#ifdef API_ENABLE
29# include "api.h"
30#endif
31
32#ifdef MIDI_ENABLE 28#ifdef MIDI_ENABLE
33# include "process_midi.h" 29# include "process_midi.h"
34#endif 30#endif
@@ -145,12 +141,13 @@ void reset_keyboard(void) {
145/* Convert record into usable keycode via the contained event. */ 141/* Convert record into usable keycode via the contained event. */
146uint16_t get_record_keycode(keyrecord_t *record, bool update_layer_cache) { 142uint16_t get_record_keycode(keyrecord_t *record, bool update_layer_cache) {
147#ifdef COMBO_ENABLE 143#ifdef COMBO_ENABLE
148 if (record->keycode) { return record->keycode; } 144 if (record->keycode) {
145 return record->keycode;
146 }
149#endif 147#endif
150 return get_event_keycode(record->event, update_layer_cache); 148 return get_event_keycode(record->event, update_layer_cache);
151} 149}
152 150
153
154/* Convert event into usable keycode. Checks the layer cache to ensure that it 151/* Convert event into usable keycode. Checks the layer cache to ensure that it
155 * retains the correct keycode after a layer change, if the key is still pressed. 152 * retains the correct keycode after a layer change, if the key is still pressed.
156 * "update_layer_cache" is to ensure that it only updates the layer cache when 153 * "update_layer_cache" is to ensure that it only updates the layer cache when
@@ -179,12 +176,12 @@ uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache) {
179bool pre_process_record_quantum(keyrecord_t *record) { 176bool pre_process_record_quantum(keyrecord_t *record) {
180 if (!( 177 if (!(
181#ifdef COMBO_ENABLE 178#ifdef COMBO_ENABLE
182 process_combo(get_record_keycode(record, true), record) && 179 process_combo(get_record_keycode(record, true), record) &&
183#endif 180#endif
184 true)) { 181 true)) {
185 return false; 182 return false;
186 } 183 }
187 return true; // continue processing 184 return true; // continue processing
188} 185}
189 186
190/* Get keycode, and then call keyboard function */ 187/* Get keycode, and then call keyboard function */
@@ -468,14 +465,6 @@ void matrix_scan_quantum() {
468# include "hd44780.h" 465# include "hd44780.h"
469#endif 466#endif
470 467
471void api_send_unicode(uint32_t unicode) {
472#ifdef API_ENABLE
473 uint8_t chunk[4];
474 dword_to_bytes(unicode, chunk);
475 MT_SEND_DATA(DT_UNICODE, chunk, 5);
476#endif
477}
478
479//------------------------------------------------------------------------------ 468//------------------------------------------------------------------------------
480// Override these functions in your keymap file to play different tunes on 469// Override these functions in your keymap file to play different tunes on
481// different events such as startup and bootloader jump 470// different events such as startup and bootloader jump