Bug 24227

Summary: Fix the XkbSetRepeatKeys trap
Product: xorg Reporter: Jeremy Huddleston Sequoia <jeremyhu>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard: 2011BRB_Reviewed
i915 platform: i915 features:

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.