Fwd: [PATCH v2 xserver] xkb: fix turbo-repeat of RedirectKey-ed keysyms

Daniel Stone daniel at fooishbar.org
Wed Sep 14 10:57:22 UTC 2016


Hi,
Here's the notes from Mihail, which I'd accidentally dropped whilst
passing this on.

Cheers,
Daniel


---------- Forwarded message ----------
From: Mihail Konev <k.mvc at ya.ru>
Date: 14 September 2016 at 07:45
Subject: [PATCH v2 xserver] xkb: fix turbo-repeat of RedirectKey-ed keysyms
To: Daniel Stone <daniel at fooishbar.org>


RedirectKey() action had been broken by commit 2e6190.
A dropped check caused over-intense autorepeat of keysyms enriched
with the action.

Restore the checking.

Signed-off-by: Mihail Konev <k.mvc at ya.ru>
---

Apologies for misconstructed v1 message.
Here is the one with diff and text in proper order.

RedirectKey does not occur in /usr/share/X11/xkb,
so no wonder this went unnoticed.

To reproduce:

  File 'compat/turbo':
  ```
  default partial xkb_compatibility "turbo" {
          interpret ISO_Emphasize+AnyOfOrNone(all) {
                  repeat = True;
                  action = RedirectKey(KeyCode=<LEFT>);
          };
  };
  ```

  File 'symbols/turbo':
  ```
  default partial alphanumeric_keys modifier_keys
  xkb_symbols "turbo" {
          key <INS> { [ ISO_Emphasize ] };
  };
  ```

  File 'turbo.xkb':
  ```
  xkb_keymap {
          xkb_keycodes { include "evdev" };
          xkb_types    { include "complete" };
          xkb_compat   { include "complete+turbo" };
          xkb_symbols  { include "pc+inet(evdev)+us+turbo" };
          xkb_geometry { include "pc(pc104)" };
  };
  ```

  File 'turbo.sh':
  ```
  #!/bin/sh
  xkbcomp -I. turbo.xkb $DISPLAY
  ```

  Run 'sh turbo.sh'.
  The Insert key would become a turbo-repeating Left.
  Xserver 1.17.* and before do not exhibit that behaviour.

 xkb/xkbActions.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 048ed441ab1b..2ffd3fadccf6 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -1337,7 +1337,8 @@ XkbHandleActions(DeviceIntPtr dev, DeviceIntPtr
kbd, DeviceEvent *event)
         }

         sendEvent = _XkbApplyFilters(xkbi, key, &act);
-        XkbActionGetFilter(dev, event, key, &act, &sendEvent);
+        if (sendEvent)
+            XkbActionGetFilter(dev, event, key, &act, &sendEvent);
     }
     else {
         if (!keyEvent)
--
2.9.2


More information about the xorg-devel mailing list