Skip to content

Send corresponding escape code for alt+space and ctrl+alt+space#4290

Merged
Tyriar merged 1 commit intoxtermjs:masterfrom
JasonXJ:alt-space
Dec 7, 2022
Merged

Send corresponding escape code for alt+space and ctrl+alt+space#4290
Tyriar merged 1 commit intoxtermjs:masterfrom
JasonXJ:alt-space

Conversation

@JasonXJ
Copy link
Copy Markdown

@JasonXJ JasonXJ commented Dec 6, 2022

The previous behavior is that this combinations do nothing.

The previous behavior is that this combinations do nothing.
@JasonXJ
Copy link
Copy Markdown
Author

JasonXJ commented Dec 6, 2022

Thew new behavior matches what gnome-terminal and hterm do.

Copy link
Copy Markdown
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

@jerch does this seem correct to you?

Copy link
Copy Markdown
Member

@jerch jerch left a comment

Choose a reason for hiding this comment

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

Yes looks correct to me. I cannot really test any of them, as my window manager eats those combinations. But the basic idea of the Alt+mechanics is correct: send byte value of the pressed keys with ESC prepended:

  • "space" ---> 0x20 == SP
  • "alt-space" --> 0x1b20 == ESC SP
  • "ctrl-space" ---> 0x00 == NUL
  • "alt-ctrl-space" ---> 0x1b00 == ESC NUL

So I'd give this a go until someone claims, thats not the right Alt expansion for that particular key combinations.

@Tyriar Tyriar added this to the 5.1.0 milestone Dec 7, 2022
@Tyriar Tyriar merged commit fe30cd6 into xtermjs:master Dec 7, 2022
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.

3 participants