If you’ve used CDE on Solaris 2.6 for any length of time, you’ve probably noticed that the default keyboard repeat rate feels sluggish. The default autorepeat delay is 500 milliseconds before a held key begins repeating, and once it starts, keys repeat every 50 milliseconds. For anyone accustomed to a faster repeat rate, this can make editing text or navigating the terminal feel painfully slow.
CDE’s Style Manager provides a toggle to enable or disable autorepeat entirely, but it does not expose the actual repeat rate or delay settings. To change those, you need to pass options directly to the X server.
Toggling Autorepeat via the Style Manager
To turn autorepeat on or off, open the Workspace Menu, launch the Style Manager, and click the keyboard icon. From there you can enable or disable key repeat.
You can also toggle the blinking cursor in dtterm
through the Options menu under Global, selecting
Blinking Cursor Enabled or Disabled.
Neither of these controls adjusts the repeat speed itself.
Changing the Repeat Rate via Xsun Options
The Xsun server accepts two command-line options that control autorepeat timing:
-ar1 milliseconds— The delay before a held key begins autorepeating. Default is 500 ms.-ar2 milliseconds— The interval between autorepeats once repeating has started. Default is 50 ms.
To configure these, you need to modify the Xservers
configuration file that dtlogin reads when starting
the X server.
Step-by-Step Procedure
1. Copy the Default Configuration
The dtlogin process first looks for the file
/etc/dt/config/Xservers. If it does not exist, it
falls back to /usr/dt/config/Xservers. Copy the
default to the override location:
mkdir -p /etc/dt/config
cp /usr/dt/config/Xservers /etc/dt/config/Xservers
2. Edit the Xservers File
Open /etc/dt/config/Xservers in your preferred
editor and modify the server startup line to include
the -ar1 and -ar2 options. The line should look
something like this:
:0 Local local_uid@console root /usr/openwin/bin/Xsun :0 -nobanner -ar1 180 -ar2 25
In this example, the autorepeat delay is set to 180 milliseconds and the repeat interval is set to 25 milliseconds. This produces a noticeably snappier response. Adjust these values to your preference.
3. Restart dtlogin
The X server must be restarted for the changes to take effect. This will terminate your current CDE session, so save any open work before proceeding:
/etc/rc2.d/S99dtlogin stop
/etc/rc2.d/S99dtlogin start
After dtlogin restarts and you log back in, the new repeat rate will be active.
Recommended Values
| Setting | Default | Recommended | Description |
|---|---|---|---|
-ar1 | 500 ms | 180 ms | Delay before repeat starts |
-ar2 | 50 ms | 25 ms | Interval between repeats |
The recommended values above provide a responsive feel
without being so aggressive that accidental repeats
become a problem. If you find keys repeating too
quickly, increase -ar2 slightly. If the initial delay
before repeating feels too long or too short, adjust
-ar1 accordingly.
References
Xsun(1)— X server manual page, documents-ar1and-ar2optionsdtlogin(1X)— CDE login manager, documents the Xservers configuration file search order