chardev/baum.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-)
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
chardev/baum.c | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/chardev/baum.c b/chardev/baum.c
index 157f8b9519..57fe60fe18 100644
--- a/chardev/baum.c
+++ b/chardev/baum.c
@@ -1,7 +1,7 @@
/*
* QEMU Baum Braille Device
*
- * Copyright (c) 2008, 2010-2011, 2016-2017 Samuel Thibault
+ * Copyright (c) 2008, 2010-2011, 2016-2017, 2026 Samuel Thibault
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -564,6 +564,30 @@ static void baum_chr_read(void *opaque)
baum_send_key(baum, BAUM_RSP_RoutingKey, (code & BRLAPI_KEY_CMD_ARG_MASK)+1);
baum_send_key(baum, BAUM_RSP_RoutingKey, 0);
break;
+ case BRLAPI_KEY_CMD_CLIP_NEW:
+ baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TL1);
+ baum_send_key(baum, BAUM_RSP_RoutingKey, (code & BRLAPI_KEY_CMD_ARG_MASK)+1);
+ baum_send_key(baum, BAUM_RSP_RoutingKey, 0);
+ baum_send_key(baum, BAUM_RSP_TopKeys, 0);
+ break;
+ case BRLAPI_KEY_CMD_CLIP_ADD:
+ baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TL2);
+ baum_send_key(baum, BAUM_RSP_RoutingKey, (code & BRLAPI_KEY_CMD_ARG_MASK)+1);
+ baum_send_key(baum, BAUM_RSP_RoutingKey, 0);
+ baum_send_key(baum, BAUM_RSP_TopKeys, 0);
+ break;
+ case BRLAPI_KEY_CMD_COPY_LINE:
+ baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TR1);
+ baum_send_key(baum, BAUM_RSP_RoutingKey, (code & BRLAPI_KEY_CMD_ARG_MASK)+1);
+ baum_send_key(baum, BAUM_RSP_RoutingKey, 0);
+ baum_send_key(baum, BAUM_RSP_TopKeys, 0);
+ break;
+ case BRLAPI_KEY_CMD_COPY_RECT:
+ baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TR2);
+ baum_send_key(baum, BAUM_RSP_RoutingKey, (code & BRLAPI_KEY_CMD_ARG_MASK)+1);
+ baum_send_key(baum, BAUM_RSP_RoutingKey, 0);
+ baum_send_key(baum, BAUM_RSP_TopKeys, 0);
+ break;
case 0:
switch (code & BRLAPI_KEY_CMD_ARG_MASK) {
case BRLAPI_KEY_CMD_FWINLT:
@@ -606,6 +630,10 @@ static void baum_chr_read(void *opaque)
baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TL1|BAUM_TL3|BAUM_TR1);
baum_send_key(baum, BAUM_RSP_TopKeys, 0);
break;
+ case BRLAPI_KEY_CMD_PASTE:
+ baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TL1|BAUM_TL2|BAUM_TL3|BAUM_TR1);
+ baum_send_key(baum, BAUM_RSP_TopKeys, 0);
+ break;
}
}
break;
--
2.51.0
Hi
On Wed, Feb 11, 2026 at 9:46 PM Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
>
Can you write a summary of how this work, where the protocol is
documented. Also higher-level doc for changelog would be nice.
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> chardev/baum.c | 30 +++++++++++++++++++++++++++++-
> 1 file changed, 29 insertions(+), 1 deletion(-)
>
> diff --git a/chardev/baum.c b/chardev/baum.c
> index 157f8b9519..57fe60fe18 100644
> --- a/chardev/baum.c
> +++ b/chardev/baum.c
> @@ -1,7 +1,7 @@
> /*
> * QEMU Baum Braille Device
> *
> - * Copyright (c) 2008, 2010-2011, 2016-2017 Samuel Thibault
> + * Copyright (c) 2008, 2010-2011, 2016-2017, 2026 Samuel Thibault
> *
> * Permission is hereby granted, free of charge, to any person obtaining a copy
> * of this software and associated documentation files (the "Software"), to deal
> @@ -564,6 +564,30 @@ static void baum_chr_read(void *opaque)
> baum_send_key(baum, BAUM_RSP_RoutingKey, (code & BRLAPI_KEY_CMD_ARG_MASK)+1);
> baum_send_key(baum, BAUM_RSP_RoutingKey, 0);
> break;
> + case BRLAPI_KEY_CMD_CLIP_NEW:
> + baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TL1);
> + baum_send_key(baum, BAUM_RSP_RoutingKey, (code & BRLAPI_KEY_CMD_ARG_MASK)+1);
> + baum_send_key(baum, BAUM_RSP_RoutingKey, 0);
> + baum_send_key(baum, BAUM_RSP_TopKeys, 0);
> + break;
> + case BRLAPI_KEY_CMD_CLIP_ADD: the dependency
> + baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TL2);
> + baum_send_key(baum, BAUM_RSP_RoutingKey, (code & BRLAPI_KEY_CMD_ARG_MASK)+1);
> + baum_send_key(baum, BAUM_RSP_RoutingKey, 0);
> + baum_send_key(baum, BAUM_RSP_TopKeys, 0);
> + break;
> + case BRLAPI_KEY_CMD_COPY_LINE:
> + baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TR1);
> + baum_send_key(baum, BAUM_RSP_RoutingKey, (code & BRLAPI_KEY_CMD_ARG_MASK)+1);
> + baum_send_key(baum, BAUM_RSP_RoutingKey, 0);
> + baum_send_key(baum, BAUM_RSP_TopKeys, 0);
> + break;
> + case BRLAPI_KEY_CMD_COPY_RECT:
> + baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TR2);
> + baum_send_key(baum, BAUM_RSP_RoutingKey, (code & BRLAPI_KEY_CMD_ARG_MASK)+1);
> + baum_send_key(baum, BAUM_RSP_RoutingKey, 0);
> + baum_send_key(baum, BAUM_RSP_TopKeys, 0);
> + break;
> case 0:
> switch (code & BRLAPI_KEY_CMD_ARG_MASK) {
> case BRLAPI_KEY_CMD_FWINLT:
> @@ -606,6 +630,10 @@ static void baum_chr_read(void *opaque)
> baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TL1|BAUM_TL3|BAUM_TR1);
> baum_send_key(baum, BAUM_RSP_TopKeys, 0);
> break;
> + case BRLAPI_KEY_CMD_PASTE:
> + baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TL1|BAUM_TL2|BAUM_TL3|BAUM_TR1);
> + baum_send_key(baum, BAUM_RSP_TopKeys, 0);
> + break;
> }
> }
> break;
> --
Those commands date back from brltty 4.4 (June 7, 2012). I suggest we
add a version check to the brlapi dependency.
--
Marc-André Lureau
Marc-André Lureau, le jeu. 12 févr. 2026 13:43:01 +0400, a ecrit: > On Wed, Feb 11, 2026 at 9:46 PM Samuel Thibault > <samuel.thibault@ens-lyon.org> wrote: > > Can you write a summary of how this work, I have added comments. > where the protocol is documented. Braille protocols are essentially never documented publicly. All that is publicly available. is from the free brltty driver implementation > Also higher-level doc for changelog would be nice. I'm not sure what more would be useful: it's mere addition key binding. > > Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > > --- > > chardev/baum.c | 30 +++++++++++++++++++++++++++++- > > 1 file changed, 29 insertions(+), 1 deletion(-) > > > > + case BRLAPI_KEY_CMD_CLIP_NEW: > > + baum_send_key(baum, BAUM_RSP_TopKeys, BAUM_TL1); > > + baum_send_key(baum, BAUM_RSP_RoutingKey, (code & BRLAPI_KEY_CMD_ARG_MASK)+1); > > + baum_send_key(baum, BAUM_RSP_RoutingKey, 0); > > + baum_send_key(baum, BAUM_RSP_TopKeys, 0); > > + break; > > -- > > Those commands date back from brltty 4.4 (June 7, 2012). I suggest we > add a version check to the brlapi dependency. That is so old that I didn't even remember that they had changed. Samuel
On Thu, 12 Feb 2026 at 09:44, Marc-André Lureau <marcandre.lureau@gmail.com> wrote: > > Those commands date back from brltty 4.4 (June 7, 2012). I suggest we > add a version check to the brlapi dependency. Does any distro version in our support policy still ship such an old brltty version that it doesn't have them? If not, we don't need to actively check the version here, I think. -- PMM
On Thu, Feb 12, 2026 at 10:33:26AM +0000, Peter Maydell wrote: > On Thu, 12 Feb 2026 at 09:44, Marc-André Lureau > <marcandre.lureau@gmail.com> wrote: > > > > Those commands date back from brltty 4.4 (June 7, 2012). I suggest we > > add a version check to the brlapi dependency. > > Does any distro version in our support policy still ship such > an old brltty version that it doesn't have them? If not, we > don't need to actively check the version here, I think. The brlapi is a bit wierd in that it ships a pkg-config file, but does not specify any cflags/libs in there :-( We currently detect brltty by looking for the header file manually. We could at least do a pkg-config check to validate existence, and the min version, but manually set the library name the linker. With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
Daniel P. Berrangé, le jeu. 12 févr. 2026 11:02:27 +0000, a ecrit: > On Thu, Feb 12, 2026 at 10:33:26AM +0000, Peter Maydell wrote: > > On Thu, 12 Feb 2026 at 09:44, Marc-André Lureau > > <marcandre.lureau@gmail.com> wrote: > > > > > > Those commands date back from brltty 4.4 (June 7, 2012). I suggest we > > > add a version check to the brlapi dependency. > > > > Does any distro version in our support policy still ship such > > an old brltty version that it doesn't have them? If not, we > > don't need to actively check the version here, I think. > > The brlapi is a bit wierd in that it ships a pkg-config file, ? Does it? Upstream doesn't. > We currently detect brltty by looking for the header file manually. Yes, there has never been anything more than that. Samuel
On Fri, Feb 13, 2026 at 01:09:58AM +0100, Samuel Thibault wrote: > Daniel P. Berrangé, le jeu. 12 févr. 2026 11:02:27 +0000, a ecrit: > > On Thu, Feb 12, 2026 at 10:33:26AM +0000, Peter Maydell wrote: > > > On Thu, 12 Feb 2026 at 09:44, Marc-André Lureau > > > <marcandre.lureau@gmail.com> wrote: > > > > > > > > Those commands date back from brltty 4.4 (June 7, 2012). I suggest we > > > > add a version check to the brlapi dependency. > > > > > > Does any distro version in our support policy still ship such > > > an old brltty version that it doesn't have them? If not, we > > > don't need to actively check the version here, I think. > > > > The brlapi is a bit wierd in that it ships a pkg-config file, > > ? Does it? > > Upstream doesn't. This is what I saw: https://github.com/brltty/brltty/blob/master/brltty.pc.in > > We currently detect brltty by looking for the header file manually. > > Yes, there has never been anything more than that. > > Samuel > With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
Daniel P. Berrangé, le ven. 13 févr. 2026 08:09:05 +0000, a ecrit: > On Fri, Feb 13, 2026 at 01:09:58AM +0100, Samuel Thibault wrote: > > Daniel P. Berrangé, le jeu. 12 févr. 2026 11:02:27 +0000, a ecrit: > > > On Thu, Feb 12, 2026 at 10:33:26AM +0000, Peter Maydell wrote: > > > > On Thu, 12 Feb 2026 at 09:44, Marc-André Lureau > > > > <marcandre.lureau@gmail.com> wrote: > > > > > > > > > > Those commands date back from brltty 4.4 (June 7, 2012). I suggest we > > > > > add a version check to the brlapi dependency. > > > > > > > > Does any distro version in our support policy still ship such > > > > an old brltty version that it doesn't have them? If not, we > > > > don't need to actively check the version here, I think. > > > > > > The brlapi is a bit wierd in that it ships a pkg-config file, > > > > ? Does it? > > > > Upstream doesn't. > > This is what I saw: > > https://github.com/brltty/brltty/blob/master/brltty.pc.in This is not meant to be used for brlapi, it's really meant only for brltty. Samuel
© 2016 - 2026 Red Hat, Inc.