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

MOSH's escape keyboard shortcut (ctrl+^) not worked #2797

Open
amurchick opened this issue Mar 30, 2020 · 8 comments
Open

MOSH's escape keyboard shortcut (ctrl+^) not worked #2797

amurchick opened this issue Mar 30, 2020 · 8 comments
Labels
help wanted type/bug Something is misbehaving

Comments

@amurchick
Copy link

Issue

In MOSH (https://mosh.mit.edu/) for exit I am need to input ctrl+^ (actually for this I am pressed keys ctrl, shift, 6).

In xterm.js this combination not worked.
In iTerm and native terminal app - this combination worked.

From MOSH manual:

ESCAPE SEQUENCES
       The  default  escape  character used by Mosh is ASCII RS (decimal 30).  
       This is typically typed as Ctrl-^ or Ctrl-Shift-6, on US English keyboards.  

In Chrome this combination succesfully catched by event keypress like this (key code === 30):
image

Details

  • Browser and browser version: Google Chrome Version 80.0.3987.149 (Official Build) (64-bit)
  • OS version: macOS 10.15.4
  • xterm.js version: 4.4.0

Steps to reproduce

  1. Show in xterm.js terminal from linux which have command showkey (I am use debian) and run
showkey -a

and then press ctrl, shift, 6 - nothing was happends.

  1. In other terminal do same - and you will see:
    image
@Tyriar
Copy link
Member

Tyriar commented Apr 5, 2020

We're definitely not sending anything for ctrl+shift+6, you can check by running the demo and setting logLevel to debug.

@amurchick
Copy link
Author

amurchick commented Apr 14, 2020

@Tyriar Please pay attention on ^@ (ctrl+shift+2) - also not worked in xterm.js.
This key combination must send 0x00.

@Tyriar
Copy link
Member

Tyriar commented Apr 14, 2020

@amurchick do you know where documentation is that specifies what all ctrl+shift+ keys are meant to send?

@amurchick
Copy link
Author

amurchick commented May 4, 2020

@Tyriar I am can't find documentation, here all non-printable codes from 0 to 31 and how to send it (^ is ctrl key press):

user@debian$ showkey -a
Press any keys - Ctrl-D will terminate this program
^@        0 0000 0x00
^A        1 0001 0x01
^B        2 0002 0x02
^C        3 0003 0x03
.....
^X       24 0030 0x18
^Y       25 0031 0x19               
^Z       26 0032 0x1a
^[       27 0033 0x1b
^\       28 0034 0x1c
^]       29 0035 0x1d
^^       30 0036 0x1e
^_       31 0037 0x1f

This is real showkey output in MacOS terminal app, connected to debian and I am pressed all these combinations on keyboard

@Tyriar
Copy link
Member

Tyriar commented Oct 18, 2021

showkey on Terminal.app shows:

  • ctrl+shift+6: RS (decimal 30)
  • ctrl+shift+2: NUL (decimal 0)

iterm does as well but other numbers print just the numbers.

@Tyriar Tyriar added type/enhancement Features or improvements to existing features and removed type/bug Something is misbehaving labels Oct 18, 2021
@Tyriar Tyriar added this to the 4.15.0 milestone Oct 18, 2021
@Tyriar
Copy link
Member

Tyriar commented Oct 18, 2021

This can be handled by the embedder. Since this is afaik not an official VT keybinding I suggest hooking up your own keybindings for this in a custom key event handler.

@Tyriar Tyriar closed this as completed Oct 18, 2021
@Tyriar Tyriar removed this from the 4.15.0 milestone Oct 18, 2021
@amurchick
Copy link
Author

This can be handled by the embedder. Since this is afaik not an official VT keybinding I suggest hooking up your own keybindings for this in a custom key event handler.

Up to you.

But as you see in image in first post - browser correctly determite this key combination as code 30 - so this is not "custom keybinding":
Screen Shot 2022-02-21 at 18 44 11

And all other terminal software handle this key combination correctly.

@Tyriar
Copy link
Member

Tyriar commented Feb 22, 2022

Ah you're right, ctrl+shift+2 (ctrl+@) also correctly sends null. Looking at https://www.decisivetactics.com/support/view?article=control-characters, we handle all of them correctly (ctrl+w/t don't work because of browser keys) except for ctrl+@, ctrl+^ and ctrl+?.

@Tyriar Tyriar reopened this Feb 22, 2022
@Tyriar Tyriar added type/bug Something is misbehaving and removed type/enhancement Features or improvements to existing features labels Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type/bug Something is misbehaving
Projects
None yet
Development

No branches or pull requests

2 participants