Skip to content

Commit

Permalink
print key state, conincidentally fixes the sticky key issue
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossless committed Apr 21, 2024
1 parent c2782db commit 99993a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -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";
};
Expand All @@ -23,6 +23,8 @@
sinowealth-kb-tool.packages."${system}".default
uhubctl
srecord
meson
ninja
];
};
}
Expand Down
6 changes: 3 additions & 3 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/smk/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 99993a9

Please sign in to comment.