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

Two-letter prompts and two-letter outputs are not spoken automatically in console #10988

Open
mltony opened this issue Apr 12, 2020 · 2 comments

Comments

@mltony
Copy link
Contributor

mltony commented Apr 12, 2020

Steps to reproduce:

  1. Open command line prompt.
  2. Type the following command to set short prompt:
PROMPT $N$G
  1. Press Enter to execute above command. Now your prompt is something like C> instead of typical full path.
  2. Press enter again repeatedly to hear the new prompt.

Actual behavior:

Nothing is spoken.

Expected behavior:

NVDA should announce the new prompt every time Enter is pressed (but before the entire console window is filled with new prompts).

Comments

I checked the source code and I do understand that if prompt is set to a single character, it won't be spoken because a single character can be easily confused with typed character. But I couldn't figure out why setting prompt to two characters can no longer be spoken.
I checked the source code, and it seems that NVDAObjects.behaviours.EnhancedTermTypedCharSupport._reportNewLines is responsible for that.
As I use cmd prompt heavily for my work, I used to customize my prompt to be really short as it is typically redundant to make it speak the full path every time. However when I upgraded to 2020.1 beta1, I figured out I'd need to set my prompt to be at least 3 characters instead of 2.
Another way to reproduce this issue is the follwoing command:

echo aa && sleep 1

In this command the output, that consists of two characters is not spoken automatically.

System configuration

NVDA installed/portable/running from source:

Portable

NVDA version:

2020.1 beta1

Windows version:

Microsoft Windows [Version 10.0.17134.1304]

Name and version of other software in use when reproducing the issue:

N/A

Other information about your system:

Report dynamic content changes is set to On.
Speak typed characters is set to off.
Settings>Advanced>Use UI Automation to access the Windows Console when available can be either checked or unchecked - that is this issue can be reproduced with either setting.
Settings>Advanced>Use the new typed character support in Windows Console when available is checked. Unchecking this option actually seems to be fixing the two-character prompt problem, but sometimes breaks speaking of commands output.

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

This was working as expected in 2019.2 and prior versions.

If addons are disabled, is your problem still occuring?

Yes.

Did you try to run the COM registry fixing tool in NVDA menu / tools?

Yes

@Adriani90
Copy link
Collaborator

Cc: @codeofdusk

@codeofdusk
Copy link
Contributor

Interesting, no console changes were made in 2020.1. The logic in _reportNewLines is needed to avoid double-speaking some characters when events are slow to fire, maybe I can adjust this a bit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants