sago35 / tinygo-keyboard

USB HID keyboard firmware for tinygo
MIT License
78 stars 15 forks source link

Add chattering prevention #13

Closed ehime-iyokan closed 1 year ago

ehime-iyokan commented 1 year ago

To prevent chattering, a process is added to wait until the key being pressed is released. However, the wait time is a rough figure. Currently, due to the lack of equipment, it is not possible to see actual voltage changes.

ehime-iyokan commented 1 year ago

Changed a wait process without Blocking. We need to wait without Blocking

However, the following two tasks are necessary.

  1. Confirm that chattering does not occur on keyboards where chattering occurs when the tinygo-keyboard cycle is 10[ms]. In my environment, chattering does not occur when tinygo-keyboard cycle is 10[ms], so I have only checked the operation when tinygo-keyboard cycle is 3[ms].
  2. Implement chattering countermeasures for keyboards other than kbduplexmatrix.go. kbsquaredmatrix.go etc.
sago35 commented 1 year ago

@ehime-iyokan Also, it would be good to include chattering prevention when changing from None to NoneToPress. This ensures consistent timing of press and release.

ehime-iyokan commented 1 year ago

@ehime-iyokan Also, it would be good to include chattering prevention when changing from None to NoneToPress. This ensures consistent timing of press and release.

Added chattering prevention when changing from None to NoneToPress in the following commit.