From 99993a9a33e18b81c0eb2df373e78b22d11f39d3 Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Sun, 21 Apr 2024 18:11:25 +0200 Subject: [PATCH] print key state, conincidentally fixes the sticky key issue --- flake.nix | 4 +++- src/main.c | 6 +++--- src/smk/matrix.c | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index f190fc8..1051d1c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # sdcc 4.4.0 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # for sdcc 4.4.0 utils.url = "github:numtide/flake-utils"; sinowealth-kb-tool.url = "github:carlossless/sinowealth-kb-tool"; }; @@ -23,6 +23,8 @@ sinowealth-kb-tool.packages."${system}".default uhubctl srecord + meson + ninja ]; }; } diff --git a/src/main.c b/src/main.c index 2bfead6..ae4454a 100644 --- a/src/main.c +++ b/src/main.c @@ -44,9 +44,9 @@ void main() dprintf("DEVICE vId:" TOSTRING(USB_VID) " pId:" TOSTRING(USB_PID) "\n\r"); dprintf("OS: 0x%x, CONN: 0x%x\n\r", keyboard_state.os_mode, keyboard_state.conn_mode); - if (keyboard_state.os_mode == KEYBOARD_OS_MODE_WIN) { - isp_jump(); - } + // if (keyboard_state.os_mode == KEYBOARD_OS_MODE_WIN) { + // isp_jump(); + // } // enable pwm and interrupt (driving matrix scan) pwm_enable(); diff --git a/src/smk/matrix.c b/src/smk/matrix.c index ed85c6f..78d3a38 100644 --- a/src/smk/matrix.c +++ b/src/smk/matrix.c @@ -48,6 +48,8 @@ inline void process_key_state(uint8_t row, uint8_t col, bool pressed) { uint16_t qcode = keymaps[0][row][col]; + dprintf("KEY: 0x%04x %s\r\n", qcode, pressed ? "UP" : "DOWN"); + if (IS_QK_MOMENTARY(qcode)) { if (pressed) { action_layer = QK_MOMENTARY_GET_LAYER(qcode);