summaryrefslogtreecommitdiffstats
path: root/src/input/inputEvent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/inputEvent.cpp')
-rw-r--r--src/input/inputEvent.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/input/inputEvent.cpp b/src/input/inputEvent.cpp
index 9b69a3a..f5abf43 100644
--- a/src/input/inputEvent.cpp
+++ b/src/input/inputEvent.cpp
@@ -7,6 +7,7 @@
#include <QBuffer>
#include <QByteArray>
+#include <QCoreApplication>
#include <QDataStream>
#include <QKeyEvent>
#include <QMouseEvent>
@@ -97,3 +98,34 @@ InputEvent InputEvent::keyboardRelease(int key, int mods)
return InputEvent(ET_KEY, EC_RELEASE, value);
}
+#define describe(list, description, type, code, value) \
+ list.append(SpecialInputEventDescription(InputEvent::type, InputEvent::code, value, QCoreApplication::translate("InputEvent", description)))
+
+QList<SpecialInputEventDescription> SpecialInputEventDescription::describeSpecialEvents()
+{
+ QList<SpecialInputEventDescription> list;
+ describe(list, "Say Hello", ET_SPECIAL, EC_SAY_HELLO, 0);
+ describe(list, "Reboot", ET_SPECIAL, EC_REBOOT, 0);
+ describe(list, "Kill X Server", ET_SPECIAL, EC_KILL_X, 0);
+ describe(list, "Reboot immediately", ET_SPECIAL, EC_SYSRQ, 'b');
+ describe(list, "Power off immediately", ET_SPECIAL, EC_SYSRQ, 'o');
+ describe(list, "Crash System", ET_SPECIAL, EC_SYSRQ, 'c');
+ describe(list, "Turn off raw keyboard mode", ET_SPECIAL, EC_SYSRQ, 'r');
+ describe(list, "Send SIGTERM to all", ET_SPECIAL, EC_SYSRQ, 'e');
+ describe(list, "Send SIGKILL to all", ET_SPECIAL, EC_SYSRQ, 'i');
+ describe(list, "Kill all on this terminal", ET_SPECIAL, EC_SYSRQ, 'k');
+ describe(list, "Activate OOM killer", ET_SPECIAL, EC_SYSRQ, 'f');
+ describe(list, "Make real-time tasks niceable", ET_SPECIAL, EC_SYSRQ, 'n');
+ describe(list, "Force-thaw filesystems", ET_SPECIAL, EC_SYSRQ, 'j');
+ describe(list, "Sync all mounted filesystems", ET_SPECIAL, EC_SYSRQ, 's');
+ describe(list, "Remount all readonly", ET_SPECIAL, EC_SYSRQ, 'u');
+ describe(list, "Show all held locks", ET_SPECIAL, EC_SYSRQ, 'd');
+ describe(list, "Show stack traces", ET_SPECIAL, EC_SYSRQ, 'l');
+ describe(list, "Dump memory info", ET_SPECIAL, EC_SYSRQ, 'm');
+ describe(list, "Dump registers and flags", ET_SPECIAL, EC_SYSRQ, 'p');
+ describe(list, "Dump timers and clockevents", ET_SPECIAL, EC_SYSRQ, 'q');
+ describe(list, "Dump task list", ET_SPECIAL, EC_SYSRQ, 't');
+ describe(list, "Dump uninterruptible tasks", ET_SPECIAL, EC_SYSRQ, 'w');
+ describe(list, "Dump ftrace buffer", ET_SPECIAL, EC_SYSRQ, 'z');
+ return list;
+}