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

Can't type NUL character in Terminal using a Windows Alt-code #122436

Closed
wyckster opened this issue Apr 27, 2021 · 2 comments
Closed

Can't type NUL character in Terminal using a Windows Alt-code #122436

wyckster opened this issue Apr 27, 2021 · 2 comments
Assignees
Labels
*as-designed Described behavior is as designed terminal General terminal issues that don't fall under another label windows VS Code on Windows issues
Milestone

Comments

@wyckster
Copy link

wyckster commented Apr 27, 2021

Issue Type: Bug

I can type a NUL character in telnet from the Windows command console, but not from a vscode terminal window. I often use telnet to test simple TCP socket servers - in this case I'm trying to send a 0x00 byte to a server - a.k.a. in ASCII as NUL. vscode's terminal window disallows me sending the 0x00 byte. Works fine from a normal console window.

Steps to Reproduce:

In spirit, we're going to try to type a NUL character in a terminal using a windows Alt-Code. Check out How to use alt codes if you don't know how to type them. Basically press Alt, then the decimal digits of the byte to send on the numeric keypad then release Alt.

  1. In a terminal, type an ASCII NUL character (Alt + NumPad 0 + NumPad 0 + NumPad 0)

This character does not get typed.

I realize this is difficult to observe.

Here's the actual scenario in which I noticed this:

  1. launch vscode (Windows 10)
  2. open a terminal (Ctrl + Shift + `)
  3. run telnet from the command line interface (may require adding telnet from control panel > turn windows features on or off > Telnet Client)
  4. open a connection to a server. (I suggest something that lets you see what characters have been transmitted. If not, use wireshark. The actual server isn't part of this bug. Or set up your own mechanism for detecting the NUL character being typed.)
  5. Type a NUL ASCII character (Alt + NumPad 0 + NumPad 0 + NumPad 0)

Notice that the NUL is never emitted in the telnet data stream.

Again, this technique for typing a NUL into telnet works fine from a traditional Windows console, but not from a vscode terminal. It should be possible to type a NUL character using this technique in the vscode terminal.

VS Code version: Code 1.55.2 (3c4e3df, 2021-04-13T09:35:57.887Z)
OS version: Windows_NT x64 10.0.19042

System Info
Item Value
CPUs Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (8 x 3410)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.95GB (17.74GB free)
Process Argv --crash-reporter-id e5e654ef-9a6a-490b-ab1a-fca91fec1429
Screen Reader no
VM 0%
Extensions (22)
Extension Author (truncated) Version
Bookmarks ale 13.0.4
gitlens eam 11.4.1
ev3dev-browser ev3 1.2.0
matlab Gim 2.0.1
beautify Hoo 1.5.0
vscode-cudacpp kri 0.1.1
ev3-micropython leg 2.0.0
Kotlin mat 1.7.1
dotenv mik 1.0.1
vscode-clang mit 0.2.3
vscode-docker ms- 1.12.1
python ms- 2021.4.765268190
jupyter ms- 2021.5.745244803
remote-wsl ms- 0.54.6
cmake-tools ms- 1.7.1
cpptools ms- 1.3.1
hexeditor ms- 1.5.0
ejs-language-support Qas 0.0.1
sass-indented rob 1.5.1
shader sle 1.1.5
cmake twx 0.0.17
clang-format xav 1.9.0
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry914:30276682
pythonvsnew554cf:30291488
pythontb:30283811
pythonvspyt551cf:30291415
vspre833cf:30267465
pythonptprofiler:30281270
vshan820:30294714
pythondataviewer:30285071
vscus158cf:30286554
vscgsv2:30294352

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities terminal General terminal issues that don't fall under another label windows VS Code on Windows issues labels May 3, 2021
@Tyriar Tyriar added this to the Backlog milestone May 3, 2021
@Tyriar
Copy link
Member

Tyriar commented Oct 18, 2021

alt+x,y,z works fine, just not for alt+0,0,0. Closing as designed since this alt sequence is something provided by the OS and it seems to work fine. Note that coming in the next version we'll have ctrl+shift+2 as a builtin keybinding for NUL which you could use instead: #135313

@Tyriar Tyriar added *as-designed Described behavior is as designed and removed bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities labels Oct 18, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed terminal General terminal issues that don't fall under another label windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

4 participants
@Tyriar @wyckster @meganrogge and others