[Xquartz-dev] 2.3.2_rc5 KeyPress/KeyRelease

Harald Hanche-Olsen hanche at math.ntnu.no
Thu Jan 1 02:49:53 PST 2009

+ Jean-Francois Sygnet <jfs00 at sygnet.info>:

> I've noticed a change of behavior between 2.3.2_rc4 and 2.3.2_rc5:
> in the former pressing a key and keeping it pressed would
> generate A SERIES of KeyPress/KeyRelease events, while
> in the latter pressing a key and keeping it pressed would
> generate only A SINGLE KeyPress event.

That will be fixed in rc6, if there is one, or the final 2.3.2
otherwise. This has been extensively discussed on the list.

For a workaround, drop the attached script into the
directory ~/.xinitrc.d/ (create it if you don't have one). Give it a
name ending in .sh and run chmod +x on it. If you don't want to
restart X11, just run the script with sh.

And remove the script once the next release (candidate) is out, since
the script duplicates what is now built into xquartz.

- Harald
-------------- next part --------------
pref_InitialKeyRepeat=$(defaults read .GlobalPreferences InitialKeyRepeat)
if [ $? != 0 ]; then pref_InitialKeyRepeat=35; fi
pref_KeyRepeat=$(defaults read .GlobalPreferences KeyRepeat)
if [ $? != 0 ]; then pref_KeyRepeat=6; fi
if [ $pref_KeyRepeat -gt 67 ]; then pref_KeyRepeat=67; fi

if [ $pref_InitialKeyRepeat -le 120 ]
    xset r rate $((pref_InitialKeyRepeat * 15)) $((67 / $pref_KeyRepeat))
    xset r off

More information about the Xquartz-dev mailing list