* [PATCH] baum: Add copy/paste bindings
@ 2026-02-11 20:44 Samuel Thibault
2026-02-12 9:43 ` Marc-André Lureau
0 siblings, 1 reply; 8+ messages in thread
From: Samuel Thibault @ 2026-02-11 20:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Samuel Thibault, marcandre.lureau, pbonzini
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] baum: Add copy/paste bindings
2026-02-11 20:44 [PATCH] baum: Add copy/paste bindings Samuel Thibault
@ 2026-02-12 9:43 ` Marc-André Lureau
2026-02-12 10:33 ` Peter Maydell
2026-02-13 0:08 ` Samuel Thibault
0 siblings, 2 replies; 8+ messages in thread
From: Marc-André Lureau @ 2026-02-12 9:43 UTC (permalink / raw)
To: Samuel Thibault; +Cc: qemu-devel, pbonzini
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] baum: Add copy/paste bindings
2026-02-12 9:43 ` Marc-André Lureau
@ 2026-02-12 10:33 ` Peter Maydell
2026-02-12 11:02 ` Daniel P. Berrangé
2026-02-13 0:08 ` Samuel Thibault
1 sibling, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2026-02-12 10:33 UTC (permalink / raw)
To: Marc-André Lureau; +Cc: Samuel Thibault, qemu-devel, pbonzini
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] baum: Add copy/paste bindings
2026-02-12 10:33 ` Peter Maydell
@ 2026-02-12 11:02 ` Daniel P. Berrangé
2026-02-13 0:09 ` Samuel Thibault
0 siblings, 1 reply; 8+ messages in thread
From: Daniel P. Berrangé @ 2026-02-12 11:02 UTC (permalink / raw)
To: Peter Maydell
Cc: Marc-André Lureau, Samuel Thibault, qemu-devel, pbonzini
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 :|
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] baum: Add copy/paste bindings
2026-02-12 9:43 ` Marc-André Lureau
2026-02-12 10:33 ` Peter Maydell
@ 2026-02-13 0:08 ` Samuel Thibault
1 sibling, 0 replies; 8+ messages in thread
From: Samuel Thibault @ 2026-02-13 0:08 UTC (permalink / raw)
To: Marc-André Lureau; +Cc: qemu-devel, pbonzini
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] baum: Add copy/paste bindings
2026-02-12 11:02 ` Daniel P. Berrangé
@ 2026-02-13 0:09 ` Samuel Thibault
2026-02-13 8:09 ` Daniel P. Berrangé
0 siblings, 1 reply; 8+ messages in thread
From: Samuel Thibault @ 2026-02-13 0:09 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: Peter Maydell, Marc-André Lureau, qemu-devel, pbonzini
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] baum: Add copy/paste bindings
2026-02-13 0:09 ` Samuel Thibault
@ 2026-02-13 8:09 ` Daniel P. Berrangé
2026-02-13 11:55 ` Samuel Thibault
0 siblings, 1 reply; 8+ messages in thread
From: Daniel P. Berrangé @ 2026-02-13 8:09 UTC (permalink / raw)
To: Samuel Thibault
Cc: Peter Maydell, Marc-André Lureau, qemu-devel, pbonzini
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 :|
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] baum: Add copy/paste bindings
2026-02-13 8:09 ` Daniel P. Berrangé
@ 2026-02-13 11:55 ` Samuel Thibault
0 siblings, 0 replies; 8+ messages in thread
From: Samuel Thibault @ 2026-02-13 11:55 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: Peter Maydell, Marc-André Lureau, qemu-devel, pbonzini
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-02-13 11:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11 20:44 [PATCH] baum: Add copy/paste bindings Samuel Thibault
2026-02-12 9:43 ` Marc-André Lureau
2026-02-12 10:33 ` Peter Maydell
2026-02-12 11:02 ` Daniel P. Berrangé
2026-02-13 0:09 ` Samuel Thibault
2026-02-13 8:09 ` Daniel P. Berrangé
2026-02-13 11:55 ` Samuel Thibault
2026-02-13 0:08 ` Samuel Thibault
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.