summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/actions/actions.cpp7
-rw-r--r--src/actions/actions.h1
-rw-r--r--src/commands.cpp7
-rw-r--r--src/commands.h5
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h9
-rw-r--r--src/input/pages/other.cpp6
7 files changed, 25 insertions, 11 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 2514ac180..d803de671 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -884,4 +884,11 @@ impHandler0(serverUnIgnoreAll)
return true;
}
+impHandler0(error)
+{
+ const int *const ptr = nullptr;
+ logger->log("test %d", *ptr);
+ exit(1);
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index e3e6a2c02..b773f9992 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -71,6 +71,7 @@ namespace Actions
decHandler(dump);
decHandler(serverIgnoreAll);
decHandler(serverUnIgnoreAll);
+ decHandler(error) __attribute__ ((noreturn));
} // namespace Actions
#undef decHandler
diff --git a/src/commands.cpp b/src/commands.cpp
index eb3e44e96..283b07e78 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -219,13 +219,6 @@ impHandler(dumpTests)
return true;
}
-impHandler0(error)
-{
- const int *const ptr = nullptr;
- logger->log("test %d", *ptr);
- exit(1);
-}
-
impHandler(url)
{
if (event.tab)
diff --git a/src/commands.h b/src/commands.h
index d91b7345a..9cfb87d98 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -52,7 +52,6 @@ struct CommandInfo final
namespace Commands
{
decHandler(hack);
- decHandler(error) __attribute__ ((noreturn));
decHandler(url);
decHandler(open);
decHandler(dumpGraphics);
@@ -84,8 +83,7 @@ namespace Commands
enum
{
- COMMAND_ERROR = 0,
- COMMAND_DUMPG,
+ COMMAND_DUMPG = 0,
COMMAND_DUMPE,
COMMAND_DUMPT,
COMMAND_DUMPOGL,
@@ -116,7 +114,6 @@ enum
static const CommandInfo commands[] =
{
- {"error", &Commands::error, -1, false},
{"dumpg", &Commands::dumpGraphics, -1, false},
{"dumpe", &Commands::dumpEnvironment, -1, false},
{"dumpt", &Commands::dumpTests, -1, false},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index d81a66352..aa69f4a19 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -397,6 +397,7 @@ namespace InputAction
SERVER_IGNORE_ALL,
SERVER_UNIGNORE_ALL,
SET_DROP,
+ ERROR,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 8f7ec4b73..4b9150aa8 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -3342,6 +3342,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputAction::NO_VALUE, 50,
InputCondition::INGAME,
"setdrop",
+ true},
+ {"keyError",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::error,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "error",
false}
};
diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp
index 6bafbf8c3..8bae75449 100644
--- a/src/input/pages/other.cpp
+++ b/src/input/pages/other.cpp
@@ -286,6 +286,12 @@ SetupActionData setupActionDataOther[] =
"",
},
{
+ // TRANSLATORS: input action name
+ N_("Crash client"),
+ InputAction::ERROR,
+ "",
+ },
+ {
"",
InputAction::NO_VALUE,
""