src/global/structs/keyaction.rs
33 lines · 969 bytes
1use serde::{Deserialize, Serialize};
2
3/// Part of the keybindings config
4// Each key + modifier is bind to a key in a HashMap<KeyCode, HashMap<u8, KeyAction>>
5#[derive(Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Debug)]
6pub enum KeyAction {
7 /// Moves cursor to the left direction, or to the first item
8 MoveLeft,
9 /// Moves cursor to the right direction, or to the last item
10 MoveRight,
11 /// Moves cursor up
12 MoveUp,
13 /// Moves cursor dowm
14 MoveDown,
15 /// select the current item
16 Select,
17 /// deselect the current item, reverts the cursor back to its hover state
18 Deselect,
19 /// exits/quits the entire app
20 Exit,
21 /// revert last history
22 Back,
23 /// removes all history
24 ClearHistory,
25 /// reverts back to first history (home page if it is not cleared)
26 FirstHistory,
27 /// reload the current page
28 Reload,
29 /// start command capture
30 StartCommandCapture,
31 /// paste text
32 Paste,
33}