diff options
author | crupest <crupest@outlook.com> | 2021-10-03 22:35:40 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-10-03 22:35:40 +0800 |
commit | 8b5df96202b8eb663a9a747c1c9d249f64a933e8 (patch) | |
tree | ff79018d7c11f524c02dd6b90d7fef5240a65900 | |
parent | 4056e710b4c99968afc4db3bbf26e2d3fef5db07 (diff) | |
download | cru-8b5df96202b8eb663a9a747c1c9d249f64a933e8.tar.gz cru-8b5df96202b8eb663a9a747c1c9d249f64a933e8.tar.bz2 cru-8b5df96202b8eb663a9a747c1c9d249f64a933e8.zip |
...
-rw-r--r-- | src/osx/gui/Window.mm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/osx/gui/Window.mm b/src/osx/gui/Window.mm index 4e3b19ed..86a4c77f 100644 --- a/src/osx/gui/Window.mm +++ b/src/osx/gui/Window.mm @@ -1,6 +1,7 @@ #include "cru/osx/gui/Window.hpp" #include "cru/osx/graphics/quartz/Painter.hpp" +#include "cru/osx/gui/Keyboard.hpp" #include "cru/osx/gui/UiApplication.hpp" #include "cru/platform/gui/Base.hpp" #include "cru/platform/gui/Keyboard.hpp" @@ -23,7 +24,6 @@ namespace cru::platform::gui::osx { namespace details { - class OsxWindowPrivate { friend OsxWindow; @@ -223,9 +223,13 @@ void OsxWindow::CreateWindow() { key_modifer}); break; case NSEventTypeKeyDown: - + this->key_down_event_.Raise(NativeKeyEventArgs{ + KeyCodeFromOsxToCru(event.keyCode), key_modifer}); + break; case NSEventTypeKeyUp: - + this->key_up_event_.Raise(NativeKeyEventArgs{ + KeyCodeFromOsxToCru(event.keyCode), key_modifer}); + break; default: break; } |