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

Combining emulated keys via a braille display ignores "gestures.ini" #8149

Closed
DrSooom opened this issue Apr 9, 2018 · 5 comments · Fixed by #8230
Closed

Combining emulated keys via a braille display ignores "gestures.ini" #8149

DrSooom opened this issue Apr 9, 2018 · 5 comments · Fixed by #8230
Labels
component/braille p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority

Comments

@DrSooom
Copy link

DrSooom commented Apr 9, 2018

NVDA Version: nvda_snapshot_try-i8106-14994,fcd1ac68
Run as portable version. (It doesn't contain my huge "gestures.ini" file from my installed NVDA version. Well, it doesn't contain anything from the installed version at all.)
Braille display: Optelec ALVA BC680 (firmware: 3.0.2, connected via USB2 to the PC)

Default key mapping ("gestures.ini" doesn't exist):
Current Result: SP2 = ALT; SPLeft = Left Arrow; SP2+SPLeft = ALT+Left Arrow

Then open the input gestures window and delete the SP2 entry allocated with the ALT key (emulated hotkeys).

The "gestures.ini" now exists and contains the following line: "None = br(alva):sp2" (line 2).

Current Result: SP2 = [none]; SPLeft = Left Arrow; SP2+SPLeft = ALT+Left Arrow
Expected Result: SP2 = [none]; SPLeft = Left Arrow; SP2+SPLeft = [none]

then open the input gestures window again an allocate BC680-SP2 with the command to say the current time and date.

The following line was added in the "gestures.ini" below line 2: "dateTime = br(alva.bc680):sp2"

Current Result: SP2 = dateTime; SPLeft = Left Arrow; SP2+SPLeft = ALT+Left Arrow
Expected Result: SP2 = dateTime; SPLeft = Left Arrow; SP2+SPLeft = [none]

Then delete the "dateTime" via the input gesture window and allocate this command with SP2. The 2nd line with the "None" entry in the "gestures.ini" was deleted now.

The 2nd line contains the following: "dateTime = br(alva):sp2". The 3rd line was of course deleted too.

Current Result: SP2 = dateTime; SPLeft = Left Arrow; SP2+SPLeft = ALT+Left Arrow
Expected Result: SP2 = dateTime; SPLeft = Left Arrow; SP2+SPLeft = [none]

Then open the "gestures.ini" directly in Notepad++ (or any other source code editor) and add the following line followed by an empty line: "None = br(alva):sp2+spleft". After saving this file restart NVDA.

Current Result: SP2 = dateTime; SPLeft = Left Arrow; SP2+SPLeft = ALT+Left Arrow
Expected Result: SP2 = dateTime; SPLeft = Left Arrow; SP2+SPLeft = [none]

And the last step: Open the input gestures window and add SP2+SPLeft to the "dateTime" entry. The "None" line in the "gestures.ini" was deleted after that. The 2nd line contains the following: "dateTime = br(alva):sp2+spleft, br(alva):sp2".

Current Result: SP2 = dateTime; SPLeft = Left Arrow; SP2+SPLeft = dateTime
Expected Result: SP2 = dateTime; SPLeft = Left Arrow; SP2+SPLeft = dateTime

This new bug in NVDA 2018.1 might be the accidently result of #7783. It can be solved if NVDA considers the "gestures.ini" as well as checks if all pressed keys on the braille display are allocated with an emulated key. If only one of those pressed keys on the braille display is not allocated with an emulated key NVDA shouldn't combine emulated keys.

I just now tested the whole thing with two keys on my ALVA BC680 via the USB2 port and within changing the allocations of only two commands to keep it simple. There are thousands of combinations which can be pressed alone with the ALVA BC680. And by the way I don't think that this is an ALVA specific issue. For me it looks more like a general issue in this new function.

@LeonarddeR
Copy link
Collaborator

@DrSooom: Thanks for your report! Could you please run the described tests with this try build?

@LeonarddeR LeonarddeR added the p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority label Apr 9, 2018
@DrSooom
Copy link
Author

DrSooom commented Apr 9, 2018

In this snapshot (15014) SP2 isn't again allocated to the ALT key by default.

So I deleted the WIN-key entry (SP2+SP3 by default) via the input gestures window and manually allocate SP2 to the ALT key.

The "gestures.ini" looks like this after that:
[globalCommands.GlobalCommands] kb:alt = br(alva):sp2 None = br(alva):sp2+sp3

Current and expected Result: SP2 = ALT; SP3 = ESC; SP2+SP3 = ALT+ESC

Current Result: SP3+SPUp = [none]; SP2+SP3+SPUp = [none]
SP3 is allocated with the ESC key, but ESC + arrow keys makes no sense. So pressing SP3+SPUp ends in no command. In this case this is correct. And as ALT+ESC+UpArrow makes no sense this result is also expected.

But: SP2+SPUp = ALT+UpArrow; This is wanted because it makes sense.

But please give me a new snapshot in which SP2 is allocated with the ALT key by default. Then I can test the whole thing exactly the same.

@LeonarddeR
Copy link
Collaborator

Hmm, I intended to bundle the Alva patch into this try build, but it might have failed. Could you try another build?

@DrSooom
Copy link
Author

DrSooom commented Apr 10, 2018

Quick conclusion with Snapshot 15016:
None = br(alva):sp2; dateTime = br(alva.bc680):sp2 -- SP2+SPLeft now [none]
dateTime = br(alva.bc680):sp2 -- SP2+SPLeft still ALT+LeftArrow
dateTime = br(alva):sp2 -- SP2+SPLeft still ALT+LeftArrow

It seems that NVDA just looks into the "None" entries at all. That's why it don't worked as it should at all.

Also interesting:
None = br(alva):sp2; dateTime = br(alva):sp2
-- SP2 = [None]; SP2+SPLeft = [None]; No warning on NVDA startup
None = br(alva):sp2; dateTime = br(alva):sp2; dateTime = br(alva.bc680):sp2
-- Warning on NVDA startup. SP2 and SP2+SPLeft wasn't tested here.

@LeonarddeR
Copy link
Collaborator

I'm afraid I have to step away from working on this until #7843 and #7784 are in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/braille p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
Projects
None yet
3 participants