Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Keyboard repeat rate and delay
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Mon Jul 15, 2013 10:50 am    Post subject: Keyboard repeat rate and delay Reply with quote

Hi all,
I want to set the keyboard repeat delay and rate in some X config file - the default is too slow for me. At present I am running the following command on startup
Code:
xset r rate 250 30
to set these parameters. However, they get reset to the default every time the machine suspends and resumes and I have to re-run this command all over again.

1. Is it possible to set these parameters in the xorg.conf file/directory? I suppose the relevant lines will look like this
Code:
Section "InputClass"
    Identifier             "Keyboard default"
    MatchIsKeyboard        "yes"
    Option                # some option that I need to fill in <-- what should this be?
EndSection


2. Is there some other file that X reads on suspend/resume that I can modify to fix the rate to the defaults I want?

Edit: It seems to be a combination of the X server and the Intel graphics driver. I have a different system with nvidia graphics driver and this problem does not arise (i.e., the keyboard repeat delay and rate are not reset) on a suspend/resume cycle.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/


Last edited by ppurka on Wed Jul 17, 2013 1:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
geeksheik
Tux's lil' helper
Tux's lil' helper


Joined: 07 Sep 2003
Posts: 99
Location: Zürich, Switzerland

PostPosted: Tue Jul 16, 2013 2:08 pm    Post subject: Reply with quote

Is your window manager stomping over your settings?

I use the KDE "System Settings / Input Devices / Keyboard" dialog for this . The back-end file that it's written to is:

${HOME}/.kde4/share/config/kcminputrc

I don't know about Gnome or other window managers though.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Tue Jul 16, 2013 2:25 pm    Post subject: Reply with quote

geeksheik wrote:
Is your window manager stomping over your settings?

I use the KDE "System Settings / Input Devices / Keyboard" dialog for this . The back-end file that it's written to is:

${HOME}/.kde4/share/config/kcminputrc

I don't know about Gnome or other window managers though.
I am using enlightenment. As far as I know it (and I have been using it for several years), enlightenment has no control for setting keyboard rate and delay. It can control the mouse acceleration though.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed Jul 17, 2013 12:19 pm    Post subject: Reply with quote

You have to put your keyboard command in the ~/.xinitrc file or Bash script file if you use the startx command or in ~/.xsession or .xsessionrc file or Bash script file if you use a display manager to open an X session.
_________________
Paul
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Wed Jul 17, 2013 1:31 pm    Post subject: Reply with quote

Logicien wrote:
You have to put your keyboard command in the ~/.xinitrc file or Bash script file if you use the startx command or in ~/.xsession or .xsessionrc file or Bash script file if you use a display manager to open an X session.
I am already doing something similar. That command is run from a bash script file every time I login. The problem happens when I resume from suspend. The window manager is not playing a role at that point since it is not starting (or even restarting - enlightenment can be restarted without losing windows). It is X which is resetting the previously set keyboard rate and delay.


Edit: It seems to be a combination of the X server and the Intel graphics driver. I have a different system with nvidia graphics driver and this problem does not arise (i.e., the keyboard repeat delay and rate are not reset) on a suspend/resume cycle.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
389292
Guru
Guru


Joined: 26 Mar 2019
Posts: 504

PostPosted: Fri May 22, 2020 10:51 pm    Post subject: Reply with quote

I also want to have a persistent repeat rate, because I often reconnect my keyboard and the settings are gone after that, I use xset and setxkbmap in my .xinitrc for initial settings (repeat+layout), is there a way to make it stick when keyboard reconnects? maybe with udev rule of some sort, I can't find anything online regarding this.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3264
Location: Canada

PostPosted: Sat May 23, 2020 4:29 am    Post subject: Re: Keyboard repeat rate and delay Reply with quote

ppurka wrote:
Hi all,
I want to set the keyboard repeat delay and rate in some X config file - the default is too slow for me. At present I am running the following command on startup
Code:
xset r rate 250 30
to set these parameters. However, they get reset to the default every time the machine suspends and resumes and I have to re-run this command all over again.

1. Is it possible to set these parameters in the xorg.conf file/directory? I suppose the relevant lines will look like this
Code:
Section "InputClass"
    Identifier             "Keyboard default"
    MatchIsKeyboard        "yes"
    Option                # some option that I need to fill in <-- what should this be?
EndSection


2. Is there some other file that X reads on suspend/resume that I can modify to fix the rate to the defaults I want?

Edit: It seems to be a combination of the X server and the Intel graphics driver. I have a different system with nvidia graphics driver and this problem does not arise (i.e., the keyboard repeat delay and rate are not reset) on a suspend/resume cycle.



for old 'kbd' driver the setting was something like that

Option "AutoRepeat" "500 5"

If you are lucky it is the same for evdev or libinput, but you should check docs for evdev or libinput drivers (which one do you use ? ). Annoyingly, 'man evdev' lists only mouse-related options, so you'll have to search deeper. I don't have x86-input-libinput installed to check its man page ( see what 'man 4 libinput; shows )
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat May 23, 2020 8:53 am    Post subject: Reply with quote

Putting it in the Xorg command line works for me:
Code:
Xorg :0 -auth /root/.Xauthority -ardelay 250 -arinterval 33 -quiet -retro
Back to top
View user's profile Send private message
389292
Guru
Guru


Joined: 26 Mar 2019
Posts: 504

PostPosted: Sat May 23, 2020 10:12 am    Post subject: Reply with quote

Ant P. wrote:
Putting it in the Xorg command line works for me:
Code:
Xorg :0 -auth /root/.Xauthority -ardelay 250 -arinterval 33 -quiet -retro

Where exactly do I put it? I run X with xinit, should I put it right there? that's a lot of typing to do each log-in.
---
I wrote my own script which executes xinit which in turn executes X with options, don't know how to do it simplier without multiplying involved enteties. Anyway the repeat rate is working now, but now I need to auto setxkbmap, I will probably make another topic, since this one is for repeat rate.
---
I decided to ditch this approach with Xorg altogether and instead use dbus to pass both the layout and the repeat rate when keyboard reconnects.
https://forums.gentoo.org/viewtopic-t-1113814-highlight-.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum