Re: SYSRQ key

Aaron M. Ucko (amu@mit.edu)
22 Mar 1998 21:40:49 -0600


Chris Atenasio <root@lilo.dyn.ml.org> writes:

> Is there some easy way to change which key makes a sysrq? I dont think i
> can live without the alt-printscrn switch_to_last_tty :) I have a windows
> keyboard(sadly) so i tried remapping it to the left windows key from what

Last I checked, Windows keyboards had all 101 standard keys plus the
extra three...

> showkey -s told by changing:
> if (keycode == SYSRQ_KEY) {
> to:
> if (keycode == 0x5b) { /* left windows key */
> Now I'm rebooted and...nothing. Alt-prtscrn still goes to last tty
> though. :) Anyone see my error? Is the windows key some kind of multi
> scancode?

I don't see that code in 2.0.33, so I presume it's for the 2.1 magic
sysreq thing (which is hardcoded? sigh.). What you want to do can be
accomplished by changing the keymap, which you can do in userspace
(see loadkeys(1) and keytables(5)). I *think* the following should do
what you want, but I haven't tested it (not having a Windows keyboard
on this computer):

loadkeys << EOF
keycode 0x5b = Last_Console
EOF

-- 
Aaron M. Ucko <amu@mit.edu> (finger amu@monk.mit.edu) [Stark raving sane]

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu