aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/keyboard.c
diff options
context:
space:
mode:
authorzvecr2025-12-01 23:07:33 +0100
committerzvecr2025-12-01 23:07:33 +0100
commitb315b707e60f86d79d34bcb7a15084468117c1a1 (patch)
tree7bbdc5f5d703c28310b4751dd3db280d8f55a6bd /quantum/keyboard.c
parente2bf515df4c51c4d2e3b442d23e52d6d43f7f726 (diff)
parente10429baae2a4b3ffec67fe31a5e1ac3212817f0 (diff)
Merge branch 'develop'
Diffstat (limited to 'quantum/keyboard.c')
-rw-r--r--quantum/keyboard.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/quantum/keyboard.c b/quantum/keyboard.c
index 173c696e2d..e0c9373165 100644
--- a/quantum/keyboard.c
+++ b/quantum/keyboard.c
@@ -29,9 +29,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "debug.h"
#include "command.h"
#include "util.h"
+#include "host.h"
#include "sendchar.h"
#include "eeconfig.h"
#include "action_layer.h"
+#include "suspend.h"
#ifdef BOOTMAGIC_ENABLE
# include "bootmagic.h"
#endif
@@ -471,6 +473,7 @@ void keyboard_init(void) {
#ifdef CONNECTION_ENABLE
connection_init();
#endif
+ host_init();
led_init_ports();
#ifdef BACKLIGHT_ENABLE
backlight_init_ports();
@@ -561,6 +564,7 @@ void switch_events(uint8_t row, uint8_t col, bool pressed) {
#if defined(RGB_MATRIX_ENABLE)
rgb_matrix_handle_key_event(row, col, pressed);
#endif
+ wakeup_matrix_handle_key_event(row, col, pressed);
}
/**
@@ -576,6 +580,8 @@ static inline void generate_tick_event(void) {
}
}
+matrix_row_t matrix_previous[MATRIX_ROWS];
+
/**
* @brief This task scans the keyboards matrix and processes any key presses
* that occur.
@@ -589,8 +595,6 @@ static bool matrix_task(void) {
return false;
}
- static matrix_row_t matrix_previous[MATRIX_ROWS];
-
matrix_scan();
bool matrix_changed = false;
for (uint8_t row = 0; row < MATRIX_ROWS && !matrix_changed; row++) {
@@ -624,7 +628,7 @@ static bool matrix_task(void) {
if (row_changes & col_mask) {
const bool key_pressed = current_row & col_mask;
- if (process_keypress) {
+ if (process_keypress && !keypress_is_wakeup_key(row, col)) {
action_exec(MAKE_KEYEVENT(row, col, key_pressed));
}
@@ -699,6 +703,8 @@ void quantum_task(void) {
#ifdef LAYER_LOCK_ENABLE
layer_lock_task();
#endif
+
+ host_task();
}
/** \brief Main task that is repeatedly called as fast as possible. */