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

Braille does not work on secure Windows screens while normal copy of NVDA is running #2315

Open
nvaccessAuto opened this issue May 10, 2012 · 22 comments · Fixed by #14531
Open
Labels
bug component/braille p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.

Comments

@nvaccessAuto
Copy link

Reported by kevinchao89 on 2012-05-10 13:40
When using APH RefreshaBraille, there is no Braille support when on Windows logon screen.

Steps to Reproduce:

  1. Ensure NVDA is configured with APH RefreshaBraille 18;
  2. WINDOWS+L to lock Windows
  3. Read content using Braille display
    Expected: read, navigate, and input suing APH RefreshaBraille 18
    Actual: Speech-only support/access
@nvaccessAuto
Copy link
Author

Comment 1 by bramd on 2012-05-10 13:51
Please make sure your configuration is active on the login screen by saving the configuration and using the button in the General settings dialog to aply it to the logi nscreen and other security screens. Please test again and report your results.

@nvaccessAuto
Copy link
Author

Comment 2 by kevinchao89 on 2012-05-10 14:58
I have all my saved settings, including Braille display/settings set to be used on Windwos logon screen and other secured screens. For extra measure, I wnet ahead and configured everythign again, saved, and stold NVDA to use saved settings on Logon and other secured screens.
Unfortunately, locking the PC, Braille only displays "secure desktop"

@nvaccessAuto
Copy link
Author

Comment 3 by jteh on 2012-05-10 22:43
Just to clarify the issue, please do the following:

  1. Disable braille in your normal copy of NVDA. Do not save your settings.
  2. Press Windows+l to lock Windows.
    Does braille work now?

@nvaccessAuto
Copy link
Author

Comment 4 by kevinchao89 on 2012-05-11 12:07
If I do one of two things, Braille will work on Windows logon screen:

  1. Per your request, disable Braille in normal copy and press WINDOWS+L
  2. Unload NVDA
    Otherwise, in normal configuration with NVDA running and braille is configured properly, Braille will not work on Windows logon screen.

@nvaccessAuto
Copy link
Author

Comment 5 by jteh on 2012-05-13 23:07
It's worth noting that the Windows logon and lock screens are different, hence the original confusion.

The problem here is that the normal copy of NVDA is using the braille display, so the copy running on the secure screen can't. We need to suspend braille output when switching to secure screens. This is unfortunately much harder than it sounds. :)
Changes:
Changed title from "Braille: Does NOT work on Windwos logon screen" to "Braille does not work on secure Windows screens while normal copy of NVDA is running"

@LeonarddeR
Copy link
Collaborator

I wonder whether this could have been fixed in the new Baum driver, which also applies to this display.

@jcsteh
Copy link
Contributor

jcsteh commented Aug 14, 2017

Not sure what you mean by "new Baum driver". While there have been significant updates, they've all been incremental updates to the original driver that landed in 2010.

Regardless, this isn't fixed. As I noted in #2315 (comment):

The problem here is that the normal copy of NVDA is using the braille display, so the copy running on the secure screen can't. We need to suspend braille output when switching to secure screens. This is unfortunately much harder than it sounds. :)

This is more of a core issue than a driver specific issue.

@jcsteh jcsteh removed their assignment Aug 14, 2017
@LeonarddeR LeonarddeR reopened this Aug 14, 2017
@LeonarddeR
Copy link
Collaborator

Woops, sorry for going mad there.

@jcsteh commented on 14 aug. 2017 09:05 CEST:

Regardless, this isn't fixed. As I noted in #2315 (comment):

The problem here is that the normal copy of NVDA is using the braille display, so the copy running on the secure screen can't. We need to suspend braille output when switching to secure screens. This is unfortunately much harder than it sounds. :)

This is more of a core issue than a driver specific issue.

Is this really so hard? We have gainFocus and leaveFocus event for the secure desktop, so couldn't braille just be de-initialized for gainFocus and initialized for leaveFocus?

@jcsteh
Copy link
Contributor

jcsteh commented Aug 14, 2017

@leonardder commented on 14 Aug 2017, 18:27 GMT+10:

Is this really so hard? We have gainFocus and leaveFocus event for the secure desktop, so couldn't braille just be de-initialized for gainFocus and initialized for leaveFocus?

Ah, if only things were as simple as it seems they should be. :) This essentially comes down to timing. What you suggest would work just fine if the secure copy always initialised after the normal copy received the gain focus, finished terminating the braille display driver and Windows released all resources associated with the display. The reverse must also apply when terminating the secure copy. In practice, things don't necessarily happen quite this smoothly. I think the secure copy would need to retry initialisation (perhaps after a short delay) if initialisation failed the first time. The normal copy would likewise need to do this when re-initialising braille after returning from a secure screen.

@LeonarddeR
Copy link
Collaborator

@jcsteh commented on 14 aug. 2017 13:20 CEST:

... Windows released all resources associated with the display...

Talking about freeing resources and access permissions, have you considered opening the HID file handles with FILE_SHARE_READ and FILE_SHARE_WRITE access parameters? Also, how about default permissions on the handles that pyserial creates?

@jcsteh
Copy link
Contributor

jcsteh commented Aug 14, 2017 via email

@LeonarddeR
Copy link
Collaborator

Based on NVDA Remote, we could also go for a completely different implementation. When NVDA is running under the current user profile and the secure desktop is activated, create a socket that allows sending speech sequences and braille cell output from the secure copy to the user copy. In that case, speech and braille on secure screens will always match the settings for the local user. This becomes problematic when user switching comes into view or when the user copy of NVDA freezes in such a way that it couldn't longer output speech or braille. However, if the local copy acknowledges every "packet" it receives, the secure screen copy could easily fall back to stand alone speech and braille output as in the current situation when no acknowledgement have been received within a certain period.

@Qchristensen
Copy link
Member

Has anyone looked at this issue lately? From a user comment this morning I believe it is still present.

@LeonarddeR
Copy link
Collaborator

It is still present. My advise would be to wait for Python 3 and a possible integration of NVDA Remote into core.

@seanbudd seanbudd added p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation. labels Sep 14, 2022
@seanbudd seanbudd modified the milestones: 2022.4, 2023.1 Sep 14, 2022
@LeonarddeR
Copy link
Collaborator

@seanbudd You gave this a milestone of 2023.1, is this something NV Access wants to consider implementing?

I'm currently intending to write a proto type that adds a special braille display driver for this to NVDA that will be active on the secure screen. The secure screen copy of NVDA will send braille to this driver, which will use a named pipe to communicate the braille output to a named pipe server that will be running in the copy of NVDA that's currently active in the user session.
This is also related to #3564 (comment) in that said driver can be reused for a remote desktop implementation, the underlying connection will be the only thing that differs, but basically it's just writing data to a file handle. The Rust backend I wrote for the remote desktop connection is also based on named pipes, so lots of intentional overlap in scope of the two projects.

@seanbudd
Copy link
Member

It was initially a serious candidate for 2023.1. After the delays to 2022.4/2022.3.3 we are yet to re-evaluate, but I imagine we won't be completing this in 2023.1. If you do intend to implement a fix for this issue, I suggest doing it separately to the project you describe.

@seanbudd seanbudd removed this from the 2023.1 milestone Jan 2, 2023
seanbudd pushed a commit that referenced this issue Feb 14, 2023
…14531)

Related to #3564, #2315

Summary of the issue:
Currently, USB and Bluetooth devices are supported for braille display detection. Other devices using other protocols or software devices aren't supported. This pr intends to add support for this.

Description of user facing changes
None. User shouldn't experience anything different for now.

Description of development approach
Added Chain, a new extension point type that allows to register handlers that return iterables (mainly generators). Calling iter on the Chain returns a generator that iterates over all the handlers.
The braille display detector now relies on a new Chain. By default, functions are registered to the chain that yield usb and bluetooth devices. A custom provider can yield own driver names and device matches that are supported by that particular driver. A potential use case would be implementing automatic detection for displays using BRLTTY, for example. It will also be used to fix Braille does not work on secure Windows screens while normal copy of NVDA is running #2315 (see below)
Added a moveToEnd method on HandlerRegistrar, which allows changing the order of registered handlers. This allows add-ons to give priority to their handlers, which is especially helpful for both Chain and Filter. NVDA Remote should come for the braille viewer, otherwise controlling a system with braille viewer on with a 80 cell display connected to the controller would lower the display size to 40 unnecessarily. This will also be used to register a custom handler to bdDetect.scanForDevices to support auto detection of the user display on the secure screen instance of NVDA, which should come before USB and Bluetooth.
As a bonus, added type hints to extension points. For Filters and Chains, you could provide the value type and then a type checker can check validity.
As another bonus, all features are covered by new tests. So there are tests for the Chain extension point and for the specific use case in bdDetect
Testing strategy:
As this touches braille display auto detection quite a lot, probably merge this early in the 2023.2 cycle.

Known issues with pull request:
bdDetect.Detector does no longer take constructor parameters, rather queueBgScan should be called explicitly. This is because if we queue a scan in the constructor of Detector, the detector could switch to a display and disable detection before the _detector was set on the braille handler. Ideally we should use a lock as well, but that might be something as a follow up for both this pr and #14524. Note that though we're changing the constructor of a public class in bdDetect, the doc string of the class explicitly states that the Detector class should be used by the braille module only. That should be enough warning for users not to use this class and therefore I don't consider this API breaking.
@LeonarddeR
Copy link
Collaborator

Not sure how #14531 closed this issue, but this is certainly not fixed. #14531 was a step in the right direction though.

@LeonarddeR LeonarddeR reopened this Feb 15, 2023
@seanbudd
Copy link
Member

@LeonarddeR "fix #2315" was in the body of the PR description

@burmancomp
Copy link
Contributor

burmancomp commented Jun 14, 2023

@LeonarddeR just doing curiosity not wanting to cause any pressure, referring to what you write here, do you have plans for this issue?

@LeonarddeR
Copy link
Collaborator

LeonarddeR commented Jun 14, 2023 via email

@burmancomp
Copy link
Contributor

Nice to hear! Then it will be there some day in the near future.

@LeonarddeR
Copy link
Collaborator

LeonarddeR commented Jun 14, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component/braille p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants