New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adb_usb: Lag on typing #518
Comments
talmuth
pushed a commit
to talmuth/tmk_keyboard
that referenced
this issue
Aug 8, 2018
* cub/master: (444 commits) Inline functions need to be declared as static Add include guards Add a full example of a tenkeyless using the teensy 3.2 (tmk#543) Improve ASCII representation of 122 (tmk#544) hhkb: Fix for USB NKRO for RN42 usb_usb: Fix code format usb_usb: Support Brazilian specific key in unimap usb_usb: Support Korean specific keys in unimap core: lufa: Add delay for console startup hhkb: Update README and remove makefiles core: Add utility macros in action_macro.h (tmk#532) core: Add utility type_code() in aciton.h tmk#528 core: Typo (mantrix -> matrix) core: Saved 60~ bytes (and possible performance) by storing col_mask when iterating through columns (tmk#522) Typos (tmk#524) core: Fix for un-defined function when compiling without MOUSEKEY_ENABLE core: Fix for unused function when compiling without MOUSEKEY_ENABLE adb_usb: Update firmware binary adb_usb: Fix tmk#518 Lag on typing core: Fix for warning of unused function standby() ...
talmuth
pushed a commit
to talmuth/tmk_keyboard
that referenced
this issue
Aug 9, 2018
* cub/master: (189 commits) Inline functions need to be declared as static Add include guards Add a full example of a tenkeyless using the teensy 3.2 (tmk#543) Improve ASCII representation of 122 (tmk#544) hhkb: Fix for USB NKRO for RN42 usb_usb: Fix code format usb_usb: Support Brazilian specific key in unimap usb_usb: Support Korean specific keys in unimap core: lufa: Add delay for console startup hhkb: Update README and remove makefiles core: Add utility macros in action_macro.h (tmk#532) core: Add utility type_code() in aciton.h tmk#528 core: Typo (mantrix -> matrix) core: Saved 60~ bytes (and possible performance) by storing col_mask when iterating through columns (tmk#522) Typos (tmk#524) core: Fix for un-defined function when compiling without MOUSEKEY_ENABLE core: Fix for unused function when compiling without MOUSEKEY_ENABLE adb_usb: Update firmware binary adb_usb: Fix tmk#518 Lag on typing core: Fix for warning of unused function standby() ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It feels longer lag on key press.
Cause
Adding ADB mouse support causes or makes worse this problem. In addition to 12 ms polling interval
of keyboard mouse support uses another
_delay_ms(12)for its polling. In the result 24ms delay is required on every keyboard polling.tmk_keyboard/converter/adb_usb/matrix.c
Line 130 in cccd418
Solution
Instead of busy loop with
_delay_ms(12)it should use timer and check elapsed time.Background
In ADB protocol host controller polls devices on bus one by one repeatedly with talk command.
https://developer.apple.com/legacy/library/technotes/hw/hw_01.html#Section2
Some old keyboards like IIgs goes bad at fast polling rate, such as missing key. You have to long interval with those keyboards, we chose 12ms.
tmk_keyboard/tmk_core/protocol/adb.c
Lines 82 to 87 in 230ed4b
The text was updated successfully, but these errors were encountered: