aboutsummaryrefslogtreecommitdiffstats
path: root/src/osx
diff options
context:
space:
mode:
Diffstat (limited to 'src/osx')
-rw-r--r--src/osx/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/osx/mod.rs b/src/osx/mod.rs
index abe233d..dfd2eb8 100644
--- a/src/osx/mod.rs
+++ b/src/osx/mod.rs
@@ -26,6 +26,7 @@ mod event;
static mut shift_pressed: bool = false;
static mut ctrl_pressed: bool = false;
static mut win_pressed: bool = false;
+static mut alt_pressed: bool = false;
pub struct Window {
view: id,
@@ -272,6 +273,11 @@ impl Window {
win_pressed = !win_pressed;
events.push(win_modifier.unwrap());
}
+ let alt_modifier = Window::modifier_event(event, appkit::NSAlternateKeyMask as u64, events::LAlt, alt_pressed);
+ if alt_modifier.is_some() {
+ alt_pressed = !alt_pressed;
+ events.push(alt_modifier.unwrap());
+ }
},
NSScrollWheel => { },
NSOtherMouseDown => { },