|
|
@ -105,14 +105,14 @@ use std::{
|
|
|
|
macro_rules! key {
|
|
|
|
macro_rules! key {
|
|
|
|
($key:ident) => {
|
|
|
|
($key:ident) => {
|
|
|
|
KeyEvent {
|
|
|
|
KeyEvent {
|
|
|
|
code: helix_view::keyboard::KeyCode::$key,
|
|
|
|
code: ::helix_view::keyboard::KeyCode::$key,
|
|
|
|
modifiers: helix_view::keyboard::KeyModifiers::NONE,
|
|
|
|
modifiers: ::helix_view::keyboard::KeyModifiers::NONE,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
($($ch:tt)*) => {
|
|
|
|
($($ch:tt)*) => {
|
|
|
|
KeyEvent {
|
|
|
|
KeyEvent {
|
|
|
|
code: helix_view::keyboard::KeyCode::Char($($ch)*),
|
|
|
|
code: ::helix_view::keyboard::KeyCode::Char($($ch)*),
|
|
|
|
modifiers: helix_view::keyboard::KeyModifiers::NONE,
|
|
|
|
modifiers: ::helix_view::keyboard::KeyModifiers::NONE,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -120,8 +120,8 @@ macro_rules! key {
|
|
|
|
macro_rules! ctrl {
|
|
|
|
macro_rules! ctrl {
|
|
|
|
($($ch:tt)*) => {
|
|
|
|
($($ch:tt)*) => {
|
|
|
|
KeyEvent {
|
|
|
|
KeyEvent {
|
|
|
|
code: helix_view::keyboard::KeyCode::Char($($ch)*),
|
|
|
|
code: ::helix_view::keyboard::KeyCode::Char($($ch)*),
|
|
|
|
modifiers: helix_view::keyboard::KeyModifiers::CONTROL,
|
|
|
|
modifiers: ::helix_view::keyboard::KeyModifiers::CONTROL,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -129,8 +129,8 @@ macro_rules! ctrl {
|
|
|
|
macro_rules! alt {
|
|
|
|
macro_rules! alt {
|
|
|
|
($($ch:tt)*) => {
|
|
|
|
($($ch:tt)*) => {
|
|
|
|
KeyEvent {
|
|
|
|
KeyEvent {
|
|
|
|
code: helix_view::keyboard::KeyCode::Char($($ch)*),
|
|
|
|
code: ::helix_view::keyboard::KeyCode::Char($($ch)*),
|
|
|
|
modifiers: helix_view::keyboard::KeyModifiers::ALT,
|
|
|
|
modifiers: ::helix_view::keyboard::KeyModifiers::ALT,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|