diff options
author | Canop <cano.petrole@gmail.com> | 2022-01-30 18:59:30 +0100 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2022-01-30 18:59:30 +0100 |
commit | 122dccd34b3a3fbd72e5ffced18e45fe621ccf83 (patch) | |
tree | 85552b3bcdce962ad5f67c1d7f06270aa120dedb /src/verb/verb_store.rs | |
parent | 4cfb2d0e8568cb4594211f33a7fd5019fc36d88b (diff) |
export key event parsing and formatting in crokey
This keys.rs file was copied into so many of my TUI applications,
I had to make it a distinct crate.
Diffstat (limited to 'src/verb/verb_store.rs')
-rw-r--r-- | src/verb/verb_store.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/verb/verb_store.rs b/src/verb/verb_store.rs index b7db794..534ff53 100644 --- a/src/verb/verb_store.rs +++ b/src/verb/verb_store.rs @@ -8,7 +8,7 @@ use { app::*, conf::Conf, errors::ConfError, - keys, + keys::KEY_FORMAT, }, crossterm::event::KeyEvent, }; @@ -128,7 +128,7 @@ impl VerbStore { ) -> Option<String> { for verb in &self.verbs { if verb.get_internal() == Some(internal) && stype.respects(verb.selection_condition) { - return verb.keys.get(0).map(|&k| keys::key_event_desc(k)); + return verb.keys.get(0).map(|&k| KEY_FORMAT.to_string(k)); } } None @@ -140,7 +140,7 @@ impl VerbStore { ) -> Option<String> { for verb in &self.verbs { if verb.get_internal() == Some(internal) { - return verb.keys.get(0).map(|&k| keys::key_event_desc(k)); + return verb.keys.get(0).map(|&k| KEY_FORMAT.to_string(k)); } } None |