mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Backends: OSX: Forward keyDown/keyUp events to OS when unused by Dear ImGui.
This commit is contained in:
parent
c6cab1f352
commit
2554b512c0
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
// CHANGELOG
|
// CHANGELOG
|
||||||
// (minor and older changes stripped away, please see git history for details)
|
// (minor and older changes stripped away, please see git history for details)
|
||||||
|
// 2022-02-07: Inputs: Forward keyDown/keyUp events to OS when unused by dear imgui.
|
||||||
// 2022-01-31: Fix building with old Xcode versions that are missing gamepad features.
|
// 2022-01-31: Fix building with old Xcode versions that are missing gamepad features.
|
||||||
// 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago)with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion.
|
// 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago)with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion.
|
||||||
// 2021-01-20: Inputs: calling new io.AddKeyAnalogEvent() for gamepad support, instead of writing directly to io.NavInputs[].
|
// 2021-01-20: Inputs: calling new io.AddKeyAnalogEvent() for gamepad support, instead of writing directly to io.NavInputs[].
|
||||||
@ -131,7 +132,8 @@ static double GetMachAbsoluteTimeInSeconds()
|
|||||||
|
|
||||||
- (void)keyDown:(NSEvent*)event
|
- (void)keyDown:(NSEvent*)event
|
||||||
{
|
{
|
||||||
ImGui_ImplOSX_HandleEvent(event, self);
|
if (!ImGui_ImplOSX_HandleEvent(event, self))
|
||||||
|
[super keyDown:event];
|
||||||
|
|
||||||
// Call to the macOS input manager system.
|
// Call to the macOS input manager system.
|
||||||
[self interpretKeyEvents:@[event]];
|
[self interpretKeyEvents:@[event]];
|
||||||
@ -139,7 +141,8 @@ static double GetMachAbsoluteTimeInSeconds()
|
|||||||
|
|
||||||
- (void)keyUp:(NSEvent*)event
|
- (void)keyUp:(NSEvent*)event
|
||||||
{
|
{
|
||||||
ImGui_ImplOSX_HandleEvent(event, self);
|
if (!ImGui_ImplOSX_HandleEvent(event, self))
|
||||||
|
[super keyUp:event];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange
|
- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange
|
||||||
|
@ -153,6 +153,7 @@ Other Changes:
|
|||||||
- Backends: OSX: Added basic Platform IME support. (#3108, #2598) [@liuliu]
|
- Backends: OSX: Added basic Platform IME support. (#3108, #2598) [@liuliu]
|
||||||
- Backends: OSX: Fix Game Controller nav mapping to use shoulder for both focusing and tweak speed. (#4759)
|
- Backends: OSX: Fix Game Controller nav mapping to use shoulder for both focusing and tweak speed. (#4759)
|
||||||
- Backends: OSX: Fix building with old Xcode versions that are missing gamepad features. [@rokups]
|
- Backends: OSX: Fix building with old Xcode versions that are missing gamepad features. [@rokups]
|
||||||
|
- Backends: OSX: Forward keyDown/keyUp events to OS when unused by Dear ImGui.
|
||||||
- Backends: Android, GLUT: Submit keys using io.AddKeyEvent(). Submit keymods using io.AddKeyModsEvent() at the same time. (#2625)
|
- Backends: Android, GLUT: Submit keys using io.AddKeyEvent(). Submit keymods using io.AddKeyModsEvent() at the same time. (#2625)
|
||||||
- Backends: Android, GLUT: Submit mouse data using io.AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() functions. (#4858)
|
- Backends: Android, GLUT: Submit mouse data using io.AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() functions. (#4858)
|
||||||
- Backends: OpenGL3: Fixed a buffer overflow in imgui_impl_opengl3_loader.h init (added in 1.86). (#4468, #4830) [@dymk]
|
- Backends: OpenGL3: Fixed a buffer overflow in imgui_impl_opengl3_loader.h init (added in 1.86). (#4468, #4830) [@dymk]
|
||||||
|
Loading…
Reference in New Issue
Block a user