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

Re: SysRq Keys on iBook2



Kristian Peters (Unusual spelling) wrote:
>"Warren A. Layton" <zeevon@debian.org> schrieb:
>> Out of curiosity, which keys correspond to the kernel's magic SysRq keys
>> on an iBook2? In the kernel source docs (Documentation/sysrq.txt), it
>> states that on PowerPC the SysRq commands can be accessed by pressing
>> Alt+F13+<command>.

> Unfortunately you can remap another key to match SysRq.

I'm guessing there is some sort of mistake in that sentence and you meant 
to say "Unfortunately you can't" or "Fortunately you can".  The truth, at 
least according to the documentation, seems to be the second one.
The "MAGIC SYSRQ KEY DOCUMENTATION v1.2" dated Sat May 16 01:09:21 EDT 
1998, which I found at http://snafu.freedom.org/linux2.2/docs/sysrq.txt, 
states:
> *  I hit SysRQ, but nothing seems to happen, what's wrong?
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> There are some keyboards which do not support 'SysRQ', you can try running
> 'showkey -s' and pressing SysRQ or alt-SysRQ to see if it generates any
> 0x54 codes. If it doesn't, you may define the magic sysrq sequence to a
> different key. Find the keycode with showkey, and change the define of
> '#define SYSRQ_KEY 0x54' in [/usr/src/linux/]include/asm/keyboard.h to
> the keycode of the key you wish to use, then recompile. Oh, and by the way,
> you exit 'showkey' by not typing anything for ten seconds.

The oddly more recent (don't let the version number fool you) "Linux 
Magic System Request Key Hacks:
Documentation for sysrq.c version 1.15" dated 2001/01/28 10:15:59 says 
something different, and seems to agree with the documentation I got with 
the 2.4.18 kernel source, although I don't have those docs available to 
me right now.  I found this document at 
http://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentati
on/sysrq.txt and what is says is:
> *  I hit SysRq, but nothing seems to happen, what's wrong?
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> There are some keyboards that send different scancodes for SysRq than the
> pre-defined 0x54. So if SysRq doesn't work out of the box for a certain
> keyboard, run 'showkey -s' to find out the proper scancode sequence. Then
> use 'setkeycodes <sequence> 84' to define this sequence to the usual SysRq
> code (84 is decimal for 0x54). It's probably best to put this command in a
> boot script. Oh, and by the way, you exit 'showkey' by not typing anything
> for ten seconds.

Of course the option has to be set in your configuration before you 
compile for it to do anything :)

I've been wondering about this showkey/setkeycodes solution.  Showkey 
tends to show a lot of stuff I can't really interpret when I press 
something like "command power"...  What code do I need to use with 
setkeycodes?



Reply to: