Hello,

Mario Lang, on jeu. 27 juil. 2017 21:17:15 +0200, wrote:
> >> The documentation of "Raw keycode" mode does explicitly state that
> >> brlapi_acceptKeyRange() is not necessary.
> >
> > Yes, I know.
> 
> Either the documentation or the code needs to be fixed.
> I would vote for making the code do what the documentation claims.

Agreed :)

The attached patch is probably correct.

Samuel
diff --git a/Programs/brlapi_server.c b/Programs/brlapi_server.c
index aae04ca16..bed399089 100644
--- a/Programs/brlapi_server.c
+++ b/Programs/brlapi_server.c
@@ -2476,7 +2476,9 @@ finished:
 /* to let the user read the screen in case theree is an error */
 static int initializeAcceptedKeys(Connection *c, int how)
 {
-  if (how != BRL_KEYCODES) {
+  if (how == BRL_KEYCODES) {
+    if (c && addKeyrange(0, BRLAPI_KEY_MAX, &c->acceptedKeys) == -1) return -1;
+  } else {
     if (c) {
       typedef struct {
         int (*action) (brlapi_keyCode_t first, brlapi_keyCode_t last, 
KeyrangeList **list);
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.com
For general information, go to: http://brltty.com/mailman/listinfo/brltty

Reply via email to