Skip to content

Commit e9261b3

Browse files
Cipulotmilan-tradecore
authored andcommitted
VIA Keylog Change (qmk#25504)
* WIP * Update via.c temptive fix in formatting for lint errors. * Update via.c let's try this one, thanks mobile GitHub app to not showing spaces right. * Update quantum/via.c Co-authored-by: Joel Challis <[email protected]> * Update quantum/via.c Co-authored-by: Joel Challis <[email protected]> * Merge branch 'qmk:master' into via_keylog_change
1 parent bd56ecf commit e9261b3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

quantum/via.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
3838
#include "nvm_via.h"
3939

40+
#if defined(SECURE_ENABLE)
41+
# include "secure.h"
42+
#endif
43+
4044
#if defined(AUDIO_ENABLE)
4145
# include "audio.h"
4246
#endif
@@ -322,8 +326,13 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
322326
uint8_t rows = 28 / ((MATRIX_COLS + 7) / 8);
323327
uint8_t i = 2;
324328
for (uint8_t row = 0; row < rows && row + offset < MATRIX_ROWS; row++) {
325-
#ifdef VIA_INSECURE
329+
#if defined(VIA_INSECURE)
326330
matrix_row_t value = matrix_get_row(row + offset);
331+
#elif defined(SECURE_ENABLE)
332+
matrix_row_t value = 0;
333+
if (secure_is_unlocked()) {
334+
value = matrix_get_row(row + offset);
335+
}
327336
#else
328337
matrix_row_t value = 0;
329338
#endif

0 commit comments

Comments
 (0)