What's Key_Sysreq?

I mapped Fn+Prog to Key_Sysreq, for the rare occasion I need to do a three finger salute in Linux. It wasn’t working for me, and I was stumped for a while until I compared the output with other keyboards and realised I had the wrong keycode entirely! Linux actually wants the “print screen” scancode, and it’s already present on the default layout (Fn+Z).

But I’m curious to know now, where did this other thing I unearthed come from? showkey gives me keycode 240 for it and xev recognises it only as an unnamed keycode 248.

Back in the long lost days of the IBM PC, pressing alt+printScreen activated a hardware option that sent a completely separate keycode to the computer, bypassing all software features. It was intended as a non-maskable interrupt but has fallen into disuse.

The Linux “Magic SysRq” key is an emulation of this behaviour, but because it is implemented in software it doesn’t use the hardware Key_Sysreq.

2 Likes