Can I enable Bounce Keys for certain keys only?

Solution 1:

xset - user preference utility for X

r is to control autorepeat.

xset -r 10

will disable autorepeat for the "1" key.

xset r 10

will enable autorepeat for the "1" key.

xset r [keycode]

in my case keycode for space bar is 65 check for yours with code: xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'

Still if you need to change speed of keys you can also use rate parameter to it.

And also add this command to your session start script file.

Solution 2:

I've found a solution for you, but it doesn't involve Bounce Keys. What I do here is to deactivate the space key/keyboard for a small time each time space is pressed. So here it goes:

We use xbindkeys to capture space bar press (in this case release) and xdotool to insert spaces. Install them if you don't have it on your system:

sudo apt-get install xbindkeys xdotool

A xbindkeys config file should have appeared on your home folder by the name .xbindkeysrc else create one like this:

xbindkeys -d > ~/.xbindkeysrc

Copy the snippet and paste it into your .xbindkeysrc file.

"xdotool key KP_Space; xinput set-int-prop <kbd-id> "Device Enabled" 8 0; sleep .05 ; xinput set-int-prop <kbd-id> "Device Enabled" 8 1"
     m:0x0 + c:65 + Release
    space

Here <kbd-id> is the keyboard ID which can be found out by xinput command. Now you want to configure xbindkeys to start each time you start your computer.

Open /etc/rc.local and add the line xbindkeys before exit 0.

You are done. Open a terminal and type xbindkeys to start it for now. See if it does the job. If it did not catch the double spaces or characters after spaces are missing, adjust the delay in our command in ~/.xbindkeysrc accordingly and reboot.

References:

  • Xbindkeys - Arch Documentation