>
> We also need to check if emulate_raw() needs to be adjusted...
I looked at that very quickly, to be honest, but couldn't understand it
entirely. This code:
1087 if (keycode == KEY_SYSRQ && sysrq_alt) {
1088 put_queue(vc, 0x54 | up_flag);
1089 return 0;
1090 }
seems to be supposed to cancel the Alt "press" by sending a Alt
"release" to handle the sequence press alt -> press sysrq without
affecting the application. However, this is just a guess. I couldn't
find out what that magic 0x54 meant or why this would be enough wether
we pressed the left or the right alt...
Then there are other things that I don't understand there: I don't see
any code to filter out the keys we press ('T','P', etc.) while using
SysRq magic if we are in raw mode. emulate_raw will happily call
put_queue on them before we have a chance to bail out.
Maybe we should just stop calling emulate_raw while sysrq_active is
active. This way, after we press Alt + SysRq, every keypress would be
processed as a magic sysrq and not handled by any other code until we
release both keys.