zmkfirmware / zmk

ZMK Firmware Repository
https://zmk.dev/
MIT License
2.85k stars 2.86k forks source link

Keys are getting "stuck" #2463

Closed Niryo closed 2 months ago

Niryo commented 2 months ago

I am trying to build a wireless corne keyboard, and I am trying to figure out now if my issues are coming from hardware or firmware. I am not sure if I actually have two different issues or just one, so i'll describe both of the symptoms that I see-

  1. when trying to connect both halves, the peripheral one repeats all the keys endlessly. Sounds very similar to this and this, but in my case it's not random- every key that I press on the peripheral halve gets repeated endlessly. Because I don't trust my shitty soldering skills, I suspected that it's an issue with the hardware, so I tried to put the left controller on the right halve (ignoring the mirrored keys), but then everything worked, sort of. the keyboard responded well, without repeating the keys, so I think it ruled out the hardware issue, but then after a few minutes of being connected, I started to see issue number two-
  2. My mac received repeated keypress event from the x key, without me pressing anything. this time, it didn't repeat forever, but only 10-20 times and then stoped. I was able to catch the log if it helps (see below log).

How can I debug it? is there anything I can do in order to further rule out hardware issues? could it just be that my test (putting the left controller over the right halve) is incorrect and making zmk to go bananas?

Update: i was able to reproduce with a usb connection, on the central halve, so i guess it's probably a hardware issue :( how can I further investigate in order to understand what exactly cause this issue? here is a screen recording of the issue, with the keyboard connected using a usb, and below is the full log that I got during the video.

[00:06:17.280,151] <dbg> zmk: kscan_matrix_read: Sending event at 1,0 state on
[00:06:17.280,273] <dbg> zmk: zmk_physical_layouts_kscan_process_msgq: Row: 1, col: 0, position: 18, pressed: true
[00:06:17.280,364] <dbg> zmk: zmk_keymap_apply_position_state: layer_id: 0 position: 18, binding name: key_press
[00:06:17.280,426] <dbg> zmk: on_keymap_binding_pressed: position 18 keycode 0x7000B
[00:06:17.280,456] <dbg> zmk: hid_listener_keycode_pressed: usage_page 0x07 keycode 0x0B implicit_mods 0x00 explicit_mods 0x00
[00:06:17.280,456] <dbg> zmk: zmk_hid_implicit_modifiers_press: Modifiers set to 0x00
[00:06:17.280,487] <dbg> zmk: zmk_endpoints_send_report: usage page 0x07
[00:06:17.281,433] <dbg> zmk: vddh_sample_fetch: ADC raw 3388 ~ 4960 mV => 100%
[00:06:17.372,131] <dbg> zmk: kscan_matrix_read: Sending event at 1,0 state off
[00:06:17.372,314] <dbg> zmk: zmk_physical_layouts_kscan_process_msgq: Row: 1, col: 0, position: 18, pressed: false
[00:06:17.372,375] <dbg> zmk: zmk_keymap_apply_position_state: layer_id: 0 position: 18, binding name: key_press
[00:06:17.372,406] <dbg> zmk: on_keymap_binding_released: position 18 keycode 0x7000B
[00:06:17.372,436] <dbg> zmk: hid_listener_keycode_released: usage_page 0x07 keycode 0x0B implicit_mods 0x00 explicit_mods 0x00
[00:06:17.372,467] <dbg> zmk: zmk_hid_implicit_modifiers_release: Modifiers set to 0x00
[00:06:17.372,467] <dbg> zmk: zmk_endpoints_send_report: usage page 0x07
[00:06:20.944,122] <dbg> zmk: kscan_matrix_read: Sending event at 1,2 state on
[00:06:20.944,244] <dbg> zmk: zmk_physical_layouts_kscan_process_msgq: Row: 1, col: 2, position: 20, pressed: true
[00:06:20.944,305] <dbg> zmk: zmk_keymap_apply_position_state: layer_id: 0 position: 20, binding name: key_press
[00:06:20.944,335] <dbg> zmk: on_keymap_binding_pressed: position 20 keycode 0x7000E
[00:06:20.944,366] <dbg> zmk: hid_listener_keycode_pressed: usage_page 0x07 keycode 0x0E implicit_mods 0x00 explicit_mods 0x00
[00:06:20.944,366] <dbg> zmk: zmk_hid_implicit_modifiers_press: Modifiers set to 0x00
[00:06:20.944,396] <dbg> zmk: zmk_endpoints_send_report: usage page 0x07
[00:06:21.010,131] <dbg> zmk: kscan_matrix_read: Sending event at 1,2 state off
[00:06:21.010,314] <dbg> zmk: zmk_physical_layouts_kscan_process_msgq: Row: 1, col: 2, position: 20, pressed: false
[00:06:21.010,375] <dbg> zmk: zmk_keymap_apply_position_state: layer_id: 0 position: 20, binding name: key_press
[00:06:21.010,406] <dbg> zmk: on_keymap_binding_released: position 20 keycode 0x7000E
[00:06:21.010,437] <dbg> zmk: hid_listener_keycode_released: usage_page 0x07 keycode 0x0E implicit_mods 0x00 explicit_mods 0x00
[00:06:21.010,467] <dbg> zmk: zmk_hid_implicit_modifiers_release: Modifiers set to 0x00
[00:06:21.010,467] <dbg> zmk: zmk_endpoints_send_report: usage page 0x07
[00:06:25.350,128] <dbg> zmk: kscan_matrix_read: Sending event at 1,1 state on
[00:06:25.350,219] <dbg> zmk: zmk_physical_layouts_kscan_process_msgq: Row: 1, col: 1, position: 19, pressed: true
[00:06:25.350,280] <dbg> zmk: zmk_keymap_apply_position_state: layer_id: 0 position: 19, binding name: key_press
[00:06:25.350,311] <dbg> zmk: on_keymap_binding_pressed: position 19 keycode 0x7000D
[00:06:25.350,341] <dbg> zmk: hid_listener_keycode_pressed: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00
[00:06:25.350,341] <dbg> zmk: zmk_hid_implicit_modifiers_press: Modifiers set to 0x00
[00:06:25.350,372] <dbg> zmk: zmk_endpoints_send_report: usage page 0x07
[00:06:25.454,132] <dbg> zmk: kscan_matrix_read: Sending event at 1,1 state off
[00:06:25.454,315] <dbg> zmk: zmk_physical_layouts_kscan_process_msgq: Row: 1, col: 1, position: 19, pressed: false
[00:06:25.454,376] <dbg> zmk: zmk_keymap_apply_position_state: layer_id: 0 position: 19, binding name: key_press
[00:06:25.454,406] <dbg> zmk: on_keymap_binding_released: position 19 keycode 0x7000D
[00:06:25.454,437] <dbg> zmk: hid_listener_keycode_released: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00
[00:06:25.454,467] <dbg> zmk: zmk_hid_implicit_modifiers_release: Modifiers set to 0x00
[00:06:25.454,467] <dbg> zmk: zmk_endpoints_send_report: usage page 0x07
[00:06:27.690,124] <dbg> zmk: kscan_matrix_read: Sending event at 1,3 state on
[00:06:27.690,246] <dbg> zmk: zmk_physical_layouts_kscan_process_msgq: Row: 1, col: 3, position: 21, pressed: true
[00:06:27.690,307] <dbg> zmk: zmk_keymap_apply_position_state: layer_id: 0 position: 21, binding name: key_press
[00:06:27.690,338] <dbg> zmk: on_keymap_binding_pressed: position 21 keycode 0x7000F
[00:06:27.690,368] <dbg> zmk: hid_listener_keycode_pressed: usage_page 0x07 keycode 0x0F implicit_mods 0x00 explicit_mods 0x00
[00:06:27.690,368] <dbg> zmk: zmk_hid_implicit_modifiers_press: Modifiers set to 0x00
[00:06:27.690,399] <dbg> zmk: zmk_endpoints_send_report: usage page 0x07
[00:06:27.791,229] <dbg> zmk: kscan_matrix_read: Sending event at 1,3 state off
[00:06:27.791,564] <dbg> zmk: zmk_physical_layouts_kscan_process_msgq: Row: 1, col: 3, position: 21, pressed: false
[00:06:27.791,625] <dbg> zmk: zmk_keymap_apply_position_state: layer_id: 0 position: 21, binding name: key_press
[00:06:27.791,656] <dbg> zmk: on_keymap_binding_released: position 21 keycode 0x7000F
[00:06:27.791,687] <dbg> zmk: hid_listener_keycode_released: usage_page 0x07 keycode 0x0F implicit_mods 0x00 explicit_mods 0x00
[00:06:27.791,717] <dbg> zmk: zmk_hid_implicit_modifiers_release: Modifiers set to 0x00
[00:06:27.791,717] <dbg> zmk: zmk_endpoints_send_report: usage page 0x07
[00:06:29.970,123] <dbg> zmk: kscan_matrix_read: Sending event at 1,1 state on
[00:06:29.970,214] <dbg> zmk: zmk_physical_layouts_kscan_process_msgq: Row: 1, col: 1, position: 19, pressed: true
[00:06:29.970,275] <dbg> zmk: zmk_keymap_apply_position_state: layer_id: 0 position: 19, binding name: key_press
[00:06:29.970,306] <dbg> zmk: on_keymap_binding_pressed: position 19 keycode 0x7000D
[00:06:29.970,336] <dbg> zmk: hid_listener_keycode_pressed: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00
[00:06:29.970,336] <dbg> zmk: zmk_hid_implicit_modifiers_press: Modifiers set to 0x00
[00:06:29.970,367] <dbg> zmk: zmk_endpoints_send_report: usage page 0x07
[00:06:30.093,139] <dbg> zmk: kscan_matrix_read: Sending event at 1,1 state off
[00:06:30.093,322] <dbg> zmk: zmk_physical_layouts_kscan_process_msgq: Row: 1, col: 1, position: 19, pressed: false
[00:06:30.093,383] <dbg> zmk: zmk_keymap_apply_position_state: layer_id: 0 position: 19, binding name: key_press
[00:06:30.093,414] <dbg> zmk: on_keymap_binding_released: position 19 keycode 0x7000D
[00:06:30.093,444] <dbg> zmk: hid_listener_keycode_released: usage_page 0x07 keycode 0x0D implicit_mods 0x00 explicit_mods 0x00
[00:06:30.093,475] <dbg> zmk: zmk_hid_implicit_modifiers_release: Modifiers set to 0x00
[00:06:30.093,475] <dbg> zmk: zmk_endpoints_send_report: usage page 0x07
Niryo commented 2 months ago

Closing for now, because it feels like a hardware issue after all.