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

Add Braille Viewer to NVDA #7788

Closed
LeonarddeR opened this issue Nov 21, 2017 · 10 comments
Closed

Add Braille Viewer to NVDA #7788

LeonarddeR opened this issue Nov 21, 2017 · 10 comments
Labels

Comments

@LeonarddeR
Copy link
Collaborator

@feerrenrut created a handy tool to view braille on screen. Especially for sighted testers, it would be ideal if this would be available in core.

Note that braille.BrailleBuffer now has a windowRawText auto property which can be used to get the raw text for the current window. It should also be made sure that the braille viewer does not conflict with the speech viewer. May be even tie them together?

@feerrenrut
Copy link
Contributor

@LeonarddeR this tool came from @jcsteh originally. I have been looking at how to integrate this into core. I agree that it would be quite handy!

A couple of points:

  • I would suggest braille viewer it is kept independent from speech viewer
  • Like speech viewer it should be enabled through the tools menu
  • A real braille display should be able to be used at the same time
    • For simplicity (of displaying, and navigating etc), I would suggest that the braille viewer tool adapts to take on the same number of cells as the active physical braille display.
  • The braille viewer should show the raw text as well as the dots.

@LeonarddeR
Copy link
Collaborator Author

@feerrenrut commented on 22 nov. 2017 08:19 CET:

  • Like speech viewer it should be enabled through the tools menu

Seems like a completely new implementation. How about a toggle to switch between speech and braille in the speech viewer?

  • For simplicity (of displaying, and navigating etc), I would suggest that the braille viewer tool adapts to take on the same number of cells as the active physical braille display.

I agree, but that might add some complexity in case of lengthy displays, in which case braille dots and/or text may not fit on one line of the screen.

@feerrenrut
Copy link
Contributor

@LeonarddeR I have pushed a proof of concept for the braille viewer tool. This is far from finished, although quite functional. See branch i7788-integrateBrailleViewer and comparison with master

@feerrenrut
Copy link
Contributor

How about a toggle to switch between speech and braille in the speech viewer?

I for one would like to be able to view them both at the same time, often I want to compare the output.

I agree, but that might add some complexity in case of lengthy displays, in which case braille dots and/or text may not fit on one line of the screen.

This is true, however, matching the number of cells simplifies the implementation within braille.py. If it proved to be a problem for people, I think we could handle this on the GUI side.

@LeonarddeR
Copy link
Collaborator Author

Looks quite good, except for that I'm a bit worried about compatibility with braille support in the NVDA Remote add-on, which also magically changes braille.handler.displaySize. This is likely to cause issues when a remote connection is established with someone having a shorter braille display than the current braille display width. Also, I belief that in the current situation, NVDA Remote will simply disable the braille handler as soon as a user without a braille display disconnects from a system with a braille display, even though the viewer is active.

@feerrenrut
Copy link
Contributor

Ok, I'll have to look at how NVDA Remote interacts here.

How are these issues currently handled when physical braille displays are present?

@DrSooom
Copy link

DrSooom commented Apr 17, 2018

In my opinion the braille viewer window should contain the following:

  1. First line in plain text mode (Consolas). The text on the braille display can be read here as "normal" text. The Braille-Cursor is shown as an underlined letter. And the underline should blink depending on the time set up in the braille settings window.
  2. Second line in braille dots mode (Consolas, but using U+2800 to U+28FF for the unicode braille characters). The Braille-Cursor is shown as set up in the braille settings dialog.
  3. A Button "scroll backwards" on the left bottom corner.
  4. Followed by the checkbox "Mirroring current connected braille display". Default value is "false". And "false" will enable the following.
  5. Combobox "Length" which contains the following firm values: 12, 14, 16, 18, 20, 24, 32, 40, 42, 44, 60, 64, 80, 84 and 88. This setting offers the developer to test the braille output without having braille display of different lengths.
  6. And of course the button "scroll forward" in the right bottom corner.
  7. And last but not least: Clicking on an letter in the plain text line as well as on an unicode braille character in the second with a left mouse click line will force to emulate a (braille) routing key press. And a right click will force to the 2nd routing function.
  8. Well, and the speaker and braille viewer should be of course two different window because I don't think the a developer needs and wants to have always both output at the same time.

@lukaszgo1
Copy link
Contributor

Hi @feerrenrut,
I've tested your code and it is working well except one small thing

STR

  1. enable braille viewer or switch to physical braille display
  2. open python console and type the following
    import braille
    braille.handler.message('')

expected

The braille display or braille viewer window should be empty for the timeout configured in NVDA settings.

actual

File "braille.pyc", line 1731, in message
File "braille.pyc", line 1685, in update
File "baseObject.pyc", line 21, in get
File "braille.pyc", line 1332, in _get_windowRawText
File "braille.pyc", line 1174, in bufferPositionsToRawText
IndexError: list index out of range

@feerrenrut
Copy link
Contributor

It's taken me a while to come back to this.
Thanks @lukaszgo1, I have fixed this issue now.
@DrSooom these would be nice to have, however first I would like to get this integrated in it's most basic form. Further requests should be opened in new issues.

@feerrenrut
Copy link
Contributor

Fixed with commit 1863d23 via PR #10173

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

No branches or pull requests

4 participants