mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-29 15:40:19 +00:00
Tweaked mouse and keyboard accept rates
This commit is contained in:
parent
a0729d3913
commit
8c005a327b
1 changed files with 3 additions and 3 deletions
|
@ -127,7 +127,7 @@ fn main() -> error::Result<()> {
|
||||||
for event in reader {
|
for event in reader {
|
||||||
match event {
|
match event {
|
||||||
InputEvent::Keyboard(key) => {
|
InputEvent::Keyboard(key) => {
|
||||||
if Instant::now().duration_since(keyboard_timer).as_millis() >= 10 {
|
if Instant::now().duration_since(keyboard_timer).as_millis() >= 30 {
|
||||||
if tx.send(Event::KeyInput(key)).is_err() {
|
if tx.send(Event::KeyInput(key)).is_err() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ fn main() -> error::Result<()> {
|
||||||
if let Some(event) = reader.next() {
|
if let Some(event) = reader.next() {
|
||||||
match event {
|
match event {
|
||||||
InputEvent::Keyboard(key) => {
|
InputEvent::Keyboard(key) => {
|
||||||
if Instant::now().duration_since(keyboard_timer).as_millis() >= 10 {
|
if Instant::now().duration_since(keyboard_timer).as_millis() >= 30 {
|
||||||
if tx.send(Event::KeyInput(key)).is_err() {
|
if tx.send(Event::KeyInput(key)).is_err() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ fn main() -> error::Result<()> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
InputEvent::Mouse(mouse) => {
|
InputEvent::Mouse(mouse) => {
|
||||||
if Instant::now().duration_since(mouse_timer).as_millis() >= 40 {
|
if Instant::now().duration_since(mouse_timer).as_millis() >= 30 {
|
||||||
if tx.send(Event::MouseInput(mouse)).is_err() {
|
if tx.send(Event::MouseInput(mouse)).is_err() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue