mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Avoid posting redundant key events.
This commit is contained in:
parent
84f7d8dfc2
commit
373847e2b7
@ -96,6 +96,9 @@ Keyboard::Keyboard(Serial::Line<true> &output) : output_(output) {
|
||||
}*/
|
||||
|
||||
void Keyboard::set_key_state(uint16_t key, bool is_pressed) {
|
||||
if(pressed_[key] == is_pressed) {
|
||||
return;
|
||||
}
|
||||
pressed_[key] = is_pressed;
|
||||
output_.write<false>(
|
||||
HalfCycles(60),
|
||||
|
Loading…
x
Reference in New Issue
Block a user