| 1 | #[cfg(feature = "crossterm")] |
| 2 | mod crossterm; |
| 3 | |
| 4 | #[cfg(feature = "termion")] |
| 5 | mod termion; |
| 6 | |
| 7 | #[cfg(feature = "termwiz")] |
| 8 | mod termwiz; |
| 9 | |
| 10 | /// Input enum to represent the fours different actions available inside a [`FileExplorer`](crate::FileExplorer). |
| 11 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
| 12 | pub enum Input { |
| 13 | /// Move the selection up. |
| 14 | Up, |
| 15 | /// Move the selection down. |
| 16 | Down, |
| 17 | /// Select the first entry. |
| 18 | Home, |
| 19 | /// Select the last entry. |
| 20 | End, |
| 21 | /// Scroll several entries up. |
| 22 | PageUp, |
| 23 | /// Scroll several entries down. |
| 24 | PageDown, |
| 25 | /// Go to the parent directory. |
| 26 | Left, |
| 27 | /// Go to the child directory (if the selected item is a directory). |
| 28 | Right, |
| 29 | /// Toggle between showing hidden files or not. |
| 30 | ToggleShowHidden, |
| 31 | /// Do nothing (used for converting events from other libraries, like |
| 32 | /// [crossterm](https://docs.rs/crossterm/latest/crossterm/event/enum.Event.html), |
| 33 | /// [termion](https://docs.rs/termion/latest/termion/event/enum.Event.html) and |
| 34 | /// [termwiz](https://docs.rs/termwiz/latest/termwiz/input/enum.InputEvent.html) to [`Input`]). |
| 35 | None, |
| 36 | } |