aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/event.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/event.rs b/src/event.rs
index c385e289..32b0e9d6 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -224,6 +224,8 @@ impl<N: Notify> Processor<N> {
processor.ctx.terminal.dirty = true;
},
glutin::Event::KeyboardInput(state, _code, key, mods, string) => {
+ // Ensure that key event originates from our window. For example using a shortcut
+ // to switch windows could generate a release key event.
if state == ElementState::Pressed {
*hide_cursor = true;
}