|
@@ -353,6 +353,20 @@ void qemu_input_event_send(QemuConsole *src, InputEvent *evt)
|
|
assert(!(evt->type == INPUT_EVENT_KIND_KEY &&
|
|
assert(!(evt->type == INPUT_EVENT_KIND_KEY &&
|
|
evt->u.key.data->key->type == KEY_VALUE_KIND_NUMBER));
|
|
evt->u.key.data->key->type == KEY_VALUE_KIND_NUMBER));
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * 'sysrq' was mistakenly added to hack around the fact that
|
|
|
|
+ * the ps2 driver was not generating correct scancodes sequences
|
|
|
|
+ * when 'alt+print' was pressed. This flaw is now fixed and the
|
|
|
|
+ * 'sysrq' key serves no further purpose. We normalize it to
|
|
|
|
+ * 'print', so that downstream receivers of the event don't
|
|
|
|
+ * neeed to deal with this mistake
|
|
|
|
+ */
|
|
|
|
+ if (evt->type == INPUT_EVENT_KIND_KEY &&
|
|
|
|
+ evt->u.key.data->key->u.qcode.data == Q_KEY_CODE_SYSRQ) {
|
|
|
|
+ evt->u.key.data->key->u.qcode.data = Q_KEY_CODE_PRINT;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
|
|
if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|