CFrame: Claim all keyboard events on OS X.

This commit is contained in:
Jules Blok
2015-07-20 10:04:18 +02:00
parent da38e3a8ae
commit ccb56ddf97
3 changed files with 15 additions and 2 deletions

View File

@ -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