[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [CtrlAltEnd] as [CtrlAltDel] ?



On: Sun, 20 Sep 1998 16:35:28 +0200 Horacio M G writes:
> 
> Hi there,
> how can I make a key combo work?
> In etc/inittab I get the following line:
> 
> # What to do when CTRL-ALT-DEL is pressed. 
> ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
> 
> which is ok for shutting the system down and rebooting.  But, how 
> about shutting down and halting?  I tried adding the line:
> 
> # What to do when CTRL-ALT-END is pressed.
> ca:12345:ctrlaltend:/sbin/shutdown -t1 -a -h now
> 
> which was just a guess, and obviously didn't work.  I suppose I
> should first of all configure [CtrlAltEnd] as a key combo, but how
> and where?

ctrlaltdel is something special in the inittab.  There is an
additional special key combo that can be used, here the according
section from the inittab(5) manpage:

       kbrequest
              The  process  will be executed when init receives a
              signal from the keyboard handler that a special key
              combination was pressed on the console keyboard.

              The documentation for this function is not complete
              yet; more documentation can be found  in  the  kbd-
              x.xx packages (most recent was kbd-0.94 at the time
              of this writing). Basically you want  to  map  some
              keyboard   combination   to   the  "KeyboardSignal"
              action. For example, to map  Alt-Uparrow  for  this
              purpose use the following in your keymaps file:

              alt keycode 103 = KeyboardSignal

The according line could be read as:

 ca:12345:kbrequest:/sbin/shutdown -t1 -a -h now

You need to edit the /etc/kbd/default.map.gz file to insert the
keyboard definition for the ctrl-alt-end key, e.g.:

keycode 107 = Select
	altgr control keycode 107 = KeyboardSignal
	control alt   keycode 107 = KeyboardSignal

(Everything untested)

	Torsten


Reply to: