Debugging a weird problem with eM Client


Tony Malykh
 

Hello guys,
I am trying to make this email client app called eM Client more accessible and I'm running into a really weird issue, so seeking advice in case anyone here has any better ideas on how to debug it.
eM Client displays messages list  as a UIA table. By default NVDA doesn't recognize it as a table, so I just added NVDAObjects.behaviors.RowWithFakeNavigation to the list of classes in chooseNVDAObjectOverlayClasses().
This works, however a really weird side effect is that every time I press Control+Alt+LeftArrow or RightArrow, it also archives current message, which of course is unacceptable behavior.
According to their website, archiving an email can be performed by Control+Shift+A shortcut, but actually when I pressed it - nothing happens. So at this moment, I am not even sure of how exactly archiving happens - if that was a rogue keystroke that NVDA was somehow sending, then I could have traced all the keystrokes being sent, but now I am not sure whether this is the case.
My first suspicion was that some code within RowWithFakeNavigation class somehow causes this, so I decided to override Control+Alt+Arrows and replaced them with tones.beep. Then I hear said beep, and I don't hear cursor moving to another column, so I make a conclusion that RowWithFakeNavigation code is not being called at all, yet surprisingly enough the messages are still being archived on every key press!
So the current status is: if there is any gesture  mapped to Control+Alt+LeftArrow or RightArrow  for current object, then pressing these keystrokes will cause the message to be archived. Even if the actual script does nothing, like it just plays tones.beep. I also tried to do just gesture.send() to send the actual keystroke to eM Client, but this doesn't change anything. If there is nothing bound to Control+Alt+Arrows, then things are fine and messages are not archived.
Another direction is I tried to figure out what keyboard shortcuts cause this behavior. To my surprise it turns out that shortcuts in the form of Control+Alt+Anything cause this, wehre Anything can be any arrow, or a letter, as long as there is an NVDA script bount to this shortcut, no matter what that script actually does. For example, I happend to have Access8Math add-on installed, which has Control+Alt+M bound to some internal script that basically only changes its internal variable, yet pressing this script does archive a message in EM Client as well.
I tried my experiments with most add-ons disabled to avoid interference.
The only remaining possibility is that there must be some code somewhere in NVDA keyboard processing or script finding code that somehow triggers eM Client to archive current message for Control+Alt+Something shortcuts. But I don't see a good way to debug that. I tried reading code of inputCore.py, keyboardHandler.py and scriptHandler.py, but after cursory investigation, I couldn't find an obvious culprit. Another possible way I see is to do remote debugging over the network, but this takes forever to setup. I already spent a couple of days trying to figure out root cause and I am running out of ideas. So just wanted to check with the community if anyone else has better ideas how to debug this, or perhaps maybe I'm missing something really obvious...
For the reference, my current code is at:
https://github.com/mltony/nvda-em-client/
Also for the reference, EM Client is a free for personal use email clientbut a license needs to be requested through their website. Or you can just run in trial mode for like 30 days if I remember correctly. One of the developers provided me an internal version, with some accessibility problems fixed compared to their current public release:
https://www.emclient.com/dist/v8.1.902/setup.msi
So far I'm liking it much more than either Outlook or Thunderbird, it seems to be really fast, so if I can figure out this issue and a few other minor ones, I think it is going to be a very good option for NVDA users.
Best regards
Tony


Sean <s.tolstoyevski@...>
 

If it's a really nice client, we can talk to the developer to make it more accessible.

On 20/12/2020 00:54, Tony Malykh wrote:
Hello guys,
I am trying to make this email client app called eM Client more accessible and I'm running into a really weird issue, so seeking advice in case anyone here has any better ideas on how to debug it.
eM Client displays messages list  as a UIA table. By default NVDA doesn't recognize it as a table, so I just added NVDAObjects.behaviors.RowWithFakeNavigation to the list of classes in chooseNVDAObjectOverlayClasses().
This works, however a really weird side effect is that every time I press Control+Alt+LeftArrow or RightArrow, it also archives current message, which of course is unacceptable behavior.
According to their website, archiving an email can be performed by Control+Shift+A shortcut, but actually when I pressed it - nothing happens. So at this moment, I am not even sure of how exactly archiving happens - if that was a rogue keystroke that NVDA was somehow sending, then I could have traced all the keystrokes being sent, but now I am not sure whether this is the case.
My first suspicion was that some code within RowWithFakeNavigation class somehow causes this, so I decided to override Control+Alt+Arrows and replaced them with tones.beep. Then I hear said beep, and I don't hear cursor moving to another column, so I make a conclusion that RowWithFakeNavigation code is not being called at all, yet surprisingly enough the messages are still being archived on every key press!
So the current status is: if there is any gesture  mapped to Control+Alt+LeftArrow or RightArrow  for current object, then pressing these keystrokes will cause the message to be archived. Even if the actual script does nothing, like it just plays tones.beep. I also tried to do just gesture.send() to send the actual keystroke to eM Client, but this doesn't change anything. If there is nothing bound to Control+Alt+Arrows, then things are fine and messages are not archived.
Another direction is I tried to figure out what keyboard shortcuts cause this behavior. To my surprise it turns out that shortcuts in the form of Control+Alt+Anything cause this, wehre Anything can be any arrow, or a letter, as long as there is an NVDA script bount to this shortcut, no matter what that script actually does. For example, I happend to have Access8Math add-on installed, which has Control+Alt+M bound to some internal script that basically only changes its internal variable, yet pressing this script does archive a message in EM Client as well.
I tried my experiments with most add-ons disabled to avoid interference.
The only remaining possibility is that there must be some code somewhere in NVDA keyboard processing or script finding code that somehow triggers eM Client to archive current message for Control+Alt+Something shortcuts. But I don't see a good way to debug that. I tried reading code of inputCore.py, keyboardHandler.py and scriptHandler.py, but after cursory investigation, I couldn't find an obvious culprit. Another possible way I see is to do remote debugging over the network, but this takes forever to setup. I already spent a couple of days trying to figure out root cause and I am running out of ideas. So just wanted to check with the community if anyone else has better ideas how to debug this, or perhaps maybe I'm missing something really obvious...
For the reference, my current code is at:
https://github.com/mltony/nvda-em-client/
Also for the reference, EM Client is a free for personal use email clientbut a license needs to be requested through their website. Or you can just run in trial mode for like 30 days if I remember correctly. One of the developers provided me an internal version, with some accessibility problems fixed compared to their current public release:
https://www.emclient.com/dist/v8.1.902/setup.msi
So far I'm liking it much more than either Outlook or Thunderbird, it seems to be really fast, so if I can figure out this issue and a few other minor ones, I think it is going to be a very good option for NVDA users.
Best regards
Tony





 

They do listen to feedback.





On 12/19/2020 9:02 PM, Sean wrote:
If it's a really nice client, we can talk to the developer to make it more accessible.

On 20/12/2020 00:54, Tony Malykh wrote:
Hello guys,
I am trying to make this email client app called eM Client more accessible and I'm running into a really weird issue, so seeking advice in case anyone here has any better ideas on how to debug it.
eM Client displays messages list  as a UIA table. By default NVDA doesn't recognize it as a table, so I just added NVDAObjects.behaviors.RowWithFakeNavigation to the list of classes in chooseNVDAObjectOverlayClasses().
This works, however a really weird side effect is that every time I press Control+Alt+LeftArrow or RightArrow, it also archives current message, which of course is unacceptable behavior.
According to their website, archiving an email can be performed by Control+Shift+A shortcut, but actually when I pressed it - nothing happens. So at this moment, I am not even sure of how exactly archiving happens - if that was a rogue keystroke that NVDA was somehow sending, then I could have traced all the keystrokes being sent, but now I am not sure whether this is the case.
My first suspicion was that some code within RowWithFakeNavigation class somehow causes this, so I decided to override Control+Alt+Arrows and replaced them with tones.beep. Then I hear said beep, and I don't hear cursor moving to another column, so I make a conclusion that RowWithFakeNavigation code is not being called at all, yet surprisingly enough the messages are still being archived on every key press!
So the current status is: if there is any gesture  mapped to Control+Alt+LeftArrow or RightArrow  for current object, then pressing these keystrokes will cause the message to be archived. Even if the actual script does nothing, like it just plays tones.beep. I also tried to do just gesture.send() to send the actual keystroke to eM Client, but this doesn't change anything. If there is nothing bound to Control+Alt+Arrows, then things are fine and messages are not archived.
Another direction is I tried to figure out what keyboard shortcuts cause this behavior. To my surprise it turns out that shortcuts in the form of Control+Alt+Anything cause this, wehre Anything can be any arrow, or a letter, as long as there is an NVDA script bount to this shortcut, no matter what that script actually does. For example, I happend to have Access8Math add-on installed, which has Control+Alt+M bound to some internal script that basically only changes its internal variable, yet pressing this script does archive a message in EM Client as well.
I tried my experiments with most add-ons disabled to avoid interference.
The only remaining possibility is that there must be some code somewhere in NVDA keyboard processing or script finding code that somehow triggers eM Client to archive current message for Control+Alt+Something shortcuts. But I don't see a good way to debug that. I tried reading code of inputCore.py, keyboardHandler.py and scriptHandler.py, but after cursory investigation, I couldn't find an obvious culprit. Another possible way I see is to do remote debugging over the network, but this takes forever to setup. I already spent a couple of days trying to figure out root cause and I am running out of ideas. So just wanted to check with the community if anyone else has better ideas how to debug this, or perhaps maybe I'm missing something really obvious...
For the reference, my current code is at:
https://github.com/mltony/nvda-em-client/
Also for the reference, EM Client is a free for personal use email clientbut a license needs to be requested through their website. Or you can just run in trial mode for like 30 days if I remember correctly. One of the developers provided me an internal version, with some accessibility problems fixed compared to their current public release:
https://www.emclient.com/dist/v8.1.902/setup.msi
So far I'm liking it much more than either Outlook or Thunderbird, it seems to be really fast, so if I can figure out this issue and a few other minor ones, I think it is going to be a very good option for NVDA users.
Best regards
Tony












Tony Malykh
 

Oh, I am talking to them and they have already helped me a lot. It's just certain things, like RowWithFakeNavigation apparently need to be enabled on NVDA's side. And this weird bug - I am not even sure if it happens on NVDA's side or where....

On 12/19/2020 6:02 PM, Sean wrote:
If it's a really nice client, we can talk to the developer to make it more accessible.

On 20/12/2020 00:54, Tony Malykh wrote:
Hello guys,
I am trying to make this email client app called eM Client more accessible and I'm running into a really weird issue, so seeking advice in case anyone here has any better ideas on how to debug it.
eM Client displays messages list  as a UIA table. By default NVDA doesn't recognize it as a table, so I just added NVDAObjects.behaviors.RowWithFakeNavigation to the list of classes in chooseNVDAObjectOverlayClasses().
This works, however a really weird side effect is that every time I press Control+Alt+LeftArrow or RightArrow, it also archives current message, which of course is unacceptable behavior.
According to their website, archiving an email can be performed by Control+Shift+A shortcut, but actually when I pressed it - nothing happens. So at this moment, I am not even sure of how exactly archiving happens - if that was a rogue keystroke that NVDA was somehow sending, then I could have traced all the keystrokes being sent, but now I am not sure whether this is the case.
My first suspicion was that some code within RowWithFakeNavigation class somehow causes this, so I decided to override Control+Alt+Arrows and replaced them with tones.beep. Then I hear said beep, and I don't hear cursor moving to another column, so I make a conclusion that RowWithFakeNavigation code is not being called at all, yet surprisingly enough the messages are still being archived on every key press!
So the current status is: if there is any gesture  mapped to Control+Alt+LeftArrow or RightArrow  for current object, then pressing these keystrokes will cause the message to be archived. Even if the actual script does nothing, like it just plays tones.beep. I also tried to do just gesture.send() to send the actual keystroke to eM Client, but this doesn't change anything. If there is nothing bound to Control+Alt+Arrows, then things are fine and messages are not archived.
Another direction is I tried to figure out what keyboard shortcuts cause this behavior. To my surprise it turns out that shortcuts in the form of Control+Alt+Anything cause this, wehre Anything can be any arrow, or a letter, as long as there is an NVDA script bount to this shortcut, no matter what that script actually does. For example, I happend to have Access8Math add-on installed, which has Control+Alt+M bound to some internal script that basically only changes its internal variable, yet pressing this script does archive a message in EM Client as well.
I tried my experiments with most add-ons disabled to avoid interference.
The only remaining possibility is that there must be some code somewhere in NVDA keyboard processing or script finding code that somehow triggers eM Client to archive current message for Control+Alt+Something shortcuts. But I don't see a good way to debug that. I tried reading code of inputCore.py, keyboardHandler.py and scriptHandler.py, but after cursory investigation, I couldn't find an obvious culprit. Another possible way I see is to do remote debugging over the network, but this takes forever to setup. I already spent a couple of days trying to figure out root cause and I am running out of ideas. So just wanted to check with the community if anyone else has better ideas how to debug this, or perhaps maybe I'm missing something really obvious...
For the reference, my current code is at:
https://github.com/mltony/nvda-em-client/
Also for the reference, EM Client is a free for personal use email clientbut a license needs to be requested through their website. Or you can just run in trial mode for like 30 days if I remember correctly. One of the developers provided me an internal version, with some accessibility problems fixed compared to their current public release:
https://www.emclient.com/dist/v8.1.902/setup.msi
So far I'm liking it much more than either Outlook or Thunderbird, it seems to be really fast, so if I can figure out this issue and a few other minor ones, I think it is going to be a very good option for NVDA users.
Best regards
Tony