summaryrefslogtreecommitdiff
path: root/src/event.rs
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2018-10-16 18:46:26 +0000
committerGitHub <noreply@github.com>2018-10-16 18:46:26 +0000
commita727801f60286282795e850637de7e21f15d4114 (patch)
treefe2660439e54de2fb4419ae9e4132fb995a8d148 /src/event.rs
parent15e0deae2b49078b47a782679300cdf99d9ce687 (diff)
downloadalacritty-a727801f60286282795e850637de7e21f15d4114.tar.gz
alacritty-a727801f60286282795e850637de7e21f15d4114.zip
Allow the usage of scancodes in the config
This change should allow the usage of scancodes in the configuration file. When a VirtualKeyCode for glutin is not present, this should now allow the user to use the scancodes instead. If the user specifiecs a key with its scancode even though the key has a VirtualKeyCode, it should still work. The behavior of directly specifying a VirtualKeyCode should be unchanged by this. This fixes #1265.
Diffstat (limited to 'src/event.rs')
-rw-r--r--src/event.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/event.rs b/src/event.rs
index 9db0680d..eef04a8c 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -334,9 +334,8 @@ impl<N: Notify> Processor<N> {
processor.ctx.terminal.dirty = true;
},
KeyboardInput { input, .. } => {
- let glutin::KeyboardInput { state, virtual_keycode, modifiers, .. } = input;
- processor.process_key(state, virtual_keycode, modifiers);
- if state == ElementState::Pressed {
+ processor.process_key(input);
+ if input.state == ElementState::Pressed {
// Hide cursor while typing
*hide_cursor = true;
}