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

Shift/Ctrl + Enter returns modifiers::NONE #669

Closed
Araxeus opened this issue May 20, 2022 · 3 comments
Closed

Shift/Ctrl + Enter returns modifiers::NONE #669

Araxeus opened this issue May 20, 2022 · 3 comments

Comments

@Araxeus
Copy link

Araxeus commented May 20, 2022

Describe the bug
Ctrl + Enter = modifiers::NONE
Shift + Enter = modifiers::NONE

Alt + Enter = modifiers::ALT

To Reproduce

use crossterm::{event::read, terminal};

fn main() {
	terminal::enable_raw_mode();
	let res = read().unwrap();
	terminal::disable_rawmode();
	println!("{:#?}", res);
}

OS

  • Ubuntu 21.10

Terminal/Console

  • gnome-terminal

I couldn't test on Mac, but on Windows - all modifiers are returned just fine

@doinkythederp
Copy link

Can reproduce on macOS using a few different terminals

Code I used:

use crossterm::{event::read, terminal};

fn main() -> std::io::Result<()> {
    terminal::enable_raw_mode()?;
    let res = read()?;
    terminal::disable_raw_mode()?;
    println!("{:#?}", res);
    Ok(())
}
  • iTerm2, Terminal.app
    • Ctrl + Enter = NONE
    • Shift + Enter = NONE
    • Alt + Enter = NONE
  • VSCode Integrated Terminal
    • Ctrl + Enter = NONE
    • Shift + Enter = NONE
    • Alt + Enter = ALT

@TimonPost
Copy link
Member

Thanks for reporting the missing keys, those key combinations are likely not implemented yet. I'll leave this issue open such that people can add support for the keys.

@TimonPost
Copy link
Member

Closing in favor of #685.

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

No branches or pull requests

3 participants