From ccb56ddf97dded3af5b2d6e3a41367f56ca7d672 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Mon, 20 Jul 2015 10:04:18 +0200 Subject: CFrame: Claim all keyboard events on OS X. --- Source/Core/DolphinWX/Frame.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Source/Core/DolphinWX/Frame.cpp') diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index b41cdbb461..d2b396aa3d 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -1068,6 +1068,20 @@ bool TASInputHasFocus() return false; } +void CFrame::OnKeyDown(wxKeyEvent& event) +{ + // On OS X, we claim all keyboard events while + // emulation is running to avoid wxWidgets sounding + // the system beep for unhandled key events when + // receiving pad/Wiimote keypresses which take an + // entirely different path through the HID subsystem. +#ifndef __APPLE__ + // On other platforms, we leave the key event alone + // so it can be passed on to the windowing system. + event.Skip(); +#endif +} + void CFrame::OnMouse(wxMouseEvent& event) { // next handlers are all for FreeLook, so we don't need to check them if disabled -- cgit v1.2.3