AAClause / BrailleExtender

NVDA add-on that improves braille support
https://andreabc.net/projects/NVDA_addons/BrailleExtender/
GNU General Public License v2.0
16 stars 17 forks source link

Braille edictionary #33

Closed vincent-lg closed 5 years ago

vincent-lg commented 5 years ago

This issue suggests to add a "Braille dictionary" in the BrailleExtender addon, waiting to show-case this to NVDA vanilla.

A Braille dictionary would be extremely useful. For users, it would allow to override or indicate Braille cells to display for a given character representation, regardless of their Braille table's representation (these Braille representations would always take precedence over the user's Braille table). It would allow to override the tab symbol for example, or another symbol defined in the Braille table used by the user where the user is not satisfied with the default representation but doesn't want to create a full Braille table just to override one or two symbols.

Adding a new dialog for the Braille dictionary in the BrailleExtender's settings might be the best approach: this dialog would be quite close to the speech dictionary setting. Adding a new representation would be done in the same way. The difference is that the representation (second field on the speech dictionary "add" dialog) would need to be a numeric representation of the Braille cell(s) to show: I would suggest using the numeric Braille representation as Liblous does (like 345678 or 34-16 for several cells). This might sound technical, but I'm fairly positive the change would be straightforward if you need to use the Braille dictionary in the first place.

Storing these shouldn't be done in the Braille table itself: for one thing, accessing the Braille tables is not possible for someone without administrator privileges. For another, when NVDA updates and replaces the Braille table, these representations would be lost. For a third, NVDA doesn't like modifying these files (see below). And finally, editing the Braille table by editing the file is extremely complex as the table might be spread over several files, some of them shared. So I would suggest to store it independently, much like the speech dictionary itself.

This feature is important for Braille users. Defining a new Braille table is not the best course for most users facing the need to "override" some Braille data. Playing with the default Braille table files (in NVDA/liblouis/tables) and modifying the symobls in them directly, as was possible in 2018.*, is no longer possible for some reason, and doing so would make NVDA crash (or at least, the Braille to crash) and force NVDA to reinstall itself. A Braille dictionary would, in my opinion anyway, be as important as the speech dictionary: some users like myself don't rely on speech at all, only using Braille as an NVDA output. In this case, Braille dictionary implementation should have received the same priority than the implementation of the speech dictionary. That being said, of course, not as many users rely on Braille, there are more users relying on speech only.

References: https://github.com/nvaccess/nvda/issues/4601

AAClause commented 5 years ago

Hi @vincent-lg, Thanks for this suggestion. I'm trying to implement this in #34. Your comments are welcome. If you are on the development channel, you can test the implementation progressively.

AAClause commented 5 years ago

Adding a new dialog for the Braille dictionary in the BrailleExtender's settings might be the best approach

Currently, you can access it only via a sub-menu. Path: Preferences → Braille Extender → Braille dictionaries. I think that several braille dictionaries could be useful.

vincent-lg commented 5 years ago

Testing it right now. The dictionary dialog does appear in the setting and I must say it's exactly what I thought (apart from the global/table/temporary dictionary, but if you think it makes sense I wouldn't disagree). My changes aren't saved and so far, I don't see the changes on my Braille display but I guess that will be the object of future implementations. I look forward to them, thanks for this so-prompt reply and implementation.

AAClause commented 5 years ago

My changes aren't saved and so far, I don't see the changes on my Braille display

It's implemented now. :)

I'd just like to add the possibility to open a dictionary and add an entry with gesture.

Is that OK for you? Any suggestions?

vincent-lg commented 5 years ago

It might be a good idea yeah. As for the gesture, I have no suggestion unfortunately. As long as it's configurable, it can easily be activated or changed One could, of course, select a character (or some characters), say, from the notepad, and then ask to add a Braille translation for these characters. That would be nice! On the other hand, I don't know if it'll happen that often, so your guess is as good as mine.

AAClause commented 5 years ago

I've just added the possibility to add an entry from anywhere. I mapped the gesture NVDA+alt+j. That retrieves the character at the cursor.

vincent-lg commented 5 years ago

Just wanted to make sure this is normal and not a bug: when I add the tab sign ( ) to my Braille dictionary, with Braille cells 8-7-8-7 (yeah, I kind of want to display on four spaces, but still identify it as a tab sign), I get an error on restarting NVDA: "one ore more errors are present in dictionary tables..." Is it just something that will be fixed in later releases, or am I doing something wrong?

Again, thanks for this feature. I just can't wait its release!

AAClause commented 5 years ago

@vincent-lg Thanks, it's fixed! Note that you can already convert tab sign to space for awhile in braille tables dialog. It's probably useless now...

AAClause commented 5 years ago

@vincent-lg I've just made some changes. The system keyboard gesture is now NVDA+ALT+y. Moreover for braille displays, I mapped dots(1+4+5+7+8)+space. Also, the user can no longer add a entry with error normally (e.g.: entry with an empty braille pattern).

Now, I think this feature is ready for a first version. Maybe other opcodes should be added, but it's not very important for me. What do you think? @zstanecic your suggestions are welcome! :)

zstanecic commented 5 years ago

Hi andre!

I will test this when you merge this to master.

Thanks!

From: André-Abush Clause notifications@github.com Sent: Monday, October 7, 2019 2:14 AM To: Andre9642/BrailleExtender BrailleExtender@noreply.github.com Cc: zstanecic zvonimirek222@yandex.com; Mention mention@noreply.github.com Subject: Re: [Andre9642/BrailleExtender] Braille edictionary (#33)

@vincent-lg https://github.com/vincent-lg I've just made some changes. The system keyboard gesture is now NVDA+ALT+y. Moreover for braille displays, I mapped dots(1+4+5+7+8)+space. Also, the user can no longer add a entry with error normally (e.g.: entry with an empty braille pattern).

Now, I think this feature is ready for a first version. Maybe other opcodes should be added, but it's not very important for me. What do you think? @zstanecic https://github.com/zstanecic your suggestions are welcome! :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Andre9642/BrailleExtender/issues/33?email_source=notifications&email_token=ACVCDE3YH3LNCCN4J6ZMIYTQNJ5KXA5CNFSM4ISTNDC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAOXWPI#issuecomment-538803005 , or mute the thread https://github.com/notifications/unsubscribe-auth/ACVCDE7BF2UISLJF24TAZHTQNJ5KXANCNFSM4ISTNDCQ . https://github.com/notifications/beacon/ACVCDEYBKDFSZS7ZLPLJIGLQNJ5KXA5CNFSM4ISTNDC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAOXWPI.gif

AAClause commented 5 years ago

@zstanecic if you are on the dev channel, you can already test this.