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

Badly handles Cmd + Arrow in IntelliJ Terminal #597

Closed
ggoraa opened this issue Aug 23, 2021 · 1 comment
Closed

Badly handles Cmd + Arrow in IntelliJ Terminal #597

ggoraa opened this issue Aug 23, 2021 · 1 comment

Comments

@ggoraa
Copy link

ggoraa commented Aug 23, 2021

Describe the bug
Instead of displaying at least NONE + Left for Cmd + Left, it throws some gibberish

To Reproduce
Steps to reproduce the behavior:

  1. Run this code:
loop {
        enable_raw_mode()?;
        let event = read()?;
        match event {
            Event::Resize(_, _) => {
                disable_raw_mode()?;
                continue;
            }
            Event::Key(KeyEvent { modifiers: modifier, code: key_code }) => {
                disable_raw_mode();
                println!("{:?} {:?}", modifier, key_code);
            }
            _ => {}
        }
}
  1. Type for example Cmd + Arrow Right. It will be displayed as:
NONE Esc
NONE Char('[')
SHIFT Char('C')

in the command line, and:

NONE Esc
NONE Char('[')
SHIFT Char('D')

for Cmd + Arrow Left

Expected behavior
Show at least NONE Left or CTRL Left if pressed Cmd + Left, the same applies for right

OS

  • macOS

Terminal/Console

  • IntelliJ IDEA Terminal

Issue does not appear to work in iterm2. If I disable tab changing on Cmd + Arrow, and try to execute the thing, it will return me NONE + Left for Cmd + Left. Btw, I would be pleased to see an entry for Cmd key in KeyModifiers :D

@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

2 participants