diff --git a/Cargo.lock b/Cargo.lock index d45b6f14..cad398fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -216,7 +216,7 @@ dependencies = [ "clap_mangen", "concat-string", "const_format", - "crossterm", + "crossterm 0.26.1", "ctrlc", "dirs", "fern", @@ -473,6 +473,22 @@ dependencies = [ "winapi", ] +[[package]] +name = "crossterm" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13" +dependencies = [ + "bitflags", + "crossterm_winapi", + "libc", + "mio", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", +] + [[package]] name = "crossterm_winapi" version = "0.9.0" @@ -1713,7 +1729,7 @@ checksum = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1" dependencies = [ "bitflags", "cassowary", - "crossterm", + "crossterm 0.25.0", "unicode-segmentation", "unicode-width", ] diff --git a/Cargo.toml b/Cargo.toml index c7e65bee..0b9c7bf1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,7 +78,7 @@ cfg-if = "1.0.0" clap = { version = "3.2.2", features = ["default", "cargo", "wrap_help"] } concat-string = "1.0.1" const_format = "0.2.30" -crossterm = "0.25.0" +crossterm = "0.26.1" ctrlc = { version = "3.2.5", features = ["termination"] } dirs = "4.0.0" fern = { version = "0.6.1", optional = true } diff --git a/README.md b/README.md index a1fa87aa..328f33b4 100644 --- a/README.md +++ b/README.md @@ -333,7 +333,7 @@ More details on configuration can be found [in the documentation](https://clemen ## Troubleshooting -If some things aren't working, give the [Troubleshooting page](https://clementtsang.github.io/bottom/nightly/troubleshooting) a look. If things still aren't +If some things aren't working, give the [troubleshooting page](https://clementtsang.github.io/bottom/nightly/troubleshooting) a look. If things still aren't working, then consider opening [a question](https://github.com/ClementTsang/bottom/discussions) or filing a [bug report](https://github.com/ClementTsang/bottom/issues/new/choose). ## Contribution @@ -421,4 +421,4 @@ Thanks to all contributors: work of many talented people. This application would be impossible without their work. I used to thank them all individually but the list got too large... -- And of course, another round of thanks to all contributors and package maintainers! +- And of course, another round of thanks to all the contributors and package maintainers! diff --git a/docs/requirements.txt b/docs/requirements.txt index 222d5bc3..ad4e34c7 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ mkdocs == 1.4.2 -mkdocs-material == 9.1.0 +mkdocs-material == 9.1.3 mkdocs-material-extensions == 1.1.1 mdx_truly_sane_lists == 1.3 mike == 1.1.2 diff --git a/src/lib.rs b/src/lib.rs index d2266004..e339b067 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,7 +40,7 @@ use constants::*; use crossterm::{ event::{ poll, read, DisableBracketedPaste, DisableMouseCapture, Event, KeyCode, KeyEvent, - KeyModifiers, MouseEvent, MouseEventKind, + KeyEventKind, KeyModifiers, MouseEvent, MouseEventKind, }, execute, style::Print, @@ -448,7 +448,9 @@ pub fn create_input_thread( break; } } - Event::Key(key) => { + Event::Key(key) if key.kind == KeyEventKind::Press => { + // For now, we only care about keydown events. This may change in the future. + if sender.send(BottomEvent::KeyInput(key)).is_err() { break; }