diff options
author | Brooks J Rady <b.j.rady@gmail.com> | 2021-10-12 23:11:23 +0100 |
---|---|---|
committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-10-12 23:11:23 +0100 |
commit | b94b25c5fe504eb9f9f15cfebaa7cb5f9c0af2e6 (patch) | |
tree | 00e876635601ff2fb928ad4aa74d26f11c4afaf1 /zellij-tile/src | |
parent | 0710594588aa768b934f925704dc57486dc0a157 (diff) |
fix(plugin): clean up the mouse PR a little
Diffstat (limited to 'zellij-tile/src')
-rw-r--r-- | zellij-tile/src/data.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/zellij-tile/src/data.rs b/zellij-tile/src/data.rs index c98ebb248..4d6bba303 100644 --- a/zellij-tile/src/data.rs +++ b/zellij-tile/src/data.rs @@ -27,12 +27,15 @@ pub enum Key { #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] +// FIXME: This should be extended to handle different button clicks (not just +// left click) and the `ScrollUp` and `ScrollDown` events could probably be +// merged into a single `Scroll(isize)` event. pub enum Mouse { - ScrollUp(usize), // number of lines - ScrollDown(usize), // number of lines - LeftClick(isize, usize), // line and column - MouseHold(isize, usize), // line and column - MouseRelease(Option<(isize, usize)>), // line and column + ScrollUp(usize), // number of lines + ScrollDown(usize), // number of lines + LeftClick(isize, usize), // line and column + Hold(isize, usize), // line and column + Release(Option<(isize, usize)>), // line and column } #[derive(Debug, Clone, PartialEq, EnumDiscriminants, ToString, Serialize, Deserialize)] @@ -42,7 +45,7 @@ pub enum Mouse { pub enum Event { ModeUpdate(ModeInfo), TabUpdate(Vec<TabInfo>), - KeyPress(Key), + Key(Key), Mouse(Mouse), Timer(f64), CopyToClipboard, |