Skip to content

Commit

Permalink
added trackpoint polling delay to fix dropped keystrokes
Browse files Browse the repository at this point in the history
  • Loading branch information
alonswartz committed Apr 19, 2017
1 parent e71670a commit a5c7dc8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tmk_core/common/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "adb.h"
#endif

#ifdef PS2_MOUSE_ENABLE
static uint32_t ps2_mouse_poll_time = 0;
static int ps2_mouse_poll_interval = 10; // milliseconds
#endif

#ifdef MATRIX_HAS_GHOST
static bool has_ghost_in_row(uint8_t row)
Expand Down Expand Up @@ -74,6 +78,7 @@ void keyboard_init(void)
matrix_init();
#ifdef PS2_MOUSE_ENABLE
ps2_mouse_init();
ps2_mouse_poll_time = timer_read32();
#endif
#ifdef SERIAL_MOUSE_ENABLE
serial_mouse_init();
Expand Down Expand Up @@ -152,7 +157,10 @@ void keyboard_task(void)
#endif

#ifdef PS2_MOUSE_ENABLE
ps2_mouse_task();
if ( timer_elapsed32( ps2_mouse_poll_time ) >= ps2_mouse_poll_interval ) {
ps2_mouse_task();
ps2_mouse_poll_time = timer_read32();
}
#endif

#ifdef SERIAL_MOUSE_ENABLE
Expand Down

0 comments on commit a5c7dc8

Please sign in to comment.