| >> 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
|