[comp.windows.x] Questions about Key threshold & screen-saver

sam@oberon.com (Samuel G. Silberman) (03/21/91)

I have two questions:


1.   How do I change the keyboard auto-repeat delay threshold?  

The default setting is waay tooo :-)  quick.    "xset -r off" will turn it 
off.  My man page does not document any threshold setting.



2.  Is there a way hook into the screen-saver event.   

I would like to write a program that would run instead of my screen turning
black.   Is there a was to use "xset" to hook this program in or do I need
to call the hook from the program itself.


-- 
---------------------------------------------------------------------------
Samuel G. Silberman                                    Oberon Software Inc.
                                                       1 Memorial Drive
sam@oberon.com                                         Cambridge MA 02142

ekberg@asl.dl.nec.COM (Tom Ekberg) (03/21/91)

 > 1.   How do I change the keyboard auto-repeat delay threshold?  
 > 
 > The default setting is waay tooo :-)  quick.    "xset -r off" will turn it 
 > off.  My man page does not document any threshold setting.

You didn't say what kind of server you are using, but I'll assume you are using
a Sun.  If you look at the man page for Xsun, you will see references to the
-ar1 and -ar2 switches.  The -ar1 switch sets the delay before the autorepeat
starts, and the -ar2 switch sets the interval between autorepeats after the
first one.  I have the following in my .cshrc file:

    alias xinit  "\xinit -- -ar1 500;kbd_mode -a"

This sets the initial autorepeat delay to 0.5 seconds, which is what a lot of
other equipment I have used sets it to.  The kbd_mode -a keeps the keyboard
from getting locked up when the server crashes.

  -- tom, ekberg@asl.dl.nec.com (x3503)

doug@genmri.UUCP (Doug Becker) (03/22/91)

    1.   How do I change the keyboard auto-repeat delay threshold?  

This is server-dependent.  On my Xsun server, the server accepts the -ar1
and -ar2 command line options which control the autorepeat delay and
interval, respectively.

    2.  Is there a way hook into the screen-saver event.   

There is no screen saver event.  I don't think there's a portable way to do
what you want (have your screen saver program run instead of the server's);
your best bet might be to devise a local solution, such as hacking the
server.
    
-- 

Doug Becker
doug@nmri.ge.com
crdgw1!sane!doug

mouse@lightning.mcrcim.mcgill.EDU (der Mouse) (03/22/91)

> 1.   How do I change the keyboard auto-repeat delay threshold?

Server-specific.  The MIT Sun server, for example, has -ar1 and -ar2
command-line options, as others have noted.

> 2.  Is there a way hook into the screen-saver event.

Core X does not have any way for a client to detect when the
screen-saver kicks in.  I do recall seeing something called xidle,
which I think is a server extension, which provides this capability.
According to archie, it's available from half the universe....

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu