From: Alexander Epaneshnikov <aarnaarn2@gmail.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: qemu-devel@nongnu.org, brltty@brltty.app
Subject: Re: baum: NVDA does not detect usb-braille, and following the input-linux grab
Date: Sun, 18 Oct 2026 21:52:44 +0300 [thread overview]
Message-ID: <atUU4HpVVI59QcLJ@alex-pc> (raw)
In-Reply-To: <atTzTVaSxUy5r95x@end>
Hello Samuel,
On Sun, Oct 18, 2026 at 06:26:53PM +0200, Samuel Thibault wrote:
> Ah, that is a requirement of the protocol? Then we need to do that
> indeed. What is the value of the uint8_t protocol field when it
> expects to receive 0x01 and 0x84?
It is 1 (on). For serial displays, NVDA's Baum driver
(source/brailleDisplayDrivers/baum.py) first sends 0x15 with 0 to make
sure the protocol is off, then sends 0x15 with 1 twice, "in case the
display misses the first one". After that it waits for the cell count
and the device identity. According to the comment in that driver, a
real display answers only when the protocol goes from off to on. On
that transition it sends its device identity, its serial number and
its cell count, and it sends nothing if the protocol was already on.
NVDA itself only waits for the cell count and the identity.
> I'm a bit surprised by setting the priority to 0, but maybe that's
> because of your setup, which is not described enough. Are you
> running on the linux console or X, actually?
Sorry, I should have described it. The host runs GNOME on Wayland on
tty 2, with Orca using BrlAPI. BRLTTY drives a HumanWare Brailliant
BI 40X over USB.
The guest is a Windows VM started by libvirt, with a second GPU passed
through to it. My monitor is connected to both GPUs. I switch its input
by hand, or over DDC/CI when I need sighted help. QEMU itself has no
window: the display is "none", and SPICE has no listener. I am blind,
so in practice I use the guest through NVDA's speech, which comes out
through PipeWire on the host, and its braille.
> But then how do you access the VM to get keyboard/mouse access?
Through input-linux (libvirt <input type='evdev'> with grab='all').
QEMU reads the host keyboard and mouse evdev devices directly. Pressing
both Ctrl keys toggles the exclusive grab between the host and the
guest. Because there is no window, nothing gains or loses focus when I
switch, and WINDOWID cannot help.
> What are the two clients you are talking about? Is that two VMs run
> by qemu?
No, there is a single VM. The two BrlAPI clients on tty 2 are Orca on
the host and QEMU's baum chardev, which shows NVDA's output from the
guest.
> My crude guess is that you are using some sort of front-end. In that
> case, one would rather need to teach it to access brlapi itself,
> instead of the qemu backend doing it.
There is no front-end. The grab toggle happens inside QEMU's
input-linux, so QEMU is the only process that knows which side has the
keyboard. libvirt doesn't see it, and neither does anything else on
the host. That is why I thought baum should react to it directly.
About the priority 0: my intent was that, while the host has the
keyboard, the guest's output never appears on the display. That should
hold even when Orca isn't running or isn't using the display, since
BRLTTY's own view of the tty is more useful than NVDA's last content.
A low non-zero value would also work if you think that is cleaner.
> SDL/GTK do not need a grab: provided that the window id is properly
> set, brlapi already switches according to the window focus.
Thanks, that answers my third question. Then only input-linux, which
has no window, needs to report the grab.
--
Sincerely, Alexander
next prev parent reply other threads:[~2026-10-18 18:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <atNoDNz0dQucxzFN@alex-pc>
[not found] ` <atNo9sk_7jCAi98u@end>
2026-10-17 19:13 ` baum: NVDA does not detect usb-braille, and following the input-linux grab Alexander Epaneshnikov
2026-10-18 16:26 ` Samuel Thibault
2026-10-18 18:52 ` Alexander Epaneshnikov [this message]
2026-10-18 19:10 ` baum: NVDA does not detect usb-braille Samuel Thibault
2026-10-18 19:35 ` Alexander Epaneshnikov
2026-10-18 20:49 ` Samuel Thibault
2026-10-18 19:17 ` baum: NVDA does not detect usb-braille, and following the input-linux grab Samuel Thibault
2026-10-18 19:26 ` Alexander Epaneshnikov
2026-10-18 19:30 ` Samuel Thibault
2026-10-18 19:39 ` Alexander Epaneshnikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=atUU4HpVVI59QcLJ@alex-pc \
--to=aarnaarn2@gmail.com \
--cc=brltty@brltty.app \
--cc=qemu-devel@nongnu.org \
--cc=samuel.thibault@ens-lyon.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.