From da4d9340baca311580ee7a10eaaec1f63a77bb60 Mon Sep 17 00:00:00 2001 From: Nehliin Date: Sun, 17 Oct 2021 16:06:21 +0200 Subject: [PATCH] Make key macro more portable --- helix-term/src/keymap.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs index 8f59060f..ed7f7edd 100644 --- a/helix-term/src/keymap.rs +++ b/helix-term/src/keymap.rs @@ -12,13 +12,13 @@ use std::{ #[macro_export] macro_rules! key { ($key:ident) => { - KeyEvent { + ::helix_view::input::KeyEvent { code: ::helix_view::keyboard::KeyCode::$key, modifiers: ::helix_view::keyboard::KeyModifiers::NONE, } }; ($($ch:tt)*) => { - KeyEvent { + ::helix_view::input::KeyEvent { code: ::helix_view::keyboard::KeyCode::Char($($ch)*), modifiers: ::helix_view::keyboard::KeyModifiers::NONE, }