Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

included methods to enable mouse events for windows and unix #93

Closed

Conversation

imdaveho
Copy link
Contributor

Getting mouse events to be enabled and disabled in crossterm_input. This is to support Input Expansion: #81

Next steps/branch:

  • translate windows inputs into csi / vt sequences
  • update windows_input read_async to send the translated vt_sequences into the channel
  • add a parse_event method to handle the vt sequences from AsyncReader

Copy link
Member

@TimonPost TimonPost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and on the right track! Curious for the other code!

fn enable_mouse(&self, __stdout: &Option<&Arc<TerminalOutput>>) -> Result<()> {
let console_mode = ConsoleMode::new()?;
let dw_mode = console_mode.mode()?;
let ENABLE_MOUSE_MODE = 0x0010 | 0x0080;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should make this a constant.

fn disable_mouse(&self, __stdout: &Option<&Arc<TerminalOutput>>) -> Result<()> {
let console_mode = ConsoleMode::new()?;
let dw_mode = console_mode.mode()?;
let ENABLE_MOUSE_MODE = 0x0010 | 0x0080;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should make this a constant.

@imdaveho
Copy link
Contributor Author

imdaveho commented Mar 8, 2019

replacing this with combined (legacy) windows-api input handling for mouse and adv keyboard events

december1981 pushed a commit to december1981/crossterm that referenced this pull request Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants