tui-realm icon indicating copy to clipboard operation
tui-realm copied to clipboard

[BUG] - version 1.9.0+ not handling Crossterm Mouse scroll event anymore

Open hasezoey opened this issue 6 months ago • 0 comments

Description

Since tui-realm 1.9.0 with the crossterm backend is not handling mouse scroll wheel up / down anymore (1.8 did handle it as Key event UP and DOWN) and now just has Event::None

Steps to reproduce

Any Component that handles input and is focused, log the events, compare tui-realm 1.8 and 1.9

Expected behaviour

to handle key events the same as 1.8

Environment

  • OS: Linux (Manjaro 23.1.0)
  • Architecture x86_64
  • Rust version 1.74.1
  • tui-realm version 1.9.1 (default features + serialize)

Additional information

logs:

from:

impl Component<Msg, NoUserEvent> for CMP {
    fn on(&mut self, ev: Event<NoUserEvent>) -> Option<Msg> {
        trace!("EVENT {:#?}", ev);
        // ...
    }
}

1.8:

// ScrollWheel DOWN
Keyboard(
    KeyEvent {
        code: Down,
        modifiers: NONE,
    },
)

// ScrollWheel UP
Keyboard(
    KeyEvent {
        code: Up,
        modifiers: NONE,
    },
)

1.9:

// ScrollWheel DOWN
None

// ScrollWheel UP
None

also 1.9 seemingly forwards hover / mouse movement events as Event::None compared to 1.8 which did not forward any hover events

my guess is that it is related to the crossterm dependency upgrade from 0.25 to 0.27

hasezoey avatar Dec 10 '23 15:12 hasezoey