Show local ui.messages in braille when controlling a remote computer (#19056)
Fixes #18004
### Summary of the issue:
Currently, when controlling a remote computer via NVDA Remote Access,
messages emitted via `ui.message` on the local computer are not
displayed on the refreshable braille display. This is problematic
because Remote Access outputs some status messages via `ui.message`, and
this bug means that braille-only users are unable to perceive these
messages.
### Description of user facing changes:
These messages are now shown in braille.
### Description of developer facing changes:
None.
### Description of development approach:
* Add `_pre_showBrailleMessage`, `_post_dismissBrailleMessage` and
`_decide_disabledIncludesMessage` extension points.
* Allow `BrailleHandler.message` to show a message if `enabled` is
`False` and `_decide_disabledIncludesMessage.decide()` is also `False`.
* Set Remote Access to not receive braille when showing a `ui.message`,
as detected by the aforementioned extension points.
* Temporarily enable `braille.handler` when showing a ui.message, as
detected by the aforementioned extension points.
* Process braille display scrolling and routing locally when showing a
`ui.message`, as these keys are used to pan through and dismiss the
message.
* Add a `hostPendingNonmodifier` attribute to
`_RemoteClient.client.RemoteClient`, to track the non-modifier key of
the toggle gesture.
* When processing key input, also block the `hostPendingNonmodifier`
from being sent.
* When controlling the remote computer, dismiss a `ui.message` shown by
the local computer on keyboard or braille display input.
* This input is also sent to the remote computer, unlike routing or
panning keys if a local message is being shown.
### Testing strategy:
Ensure that the "Controlling remote computer" message can be read and
interacted with in braille.
Trigger local `ui.message` while controlling the remote computer (via
`wx.CallLater` in the NVDA Python Console), and ensure the message can
be read and interacted with in braille. Did this with short and long
messages (to ensure panning works).
Performed these tests with "Show messages" set to "Use timeout", "Show
indefinitely" and "Disabled" (in the latter case confirming that
messages weren't shown).
### Known issues with pull request:
The display contents changing on the remote computer does not cause the
message to be dismissed. This is because we cannot tell the difference
between a contentful display change, and something like the cursor
flashing.
Some users may prefer the old behaviour. We could possibly make this
configurable, though I think doing so may be premature since we don't
know if users will want the option.
---------
Co-authored-by: Sean Budd <sean@nvaccess.org>