From d29730a809396c1ae88a3dc7b4967041d1e5b03e Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Wed, 3 Aug 2022 11:52:01 +0200 Subject: [PATCH] Export the crossterm key types (#457) Export `crossterm::event::{KeyCode, KeyModifiers}` as our own. This way users of the library don't have to import crossterm with the same version explicitly to set their own keybindings. Closes #456 --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 8f44e0d..da4e4c1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -263,3 +263,6 @@ pub use utils::{ get_reedline_keybinding_modifiers, get_reedline_keycodes, get_reedline_prompt_edit_modes, get_reedline_reedline_events, }; + +// Reexport the key types to be independent from an explicit crossterm dependency. +pub use crossterm::event::{KeyCode, KeyModifiers};