summaryrefslogtreecommitdiffstats
path: root/src/command
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2021-10-22 13:21:02 +0200
committerCanop <cano.petrole@gmail.com>2021-10-22 13:21:02 +0200
commit41c280e1582d8402f751d22cf82f61d4c9506c73 (patch)
treed534f1d247c4a3554e9213d578e106b649742e34 /src/command
parent341ba9c5aeb1c5d9540fac5652bfc8e7c1c6601d (diff)
make it possible to rebind left and right arrow keys
Fix #438
Diffstat (limited to 'src/command')
-rw-r--r--src/command/panel_input.rs17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/command/panel_input.rs b/src/command/panel_input.rs
index ff98b32..b387c88 100644
--- a/src/command/panel_input.rs
+++ b/src/command/panel_input.rs
@@ -271,7 +271,7 @@ impl PanelInput {
}
// we now check if the key is the trigger key of one of the verbs
- if keys::is_key_allowed_in_mode(key, mode) {
+ if keys::is_key_allowed_for_verb(key, mode, raw.is_empty()) {
for (index, verb) in con.verb_store.verbs.iter().enumerate() {
for verb_key in &verb.keys {
if *verb_key != key {
@@ -308,21 +308,6 @@ impl PanelInput {
}
}
- if key == keys::LEFT && raw.is_empty() {
- let internal = Internal::back;
- return Command::Internal {
- internal,
- input_invocation: parts.verb_invocation,
- };
- }
-
- if key == keys::RIGHT && raw.is_empty() {
- return Command::Internal {
- internal: Internal::open_stay,
- input_invocation: None,
- };
- }
-
// input field management
if mode == Mode::Input {
if self.input_field.apply_event(&event) {