Bug 24227 - Fix the XkbSetRepeatKeys trap
Summary: Fix the XkbSetRepeatKeys trap
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard: 2011BRB_Reviewed
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-30 11:19 UTC by Jeremy Huddleston Sequoia
Modified: 2018-12-13 22:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jeremy Huddleston Sequoia 2009-09-30 11:19:11 UTC
XkbSetRepeatKeys works for setting global key repeat but it doesn't work for setting repeat rate for individual keys.

We're directly setting the structs now:

        /* Turn off key-repeat for modifier keys, on for others */
        /* First set them all on */
        for(i=0; i < XkbPerKeyBitArraySize; i++)
            ctrl->per_key_repeat[i] = -1;

        /* Now turn off the modifiers */
        for(i=0; i < 32; i++) {
            unsigned char keycode;
            
            keycode = keyInfo.modifierKeycodes[i][0];
            if(keycode)
                ClearBit(ctrl->per_key_repeat, keycode + MIN_KEYCODE);

            keycode = keyInfo.modifierKeycodes[i][1];
            if(keycode)
                ClearBit(ctrl->per_key_repeat, keycode + MIN_KEYCODE);
        }

And that didn't quite work... some random bits would not get set the way I wanted, but then we threw this bit of kludge in:

        /* Hurray for data duplication */
        if (pDev->kbdfeed)
            memcpy(pDev->kbdfeed->ctrl.autoRepeats, ctrl->per_key_repeat, XkbPerKeyBitArraySize);
Comment 1 GitLab Migration User 2018-12-13 22:21:39 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/384.


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.