diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-10-16 18:46:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-16 18:46:26 +0000 |
commit | a727801f60286282795e850637de7e21f15d4114 (patch) | |
tree | fe2660439e54de2fb4419ae9e4132fb995a8d148 /src/event.rs | |
parent | 15e0deae2b49078b47a782679300cdf99d9ce687 (diff) | |
download | alacritty-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.rs | 5 |
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; } |