[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2566.0. "Ctrl key to logout the user" by FRSEPO::KEE (Vini Vidi Vocum Chokum) Wed Apr 04 1990 04:01

    A customer of mine is writing some DECwindows applications.  They want
    to know if there is a way to define a key, that when pressed, will
    gracefully log out the user, like quiting from the Session Manager.
    
    Can anyone provide an example?
T.RTitleUserPersonal
Name
DateLines
2566.1two possible approachesAITG::DERAMODan D'Eramo, nice personWed Apr 04 1990 19:4135
>>    A customer of mine is writing some DECwindows applications.  They want
>>    to know if there is a way to define a key, that when pressed, will
>>    gracefully log out the user, like quiting from the Session Manager.
        
        *If* it is possible to set up accelerators for the
        session manager menu items in DECW$SM_GENERAL.DAT or
        DECW$SESSION.DAT -- though I have no reason to believe
        that it is -- then you could
        
             o	customize the session manager to not prompt for
        	confirmation on quitting
        
             o	use the probably nonexistent method to customize
        	the session manager to have an accelerator for
        	the Quit Session menu item
        
             o	have a detached process run a small program that
        	grabs, say, F20, and when, say,  ctrl-shift-F20
        	is pressed it sends a keyboard event to the
        	session manager window (found by walking the
        	window hierarchy while looking for a window with
        	the correct application class hints) telling it
        	that the accelerator was pressed
        
        This assumes you want the session manager to handle the
        shutting down.  It might be easier to just find out what
        it is that the session manager does (XKillClient?), and
        have a detached program running a process that grabs a
        key and will do that when the correct key combination is
        pressed.  The CYCLE example program shows how to "hover"
        over the keyboard looking for the correct key
        combination.  You're on your own for killing off all of
        the clients.
        
        Dan