Bug 78180 - Autorepeat does not work for custom key defined via XKB
Summary: Autorepeat does not work for custom key defined via XKB
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/XKB (show other bugs)
Version: 7.7 (2012.06)
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-02 09:09 UTC by Hanno Zulla
Modified: 2018-12-13 18:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Hanno Zulla 2014-05-02 09:09:34 UTC
Hi there.

There appears to be a bug with how X.org handles the "repeat" setting in xkb definitions.

Bought a chromebook and installed a non-ChromeOS Linux distribution on it.

Chromebooks come with a limited set of keys for ease of use and then make missing keys available through modifiers, e.g.:

Up = <UP>
Prior = Alt+<UP>
Home = Ctrl+Alt+<UP>
(see https://support.google.com/chromebook/answer/1047364?hl=en)

I'm trying to get these keyboard shortcuts to work within my Linux system and fiddle with a custom, system-wide xkb setting right now.

(The ChromeOS guys used to use xkb for this purpose, as well. But some time ago, they have moved their re-mapping of these keys from xkb into the user space applications, instead: <http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=commitdiff;h=9b26b7aba4402bf97cee5cae8333175748160f62>)

My current work-in-progress solution with xkb looks somewhat like this:

In types/pc, add:

    type "CTRL+ALT_ACTUALLY" {
        modifiers = Control+Alt+Shift;
        map[None] = Level1;
        map[Shift] = Level2;
        map[Alt] = Level3;
        map[Shift+Alt] = Level4;
        map[Control+Alt] = Level5;
        preserve[Shift] = Shift;
        preserve[Shift+Alt] = Shift;
        level_name[Level1] = "Base";
        level_name[Level2] = "Shift";
        level_name[Level3] = "Alt Base";
        level_name[Level4] = "Shift Alt";
        level_name[Level5] = "Ctrl+Alt";
    };
    // see https://bugs.freedesktop.org/show_bug.cgi?id=78139

In symbols/inet, add:

  // Chromebook keyboards
  partial alphanumeric_keys
  xkb_symbols "chromebook" {

   key <UP> {
      type="CTRL+ALT_ACTUALLY",
      repeat=yes,
      symbols[Group1] = [ Up, Up, Prior, Prior, Home ]
      actions[Group1] = [
        NoAction(),
        NoAction(),
        RedirectKey(key=<PGUP>, clearmods=Alt),
        RedirectKey(key=<PGUP>, clearmods=Alt),
        RedirectKey(key=<HOME>, clearmods=Control+Alt)
      ]
    };
    // similar for other keys
  };

This works, but autorepeat doesn't work for this custom <UP> definition.

I found a patch from the ChromeOS guys that seems to address this problem <http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=blob;f=x11-base/xorg-server/files/1.7.6-fix-xkb-autorepeat.patch;h=8bad5abc5ad3958f6d73c55c67d3883ac775db18;hb=c3ce41719abc82a257e1fef1c499ea2e7c6b3c32>

...I commented out the two lines of code mentioned in the patch for the current version on my system, but that didn't fix the issue or I'm using it wrong.

So I kindly ask you to have a look at that patch or see if there is a better way to fix this issue.

I'm running x.org 7.7 as pre-packaged by Ubuntu for their 14.04 release (7.7+1ubuntu8).

Thanks!
Comment 1 Hanno Zulla 2014-05-02 10:28:37 UTC
Sorry, there's a comma missing after

      symbols[Group1] = [ Up, Up, Prior, Prior, Home ],

                                                      ^ that one
Comment 2 Hanno Zulla 2014-05-02 22:28:30 UTC
Ok. If I use the xkb file that includes "repeat=yes" as described before and then do a "xkbcomp :0 /tmp/bla", the result will contain a "repeat=no" where there should be a yes. But why?
Comment 3 Hanno Zulla 2014-05-16 08:57:32 UTC
I am told by others that this bug 78180 is related to

https://bugs.freedesktop.org/show_bug.cgi?id=78661

and that the cause is actually

https://bugs.freedesktop.org/show_bug.cgi?id=9796

What can I do to help fix it there at 9796?
Comment 4 GitLab Migration User 2018-12-13 18:39:33 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/320.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.